text
stringlengths
8
4.13M
use std::io::{Read, Result as IOResult, Error as IOError}; use std::string::FromUtf8Error; #[derive(Debug)] pub enum StringReadError { IOError(IOError), StringConstructionError(FromUtf8Error) } pub trait StringRead { fn read_null_terminated_string(&mut self) -> Result<String, StringReadError>; fn read_fixed_length_null_terminated_string(&mut self, length: u32) -> Result<String, StringReadError>; } impl<T: Read + ?Sized> StringRead for T { fn read_null_terminated_string(&mut self) -> Result<String, StringReadError> { let mut buffer = Vec::<u8>::new(); loop { let char = self.read_u8().map_err(StringReadError::IOError)?; if char == 0 { break; } buffer.push(char); } String::from_utf8(buffer).map_err(StringReadError::StringConstructionError) } fn read_fixed_length_null_terminated_string(&mut self, length: u32) -> Result<String, StringReadError> { let mut buffer = Vec::<u8>::with_capacity(length as usize); unsafe { buffer.set_len(length as usize); } self.read_exact(&mut buffer).map_err(StringReadError::IOError)?; for i in 0..buffer.len() { let char = buffer[i]; if char == 0 { buffer.resize(i, 0u8); break; } } String::from_utf8(buffer).map_err(StringReadError::StringConstructionError) } } pub trait RawDataRead { fn read_data(&mut self, len: usize) -> IOResult<Box<[u8]>>; } impl<T: Read + ?Sized> RawDataRead for T { fn read_data(&mut self, len: usize) -> IOResult<Box<[u8]>> { let mut buffer = Vec::with_capacity(len); unsafe { buffer.set_len(len); } self.read_exact(&mut buffer)?; Ok(buffer.into_boxed_slice()) } } pub trait PrimitiveRead { fn read_u8(&mut self) -> IOResult<u8>; fn read_u16(&mut self) -> IOResult<u16>; fn read_u32(&mut self) -> IOResult<u32>; fn read_u64(&mut self) -> IOResult<u64>; fn read_i8(&mut self) -> IOResult<i8>; fn read_i16(&mut self) -> IOResult<i16>; fn read_i32(&mut self) -> IOResult<i32>; fn read_i64(&mut self) -> IOResult<i64>; fn read_f32(&mut self) -> IOResult<f32>; fn read_f64(&mut self) -> IOResult<f64>; } impl<T: Read + ?Sized> PrimitiveRead for T { fn read_u8(&mut self) -> IOResult<u8> { let mut buffer = [0u8; 1]; self.read_exact(&mut buffer)?; Ok(u8::from_le_bytes(buffer)) } fn read_u16(&mut self) -> IOResult<u16> { let mut buffer = [0u8; 2]; self.read_exact(&mut buffer)?; Ok(u16::from_le_bytes(buffer)) } fn read_u32(&mut self) -> IOResult<u32> { let mut buffer = [0u8; 4]; self.read_exact(&mut buffer)?; Ok(u32::from_le_bytes(buffer)) } fn read_u64(&mut self) -> IOResult<u64> { let mut buffer = [0u8; 8]; self.read_exact(&mut buffer)?; Ok(u64::from_le_bytes(buffer)) } fn read_i8(&mut self) -> IOResult<i8> { let mut buffer = [0u8; 1]; self.read_exact(&mut buffer)?; Ok(i8::from_le_bytes(buffer)) } fn read_i16(&mut self) -> IOResult<i16> { let mut buffer = [0u8; 2]; self.read_exact(&mut buffer)?; Ok(i16::from_le_bytes(buffer)) } fn read_i32(&mut self) -> IOResult<i32> { let mut buffer = [0u8; 4]; self.read_exact(&mut buffer)?; Ok(i32::from_le_bytes(buffer)) } fn read_i64(&mut self) -> IOResult<i64> { let mut buffer = [0u8; 8]; self.read_exact(&mut buffer)?; Ok(i64::from_le_bytes(buffer)) } fn read_f32(&mut self) -> IOResult<f32> { let mut buffer = [0u8; 4]; self.read_exact(&mut buffer)?; Ok(f32::from_le_bytes(buffer)) } fn read_f64(&mut self) -> IOResult<f64> { let mut buffer = [0u8; 8]; self.read_exact(&mut buffer)?; Ok(f64::from_le_bytes(buffer)) } }
#[doc = r"Value read from the register"] pub struct R { bits: u32, } #[doc = r"Value to write to the register"] pub struct W { bits: u32, } impl super::EEDONE { #[doc = r"Modifies the contents of the register"] #[inline(always)] pub fn modify<F>(&self, f: F) where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, { let bits = self.register.get(); self.register.set(f(&R { bits }, &mut W { bits }).bits); } #[doc = r"Reads the contents of the register"] #[inline(always)] pub fn read(&self) -> R { R { bits: self.register.get(), } } #[doc = r"Writes to the register"] #[inline(always)] pub fn write<F>(&self, f: F) where F: FnOnce(&mut W) -> &mut W, { self.register.set( f(&mut W { bits: Self::reset_value(), }) .bits, ); } #[doc = r"Reset value of the register"] #[inline(always)] pub const fn reset_value() -> u32 { 0 } #[doc = r"Writes the reset value to the register"] #[inline(always)] pub fn reset(&self) { self.register.set(Self::reset_value()) } } #[doc = r"Value of the field"] pub struct EEPROM_EEDONE_WORKINGR { bits: bool, } impl EEPROM_EEDONE_WORKINGR { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = r"Proxy"] pub struct _EEPROM_EEDONE_WORKINGW<'a> { w: &'a mut W, } impl<'a> _EEPROM_EEDONE_WORKINGW<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits &= !(1 << 0); self.w.bits |= ((value as u32) & 1) << 0; self.w } } #[doc = r"Value of the field"] pub struct EEPROM_EEDONE_WKERASER { bits: bool, } impl EEPROM_EEDONE_WKERASER { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = r"Proxy"] pub struct _EEPROM_EEDONE_WKERASEW<'a> { w: &'a mut W, } impl<'a> _EEPROM_EEDONE_WKERASEW<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits &= !(1 << 2); self.w.bits |= ((value as u32) & 1) << 2; self.w } } #[doc = r"Value of the field"] pub struct EEPROM_EEDONE_WKCOPYR { bits: bool, } impl EEPROM_EEDONE_WKCOPYR { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = r"Proxy"] pub struct _EEPROM_EEDONE_WKCOPYW<'a> { w: &'a mut W, } impl<'a> _EEPROM_EEDONE_WKCOPYW<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits &= !(1 << 3); self.w.bits |= ((value as u32) & 1) << 3; self.w } } #[doc = r"Value of the field"] pub struct EEPROM_EEDONE_NOPERMR { bits: bool, } impl EEPROM_EEDONE_NOPERMR { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = r"Proxy"] pub struct _EEPROM_EEDONE_NOPERMW<'a> { w: &'a mut W, } impl<'a> _EEPROM_EEDONE_NOPERMW<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits &= !(1 << 4); self.w.bits |= ((value as u32) & 1) << 4; self.w } } #[doc = r"Value of the field"] pub struct EEPROM_EEDONE_WRBUSYR { bits: bool, } impl EEPROM_EEDONE_WRBUSYR { #[doc = r"Value of the field as raw bits"] #[inline(always)] pub fn bit(&self) -> bool { self.bits } #[doc = r"Returns `true` if the bit is clear (0)"] #[inline(always)] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r"Returns `true` if the bit is set (1)"] #[inline(always)] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = r"Proxy"] pub struct _EEPROM_EEDONE_WRBUSYW<'a> { w: &'a mut W, } impl<'a> _EEPROM_EEDONE_WRBUSYW<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits &= !(1 << 5); self.w.bits |= ((value as u32) & 1) << 5; self.w } } impl R { #[doc = r"Value of the register as raw bits"] #[inline(always)] pub fn bits(&self) -> u32 { self.bits } #[doc = "Bit 0 - EEPROM Working"] #[inline(always)] pub fn eeprom_eedone_working(&self) -> EEPROM_EEDONE_WORKINGR { let bits = ((self.bits >> 0) & 1) != 0; EEPROM_EEDONE_WORKINGR { bits } } #[doc = "Bit 2 - Working on an Erase"] #[inline(always)] pub fn eeprom_eedone_wkerase(&self) -> EEPROM_EEDONE_WKERASER { let bits = ((self.bits >> 2) & 1) != 0; EEPROM_EEDONE_WKERASER { bits } } #[doc = "Bit 3 - Working on a Copy"] #[inline(always)] pub fn eeprom_eedone_wkcopy(&self) -> EEPROM_EEDONE_WKCOPYR { let bits = ((self.bits >> 3) & 1) != 0; EEPROM_EEDONE_WKCOPYR { bits } } #[doc = "Bit 4 - Write Without Permission"] #[inline(always)] pub fn eeprom_eedone_noperm(&self) -> EEPROM_EEDONE_NOPERMR { let bits = ((self.bits >> 4) & 1) != 0; EEPROM_EEDONE_NOPERMR { bits } } #[doc = "Bit 5 - Write Busy"] #[inline(always)] pub fn eeprom_eedone_wrbusy(&self) -> EEPROM_EEDONE_WRBUSYR { let bits = ((self.bits >> 5) & 1) != 0; EEPROM_EEDONE_WRBUSYR { bits } } } impl W { #[doc = r"Writes raw bits to the register"] #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.bits = bits; self } #[doc = "Bit 0 - EEPROM Working"] #[inline(always)] pub fn eeprom_eedone_working(&mut self) -> _EEPROM_EEDONE_WORKINGW { _EEPROM_EEDONE_WORKINGW { w: self } } #[doc = "Bit 2 - Working on an Erase"] #[inline(always)] pub fn eeprom_eedone_wkerase(&mut self) -> _EEPROM_EEDONE_WKERASEW { _EEPROM_EEDONE_WKERASEW { w: self } } #[doc = "Bit 3 - Working on a Copy"] #[inline(always)] pub fn eeprom_eedone_wkcopy(&mut self) -> _EEPROM_EEDONE_WKCOPYW { _EEPROM_EEDONE_WKCOPYW { w: self } } #[doc = "Bit 4 - Write Without Permission"] #[inline(always)] pub fn eeprom_eedone_noperm(&mut self) -> _EEPROM_EEDONE_NOPERMW { _EEPROM_EEDONE_NOPERMW { w: self } } #[doc = "Bit 5 - Write Busy"] #[inline(always)] pub fn eeprom_eedone_wrbusy(&mut self) -> _EEPROM_EEDONE_WRBUSYW { _EEPROM_EEDONE_WRBUSYW { w: self } } }
use morgan_vote_api::vote_state::MAX_LOCKOUT_HISTORY; pub const MINIMUM_SLOT_LENGTH: usize = MAX_LOCKOUT_HISTORY + 1; #[derive(Default, Debug, PartialEq, Eq, Clone, Copy)] pub struct EpochSchedule { /// The maximum number of slots in each epoch. pub slots_per_epoch: u64, /// A number of slots before slot_index 0. Used to calculate finalized staked nodes. pub stakers_slot_offset: u64, /// basically: log2(slots_per_epoch) - log2(MINIMUM_SLOT_LEN) pub first_normal_epoch: u64, /// basically: 2.pow(first_normal_epoch) - MINIMUM_SLOT_LEN pub first_normal_slot: u64, } impl EpochSchedule { pub fn new(slots_per_epoch: u64, stakers_slot_offset: u64, warmup: bool) -> Self { assert!(slots_per_epoch >= MINIMUM_SLOT_LENGTH as u64); let (first_normal_epoch, first_normal_slot) = if warmup { let next_power_of_two = slots_per_epoch.next_power_of_two(); let log2_slots_per_epoch = next_power_of_two .trailing_zeros() .saturating_sub(MINIMUM_SLOT_LENGTH.trailing_zeros()); ( u64::from(log2_slots_per_epoch), next_power_of_two.saturating_sub(MINIMUM_SLOT_LENGTH as u64), ) } else { (0, 0) }; EpochSchedule { slots_per_epoch, stakers_slot_offset, first_normal_epoch, first_normal_slot, } } /// get the length of the given epoch (in slots) pub fn get_slots_in_epoch(&self, epoch: u64) -> u64 { if epoch < self.first_normal_epoch { 2u64.pow(epoch as u32 + MINIMUM_SLOT_LENGTH.trailing_zeros() as u32) } else { self.slots_per_epoch } } /// get the epoch for which the given slot should save off /// information about stakers pub fn get_stakers_epoch(&self, slot: u64) -> u64 { if slot < self.first_normal_slot { // until we get to normal slots, behave as if stakers_slot_offset == slots_per_epoch self.get_epoch_and_slot_index(slot).0 + 1 } else { self.first_normal_epoch + (slot - self.first_normal_slot + self.stakers_slot_offset) / self.slots_per_epoch } } /// get epoch and offset into the epoch for the given slot pub fn get_epoch_and_slot_index(&self, slot: u64) -> (u64, u64) { if slot < self.first_normal_slot { let epoch = (slot + MINIMUM_SLOT_LENGTH as u64 + 1) .next_power_of_two() .trailing_zeros() - MINIMUM_SLOT_LENGTH.trailing_zeros() - 1; let epoch_len = 2u64.pow(epoch + MINIMUM_SLOT_LENGTH.trailing_zeros()); ( u64::from(epoch), slot - (epoch_len - MINIMUM_SLOT_LENGTH as u64), ) } else { ( self.first_normal_epoch + ((slot - self.first_normal_slot) / self.slots_per_epoch), (slot - self.first_normal_slot) % self.slots_per_epoch, ) } } pub fn get_first_slot_in_epoch(&self, epoch: u64) -> u64 { if epoch <= self.first_normal_epoch { (2u64.pow(epoch as u32) - 1) * MINIMUM_SLOT_LENGTH as u64 } else { (epoch - self.first_normal_epoch) * self.slots_per_epoch + self.first_normal_slot } } pub fn get_last_slot_in_epoch(&self, epoch: u64) -> u64 { self.get_first_slot_in_epoch(epoch) + self.get_slots_in_epoch(epoch) - 1 } }
use crate::db::model::photo_model::PhotoModel; use dotenv::dotenv; use std::env; use std::error::Error; pub fn craw_photo_splider(count: usize) -> Result<Vec<PhotoModel>, Box<dyn Error>> { dotenv().ok(); let url = env::var("IMAGE_URL")?; println!("will request for {:?}", url.as_str()); #[derive(Deserialize)] struct SpliderPhoto { img: String, } let mut photo_list = vec![]; for _ in 0..count { let mut res = reqwest::get(url.as_str())?; let raw = res.text()?; let photo: SpliderPhoto = serde_json::from_str(raw.as_str())?; photo_list.push(PhotoModel { photo_id: "?".to_owned(), photo_link: photo.img.trim_start_matches("//").to_owned(), }); } Ok(photo_list) }
use geo::Point; use std::cmp; use codearea::CodeArea; use consts::{ CODE_ALPHABET, ENCODING_BASE, GRID_CODE_LENGTH, GRID_COLUMNS, GRID_ROWS, LATITUDE_MAX, LAT_INTEGER_MULTIPLIER, LNG_INTEGER_MULTIPLIER, LONGITUDE_MAX, MAX_CODE_LENGTH, MIN_TRIMMABLE_CODE_LEN, PADDING_CHAR, PADDING_CHAR_STR, PAIR_CODE_LENGTH, PAIR_RESOLUTIONS, SEPARATOR, SEPARATOR_POSITION, }; use private::{ clip_latitude, code_value, compute_latitude_precision, normalize_longitude, prefix_by_reference, }; /// Determines if a code is a valid Open Location Code. pub fn is_valid(code: &str) -> bool { let mut code: String = code.to_string(); if code.len() < 3 { // A code must have at-least a separator character + 1 lat/lng pair return false; } // Validate separator character if code.find(SEPARATOR).is_none() { // The code MUST contain a separator character return false; } if code.find(SEPARATOR) != code.rfind(SEPARATOR) { // .. And only one separator character return false; } let spos = code.find(SEPARATOR).unwrap(); if spos % 2 == 1 || spos > SEPARATOR_POSITION { // The separator must be in a valid location return false; } if code.len() - spos - 1 == 1 { // There must be > 1 character after the separator return false; } // Validate padding let padstart = code.find(PADDING_CHAR); if padstart.is_some() { if spos < SEPARATOR_POSITION { // Short codes cannot have padding return false; } let ppos = padstart.unwrap(); if ppos == 0 || ppos % 2 == 1 { // Padding must be "within" the string, starting at an even position return false; } if code.len() > spos + 1 { // If there is padding, the code must end with the separator char return false; } let eppos = code.rfind(PADDING_CHAR).unwrap(); if eppos - ppos % 2 == 1 { // Must have even number of padding chars return false; } // Extract the padding from the code (mutates code) let padding: String = code.drain(ppos..eppos + 1).collect(); if padding.chars().any(|c| c != PADDING_CHAR) { // Padding must be one, contiguous block of padding chars return false; } } // Validate all characters are permissible code.chars() .map(|c| c.to_ascii_uppercase()) .all(|c| c == SEPARATOR || CODE_ALPHABET.contains(&c)) } /// Determines if a code is a valid short code. /// /// A short Open Location Code is a sequence created by removing four or more /// digits from an Open Location Code. It must include a separator character. pub fn is_short(code: &str) -> bool { is_valid(code) && code.find(SEPARATOR).unwrap() < SEPARATOR_POSITION } /// Determines if a code is a valid full Open Location Code. /// /// Not all possible combinations of Open Location Code characters decode to /// valid latitude and longitude values. This checks that a code is valid /// and also that the latitude and longitude values are legal. If the prefix /// character is present, it must be the first character. If the separator /// character is present, it must be after four characters. pub fn is_full(code: &str) -> bool { is_valid(code) && !is_short(code) } /// Encode a location into an Open Location Code. /// /// Produces a code of the specified length, or the default length if no /// length is provided. /// The length determines the accuracy of the code. The default length is /// 10 characters, returning a code of approximately 13.5x13.5 meters. Longer /// codes represent smaller areas, but lengths > 14 are sub-centimetre and so /// 11 or 12 are probably the limit of useful codes. pub fn encode(pt: Point<f64>, code_length: usize) -> String { let mut lat = clip_latitude(pt.lat()); let lng = normalize_longitude(pt.lng()); let trimmed_code_length = cmp::min(code_length, MAX_CODE_LENGTH); // Latitude 90 needs to be adjusted to be just less, so the returned code // can also be decoded. if lat > LATITUDE_MAX || (LATITUDE_MAX - lat) < 1e-10f64 { lat -= compute_latitude_precision(trimmed_code_length); } // Convert to integers. let mut lat_val = (((lat + LATITUDE_MAX) * LAT_INTEGER_MULTIPLIER as f64 * 1e6).round() / 1e6f64) as i64; let mut lng_val = (((lng + LONGITUDE_MAX) * LNG_INTEGER_MULTIPLIER as f64 * 1e6).round() / 1e6f64) as i64; // Compute the code digits. This largely ignores the requested length - it // generates either a 10 digit code, or a 15 digit code, and then truncates // it to the requested length. // Build up the code digits in reverse order. let mut rev_code = String::with_capacity(trimmed_code_length + 1); // First do the grid digits. if code_length > PAIR_CODE_LENGTH { for _i in 0..GRID_CODE_LENGTH { let lat_digit = lat_val % GRID_ROWS as i64; let lng_digit = lng_val % GRID_COLUMNS as i64; let ndx = (lat_digit * GRID_COLUMNS as i64 + lng_digit) as usize; rev_code.push(CODE_ALPHABET[ndx]); lat_val /= GRID_ROWS as i64; lng_val /= GRID_COLUMNS as i64; } } else { // Adjust latitude and longitude values to skip the grid digits. lat_val /= GRID_ROWS.pow(GRID_CODE_LENGTH as u32) as i64; lng_val /= GRID_COLUMNS.pow(GRID_CODE_LENGTH as u32) as i64; } // Compute the pair section of the code. for i in 0..PAIR_CODE_LENGTH / 2 { rev_code.push(CODE_ALPHABET[(lng_val % ENCODING_BASE as i64) as usize]); lng_val /= ENCODING_BASE as i64; rev_code.push(CODE_ALPHABET[(lat_val % ENCODING_BASE as i64) as usize]); lat_val /= ENCODING_BASE as i64; // If we are at the separator position, add the separator. if i == 0 { rev_code.push(SEPARATOR); } } let mut code: String; // If we need to pad the code, replace some of the digits. if code_length < SEPARATOR_POSITION { code = rev_code.chars().rev().take(code_length).collect(); code.push_str( PADDING_CHAR_STR .repeat(SEPARATOR_POSITION - code_length) .as_str(), ); code.push(SEPARATOR); } else { code = rev_code.chars().rev().take(code_length + 1).collect(); } return code; } /// Decodes an Open Location Code into the location coordinates. /// /// Returns a CodeArea object that includes the coordinates of the bounding /// box - the lower left, center and upper right. pub fn decode(code: &str) -> Result<CodeArea, String> { if !is_full(code) { return Err(format!("Code must be a valid full code: {}", code)); } let mut code = code .to_string() .replace(SEPARATOR, "") .replace(PADDING_CHAR_STR, "") .to_uppercase(); if code.len() > MAX_CODE_LENGTH { code = code.chars().take(MAX_CODE_LENGTH).collect(); } // Work out the values as integers and convert to floating point at the end. let mut lat: i64 = -90 * LAT_INTEGER_MULTIPLIER; let mut lng: i64 = -180 * LNG_INTEGER_MULTIPLIER; let mut lat_place_val: i64 = LAT_INTEGER_MULTIPLIER * ENCODING_BASE.pow(2) as i64; let mut lng_place_val: i64 = LNG_INTEGER_MULTIPLIER * ENCODING_BASE.pow(2) as i64; for (idx, chr) in code.chars().enumerate() { if idx < PAIR_CODE_LENGTH { if idx % 2 == 0 { lat_place_val /= ENCODING_BASE as i64; lat += lat_place_val * code_value(chr) as i64; } else { lng_place_val /= ENCODING_BASE as i64; lng += lng_place_val * code_value(chr) as i64; } } else { lat_place_val /= GRID_ROWS as i64; lng_place_val /= GRID_COLUMNS as i64; lat += lat_place_val * (code_value(chr) / GRID_COLUMNS) as i64; lng += lng_place_val * (code_value(chr) % GRID_COLUMNS) as i64; } } // Convert to floating point values. let lat_lo: f64 = lat as f64 / LAT_INTEGER_MULTIPLIER as f64; let lng_lo: f64 = lng as f64 / LNG_INTEGER_MULTIPLIER as f64; let lat_hi: f64 = (lat + lat_place_val) as f64 / (ENCODING_BASE.pow(3) * GRID_ROWS.pow(5)) as f64; let lng_hi: f64 = (lng + lng_place_val) as f64 / (ENCODING_BASE.pow(3) * GRID_COLUMNS.pow(5)) as f64; Ok(CodeArea::new(lat_lo, lng_lo, lat_hi, lng_hi, code.len())) } /// Remove characters from the start of an OLC code. /// /// This uses a reference location to determine how many initial characters /// can be removed from the OLC code. The number of characters that can be /// removed depends on the distance between the code center and the reference /// location. /// The minimum number of characters that will be removed is four. If more /// than four characters can be removed, the additional characters will be /// replaced with the padding character. At most eight characters will be /// removed. /// The reference location must be within 50% of the maximum range. This /// ensures that the shortened code will be able to be recovered using /// slightly different locations. /// /// It returns either the original code, if the reference location was not /// close enough, or the . pub fn shorten(code: &str, ref_pt: Point<f64>) -> Result<String, String> { if !is_full(code) { return Ok(code.to_string()); } if code.find(PADDING_CHAR).is_some() { return Err("Cannot shorten padded codes".to_owned()); } let codearea: CodeArea = decode(code).unwrap(); if codearea.code_length < MIN_TRIMMABLE_CODE_LEN { return Err(format!( "Code length must be at least {}", MIN_TRIMMABLE_CODE_LEN )); } // How close are the latitude and longitude to the code center. let range = (codearea.center.lat() - clip_latitude(ref_pt.lat())) .abs() .max((codearea.center.lng() - normalize_longitude(ref_pt.lng())).abs()); for i in 0..PAIR_RESOLUTIONS.len() - 2 { // Check if we're close enough to shorten. The range must be less than 1/2 // the resolution to shorten at all, and we want to allow some safety, so // use 0.3 instead of 0.5 as a multiplier. let idx = PAIR_RESOLUTIONS.len() - 2 - i; if range < (PAIR_RESOLUTIONS[idx] * 0.3f64) { let mut code = code.to_string(); code.drain(..((idx + 1) * 2)); return Ok(code); } } Ok(code.to_string()) } /// Recover the nearest matching code to a specified location. /// /// Given a short Open Location Code of between four and seven characters, /// this recovers the nearest matching full code to the specified location. /// The number of characters that will be prepended to the short code, depends /// on the length of the short code and whether it starts with the separator. /// If it starts with the separator, four characters will be prepended. If it /// does not, the characters that will be prepended to the short code, where S /// is the supplied short code and R are the computed characters, are as /// follows: /// /// * SSSS -> RRRR.RRSSSS /// * SSSSS -> RRRR.RRSSSSS /// * SSSSSS -> RRRR.SSSSSS /// * SSSSSSS -> RRRR.SSSSSSS /// /// Note that short codes with an odd number of characters will have their /// last character decoded using the grid refinement algorithm. /// /// It returns the nearest full Open Location Code to the reference location /// that matches the [shortCode]. Note that the returned code may not have the /// same computed characters as the reference location (provided by /// [referenceLatitude] and [referenceLongitude]). This is because it returns /// the nearest match, not necessarily the match within the same cell. If the /// passed code was not a valid short code, but was a valid full code, it is /// returned unchanged. pub fn recover_nearest(code: &str, ref_pt: Point<f64>) -> Result<String, String> { if !is_short(code) { if is_full(code) { return Ok(code.to_string().to_uppercase()); } else { return Err(format!("Passed short code is not valid: {}", code)); } } let prefix_len = SEPARATOR_POSITION - code.find(SEPARATOR).unwrap(); let mut code = prefix_by_reference(ref_pt, prefix_len) + code; let code_area = decode(code.as_str()).unwrap(); let resolution = compute_latitude_precision(prefix_len); let half_res = resolution / 2f64; let mut latitude = code_area.center.lat(); let mut longitude = code_area.center.lng(); let ref_lat = clip_latitude(ref_pt.lat()); let ref_lng = normalize_longitude(ref_pt.lng()); if ref_lat + half_res < latitude && latitude - resolution >= -LATITUDE_MAX { latitude -= resolution; } else if ref_lat - half_res > latitude && latitude + resolution <= LATITUDE_MAX { latitude += resolution; } if ref_lng + half_res < longitude { longitude -= resolution; } else if ref_lng - half_res > longitude { longitude += resolution; } Ok(encode( Point::new(longitude, latitude), code_area.code_length, )) }
#![allow(dead_code)] //! # Native bindings for Apache Mesos. //! //! This module links dynamically against `libmesos` and provides a native //! `Scheduler` implementation, which delegates to a user-supplied Rust //! `Scheduler` for all callbacks. //! //! Additionally, this module provides a native `SchedulerDriver` that manages //! the backing native state and hides the required function delegate //! wiring. mod mesos_c; mod tests; use libc::{c_char, c_int, c_void, size_t}; use proto::mesos as pb; use scheduler::{Scheduler, SchedulerDriver}; use std::boxed::Box; use std::ffi::{CStr, CString}; use std::mem; use std::option::Option; use std::slice; use std::str; #[derive(Clone)] pub struct MesosSchedulerDriver<'a> { scheduler: &'a Scheduler, framework_info: &'a pb::FrameworkInfo, master: String, native_ptr_pair: Option<mesos_c::SchedulerPtrPair>, } impl<'a> MesosSchedulerDriver<'a> { pub fn new<'d>( scheduler: &'d Scheduler, framework_info: &'d pb::FrameworkInfo, master: String ) -> Box<MesosSchedulerDriver<'d>> { Box::new( MesosSchedulerDriver { scheduler: scheduler, framework_info: framework_info, master: master, native_ptr_pair: None, } ) } // Returns a C struct containing nullable C function pointers, where // each such pointer refers to a wrapper function that unmarshals native // data structures and delegates to this driver's (Rust) scheduler // implementation. // // A pointer to the result struct is eventually passed to the native // function `scheduler_init`. fn create_callbacks(&self) -> mesos_c::SchedulerCallBacks { extern "C" fn wrapped_registered_callback( native_scheduler_driver: mesos_c::SchedulerDriverPtr, native_framework_id: *mut mesos_c::ProtobufObj, native_master_info: *mut mesos_c::ProtobufObj ) -> () { let driver: &MesosSchedulerDriver = unsafe { mem::transmute(native_scheduler_driver) }; let framework_id = &mut pb::FrameworkID::new(); mesos_c::ProtobufObj::merge(native_framework_id, framework_id); let master_info = &mut pb::MasterInfo::new(); mesos_c::ProtobufObj::merge(native_master_info, master_info); driver.scheduler.registered(driver, &framework_id, master_info); } extern "C" fn wrapped_reregistered_callback( native_scheduler_driver: mesos_c::SchedulerDriverPtr, native_master_info: *mut mesos_c::ProtobufObj ) -> () { let driver: &MesosSchedulerDriver = unsafe { mem::transmute(native_scheduler_driver) }; let master_info = &mut pb::MasterInfo::new(); mesos_c::ProtobufObj::merge(native_master_info, master_info); driver.scheduler.reregistered(driver, master_info); } extern "C" fn wrapped_resource_offers_callback( native_scheduler_driver: mesos_c::SchedulerDriverPtr, native_offers: *mut mesos_c::ProtobufObj, native_num_offers: size_t ) -> () { let driver: &MesosSchedulerDriver = unsafe { mem::transmute(native_scheduler_driver) }; let num_offers = native_num_offers as usize; let pbs = unsafe { slice::from_raw_parts( native_offers as *const mesos_c::ProtobufObj, num_offers as usize).to_vec() }; let mut offers = vec![]; for mut pb in pbs { let mut offer = pb::Offer::new(); mesos_c::ProtobufObj::merge(&mut pb, &mut offer); offers.push(offer); } driver.scheduler.resource_offers(driver, offers.clone()); } extern "C" fn wrapped_status_update_callback( native_scheduler_driver: mesos_c::SchedulerDriverPtr, native_task_status: *mut mesos_c::ProtobufObj ) -> () { let driver: &MesosSchedulerDriver = unsafe { mem::transmute(native_scheduler_driver) }; let task_status = &mut pb::TaskStatus::new(); mesos_c::ProtobufObj::merge(native_task_status, task_status); driver.scheduler.status_update(driver, task_status); } extern "C" fn wrapped_disconnected_callback( native_scheduler_driver: mesos_c::SchedulerDriverPtr, ) -> () { let driver: &MesosSchedulerDriver = unsafe { mem::transmute(native_scheduler_driver) }; driver.scheduler.disconnected(driver); } extern "C" fn wrapped_offer_rescinded_callback( native_scheduler_driver: mesos_c::SchedulerDriverPtr, native_offer_id: *mut mesos_c::ProtobufObj ) -> () { let driver: &MesosSchedulerDriver = unsafe { mem::transmute(native_scheduler_driver) }; let offer_id = &mut pb::OfferID::new(); mesos_c::ProtobufObj::merge(native_offer_id, offer_id); driver.scheduler.offer_rescinded(driver, offer_id); } extern "C" fn wrapped_framework_message_callback( native_scheduler_driver: mesos_c::SchedulerDriverPtr, native_executor_id: *mut mesos_c::ProtobufObj, native_slave_id: *mut mesos_c::ProtobufObj, native_data: *const c_char ) -> () { let driver: &MesosSchedulerDriver = unsafe { mem::transmute(native_scheduler_driver) }; let executor_id = &mut pb::ExecutorID::new(); mesos_c::ProtobufObj::merge(native_executor_id, executor_id); let slave_id = &mut pb::SlaveID::new(); mesos_c::ProtobufObj::merge(native_slave_id, slave_id); let data_slice = unsafe { CStr::from_ptr(native_data).to_bytes() }; let data: String = str::from_utf8(data_slice) .unwrap() .to_string(); driver.scheduler.framework_message(driver, executor_id, slave_id, &data); } extern "C" fn wrapped_slave_lost_callback( native_scheduler_driver: mesos_c::SchedulerDriverPtr, native_slave_id: *mut mesos_c::ProtobufObj ) -> () { let driver: &MesosSchedulerDriver = unsafe { mem::transmute(native_scheduler_driver) }; let slave_id = &mut pb::SlaveID::new(); mesos_c::ProtobufObj::merge(native_slave_id, slave_id); driver.scheduler.slave_lost(driver, slave_id); } extern "C" fn wrapped_executor_lost_callback( native_scheduler_driver: mesos_c::SchedulerDriverPtr, native_executor_id: *mut mesos_c::ProtobufObj, native_slave_id: *mut mesos_c::ProtobufObj, native_status: ::libc::c_int ) -> () { let driver: &MesosSchedulerDriver = unsafe { mem::transmute(native_scheduler_driver) }; let executor_id = &mut pb::ExecutorID::new(); mesos_c::ProtobufObj::merge(native_executor_id, executor_id); let slave_id = &mut pb::SlaveID::new(); mesos_c::ProtobufObj::merge(native_slave_id, slave_id); let status = native_status as i32; driver.scheduler.executor_lost( driver, executor_id, slave_id, status); } extern "C" fn wrapped_error_callback( native_scheduler_driver: mesos_c::SchedulerDriverPtr, native_message: *const c_char ) -> () { let driver: &MesosSchedulerDriver = unsafe { mem::transmute(native_scheduler_driver) }; let message_slice = unsafe { CStr::from_ptr(native_message).to_bytes() }; let message: String = str::from_utf8(message_slice) .unwrap() .to_string(); driver.scheduler.error(driver, &message); } mesos_c::SchedulerCallBacks { registeredCallBack: Some(wrapped_registered_callback), reregisteredCallBack: Some(wrapped_reregistered_callback), resourceOffersCallBack: Some(wrapped_resource_offers_callback), statusUpdateCallBack: Some(wrapped_status_update_callback), disconnectedCallBack: Some(wrapped_disconnected_callback), offerRescindedCallBack: Some(wrapped_offer_rescinded_callback), frameworkMessageCallBack: Some(wrapped_framework_message_callback), slaveLostCallBack: Some(wrapped_slave_lost_callback), executorLostCallBack: Some(wrapped_executor_lost_callback), errorCallBack: Some(wrapped_error_callback), } } } impl<'a> SchedulerDriver for MesosSchedulerDriver<'a> { fn run(&mut self) -> i32 { let callbacks: *mut mesos_c::SchedulerCallBacks = &mut self.create_callbacks(); let native_payload: *mut c_void = unsafe { // Super-unsafe! This violates Rust's reference aliasing and // memory safety guarantees. The MesosSchedulerDriver data // structure is opaque to the underlying native code (notice how // it's not annotated with #[repr(C)]; but anyway we promise not // to modify this structure from foreign code). mem::transmute(&mut *self) }; // The lifetime of `pb_data` must exceed that of // `native_framework_info`. let pb_data = &mut vec![]; let native_framework_info = &mut mesos_c::ProtobufObj::from_message( self.framework_info, pb_data); let native_master = CString::new(self.master.clone()).unwrap(); self.native_ptr_pair = Some( unsafe { mesos_c::scheduler_init( callbacks, native_payload, native_framework_info as *mut mesos_c::ProtobufObj, native_master.as_ptr() as *const i8) } ); let native_ptr_pair = self.native_ptr_pair.unwrap(); println!("Starting scheduler driver"); let scheduler_status = unsafe{ mesos_c::scheduler_start(native_ptr_pair.driver) }; println!("scheduler_status: [{}]", scheduler_status); println!("Joining scheduler driver"); let scheduler_status = unsafe{ mesos_c::scheduler_join(native_ptr_pair.driver) }; println!("scheduler_status: [{}]", scheduler_status); scheduler_status } fn decline_offer( &self, offer_id: &pb::OfferID, filters: &pb::Filters) -> i32 { assert!(self.native_ptr_pair.is_some()); let native_driver = self.native_ptr_pair.unwrap().driver; let offer_id_data = &mut vec![]; let native_offer_id = &mut mesos_c::ProtobufObj::from_message( offer_id, offer_id_data); let filters_data = &mut vec![]; let native_filters = &mut mesos_c::ProtobufObj::from_message( filters, filters_data); let scheduler_status = unsafe { mesos_c::scheduler_declineOffer( native_driver, native_offer_id as *mut mesos_c::ProtobufObj, native_filters as *mut mesos_c::ProtobufObj) }; scheduler_status } fn request_resources( &self, requests: &Vec<&pb::Request>) -> i32 { assert!(self.native_ptr_pair.is_some()); let native_driver = self.native_ptr_pair.unwrap().driver; let native_request_data = &mut vec![]; for request in requests { let request_data = &mut vec![]; mesos_c::ProtobufObj::from_message(*request, request_data); // write length of vec as a u64 to native_task_data let length_pointer: *const u8 = unsafe { mem::transmute(&(request_data.len() as u64)) }; let length_data: Vec<u8> = unsafe { slice::from_raw_parts( length_pointer, 8 as usize).to_vec() // 8 bytes in a u64 }; native_request_data.extend(length_data); // write vec content to native_task_data native_request_data.extend(request_data.iter().cloned()); } let native_requests = &mut mesos_c::ProtobufObj::from_vec(native_request_data); let scheduler_status = unsafe { mesos_c::scheduler_requestResources( native_driver, native_requests as *mut mesos_c::ProtobufObj) }; scheduler_status } fn launch_tasks( &self, offer_id: &pb::OfferID, tasks: &Vec<&pb::TaskInfo>, filters: &pb::Filters) -> i32 { assert!(self.native_ptr_pair.is_some()); let native_driver = self.native_ptr_pair.unwrap().driver; let offer_id_data = &mut vec![]; let native_offer_id = &mut mesos_c::ProtobufObj::from_message( offer_id, offer_id_data); let native_task_data = &mut vec![]; for task in tasks { let task_data = &mut vec![]; mesos_c::ProtobufObj::from_message(*task, task_data); // write length of vec as a u64 to native_task_data let length_pointer: *const u8 = unsafe { mem::transmute(&(task_data.len() as u64)) }; let length_data: Vec<u8> = unsafe { slice::from_raw_parts( length_pointer, 8 as usize).to_vec() // 8 bytes in a u64 }; native_task_data.extend(length_data); // write vec content to native_task_data native_task_data.extend(task_data.iter().cloned()); } let native_tasks = &mut mesos_c::ProtobufObj::from_vec(native_task_data); let filters_data = &mut vec![]; let native_filters = &mut mesos_c::ProtobufObj::from_message( filters, filters_data); let scheduler_status = unsafe { mesos_c::scheduler_launchTasks( native_driver, native_offer_id as *mut mesos_c::ProtobufObj, native_tasks as *mut mesos_c::ProtobufObj, native_filters as *mut mesos_c::ProtobufObj) }; scheduler_status } fn revive_offers(&self) -> i32 { assert!(self.native_ptr_pair.is_some()); let native_driver = self.native_ptr_pair.unwrap().driver; let scheduler_status = unsafe { mesos_c::scheduler_reviveOffers(native_driver) }; scheduler_status } fn kill_task( &self, task_id: &pb::TaskID) -> i32 { assert!(self.native_ptr_pair.is_some()); let native_driver = self.native_ptr_pair.unwrap().driver; let task_id_data = &mut vec![]; let native_task_id = &mut mesos_c::ProtobufObj::from_message( task_id, task_id_data); let scheduler_status = unsafe { mesos_c::scheduler_killTask( native_driver, native_task_id as *mut mesos_c::ProtobufObj) }; scheduler_status } fn send_framework_message( &self, executor_id: &pb::ExecutorID, slave_id: &pb::SlaveID, data: &Vec<u8>) -> i32 { assert!(self.native_ptr_pair.is_some()); let native_driver = self.native_ptr_pair.unwrap().driver; let executor_id_data = &mut vec![]; let native_executor_id = &mut mesos_c::ProtobufObj::from_message( executor_id, executor_id_data); let slave_id_data = &mut vec![]; let native_slave_id = &mut mesos_c::ProtobufObj::from_message( slave_id, slave_id_data); let native_data = data.as_ptr() as *mut c_char; let scheduler_status = unsafe { mesos_c::scheduler_sendFrameworkMessage( native_driver, native_executor_id as *mut mesos_c::ProtobufObj, native_slave_id as *mut mesos_c::ProtobufObj, native_data) }; scheduler_status } fn stop( &self, failover: bool) -> i32 { assert!(self.native_ptr_pair.is_some()); let native_driver = self.native_ptr_pair.unwrap().driver; let scheduler_status = unsafe { mesos_c::scheduler_stop( native_driver, failover as c_int) }; scheduler_status } } // Clean up backing native data structures when a MesosSchedulerDriver // instance leaves scope. impl<'a> Drop for MesosSchedulerDriver<'a> { fn drop(&mut self) { if self.native_ptr_pair.is_some() { let native_driver = self.native_ptr_pair.unwrap().driver; let native_scheduler = self.native_ptr_pair.unwrap().scheduler; unsafe { mesos_c::scheduler_destroy(native_driver, native_scheduler); } } } }
use serde::de::{self, Visitor}; use serde::{Deserialize, Deserializer}; use std::fmt::{self, Formatter}; use std::path::PathBuf; #[derive(Deserialize)] #[serde(rename_all = "kebab-case")] pub struct Config { pub server: Server, pub certificate_path: PathBuf, } pub struct Server { pub hostname: String, pub port: u16, } impl<'de> Deserialize<'de> for Server { fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de>, { deserializer.deserialize_str(ServerVisitor) } } struct ServerVisitor; impl<'de> Visitor<'de> for ServerVisitor { type Value = Server; fn expecting(&self, f: &mut Formatter) -> fmt::Result { write!(f, "a server description (hostname:port)") } fn visit_str<E>(self, data: &str) -> Result<Self::Value, E> where E: de::Error, { let err = || E::custom("Invalid server description"); let mut split = data.split(':'); let hostname = split.next().ok_or_else(err)?; let port = split .next() .and_then(|data| data.parse().ok()) .ok_or_else(err)?; if split.next().is_some() { return Err(E::custom("Extraneous data")); } Ok(Server { hostname: hostname.to_owned(), port, }) } }
use super::system_prelude::*; const ANIM_NAME_COLLISION_STEADY: &str = "in_collision"; const ANIM_NAME_COLLISION_ENTER: &str = "on_collision_enter"; const ANIM_NAME_COLLISION_LEAVE: &str = "on_collision_leave"; #[derive(Default)] pub struct DynamicAnimationSystem; impl<'a> System<'a> for DynamicAnimationSystem { type SystemData = ( Entities<'a>, ReadStorage<'a, DynamicAnimation>, ReadStorage<'a, DynamicAnimationTrigger>, ReadStorage<'a, Collision>, WriteStorage<'a, AnimationsContainer>, ); fn run( &mut self, ( entities, dynamic_animations, dynamic_animation_triggers, collisions, mut animations_containers, ): Self::SystemData, ) { for (target_animations, target_collision, _) in (&mut animations_containers, &collisions, &dynamic_animations) .join() { let mut set_animation = false; for (trigger_entity, _) in (&entities, &dynamic_animation_triggers).join() { let trigger_id = trigger_entity.id(); if let Some(collision_data) = target_collision.collision_with(trigger_id) { match collision_data.state { collision::State::Enter => { if target_animations .has_animation(ANIM_NAME_COLLISION_ENTER) { target_animations .play(ANIM_NAME_COLLISION_ENTER); } } collision::State::Leave => { if target_animations .has_animation(ANIM_NAME_COLLISION_LEAVE) { target_animations .play(ANIM_NAME_COLLISION_LEAVE); } target_animations.set_if_has("default"); } collision::State::Steady | _ => { target_animations .set_if_has(ANIM_NAME_COLLISION_STEADY); } } // Only run for a single trigger. // Ignore any other triggers that may also be in collision. set_animation = true; break; } } if !set_animation { target_animations.set_if_has("default"); } } } }
/// Access a file randomly using a memory map /// /// Creates a memory map of a file using `memmap` and simulates some non-sequential /// reads from the file. Using a memory map means you just index into a slice rather /// than dealing with `seek`ing around in a File. /// /// The `Mmap::as_slice` function is only safe if we can guarantee that the file /// behind the memory map is not being modified at the same time by another process, /// as this would be a **race condition**. use errors::*; use memmap::{Mmap, Protection}; use std::fs::File; use std::io::Write; pub fn run() -> Result<()> { write!(File::create("/tmp/content.txt")?, "My hovercraft is full of eels!")?; let map = Mmap::open_path("/tmp/content.txt", Protection::Read)?; let random_indexes = [0, 1, 2, 19, 22, 10, 11, 29]; // This is only safe if no other code is modifying the file at the same time. unsafe { let map = map.as_slice(); assert_eq!(&map[3..13], b"hovercraft"); // I'm using an iterator here to change indexes to bytes let random_bytes: Vec<u8> = random_indexes.iter() .map(|&idx| map[idx]) .collect(); assert_eq!(&random_bytes[..], b"My loaf!"); } Ok(()) }
/* */ /* The node trait */ use crate::core::{ context::{ptype::PType, Context}, utils::typedefs::Key, }; use super::slot::Slot; use std::collections::BTreeMap; pub type SlotTypes = BTreeMap<Key, PType>; pub trait Node { fn eval( &self, context: Context, input: Vec<Slot>, ) -> Vec<Slot>; fn get_input_slot_types(&self) -> &SlotTypes; fn get_output_slot_types(&self) -> &SlotTypes; }
use serde::Serialize; use std::fmt::Formatter; #[derive(Clone, Debug, Serialize)] pub struct Visibility(bool); impl Visibility { pub fn new(v: bool) -> Visibility { Visibility(v) } pub fn to_bool(&self) -> bool { self.0 } } impl std::fmt::Display for Visibility { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.0) } }
use crate::BotRawEventHandler; use serenity::model::prelude::Event; use serenity::prelude::Context; pub async fn raw_event(_handler: &BotRawEventHandler, _ctx: Context, _event: Event) { // handle raw events here }
pub struct Solution; impl Solution { pub fn rotate(nums: &mut Vec<i32>, k: i32) { let n = nums.len(); if n == 0 { return; } let k = (k as usize) % n; if k == 0 { return; } nums.reverse(); nums[..k].reverse(); nums[k..].reverse(); } } #[test] fn test0189() { fn case(nums: Vec<i32>, k: i32, want: Vec<i32>) { let mut mut_nums = nums.clone(); Solution::rotate(&mut mut_nums, k); assert_eq!(mut_nums, want); } case(vec![1, 2, 3, 4, 5, 6, 7], 3, vec![5, 6, 7, 1, 2, 3, 4]); case(vec![-1, -100, 3, 99], 2, vec![3, 99, -1, -100]); }
pub mod color; pub mod framebuffer; pub mod geometry; pub mod world; mod csi_color;
// This file was generated by gir (https://github.com/gtk-rs/gir) // from ../gir-files // DO NOT EDIT use crate::Message; use crate::Request; use glib::object::IsA; use glib::translate::*; use std::fmt; glib::wrapper! { #[doc(alias = "SoupRequestHTTP")] pub struct RequestHTTP(Object<ffi::SoupRequestHTTP, ffi::SoupRequestHTTPClass>) @extends Request; match fn { type_ => || ffi::soup_request_http_get_type(), } } pub const NONE_REQUEST_HTTP: Option<&RequestHTTP> = None; pub trait RequestHTTPExt: 'static { #[doc(alias = "soup_request_http_get_message")] #[doc(alias = "get_message")] fn message(&self) -> Option<Message>; } impl<O: IsA<RequestHTTP>> RequestHTTPExt for O { fn message(&self) -> Option<Message> { unsafe { from_glib_full(ffi::soup_request_http_get_message(self.as_ref().to_glib_none().0)) } } } impl fmt::Display for RequestHTTP { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.write_str("RequestHTTP") } }
//! libc syscalls supporting `rustix::event`. use crate::backend::c; use crate::backend::conv::ret_c_int; #[cfg(any(apple, netbsdlike, target_os = "dragonfly", target_os = "solaris"))] use crate::backend::conv::ret_owned_fd; use crate::event::PollFd; #[cfg(any(linux_kernel, bsd, solarish, target_os = "espidf"))] use crate::fd::OwnedFd; use crate::io; #[cfg(any(bsd, solarish))] use {crate::backend::conv::borrowed_fd, crate::fd::BorrowedFd, core::mem::MaybeUninit}; #[cfg(solarish)] use { crate::backend::conv::ret, crate::event::port::Event, crate::utils::as_mut_ptr, core::ptr::null_mut, }; #[cfg(any( linux_kernel, target_os = "freebsd", target_os = "illumos", target_os = "espidf" ))] use {crate::backend::conv::ret_owned_fd, crate::event::EventfdFlags}; #[cfg(bsd)] use {crate::event::kqueue::Event, crate::utils::as_ptr, core::ptr::null}; #[cfg(any( linux_kernel, target_os = "freebsd", target_os = "illumos", target_os = "espidf" ))] pub(crate) fn eventfd(initval: u32, flags: EventfdFlags) -> io::Result<OwnedFd> { #[cfg(linux_kernel)] unsafe { syscall! { fn eventfd2( initval: c::c_uint, flags: c::c_int ) via SYS_eventfd2 -> c::c_int } ret_owned_fd(eventfd2(initval, bitflags_bits!(flags))) } // `eventfd` was added in FreeBSD 13, so it isn't available on FreeBSD 12. #[cfg(target_os = "freebsd")] unsafe { weakcall! { fn eventfd( initval: c::c_uint, flags: c::c_int ) -> c::c_int } ret_owned_fd(eventfd(initval, bitflags_bits!(flags))) } #[cfg(any(target_os = "illumos", target_os = "espidf"))] unsafe { ret_owned_fd(c::eventfd(initval, bitflags_bits!(flags))) } } #[cfg(bsd)] pub(crate) fn kqueue() -> io::Result<OwnedFd> { unsafe { ret_owned_fd(c::kqueue()) } } #[cfg(bsd)] pub(crate) unsafe fn kevent( kq: BorrowedFd<'_>, changelist: &[Event], eventlist: &mut [MaybeUninit<Event>], timeout: Option<&c::timespec>, ) -> io::Result<c::c_int> { ret_c_int(c::kevent( borrowed_fd(kq), changelist.as_ptr().cast(), changelist .len() .try_into() .map_err(|_| io::Errno::OVERFLOW)?, eventlist.as_mut_ptr().cast(), eventlist .len() .try_into() .map_err(|_| io::Errno::OVERFLOW)?, timeout.map_or(null(), as_ptr), )) } #[inline] pub(crate) fn poll(fds: &mut [PollFd<'_>], timeout: c::c_int) -> io::Result<usize> { let nfds = fds .len() .try_into() .map_err(|_convert_err| io::Errno::INVAL)?; ret_c_int(unsafe { c::poll(fds.as_mut_ptr().cast(), nfds, timeout) }) .map(|nready| nready as usize) } #[cfg(solarish)] pub(crate) fn port_create() -> io::Result<OwnedFd> { unsafe { ret_owned_fd(c::port_create()) } } #[cfg(solarish)] pub(crate) unsafe fn port_associate( port: BorrowedFd<'_>, source: c::c_int, object: c::uintptr_t, events: c::c_int, user: *mut c::c_void, ) -> io::Result<()> { ret(c::port_associate( borrowed_fd(port), source, object, events, user, )) } #[cfg(solarish)] pub(crate) unsafe fn port_dissociate( port: BorrowedFd<'_>, source: c::c_int, object: c::uintptr_t, ) -> io::Result<()> { ret(c::port_dissociate(borrowed_fd(port), source, object)) } #[cfg(solarish)] pub(crate) fn port_get( port: BorrowedFd<'_>, timeout: Option<&mut c::timespec>, ) -> io::Result<Event> { let mut event = MaybeUninit::<c::port_event>::uninit(); let timeout = timeout.map_or(null_mut(), as_mut_ptr); unsafe { ret(c::port_get(borrowed_fd(port), event.as_mut_ptr(), timeout))?; } // If we're done, initialize the event and return it. Ok(Event(unsafe { event.assume_init() })) } #[cfg(solarish)] pub(crate) fn port_getn( port: BorrowedFd<'_>, timeout: Option<&mut c::timespec>, events: &mut Vec<Event>, mut nget: u32, ) -> io::Result<()> { let timeout = timeout.map_or(null_mut(), as_mut_ptr); unsafe { ret(c::port_getn( borrowed_fd(port), events.as_mut_ptr().cast(), events.len().try_into().unwrap(), &mut nget, timeout, ))?; } // Update the vector length. unsafe { events.set_len(nget.try_into().unwrap()); } Ok(()) } #[cfg(solarish)] pub(crate) fn port_send( port: BorrowedFd<'_>, events: c::c_int, userdata: *mut c::c_void, ) -> io::Result<()> { unsafe { ret(c::port_send(borrowed_fd(port), events, userdata)) } }
/// Env wraps environment variables (NAME=VALUE) #[derive(Debug, Eq, PartialEq)] pub struct Env { pub name: String, pub value: String } /// EnvList is a wrapper for a list of Env pub type EnvList = Vec<Env>; impl Env { pub fn new(name: &str, value: &str) -> Env { Env { name: name.to_string(), value: value.to_string()} } }
use crate::{ event::metric::{Metric, MetricValue}, sinks::influxdb::{ encode_namespace, encode_timestamp, healthcheck, influx_line_protocol, influxdb_settings, Field, InfluxDB1Settings, InfluxDB2Settings, ProtocolVersion, }, sinks::util::{ http::{HttpBatchService, HttpClient, HttpRetryLogic}, service2::TowerRequestConfig, BatchConfig, BatchSettings, MetricBuffer, }, topology::config::{DataType, SinkConfig, SinkContext, SinkDescription}, }; use futures::future::{ready, BoxFuture}; use futures01::Sink; use lazy_static::lazy_static; use serde::{Deserialize, Serialize}; use std::cmp::Ordering; use std::collections::HashMap; use std::task::Poll; use tower03::Service; #[derive(Clone)] struct InfluxDBSvc { config: InfluxDBConfig, protocol_version: ProtocolVersion, inner: HttpBatchService<BoxFuture<'static, crate::Result<hyper::Request<Vec<u8>>>>>, } #[derive(Deserialize, Serialize, Debug, Clone, Default)] #[serde(deny_unknown_fields)] pub struct InfluxDBConfig { pub namespace: String, pub endpoint: String, #[serde(flatten)] pub influxdb1_settings: Option<InfluxDB1Settings>, #[serde(flatten)] pub influxdb2_settings: Option<InfluxDB2Settings>, #[serde(default)] pub batch: BatchConfig, #[serde(default)] pub request: TowerRequestConfig, } lazy_static! { static ref REQUEST_DEFAULTS: TowerRequestConfig = TowerRequestConfig { retry_attempts: Some(5), ..Default::default() }; } // https://v2.docs.influxdata.com/v2.0/write-data/#influxdb-api #[derive(Debug, Clone, PartialEq, Serialize)] struct InfluxDBRequest { series: Vec<String>, } inventory::submit! { SinkDescription::new::<InfluxDBConfig>("influxdb_metrics") } #[typetag::serde(name = "influxdb_metrics")] impl SinkConfig for InfluxDBConfig { fn build(&self, cx: SinkContext) -> crate::Result<(super::RouterSink, super::Healthcheck)> { let client = HttpClient::new(cx.resolver(), None)?; let healthcheck = healthcheck( self.clone().endpoint, self.clone().influxdb1_settings, self.clone().influxdb2_settings, client.clone(), )?; let sink = InfluxDBSvc::new(self.clone(), cx, client)?; Ok((sink, healthcheck)) } fn input_type(&self) -> DataType { DataType::Metric } fn sink_type(&self) -> &'static str { "influxdb_metrics" } } impl InfluxDBSvc { pub fn new( config: InfluxDBConfig, cx: SinkContext, client: HttpClient, ) -> crate::Result<super::RouterSink> { let settings = influxdb_settings( config.influxdb1_settings.clone(), config.influxdb2_settings.clone(), )?; let endpoint = config.endpoint.clone(); let token = settings.token(); let protocol_version = settings.protocol_version(); let batch = BatchSettings::default() .events(20) .timeout(1) .parse_config(config.batch)?; let request = config.request.unwrap_with(&REQUEST_DEFAULTS); let uri = settings.write_uri(endpoint)?; let http_service = HttpBatchService::new(client, create_build_request(uri, token)); let influxdb_http_service = InfluxDBSvc { config, protocol_version, inner: http_service, }; let sink = request .batch_sink( HttpRetryLogic, influxdb_http_service, MetricBuffer::new(batch.size), batch.timeout, cx.acker(), ) .sink_map_err(|e| error!("Fatal influxdb sink error: {}", e)); Ok(Box::new(sink)) } } impl Service<Vec<Metric>> for InfluxDBSvc { type Response = http::Response<bytes05::Bytes>; type Error = crate::Error; type Future = BoxFuture<'static, Result<Self::Response, Self::Error>>; fn poll_ready(&mut self, cx: &mut std::task::Context) -> Poll<Result<(), Self::Error>> { self.inner.poll_ready(cx) } fn call(&mut self, items: Vec<Metric>) -> Self::Future { let input = encode_events(self.protocol_version, items, &self.config.namespace); let body: Vec<u8> = input.into_bytes(); self.inner.call(body) } } fn create_build_request( uri: http::Uri, token: String, ) -> impl Fn(Vec<u8>) -> BoxFuture<'static, crate::Result<hyper::Request<Vec<u8>>>> + Sync + Send + 'static { let auth = format!("Token {}", token); move |body| { Box::pin(ready( hyper::Request::post(uri.clone()) .header("Content-Type", "text/plain") .header("Authorization", auth.clone()) .body(body) .map_err(Into::into), )) } } fn encode_events( protocol_version: ProtocolVersion, events: Vec<Metric>, namespace: &str, ) -> String { let mut output = String::new(); for event in events.into_iter() { let fullname = encode_namespace(namespace, &event.name); let ts = encode_timestamp(event.timestamp); let tags = event.tags.clone(); match event.value { MetricValue::Counter { value } => { let fields = to_fields(value); influx_line_protocol( protocol_version, fullname, "counter", tags, Some(fields), ts, &mut output, ) } MetricValue::Gauge { value } => { let fields = to_fields(value); influx_line_protocol( protocol_version, fullname, "gauge", tags, Some(fields), ts, &mut output, ); } MetricValue::Set { values } => { let fields = to_fields(values.len() as f64); influx_line_protocol( protocol_version, fullname, "set", tags, Some(fields), ts, &mut output, ); } MetricValue::AggregatedHistogram { buckets, counts, count, sum, } => { let mut fields: HashMap<String, Field> = buckets .iter() .zip(counts.iter()) .map(|pair| (format!("bucket_{}", pair.0), Field::UnsignedInt(*pair.1))) .collect(); fields.insert("count".to_owned(), Field::UnsignedInt(count)); fields.insert("sum".to_owned(), Field::Float(sum)); influx_line_protocol( protocol_version, fullname, "histogram", tags, Some(fields), ts, &mut output, ); } MetricValue::AggregatedSummary { quantiles, values, count, sum, } => { let mut fields: HashMap<String, Field> = quantiles .iter() .zip(values.iter()) .map(|pair| (format!("quantile_{}", pair.0), Field::Float(*pair.1))) .collect(); fields.insert("count".to_owned(), Field::UnsignedInt(count)); fields.insert("sum".to_owned(), Field::Float(sum)); influx_line_protocol( protocol_version, fullname, "summary", tags, Some(fields), ts, &mut output, ); } MetricValue::Distribution { values, sample_rates, } => { let fields = encode_distribution(&values, &sample_rates); influx_line_protocol( protocol_version, fullname, "distribution", tags, fields, ts, &mut output, ); } } } // remove last '\n' output.pop(); output } fn encode_distribution(values: &[f64], counts: &[u32]) -> Option<HashMap<String, Field>> { if values.len() != counts.len() { return None; } let mut samples = Vec::new(); for (v, c) in values.iter().zip(counts.iter()) { for _ in 0..*c { samples.push(*v); } } if samples.is_empty() { return None; } if samples.len() == 1 { let val = samples[0]; return Some( vec![ ("min".to_owned(), Field::Float(val)), ("max".to_owned(), Field::Float(val)), ("median".to_owned(), Field::Float(val)), ("avg".to_owned(), Field::Float(val)), ("sum".to_owned(), Field::Float(val)), ("count".to_owned(), Field::Float(1.0)), ("quantile_0.95".to_owned(), Field::Float(val)), ] .into_iter() .collect(), ); } samples.sort_by(|a, b| a.partial_cmp(b).unwrap_or(Ordering::Equal)); let length = samples.len() as f64; let min = samples.first().unwrap(); let max = samples.last().unwrap(); let p50 = samples[(0.50 * length - 1.0).round() as usize]; let p95 = samples[(0.95 * length - 1.0).round() as usize]; let sum = samples.iter().sum(); let avg = sum / length; let fields: HashMap<String, Field> = vec![ ("min".to_owned(), Field::Float(*min)), ("max".to_owned(), Field::Float(*max)), ("median".to_owned(), Field::Float(p50)), ("avg".to_owned(), Field::Float(avg)), ("sum".to_owned(), Field::Float(sum)), ("count".to_owned(), Field::Float(length)), ("quantile_0.95".to_owned(), Field::Float(p95)), ] .into_iter() .collect(); Some(fields) } fn to_fields(value: f64) -> HashMap<String, Field> { let fields: HashMap<String, Field> = vec![("value".to_owned(), Field::Float(value))] .into_iter() .collect(); fields } #[cfg(test)] mod tests { use super::*; use crate::event::metric::{Metric, MetricKind, MetricValue}; use crate::sinks::influxdb::test_util::{assert_fields, split_line_protocol, tags, ts}; use pretty_assertions::assert_eq; #[test] fn test_encode_counter() { let events = vec![ Metric { name: "total".into(), timestamp: Some(ts()), tags: None, kind: MetricKind::Incremental, value: MetricValue::Counter { value: 1.5 }, }, Metric { name: "check".into(), timestamp: Some(ts()), tags: Some(tags()), kind: MetricKind::Incremental, value: MetricValue::Counter { value: 1.0 }, }, ]; let line_protocols = encode_events(ProtocolVersion::V2, events, "ns"); assert_eq!( line_protocols, "ns.total,metric_type=counter value=1.5 1542182950000000011\n\ ns.check,metric_type=counter,normal_tag=value,true_tag=true value=1 1542182950000000011" ); } #[test] fn test_encode_gauge() { let events = vec![Metric { name: "meter".to_owned(), timestamp: Some(ts()), tags: Some(tags()), kind: MetricKind::Incremental, value: MetricValue::Gauge { value: -1.5 }, }]; let line_protocols = encode_events(ProtocolVersion::V2, events, "ns"); assert_eq!( line_protocols, "ns.meter,metric_type=gauge,normal_tag=value,true_tag=true value=-1.5 1542182950000000011" ); } #[test] fn test_encode_set() { let events = vec![Metric { name: "users".into(), timestamp: Some(ts()), tags: Some(tags()), kind: MetricKind::Incremental, value: MetricValue::Set { values: vec!["alice".into(), "bob".into()].into_iter().collect(), }, }]; let line_protocols = encode_events(ProtocolVersion::V2, events, "ns"); assert_eq!( line_protocols, "ns.users,metric_type=set,normal_tag=value,true_tag=true value=2 1542182950000000011" ); } #[test] fn test_encode_histogram_v1() { let events = vec![Metric { name: "requests".to_owned(), timestamp: Some(ts()), tags: Some(tags()), kind: MetricKind::Absolute, value: MetricValue::AggregatedHistogram { buckets: vec![1.0, 2.1, 3.0], counts: vec![1, 2, 3], count: 6, sum: 12.5, }, }]; let line_protocols = encode_events(ProtocolVersion::V1, events, "ns"); let line_protocols: Vec<&str> = line_protocols.split('\n').collect(); assert_eq!(line_protocols.len(), 1); let line_protocol1 = split_line_protocol(line_protocols[0]); assert_eq!("ns.requests", line_protocol1.0); assert_eq!( "metric_type=histogram,normal_tag=value,true_tag=true", line_protocol1.1 ); assert_fields( line_protocol1.2.to_string(), [ "bucket_1=1i", "bucket_2.1=2i", "bucket_3=3i", "count=6i", "sum=12.5", ] .to_vec(), ); assert_eq!("1542182950000000011", line_protocol1.3); } #[test] fn test_encode_histogram() { let events = vec![Metric { name: "requests".to_owned(), timestamp: Some(ts()), tags: Some(tags()), kind: MetricKind::Absolute, value: MetricValue::AggregatedHistogram { buckets: vec![1.0, 2.1, 3.0], counts: vec![1, 2, 3], count: 6, sum: 12.5, }, }]; let line_protocols = encode_events(ProtocolVersion::V2, events, "ns"); let line_protocols: Vec<&str> = line_protocols.split('\n').collect(); assert_eq!(line_protocols.len(), 1); let line_protocol1 = split_line_protocol(line_protocols[0]); assert_eq!("ns.requests", line_protocol1.0); assert_eq!( "metric_type=histogram,normal_tag=value,true_tag=true", line_protocol1.1 ); assert_fields( line_protocol1.2.to_string(), [ "bucket_1=1u", "bucket_2.1=2u", "bucket_3=3u", "count=6u", "sum=12.5", ] .to_vec(), ); assert_eq!("1542182950000000011", line_protocol1.3); } #[test] fn test_encode_summary_v1() { let events = vec![Metric { name: "requests_sum".to_owned(), timestamp: Some(ts()), tags: Some(tags()), kind: MetricKind::Absolute, value: MetricValue::AggregatedSummary { quantiles: vec![0.01, 0.5, 0.99], values: vec![1.5, 2.0, 3.0], count: 6, sum: 12.0, }, }]; let line_protocols = encode_events(ProtocolVersion::V1, events, "ns"); let line_protocols: Vec<&str> = line_protocols.split('\n').collect(); assert_eq!(line_protocols.len(), 1); let line_protocol1 = split_line_protocol(line_protocols[0]); assert_eq!("ns.requests_sum", line_protocol1.0); assert_eq!( "metric_type=summary,normal_tag=value,true_tag=true", line_protocol1.1 ); assert_fields( line_protocol1.2.to_string(), [ "count=6i", "quantile_0.01=1.5", "quantile_0.5=2", "quantile_0.99=3", "sum=12", ] .to_vec(), ); assert_eq!("1542182950000000011", line_protocol1.3); } #[test] fn test_encode_summary() { let events = vec![Metric { name: "requests_sum".to_owned(), timestamp: Some(ts()), tags: Some(tags()), kind: MetricKind::Absolute, value: MetricValue::AggregatedSummary { quantiles: vec![0.01, 0.5, 0.99], values: vec![1.5, 2.0, 3.0], count: 6, sum: 12.0, }, }]; let line_protocols = encode_events(ProtocolVersion::V2, events, "ns"); let line_protocols: Vec<&str> = line_protocols.split('\n').collect(); assert_eq!(line_protocols.len(), 1); let line_protocol1 = split_line_protocol(line_protocols[0]); assert_eq!("ns.requests_sum", line_protocol1.0); assert_eq!( "metric_type=summary,normal_tag=value,true_tag=true", line_protocol1.1 ); assert_fields( line_protocol1.2.to_string(), [ "count=6u", "quantile_0.01=1.5", "quantile_0.5=2", "quantile_0.99=3", "sum=12", ] .to_vec(), ); assert_eq!("1542182950000000011", line_protocol1.3); } #[test] fn test_encode_distribution() { let events = vec![ Metric { name: "requests".into(), timestamp: Some(ts()), tags: Some(tags()), kind: MetricKind::Incremental, value: MetricValue::Distribution { values: vec![1.0, 2.0, 3.0], sample_rates: vec![3, 3, 2], }, }, Metric { name: "dense_stats".into(), timestamp: Some(ts()), tags: None, kind: MetricKind::Incremental, value: MetricValue::Distribution { values: (0..20).map(f64::from).collect::<Vec<_>>(), sample_rates: vec![1; 20], }, }, Metric { name: "sparse_stats".into(), timestamp: Some(ts()), tags: None, kind: MetricKind::Incremental, value: MetricValue::Distribution { values: (1..5).map(f64::from).collect::<Vec<_>>(), sample_rates: (1..5).collect::<Vec<_>>(), }, }, ]; let line_protocols = encode_events(ProtocolVersion::V2, events, "ns"); let line_protocols: Vec<&str> = line_protocols.split('\n').collect(); assert_eq!(line_protocols.len(), 3); let line_protocol1 = split_line_protocol(line_protocols[0]); assert_eq!("ns.requests", line_protocol1.0); assert_eq!( "metric_type=distribution,normal_tag=value,true_tag=true", line_protocol1.1 ); assert_fields( line_protocol1.2.to_string(), [ "avg=1.875", "count=8", "max=3", "median=2", "min=1", "quantile_0.95=3", "sum=15", ] .to_vec(), ); assert_eq!("1542182950000000011", line_protocol1.3); let line_protocol2 = split_line_protocol(line_protocols[1]); assert_eq!("ns.dense_stats", line_protocol2.0); assert_eq!("metric_type=distribution", line_protocol2.1); assert_fields( line_protocol2.2.to_string(), [ "avg=9.5", "count=20", "max=19", "median=9", "min=0", "quantile_0.95=18", "sum=190", ] .to_vec(), ); assert_eq!("1542182950000000011", line_protocol2.3); let line_protocol3 = split_line_protocol(line_protocols[2]); assert_eq!("ns.sparse_stats", line_protocol3.0); assert_eq!("metric_type=distribution", line_protocol3.1); assert_fields( line_protocol3.2.to_string(), [ "avg=3", "count=10", "max=4", "median=3", "min=1", "quantile_0.95=4", "sum=30", ] .to_vec(), ); assert_eq!("1542182950000000011", line_protocol3.3); } #[test] fn test_encode_distribution_empty_stats() { let events = vec![Metric { name: "requests".into(), timestamp: Some(ts()), tags: Some(tags()), kind: MetricKind::Incremental, value: MetricValue::Distribution { values: vec![], sample_rates: vec![], }, }]; let line_protocols = encode_events(ProtocolVersion::V2, events, "ns"); assert_eq!(line_protocols.len(), 0); } #[test] fn test_encode_distribution_zero_counts_stats() { let events = vec![Metric { name: "requests".into(), timestamp: Some(ts()), tags: Some(tags()), kind: MetricKind::Incremental, value: MetricValue::Distribution { values: vec![1.0, 2.0], sample_rates: vec![0, 0], }, }]; let line_protocols = encode_events(ProtocolVersion::V2, events, "ns"); assert_eq!(line_protocols.len(), 0); } #[test] fn test_encode_distribution_unequal_stats() { let events = vec![Metric { name: "requests".into(), timestamp: Some(ts()), tags: Some(tags()), kind: MetricKind::Incremental, value: MetricValue::Distribution { values: vec![1.0], sample_rates: vec![1, 2, 3], }, }]; let line_protocols = encode_events(ProtocolVersion::V2, events, "ns"); assert_eq!(line_protocols.len(), 0); } } #[cfg(feature = "influxdb-integration-tests")] #[cfg(test)] mod integration_tests { use crate::event::metric::{MetricKind, MetricValue}; use crate::event::Metric; use crate::sinks::influxdb::metrics::{InfluxDBConfig, InfluxDBSvc}; use crate::sinks::influxdb::test_util::{onboarding_v2, BUCKET, ORG, TOKEN}; use crate::sinks::influxdb::InfluxDB2Settings; use crate::sinks::util::http::HttpClient; use crate::test_util::runtime; use crate::topology::SinkContext; use crate::Event; use chrono::Utc; use futures::compat::Future01CompatExt; use futures01::{stream as stream01, Sink}; // fn onboarding_v1() { // let client = reqwest::Client::builder() // .danger_accept_invalid_certs(true) // .build() // .unwrap(); // // let res = client // .get("http://localhost:8086/query") // .query(&[("q", "CREATE DATABASE my-database")]) // .send() // .unwrap(); // // let status = res.status(); // // assert!( // status == http::StatusCode::OK, // format!("UnexpectedStatus: {}", status) // ); // } #[test] fn influxdb2_metrics_put_data() { let mut rt = runtime(); onboarding_v2(); let cx = SinkContext::new_test(); let config = InfluxDBConfig { namespace: "ns".to_string(), endpoint: "http://localhost:9999".to_string(), influxdb1_settings: None, influxdb2_settings: Some(InfluxDB2Settings { org: ORG.to_string(), bucket: BUCKET.to_string(), token: TOKEN.to_string(), }), batch: Default::default(), request: Default::default(), }; let metric = format!("counter-{}", Utc::now().timestamp_nanos()); let mut events = Vec::new(); for i in 0..10 { let event = Event::Metric(Metric { name: metric.to_string(), timestamp: None, tags: Some( vec![ ("region".to_owned(), "us-west-1".to_owned()), ("production".to_owned(), "true".to_owned()), ] .into_iter() .collect(), ), kind: MetricKind::Incremental, value: MetricValue::Counter { value: i as f64 }, }); events.push(event); } let client = HttpClient::new(cx.resolver(), None).unwrap(); let sink = InfluxDBSvc::new(config, cx, client).unwrap(); let stream = stream01::iter_ok(events.clone().into_iter()); rt.block_on_std(async move { let _ = sink.send_all(stream).compat().await.unwrap(); let mut body = std::collections::HashMap::new(); body.insert("query", format!("from(bucket:\"my-bucket\") |> range(start: 0) |> filter(fn: (r) => r._measurement == \"ns.{}\")", metric)); body.insert("type", "flux".to_owned()); let client = reqwest::Client::builder() .danger_accept_invalid_certs(true) .build() .unwrap(); let res = client .post("http://localhost:9999/api/v2/query?org=my-org") .json(&body) .header("accept", "application/json") .header("Authorization", "Token my-token") .send() .await .unwrap(); let string = res.text().await.unwrap(); let lines = string.split("\n").collect::<Vec<&str>>(); let header = lines[0].split(",").collect::<Vec<&str>>(); let record = lines[1].split(",").collect::<Vec<&str>>(); assert_eq!( record[header .iter() .position(|&r| r.trim() == "metric_type") .unwrap()] .trim(), "counter" ); assert_eq!( record[header .iter() .position(|&r| r.trim() == "production") .unwrap()] .trim(), "true" ); assert_eq!( record[header.iter().position(|&r| r.trim() == "region").unwrap()].trim(), "us-west-1" ); assert_eq!( record[header .iter() .position(|&r| r.trim() == "_measurement") .unwrap()] .trim(), format!("ns.{}", metric) ); assert_eq!( record[header.iter().position(|&r| r.trim() == "_field").unwrap()].trim(), "value" ); assert_eq!( record[header.iter().position(|&r| r.trim() == "_value").unwrap()].trim(), "45" ); }); } }
use std::borrow::Borrow; use std::cmp::Ordering; use std::convert::TryInto; use std::marker::PhantomData; use std::ops::Index; use crate::error::{HelixError, Result}; use crate::types::{Bytes, Entry}; pub(crate) trait KeyExtractor<T: Borrow<Self>>: Eq { fn key(data: &T) -> &[u8]; } impl<T: Index<usize, Output = Entry> + Borrow<Vec<Entry>>> KeyExtractor<T> for Vec<Entry> { fn key(data: &T) -> &[u8] { &(*data.index(0)).key } } // todo: remove Eq bound? pub trait Comparator: Send + Sync + Eq { fn cmp(lhs: &[u8], rhs: &[u8]) -> Ordering where Self: Sized; } #[derive(Eq, PartialEq)] pub(crate) struct OrderingHelper<C: Comparator, T: KeyExtractor<T>> { pub data: T, _c: PhantomData<C>, } impl<C: Comparator, T: Eq + KeyExtractor<T>> Ord for OrderingHelper<C, T> { fn cmp(&self, other: &Self) -> Ordering { C::cmp(T::key(&self.data), T::key(&other.data)) } } impl<C: Comparator, T: PartialEq + KeyExtractor<T>> PartialOrd for OrderingHelper<C, T> { fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(C::cmp(T::key(&self.data), T::key(&other.data))) } } impl<C: Comparator, T: KeyExtractor<T>> From<T> for OrderingHelper<C, T> { fn from(data: T) -> Self { Self { data, _c: PhantomData, } } } #[derive(Eq, PartialEq)] /// This comparator returns `Ordering::Equal` for every operands. /// Which will ignore the provided left and right bound and result a full table /// scan. /// /// # Example /// ```rust /// # use std::cmp::Ordering; /// # use helixdb::NoOrderComparator; /// # use crate::helixdb::Comparator; /// assert_eq!( /// NoOrderComparator::cmp(&[1, 2, 3], &[2, 3, 3]), /// Ordering::Equal /// ); /// assert_eq!(NoOrderComparator::cmp(&[1, 2, 3], &[1, 2]), Ordering::Equal); /// assert_eq!( /// NoOrderComparator::cmp(&[1, 2, 3], &[1, 2, 3]), /// Ordering::Equal /// ); /// ``` pub struct NoOrderComparator {} impl Comparator for NoOrderComparator { fn cmp(_: &[u8], _: &[u8]) -> Ordering { Ordering::Equal } } #[derive(PartialEq, Eq)] /// This comparator describes lexicographical order on `[u8]` /// /// # Example /// ```rust /// # use std::cmp::Ordering; /// # use helixdb::LexicalComparator; /// # use crate::helixdb::Comparator; /// assert_eq!( /// LexicalComparator::cmp(&[1, 2, 3], &[2, 3, 3]), /// Ordering::Less /// ); /// assert_eq!( /// LexicalComparator::cmp(&[1, 2, 3], &[1, 2]), /// Ordering::Greater /// ); /// assert_eq!( /// LexicalComparator::cmp(&[1, 2, 3], &[1, 2, 3]), /// Ordering::Equal /// ); /// ``` pub struct LexicalComparator {} impl Comparator for LexicalComparator { fn cmp(lhs: &[u8], rhs: &[u8]) -> Ordering { lhs.cmp(rhs) } } pub fn encode_u64(data: u64) -> Bytes { data.to_le_bytes().to_vec() } pub fn decode_u64(data: &[u8]) -> u64 { u64::from_le_bytes(data.try_into().unwrap()) } /// Check the length of data. Return `HelixError::IncompatibleLength` pub fn check_bytes_length(data: &[u8], length: usize) -> Result<()> { if data.len() == length { Ok(()) } else { Err(HelixError::IncompatibleLength(length, data.len())) } } crate trait AssertSend: Send {} crate trait AssertSync: Sync {}
use hotkey::KeyCode; /// The configuration to use for a Hotkey System. It describes with keys to use /// as hotkeys for the different actions. #[derive(Debug, Eq, PartialEq, Hash)] pub struct HotkeyConfig { /// The key to use for splitting and starting a new attempt. pub split: KeyCode, /// The key to use for resetting the current attempt. pub reset: KeyCode, /// The key to use for undoing the last split. pub undo: KeyCode, /// The key to use for skipping the current split. pub skip: KeyCode, /// The key to use for pausing the current attempt and starting a new /// attempt. pub pause: KeyCode, /// The key to use for switching to the previous comparison. pub previous_comparison: KeyCode, /// The key to use for switching to the next comparison. pub next_comparison: KeyCode, } #[cfg(any(windows, target_os = "linux"))] impl Default for HotkeyConfig { fn default() -> Self { use hotkey::KeyCode::*; Self { split: Space, reset: NumPad3, undo: NumPad8, skip: NumPad2, pause: NumPad5, previous_comparison: NumPad4, next_comparison: NumPad6, } } } #[cfg(any(target_os = "emscripten", all(target_arch = "wasm32", target_os = "unknown")))] impl Default for HotkeyConfig { fn default() -> Self { use hotkey::KeyCode::*; Self { split: Space, reset: Numpad3, undo: Numpad8, skip: Numpad2, pause: Numpad5, previous_comparison: Numpad4, next_comparison: Numpad6, } } } #[cfg( not( any( windows, target_os = "linux", target_os = "emscripten", all(target_arch = "wasm32", target_os = "unknown") ) ) )] impl Default for HotkeyConfig { fn default() -> Self { Self { split: KeyCode, reset: KeyCode, undo: KeyCode, skip: KeyCode, pause: KeyCode, previous_comparison: KeyCode, next_comparison: KeyCode, } } }
use proconio::{input, marker::Chars}; fn main() { input! { n: usize, s: Chars, }; let mut zero = 0; let mut one = 0; if s[0] == '0' { zero = 1; } else { one = 1; } let mut ans: usize = one; for i in 1..n { let (zero_, one_) = if s[i] == '0' { (1, zero + one) } else { (one, zero + 1) }; zero = zero_; one = one_; ans += one; } println!("{}", ans); }
use chrono::{DateTime, Utc}; use serenity::async_trait; use crate::{HOME_DIR, config::DatabaseType}; use super::CONFIG; pub mod sqlite_connection; use sqlite_connection::SqliteConnection; #[derive(Debug, Clone)] pub struct DBUser { pub user_id: String, pub level: i32, pub xp: i32, pub last_xp: DateTime<Utc> } #[async_trait] pub trait Database: std::fmt::Debug + Send { // returns a User struct with information about recent msgs async fn get_user(&mut self, guild_id: String, user_id: String) -> DBUser; // returns a users rank async fn get_rank(&mut self, guild_id: String, db_user: &DBUser) -> i32; // sets a users xp async fn set_user_xp(&mut self, guild_id: String, user_id: String, xp: i32); // sets a users xp and level async fn set_user_level(&mut self, guild_id: String, user_id: String, level: i32, xp: i32); // returns a list of users, sorted by rank async fn get_top_users(&mut self, guild_id: String, limit: i32, starting_rank: i32) -> Vec<DBUser>; // returns a HashMap of levels with their rewards async fn get_rank_reward(&mut self, guild_id: String, level: i32) -> Option<u64>; // returns a HashMap of levels with their rewards async fn get_all_rank_rewards(&mut self, guild_id: String) -> Vec<(i32, u64)>; // returns a config setting as a string from a key async fn get_config(&mut self, guild_id: String, key: &str) -> Option<String>; // sets a config option async fn set_config(&mut self, guild_id: String, key: &str, value: &str); } pub async fn new_database() -> Box<dyn Database> { match CONFIG.get().unwrap().database.db_type { DatabaseType::Sqlite => { let mut sqlite_path = HOME_DIR.get().unwrap().clone(); sqlite_path.push("resources"); sqlite_path.push("db"); sqlite_path.set_extension("sqlite"); Box::new(SqliteConnection::new(sqlite_path.to_str().unwrap()).await) } } }
// Copyright 2020-2021, The Tremor Team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #![cfg(not(tarpaulin_include))] use crate::connectors::otel::{logs, metrics, trace}; use crate::source::prelude::*; use tremor_otelapis::all::{self, OpenTelemetryEvents}; use tremor_script::Value; #[derive(Debug, Clone, Deserialize, Default)] pub struct Config { /// The hostname or IP address for the remote OpenTelemetry collector endpoint pub host: String, /// The TCP port for the remote OpenTelemetry collector endpoint pub port: u16, #[serde(default = "d_true")] pub logs: bool, /// Enables the trace service #[serde(default = "d_true")] pub trace: bool, /// Enables the metrics service #[serde(default = "d_true")] pub metrics: bool, } fn d_true() -> bool { true } impl ConfigImpl for Config {} pub struct OpenTelemetry { pub config: Config, onramp_id: TremorUrl, } pub struct Int { config: Config, onramp_id: TremorUrl, tx: tremor_otelapis::all::OpenTelemetrySender, rx: tremor_otelapis::all::OpenTelemetryReceiver, origin: EventOriginUri, } impl std::fmt::Debug for Int { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "OpenTelemetry") } } impl Int { fn from_config(uid: u64, onramp_id: TremorUrl, config: &Config) -> Self { let (tx, rx) = bounded(128); let config = config.clone(); let origin = EventOriginUri { uid, scheme: "tremor-otel".to_string(), host: hostname(), port: None, path: vec![], }; Self { config, onramp_id, tx, rx, origin, } } } impl onramp::Impl for OpenTelemetry { fn from_config(id: &TremorUrl, config: &Option<YamlValue>) -> Result<Box<dyn Onramp>> { if let Some(config) = config { let config: Config = Config::new(config)?; Ok(Box::new(Self { config, onramp_id: id.clone(), })) } else { Err("Missing config for otel onramp".into()) } } } #[async_trait::async_trait()] impl Source for Int { fn id(&self) -> &TremorUrl { &self.onramp_id } async fn pull_event(&mut self, _id: u64) -> Result<SourceReply> { match self.rx.try_recv() { Ok(OpenTelemetryEvents::Metrics(metrics)) => { if self.config.metrics { let data: Value = metrics::resource_metrics_to_json(metrics); return Ok(SourceReply::Structured { origin_uri: self.origin.clone(), data: data.into(), }); } warn!("Otel Source received metrics event when trace support is disabled. Dropping trace"); } Ok(OpenTelemetryEvents::Logs(logs)) => { if self.config.logs { let data: Value = logs::resource_logs_to_json(logs)?; return Ok(SourceReply::Structured { origin_uri: self.origin.clone(), data: data.into(), }); } warn!( "Otel Source received log event when trace support is disabled. Dropping trace" ); } Ok(OpenTelemetryEvents::Trace(traces)) => { if self.config.trace { let data: Value = trace::resource_spans_to_json(traces); return Ok(SourceReply::Structured { origin_uri: self.origin.clone(), data: data.into(), }); } warn!("Otel Source received trace event when trace support is disabled. Dropping trace"); } _ => (), }; Ok(SourceReply::Empty(10)) } async fn init(&mut self) -> Result<SourceState> { let addr = format!("{}:{}", self.config.host.as_str(), self.config.port).parse()?; let tx = self.tx.clone(); task::spawn(async move { // Builder for gRPC server over HTTP/2 framing match all::make(addr, tx).await { Ok(_) => (), Err(e) => { error!("Could not start gRPC service: {}", e); } } }); Ok(SourceState::Connected) } async fn on_empty_event(&mut self, _id: u64, _stream: usize) -> Result<()> { Ok(()) } async fn reply_event( &mut self, _event: Event, _codec: &dyn crate::codec::Codec, _codec_map: &halfbrown::HashMap<String, Box<dyn crate::codec::Codec>>, ) -> Result<()> { Ok(()) } fn metrics(&mut self, _t: u64) -> Vec<Event> { vec![] } async fn terminate(&mut self) {} fn trigger_breaker(&mut self) {} fn restore_breaker(&mut self) {} fn ack(&mut self, _id: u64) {} fn fail(&mut self, _id: u64) {} fn is_transactional(&self) -> bool { false } } #[async_trait::async_trait] impl Onramp for OpenTelemetry { async fn start(&mut self, config: OnrampConfig<'_>) -> Result<onramp::Addr> { let source = Int::from_config(config.onramp_uid, self.onramp_id.clone(), &self.config); SourceManager::start(source, config).await } fn default_codec(&self) -> &str { "json" } }
#[doc = r" Value read from the register"] pub struct R { bits: u32, } #[doc = r" Value to write to the register"] pub struct W { bits: u32, } impl super::PCON { #[doc = r" Modifies the contents of the register"] #[inline] pub fn modify<F>(&self, f: F) where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, { let bits = self.register.get(); let r = R { bits: bits }; let mut w = W { bits: bits }; f(&r, &mut w); self.register.set(w.bits); } #[doc = r" Reads the contents of the register"] #[inline] pub fn read(&self) -> R { R { bits: self.register.get(), } } #[doc = r" Writes to the register"] #[inline] pub fn write<F>(&self, f: F) where F: FnOnce(&mut W) -> &mut W, { let mut w = W::reset_value(); f(&mut w); self.register.set(w.bits); } #[doc = r" Writes the reset value to the register"] #[inline] pub fn reset(&self) { self.write(|w| w) } } #[doc = "Possible values of the field `PM`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PMR { #[doc = "Default. The part is in active or sleep mode."] DEFAULT_THE_PART_IS, #[doc = "ARM WFI will enter Deep-sleep mode."] ARM_WFI_WILL_ENTER_DEEP_SLEEP, #[doc = "ARM WFI will enter Power-down mode."] ARM_WFI_WILL_ENTER_P, #[doc = "ARM WFI will enter Deep-power down mode (ARM Cortex-M0 core powered-down)."] ARM_WFI_WILL_ENTER_DEEP_POWER_DOWN, #[doc = r" Reserved"] _Reserved(u8), } impl PMR { #[doc = r" Value of the field as raw bits"] #[inline] pub fn bits(&self) -> u8 { match *self { PMR::DEFAULT_THE_PART_IS => 0, PMR::ARM_WFI_WILL_ENTER_DEEP_SLEEP => 1, PMR::ARM_WFI_WILL_ENTER_P => 2, PMR::ARM_WFI_WILL_ENTER_DEEP_POWER_DOWN => 3, PMR::_Reserved(bits) => bits, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: u8) -> PMR { match value { 0 => PMR::DEFAULT_THE_PART_IS, 1 => PMR::ARM_WFI_WILL_ENTER_DEEP_SLEEP, 2 => PMR::ARM_WFI_WILL_ENTER_P, 3 => PMR::ARM_WFI_WILL_ENTER_DEEP_POWER_DOWN, i => PMR::_Reserved(i), } } #[doc = "Checks if the value of the field is `DEFAULT_THE_PART_IS`"] #[inline] pub fn is_default_the_part_is(&self) -> bool { *self == PMR::DEFAULT_THE_PART_IS } #[doc = "Checks if the value of the field is `ARM_WFI_WILL_ENTER_DEEP_SLEEP`"] #[inline] pub fn is_arm_wfi_will_enter_deep_sleep(&self) -> bool { *self == PMR::ARM_WFI_WILL_ENTER_DEEP_SLEEP } #[doc = "Checks if the value of the field is `ARM_WFI_WILL_ENTER_P`"] #[inline] pub fn is_arm_wfi_will_enter_p(&self) -> bool { *self == PMR::ARM_WFI_WILL_ENTER_P } #[doc = "Checks if the value of the field is `ARM_WFI_WILL_ENTER_DEEP_POWER_DOWN`"] #[inline] pub fn is_arm_wfi_will_enter_deep_power_down(&self) -> bool { *self == PMR::ARM_WFI_WILL_ENTER_DEEP_POWER_DOWN } } #[doc = r" Value of the field"] pub struct NODPDR { bits: bool, } impl NODPDR { #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { self.bits } #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } } #[doc = "Possible values of the field `SLEEPFLAG`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum SLEEPFLAGR { #[doc = "Read: No power-down mode entered. LPC11Uxx is in Active mode. Write: No effect."] READ_NO_POWER_DOWN_, #[doc = "Read: Sleep/Deep-sleep or Deep power-down mode entered. Write: Writing a 1 clears the SLEEPFLAG bit to 0."] READ_SLEEPDEEP_SLE, } impl SLEEPFLAGR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { SLEEPFLAGR::READ_NO_POWER_DOWN_ => false, SLEEPFLAGR::READ_SLEEPDEEP_SLE => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> SLEEPFLAGR { match value { false => SLEEPFLAGR::READ_NO_POWER_DOWN_, true => SLEEPFLAGR::READ_SLEEPDEEP_SLE, } } #[doc = "Checks if the value of the field is `READ_NO_POWER_DOWN_`"] #[inline] pub fn is_read_no_power_down_(&self) -> bool { *self == SLEEPFLAGR::READ_NO_POWER_DOWN_ } #[doc = "Checks if the value of the field is `READ_SLEEPDEEP_SLE`"] #[inline] pub fn is_read_sleepdeep_sle(&self) -> bool { *self == SLEEPFLAGR::READ_SLEEPDEEP_SLE } } #[doc = "Possible values of the field `DPDFLAG`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum DPDFLAGR { #[doc = "Read: Deep power-down mode not entered. Write: No effect."] READ_DEEP_POWER_DOWN_NOT_ENTERED, #[doc = "Read: Deep power-down mode entered. Write: Clear the Deep power-down flag."] READ_DEEP_POWER_DOWN_ENTERED, } impl DPDFLAGR { #[doc = r" Returns `true` if the bit is clear (0)"] #[inline] pub fn bit_is_clear(&self) -> bool { !self.bit() } #[doc = r" Returns `true` if the bit is set (1)"] #[inline] pub fn bit_is_set(&self) -> bool { self.bit() } #[doc = r" Value of the field as raw bits"] #[inline] pub fn bit(&self) -> bool { match *self { DPDFLAGR::READ_DEEP_POWER_DOWN_NOT_ENTERED => false, DPDFLAGR::READ_DEEP_POWER_DOWN_ENTERED => true, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: bool) -> DPDFLAGR { match value { false => DPDFLAGR::READ_DEEP_POWER_DOWN_NOT_ENTERED, true => DPDFLAGR::READ_DEEP_POWER_DOWN_ENTERED, } } #[doc = "Checks if the value of the field is `READ_DEEP_POWER_DOWN_NOT_ENTERED`"] #[inline] pub fn is_read_deep_power_down_not_entered(&self) -> bool { *self == DPDFLAGR::READ_DEEP_POWER_DOWN_NOT_ENTERED } #[doc = "Checks if the value of the field is `READ_DEEP_POWER_DOWN_ENTERED`"] #[inline] pub fn is_read_deep_power_down_entered(&self) -> bool { *self == DPDFLAGR::READ_DEEP_POWER_DOWN_ENTERED } } #[doc = "Values that can be written to the field `PM`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum PMW { #[doc = "Default. The part is in active or sleep mode."] DEFAULT_THE_PART_IS, #[doc = "ARM WFI will enter Deep-sleep mode."] ARM_WFI_WILL_ENTER_DEEP_SLEEP, #[doc = "ARM WFI will enter Power-down mode."] ARM_WFI_WILL_ENTER_P, #[doc = "ARM WFI will enter Deep-power down mode (ARM Cortex-M0 core powered-down)."] ARM_WFI_WILL_ENTER_DEEP_POWER_DOWN, } impl PMW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> u8 { match *self { PMW::DEFAULT_THE_PART_IS => 0, PMW::ARM_WFI_WILL_ENTER_DEEP_SLEEP => 1, PMW::ARM_WFI_WILL_ENTER_P => 2, PMW::ARM_WFI_WILL_ENTER_DEEP_POWER_DOWN => 3, } } } #[doc = r" Proxy"] pub struct _PMW<'a> { w: &'a mut W, } impl<'a> _PMW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: PMW) -> &'a mut W { unsafe { self.bits(variant._bits()) } } #[doc = "Default. The part is in active or sleep mode."] #[inline] pub fn default_the_part_is(self) -> &'a mut W { self.variant(PMW::DEFAULT_THE_PART_IS) } #[doc = "ARM WFI will enter Deep-sleep mode."] #[inline] pub fn arm_wfi_will_enter_deep_sleep(self) -> &'a mut W { self.variant(PMW::ARM_WFI_WILL_ENTER_DEEP_SLEEP) } #[doc = "ARM WFI will enter Power-down mode."] #[inline] pub fn arm_wfi_will_enter_p(self) -> &'a mut W { self.variant(PMW::ARM_WFI_WILL_ENTER_P) } #[doc = "ARM WFI will enter Deep-power down mode (ARM Cortex-M0 core powered-down)."] #[inline] pub fn arm_wfi_will_enter_deep_power_down(self) -> &'a mut W { self.variant(PMW::ARM_WFI_WILL_ENTER_DEEP_POWER_DOWN) } #[doc = r" Writes raw bits to the field"] #[inline] pub unsafe fn bits(self, value: u8) -> &'a mut W { const MASK: u8 = 7; const OFFSET: u8 = 0; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = r" Proxy"] pub struct _NODPDW<'a> { w: &'a mut W, } impl<'a> _NODPDW<'a> { #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 3; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `SLEEPFLAG`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum SLEEPFLAGW { #[doc = "Read: No power-down mode entered. LPC11Uxx is in Active mode. Write: No effect."] READ_NO_POWER_DOWN_, #[doc = "Read: Sleep/Deep-sleep or Deep power-down mode entered. Write: Writing a 1 clears the SLEEPFLAG bit to 0."] READ_SLEEPDEEP_SLE, } impl SLEEPFLAGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { SLEEPFLAGW::READ_NO_POWER_DOWN_ => false, SLEEPFLAGW::READ_SLEEPDEEP_SLE => true, } } } #[doc = r" Proxy"] pub struct _SLEEPFLAGW<'a> { w: &'a mut W, } impl<'a> _SLEEPFLAGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: SLEEPFLAGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Read: No power-down mode entered. LPC11Uxx is in Active mode. Write: No effect."] #[inline] pub fn read_no_power_down_(self) -> &'a mut W { self.variant(SLEEPFLAGW::READ_NO_POWER_DOWN_) } #[doc = "Read: Sleep/Deep-sleep or Deep power-down mode entered. Write: Writing a 1 clears the SLEEPFLAG bit to 0."] #[inline] pub fn read_sleepdeep_sle(self) -> &'a mut W { self.variant(SLEEPFLAGW::READ_SLEEPDEEP_SLE) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 8; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `DPDFLAG`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum DPDFLAGW { #[doc = "Read: Deep power-down mode not entered. Write: No effect."] READ_DEEP_POWER_DOWN_NOT_ENTERED, #[doc = "Read: Deep power-down mode entered. Write: Clear the Deep power-down flag."] READ_DEEP_POWER_DOWN_ENTERED, } impl DPDFLAGW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> bool { match *self { DPDFLAGW::READ_DEEP_POWER_DOWN_NOT_ENTERED => false, DPDFLAGW::READ_DEEP_POWER_DOWN_ENTERED => true, } } } #[doc = r" Proxy"] pub struct _DPDFLAGW<'a> { w: &'a mut W, } impl<'a> _DPDFLAGW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: DPDFLAGW) -> &'a mut W { { self.bit(variant._bits()) } } #[doc = "Read: Deep power-down mode not entered. Write: No effect."] #[inline] pub fn read_deep_power_down_not_entered(self) -> &'a mut W { self.variant(DPDFLAGW::READ_DEEP_POWER_DOWN_NOT_ENTERED) } #[doc = "Read: Deep power-down mode entered. Write: Clear the Deep power-down flag."] #[inline] pub fn read_deep_power_down_entered(self) -> &'a mut W { self.variant(DPDFLAGW::READ_DEEP_POWER_DOWN_ENTERED) } #[doc = r" Sets the field bit"] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r" Clears the field bit"] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bit(self, value: bool) -> &'a mut W { const MASK: bool = true; const OFFSET: u8 = 11; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } impl R { #[doc = r" Value of the register as raw bits"] #[inline] pub fn bits(&self) -> u32 { self.bits } #[doc = "Bits 0:2 - Power mode"] #[inline] pub fn pm(&self) -> PMR { PMR::_from({ const MASK: u8 = 7; const OFFSET: u8 = 0; ((self.bits >> OFFSET) & MASK as u32) as u8 }) } #[doc = "Bit 3 - A 1 in this bit prevents entry to Deep power-down mode when 0x3 is written to the PM field above, the SLEEPDEEP bit is set, and a WFI is executed. This bit is cleared only by power-on reset, so writing a one to this bit locks the part in a mode in which Deep power-down mode is blocked."] #[inline] pub fn nodpd(&self) -> NODPDR { let bits = { const MASK: bool = true; const OFFSET: u8 = 3; ((self.bits >> OFFSET) & MASK as u32) != 0 }; NODPDR { bits } } #[doc = "Bit 8 - Sleep mode flag"] #[inline] pub fn sleepflag(&self) -> SLEEPFLAGR { SLEEPFLAGR::_from({ const MASK: bool = true; const OFFSET: u8 = 8; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } #[doc = "Bit 11 - Deep power-down flag"] #[inline] pub fn dpdflag(&self) -> DPDFLAGR { DPDFLAGR::_from({ const MASK: bool = true; const OFFSET: u8 = 11; ((self.bits >> OFFSET) & MASK as u32) != 0 }) } } impl W { #[doc = r" Reset value of the register"] #[inline] pub fn reset_value() -> W { W { bits: 0 } } #[doc = r" Writes raw bits to the register"] #[inline] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.bits = bits; self } #[doc = "Bits 0:2 - Power mode"] #[inline] pub fn pm(&mut self) -> _PMW { _PMW { w: self } } #[doc = "Bit 3 - A 1 in this bit prevents entry to Deep power-down mode when 0x3 is written to the PM field above, the SLEEPDEEP bit is set, and a WFI is executed. This bit is cleared only by power-on reset, so writing a one to this bit locks the part in a mode in which Deep power-down mode is blocked."] #[inline] pub fn nodpd(&mut self) -> _NODPDW { _NODPDW { w: self } } #[doc = "Bit 8 - Sleep mode flag"] #[inline] pub fn sleepflag(&mut self) -> _SLEEPFLAGW { _SLEEPFLAGW { w: self } } #[doc = "Bit 11 - Deep power-down flag"] #[inline] pub fn dpdflag(&mut self) -> _DPDFLAGW { _DPDFLAGW { w: self } } }
use std::borrow::Cow; const IAS_CERT: &[u8] = include_bytes!("../../../../client-core/src/cipher/AttestationReportSigningCACert.pem"); #[derive(Clone)] pub struct EnclaveCertVerifierConfig<'a> { /// PEM encode bytes containing attestation report signing CA certificate pub signing_ca_cert_pem: Cow<'a, [u8]>, /// List of all the enclave quote statuses which should be marked as valid pub valid_enclave_quote_statuses: Cow<'a, [Cow<'a, str>]>, /// Duration for which an attestation report will be considered as valid (in secs) pub report_validity_secs: u32, /// Information about the enclave that'll be verifier if present pub enclave_info: Option<EnclaveInfo>, } impl<'a> EnclaveCertVerifierConfig<'a> { pub fn new() -> Self { Self { signing_ca_cert_pem: IAS_CERT.into(), // https://software.intel.com/security-software-guidance/insights/deep-dive-load-value-injection#mitigationguidelines valid_enclave_quote_statuses: vec!["OK".into(), "SW_HARDENING_NEEDED".into()].into(), report_validity_secs: 86400, // FIXME construct enclave_info from env var or config file enclave_info: None, } } } impl<'a> Default for EnclaveCertVerifierConfig<'a> { fn default() -> Self { Self::new() } } #[derive(Clone)] pub struct EnclaveInfo { /// 256-bit hash of enclave author's public key pub mr_signer: [u8; 32], /// 256-bit hash that identifies the code and initial data in enclave pub mr_enclave: Option<[u8; 32]>, /// CPU security version number pub cpu_svn: [u8; 16], /// Security version number provided by enclave author pub isv_svn: u16, }
#[doc = "Reader of register EISC"] pub type R = crate::R<u32, super::EISC>; #[doc = "Writer for register EISC"] pub type W = crate::W<u32, super::EISC>; #[doc = "Register EISC `reset()`'s with value 0"] impl crate::ResetValue for super::EISC { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `TOUT`"] pub type TOUT_R = crate::R<bool, bool>; #[doc = "Write proxy for field `TOUT`"] pub struct TOUT_W<'a> { w: &'a mut W, } impl<'a> TOUT_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } #[doc = "Reader of field `RSTALL`"] pub type RSTALL_R = crate::R<bool, bool>; #[doc = "Write proxy for field `RSTALL`"] pub struct RSTALL_W<'a> { w: &'a mut W, } impl<'a> RSTALL_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } #[doc = "Reader of field `WTFULL`"] pub type WTFULL_R = crate::R<bool, bool>; #[doc = "Write proxy for field `WTFULL`"] pub struct WTFULL_W<'a> { w: &'a mut W, } impl<'a> WTFULL_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } #[doc = "Reader of field `DMARDIC`"] pub type DMARDIC_R = crate::R<bool, bool>; #[doc = "Write proxy for field `DMARDIC`"] pub struct DMARDIC_W<'a> { w: &'a mut W, } impl<'a> DMARDIC_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } #[doc = "Reader of field `DMAWRIC`"] pub type DMAWRIC_R = crate::R<bool, bool>; #[doc = "Write proxy for field `DMAWRIC`"] pub struct DMAWRIC_W<'a> { w: &'a mut W, } impl<'a> DMAWRIC_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } impl R { #[doc = "Bit 0 - Timeout Error"] #[inline(always)] pub fn tout(&self) -> TOUT_R { TOUT_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Read Stalled Error"] #[inline(always)] pub fn rstall(&self) -> RSTALL_R { RSTALL_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Write FIFO Full Error"] #[inline(always)] pub fn wtfull(&self) -> WTFULL_R { WTFULL_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Read uDMA Interrupt Clear"] #[inline(always)] pub fn dmardic(&self) -> DMARDIC_R { DMARDIC_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Write uDMA Interrupt Clear"] #[inline(always)] pub fn dmawric(&self) -> DMAWRIC_R { DMAWRIC_R::new(((self.bits >> 4) & 0x01) != 0) } } impl W { #[doc = "Bit 0 - Timeout Error"] #[inline(always)] pub fn tout(&mut self) -> TOUT_W { TOUT_W { w: self } } #[doc = "Bit 1 - Read Stalled Error"] #[inline(always)] pub fn rstall(&mut self) -> RSTALL_W { RSTALL_W { w: self } } #[doc = "Bit 2 - Write FIFO Full Error"] #[inline(always)] pub fn wtfull(&mut self) -> WTFULL_W { WTFULL_W { w: self } } #[doc = "Bit 3 - Read uDMA Interrupt Clear"] #[inline(always)] pub fn dmardic(&mut self) -> DMARDIC_W { DMARDIC_W { w: self } } #[doc = "Bit 4 - Write uDMA Interrupt Clear"] #[inline(always)] pub fn dmawric(&mut self) -> DMAWRIC_W { DMAWRIC_W { w: self } } }
#![cfg(windows)] #![recursion_limit = "256"] #[macro_use] extern crate detour; extern crate encoding; extern crate failure; #[macro_use] extern crate failure_derive; #[macro_use] extern crate lazy_static; #[macro_use] extern crate serde_derive; extern crate toml; extern crate winapi; extern crate wio; use detour::StaticDetour; use std::{ ffi::{CString, OsString}, mem, ptr, sync::Mutex, }; use winapi::{ shared::{ basetsd::UINT32, minwindef::{BOOL, BYTE, DWORD, FALSE, FLOAT, HINSTANCE, LPVOID, TRUE, ULONG}, windef, winerror::HRESULT, }, um::{ combaseapi, consoleapi, d2d1, dcommon, dwrite as dw, dwrite_1 as dw_1, dwrite_2 as dw_2, dwrite_3 as dw_3, libloaderapi, unknwnbase::IUnknown, wincodec, }, Interface, }; use wio::{com::ComPtr, wide::ToWide}; #[macro_use] pub mod errors; pub mod config; pub mod d2d1_helper; pub mod dwrite; pub mod fns; pub mod gdi; pub mod util; #[allow(dead_code)] struct Detours { d_create_glyph_run_analysis: StaticDetour<fns::CreateGlyphRunAnalysis>, d_create_glyph_run_analysis_2: StaticDetour<fns::CreateGlyphRunAnalysis2>, d_create_glyph_run_analysis_3: StaticDetour<fns::CreateGlyphRunAnalysis3>, d_create_alpha_texture: StaticDetour<fns::CreateAlphaTexture>, d_get_alpha_texture_bounds: StaticDetour<fns::GetAlphaTextureBounds>, d_glyph_run_analysis_release: StaticDetour<fns::Release>, d_ext_text_out_w: StaticDetour<fns::ExtTextOutW>, d_text_out_w: StaticDetour<fns::TextOutW>, } lazy_static! { static ref DETOURS: Mutex<Option<Detours>> = Mutex::new(None); } static_detours! { struct DetourCreateGlyphRunAnalysis: unsafe extern "system" fn ( *mut dw::IDWriteFactory, *const dw::DWRITE_GLYPH_RUN, FLOAT, *const dw::DWRITE_MATRIX, dw::DWRITE_RENDERING_MODE, dcommon::DWRITE_MEASURING_MODE, FLOAT, FLOAT, *mut *mut dw::IDWriteGlyphRunAnalysis ) -> HRESULT; struct DetourCreateGlyphRunAnalysis2: unsafe extern "system" fn ( *mut dw_2::IDWriteFactory2, *const dw::DWRITE_GLYPH_RUN, *const dw::DWRITE_MATRIX, dw::DWRITE_RENDERING_MODE, dw_2::DWRITE_GRID_FIT_MODE, dw_1::DWRITE_TEXT_ANTIALIAS_MODE, dcommon::DWRITE_MEASURING_MODE, FLOAT, FLOAT, *mut *mut dw::IDWriteGlyphRunAnalysis ) -> HRESULT; struct DetourCreateGlyphRunAnalysis3: unsafe extern "system" fn ( *mut dw_3::IDWriteFactory3, *const dw::DWRITE_GLYPH_RUN, *const dw::DWRITE_MATRIX, dw_3::DWRITE_RENDERING_MODE1, dw_2::DWRITE_GRID_FIT_MODE, dw_1::DWRITE_TEXT_ANTIALIAS_MODE, dcommon::DWRITE_MEASURING_MODE, FLOAT, FLOAT, *mut *mut dw::IDWriteGlyphRunAnalysis ) -> HRESULT; struct DetourCreateAlphaTexture: unsafe extern "system" fn ( *mut dw::IDWriteGlyphRunAnalysis, dw::DWRITE_TEXTURE_TYPE, *const windef::RECT, *mut BYTE, UINT32 ) -> HRESULT; struct DetourGetAlphaTextureBounds: unsafe extern "system" fn ( *mut dw::IDWriteGlyphRunAnalysis, dw::DWRITE_TEXTURE_TYPE, *mut windef::RECT ) -> HRESULT; struct DetourGlyphRunAnalysisRelease: unsafe extern "system" fn ( *mut IUnknown ) -> ULONG; struct DetourExtTextOutW: unsafe extern "system" fn ( windef::HDC, i32, i32, u32, *const windef::RECT, *const u16, u32, *const i32 ) -> i32; struct DetourTextOutW: unsafe extern "system" fn ( windef::HDC, i32, i32, *const u16, i32 ) -> i32; } fn run() -> errors::HResult<()> { com_invoke!( (combaseapi::CoInitializeEx), (ptr::null_mut()), (combaseapi::COINITBASE_MULTITHREADED) )?; let dw_fac = unsafe { ComPtr::from_raw( com_invoke!( (dw::DWriteCreateFactory), (dw::DWRITE_FACTORY_TYPE_SHARED), (&dw::IDWriteFactory::uuidof()), (-> p) )?.0 as *mut dw::IDWriteFactory, ) }; let dw_fac_2 = unsafe { ComPtr::from_raw( com_invoke!( (dw::DWriteCreateFactory), (dw::DWRITE_FACTORY_TYPE_SHARED), (&dw_2::IDWriteFactory2::uuidof()), (-> p) )?.0 as *mut dw_2::IDWriteFactory2, ) }; let dw_fac_3 = unsafe { ComPtr::from_raw( com_invoke!( (dw::DWriteCreateFactory), (dw::DWRITE_FACTORY_TYPE_SHARED), (&dw_3::IDWriteFactory3::uuidof()), (-> p) )?.0 as *mut dw_3::IDWriteFactory3, ) }; let wic_fac = unsafe { ComPtr::from_raw( com_invoke!( (combaseapi::CoCreateInstance), (&wincodec::CLSID_WICImagingFactory), (ptr::null_mut()), (combaseapi::CLSCTX_INPROC), (&wincodec::IWICImagingFactory::uuidof()), (-> p) )?.0 as *mut wincodec::IWICImagingFactory, ) }; let d2d_fac = unsafe { ComPtr::from_raw( com_invoke!( (d2d1::D2D1CreateFactory), (d2d1::D2D1_FACTORY_TYPE_MULTI_THREADED), (&d2d1::ID2D1Factory::uuidof()), (ptr::null()), (-> p) )?.0 as *mut d2d1::ID2D1Factory, ) }; let (dw_gdi, ()) = com_invoke!( dw_fac.GetGdiInterop, (->> p) )?; let (collection, ()) = com_invoke!(dw_fac.GetSystemFontCollection, (->> p), FALSE).unwrap(); let (fam_idx, (fam_exists, ())) = com_invoke!( collection.FindFamilyName, (OsString::from("Segoe UI".to_string()).to_wide_null().as_ptr()), (-> i), (-> e) )?; if fam_exists != TRUE { return Err(annotate_error!(0)); } let (fam, ()) = com_invoke!(collection.GetFontFamily, fam_idx, (->> p))?; let (font, ()) = com_invoke!( fam.GetFirstMatchingFont, (dw::DWRITE_FONT_WEIGHT_NORMAL), (dw::DWRITE_FONT_STRETCH_NORMAL), (dw::DWRITE_FONT_STYLE_NORMAL), (->> p) )?; let (face, ()) = com_invoke!(font.CreateFontFace, (->> p))?; let gr = unsafe { dw::DWRITE_GLYPH_RUN { fontFace: face.as_raw(), fontEmSize: 16.0, glyphIndices: (&[42u16] as &'static [u16]).as_ptr(), glyphCount: 1, ..mem::zeroed() } }; let (gla, ()) = com_invoke!( dw_fac.CreateGlyphRunAnalysis, (&gr), 1.0, (ptr::null()), (dw::DWRITE_RENDERING_MODE_ALIASED), (dcommon::DWRITE_MEASURING_MODE_NATURAL), 0.0, 0.0, (->> p) )?; unsafe { let mut d_get_alpha_texture_bounds = DetourGetAlphaTextureBounds .initialize( (*(*gla.as_raw()).lpVtbl).GetAlphaTextureBounds, dwrite::detour_get_alpha_texture_bounds, ).unwrap(); d_get_alpha_texture_bounds.enable().unwrap(); let mut d_create_glyph_run_analysis_2 = DetourCreateGlyphRunAnalysis2 .initialize((*(*dw_fac_2.as_raw()).lpVtbl).CreateGlyphRunAnalysis, { let wic_fac = util::UnsafeSendSync::new(wic_fac.clone()); let d2d_fac = util::UnsafeSendSync::new(d2d_fac.clone()); let get_alpha_texture_bounds = mem::transmute(d_get_alpha_texture_bounds.trampoline()); move |tramp, this, glyph_run, transform, rendering_mode, measuring_mode, grid_fit_mode, antialias_mode, baseline_origin_x, baseline_origin_y, glyph_run_analysis| { dwrite::detour_create_glyph_run_analysis_2( wic_fac.as_ref().as_raw(), d2d_fac.as_ref().as_raw(), get_alpha_texture_bounds, tramp, this, glyph_run, transform, rendering_mode, measuring_mode, grid_fit_mode, antialias_mode, baseline_origin_x, baseline_origin_y, glyph_run_analysis, ) } }).unwrap(); d_create_glyph_run_analysis_2.enable().unwrap(); let mut d_create_glyph_run_analysis_3 = DetourCreateGlyphRunAnalysis3 .initialize((*(*dw_fac_3.as_raw()).lpVtbl).CreateGlyphRunAnalysis, { let wic_fac = util::UnsafeSendSync::new(wic_fac.clone()); let d2d_fac = util::UnsafeSendSync::new(d2d_fac.clone()); let get_alpha_texture_bounds = mem::transmute(d_get_alpha_texture_bounds.trampoline()); move |tramp, this, glyph_run, transform, rendering_mode, measuring_mode, grid_fit_mode, antialias_mode, baseline_origin_x, baseline_origin_y, glyph_run_analysis| { dwrite::detour_create_glyph_run_analysis_3( wic_fac.as_ref().as_raw(), d2d_fac.as_ref().as_raw(), get_alpha_texture_bounds, tramp, this, glyph_run, transform, rendering_mode, measuring_mode, grid_fit_mode, antialias_mode, baseline_origin_x, baseline_origin_y, glyph_run_analysis, ) } }).unwrap(); d_create_glyph_run_analysis_3.enable().unwrap(); let mut d_create_glyph_run_analysis = DetourCreateGlyphRunAnalysis .initialize((*(*dw_fac.as_raw()).lpVtbl).CreateGlyphRunAnalysis, { let dw_fac_3 = util::UnsafeSendSync::new(dw_fac_3.clone()); let wic_fac = util::UnsafeSendSync::new(wic_fac.clone()); let d2d_fac = util::UnsafeSendSync::new(d2d_fac.clone()); let get_alpha_texture_bounds = mem::transmute(d_get_alpha_texture_bounds.trampoline()); let create_glyph_run_analysis_3 = mem::transmute(d_create_glyph_run_analysis_3.trampoline()); move |_, this, glyph_run, ppd, transform, rendering_mode, measuring_mode, baseline_x, baseline_y, analysis| { dwrite::detour_create_glyph_run_analysis( dw_fac_3.as_ref().as_raw(), wic_fac.as_ref().as_raw(), d2d_fac.as_ref().as_raw(), get_alpha_texture_bounds, create_glyph_run_analysis_3, this, glyph_run, ppd, transform, rendering_mode, measuring_mode, baseline_x, baseline_y, analysis, ) } }).unwrap(); d_create_glyph_run_analysis.enable().unwrap(); let mut d_create_alpha_texture = DetourCreateAlphaTexture .initialize((*(*gla.as_raw()).lpVtbl).CreateAlphaTexture, { move |tramp, this, texture_type, texture_bounds, alpha_values, buffer_size| { dwrite::detour_create_alpha_texture( tramp, this, texture_type, texture_bounds, alpha_values, buffer_size, ) } }).unwrap(); d_create_alpha_texture.enable().unwrap(); let mut d_glyph_run_analysis_release = DetourGlyphRunAnalysisRelease .initialize( (*(*gla.as_raw()).lpVtbl).parent.Release, dwrite::detour_glyph_run_analysis_release, ).unwrap(); d_glyph_run_analysis_release.enable().unwrap(); let h_gdi32 = { let gdi32 = CString::new("gdi32.dll").unwrap(); libloaderapi::GetModuleHandleA(gdi32.as_ptr()) }; let TextOutW = { let s = CString::new("TextOutW").unwrap(); libloaderapi::GetProcAddress(h_gdi32, s.as_ptr()) }; let ExtTextOutW = { let s = CString::new("ExtTextOutW").unwrap(); libloaderapi::GetProcAddress(h_gdi32, s.as_ptr()) }; let mut d_ext_text_out_w = DetourExtTextOutW .initialize(mem::transmute(ExtTextOutW), { let dw_fac_3 = util::UnsafeSendSync::new(dw_fac_3.clone()); let d2d_fac = util::UnsafeSendSync::new(d2d_fac.clone()); let dw_gdi = util::UnsafeSendSync::new(dw_gdi.clone()); let create_glyph_run_analysis = mem::transmute(d_create_glyph_run_analysis_3.trampoline()); let get_alpha_texture_bounds = mem::transmute(d_get_alpha_texture_bounds.trampoline()); move |tramp, hdc, x, y, options, rect, s, c, dxs| { gdi::ext_text_out_w( dw_fac_3.as_ref().as_raw(), d2d_fac.as_ref().as_raw(), dw_gdi.as_ref().as_raw(), create_glyph_run_analysis, get_alpha_texture_bounds, tramp, hdc, x, y, options, rect, s, c, dxs, ) } }).unwrap(); d_ext_text_out_w.enable().unwrap(); let mut d_text_out_w = DetourTextOutW .initialize(mem::transmute(TextOutW), gdi::text_out_w) .unwrap(); d_text_out_w.enable().unwrap(); *DETOURS.lock().unwrap() = Some(Detours { d_create_alpha_texture, d_create_glyph_run_analysis, d_create_glyph_run_analysis_2, d_create_glyph_run_analysis_3, d_get_alpha_texture_bounds, d_glyph_run_analysis_release, d_ext_text_out_w, d_text_out_w, }) } Ok(()) } #[no_mangle] #[allow(non_snake_case, unused_variables)] pub extern "system" fn DllMain(_: HINSTANCE, reason: DWORD, _: LPVOID) -> BOOL { match reason { 0 => { let _ = DETOURS.lock().map(|mut v| v.take()); TRUE } 1 => match run() { Ok(_) => { unsafe { consoleapi::AllocConsole() }; println!("ok?"); TRUE } _ => FALSE, }, _ => TRUE, } }
//! This mutation is chosen when the element mutator is a “unit” mutator, //! meaning that it can only produce a single value. In this case, the //! vector mutator’s role is simply to choose a length. //! //! For example, if we have: //! ``` //! use fuzzcheck::{Mutator, DefaultMutator}; //! use fuzzcheck::mutators::vector::VecMutator; //! //! let m /* : impl Mutator<Vec<()>> */ = VecMutator::new(<()>::default_mutator(), 2..=5); //! ``` //! Then the values that `m` can produce are only: //! ```txt //! [(), ()] //! [(), (), ()] //! [(), (), (), ()] //! [(), (), (), (), ()] //! ``` //! and nothing else. //! //! We can detect if the element mutator is a unit mutator by calling //! `m.global_search_space_complexity()`. If the complexity is `0.0`, then the //! mutator is only capable of producing a single value. use super::VecMutator; use crate::mutators::mutations::{Mutation, RevertMutation}; use crate::{Mutator, SubValueProvider}; pub struct OnlyChooseLength; #[derive(Clone)] pub struct OnlyChooseLengthStep { length: usize, } #[derive(Clone)] pub struct OnlyChooseLengthRandomStep; pub struct ConcreteOnlyChooseLength { length: usize, } pub struct RevertOnlyChooseLength<T> { replace_by: Vec<T>, } impl<T, M> RevertMutation<Vec<T>, VecMutator<T, M>> for RevertOnlyChooseLength<T> where T: Clone + 'static, M: Mutator<T>, { #[no_coverage] fn revert( mut self, _mutator: &VecMutator<T, M>, value: &mut Vec<T>, _cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache, ) { std::mem::swap(value, &mut self.replace_by); } } impl<T, M> Mutation<Vec<T>, VecMutator<T, M>> for OnlyChooseLength where T: Clone + 'static, M: Mutator<T>, { type RandomStep = OnlyChooseLengthRandomStep; type Step = OnlyChooseLengthStep; type Concrete<'a> = ConcreteOnlyChooseLength; type Revert = RevertOnlyChooseLength<T>; #[no_coverage] fn default_random_step(&self, mutator: &VecMutator<T, M>, _value: &Vec<T>) -> Option<Self::RandomStep> { if mutator.m.global_search_space_complexity() <= 0.0 { Some(OnlyChooseLengthRandomStep) } else { None } } #[no_coverage] fn random<'a>( mutator: &VecMutator<T, M>, _value: &Vec<T>, _cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache, _random_step: &Self::RandomStep, max_cplx: f64, ) -> Self::Concrete<'a> { let cplx_element = mutator.m.min_complexity(); assert_eq!(cplx_element, mutator.m.max_complexity(), "A mutator of type {:?} has a global_search_space_complexity of 0.0 (indicating that it can produce only one value), but its min_complexity() is different than its max_complexity(), which is a contradiction.", std::any::type_name::<M>()); let cplx_element = if mutator.inherent_complexity { // then each element adds an additional 1.0 of complexity 1.0 + cplx_element } else { cplx_element }; let upperbound = std::cmp::max( std::cmp::min(*mutator.len_range.end(), ((max_cplx - 1.0) / cplx_element) as usize), *mutator.len_range.start(), ); ConcreteOnlyChooseLength { length: mutator.rng.usize(*mutator.len_range.start()..=upperbound), } } #[no_coverage] fn default_step( &self, mutator: &VecMutator<T, M>, _value: &Vec<T>, _cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache, ) -> Option<Self::Step> { if mutator.m.global_search_space_complexity() <= 0.0 { Some(OnlyChooseLengthStep { length: *mutator.len_range.start(), }) } else { None } } #[no_coverage] fn from_step<'a>( mutator: &VecMutator<T, M>, _value: &Vec<T>, _cache: &<VecMutator<T, M> as Mutator<Vec<T>>>::Cache, step: &'a mut Self::Step, _subvalue_provider: &dyn SubValueProvider, max_cplx: f64, ) -> Option<Self::Concrete<'a>> { let cplx_element = mutator.m.min_complexity(); if step.length <= *mutator.len_range.end() && mutator.complexity_from_inner(cplx_element * step.length as f64, step.length) < max_cplx { let x = ConcreteOnlyChooseLength { length: step.length }; step.length += 1; Some(x) } else { None } } #[no_coverage] fn apply<'a>( mutation: Self::Concrete<'a>, mutator: &VecMutator<T, M>, value: &mut Vec<T>, _cache: &mut <VecMutator<T, M> as Mutator<Vec<T>>>::Cache, _subvalue_provider: &dyn SubValueProvider, _max_cplx: f64, ) -> (Self::Revert, f64) { let (el, el_cplx) = mutator.m.random_arbitrary(0.0); let mut value_2 = std::iter::repeat(el).take(mutation.length).collect(); std::mem::swap(value, &mut value_2); let cplx = mutator.complexity_from_inner(el_cplx * mutation.length as f64, mutation.length); (RevertOnlyChooseLength { replace_by: value_2 }, cplx) } }
// 基础币 pub const CURRENCY : &'static str = "SWT"; //手续费 pub const FEE : u64 = 10000; //SECP256K1 加密算法对应的零号、一号地址 pub const ACCOUNT_ZERO : &'static str = "jjjjjjjjjjjjjjjjjjjjjhoLvTp"; pub const ACCOUNT_ONE : &'static str = "jjjjjjjjjjjjjjjjjjjjBZbvri"; //SM2P256V1 加密算法对应的零号、一号地址 pub const ACCOUNT_ZERO_SM2P256V1 : &'static str = "jjjjjjjjjjjjjjjjjjjjjn1TT5q"; //swt的issuer pub const ACCOUNT_ONE_SM2P256V1 : &'static str = "jjjjjjjjjjjjjjjjjjjjwVBfmE"; //占位地址
//! A 2D environment simulator, that let's you define the behavior and the shape //! of your entities, while taking care of dispatching events generation after //! generation. //! //! # Overview //! `semeion` is a library that was born out of the curiosity to see //! how to abstract those few concepts that are, most of the times, shared //! between very simple 2D games mostly focused on simulations, such as cellular //! automata or zero-player games. //! When writing such games, it's usually standard practice to rely on already //! existing game engines, which do a great job in abstracting the complexity of //! the event loop, graphic rendering system, or assets management; //! they all come in different flavors, but they mostly share the same concepts //! when it comes to event handling: the *update* callback allows you to define //! where the logic of your game will take place, and the *draw* callback allows //! you to define where the rendering of your entities is going to happen; //! finally the third main component regards the player's input events. //! //! This is great for the developer, the simplicity and feature richness of game //! engines such as [SFML](https://www.sfml-dev.org/) or [ggez](https://ggez.rs/), //! just to name a couple, allows many developers to write their own Atari Pong //! version and much more. //! //! But besides the event handling, the graphics rendering system, and the assets //! management, writing small games, especially when focusing on simulations //! and similar, most often involves another type of abstraction that //! is shared and re-implemented several times in each of these games variants: //! the entities management system and related components. //! //! This is where `semeion` takes place; it's a very basic framework that acts //! orthogonally to your game engine, and allows you to focus on the //! behavior of your entities, while it takes care of dispatching the entities //! related events during their own lifetime. //! //! With `semeion`, you can implement the generic [Entity](entity/trait.Entity.html) //! trait and define the behavior of your entities for each kind, and how they //! will interact with each other according to their scope of influence, //! location in the [Environment](env/struct.Environment.html), and lifetime. pub use entity::*; pub use env::*; pub use error::*; pub use math::*; pub use space::*; pub mod entity; pub mod env; pub mod error; pub mod math; pub mod space;
//! Capability module docs. use chain::PipelineStageFlags; bitflags! { /// Bitmask specifying capabilities of queues in a queue family. /// See Vulkan docs for detailed info: /// <https://www.khronos.org/registry/vulkan/specs/1.1-extensions/man/html/VkQueueFlagBits.html> #[repr(transparent)] pub struct CapabilityFlags: u32 { /// Queues from families with this capability flag set are able to perform graphics commands. const GRAPHICS = 0x00000001; /// Queues from families with this capability flag set are able to perform compute commands. const COMPUTE = 0x00000002; /// Queues from families with this capability flag set are able to perform transfer commands. const TRANSFER = 0x00000004; /// ??? const SPARSE_BINDING = 0x00000008; /// ??? const PROTECTED = 0x00000010; } } /// Capable of transfer only. #[derive(Clone, Copy, Debug)] pub struct Transfer; /// Capable of either compute or graphics commands execution. #[derive(Clone, Copy, Debug)] pub struct Execute; /// Capable of compute commands execution. #[derive(Clone, Copy, Debug)] pub struct Compute; /// Capable of graphics command execution. #[derive(Clone, Copy, Debug)] pub struct Graphics; /// Capable of any commands execution. #[derive(Clone, Copy, Debug)] pub struct General; /// Abstract capability specifier. pub trait Capability: Copy { /// Try to create capability instance from flags. /// Instance will be created if all required flags set. fn from_flags(flags: CapabilityFlags) -> Option<Self>; /// Convert into `CapabilityFlags` fn into_flags(self) -> CapabilityFlags; } impl Capability for CapabilityFlags { fn from_flags(flags: CapabilityFlags) -> Option<Self> { Some(flags) } fn into_flags(self) -> CapabilityFlags { self } } impl Capability for Transfer { fn from_flags(flags: CapabilityFlags) -> Option<Self> { if flags.contains(CapabilityFlags::TRANSFER) { Some(Transfer) } else { None } } fn into_flags(self) -> CapabilityFlags { CapabilityFlags::TRANSFER } } impl Capability for Execute { fn from_flags(flags: CapabilityFlags) -> Option<Self> { if flags.intersects(CapabilityFlags::COMPUTE | CapabilityFlags::GRAPHICS) { Some(Execute) } else { None } } fn into_flags(self) -> CapabilityFlags { CapabilityFlags::COMPUTE | CapabilityFlags::GRAPHICS } } impl Capability for Compute { fn from_flags(flags: CapabilityFlags) -> Option<Self> { if flags.contains(CapabilityFlags::COMPUTE) { Some(Compute) } else { None } } fn into_flags(self) -> CapabilityFlags { CapabilityFlags::COMPUTE } } impl Capability for Graphics { fn from_flags(flags: CapabilityFlags) -> Option<Self> { if flags.contains(CapabilityFlags::GRAPHICS) { Some(Graphics) } else { None } } fn into_flags(self) -> CapabilityFlags { CapabilityFlags::GRAPHICS } } impl Capability for General { fn from_flags(flags: CapabilityFlags) -> Option<Self> { if flags.contains(CapabilityFlags::GRAPHICS | CapabilityFlags::COMPUTE) { Some(General) } else { None } } fn into_flags(self) -> CapabilityFlags { CapabilityFlags::GRAPHICS | CapabilityFlags::COMPUTE } } /// Check if capability supported. pub trait Supports<C> { /// Check runtime capability. fn supports(&self) -> Option<C>; } impl Supports<Transfer> for Transfer { fn supports(&self) -> Option<Transfer> { Some(Transfer) } } impl Supports<Transfer> for Compute { fn supports(&self) -> Option<Transfer> { Some(Transfer) } } impl Supports<Transfer> for Graphics { fn supports(&self) -> Option<Transfer> { Some(Transfer) } } impl Supports<Transfer> for General { fn supports(&self) -> Option<Transfer> { Some(Transfer) } } impl Supports<Execute> for Compute { fn supports(&self) -> Option<Execute> { Some(Execute) } } impl Supports<Execute> for Graphics { fn supports(&self) -> Option<Execute> { Some(Execute) } } impl Supports<Execute> for General { fn supports(&self) -> Option<Execute> { Some(Execute) } } impl Supports<Compute> for Compute { fn supports(&self) -> Option<Compute> { Some(Compute) } } impl Supports<Compute> for General { fn supports(&self) -> Option<Compute> { Some(Compute) } } impl Supports<Graphics> for Graphics { fn supports(&self) -> Option<Graphics> { Some(Graphics) } } impl Supports<Graphics> for General { fn supports(&self) -> Option<Graphics> { Some(Graphics) } } impl Supports<Transfer> for CapabilityFlags { fn supports(&self) -> Option<Transfer> { Transfer::from_flags(*self) } } impl Supports<Execute> for CapabilityFlags { fn supports(&self) -> Option<Execute> { Execute::from_flags(*self) } } impl Supports<Compute> for CapabilityFlags { fn supports(&self) -> Option<Compute> { Compute::from_flags(*self) } } impl Supports<Graphics> for CapabilityFlags { fn supports(&self) -> Option<Graphics> { Graphics::from_flags(*self) } } /// Get capabilities required by pipeline stages. pub fn required_queue_capability(stages: PipelineStageFlags) -> CapabilityFlags { let mut capability = CapabilityFlags::empty(); if stages.contains(PipelineStageFlags::DRAW_INDIRECT) { capability |= CapabilityFlags::GRAPHICS | CapabilityFlags::COMPUTE; } if stages.contains(PipelineStageFlags::VERTEX_INPUT) { capability |= CapabilityFlags::GRAPHICS; } if stages.contains(PipelineStageFlags::VERTEX_SHADER) { capability |= CapabilityFlags::GRAPHICS; } if stages.contains(PipelineStageFlags::TESSELLATION_CONTROL_SHADER) { capability |= CapabilityFlags::GRAPHICS; } if stages.contains(PipelineStageFlags::TESSELLATION_EVALUATION_SHADER) { capability |= CapabilityFlags::GRAPHICS; } if stages.contains(PipelineStageFlags::GEOMETRY_SHADER) { capability |= CapabilityFlags::GRAPHICS; } if stages.contains(PipelineStageFlags::FRAGMENT_SHADER) { capability |= CapabilityFlags::GRAPHICS; } if stages.contains(PipelineStageFlags::EARLY_FRAGMENT_TESTS) { capability |= CapabilityFlags::GRAPHICS; } if stages.contains(PipelineStageFlags::LATE_FRAGMENT_TESTS) { capability |= CapabilityFlags::GRAPHICS; } if stages.contains(PipelineStageFlags::COLOR_ATTACHMENT_OUTPUT) { capability |= CapabilityFlags::GRAPHICS; } if stages.contains(PipelineStageFlags::COMPUTE_SHADER) { capability |= CapabilityFlags::COMPUTE; } if stages.contains(PipelineStageFlags::TRANSFER) { capability |= CapabilityFlags::GRAPHICS | CapabilityFlags::COMPUTE | CapabilityFlags::TRANSFER; } if stages.contains(PipelineStageFlags::ALL_GRAPHICS) { capability |= CapabilityFlags::GRAPHICS; } capability }
use super::error; use super::ztxt; use super::RawDmi; use image::imageops; use image::GenericImageView; use std::collections::HashMap; use std::io::prelude::*; use std::io::Cursor; use std::num::NonZeroU32; #[derive(Clone, Default, PartialEq, Debug)] pub struct Icon { pub version: DmiVersion, pub width: u32, pub height: u32, pub states: Vec<IconState>, } impl Icon { pub fn load<R: Read>(reader: R) -> Result<Icon, error::DmiError> { let raw_dmi = RawDmi::load(reader)?; let chunk_ztxt = match &raw_dmi.chunk_ztxt { Some(chunk) => chunk.clone(), None => { return Err(error::DmiError::Generic( "Error loading icon: no zTXt chunk found.".to_string(), )) } }; let decompressed_text = chunk_ztxt.data.decode()?; let decompressed_text = String::from_utf8(decompressed_text)?; let mut decompressed_text = decompressed_text.lines(); let current_line = decompressed_text.next(); if current_line != Some("# BEGIN DMI") { return Err(error::DmiError::Generic(format!( "Error loading icon: no DMI header found. Beginning: {:#?}", current_line ))); }; let current_line = match decompressed_text.next() { Some(thing) => thing, None => { return Err(error::DmiError::Generic( "Error loading icon: no version header found.".to_string(), )) } }; let split_version: Vec<&str> = current_line.split_terminator(" = ").collect(); if split_version.len() != 2 || split_version[0] != "version" { return Err(error::DmiError::Generic(format!( "Error loading icon: improper version header found: {:#?}", split_version ))); }; let version = split_version[1].to_string(); let current_line = match decompressed_text.next() { Some(thing) => thing, None => { return Err(error::DmiError::Generic( "Error loading icon: no width found.".to_string(), )) } }; let split_version: Vec<&str> = current_line.split_terminator(" = ").collect(); if split_version.len() != 2 || split_version[0] != "\twidth" { return Err(error::DmiError::Generic(format!( "Error loading icon: improper width found: {:#?}", split_version ))); }; let width = split_version[1].parse::<u32>()?; let current_line = match decompressed_text.next() { Some(thing) => thing, None => { return Err(error::DmiError::Generic( "Error loading icon: no height found.".to_string(), )) } }; let split_version: Vec<&str> = current_line.split_terminator(" = ").collect(); if split_version.len() != 2 || split_version[0] != "\theight" { return Err(error::DmiError::Generic(format!( "Error loading icon: improper height found: {:#?}", split_version ))); }; let height = split_version[1].parse::<u32>()?; if width == 0 || height == 0 { return Err(error::DmiError::Generic(format!( "Error loading icon: invalid width ({}) / height ({}) values.", width, height ))); }; // Image time. let mut reader = vec![]; raw_dmi.save(&mut reader)?; let base_image = image::load_from_memory_with_format(&reader, image::ImageFormat::Png)?; let dimensions = base_image.dimensions(); let img_width = dimensions.0; let img_height = dimensions.1; if img_width == 0 || img_height == 0 || img_width % width != 0 || img_height % height != 0 { return Err(error::DmiError::Generic(format!("Error loading icon: invalid image width ({}) / height ({}) values. Missmatch with metadata width ({}) / height ({}).", img_width, img_height, width, height))); }; let width_in_states = img_width / width; let height_in_states = img_height / height; let max_possible_states = width_in_states * height_in_states; let mut index = 0; let mut current_line = match decompressed_text.next() { Some(thing) => thing, None => { return Err(error::DmiError::Generic( "Error loading icon: no DMI trailer nor states found.".to_string(), )) } }; let mut states = vec![]; loop { if current_line.contains("# END DMI") { break; }; let split_version: Vec<&str> = current_line.split_terminator(" = ").collect(); if split_version.len() != 2 || split_version[0] != "state" { return Err(error::DmiError::Generic(format!( "Error loading icon: improper state found: {:#?}", split_version ))); }; let name = split_version[1].as_bytes(); if !name.starts_with(&[b'\"']) || !name.ends_with(&[b'\"']) { return Err(error::DmiError::Generic(format!("Error loading icon: invalid name icon_state found in metadata, should be preceded and succeeded by double-quotes (\"): {:#?}", name))); }; let name = match name.len() { 0 | 1 => { return Err(error::DmiError::Generic(format!( "Error loading icon: invalid name icon_state found in metadata, improper size: {:#?}", name ))) } 2 => String::new(), //Only the quotes, empty name otherwise. length => String::from_utf8(name[1..(length - 1)].to_vec())?, //Hacky way to trim. Blame the cool methods being nightly experimental. }; let mut dirs = None; let mut frames = None; let mut delay = None; let mut loop_flag = Looping::Indefinitely; let mut rewind = false; let mut movement = false; let mut hotspot = None; let mut unknown_settings = None; loop { current_line = match decompressed_text.next() { Some(thing) => thing, None => { return Err(error::DmiError::Generic( "Error loading icon: no DMI trailer found.".to_string(), )) } }; if current_line.contains("# END DMI") || current_line.contains("state = \"") { break; }; let split_version: Vec<&str> = current_line.split_terminator(" = ").collect(); if split_version.len() != 2 { return Err(error::DmiError::Generic(format!( "Error loading icon: improper state found: {:#?}", split_version ))); }; match split_version[0] { "\tdirs" => dirs = Some(split_version[1].parse::<u8>()?), "\tframes" => frames = Some(split_version[1].parse::<u32>()?), "\tdelay" => { let mut delay_vector = vec![]; let text_delays = split_version[1].split_terminator(','); for text_entry in text_delays { delay_vector.push(text_entry.parse::<f32>()?); } delay = Some(delay_vector); } "\tloop" => loop_flag = Looping::new(split_version[1].parse::<u32>()?), "\trewind" => rewind = split_version[1].parse::<u8>()? != 0, "\tmovement" => movement = split_version[1].parse::<u8>()? != 0, "\thotspot" => { let text_coordinates: Vec<&str> = split_version[1].split_terminator(',').collect(); // Hotspot includes a mysterious 3rd parameter that always seems to be 1. if text_coordinates.len() != 3 { return Err(error::DmiError::Generic(format!( "Error loading icon: improper hotspot found: {:#?}", split_version ))); }; hotspot = Some(Hotspot { x: text_coordinates[0].parse::<u32>()?, y: text_coordinates[1].parse::<u32>()?, }); } _ => { unknown_settings = match unknown_settings { None => { let mut new_map = HashMap::new(); new_map.insert(split_version[0].to_string(), split_version[1].to_string()); Some(new_map) } Some(mut thing) => { thing.insert(split_version[0].to_string(), split_version[1].to_string()); Some(thing) } }; } }; } if dirs.is_none() || frames.is_none() { return Err(error::DmiError::Generic(format!( "Error loading icon: state lacks essential settings. dirs: {:#?}. frames: {:#?}.", dirs, frames ))); }; let dirs = dirs.unwrap(); let frames = frames.unwrap(); if index + (dirs as u32 * frames) > max_possible_states { return Err(error::DmiError::Generic(format!("Error loading icon: metadata settings exceeded the maximum number of states possible ({}).", max_possible_states))); }; let mut images = vec![]; for _frame in 0..frames { for _dir in 0..dirs { let x = (index % width_in_states) * width; //This operation rounds towards zero, truncating any fractional part of the exact result, essentially a floor() function. let y = (index / width_in_states) * height; images.push(base_image.crop_imm(x, y, width, height)); index += 1; } } states.push(IconState { name, dirs, frames, images, delay, loop_flag, rewind, movement, hotspot, unknown_settings, }); } Ok(Icon { version: DmiVersion(version), width, height, states, }) } pub fn save<W: Write>(&self, mut writter: &mut W) -> Result<usize, error::DmiError> { let mut sprites = vec![]; let mut signature = format!( "# BEGIN DMI\nversion = {}\n\twidth = {}\n\theight = {}\n", self.version.0, self.width, self.height ); for icon_state in &self.states { if icon_state.images.len() as u32 != icon_state.dirs as u32 * icon_state.frames { return Err(error::DmiError::Generic(format!("Error saving Icon: number of images ({}) differs from the stated metadata. Dirs: {}. Frames: {}. Name: \"{}\".", icon_state.images.len(), icon_state.dirs, icon_state.frames, icon_state.name))); }; signature.push_str(&format!( "state = \"{}\"\n\tdirs = {}\n\tframes = {}\n", icon_state.name, icon_state.dirs, icon_state.frames )); if icon_state.frames > 1 { match &icon_state.delay { Some(delay) => { if delay.len() as u32 != icon_state.frames { return Err(error::DmiError::Generic(format!("Error saving Icon: number of frames ({}) differs from the delay entry ({:3?}). Name: \"{}\".", icon_state.frames, delay, icon_state.name))) }; let delay: Vec<String>= delay.iter().map(|&c| c.to_string()).collect(); signature.push_str(&format!("\tdelay = {}\n", delay.join(","))); }, None => return Err(error::DmiError::Generic(format!("Error saving Icon: number of frames ({}) larger than one without a delay entry in icon state of name \"{}\".", icon_state.frames, icon_state.name))) }; if let Looping::NTimes(flag) = icon_state.loop_flag { signature.push_str(&format!("\tloop = {}\n", flag)) } if icon_state.rewind { signature.push_str("\trewind = 1\n"); } if icon_state.movement { signature.push_str("\tmovement = 1\n"); } }; if let Some(Hotspot { x, y }) = icon_state.hotspot { signature.push_str(&format!( // Mysterious third parameter here doesn't seem to do anything. Unable to find // any example of it not being 1. "\thotspot = {x},{y},1\n" )) }; match &icon_state.unknown_settings { Some(hashmap) => { for (setting, value) in hashmap.iter() { signature.push_str(&format!("\t{} = {}\n", setting, value)); } } None => (), }; sprites.extend(icon_state.images.iter()); } signature.push_str("# END DMI\n"); let max_index = (sprites.len() as f64).sqrt().ceil() as u32; let mut new_png = image::DynamicImage::new_rgba8(max_index * self.width, max_index * self.height); for image in sprites.iter().enumerate() { let index = image.0 as u32; let image = image.1; imageops::replace( &mut new_png, *image, (self.width * (index % max_index)).into(), (self.height * (index / max_index)).into(), ); } let mut dmi_data = Cursor::new(vec![]); new_png.write_to(&mut dmi_data, image::ImageOutputFormat::Png)?; let mut new_dmi = RawDmi::load(&dmi_data.into_inner()[..])?; let new_ztxt = ztxt::create_ztxt_chunk(signature.as_bytes())?; new_dmi.chunk_ztxt = Some(new_ztxt); new_dmi.save(&mut writter) } } /// Represents the Looping flag in an [IconState], which is used to determine how to loop an /// animated [IconState] /// /// - `Indefinitely`: Loop repeatedly as long as the [IconState] is displayed /// - `NTimes(NonZeroU32)`: Loop N times before freezing on the final frame. Stored as a `NonZeroU32` /// for memory efficiency reasons, looping 0 times is an invalid state. /// /// This type is effectively a newtype of `Option<NonZeroU32>`. As such, `From<Looping>` is /// implemented for `Option<NonZeroU32>` as well as `Option<u32>`. If the more advanced combinators /// or `?` operator of the native `Option` type are desired, this type can be `into` either /// previously mentioned types. #[derive(Copy, Clone, Eq, PartialEq, Debug, Default)] pub enum Looping { #[default] Indefinitely, NTimes(NonZeroU32), } impl Looping { /// Creates a new `NTimes` variant with `x` number of times to loop pub fn new(x: u32) -> Self { Self::NTimes(NonZeroU32::new(x).unwrap()) } /// Unwraps the Looping yielding the `u32` if the `Looping` is a `Looping::NTimes` /// # Panics /// Panics if `self` is `Looping::Indefinitely` pub fn unwrap(self) -> u32 { match self { Self::NTimes(times) => times.get(), _ => panic!("Attempted to unwrap a looping that was indefinite"), } } /// Unwraps the Looping yielding the `u32` if the `Looping` is an `NTimes` /// If the `Looping` is an `Indefinitely`, yields `u32::default()` which is 0 pub fn unwrap_or_default(self) -> u32 { match self { Self::NTimes(times) => times.get(), _ => u32::default(), // 0 } } /// Unwraps the Looping yielding the `u32` if the `Looping` is an `NTimes` /// If the `Looping` is an `Indefinitely`, yields the value provided as `default` pub fn unwrap_or(self, default: u32) -> u32 { match self { Self::NTimes(times) => times.get(), _ => default, } } } impl From<Looping> for Option<u32> { fn from(value: Looping) -> Self { match value { Looping::Indefinitely => None, Looping::NTimes(backing) => Some(backing.get()), } } } impl From<Looping> for Option<NonZeroU32> { fn from(value: Looping) -> Self { match value { Looping::Indefinitely => None, Looping::NTimes(backing) => Some(backing), } } } /// Represents a "Hotspot" as used by an [IconState]. A "Hotspot" is a marked pixel on an [IconState] /// which is used as the click location when the [IconState] is used as a cursor. The default cursor /// places it at the tip, but a crosshair may want to have it centered. /// /// Note that "y" is inverted from standard image axes, bottom left of the sprite is used as 0 and /// y increases as you move upwards. #[derive(Copy, Clone, Eq, PartialEq, Debug, Default)] pub struct Hotspot { pub x: u32, pub y: u32, } #[derive(Clone, PartialEq, Debug)] pub struct IconState { pub name: String, pub dirs: u8, pub frames: u32, pub images: Vec<image::DynamicImage>, pub delay: Option<Vec<f32>>, pub loop_flag: Looping, pub rewind: bool, pub movement: bool, pub hotspot: Option<Hotspot>, pub unknown_settings: Option<HashMap<String, String>>, } impl Default for IconState { fn default() -> Self { IconState { name: String::new(), dirs: 1, frames: 1, images: vec![], delay: None, loop_flag: Looping::Indefinitely, rewind: false, movement: false, hotspot: None, unknown_settings: None, } } } #[derive(Clone, Eq, PartialEq, Hash, Debug)] pub struct DmiVersion(String); impl Default for DmiVersion { fn default() -> Self { DmiVersion("4.0".to_string()) } }
pub mod routes; pub mod errors;
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BSTRBLOB { pub cbSize: u32, pub pData: *mut u8, } impl BSTRBLOB {} impl ::core::default::Default for BSTRBLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BSTRBLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BSTRBLOB").field("cbSize", &self.cbSize).field("pData", &self.pData).finish() } } impl ::core::cmp::PartialEq for BSTRBLOB { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pData == other.pData } } impl ::core::cmp::Eq for BSTRBLOB {} unsafe impl ::windows::core::Abi for BSTRBLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CABOOL { pub cElems: u32, pub pElems: *mut i16, } impl CABOOL {} impl ::core::default::Default for CABOOL { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CABOOL { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CABOOL").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CABOOL { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CABOOL {} unsafe impl ::windows::core::Abi for CABOOL { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CABSTR { pub cElems: u32, pub pElems: *mut super::super::super::Foundation::BSTR, } #[cfg(feature = "Win32_Foundation")] impl CABSTR {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CABSTR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CABSTR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CABSTR").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CABSTR { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CABSTR {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CABSTR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CABSTRBLOB { pub cElems: u32, pub pElems: *mut BSTRBLOB, } impl CABSTRBLOB {} impl ::core::default::Default for CABSTRBLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CABSTRBLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CABSTRBLOB").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CABSTRBLOB { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CABSTRBLOB {} unsafe impl ::windows::core::Abi for CABSTRBLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CAC { pub cElems: u32, pub pElems: super::super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl CAC {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CAC { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CAC { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CAC").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CAC { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CAC {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CAC { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CACLIPDATA { pub cElems: u32, pub pElems: *mut CLIPDATA, } impl CACLIPDATA {} impl ::core::default::Default for CACLIPDATA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CACLIPDATA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CACLIPDATA").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CACLIPDATA { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CACLIPDATA {} unsafe impl ::windows::core::Abi for CACLIPDATA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CACLSID { pub cElems: u32, pub pElems: *mut ::windows::core::GUID, } impl CACLSID {} impl ::core::default::Default for CACLSID { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CACLSID { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CACLSID").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CACLSID { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CACLSID {} unsafe impl ::windows::core::Abi for CACLSID { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CACY { pub cElems: u32, pub pElems: *mut super::CY, } impl CACY {} impl ::core::default::Default for CACY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CACY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CACY").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CACY { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CACY {} unsafe impl ::windows::core::Abi for CACY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CADATE { pub cElems: u32, pub pElems: *mut f64, } impl CADATE {} impl ::core::default::Default for CADATE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CADATE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CADATE").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CADATE { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CADATE {} unsafe impl ::windows::core::Abi for CADATE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CADBL { pub cElems: u32, pub pElems: *mut f64, } impl CADBL {} impl ::core::default::Default for CADBL { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CADBL { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CADBL").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CADBL { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CADBL {} unsafe impl ::windows::core::Abi for CADBL { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CAFILETIME { pub cElems: u32, pub pElems: *mut super::super::super::Foundation::FILETIME, } #[cfg(feature = "Win32_Foundation")] impl CAFILETIME {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CAFILETIME { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CAFILETIME { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CAFILETIME").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CAFILETIME { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CAFILETIME {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CAFILETIME { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CAFLT { pub cElems: u32, pub pElems: *mut f32, } impl CAFLT {} impl ::core::default::Default for CAFLT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CAFLT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CAFLT").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CAFLT { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CAFLT {} unsafe impl ::windows::core::Abi for CAFLT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CAH { pub cElems: u32, pub pElems: *mut i64, } impl CAH {} impl ::core::default::Default for CAH { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CAH { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CAH").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CAH { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CAH {} unsafe impl ::windows::core::Abi for CAH { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CAI { pub cElems: u32, pub pElems: *mut i16, } impl CAI {} impl ::core::default::Default for CAI { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CAI { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CAI").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CAI { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CAI {} unsafe impl ::windows::core::Abi for CAI { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CAL { pub cElems: u32, pub pElems: *mut i32, } impl CAL {} impl ::core::default::Default for CAL { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CAL { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CAL").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CAL { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CAL {} unsafe impl ::windows::core::Abi for CAL { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CALPSTR { pub cElems: u32, pub pElems: *mut super::super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl CALPSTR {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CALPSTR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CALPSTR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CALPSTR").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CALPSTR { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CALPSTR {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CALPSTR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CALPWSTR { pub cElems: u32, pub pElems: *mut super::super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CALPWSTR {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CALPWSTR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CALPWSTR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CALPWSTR").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CALPWSTR { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CALPWSTR {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CALPWSTR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CAPROPVARIANT { pub cElems: u32, pub pElems: *mut PROPVARIANT, } #[cfg(feature = "Win32_Foundation")] impl CAPROPVARIANT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CAPROPVARIANT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CAPROPVARIANT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CAPROPVARIANT").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CAPROPVARIANT { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CAPROPVARIANT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CAPROPVARIANT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CASCODE { pub cElems: u32, pub pElems: *mut i32, } impl CASCODE {} impl ::core::default::Default for CASCODE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CASCODE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CASCODE").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CASCODE { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CASCODE {} unsafe impl ::windows::core::Abi for CASCODE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CAUB { pub cElems: u32, pub pElems: *mut u8, } impl CAUB {} impl ::core::default::Default for CAUB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CAUB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CAUB").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CAUB { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CAUB {} unsafe impl ::windows::core::Abi for CAUB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CAUH { pub cElems: u32, pub pElems: *mut u64, } impl CAUH {} impl ::core::default::Default for CAUH { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CAUH { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CAUH").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CAUH { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CAUH {} unsafe impl ::windows::core::Abi for CAUH { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CAUI { pub cElems: u32, pub pElems: *mut u16, } impl CAUI {} impl ::core::default::Default for CAUI { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CAUI { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CAUI").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CAUI { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CAUI {} unsafe impl ::windows::core::Abi for CAUI { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CAUL { pub cElems: u32, pub pElems: *mut u32, } impl CAUL {} impl ::core::default::Default for CAUL { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CAUL { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CAUL").field("cElems", &self.cElems).field("pElems", &self.pElems).finish() } } impl ::core::cmp::PartialEq for CAUL { fn eq(&self, other: &Self) -> bool { self.cElems == other.cElems && self.pElems == other.pElems } } impl ::core::cmp::Eq for CAUL {} unsafe impl ::windows::core::Abi for CAUL { type Abi = Self; } pub const CCH_MAX_PROPSTG_NAME: u32 = 31u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CLIPDATA { pub cbSize: u32, pub ulClipFmt: i32, pub pClipData: *mut u8, } impl CLIPDATA {} impl ::core::default::Default for CLIPDATA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CLIPDATA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CLIPDATA").field("cbSize", &self.cbSize).field("ulClipFmt", &self.ulClipFmt).field("pClipData", &self.pClipData).finish() } } impl ::core::cmp::PartialEq for CLIPDATA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.ulClipFmt == other.ulClipFmt && self.pClipData == other.pClipData } } impl ::core::cmp::Eq for CLIPDATA {} unsafe impl ::windows::core::Abi for CLIPDATA { type Abi = Self; } pub const CWCSTORAGENAME: u32 = 32u32; #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CoGetInstanceFromFile<'a, Param2: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>, Param5: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pserverinfo: *const super::COSERVERINFO, pclsid: *const ::windows::core::GUID, punkouter: Param2, dwclsctx: super::CLSCTX, grfmode: u32, pwszname: Param5, dwcount: u32, presults: *mut super::MULTI_QI) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CoGetInstanceFromFile(pserverinfo: *const super::COSERVERINFO, pclsid: *const ::windows::core::GUID, punkouter: ::windows::core::RawPtr, dwclsctx: super::CLSCTX, grfmode: u32, pwszname: super::super::super::Foundation::PWSTR, dwcount: u32, presults: *mut ::core::mem::ManuallyDrop<super::MULTI_QI>) -> ::windows::core::HRESULT; } CoGetInstanceFromFile(::core::mem::transmute(pserverinfo), ::core::mem::transmute(pclsid), punkouter.into_param().abi(), ::core::mem::transmute(dwclsctx), ::core::mem::transmute(grfmode), pwszname.into_param().abi(), ::core::mem::transmute(dwcount), ::core::mem::transmute(presults)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CoGetInstanceFromIStorage<'a, Param2: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>, Param4: ::windows::core::IntoParam<'a, IStorage>>(pserverinfo: *const super::COSERVERINFO, pclsid: *const ::windows::core::GUID, punkouter: Param2, dwclsctx: super::CLSCTX, pstg: Param4, dwcount: u32, presults: *mut super::MULTI_QI) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CoGetInstanceFromIStorage(pserverinfo: *const super::COSERVERINFO, pclsid: *const ::windows::core::GUID, punkouter: ::windows::core::RawPtr, dwclsctx: super::CLSCTX, pstg: ::windows::core::RawPtr, dwcount: u32, presults: *mut ::core::mem::ManuallyDrop<super::MULTI_QI>) -> ::windows::core::HRESULT; } CoGetInstanceFromIStorage(::core::mem::transmute(pserverinfo), ::core::mem::transmute(pclsid), punkouter.into_param().abi(), ::core::mem::transmute(dwclsctx), pstg.into_param().abi(), ::core::mem::transmute(dwcount), ::core::mem::transmute(presults)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CoGetInterfaceAndReleaseStream<'a, Param0: ::windows::core::IntoParam<'a, super::IStream>, T: ::windows::core::Interface>(pstm: Param0) -> ::windows::core::Result<T> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CoGetInterfaceAndReleaseStream(pstm: ::windows::core::RawPtr, iid: *const ::windows::core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT; } let mut result__ = ::core::option::Option::None; CoGetInterfaceAndReleaseStream(pstm.into_param().abi(), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CreateILockBytesOnHGlobal<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(hglobal: isize, fdeleteonrelease: Param1) -> ::windows::core::Result<ILockBytes> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CreateILockBytesOnHGlobal(hglobal: isize, fdeleteonrelease: super::super::super::Foundation::BOOL, pplkbyt: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <ILockBytes as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); CreateILockBytesOnHGlobal(::core::mem::transmute(hglobal), fdeleteonrelease.into_param().abi(), &mut result__).from_abi::<ILockBytes>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CreateStreamOnHGlobal<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(hglobal: isize, fdeleteonrelease: Param1) -> ::windows::core::Result<super::IStream> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CreateStreamOnHGlobal(hglobal: isize, fdeleteonrelease: super::super::super::Foundation::BOOL, ppstm: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <super::IStream as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); CreateStreamOnHGlobal(::core::mem::transmute(hglobal), fdeleteonrelease.into_param().abi(), &mut result__).from_abi::<super::IStream>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn FmtIdToPropStgName(pfmtid: *const ::windows::core::GUID, oszname: super::super::super::Foundation::PWSTR) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn FmtIdToPropStgName(pfmtid: *const ::windows::core::GUID, oszname: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT; } FmtIdToPropStgName(::core::mem::transmute(pfmtid), ::core::mem::transmute(oszname)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn FreePropVariantArray(cvariants: u32, rgvars: *mut PROPVARIANT) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn FreePropVariantArray(cvariants: u32, rgvars: *mut ::core::mem::ManuallyDrop<PROPVARIANT>) -> ::windows::core::HRESULT; } FreePropVariantArray(::core::mem::transmute(cvariants), ::core::mem::transmute(rgvars)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn GetConvertStg<'a, Param0: ::windows::core::IntoParam<'a, IStorage>>(pstg: Param0) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn GetConvertStg(pstg: ::windows::core::RawPtr) -> ::windows::core::HRESULT; } GetConvertStg(pstg.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn GetHGlobalFromILockBytes<'a, Param0: ::windows::core::IntoParam<'a, ILockBytes>>(plkbyt: Param0) -> ::windows::core::Result<isize> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn GetHGlobalFromILockBytes(plkbyt: ::windows::core::RawPtr, phglobal: *mut isize) -> ::windows::core::HRESULT; } let mut result__: <isize as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); GetHGlobalFromILockBytes(plkbyt.into_param().abi(), &mut result__).from_abi::<isize>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn GetHGlobalFromStream<'a, Param0: ::windows::core::IntoParam<'a, super::IStream>>(pstm: Param0) -> ::windows::core::Result<isize> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn GetHGlobalFromStream(pstm: ::windows::core::RawPtr, phglobal: *mut isize) -> ::windows::core::HRESULT; } let mut result__: <isize as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); GetHGlobalFromStream(pstm.into_param().abi(), &mut result__).from_abi::<isize>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IDirectWriterLock(pub ::windows::core::IUnknown); impl IDirectWriterLock { pub unsafe fn WaitForWriteAccess(&self, dwtimeout: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwtimeout)).ok() } pub unsafe fn ReleaseWriteAccess(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn HaveWriteAccess(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IDirectWriterLock { type Vtable = IDirectWriterLock_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0e6d4d92_6738_11cf_9608_00aa00680db4); } impl ::core::convert::From<IDirectWriterLock> for ::windows::core::IUnknown { fn from(value: IDirectWriterLock) -> Self { value.0 } } impl ::core::convert::From<&IDirectWriterLock> for ::windows::core::IUnknown { fn from(value: &IDirectWriterLock) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IDirectWriterLock { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IDirectWriterLock { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IDirectWriterLock_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwtimeout: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IEnumSTATPROPSETSTG(pub ::windows::core::IUnknown); impl IEnumSTATPROPSETSTG { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Next(&self, celt: u32, rgelt: *mut STATPROPSETSTG, pceltfetched: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(celt), ::core::mem::transmute(rgelt), ::core::mem::transmute(pceltfetched)).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(celt)).ok() } pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Clone(&self) -> ::windows::core::Result<IEnumSTATPROPSETSTG> { let mut result__: <IEnumSTATPROPSETSTG as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IEnumSTATPROPSETSTG>(result__) } } unsafe impl ::windows::core::Interface for IEnumSTATPROPSETSTG { type Vtable = IEnumSTATPROPSETSTG_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0000013b_0000_0000_c000_000000000046); } impl ::core::convert::From<IEnumSTATPROPSETSTG> for ::windows::core::IUnknown { fn from(value: IEnumSTATPROPSETSTG) -> Self { value.0 } } impl ::core::convert::From<&IEnumSTATPROPSETSTG> for ::windows::core::IUnknown { fn from(value: &IEnumSTATPROPSETSTG) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IEnumSTATPROPSETSTG { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IEnumSTATPROPSETSTG { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IEnumSTATPROPSETSTG_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, celt: u32, rgelt: *mut STATPROPSETSTG, pceltfetched: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, celt: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppenum: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IEnumSTATPROPSTG(pub ::windows::core::IUnknown); impl IEnumSTATPROPSTG { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Next(&self, celt: u32, rgelt: *mut STATPROPSTG, pceltfetched: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(celt), ::core::mem::transmute(rgelt), ::core::mem::transmute(pceltfetched)).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(celt)).ok() } pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Clone(&self) -> ::windows::core::Result<IEnumSTATPROPSTG> { let mut result__: <IEnumSTATPROPSTG as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IEnumSTATPROPSTG>(result__) } } unsafe impl ::windows::core::Interface for IEnumSTATPROPSTG { type Vtable = IEnumSTATPROPSTG_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x00000139_0000_0000_c000_000000000046); } impl ::core::convert::From<IEnumSTATPROPSTG> for ::windows::core::IUnknown { fn from(value: IEnumSTATPROPSTG) -> Self { value.0 } } impl ::core::convert::From<&IEnumSTATPROPSTG> for ::windows::core::IUnknown { fn from(value: &IEnumSTATPROPSTG) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IEnumSTATPROPSTG { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IEnumSTATPROPSTG { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IEnumSTATPROPSTG_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, celt: u32, rgelt: *mut STATPROPSTG, pceltfetched: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, celt: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppenum: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IEnumSTATSTG(pub ::windows::core::IUnknown); impl IEnumSTATSTG { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Next(&self, celt: u32, rgelt: *mut super::STATSTG, pceltfetched: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(celt), ::core::mem::transmute(rgelt), ::core::mem::transmute(pceltfetched)).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(celt)).ok() } pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Clone(&self) -> ::windows::core::Result<IEnumSTATSTG> { let mut result__: <IEnumSTATSTG as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IEnumSTATSTG>(result__) } } unsafe impl ::windows::core::Interface for IEnumSTATSTG { type Vtable = IEnumSTATSTG_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0000000d_0000_0000_c000_000000000046); } impl ::core::convert::From<IEnumSTATSTG> for ::windows::core::IUnknown { fn from(value: IEnumSTATSTG) -> Self { value.0 } } impl ::core::convert::From<&IEnumSTATSTG> for ::windows::core::IUnknown { fn from(value: &IEnumSTATSTG) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IEnumSTATSTG { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IEnumSTATSTG { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IEnumSTATSTG_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, celt: u32, rgelt: *mut super::STATSTG, pceltfetched: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, celt: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppenum: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IFillLockBytes(pub ::windows::core::IUnknown); impl IFillLockBytes { pub unsafe fn FillAppend(&self, pv: *const ::core::ffi::c_void, cb: u32) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(pv), ::core::mem::transmute(cb), &mut result__).from_abi::<u32>(result__) } pub unsafe fn FillAt(&self, uloffset: u64, pv: *const ::core::ffi::c_void, cb: u32) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(uloffset), ::core::mem::transmute(pv), ::core::mem::transmute(cb), &mut result__).from_abi::<u32>(result__) } pub unsafe fn SetFillSize(&self, ulsize: u64) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(ulsize)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Terminate<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(&self, bcanceled: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), bcanceled.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IFillLockBytes { type Vtable = IFillLockBytes_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x99caf010_415e_11cf_8814_00aa00b569f5); } impl ::core::convert::From<IFillLockBytes> for ::windows::core::IUnknown { fn from(value: IFillLockBytes) -> Self { value.0 } } impl ::core::convert::From<&IFillLockBytes> for ::windows::core::IUnknown { fn from(value: &IFillLockBytes) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IFillLockBytes { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IFillLockBytes { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IFillLockBytes_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pv: *const ::core::ffi::c_void, cb: u32, pcbwritten: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uloffset: u64, pv: *const ::core::ffi::c_void, cb: u32, pcbwritten: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ulsize: u64) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bcanceled: super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ILayoutStorage(pub ::windows::core::IUnknown); impl ILayoutStorage { #[cfg(feature = "Win32_Foundation")] pub unsafe fn LayoutScript(&self, pstoragelayout: *const super::StorageLayout, nentries: u32, glfinterleavedflag: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(pstoragelayout), ::core::mem::transmute(nentries), ::core::mem::transmute(glfinterleavedflag)).ok() } pub unsafe fn BeginMonitor(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn EndMonitor(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ReLayoutDocfile<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pwcsnewdfname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pwcsnewdfname.into_param().abi()).ok() } pub unsafe fn ReLayoutDocfileOnILockBytes<'a, Param0: ::windows::core::IntoParam<'a, ILockBytes>>(&self, pilockbytes: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), pilockbytes.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for ILayoutStorage { type Vtable = ILayoutStorage_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0e6d4d90_6738_11cf_9608_00aa00680db4); } impl ::core::convert::From<ILayoutStorage> for ::windows::core::IUnknown { fn from(value: ILayoutStorage) -> Self { value.0 } } impl ::core::convert::From<&ILayoutStorage> for ::windows::core::IUnknown { fn from(value: &ILayoutStorage) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ILayoutStorage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ILayoutStorage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ILayoutStorage_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstoragelayout: *const super::StorageLayout, nentries: u32, glfinterleavedflag: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pwcsnewdfname: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pilockbytes: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ILockBytes(pub ::windows::core::IUnknown); impl ILockBytes { pub unsafe fn ReadAt(&self, uloffset: u64, pv: *mut ::core::ffi::c_void, cb: u32, pcbread: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(uloffset), ::core::mem::transmute(pv), ::core::mem::transmute(cb), ::core::mem::transmute(pcbread)).ok() } pub unsafe fn WriteAt(&self, uloffset: u64, pv: *const ::core::ffi::c_void, cb: u32) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(uloffset), ::core::mem::transmute(pv), ::core::mem::transmute(cb), &mut result__).from_abi::<u32>(result__) } pub unsafe fn Flush(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetSize(&self, cb: u64) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(cb)).ok() } pub unsafe fn LockRegion(&self, liboffset: u64, cb: u64, dwlocktype: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(liboffset), ::core::mem::transmute(cb), ::core::mem::transmute(dwlocktype)).ok() } pub unsafe fn UnlockRegion(&self, liboffset: u64, cb: u64, dwlocktype: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(liboffset), ::core::mem::transmute(cb), ::core::mem::transmute(dwlocktype)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Stat(&self, pstatstg: *mut super::STATSTG, grfstatflag: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(pstatstg), ::core::mem::transmute(grfstatflag)).ok() } } unsafe impl ::windows::core::Interface for ILockBytes { type Vtable = ILockBytes_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0000000a_0000_0000_c000_000000000046); } impl ::core::convert::From<ILockBytes> for ::windows::core::IUnknown { fn from(value: ILockBytes) -> Self { value.0 } } impl ::core::convert::From<&ILockBytes> for ::windows::core::IUnknown { fn from(value: &ILockBytes) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ILockBytes { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ILockBytes { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ILockBytes_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uloffset: u64, pv: *mut ::core::ffi::c_void, cb: u32, pcbread: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uloffset: u64, pv: *const ::core::ffi::c_void, cb: u32, pcbwritten: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cb: u64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, liboffset: u64, cb: u64, dwlocktype: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, liboffset: u64, cb: u64, dwlocktype: u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstatstg: *mut super::STATSTG, grfstatflag: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IPersistStorage(pub ::windows::core::IUnknown); impl IPersistStorage { pub unsafe fn GetClassID(&self) -> ::windows::core::Result<::windows::core::GUID> { let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<::windows::core::GUID>(result__) } pub unsafe fn IsDirty(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn InitNew<'a, Param0: ::windows::core::IntoParam<'a, IStorage>>(&self, pstg: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pstg.into_param().abi()).ok() } pub unsafe fn Load<'a, Param0: ::windows::core::IntoParam<'a, IStorage>>(&self, pstg: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pstg.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Save<'a, Param0: ::windows::core::IntoParam<'a, IStorage>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(&self, pstgsave: Param0, fsameasload: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), pstgsave.into_param().abi(), fsameasload.into_param().abi()).ok() } pub unsafe fn SaveCompleted<'a, Param0: ::windows::core::IntoParam<'a, IStorage>>(&self, pstgnew: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), pstgnew.into_param().abi()).ok() } pub unsafe fn HandsOffStorage(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IPersistStorage { type Vtable = IPersistStorage_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0000010a_0000_0000_c000_000000000046); } impl ::core::convert::From<IPersistStorage> for ::windows::core::IUnknown { fn from(value: IPersistStorage) -> Self { value.0 } } impl ::core::convert::From<&IPersistStorage> for ::windows::core::IUnknown { fn from(value: &IPersistStorage) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPersistStorage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPersistStorage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IPersistStorage> for super::IPersist { fn from(value: IPersistStorage) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IPersistStorage> for super::IPersist { fn from(value: &IPersistStorage) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, super::IPersist> for IPersistStorage { fn into_param(self) -> ::windows::core::Param<'a, super::IPersist> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, super::IPersist> for &IPersistStorage { fn into_param(self) -> ::windows::core::Param<'a, super::IPersist> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IPersistStorage_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pclassid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstg: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstg: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstgsave: ::windows::core::RawPtr, fsameasload: super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstgnew: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IPropertyBag(pub ::windows::core::IUnknown); impl IPropertyBag { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Ole"))] pub unsafe fn Read<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::IErrorLog>>(&self, pszpropname: Param0, pvar: *mut super::VARIANT, perrorlog: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszpropname.into_param().abi(), ::core::mem::transmute(pvar), perrorlog.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Ole"))] pub unsafe fn Write<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pszpropname: Param0, pvar: *const super::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pszpropname.into_param().abi(), ::core::mem::transmute(pvar)).ok() } } unsafe impl ::windows::core::Interface for IPropertyBag { type Vtable = IPropertyBag_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x55272a00_42cb_11ce_8135_00aa004bb851); } impl ::core::convert::From<IPropertyBag> for ::windows::core::IUnknown { fn from(value: IPropertyBag) -> Self { value.0 } } impl ::core::convert::From<&IPropertyBag> for ::windows::core::IUnknown { fn from(value: &IPropertyBag) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyBag { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPropertyBag { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IPropertyBag_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpropname: super::super::super::Foundation::PWSTR, pvar: *mut ::core::mem::ManuallyDrop<super::VARIANT>, perrorlog: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszpropname: super::super::super::Foundation::PWSTR, pvar: *const ::core::mem::ManuallyDrop<super::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IPropertyBag2(pub ::windows::core::IUnknown); impl IPropertyBag2 { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Ole"))] pub unsafe fn Read<'a, Param2: ::windows::core::IntoParam<'a, super::IErrorLog>>(&self, cproperties: u32, ppropbag: *const PROPBAG2, perrlog: Param2, pvarvalue: *mut super::VARIANT, phrerror: *mut ::windows::core::HRESULT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(cproperties), ::core::mem::transmute(ppropbag), perrlog.into_param().abi(), ::core::mem::transmute(pvarvalue), ::core::mem::transmute(phrerror)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Ole"))] pub unsafe fn Write(&self, cproperties: u32, ppropbag: *const PROPBAG2, pvarvalue: *const super::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(cproperties), ::core::mem::transmute(ppropbag), ::core::mem::transmute(pvarvalue)).ok() } pub unsafe fn CountProperties(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPropertyInfo(&self, iproperty: u32, cproperties: u32, ppropbag: *mut PROPBAG2, pcproperties: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(iproperty), ::core::mem::transmute(cproperties), ::core::mem::transmute(ppropbag), ::core::mem::transmute(pcproperties)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn LoadObject<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>, Param3: ::windows::core::IntoParam<'a, super::IErrorLog>>(&self, pstrname: Param0, dwhint: u32, punkobject: Param2, perrlog: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), pstrname.into_param().abi(), ::core::mem::transmute(dwhint), punkobject.into_param().abi(), perrlog.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IPropertyBag2 { type Vtable = IPropertyBag2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x22f55882_280b_11d0_a8a9_00a0c90c2004); } impl ::core::convert::From<IPropertyBag2> for ::windows::core::IUnknown { fn from(value: IPropertyBag2) -> Self { value.0 } } impl ::core::convert::From<&IPropertyBag2> for ::windows::core::IUnknown { fn from(value: &IPropertyBag2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyBag2 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPropertyBag2 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IPropertyBag2_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cproperties: u32, ppropbag: *const PROPBAG2, perrlog: ::windows::core::RawPtr, pvarvalue: *mut ::core::mem::ManuallyDrop<super::VARIANT>, phrerror: *mut ::windows::core::HRESULT) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cproperties: u32, ppropbag: *const PROPBAG2, pvarvalue: *const ::core::mem::ManuallyDrop<super::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcproperties: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iproperty: u32, cproperties: u32, ppropbag: *mut PROPBAG2, pcproperties: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstrname: super::super::super::Foundation::PWSTR, dwhint: u32, punkobject: ::windows::core::RawPtr, perrlog: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IPropertySetStorage(pub ::windows::core::IUnknown); impl IPropertySetStorage { pub unsafe fn Create(&self, rfmtid: *const ::windows::core::GUID, pclsid: *const ::windows::core::GUID, grfflags: u32, grfmode: u32) -> ::windows::core::Result<IPropertyStorage> { let mut result__: <IPropertyStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(rfmtid), ::core::mem::transmute(pclsid), ::core::mem::transmute(grfflags), ::core::mem::transmute(grfmode), &mut result__).from_abi::<IPropertyStorage>(result__) } pub unsafe fn Open(&self, rfmtid: *const ::windows::core::GUID, grfmode: u32) -> ::windows::core::Result<IPropertyStorage> { let mut result__: <IPropertyStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(rfmtid), ::core::mem::transmute(grfmode), &mut result__).from_abi::<IPropertyStorage>(result__) } pub unsafe fn Delete(&self, rfmtid: *const ::windows::core::GUID) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(rfmtid)).ok() } pub unsafe fn Enum(&self) -> ::windows::core::Result<IEnumSTATPROPSETSTG> { let mut result__: <IEnumSTATPROPSETSTG as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IEnumSTATPROPSETSTG>(result__) } } unsafe impl ::windows::core::Interface for IPropertySetStorage { type Vtable = IPropertySetStorage_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0000013a_0000_0000_c000_000000000046); } impl ::core::convert::From<IPropertySetStorage> for ::windows::core::IUnknown { fn from(value: IPropertySetStorage) -> Self { value.0 } } impl ::core::convert::From<&IPropertySetStorage> for ::windows::core::IUnknown { fn from(value: &IPropertySetStorage) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertySetStorage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPropertySetStorage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IPropertySetStorage_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, rfmtid: *const ::windows::core::GUID, pclsid: *const ::windows::core::GUID, grfflags: u32, grfmode: u32, ppprstg: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, rfmtid: *const ::windows::core::GUID, grfmode: u32, ppprstg: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, rfmtid: *const ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppenum: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IPropertyStorage(pub ::windows::core::IUnknown); impl IPropertyStorage { #[cfg(feature = "Win32_Foundation")] pub unsafe fn ReadMultiple(&self, cpspec: u32, rgpspec: *const PROPSPEC, rgpropvar: *mut PROPVARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(cpspec), ::core::mem::transmute(rgpspec), ::core::mem::transmute(rgpropvar)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn WriteMultiple(&self, cpspec: u32, rgpspec: *const PROPSPEC, rgpropvar: *const PROPVARIANT, propidnamefirst: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(cpspec), ::core::mem::transmute(rgpspec), ::core::mem::transmute(rgpropvar), ::core::mem::transmute(propidnamefirst)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DeleteMultiple(&self, cpspec: u32, rgpspec: *const PROPSPEC) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(cpspec), ::core::mem::transmute(rgpspec)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ReadPropertyNames(&self, cpropid: u32, rgpropid: *const u32, rglpwstrname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(cpropid), ::core::mem::transmute(rgpropid), ::core::mem::transmute(rglpwstrname)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn WritePropertyNames(&self, cpropid: u32, rgpropid: *const u32, rglpwstrname: *const super::super::super::Foundation::PWSTR) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(cpropid), ::core::mem::transmute(rgpropid), ::core::mem::transmute(rglpwstrname)).ok() } pub unsafe fn DeletePropertyNames(&self, cpropid: u32, rgpropid: *const u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(cpropid), ::core::mem::transmute(rgpropid)).ok() } pub unsafe fn Commit(&self, grfcommitflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(grfcommitflags)).ok() } pub unsafe fn Revert(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Enum(&self) -> ::windows::core::Result<IEnumSTATPROPSTG> { let mut result__: <IEnumSTATPROPSTG as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IEnumSTATPROPSTG>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetTimes(&self, pctime: *const super::super::super::Foundation::FILETIME, patime: *const super::super::super::Foundation::FILETIME, pmtime: *const super::super::super::Foundation::FILETIME) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(pctime), ::core::mem::transmute(patime), ::core::mem::transmute(pmtime)).ok() } pub unsafe fn SetClass(&self, clsid: *const ::windows::core::GUID) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(clsid)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Stat(&self) -> ::windows::core::Result<STATPROPSETSTG> { let mut result__: <STATPROPSETSTG as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<STATPROPSETSTG>(result__) } } unsafe impl ::windows::core::Interface for IPropertyStorage { type Vtable = IPropertyStorage_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x00000138_0000_0000_c000_000000000046); } impl ::core::convert::From<IPropertyStorage> for ::windows::core::IUnknown { fn from(value: IPropertyStorage) -> Self { value.0 } } impl ::core::convert::From<&IPropertyStorage> for ::windows::core::IUnknown { fn from(value: &IPropertyStorage) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IPropertyStorage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IPropertyStorage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IPropertyStorage_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cpspec: u32, rgpspec: *const PROPSPEC, rgpropvar: *mut ::core::mem::ManuallyDrop<PROPVARIANT>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cpspec: u32, rgpspec: *const PROPSPEC, rgpropvar: *const ::core::mem::ManuallyDrop<PROPVARIANT>, propidnamefirst: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cpspec: u32, rgpspec: *const PROPSPEC) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cpropid: u32, rgpropid: *const u32, rglpwstrname: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cpropid: u32, rgpropid: *const u32, rglpwstrname: *const super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, cpropid: u32, rgpropid: *const u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, grfcommitflags: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppenum: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctime: *const super::super::super::Foundation::FILETIME, patime: *const super::super::super::Foundation::FILETIME, pmtime: *const super::super::super::Foundation::FILETIME) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, clsid: *const ::windows::core::GUID) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstatpsstg: *mut STATPROPSETSTG) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IRootStorage(pub ::windows::core::IUnknown); impl IRootStorage { #[cfg(feature = "Win32_Foundation")] pub unsafe fn SwitchToFile<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pszfile: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszfile.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IRootStorage { type Vtable = IRootStorage_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x00000012_0000_0000_c000_000000000046); } impl ::core::convert::From<IRootStorage> for ::windows::core::IUnknown { fn from(value: IRootStorage) -> Self { value.0 } } impl ::core::convert::From<&IRootStorage> for ::windows::core::IUnknown { fn from(value: &IRootStorage) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IRootStorage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IRootStorage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IRootStorage_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszfile: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IStorage(pub ::windows::core::IUnknown); impl IStorage { #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateStream<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pwcsname: Param0, grfmode: u32, reserved1: u32, reserved2: u32) -> ::windows::core::Result<super::IStream> { let mut result__: <super::IStream as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pwcsname.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(reserved1), ::core::mem::transmute(reserved2), &mut result__).from_abi::<super::IStream>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn OpenStream<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pwcsname: Param0, reserved1: *mut ::core::ffi::c_void, grfmode: u32, reserved2: u32, ppstm: *mut ::core::option::Option<super::IStream>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pwcsname.into_param().abi(), ::core::mem::transmute(reserved1), ::core::mem::transmute(grfmode), ::core::mem::transmute(reserved2), ::core::mem::transmute(ppstm)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateStorage<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pwcsname: Param0, grfmode: u32, reserved1: u32, reserved2: u32) -> ::windows::core::Result<IStorage> { let mut result__: <IStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pwcsname.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(reserved1), ::core::mem::transmute(reserved2), &mut result__).from_abi::<IStorage>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn OpenStorage<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, IStorage>>(&self, pwcsname: Param0, pstgpriority: Param1, grfmode: u32, snbexclude: *const *const u16, reserved: u32) -> ::windows::core::Result<IStorage> { let mut result__: <IStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pwcsname.into_param().abi(), pstgpriority.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(snbexclude), ::core::mem::transmute(reserved), &mut result__).from_abi::<IStorage>(result__) } pub unsafe fn CopyTo<'a, Param3: ::windows::core::IntoParam<'a, IStorage>>(&self, ciidexclude: u32, rgiidexclude: *const ::windows::core::GUID, snbexclude: *const *const u16, pstgdest: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(ciidexclude), ::core::mem::transmute(rgiidexclude), ::core::mem::transmute(snbexclude), pstgdest.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MoveElementTo<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, IStorage>, Param2: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pwcsname: Param0, pstgdest: Param1, pwcsnewname: Param2, grfflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), pwcsname.into_param().abi(), pstgdest.into_param().abi(), pwcsnewname.into_param().abi(), ::core::mem::transmute(grfflags)).ok() } pub unsafe fn Commit(&self, grfcommitflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(grfcommitflags)).ok() } pub unsafe fn Revert(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn EnumElements(&self, reserved1: u32, reserved2: *mut ::core::ffi::c_void, reserved3: u32, ppenum: *mut ::core::option::Option<IEnumSTATSTG>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(reserved1), ::core::mem::transmute(reserved2), ::core::mem::transmute(reserved3), ::core::mem::transmute(ppenum)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DestroyElement<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pwcsname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), pwcsname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn RenameElement<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pwcsoldname: Param0, pwcsnewname: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), pwcsoldname.into_param().abi(), pwcsnewname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetElementTimes<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(&self, pwcsname: Param0, pctime: *const super::super::super::Foundation::FILETIME, patime: *const super::super::super::Foundation::FILETIME, pmtime: *const super::super::super::Foundation::FILETIME) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), pwcsname.into_param().abi(), ::core::mem::transmute(pctime), ::core::mem::transmute(patime), ::core::mem::transmute(pmtime)).ok() } pub unsafe fn SetClass(&self, clsid: *const ::windows::core::GUID) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(clsid)).ok() } pub unsafe fn SetStateBits(&self, grfstatebits: u32, grfmask: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), ::core::mem::transmute(grfstatebits), ::core::mem::transmute(grfmask)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Stat(&self, pstatstg: *mut super::STATSTG, grfstatflag: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), ::core::mem::transmute(pstatstg), ::core::mem::transmute(grfstatflag)).ok() } } unsafe impl ::windows::core::Interface for IStorage { type Vtable = IStorage_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0000000b_0000_0000_c000_000000000046); } impl ::core::convert::From<IStorage> for ::windows::core::IUnknown { fn from(value: IStorage) -> Self { value.0 } } impl ::core::convert::From<&IStorage> for ::windows::core::IUnknown { fn from(value: &IStorage) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IStorage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IStorage { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IStorage_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pwcsname: super::super::super::Foundation::PWSTR, grfmode: u32, reserved1: u32, reserved2: u32, ppstm: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pwcsname: super::super::super::Foundation::PWSTR, reserved1: *mut ::core::ffi::c_void, grfmode: u32, reserved2: u32, ppstm: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pwcsname: super::super::super::Foundation::PWSTR, grfmode: u32, reserved1: u32, reserved2: u32, ppstg: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pwcsname: super::super::super::Foundation::PWSTR, pstgpriority: ::windows::core::RawPtr, grfmode: u32, snbexclude: *const *const u16, reserved: u32, ppstg: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ciidexclude: u32, rgiidexclude: *const ::windows::core::GUID, snbexclude: *const *const u16, pstgdest: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pwcsname: super::super::super::Foundation::PWSTR, pstgdest: ::windows::core::RawPtr, pwcsnewname: super::super::super::Foundation::PWSTR, grfflags: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, grfcommitflags: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, reserved1: u32, reserved2: *mut ::core::ffi::c_void, reserved3: u32, ppenum: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pwcsname: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pwcsoldname: super::super::super::Foundation::PWSTR, pwcsnewname: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pwcsname: super::super::super::Foundation::PWSTR, pctime: *const super::super::super::Foundation::FILETIME, patime: *const super::super::super::Foundation::FILETIME, pmtime: *const super::super::super::Foundation::FILETIME) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, clsid: *const ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, grfstatebits: u32, grfmask: u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pstatstg: *mut super::STATSTG, grfstatflag: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct LOCKTYPE(pub i32); pub const LOCK_WRITE: LOCKTYPE = LOCKTYPE(1i32); pub const LOCK_EXCLUSIVE: LOCKTYPE = LOCKTYPE(2i32); pub const LOCK_ONLYONCE: LOCKTYPE = LOCKTYPE(4i32); impl ::core::convert::From<i32> for LOCKTYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for LOCKTYPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct OLESTREAM { pub lpstbl: *mut OLESTREAMVTBL, } impl OLESTREAM {} impl ::core::default::Default for OLESTREAM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for OLESTREAM { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("OLESTREAM").field("lpstbl", &self.lpstbl).finish() } } impl ::core::cmp::PartialEq for OLESTREAM { fn eq(&self, other: &Self) -> bool { self.lpstbl == other.lpstbl } } impl ::core::cmp::Eq for OLESTREAM {} unsafe impl ::windows::core::Abi for OLESTREAM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct OLESTREAMVTBL { pub Get: isize, pub Put: isize, } impl OLESTREAMVTBL {} impl ::core::default::Default for OLESTREAMVTBL { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for OLESTREAMVTBL { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("OLESTREAMVTBL").field("Get", &self.Get).field("Put", &self.Put).finish() } } impl ::core::cmp::PartialEq for OLESTREAMVTBL { fn eq(&self, other: &Self) -> bool { self.Get == other.Get && self.Put == other.Put } } impl ::core::cmp::Eq for OLESTREAMVTBL {} unsafe impl ::windows::core::Abi for OLESTREAMVTBL { type Abi = Self; } #[inline] pub unsafe fn OleConvertIStorageToOLESTREAM<'a, Param0: ::windows::core::IntoParam<'a, IStorage>>(pstg: Param0, lpolestream: *mut OLESTREAM) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn OleConvertIStorageToOLESTREAM(pstg: ::windows::core::RawPtr, lpolestream: *mut OLESTREAM) -> ::windows::core::HRESULT; } OleConvertIStorageToOLESTREAM(pstg.into_param().abi(), ::core::mem::transmute(lpolestream)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] pub unsafe fn OleConvertIStorageToOLESTREAMEx<'a, Param0: ::windows::core::IntoParam<'a, IStorage>>(pstg: Param0, cfformat: u16, lwidth: i32, lheight: i32, dwsize: u32, pmedium: *mut super::STGMEDIUM, polestm: *mut OLESTREAM) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn OleConvertIStorageToOLESTREAMEx(pstg: ::windows::core::RawPtr, cfformat: u16, lwidth: i32, lheight: i32, dwsize: u32, pmedium: *mut ::core::mem::ManuallyDrop<super::STGMEDIUM>, polestm: *mut OLESTREAM) -> ::windows::core::HRESULT; } OleConvertIStorageToOLESTREAMEx(pstg.into_param().abi(), ::core::mem::transmute(cfformat), ::core::mem::transmute(lwidth), ::core::mem::transmute(lheight), ::core::mem::transmute(dwsize), ::core::mem::transmute(pmedium), ::core::mem::transmute(polestm)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn OleConvertOLESTREAMToIStorage<'a, Param1: ::windows::core::IntoParam<'a, IStorage>>(lpolestream: *mut OLESTREAM, pstg: Param1, ptd: *const super::DVTARGETDEVICE) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn OleConvertOLESTREAMToIStorage(lpolestream: *mut OLESTREAM, pstg: ::windows::core::RawPtr, ptd: *const super::DVTARGETDEVICE) -> ::windows::core::HRESULT; } OleConvertOLESTREAMToIStorage(::core::mem::transmute(lpolestream), pstg.into_param().abi(), ::core::mem::transmute(ptd)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] pub unsafe fn OleConvertOLESTREAMToIStorageEx<'a, Param1: ::windows::core::IntoParam<'a, IStorage>>(polestm: *mut OLESTREAM, pstg: Param1, pcfformat: *mut u16, plwwidth: *mut i32, plheight: *mut i32, pdwsize: *mut u32, pmedium: *mut super::STGMEDIUM) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn OleConvertOLESTREAMToIStorageEx(polestm: *mut OLESTREAM, pstg: ::windows::core::RawPtr, pcfformat: *mut u16, plwwidth: *mut i32, plheight: *mut i32, pdwsize: *mut u32, pmedium: *mut ::core::mem::ManuallyDrop<super::STGMEDIUM>) -> ::windows::core::HRESULT; } OleConvertOLESTREAMToIStorageEx(::core::mem::transmute(polestm), pstg.into_param().abi(), ::core::mem::transmute(pcfformat), ::core::mem::transmute(plwwidth), ::core::mem::transmute(plheight), ::core::mem::transmute(pdwsize), ::core::mem::transmute(pmedium)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const PIDDI_THUMBNAIL: i32 = 2i32; pub const PIDDSI_BYTECOUNT: u32 = 4u32; pub const PIDDSI_CATEGORY: u32 = 2u32; pub const PIDDSI_COMPANY: u32 = 15u32; pub const PIDDSI_DOCPARTS: u32 = 13u32; pub const PIDDSI_HEADINGPAIR: u32 = 12u32; pub const PIDDSI_HIDDENCOUNT: u32 = 9u32; pub const PIDDSI_LINECOUNT: u32 = 5u32; pub const PIDDSI_LINKSDIRTY: u32 = 16u32; pub const PIDDSI_MANAGER: u32 = 14u32; pub const PIDDSI_MMCLIPCOUNT: u32 = 10u32; pub const PIDDSI_NOTECOUNT: u32 = 8u32; pub const PIDDSI_PARCOUNT: u32 = 6u32; pub const PIDDSI_PRESFORMAT: u32 = 3u32; pub const PIDDSI_SCALE: u32 = 11u32; pub const PIDDSI_SLIDECOUNT: u32 = 7u32; pub const PIDMSI_COPYRIGHT: i32 = 11i32; pub const PIDMSI_EDITOR: i32 = 2i32; pub const PIDMSI_OWNER: i32 = 8i32; pub const PIDMSI_PRODUCTION: i32 = 10i32; pub const PIDMSI_PROJECT: i32 = 6i32; pub const PIDMSI_RATING: i32 = 9i32; pub const PIDMSI_SEQUENCE_NO: i32 = 5i32; pub const PIDMSI_SOURCE: i32 = 4i32; pub const PIDMSI_STATUS: i32 = 7i32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PIDMSI_STATUS_VALUE(pub i32); pub const PIDMSI_STATUS_NORMAL: PIDMSI_STATUS_VALUE = PIDMSI_STATUS_VALUE(0i32); pub const PIDMSI_STATUS_NEW: PIDMSI_STATUS_VALUE = PIDMSI_STATUS_VALUE(1i32); pub const PIDMSI_STATUS_PRELIM: PIDMSI_STATUS_VALUE = PIDMSI_STATUS_VALUE(2i32); pub const PIDMSI_STATUS_DRAFT: PIDMSI_STATUS_VALUE = PIDMSI_STATUS_VALUE(3i32); pub const PIDMSI_STATUS_INPROGRESS: PIDMSI_STATUS_VALUE = PIDMSI_STATUS_VALUE(4i32); pub const PIDMSI_STATUS_EDIT: PIDMSI_STATUS_VALUE = PIDMSI_STATUS_VALUE(5i32); pub const PIDMSI_STATUS_REVIEW: PIDMSI_STATUS_VALUE = PIDMSI_STATUS_VALUE(6i32); pub const PIDMSI_STATUS_PROOF: PIDMSI_STATUS_VALUE = PIDMSI_STATUS_VALUE(7i32); pub const PIDMSI_STATUS_FINAL: PIDMSI_STATUS_VALUE = PIDMSI_STATUS_VALUE(8i32); pub const PIDMSI_STATUS_OTHER: PIDMSI_STATUS_VALUE = PIDMSI_STATUS_VALUE(32767i32); impl ::core::convert::From<i32> for PIDMSI_STATUS_VALUE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PIDMSI_STATUS_VALUE { type Abi = Self; } pub const PIDMSI_SUPPLIER: i32 = 3i32; pub const PIDSI_APPNAME: i32 = 18i32; pub const PIDSI_AUTHOR: i32 = 4i32; pub const PIDSI_CHARCOUNT: i32 = 16i32; pub const PIDSI_COMMENTS: i32 = 6i32; pub const PIDSI_CREATE_DTM: i32 = 12i32; pub const PIDSI_DOC_SECURITY: i32 = 19i32; pub const PIDSI_EDITTIME: i32 = 10i32; pub const PIDSI_KEYWORDS: i32 = 5i32; pub const PIDSI_LASTAUTHOR: i32 = 8i32; pub const PIDSI_LASTPRINTED: i32 = 11i32; pub const PIDSI_LASTSAVE_DTM: i32 = 13i32; pub const PIDSI_PAGECOUNT: i32 = 14i32; pub const PIDSI_REVNUMBER: i32 = 9i32; pub const PIDSI_SUBJECT: i32 = 3i32; pub const PIDSI_TEMPLATE: i32 = 7i32; pub const PIDSI_THUMBNAIL: i32 = 17i32; pub const PIDSI_TITLE: i32 = 2i32; pub const PIDSI_WORDCOUNT: i32 = 15i32; pub const PID_BEHAVIOR: u32 = 2147483651u32; pub const PID_CODEPAGE: u32 = 1u32; pub const PID_DICTIONARY: u32 = 0u32; pub const PID_FIRST_NAME_DEFAULT: u32 = 4095u32; pub const PID_FIRST_USABLE: u32 = 2u32; pub const PID_ILLEGAL: u32 = 4294967295u32; pub const PID_LOCALE: u32 = 2147483648u32; pub const PID_MAX_READONLY: u32 = 3221225471u32; pub const PID_MIN_READONLY: u32 = 2147483648u32; pub const PID_MODIFY_TIME: u32 = 2147483649u32; pub const PID_SECURITY: u32 = 2147483650u32; #[repr(C)] #[derive(:: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug, :: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy)] pub struct PMemoryAllocator(pub u8); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct PROPBAG2 { pub dwType: u32, pub vt: u16, pub cfType: u16, pub dwHint: u32, pub pstrName: super::super::super::Foundation::PWSTR, pub clsid: ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl PROPBAG2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PROPBAG2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for PROPBAG2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PROPBAG2").field("dwType", &self.dwType).field("vt", &self.vt).field("cfType", &self.cfType).field("dwHint", &self.dwHint).field("pstrName", &self.pstrName).field("clsid", &self.clsid).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PROPBAG2 { fn eq(&self, other: &Self) -> bool { self.dwType == other.dwType && self.vt == other.vt && self.cfType == other.cfType && self.dwHint == other.dwHint && self.pstrName == other.pstrName && self.clsid == other.clsid } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PROPBAG2 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PROPBAG2 { type Abi = Self; } pub const PROPSETFLAG_ANSI: u32 = 2u32; pub const PROPSETFLAG_CASE_SENSITIVE: u32 = 8u32; pub const PROPSETFLAG_DEFAULT: u32 = 0u32; pub const PROPSETFLAG_NONSIMPLE: u32 = 1u32; pub const PROPSETFLAG_UNBUFFERED: u32 = 4u32; pub const PROPSETHDR_OSVERSION_UNKNOWN: u32 = 4294967295u32; pub const PROPSET_BEHAVIOR_CASE_SENSITIVE: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct PROPSPEC { pub ulKind: PROPSPEC_KIND, pub Anonymous: PROPSPEC_0, } #[cfg(feature = "Win32_Foundation")] impl PROPSPEC {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PROPSPEC { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PROPSPEC { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PROPSPEC {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PROPSPEC { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union PROPSPEC_0 { pub propid: u32, pub lpwstr: super::super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl PROPSPEC_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PROPSPEC_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PROPSPEC_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PROPSPEC_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PROPSPEC_0 { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PROPSPEC_KIND(pub u32); pub const PRSPEC_LPWSTR: PROPSPEC_KIND = PROPSPEC_KIND(0u32); pub const PRSPEC_PROPID: PROPSPEC_KIND = PROPSPEC_KIND(1u32); impl ::core::convert::From<u32> for PROPSPEC_KIND { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PROPSPEC_KIND { type Abi = Self; } impl ::core::ops::BitOr for PROPSPEC_KIND { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for PROPSPEC_KIND { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for PROPSPEC_KIND { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for PROPSPEC_KIND { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for PROPSPEC_KIND { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for PROPVARIANT { fn clone(&self) -> Self { unimplemented!() } } #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct PROPVARIANT { pub Anonymous: PROPVARIANT_0, } #[cfg(feature = "Win32_Foundation")] impl PROPVARIANT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PROPVARIANT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PROPVARIANT { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PROPVARIANT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PROPVARIANT { type Abi = ::core::mem::ManuallyDrop<Self>; } #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for PROPVARIANT_0 { fn clone(&self) -> Self { unimplemented!() } } #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union PROPVARIANT_0 { pub Anonymous: ::core::mem::ManuallyDrop<PROPVARIANT_0_0>, pub decVal: super::super::super::Foundation::DECIMAL, } #[cfg(feature = "Win32_Foundation")] impl PROPVARIANT_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PROPVARIANT_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PROPVARIANT_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PROPVARIANT_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PROPVARIANT_0 { type Abi = ::core::mem::ManuallyDrop<Self>; } #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for PROPVARIANT_0_0 { fn clone(&self) -> Self { unimplemented!() } } #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct PROPVARIANT_0_0 { pub vt: u16, pub wReserved1: u16, pub wReserved2: u16, pub wReserved3: u16, pub Anonymous: PROPVARIANT_0_0_0, } #[cfg(feature = "Win32_Foundation")] impl PROPVARIANT_0_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PROPVARIANT_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PROPVARIANT_0_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PROPVARIANT_0_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PROPVARIANT_0_0 { type Abi = ::core::mem::ManuallyDrop<Self>; } #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for PROPVARIANT_0_0_0 { fn clone(&self) -> Self { unimplemented!() } } #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union PROPVARIANT_0_0_0 { pub cVal: super::super::super::Foundation::CHAR, pub bVal: u8, pub iVal: i16, pub uiVal: u16, pub lVal: i32, pub ulVal: u32, pub intVal: i32, pub uintVal: u32, pub hVal: i64, pub uhVal: u64, pub fltVal: f32, pub dblVal: f64, pub boolVal: i16, pub __OBSOLETE__VARIANT_BOOL: i16, pub scode: i32, pub cyVal: super::CY, pub date: f64, pub filetime: super::super::super::Foundation::FILETIME, pub puuid: *mut ::windows::core::GUID, pub pclipdata: *mut CLIPDATA, pub bstrVal: ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>, pub bstrblobVal: BSTRBLOB, pub blob: super::BLOB, pub pszVal: super::super::super::Foundation::PSTR, pub pwszVal: super::super::super::Foundation::PWSTR, pub punkVal: ::windows::core::RawPtr, pub pdispVal: ::windows::core::RawPtr, pub pStream: ::windows::core::RawPtr, pub pStorage: ::windows::core::RawPtr, pub pVersionedStream: *mut ::core::mem::ManuallyDrop<VERSIONEDSTREAM>, pub parray: *mut super::SAFEARRAY, pub cac: CAC, pub caub: CAUB, pub cai: CAI, pub caui: CAUI, pub cal: CAL, pub caul: CAUL, pub cah: CAH, pub cauh: CAUH, pub caflt: CAFLT, pub cadbl: CADBL, pub cabool: CABOOL, pub cascode: CASCODE, pub cacy: CACY, pub cadate: CADATE, pub cafiletime: CAFILETIME, pub cauuid: CACLSID, pub caclipdata: CACLIPDATA, pub cabstr: CABSTR, pub cabstrblob: CABSTRBLOB, pub calpstr: CALPSTR, pub calpwstr: CALPWSTR, pub capropvar: CAPROPVARIANT, pub pcVal: super::super::super::Foundation::PSTR, pub pbVal: *mut u8, pub piVal: *mut i16, pub puiVal: *mut u16, pub plVal: *mut i32, pub pulVal: *mut u32, pub pintVal: *mut i32, pub puintVal: *mut u32, pub pfltVal: *mut f32, pub pdblVal: *mut f64, pub pboolVal: *mut i16, pub pdecVal: *mut super::super::super::Foundation::DECIMAL, pub pscode: *mut i32, pub pcyVal: *mut super::CY, pub pdate: *mut f64, pub pbstrVal: *mut ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>, pub ppunkVal: *mut ::windows::core::RawPtr, pub ppdispVal: *mut ::windows::core::RawPtr, pub pparray: *mut *mut super::SAFEARRAY, pub pvarVal: *mut ::core::mem::ManuallyDrop<PROPVARIANT>, } #[cfg(feature = "Win32_Foundation")] impl PROPVARIANT_0_0_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PROPVARIANT_0_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PROPVARIANT_0_0_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PROPVARIANT_0_0_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PROPVARIANT_0_0_0 { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const PRSPEC_INVALID: u32 = 4294967295u32; #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn PropStgNameToFmtId<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(oszname: Param0) -> ::windows::core::Result<::windows::core::GUID> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn PropStgNameToFmtId(oszname: super::super::super::Foundation::PWSTR, pfmtid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT; } let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); PropStgNameToFmtId(oszname.into_param().abi(), &mut result__).from_abi::<::windows::core::GUID>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn PropVariantClear(pvar: *mut PROPVARIANT) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn PropVariantClear(pvar: *mut ::core::mem::ManuallyDrop<PROPVARIANT>) -> ::windows::core::HRESULT; } PropVariantClear(::core::mem::transmute(pvar)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn PropVariantCopy(pvardest: *mut PROPVARIANT, pvarsrc: *const PROPVARIANT) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn PropVariantCopy(pvardest: *mut ::core::mem::ManuallyDrop<PROPVARIANT>, pvarsrc: *const ::core::mem::ManuallyDrop<PROPVARIANT>) -> ::windows::core::HRESULT; } PropVariantCopy(::core::mem::transmute(pvardest), ::core::mem::transmute(pvarsrc)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn ReadClassStg<'a, Param0: ::windows::core::IntoParam<'a, IStorage>>(pstg: Param0) -> ::windows::core::Result<::windows::core::GUID> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ReadClassStg(pstg: ::windows::core::RawPtr, pclsid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT; } let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); ReadClassStg(pstg.into_param().abi(), &mut result__).from_abi::<::windows::core::GUID>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn ReadClassStm<'a, Param0: ::windows::core::IntoParam<'a, super::IStream>>(pstm: Param0) -> ::windows::core::Result<::windows::core::GUID> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ReadClassStm(pstm: ::windows::core::RawPtr, pclsid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT; } let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); ReadClassStm(pstm.into_param().abi(), &mut result__).from_abi::<::windows::core::GUID>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ReadFmtUserTypeStg<'a, Param0: ::windows::core::IntoParam<'a, IStorage>>(pstg: Param0, pcf: *mut u16, lplpszusertype: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ReadFmtUserTypeStg(pstg: ::windows::core::RawPtr, pcf: *mut u16, lplpszusertype: *mut super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT; } ReadFmtUserTypeStg(pstg.into_param().abi(), ::core::mem::transmute(pcf), ::core::mem::transmute(lplpszusertype)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct RemSNB { pub ulCntStr: u32, pub ulCntChar: u32, pub rgString: [u16; 1], } impl RemSNB {} impl ::core::default::Default for RemSNB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for RemSNB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("RemSNB").field("ulCntStr", &self.ulCntStr).field("ulCntChar", &self.ulCntChar).field("rgString", &self.rgString).finish() } } impl ::core::cmp::PartialEq for RemSNB { fn eq(&self, other: &Self) -> bool { self.ulCntStr == other.ulCntStr && self.ulCntChar == other.ulCntChar && self.rgString == other.rgString } } impl ::core::cmp::Eq for RemSNB {} unsafe impl ::windows::core::Abi for RemSNB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct SERIALIZEDPROPERTYVALUE { pub dwType: u32, pub rgb: [u8; 1], } impl SERIALIZEDPROPERTYVALUE {} impl ::core::default::Default for SERIALIZEDPROPERTYVALUE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for SERIALIZEDPROPERTYVALUE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SERIALIZEDPROPERTYVALUE").field("dwType", &self.dwType).field("rgb", &self.rgb).finish() } } impl ::core::cmp::PartialEq for SERIALIZEDPROPERTYVALUE { fn eq(&self, other: &Self) -> bool { self.dwType == other.dwType && self.rgb == other.rgb } } impl ::core::cmp::Eq for SERIALIZEDPROPERTYVALUE {} unsafe impl ::windows::core::Abi for SERIALIZEDPROPERTYVALUE { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct STATFLAG(pub i32); pub const STATFLAG_DEFAULT: STATFLAG = STATFLAG(0i32); pub const STATFLAG_NONAME: STATFLAG = STATFLAG(1i32); pub const STATFLAG_NOOPEN: STATFLAG = STATFLAG(2i32); impl ::core::convert::From<i32> for STATFLAG { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for STATFLAG { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct STATPROPSETSTG { pub fmtid: ::windows::core::GUID, pub clsid: ::windows::core::GUID, pub grfFlags: u32, pub mtime: super::super::super::Foundation::FILETIME, pub ctime: super::super::super::Foundation::FILETIME, pub atime: super::super::super::Foundation::FILETIME, pub dwOSVersion: u32, } #[cfg(feature = "Win32_Foundation")] impl STATPROPSETSTG {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for STATPROPSETSTG { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for STATPROPSETSTG { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("STATPROPSETSTG").field("fmtid", &self.fmtid).field("clsid", &self.clsid).field("grfFlags", &self.grfFlags).field("mtime", &self.mtime).field("ctime", &self.ctime).field("atime", &self.atime).field("dwOSVersion", &self.dwOSVersion).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for STATPROPSETSTG { fn eq(&self, other: &Self) -> bool { self.fmtid == other.fmtid && self.clsid == other.clsid && self.grfFlags == other.grfFlags && self.mtime == other.mtime && self.ctime == other.ctime && self.atime == other.atime && self.dwOSVersion == other.dwOSVersion } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for STATPROPSETSTG {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for STATPROPSETSTG { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct STATPROPSTG { pub lpwstrName: super::super::super::Foundation::PWSTR, pub propid: u32, pub vt: u16, } #[cfg(feature = "Win32_Foundation")] impl STATPROPSTG {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for STATPROPSTG { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for STATPROPSTG { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("STATPROPSTG").field("lpwstrName", &self.lpwstrName).field("propid", &self.propid).field("vt", &self.vt).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for STATPROPSTG { fn eq(&self, other: &Self) -> bool { self.lpwstrName == other.lpwstrName && self.propid == other.propid && self.vt == other.vt } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for STATPROPSTG {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for STATPROPSTG { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct STGC(pub i32); pub const STGC_DEFAULT: STGC = STGC(0i32); pub const STGC_OVERWRITE: STGC = STGC(1i32); pub const STGC_ONLYIFCURRENT: STGC = STGC(2i32); pub const STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE: STGC = STGC(4i32); pub const STGC_CONSOLIDATE: STGC = STGC(8i32); impl ::core::convert::From<i32> for STGC { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for STGC { type Abi = Self; } pub const STGFMT_ANY: u32 = 4u32; pub const STGFMT_DOCFILE: u32 = 5u32; pub const STGFMT_DOCUMENT: u32 = 0u32; pub const STGFMT_FILE: u32 = 3u32; pub const STGFMT_NATIVE: u32 = 1u32; pub const STGFMT_STORAGE: u32 = 0u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct STGMOVE(pub i32); pub const STGMOVE_MOVE: STGMOVE = STGMOVE(0i32); pub const STGMOVE_COPY: STGMOVE = STGMOVE(1i32); pub const STGMOVE_SHALLOWCOPY: STGMOVE = STGMOVE(2i32); impl ::core::convert::From<i32> for STGMOVE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for STGMOVE { type Abi = Self; } pub const STGM_CONVERT: i32 = 131072i32; pub const STGM_CREATE: i32 = 4096i32; pub const STGM_DELETEONRELEASE: i32 = 67108864i32; pub const STGM_DIRECT: i32 = 0i32; pub const STGM_DIRECT_SWMR: i32 = 4194304i32; pub const STGM_FAILIFTHERE: i32 = 0i32; pub const STGM_NOSCRATCH: i32 = 1048576i32; pub const STGM_NOSNAPSHOT: i32 = 2097152i32; pub const STGM_PRIORITY: i32 = 262144i32; pub const STGM_READ: i32 = 0i32; pub const STGM_READWRITE: i32 = 2i32; pub const STGM_SHARE_DENY_NONE: i32 = 64i32; pub const STGM_SHARE_DENY_READ: i32 = 48i32; pub const STGM_SHARE_DENY_WRITE: i32 = 32i32; pub const STGM_SHARE_EXCLUSIVE: i32 = 16i32; pub const STGM_SIMPLE: i32 = 134217728i32; pub const STGM_TRANSACTED: i32 = 65536i32; pub const STGM_WRITE: i32 = 1i32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct STGOPTIONS { pub usVersion: u16, pub reserved: u16, pub ulSectorSize: u32, pub pwcsTemplateFile: super::super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl STGOPTIONS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for STGOPTIONS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for STGOPTIONS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("STGOPTIONS").field("usVersion", &self.usVersion).field("reserved", &self.reserved).field("ulSectorSize", &self.ulSectorSize).field("pwcsTemplateFile", &self.pwcsTemplateFile).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for STGOPTIONS { fn eq(&self, other: &Self) -> bool { self.usVersion == other.usVersion && self.reserved == other.reserved && self.ulSectorSize == other.ulSectorSize && self.pwcsTemplateFile == other.pwcsTemplateFile } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for STGOPTIONS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for STGOPTIONS { type Abi = Self; } pub const STGOPTIONS_VERSION: u32 = 1u32; #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetConvertStg<'a, Param0: ::windows::core::IntoParam<'a, IStorage>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOL>>(pstg: Param0, fconvert: Param1) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn SetConvertStg(pstg: ::windows::core::RawPtr, fconvert: super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT; } SetConvertStg(pstg.into_param().abi(), fconvert.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StgConvertPropertyToVariant(pprop: *const SERIALIZEDPROPERTYVALUE, codepage: u16, pvar: *mut PROPVARIANT, pma: *const PMemoryAllocator) -> super::super::super::Foundation::BOOLEAN { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgConvertPropertyToVariant(pprop: *const SERIALIZEDPROPERTYVALUE, codepage: u16, pvar: *mut ::core::mem::ManuallyDrop<PROPVARIANT>, pma: *const PMemoryAllocator) -> super::super::super::Foundation::BOOLEAN; } ::core::mem::transmute(StgConvertPropertyToVariant(::core::mem::transmute(pprop), ::core::mem::transmute(codepage), ::core::mem::transmute(pvar), ::core::mem::transmute(pma))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StgConvertVariantToProperty<'a, Param5: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOLEAN>>(pvar: *const PROPVARIANT, codepage: u16, pprop: *mut SERIALIZEDPROPERTYVALUE, pcb: *mut u32, pid: u32, freserved: Param5, pcindirect: *mut u32) -> *mut SERIALIZEDPROPERTYVALUE { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgConvertVariantToProperty(pvar: *const ::core::mem::ManuallyDrop<PROPVARIANT>, codepage: u16, pprop: *mut SERIALIZEDPROPERTYVALUE, pcb: *mut u32, pid: u32, freserved: super::super::super::Foundation::BOOLEAN, pcindirect: *mut u32) -> *mut SERIALIZEDPROPERTYVALUE; } ::core::mem::transmute(StgConvertVariantToProperty(::core::mem::transmute(pvar), ::core::mem::transmute(codepage), ::core::mem::transmute(pprop), ::core::mem::transmute(pcb), ::core::mem::transmute(pid), freserved.into_param().abi(), ::core::mem::transmute(pcindirect))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StgCreateDocfile<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pwcsname: Param0, grfmode: u32, reserved: u32) -> ::windows::core::Result<IStorage> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgCreateDocfile(pwcsname: super::super::super::Foundation::PWSTR, grfmode: u32, reserved: u32, ppstgopen: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <IStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); StgCreateDocfile(pwcsname.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(reserved), &mut result__).from_abi::<IStorage>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn StgCreateDocfileOnILockBytes<'a, Param0: ::windows::core::IntoParam<'a, ILockBytes>>(plkbyt: Param0, grfmode: u32, reserved: u32) -> ::windows::core::Result<IStorage> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgCreateDocfileOnILockBytes(plkbyt: ::windows::core::RawPtr, grfmode: u32, reserved: u32, ppstgopen: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <IStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); StgCreateDocfileOnILockBytes(plkbyt.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(reserved), &mut result__).from_abi::<IStorage>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn StgCreatePropSetStg<'a, Param0: ::windows::core::IntoParam<'a, IStorage>>(pstorage: Param0, dwreserved: u32) -> ::windows::core::Result<IPropertySetStorage> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgCreatePropSetStg(pstorage: ::windows::core::RawPtr, dwreserved: u32, pppropsetstg: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <IPropertySetStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); StgCreatePropSetStg(pstorage.into_param().abi(), ::core::mem::transmute(dwreserved), &mut result__).from_abi::<IPropertySetStorage>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn StgCreatePropStg<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(punk: Param0, fmtid: *const ::windows::core::GUID, pclsid: *const ::windows::core::GUID, grfflags: u32, dwreserved: u32) -> ::windows::core::Result<IPropertyStorage> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgCreatePropStg(punk: ::windows::core::RawPtr, fmtid: *const ::windows::core::GUID, pclsid: *const ::windows::core::GUID, grfflags: u32, dwreserved: u32, pppropstg: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <IPropertyStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); StgCreatePropStg(punk.into_param().abi(), ::core::mem::transmute(fmtid), ::core::mem::transmute(pclsid), ::core::mem::transmute(grfflags), ::core::mem::transmute(dwreserved), &mut result__).from_abi::<IPropertyStorage>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn StgCreateStorageEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pwcsname: Param0, grfmode: u32, stgfmt: u32, grfattrs: u32, pstgoptions: *mut STGOPTIONS, psecuritydescriptor: *const super::super::super::Security::SECURITY_DESCRIPTOR, riid: *const ::windows::core::GUID, ppobjectopen: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgCreateStorageEx(pwcsname: super::super::super::Foundation::PWSTR, grfmode: u32, stgfmt: u32, grfattrs: u32, pstgoptions: *mut STGOPTIONS, psecuritydescriptor: *const super::super::super::Security::SECURITY_DESCRIPTOR, riid: *const ::windows::core::GUID, ppobjectopen: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT; } StgCreateStorageEx(pwcsname.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(stgfmt), ::core::mem::transmute(grfattrs), ::core::mem::transmute(pstgoptions), ::core::mem::transmute(psecuritydescriptor), ::core::mem::transmute(riid), ::core::mem::transmute(ppobjectopen)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StgDeserializePropVariant(pprop: *const SERIALIZEDPROPERTYVALUE, cbmax: u32) -> ::windows::core::Result<PROPVARIANT> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgDeserializePropVariant(pprop: *const SERIALIZEDPROPERTYVALUE, cbmax: u32, ppropvar: *mut ::core::mem::ManuallyDrop<PROPVARIANT>) -> ::windows::core::HRESULT; } let mut result__: <PROPVARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); StgDeserializePropVariant(::core::mem::transmute(pprop), ::core::mem::transmute(cbmax), &mut result__).from_abi::<PROPVARIANT>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StgGetIFillLockBytesOnFile<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pwcsname: Param0) -> ::windows::core::Result<IFillLockBytes> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgGetIFillLockBytesOnFile(pwcsname: super::super::super::Foundation::PWSTR, ppflb: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <IFillLockBytes as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); StgGetIFillLockBytesOnFile(pwcsname.into_param().abi(), &mut result__).from_abi::<IFillLockBytes>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn StgGetIFillLockBytesOnILockBytes<'a, Param0: ::windows::core::IntoParam<'a, ILockBytes>>(pilb: Param0) -> ::windows::core::Result<IFillLockBytes> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgGetIFillLockBytesOnILockBytes(pilb: ::windows::core::RawPtr, ppflb: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <IFillLockBytes as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); StgGetIFillLockBytesOnILockBytes(pilb.into_param().abi(), &mut result__).from_abi::<IFillLockBytes>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StgIsStorageFile<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pwcsname: Param0) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgIsStorageFile(pwcsname: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT; } StgIsStorageFile(pwcsname.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn StgIsStorageILockBytes<'a, Param0: ::windows::core::IntoParam<'a, ILockBytes>>(plkbyt: Param0) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgIsStorageILockBytes(plkbyt: ::windows::core::RawPtr) -> ::windows::core::HRESULT; } StgIsStorageILockBytes(plkbyt.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn StgOpenAsyncDocfileOnIFillLockBytes<'a, Param0: ::windows::core::IntoParam<'a, IFillLockBytes>>(pflb: Param0, grfmode: u32, asyncflags: u32) -> ::windows::core::Result<IStorage> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgOpenAsyncDocfileOnIFillLockBytes(pflb: ::windows::core::RawPtr, grfmode: u32, asyncflags: u32, ppstgopen: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <IStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); StgOpenAsyncDocfileOnIFillLockBytes(pflb.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(asyncflags), &mut result__).from_abi::<IStorage>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StgOpenLayoutDocfile<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pwcsdfname: Param0, grfmode: u32, reserved: u32) -> ::windows::core::Result<IStorage> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgOpenLayoutDocfile(pwcsdfname: super::super::super::Foundation::PWSTR, grfmode: u32, reserved: u32, ppstgopen: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <IStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); StgOpenLayoutDocfile(pwcsdfname.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(reserved), &mut result__).from_abi::<IStorage>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn StgOpenPropStg<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(punk: Param0, fmtid: *const ::windows::core::GUID, grfflags: u32, dwreserved: u32) -> ::windows::core::Result<IPropertyStorage> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgOpenPropStg(punk: ::windows::core::RawPtr, fmtid: *const ::windows::core::GUID, grfflags: u32, dwreserved: u32, pppropstg: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <IPropertyStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); StgOpenPropStg(punk.into_param().abi(), ::core::mem::transmute(fmtid), ::core::mem::transmute(grfflags), ::core::mem::transmute(dwreserved), &mut result__).from_abi::<IPropertyStorage>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StgOpenStorage<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, IStorage>>(pwcsname: Param0, pstgpriority: Param1, grfmode: u32, snbexclude: *const *const u16, reserved: u32) -> ::windows::core::Result<IStorage> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgOpenStorage(pwcsname: super::super::super::Foundation::PWSTR, pstgpriority: ::windows::core::RawPtr, grfmode: u32, snbexclude: *const *const u16, reserved: u32, ppstgopen: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <IStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); StgOpenStorage(pwcsname.into_param().abi(), pstgpriority.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(snbexclude), ::core::mem::transmute(reserved), &mut result__).from_abi::<IStorage>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn StgOpenStorageEx<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pwcsname: Param0, grfmode: u32, stgfmt: u32, grfattrs: u32, pstgoptions: *mut STGOPTIONS, psecuritydescriptor: *const super::super::super::Security::SECURITY_DESCRIPTOR, riid: *const ::windows::core::GUID, ppobjectopen: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgOpenStorageEx(pwcsname: super::super::super::Foundation::PWSTR, grfmode: u32, stgfmt: u32, grfattrs: u32, pstgoptions: *mut STGOPTIONS, psecuritydescriptor: *const super::super::super::Security::SECURITY_DESCRIPTOR, riid: *const ::windows::core::GUID, ppobjectopen: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT; } StgOpenStorageEx(pwcsname.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(stgfmt), ::core::mem::transmute(grfattrs), ::core::mem::transmute(pstgoptions), ::core::mem::transmute(psecuritydescriptor), ::core::mem::transmute(riid), ::core::mem::transmute(ppobjectopen)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn StgOpenStorageOnILockBytes<'a, Param0: ::windows::core::IntoParam<'a, ILockBytes>, Param1: ::windows::core::IntoParam<'a, IStorage>>(plkbyt: Param0, pstgpriority: Param1, grfmode: u32, snbexclude: *const *const u16, reserved: u32) -> ::windows::core::Result<IStorage> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgOpenStorageOnILockBytes(plkbyt: ::windows::core::RawPtr, pstgpriority: ::windows::core::RawPtr, grfmode: u32, snbexclude: *const *const u16, reserved: u32, ppstgopen: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT; } let mut result__: <IStorage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); StgOpenStorageOnILockBytes(plkbyt.into_param().abi(), pstgpriority.into_param().abi(), ::core::mem::transmute(grfmode), ::core::mem::transmute(snbexclude), ::core::mem::transmute(reserved), &mut result__).from_abi::<IStorage>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn StgPropertyLengthAsVariant(pprop: *const SERIALIZEDPROPERTYVALUE, cbprop: u32, codepage: u16, breserved: u8) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgPropertyLengthAsVariant(pprop: *const SERIALIZEDPROPERTYVALUE, cbprop: u32, codepage: u16, breserved: u8) -> u32; } ::core::mem::transmute(StgPropertyLengthAsVariant(::core::mem::transmute(pprop), ::core::mem::transmute(cbprop), ::core::mem::transmute(codepage), ::core::mem::transmute(breserved))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StgSerializePropVariant(ppropvar: *const PROPVARIANT, ppprop: *mut *mut SERIALIZEDPROPERTYVALUE, pcb: *mut u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgSerializePropVariant(ppropvar: *const ::core::mem::ManuallyDrop<PROPVARIANT>, ppprop: *mut *mut SERIALIZEDPROPERTYVALUE, pcb: *mut u32) -> ::windows::core::HRESULT; } StgSerializePropVariant(::core::mem::transmute(ppropvar), ::core::mem::transmute(ppprop), ::core::mem::transmute(pcb)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StgSetTimes<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(lpszname: Param0, pctime: *const super::super::super::Foundation::FILETIME, patime: *const super::super::super::Foundation::FILETIME, pmtime: *const super::super::super::Foundation::FILETIME) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StgSetTimes(lpszname: super::super::super::Foundation::PWSTR, pctime: *const super::super::super::Foundation::FILETIME, patime: *const super::super::super::Foundation::FILETIME, pmtime: *const super::super::super::Foundation::FILETIME) -> ::windows::core::HRESULT; } StgSetTimes(lpszname.into_param().abi(), ::core::mem::transmute(pctime), ::core::mem::transmute(patime), ::core::mem::transmute(pmtime)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: clone :: Clone)] #[repr(C)] pub struct VERSIONEDSTREAM { pub guidVersion: ::windows::core::GUID, pub pStream: ::core::option::Option<super::IStream>, } impl VERSIONEDSTREAM {} impl ::core::default::Default for VERSIONEDSTREAM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for VERSIONEDSTREAM { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("VERSIONEDSTREAM").field("guidVersion", &self.guidVersion).field("pStream", &self.pStream).finish() } } impl ::core::cmp::PartialEq for VERSIONEDSTREAM { fn eq(&self, other: &Self) -> bool { self.guidVersion == other.guidVersion && self.pStream == other.pStream } } impl ::core::cmp::Eq for VERSIONEDSTREAM {} unsafe impl ::windows::core::Abi for VERSIONEDSTREAM { type Abi = ::core::mem::ManuallyDrop<Self>; } #[inline] pub unsafe fn WriteClassStg<'a, Param0: ::windows::core::IntoParam<'a, IStorage>>(pstg: Param0, rclsid: *const ::windows::core::GUID) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WriteClassStg(pstg: ::windows::core::RawPtr, rclsid: *const ::windows::core::GUID) -> ::windows::core::HRESULT; } WriteClassStg(pstg.into_param().abi(), ::core::mem::transmute(rclsid)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn WriteClassStm<'a, Param0: ::windows::core::IntoParam<'a, super::IStream>>(pstm: Param0, rclsid: *const ::windows::core::GUID) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WriteClassStm(pstm: ::windows::core::RawPtr, rclsid: *const ::windows::core::GUID) -> ::windows::core::HRESULT; } WriteClassStm(pstm.into_param().abi(), ::core::mem::transmute(rclsid)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WriteFmtUserTypeStg<'a, Param0: ::windows::core::IntoParam<'a, IStorage>, Param2: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pstg: Param0, cf: u16, lpszusertype: Param2) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WriteFmtUserTypeStg(pstg: ::windows::core::RawPtr, cf: u16, lpszusertype: super::super::super::Foundation::PWSTR) -> ::windows::core::HRESULT; } WriteFmtUserTypeStg(pstg.into_param().abi(), ::core::mem::transmute(cf), lpszusertype.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); }
const STD_MODULES: &[&str] = &["Block", "Event", "Time"]; const STD_BYTECODE: &[&[u8]] = &[ include_bytes!("../assets/target/modules/0_Block.mv"), include_bytes!("../assets/target/modules/1_Event.mv"), include_bytes!("../assets/target/modules/2_Time.mv"), ]; const USER_MODULES: &[&str] = &["Store", "EventProxy"]; const USER_BYTECODE: &[&[u8]] = &[ include_bytes!("../assets/target/modules/3_Store.mv"), include_bytes!("../assets/target/modules/4_EventProxy.mv"), ]; const TX_NAMES: &[&str] = &[ "store_u64", "emit_event", "store_system_block", "store_system_timestamp", ]; const TX_BYTECODE: &[&[u8]] = &[ include_bytes!("../assets/target/transactions/store_u64.mvt"), include_bytes!("../assets/target/transactions/emit_event.mvt"), include_bytes!("../assets/target/transactions/store_system_block.mvt"), include_bytes!("../assets/target/transactions/store_system_timestamp.mvt"), ]; pub trait BinAsset: Sized + Copy + Into<usize> { const NAMES: &'static [&'static str]; const BYTES: &'static [&'static [u8]]; fn name(&self) -> &'static str { Self::NAMES[(*self).into()] } fn bc(&self) -> &'static [u8] { Self::BYTES[(*self).into()] } fn all() -> &'static [Self]; } #[repr(usize)] #[derive(Copy, Clone, Debug)] pub enum StdMod { Block = 0, Event = 1, Time = 2, } #[repr(usize)] #[derive(Copy, Clone, Debug)] pub enum UserMod { Store = 0, EventProxy = 1, } #[repr(usize)] #[derive(Copy, Clone, Debug)] pub enum UserTx { StoreU64 = 0, EmitEvent = 1, StoreSysBlock = 2, StoreSysTime = 3, } impl Into<usize> for StdMod { fn into(self) -> usize { self as usize } } impl Into<usize> for UserMod { fn into(self) -> usize { self as usize } } impl Into<usize> for UserTx { fn into(self) -> usize { self as usize } } impl BinAsset for StdMod { const NAMES: &'static [&'static str] = STD_MODULES; const BYTES: &'static [&'static [u8]] = STD_BYTECODE; fn all() -> &'static [Self] { &[Self::Block, Self::Event, Self::Time] } } impl BinAsset for UserMod { const NAMES: &'static [&'static str] = USER_MODULES; const BYTES: &'static [&'static [u8]] = USER_BYTECODE; fn all() -> &'static [Self] { &[Self::Store, Self::EventProxy] } } impl BinAsset for UserTx { const NAMES: &'static [&'static str] = TX_NAMES; const BYTES: &'static [&'static [u8]] = TX_BYTECODE; fn all() -> &'static [Self] { &[ Self::StoreU64, Self::EmitEvent, Self::StoreSysBlock, Self::StoreSysTime, ] } }
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use { crate::buffer_writer::BufferWriter, bitfield::bitfield, failure::{bail, ensure, Error}, zerocopy::{AsBytes, ByteSlice, ByteSliceMut, FromBytes, LayoutVerified, Unaligned}, }; // IEEE Std 802.11-2016, 9.4.2.1, Table 9-77 const IE_ID_SSID: u8 = 0; const IE_ID_SUPPORTED_RATES: u8 = 1; const IE_ID_DSSS_PARAM_SET: u8 = 3; const IE_ID_TIM: u8 = 5; const IE_ID_EXT_SUPPORTED_RATES: u8 = 50; // IEEE Std 802.11-2016, 9.4.2.2 const SSID_IE_MIN_BODY_LEN: usize = 0; const SSID_IE_MAX_BODY_LEN: usize = 32; // IEEE Std 802.11-2016, 9.4.2.3 const SUPP_RATES_IE_MIN_BODY_LEN: usize = 1; const SUPP_RATES_IE_MAX_BODY_LEN: usize = 8; // IEEE Std 802.11-2016, 9.4.2.4 const DSSS_PARAM_SET_IE_BODY_LEN: usize = 1; // IEEE Std 802.11-2016, 9.4.2.6 const TIM_IE_MIN_PVB_LEN: usize = 1; const TIM_IE_MAX_PVB_LEN: usize = 251; // IEEE Std 802.11-2016, 9.4.2.13 const EXT_SUPP_RATES_IE_MIN_BODY_LEN: usize = 1; const EXT_SUPP_RATES_IE_MAX_BODY_LEN: usize = 255; // IEEE Std 802.11-2016, 9.4.2.1 const IE_HDR_LEN: usize = 2; #[derive(FromBytes, AsBytes, Unaligned)] #[repr(C, packed)] pub struct InfoElementHdr { pub id: u8, pub body_len: u8, } impl InfoElementHdr { pub fn body_len(&self) -> usize { self.body_len as usize } } // IEEE Std 802.11-2016, 9.4.2.3 bitfield! { #[derive(PartialEq)] pub struct SupportedRate(u8); impl Debug; pub rate, set_rate: 6, 0; pub basic, set_basic: 7; pub value, _: 7,0; } // IEEE Std 802.11-2016, 9.2.4.6 bitfield! { #[derive(PartialEq)] pub struct BitmapControl(u8); impl Debug; pub group_traffic, set_group_traffic: 0; pub offset, set_offset: 7, 1; pub value, _: 7,0; } impl BitmapControl { pub fn from_bytes(bytes: &[u8]) -> Option<BitmapControl> { if bytes.is_empty() { None } else { Some(BitmapControl(bytes[0])) } } } // IEEE Std 802.11-2016, 9.4.2.6 const TIM_FIXED_FIELD_BYTES: usize = 3; pub struct Tim<B: ByteSlice> { pub dtim_count: u8, pub dtim_period: u8, pub bmp_ctrl: u8, pub partial_virtual_bmp: B, } impl<B: ByteSlice> Tim<B> { pub fn len(&self) -> usize { TIM_FIXED_FIELD_BYTES + &self.partial_virtual_bmp[..].len() } pub fn is_traffic_buffered(&self, aid: usize) -> bool { let n1 = BitmapControl(self.bmp_ctrl).offset() as usize * 2; let octet = aid / 8; let pvb = &self.partial_virtual_bmp[..]; let carries_aid = n1 <= octet && octet < pvb.len() + n1; carries_aid && pvb[octet - n1] & (1 << (aid % 8)) != 0 } } pub struct InfoElementReader<'a>(&'a [u8]); impl<'a> InfoElementReader<'a> { pub fn has_remaining(&self) -> bool { !self.0.is_empty() } pub fn remaining(&self) -> &'a [u8] { self.0 } } impl<'a> Iterator for InfoElementReader<'a> { type Item = InfoElement<&'a [u8]>; fn next(&mut self) -> Option<InfoElement<&'a [u8]>> { let (item, remaining) = InfoElement::parse(&self.0[..])?; self.0 = remaining; Some(item) } } pub struct InfoElementWriter<B: ByteSliceMut> { w: BufferWriter<B>, } impl<B: ByteSliceMut> InfoElementWriter<B> { pub fn new(w: BufferWriter<B>) -> InfoElementWriter<B> { InfoElementWriter { w } } pub fn write_ssid(mut self, ssid: &[u8]) -> Result<Self, Error> { ensure!(ssid.len() <= SSID_IE_MAX_BODY_LEN, "SSID '{:x?}' > 32 bytes", ssid); ensure!( self.w.remaining_bytes() >= IE_HDR_LEN + ssid.len(), "buffer too short to write SSID IE" ); let w = self.w.write_bytes(&[IE_ID_SSID, ssid.len() as u8])?.write_bytes(ssid)?; Ok(InfoElementWriter { w }) } pub fn write_supported_rates(mut self, rates: &[u8]) -> Result<Self, Error> { ensure!(rates.len() >= SUPP_RATES_IE_MIN_BODY_LEN, "supported rates is empty",); ensure!( rates.len() <= SUPP_RATES_IE_MAX_BODY_LEN, "too many supported rates; max: {}, got: {}", SUPP_RATES_IE_MAX_BODY_LEN, rates.len() ); ensure!( self.w.remaining_bytes() >= IE_HDR_LEN + rates.len(), "buffer too short to write supported rates IE" ); let w = self.w.write_bytes(&[IE_ID_SUPPORTED_RATES, rates.len() as u8])?.write_bytes(rates)?; Ok(InfoElementWriter { w }) } pub fn write_dsss_param_set(mut self, chan: u8) -> Result<Self, Error> { ensure!( self.w.remaining_bytes() >= IE_HDR_LEN + DSSS_PARAM_SET_IE_BODY_LEN, "buffer too short to write DSSS param set IE" ); let w = self.w.write_bytes(&[IE_ID_DSSS_PARAM_SET, DSSS_PARAM_SET_IE_BODY_LEN as u8, chan])?; Ok(InfoElementWriter { w }) } pub fn write_tim<C: ByteSliceMut>(mut self, tim: &Tim<C>) -> Result<Self, Error> { ensure!( tim.partial_virtual_bmp.len() >= TIM_IE_MIN_PVB_LEN, "partial virtual bitmap is empty", ); ensure!( tim.partial_virtual_bmp.len() <= TIM_IE_MAX_PVB_LEN, "partial virtual bitmap too large; max: {}, got {}", TIM_IE_MAX_PVB_LEN, tim.partial_virtual_bmp.len() ); ensure!( self.w.remaining_bytes() >= IE_HDR_LEN + tim.len(), "buffer too short to write TIM IE" ); let w = self .w .write_bytes(&[IE_ID_TIM, tim.len() as u8])? .write_bytes(&[tim.dtim_count, tim.dtim_period, tim.bmp_ctrl])? .write_bytes(&tim.partial_virtual_bmp[..])?; Ok(InfoElementWriter { w }) } pub fn close(mut self) -> BufferWriter<B> { self.w } } pub enum InfoElement<B: ByteSlice> { // IEEE Std 802.11-2016, 9.4.2.2 Ssid(B), // IEEE Std 802.11-2016, 9.4.2.3 SupportedRates(B), // IEEE Std 802.11-2016, 9.4.2.4 DsssParamSet { channel: u8 }, // IEEE Std 802.11-2016, 9.4.2.6 Tim(Tim<B>), // IEEE Std 802.11-2016, 9.4.2.13 ExtSupportedRates(B), Unsupported { id: u8, body: B }, } impl<B: ByteSlice> InfoElement<B> { pub fn parse(bytes: B) -> Option<(InfoElement<B>, B)> { let (hdr, body) = LayoutVerified::<B, InfoElementHdr>::new_unaligned_from_prefix(bytes)?; if hdr.body_len() > body.len() { return None; } let (body, remaining) = body.split_at(hdr.body_len()); match hdr.id { // IEEE Std 802.11-2016, 9.4.2.2 IE_ID_SSID => { let ssid = parse_ie_with_bounds(body, SSID_IE_MIN_BODY_LEN, SSID_IE_MAX_BODY_LEN)?; Some((InfoElement::Ssid(ssid), remaining)) } // IEEE Std 802.11-2016, 9.4.2.3 IE_ID_SUPPORTED_RATES => { let rates = parse_ie_with_bounds( body, SUPP_RATES_IE_MIN_BODY_LEN, SUPP_RATES_IE_MAX_BODY_LEN, )?; Some((InfoElement::SupportedRates(rates), remaining)) } // IEEE Std 802.11-2016, 9.4.2.4 IE_ID_DSSS_PARAM_SET => { let param_set = parse_ie_with_bounds( body, DSSS_PARAM_SET_IE_BODY_LEN, DSSS_PARAM_SET_IE_BODY_LEN, )?; Some((InfoElement::DsssParamSet { channel: param_set[0] }, remaining)) } // IEEE Std 802.11-2016, 9.4.2.6 IE_ID_TIM => Some((InfoElement::Tim(parse_tim(body)?), remaining)), // IEEE Std 802.11-2016, 9.4.2.13 IE_ID_EXT_SUPPORTED_RATES => { let rates = parse_ie_with_bounds( body, EXT_SUPP_RATES_IE_MIN_BODY_LEN, EXT_SUPP_RATES_IE_MAX_BODY_LEN, )?; Some((InfoElement::ExtSupportedRates(rates), remaining)) } // All other IEs are considered unsupported. id => Some((InfoElement::Unsupported { id, body }, remaining)), } } } fn parse_ie_with_bounds<B: ByteSlice>(body: B, min_len: usize, max_len: usize) -> Option<B> { if body.len() < min_len || body.len() > max_len { None } else { Some(body) } } fn parse_tim<B: ByteSlice>(body: B) -> Option<Tim<B>> { let (body, pvb) = LayoutVerified::<B, [u8; 3]>::new_unaligned_from_prefix(body)?; if pvb.len() < TIM_IE_MIN_PVB_LEN || pvb.len() > TIM_IE_MAX_PVB_LEN { None } else { Some(Tim { dtim_count: body[0], dtim_period: body[1], bmp_ctrl: body[2], partial_virtual_bmp: pvb, }) } } // IEEE Std 802.11-2016, 9.4.2.2 fn is_wildcard_ssid<B: ByteSlice>(ssid: B) -> bool { ssid.len() == 0 } #[cfg(test)] mod tests { use super::*; #[test] fn parse_ie_chain() { #[rustfmt::skip] let bytes = [ 0, 5, 1, 2, 3, 4, 5, // SSID IE 254, 3, 1, 2, // Unsupported IE 3, 1, 5, 5, 4, 3, 2, 1, // Supported Rates IE 221, 222, 223, 224 // Abitrary data: this should be skipped ]; // Found (SSID, Supported-Rates, Unknown) let mut found_ies = (false, false, false); let mut iter = InfoElementReader(&bytes[..]); for element in &mut iter { match element { InfoElement::Ssid(ssid) => { assert!(!found_ies.0); found_ies.0 = true; assert_eq!([1, 2, 3, 4, 5], ssid); } InfoElement::SupportedRates(rates) => { assert!(!found_ies.1); found_ies.1 = true; assert_eq!([5, 4, 3, 2, 1], rates); } InfoElement::Unsupported { id, body } => { assert!(!found_ies.2); found_ies.2 = true; assert_eq!(254, id); assert_eq!([1, 2, 3], body); } _ => panic!("unexpected IE"), } } assert!(found_ies.0, "SSID IE not present"); assert!(found_ies.1, "Supported Rates IE not present"); assert!(found_ies.2, "Unknown IE not present"); assert_eq!([221, 222, 223, 224], iter.remaining()); } #[test] fn parse_ssid() { match InfoElement::parse(&[0, 5, 1, 2, 3, 4, 5, 6, 7][..]) { Some((InfoElement::Ssid(ssid), remaining)) => { assert_eq!([1, 2, 3, 4, 5], ssid); assert_eq!([6, 7], remaining) } _ => panic!("error parsing SSID IE"), } } #[test] fn parse_ssid_min_max_len() { // min length (wildcard SSID) match InfoElement::parse(&[0, 0][..]) { Some((InfoElement::Ssid(ssid), _)) => { assert!(ssid.is_empty()); assert!(is_wildcard_ssid(ssid)); } _ => panic!("error parsing SSID IE"), } // max length let mut bytes = vec![0, 32]; bytes.extend_from_slice(&[1; 32]); match InfoElement::parse(&bytes[..]) { Some((InfoElement::Ssid(ssid), _)) => { assert_eq!([1; 32], ssid); assert!(!is_wildcard_ssid(ssid)); } _ => panic!("error parsing SSID IE"), } } #[test] fn parse_ssid_invalid() { // too large let mut bytes = vec![0, 33]; bytes.extend_from_slice(&[1; 33]); assert!(InfoElement::parse(&bytes[..]).is_none()); // corrupted assert!(InfoElement::parse(&[0, 5, 1, 2][..]).is_none()); } #[test] fn parse_supported_rates() { match InfoElement::parse(&[1, 5, 1, 2, 3, 4, 5, 6, 7][..]) { Some((InfoElement::SupportedRates(rates), remaining)) => { assert_eq!([1, 2, 3, 4, 5], rates); assert_eq!([6, 7], remaining) } _ => panic!("error parsing supported rates IE"), } } #[test] fn parse_supported_rates_min_max_le() { // min length match InfoElement::parse(&[1, 1, 1][..]) { Some((InfoElement::SupportedRates(rates), _)) => assert_eq!([1], rates), _ => panic!("error parsing supported rates IE"), } // max length match InfoElement::parse(&[1, 8, 1, 2, 3, 4, 5, 6, 7, 8][..]) { Some((InfoElement::SupportedRates(rates), _)) => { assert_eq!([1, 2, 3, 4, 5, 6, 7, 8], rates) } _ => panic!("error parsing supported rates IE"), } } #[test] fn parse_supported_rates_invalid() { // too short assert!(InfoElement::parse(&[1, 0][..]).is_none()); // too large let mut bytes = vec![1, 9]; bytes.extend_from_slice(&[1; 9]); assert!(InfoElement::parse(&bytes[..]).is_none()); // corrupted assert!(InfoElement::parse(&[1, 5, 1, 2][..]).is_none()); } #[test] fn parse_dsss_param_set() { match InfoElement::parse(&[3, 1, 11, 6, 7][..]) { Some((InfoElement::DsssParamSet { channel }, remaining)) => { assert_eq!(11, channel); assert_eq!([6, 7], remaining) } _ => panic!("error parsing DSSS param set IE"), } } #[test] fn parse_dsss_param_set_invalid() { // too long assert!(InfoElement::parse(&[3, 2, 1, 2][..]).is_none()); // too short assert!(InfoElement::parse(&[3, 0][..]).is_none()); // corrupted assert!(InfoElement::parse(&[3, 1][..]).is_none()); } #[test] fn parse_tim() { match InfoElement::parse(&[5, 6, 1, 2, 3, 4, 5, 6, 7, 8][..]) { Some((InfoElement::Tim(tim), remaining)) => { assert_eq!(1, tim.dtim_count); assert_eq!(2, tim.dtim_period); assert_eq!(3, tim.bmp_ctrl); assert_eq!([4, 5, 6], tim.partial_virtual_bmp); assert_eq!([7, 8], remaining) } _ => panic!("error parsing TIM IE"), } } #[test] fn parse_tim_min_max_len() { // min length match InfoElement::parse(&[5, 4, 1, 2, 3, 4][..]) { Some((InfoElement::Tim(tim), _)) => { assert_eq!(1, tim.dtim_count); assert_eq!(2, tim.dtim_period); assert_eq!(3, tim.bmp_ctrl); assert_eq!([4], tim.partial_virtual_bmp); } _ => panic!("error parsing TIM IE"), } // max length let mut bytes = vec![5, 254]; bytes.extend_from_slice(&[1; 254]); match InfoElement::parse(&bytes[..]) { Some((InfoElement::Tim(tim), _)) => { assert_eq!(1, tim.dtim_count); assert_eq!(1, tim.dtim_period); assert_eq!(1, tim.bmp_ctrl); assert_eq!(&[1; 251][..], tim.partial_virtual_bmp); } _ => panic!("error parsing TIM IE"), } } #[test] fn parse_tim_invalid() { // too short assert!(InfoElement::parse(&[5, 3, 1, 2, 3][..]).is_none()); // too long let mut bytes = vec![5, 255]; bytes.extend_from_slice(&[1; 255]); assert!(InfoElement::parse(&bytes[..]).is_none()); // corrupted assert!(InfoElement::parse(&[5, 3, 1, 2][..]).is_none()); } #[test] fn parse_unsupported_ie() { match InfoElement::parse(&[254, 3, 1, 2, 3, 6, 7][..]) { Some((InfoElement::Unsupported { id, body }, remaining)) => { assert_eq!(254, id); assert_eq!([1, 2, 3], body); assert_eq!([6, 7], remaining); } _ => panic!("error parsing unknown IE"), } } #[test] fn write_parse_many_ies() { let mut buf = vec![222u8; 510]; InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_ssid("fuchsia".as_bytes()) .expect("error writing SSID IE") .write_supported_rates(&[1u8, 2, 3, 4]) .expect("error writing supported rates IE") .write_dsss_param_set(7) .expect("error writing DSSS param set IE") .write_tim(&Tim { dtim_count: 1, dtim_period: 2, bmp_ctrl: 3, partial_virtual_bmp: &mut [5u8; 10][..], }) .expect("error writing TIM IE"); // Found (SSID, Supported-Rates, DSSS, Tim) let mut found_ies = (false, false, false, false); let mut iter = InfoElementReader(&buf[..]); for element in &mut iter { match element { InfoElement::Ssid(ssid) => { assert!(!found_ies.0); found_ies.0 = true; assert_eq!("fuchsia".as_bytes(), ssid); } InfoElement::SupportedRates(rates) => { assert!(!found_ies.1); found_ies.1 = true; assert_eq!([1, 2, 3, 4], rates); } InfoElement::DsssParamSet { channel } => { assert!(!found_ies.2); found_ies.2 = true; assert_eq!(7, channel); } InfoElement::Tim(tim) => { assert!(!found_ies.3); found_ies.3 = true; assert_eq!(1, tim.dtim_count); assert_eq!(2, tim.dtim_period); assert_eq!(3, tim.bmp_ctrl); assert_eq!(&[5u8; 10], tim.partial_virtual_bmp); } _ => (), } } assert!(found_ies.0, "SSID IE not present"); assert!(found_ies.1, "Supported Rates IE not present"); assert!(found_ies.2, "DSSS IE not present"); assert!(found_ies.3, "TIM IE not present"); } #[test] fn write_ssid() { let mut buf = vec![0u8; 50]; InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_ssid("fuchsia".as_bytes()) .expect("error writing SSID IE"); assert_eq!(&buf[..2][..], &[0u8, 7][..]); assert_eq!(&buf[2..9][..], "fuchsia".as_bytes()); assert!(is_zero(&buf[9..])); } #[test] fn write_ssid_wildcard() { let mut buf = vec![0u8; 50]; InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_ssid(&[]) .expect("error writing SSID IE"); assert!(is_zero(&buf[2..])); } #[test] fn write_ssid_buffer_too_short() { let mut buf = vec![0u8; 4]; let result = InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_ssid("fuchsia".as_bytes()); assert!(result.is_err()); assert!(is_zero(&buf[..])); } #[test] fn write_ssid_too_large() { let mut buf = vec![0u8; 50]; let result = InfoElementWriter::new(BufferWriter::new(&mut buf[..])).write_ssid(&[4u8; 33][..]); assert!(result.is_err()); assert!(is_zero(&buf[..])); } #[test] fn write_supported_rates() { let mut buf = vec![0u8; 50]; InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_supported_rates(&[1u8, 2, 3, 4]) .expect("error writing supported rates IE"); assert_eq!(&buf[..2][..], &[1u8, 4][..]); assert_eq!(&buf[2..6], &[1u8, 2, 3, 4][..]); assert!(is_zero(&buf[7..])); } #[test] fn write_supported_rates_buffer_too_short() { let mut buf = vec![0u8; 4]; let result = InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_supported_rates(&[1u8, 2, 3, 4]); assert!(result.is_err()); assert!(is_zero(&buf[..])); } #[test] fn write_supported_rates_max_rates() { let mut buf = vec![0u8; 50]; InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_supported_rates(&[1u8, 2, 3, 4, 5, 6, 7, 8]) .expect("error writing supported rates IE"); assert_eq!(&buf[..2][..], &[1u8, 8][..]); assert_eq!(&buf[2..10], &[1u8, 2, 3, 4, 5, 6, 7, 8][..]); assert!(is_zero(&buf[10..])); } #[test] fn write_supported_rates_min_rates() { let mut buf = vec![0u8; 50]; InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_supported_rates(&[1u8]) .expect("error writing supported rates IE"); assert_eq!(&buf[..2][..], &[1u8, 1][..]); assert_eq!(buf[2], 1u8); assert!(is_zero(&buf[3..])); } #[test] fn write_supported_rates_no_rates() { let mut buf = vec![0u8; 50]; let result = InfoElementWriter::new(BufferWriter::new(&mut buf[..])).write_supported_rates(&[]); assert!(result.is_err()); assert!(is_zero(&buf[..])); } #[test] fn write_supported_rates_too_many_rates() { let mut buf = vec![0u8; 50]; let result = InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_supported_rates(&[1u8, 2, 3, 4, 5, 6, 7, 8, 9]); assert!(result.is_err()); assert!(is_zero(&buf[..])); } #[test] fn write_dsss_param_set() { let mut buf = vec![0u8; 50]; InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_dsss_param_set(77) .expect("error writing DSSS param set IE"); assert_eq!(&buf[..2][..], &[3u8, 1][..]); assert_eq!(buf[2], 77); assert!(is_zero(&buf[3..])); } #[test] fn write_dsss_param_set_buffer_too_short() { let mut buf = vec![0u8; 2]; let result = InfoElementWriter::new(BufferWriter::new(&mut buf[..])).write_dsss_param_set(77); assert!(result.is_err()); assert!(is_zero(&buf[..])); } #[test] fn write_tim() { let mut buf = vec![0u8; 50]; InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_tim(&Tim { dtim_count: 1, dtim_period: 2, bmp_ctrl: 3, partial_virtual_bmp: &mut [1u8, 2, 3, 4, 5, 6][..], }) .expect("error writing TIM IE"); assert_eq!(&buf[..2][..], &[5u8, 9][..]); assert_eq!(buf[2], 1); assert_eq!(buf[3], 2); assert_eq!(buf[4], 3); assert_eq!(&buf[5..11][..], &[1u8, 2, 3, 4, 5, 6][..]); assert!(is_zero(&buf[11..])); } #[test] fn write_tim_too_short_buffer() { let mut buf = vec![0u8; 5]; let result = InfoElementWriter::new(BufferWriter::new(&mut buf[..])).write_tim(&Tim { dtim_count: 1, dtim_period: 2, bmp_ctrl: 3, partial_virtual_bmp: &mut [1u8, 2, 3, 4, 5, 6][..], }); assert!(result.is_err()); assert!(is_zero(&buf[..])); } #[test] fn write_tim_too_short_pvb() { let mut buf = vec![0u8; 50]; let result = InfoElementWriter::new(BufferWriter::new(&mut buf[..])).write_tim(&Tim { dtim_count: 1, dtim_period: 2, bmp_ctrl: 3, partial_virtual_bmp: &mut [][..], }); assert!(result.is_err()); assert!(is_zero(&buf[..])); } #[test] fn write_tim_too_large_pvb() { let mut buf = vec![0u8; 50]; let result = InfoElementWriter::new(BufferWriter::new(&mut buf[..])).write_tim(&Tim { dtim_count: 1, dtim_period: 2, bmp_ctrl: 3, partial_virtual_bmp: &mut [3u8; 252][..], }); assert!(result.is_err()); assert!(is_zero(&buf[..])); } #[test] fn write_tim_min_pvb() { let mut buf = vec![0u8; 50]; InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_tim(&Tim { dtim_count: 1, dtim_period: 2, bmp_ctrl: 3, partial_virtual_bmp: &mut [5u8][..], }) .expect("error writing TIM IE"); assert_eq!(&buf[..2][..], &[5u8, 4][..]); assert_eq!(buf[2], 1); assert_eq!(buf[3], 2); assert_eq!(buf[4], 3); assert_eq!(buf[5], 5); assert!(is_zero(&buf[6..])); } #[test] fn write_tim_max_pvb() { let mut buf = vec![0u8; 300]; InfoElementWriter::new(BufferWriter::new(&mut buf[..])) .write_tim(&Tim { dtim_count: 1, dtim_period: 2, bmp_ctrl: 3, partial_virtual_bmp: &mut [5u8; 251][..], }) .expect("error writing TIM IE"); assert_eq!(&buf[..2][..], &[5u8, 254][..]); assert_eq!(buf[2], 1); assert_eq!(buf[3], 2); assert_eq!(buf[4], 3); assert_eq!(&buf[5..256], &[5u8; 251][..]); assert!(is_zero(&buf[257..])); } #[test] fn parse_ext_supported_rates() { match InfoElement::parse(&[50, 5, 1, 2, 3, 4, 5, 6, 7][..]) { Some((InfoElement::ExtSupportedRates(rates), remaining)) => { assert_eq!([1, 2, 3, 4, 5], rates); assert_eq!([6, 7], remaining) } _ => panic!("error parsing extended supported rates IE"), } } #[test] fn parse_ext_supported_rates_min_max_len() { // min length match InfoElement::parse(&[50, 1, 8][..]) { Some((InfoElement::ExtSupportedRates(rates), _)) => assert_eq!([8], rates), _ => panic!("error parsing extended supported rates IE"), } // max length let mut bytes = vec![50, 255]; bytes.extend_from_slice(&[9; 255]); match InfoElement::parse(&bytes[..]) { Some((InfoElement::ExtSupportedRates(rates), _)) => { assert_eq!(&[9; 255][..], &rates[..]) } _ => panic!("error parsing extended supported rates IE"), } } #[test] fn parse_ext_supported_rates_invalid() { // too short assert!(InfoElement::parse(&[50, 0][..]).is_none()); // corrupted assert!(InfoElement::parse(&[50, 5, 1, 2][..]).is_none()); } #[test] fn is_traffic_buffered() { let tim = Tim { dtim_period: 0, dtim_count: 0, bmp_ctrl: 0, partial_virtual_bmp: &[0b0010010][..], }; assert!(!tim.is_traffic_buffered(0)); assert!(tim.is_traffic_buffered(1)); assert!(!tim.is_traffic_buffered(2)); assert!(!tim.is_traffic_buffered(3)); assert!(tim.is_traffic_buffered(4)); assert!(!tim.is_traffic_buffered(5)); assert!(!tim.is_traffic_buffered(6)); assert!(!tim.is_traffic_buffered(7)); assert!(!tim.is_traffic_buffered(100)); let mut bmp_ctrl = BitmapControl(0); bmp_ctrl.set_offset(1); let tim = Tim { bmp_ctrl: bmp_ctrl.value(), ..tim }; // Offset of 1 means "skip 16 bits" assert!(!tim.is_traffic_buffered(15)); assert!(!tim.is_traffic_buffered(16)); assert!(tim.is_traffic_buffered(17)); assert!(!tim.is_traffic_buffered(18)); assert!(!tim.is_traffic_buffered(19)); assert!(tim.is_traffic_buffered(20)); assert!(!tim.is_traffic_buffered(21)); assert!(!tim.is_traffic_buffered(22)); assert!(!tim.is_traffic_buffered(100)); } pub fn is_zero(slice: &[u8]) -> bool { slice.iter().all(|&x| x == 0) } }
mod system; pub use self::system::System;
use tonic_build::compile_protos; fn main() -> Result<(), Box<dyn std::error::Error>> { // compiling protos using path on build time let protobuf_definitions = ["proto/engine.proto"]; for def in protobuf_definitions.iter() { compile_protos(def)?; } Ok(()) }
use std::cmp::{max, min}; use std::collections::{HashMap, HashSet}; use itertools::Itertools; use whiteread::parse_line; fn main() { let (n, m, k): (usize, usize, usize) = parse_line().unwrap(); if n <= k { // すべてのパターンok } for i in 1..=n + m { if i <= k { continue; } nCr(i as u64 - 1 , k as u64); let wi = k + 1; let bi = wi - wi; n - k - 1; } } /// 極力u64を超えないようにnCrを計算する fn nCr(n: u64, r: u64) -> u128 { if n < r { panic!("cant n < r, {}C{}", n, r); } if r == 0 { return 0; } let mut ans: u128 = 1; if r > n - r { let mut bunbo = (1..=n - r).rev().collect::<Vec<u64>>(); for i in r + 1..=n { ans *= i as u128; if let Some(last) = bunbo.get(bunbo.len() - 1) { if ans % *last as u128 == 0 { ans /= *last as u128; bunbo.pop(); } } } } else { let mut bunbo = (1..=r).rev().collect::<Vec<u64>>(); for i in n - r + 1..=n { ans *= i as u128; if let Some(last) = bunbo.get(bunbo.len() - 1) { if ans % *last as u128 == 0 { ans /= *last as u128; bunbo.pop(); } } } } return ans; } #[cfg(test)] mod tests { use super::*; #[test] fn test_nCr() { assert_eq!(nCr(5, 2), 10); assert_eq!(nCr(5, 3), 10); assert_eq!(nCr(1, 1), 1); assert_eq!(nCr(5, 1), 5); assert_eq!(nCr(5, 0), 0); assert_eq!(nCr(2_u64 * 100000, 2), 19999900000); } }
#[derive(Debug)] #[allow(dead_code)] pub struct TmpTypeElement<'a> { pub t: &'a str, pub level: usize, } impl<'a> PartialEq<TmpTypeElement<'a>> for TmpTypeElement<'a> { fn eq<'b>(&self, other: &TmpTypeElement<'b>) -> bool { return self.t.eq(other.t) && self.level == other.level; } } #[allow(dead_code)] impl<'a> TmpTypeElement<'a> { pub fn new(t: &'a str, level: usize) -> TmpTypeElement<'a> { TmpTypeElement { t: t, level: level } } pub fn from_str(s: &'a str) -> Vec<TmpTypeElement<'a>> { let mut re: Vec<TmpTypeElement<'a>> = Vec::new(); for (i, s) in s.split('<').enumerate() { re.push(TmpTypeElement::new(s, i)); } return re; } } #[cfg(test)] mod tests { use tmp_type_element::TmpTypeElement; #[test] fn new() { let s1 = "std::vector"; let t1 = TmpTypeElement{ t: &s1, level: 0}; let t2 = TmpTypeElement::new(&s1, 0); assert_eq!(t1, t2); } #[test] fn from_str() { let s = "std::vector<std::basic_string<char16_t>>"; assert_eq!( vec![TmpTypeElement::new("std::vector", 0), TmpTypeElement::new("std::basic_string", 1), TmpTypeElement::new("char16_t>>", 2)], TmpTypeElement::from_str(s) ); } #[test] fn eq() { let s1 = "std::vector"; let s2 = "std::basic_string"; let t1 = TmpTypeElement::new(&s1, 0); let t2 = TmpTypeElement::new(&s1, 0); assert_eq!(t1, t2); let t3 = TmpTypeElement::new(&s1, 1); assert!(t1.ne(&t3)); let t4 = TmpTypeElement::new(&s2, 0); assert!(t1.ne(&t4)); } }
use crate::{http, trace_labels, Outbound}; use linkerd_app_core::{config, errors, http_tracing, svc, Error}; use tracing::debug_span; impl<H, HSvc> Outbound<H> where H: svc::NewService<http::Logical, Service = HSvc> + Clone + Send + 'static, HSvc: svc::Service<http::Request<http::BoxBody>, Response = http::Response<http::BoxBody>>, HSvc: Send + 'static, HSvc::Error: Into<Error>, HSvc::Future: Send, { pub fn push_http_server( self, ) -> Outbound< impl svc::NewService< http::Logical, Service = impl svc::Service< http::Request<http::BoxBody>, Response = http::Response<http::BoxBody>, Error = Error, Future = impl Send, > + Clone, > + Clone, > { let Self { config, runtime: rt, stack: http, } = self; let config::ProxyConfig { dispatch_timeout, max_in_flight_requests, buffer_capacity, .. } = config.proxy; let stack = http .check_new_service::<http::Logical, _>() .push_on_response( svc::layers() .push(http::BoxRequest::layer()) // Limit the number of in-flight requests. When the proxy is // at capacity, go into failfast after a dispatch timeout. If // the router is unavailable, then spawn the service on a // background task to ensure it becomes ready without new // requests being processed. .push(svc::layer::mk(svc::SpawnReady::new)) .push(svc::ConcurrencyLimit::layer(max_in_flight_requests)) .push(svc::FailFast::layer("HTTP Server", dispatch_timeout)) .push_spawn_buffer(buffer_capacity) .push(rt.metrics.http_errors.clone()) // Synthesizes responses for proxy errors. .push(errors::layer()) // Initiates OpenCensus tracing. .push(http_tracing::server(rt.span_sink.clone(), trace_labels())) .push(http::BoxResponse::layer()), ) // Convert origin form HTTP/1 URIs to absolute form for Hyper's // `Client`. .push(http::NewNormalizeUri::layer()) // Record when a HTTP/1 URI originated in absolute form .push_on_response(http::normalize_uri::MarkAbsoluteForm::layer()) .instrument(|l: &http::Logical| debug_span!("http", v = %l.protocol)) .check_new_service::<http::Logical, http::Request<http::BoxBody>>(); Outbound { config, runtime: rt, stack, } } }
use aoc2018::*; use std::ops::RangeInclusive; #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Tile { Clay, Still, Flowing, Empty, } struct Tiles { source: (i64, i64), tiles: HashMap<(i64, i64), Tile>, ry: RangeInclusive<i64>, ry_with_source: RangeInclusive<i64>, } impl Tiles { pub fn load(input: &str) -> Tiles { let mut it = input.lines(); let mut tiles = HashMap::new(); // water source let source = (500, 0); let mut ry = MinMax::default(); while let Some((x, y)) = parse(&mut it) { for x in x.0..=x.1 { for y in y.0..=y.1 { tiles.insert((x, y), Tile::Clay); ry.sample(y); } } } let mut ry_with_source = ry.clone(); ry_with_source.sample(source.1); return Tiles { source, tiles, ry: ry.range_inclusive(), ry_with_source: ry_with_source.range_inclusive(), }; fn parse<'a>(it: &mut impl Iterator<Item = &'a str>) -> Option<((i64, i64), (i64, i64))> { let line = it.next()?; let x = line.split(", ").nth(0)?; let x = str::parse(&x[2..]).ok()?; let x = (x, x); let y = line.split(", ").nth(1)?; let (is_y, y) = match y.split_at(2) { ("y=", rest) => (true, rest), (_, rest) => (false, rest), }; let y = { let mut p = y.split(".."); (str::parse(p.next()?).ok()?, str::parse(p.next()?).ok()?) }; let (x, y) = if is_y { (x, y) } else { (y, x) }; Some((x, y)) } } /// Visualize the tiles. fn visualize(&self) -> Result<(), Error> { use std::io::{self, Write}; let stdout = io::stdout(); let mut out = stdout.lock(); let (x0, x1) = self .tiles .iter() .map(|t| (t.0).0) .minmax() .into_option() .ok_or_else(|| format_err!("no x bounds"))?; for y in self.ry.clone() { for x in x0..=x1 { if (x, y) == self.source { write!(out, "+")?; continue; } let tile = match self.get((x, y)) { Some(tile) => tile, None => { write!(out, "?")?; continue; } }; match tile { Tile::Clay => write!(out, "#")?, Tile::Still => write!(out, "~")?, Tile::Flowing => write!(out, "|")?, Tile::Empty => write!(out, ".")?, } } writeln!(out, "")?; } Ok(()) } /// Check what is on the given tile. /// /// Returns `None` if the request is out of bounds, otherwise returns the tile. pub fn get(&self, (x, y): (i64, i64)) -> Option<Tile> { if !self.ry_with_source.contains(&y) { return None; } Some(self.tiles.get(&(x, y)).cloned().unwrap_or(Tile::Empty)) } /// Fill x range with something. pub fn fill_x(&mut self, x: RangeInclusive<i64>, y: i64, tile: Tile) -> Result<(), Error> { if !self.ry.contains(&y) { return Ok(()); } for x in x { if let Some(existing) = self.tiles.insert((x, y), tile) { if existing != Tile::Flowing { bail!("Already had thing `{:?}` at tile {:?}", existing, (x, y)); } } } Ok(()) } /// Fill y range with something. pub fn fill_y(&mut self, x: i64, y: RangeInclusive<i64>, tile: Tile) -> Result<(), Error> { for y in y { if !self.ry.contains(&y) { continue; } if let Some(existing) = self.tiles.insert((x, y), tile) { bail!("Already had thing `{:?}` at tile {:?}", existing, (x, y)); } } Ok(()) } } fn solve(tiles: &mut Tiles) -> Result<(usize, usize), Error> { // queue of water "drops" let mut drop_queue = VecDeque::new(); drop_queue.push_back(tiles.source); let mut floor_queue = VecDeque::new(); while !drop_queue.is_empty() || !floor_queue.is_empty() { while let Some((x, y)) = drop_queue.pop_front() { match scan_down(&tiles, (x, y)) { Some((pos, tile)) => { tiles.fill_y(x, y..=pos.1, Tile::Flowing)?; if tile != Tile::Flowing { floor_queue.push_back(pos); } } // NB: went out of bounds None => { tiles.fill_y(x, y..=*tiles.ry.end(), Tile::Flowing)?; } } } // digest the floor queue. while let Some((x, y)) = floor_queue.pop_front() { // we are on a floor that is already filled, keep trying! if let Some(Tile::Still) = tiles.get((x, y)) { floor_queue.push_back((x, y - 1)); continue; } let left = scan_floor(&tiles, (x, y), -1)?; let right = scan_floor(&tiles, (x, y), 1)?; match (left, right) { // bounded. ((Some(Tile::Clay), left), (Some(Tile::Clay), right)) => { tiles.fill_x(left.0..=right.0, y, Tile::Still)?; floor_queue.push_back((x, y - 1)); } (left, right) => { tiles.fill_x((left.1).0..=(right.1).0, y, Tile::Flowing)?; for m in vec![left, right] { match m { // NB: empty tile is another position to drop from. (Some(Tile::Empty), (x, y)) => { drop_queue.push_back((x, y + 1)); } (Some(Tile::Clay), _) | (Some(Tile::Flowing), _) | (None, _) => {} other => bail!("Unexpected tile: {:?}", other), } } } } } } // NB: just to be safe, remove the source. tiles.tiles.remove(&tiles.source); let part1 = tiles .tiles .values() .cloned() .map(|t| match t { Tile::Flowing | Tile::Still => 1, _ => 0, }) .sum(); let part2 = tiles .tiles .values() .cloned() .map(|t| match t { Tile::Still => 1, _ => 0, }) .sum(); return Ok((part1, part2)); /// Scan floor in some direction. /// /// Returns the coordinates and `None` if we hit a wall, the returned coordinates correspond to /// the last coordinates that had an open tile. /// /// Returns the open coordinate in case we no longer have a floor. /// The open coordinate is the coordinate at which the floor stopped. /// /// Otherwise, returns `None`. fn scan_floor( tiles: &Tiles, (mut x, y): (i64, i64), dir: i64, ) -> Result<(Option<Tile>, (i64, i64)), Error> { loop { match tiles.get((x + dir, y)) { Some(Tile::Clay) => return Ok((Some(Tile::Clay), (x, y))), Some(Tile::Still) => bail!("Encountered unexpected still tile at {:?}", (x, y)), _ => {} } match tiles.get((x, y + 1)) { Some(Tile::Clay) | Some(Tile::Still) => {} tile => return Ok((tile, (x, y))), } x += dir; } } fn scan_down(tiles: &Tiles, (x, mut y): (i64, i64)) -> Option<((i64, i64), Tile)> { loop { match tiles.get((x, y)) { Some(Tile::Flowing) => return Some(((x, y - 1), Tile::Flowing)), Some(Tile::Empty) => {} Some(tile) => return Some(((x, y - 1), tile)), None => return None, } y += 1; } } } fn main() -> Result<(), Error> { assert_eq!(solve(&mut Tiles::load(input_str!("day17a.txt")))?, (57, 29)); let mut tiles = Tiles::load(input_str!("day17.txt")); assert_eq!(solve(&mut tiles)?, (34244, 28202)); tiles.visualize()?; Ok(()) }
#![feature(test)] extern crate test; use hello_world::greeter_client::GreeterClient; use hello_world::HelloRequest; use futures::future; use std::time::Instant; pub mod hello_world { tonic::include_proto!("helloworld"); } #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let client = GreeterClient::connect("http://[::1]:50051").await?; let mut tasks = vec![]; for n in 1..10000 { let mut client = client.clone(); let request = tonic::Request::new(HelloRequest { name: format!("Tonic-{}", n), }); tasks.push(tokio::task::spawn(async move { let _response = client.say_hello(request).await.unwrap(); })); } let now = Instant::now(); println!("Running tasks"); let _ = future::join_all(tasks).await; println!("{}ms elapsed", now.elapsed().as_millis()); Ok(()) } #[bench] fn f_1_parallel_requests(b: &mut test::bench::Bencher) { bench_requests(b, 1); } #[bench] fn f_50_parallel_requests(b: &mut test::bench::Bencher) { bench_requests(b, 50); } #[bench] fn f_100_parallel_requests(b: &mut test::bench::Bencher) { bench_requests(b, 100); } #[bench] fn f_1000_parallel_requests(b: &mut test::bench::Bencher) { bench_requests(b, 1000); } #[tokio::main] async fn bench_requests(b: &mut test::bench::Bencher, concurrency: u32) { let client = GreeterClient::connect("https://[::1]:50051").await.unwrap(); b.iter(move || { let mut parallel = Vec::new(); for _i in 0..concurrency { let mut client = client.clone(); let request = tonic::Request::new(HelloRequest { name: format!("Tonic"), }); parallel.push(tokio::task::spawn(async move { client .say_hello(request) .await })); } async { let _ = future::join_all(parallel).await; } }); }
//! Library that decodes the binary documents contained on an APK (both resources.arsc and binary //! XMLs). //! //! It exposes also structures to query this binary files on a structured way. For example, it's //! possible to check which chunks of data a document contains, and perform specific queries //! depending on the type of chunk. #![recursion_limit = "1024"] #![cfg_attr(feature = "cargo-clippy", deny(clippy))] #![forbid(anonymous_parameters)] #![cfg_attr(feature = "cargo-clippy", warn(clippy_pedantic))] #![deny( variant_size_differences, unused_results, unused_qualifications, unused_import_braces, unsafe_code, trivial_numeric_casts, trivial_casts, missing_docs, unused_extern_crates, missing_debug_implementations, missing_copy_implementations )] // Allowing these for now: #![allow(missing_docs, unused_results)] #![cfg_attr( feature = "cargo-clippy", allow( unreadable_literal, stutter, cast_possible_truncation, cast_precision_loss, similar_names, shadow_unrelated, ) )] extern crate byteorder; extern crate encoding; extern crate failure; #[macro_use] extern crate log; extern crate xml; #[cfg(feature = "zip_decode")] extern crate zip; #[cfg(feature = "zip_decode")] pub mod apk; pub mod chunks; pub mod decoder; pub mod encoder; pub mod model; #[cfg(test)] pub mod raw_chunks; #[cfg(test)] pub mod test; pub mod visitor; /// Contents of android's resources.arsc pub const STR_ARSC: &[u8] = include_bytes!("../resources/resources.arsc");
use nalgebra::Matrix4; use crate::traits::{required::{SliceExt, Matrix4Ext}, extra::F32Compat}; ////////// F32 /////////////////////////// impl F32Compat for Matrix4<f32> { fn write_to_vf32(&self, target: &mut [f32]) { target.copy_from_slice(self.as_slice()); } } impl SliceExt<f32> for Matrix4<f32> { fn as_slice(&self) -> &[f32] { self.as_slice() } fn as_slice_mut(&mut self) -> &mut [f32] { self.as_mut_slice() } } impl Matrix4Ext<f32> for Matrix4<f32> { fn identity() -> Self { Matrix4::identity() } fn reset_from_trs_origin( &mut self, translation: &[f32], rotation: &[f32], scale: &[f32], origin: &[f32], ) { let values = &mut self.as_slice_mut(); let x = rotation[0]; let y = rotation[1]; let z = rotation[2]; let w = rotation[3]; let x2 = x + x; let y2 = y + y; let z2 = z + z; let xx = x * x2; let xy = x * y2; let xz = x * z2; let yy = y * y2; let yz = y * z2; let zz = z * z2; let wx = w * x2; let wy = w * y2; let wz = w * z2; let sx = scale[0]; let sy = scale[1]; let sz = scale[2]; let ox = origin[0]; let oy = origin[1]; let oz = origin[2]; let out0 = (1.0 - (yy + zz)) * sx; let out1 = (xy + wz) * sx; let out2 = (xz - wy) * sx; let out4 = (xy - wz) * sy; let out5 = (1.0 - (xx + zz)) * sy; let out6 = (yz + wx) * sy; let out8 = (xz + wy) * sz; let out9 = (yz - wx) * sz; let out10 = (1.0 - (xx + yy)) * sz; values[0] = out0; values[1] = out1; values[2] = out2; values[3] = 0.0; values[4] = out4; values[5] = out5; values[6] = out6; values[7] = 0.0; values[8] = out8; values[9] = out9; values[10] = out10; values[11] = 0.0; values[12] = translation[0] + ox - (out0 * ox + out4 * oy + out8 * oz); values[13] = translation[1] + oy - (out1 * ox + out5 * oy + out9 * oz); values[14] = translation[2] + oz - (out2 * ox + out6 * oy + out10 * oz); values[15] = 1.0; } fn mul_assign(&mut self, other: &Self) { *self *= other; } } ////////// F64 /////////////////////////// impl F32Compat for Matrix4<f64> { fn write_to_vf32(&self, target: &mut [f32]) { let values = self.as_slice(); //can't memcpy since it needs a cast target[0] = values[0] as f32; target[1] = values[1] as f32; target[2] = values[2] as f32; target[3] = values[3] as f32; target[4] = values[4] as f32; target[5] = values[5] as f32; target[6] = values[6] as f32; target[7] = values[7] as f32; target[8] = values[8] as f32; target[9] = values[9] as f32; target[10] = values[10] as f32; target[11] = values[11] as f32; target[12] = values[12] as f32; target[13] = values[13] as f32; target[14] = values[14] as f32; target[15] = values[15] as f32; } } impl SliceExt<f64> for Matrix4<f64> { fn as_slice(&self) -> &[f64] { self.as_slice() } fn as_slice_mut(&mut self) -> &mut [f64] { self.as_mut_slice() } } impl Matrix4Ext<f64> for Matrix4<f64> { fn identity() -> Self { Matrix4::identity() } fn reset_from_trs_origin( &mut self, translation: &[f64], rotation: &[f64], scale: &[f64], origin: &[f64], ) { let values = &mut self.as_slice_mut(); let x = rotation[0]; let y = rotation[1]; let z = rotation[2]; let w = rotation[3]; let x2 = x + x; let y2 = y + y; let z2 = z + z; let xx = x * x2; let xy = x * y2; let xz = x * z2; let yy = y * y2; let yz = y * z2; let zz = z * z2; let wx = w * x2; let wy = w * y2; let wz = w * z2; let sx = scale[0]; let sy = scale[1]; let sz = scale[2]; let ox = origin[0]; let oy = origin[1]; let oz = origin[2]; let out0 = (1.0 - (yy + zz)) * sx; let out1 = (xy + wz) * sx; let out2 = (xz - wy) * sx; let out4 = (xy - wz) * sy; let out5 = (1.0 - (xx + zz)) * sy; let out6 = (yz + wx) * sy; let out8 = (xz + wy) * sz; let out9 = (yz - wx) * sz; let out10 = (1.0 - (xx + yy)) * sz; values[0] = out0; values[1] = out1; values[2] = out2; values[3] = 0.0; values[4] = out4; values[5] = out5; values[6] = out6; values[7] = 0.0; values[8] = out8; values[9] = out9; values[10] = out10; values[11] = 0.0; values[12] = translation[0] + ox - (out0 * ox + out4 * oy + out8 * oz); values[13] = translation[1] + oy - (out1 * ox + out5 * oy + out9 * oz); values[14] = translation[2] + oz - (out2 * ox + out6 * oy + out10 * oz); values[15] = 1.0; } fn mul_assign(&mut self, other: &Self) { *self *= other; } }
// Copyright 2019 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. //! This module contains methods for creating OAuth requests and interpreting //! responses. use crate::constants::{ FUCHSIA_CLIENT_ID, OAUTH_REVOCATION_URI, OAUTH_TOKEN_EXCHANGE_URI, REDIRECT_URI, }; use crate::error::{AuthProviderError, ResultExt}; use crate::http::{HttpRequest, HttpRequestBuilder}; use failure::format_err; use fidl_fuchsia_auth::AuthProviderStatus; use hyper::StatusCode; use log::warn; use serde_derive::Deserialize; use serde_json::from_str; use std::borrow::Cow; use std::collections::HashMap; use url::{form_urlencoded, Url}; type AuthProviderResult<T> = Result<T, AuthProviderError>; #[derive(Debug, PartialEq)] pub struct AuthCode(pub String); #[derive(Debug, PartialEq)] pub struct RefreshToken(pub String); #[derive(Debug, PartialEq)] pub struct AccessToken(pub String); /// Response type for Oauth access token requests with a refresh token. #[derive(Debug, Deserialize)] struct AccessTokenResponseWithRefreshToken { pub access_token: String, pub refresh_token: String, } /// Response type for Oauth access token requests where a refresh token is not expected. #[derive(Debug, Deserialize)] struct AccessTokenResponseWithoutRefreshToken { pub access_token: String, pub expires_in: u64, } /// Error response type for Oauth requests. #[derive(Debug, Deserialize)] struct OAuthErrorResponse { pub error: String, pub error_description: Option<String>, } /// Construct an Oauth access token request using an authorization code. pub fn build_request_with_auth_code(auth_code: AuthCode) -> AuthProviderResult<HttpRequest> { let request_body = form_urlencoded::Serializer::new(String::new()) .append_pair("code", auth_code.0.as_str()) .append_pair("redirect_uri", REDIRECT_URI.as_str()) .append_pair("client_id", FUCHSIA_CLIENT_ID) .append_pair("grant_type", "authorization_code") .finish(); HttpRequestBuilder::new(OAUTH_TOKEN_EXCHANGE_URI.as_str(), "POST") .with_header("content-type", "application/x-www-form-urlencoded") .set_body(&request_body) .finish() } /// Construct an Oauth access token request using a refresh token grant. If /// `client_id` is not given the Fuchsia client id is used. pub fn build_request_with_refresh_token( refresh_token: RefreshToken, scopes: Vec<String>, client_id: Option<String>, ) -> AuthProviderResult<HttpRequest> { let request_body = form_urlencoded::Serializer::new(String::new()) .append_pair("refresh_token", refresh_token.0.as_str()) .append_pair("client_id", client_id.as_ref().map_or(FUCHSIA_CLIENT_ID, String::as_str)) .append_pair("grant_type", "refresh_token") .append_pair("scope", &scopes.join(" ")) .finish(); HttpRequestBuilder::new(OAUTH_TOKEN_EXCHANGE_URI.as_str(), "POST") .with_header("content-type", "application/x-www-form-urlencoded") .set_body(&request_body) .finish() } /// Construct an Oauth token revocation request. `credential` may be either /// an access token or refresh token. pub fn build_revocation_request(credential: String) -> AuthProviderResult<HttpRequest> { let request_body = form_urlencoded::Serializer::new(String::new()).append_pair("token", &credential).finish(); HttpRequestBuilder::new(OAUTH_REVOCATION_URI.as_str(), "POST") .with_header("content-type", "application/x-www-form-urlencoded") .set_body(&request_body) .finish() } /// Parses a response for an OAuth access token request when both a refresh token /// and access token are expected in the response. pub fn parse_response_with_refresh_token( response_body: Option<String>, status: StatusCode, ) -> AuthProviderResult<(RefreshToken, AccessToken)> { match (response_body.as_ref(), status) { (Some(response), StatusCode::OK) => { let response = from_str::<AccessTokenResponseWithRefreshToken>(&response) .auth_provider_status(AuthProviderStatus::OauthServerError)?; Ok((RefreshToken(response.refresh_token), AccessToken(response.access_token))) } (Some(response), status) if status.is_client_error() => { let error_response = from_str::<OAuthErrorResponse>(&response) .auth_provider_status(AuthProviderStatus::OauthServerError)?; let status = match error_response.error.as_str() { "invalid_grant" => AuthProviderStatus::ReauthRequired, error_code => { warn!("Got unexpected error code during auth code exchange: {}", error_code); AuthProviderStatus::OauthServerError } }; Err(AuthProviderError::new(status)) } _ => Err(AuthProviderError::new(AuthProviderStatus::OauthServerError)), } } /// Parses a response for an OAuth access token request when a refresh token is /// not expected. Returns an access token and the lifetime of the token. pub fn parse_response_without_refresh_token( response_body: Option<String>, status: StatusCode, ) -> AuthProviderResult<(AccessToken, u64)> { match (response_body.as_ref(), status) { (Some(response), StatusCode::OK) => { let response = from_str::<AccessTokenResponseWithoutRefreshToken>(&response) .auth_provider_status(AuthProviderStatus::OauthServerError)?; Ok((AccessToken(response.access_token), response.expires_in)) } (Some(response), status) if status.is_client_error() => { let response = from_str::<OAuthErrorResponse>(&response) .auth_provider_status(AuthProviderStatus::OauthServerError)?; let status = match response.error.as_str() { "invalid_grant" => AuthProviderStatus::ReauthRequired, error_code => { warn!("Got unexpected error code from access token request: {}", error_code); AuthProviderStatus::OauthServerError } }; Err(AuthProviderError::new(status)) } _ => Err(AuthProviderError::new(AuthProviderStatus::OauthServerError)), } } /// Parses a response for an Oauth revocation request. pub fn parse_revocation_response( response_body: Option<String>, status: StatusCode, ) -> AuthProviderResult<()> { match (response_body.as_ref(), status) { (_, StatusCode::OK) => Ok(()), (Some(response), status) if status.is_client_error() => { let response = from_str::<OAuthErrorResponse>(&response) .auth_provider_status(AuthProviderStatus::OauthServerError)?; warn!("Got unexpected error code during token revocation: {}", response.error); Err(AuthProviderError::new(AuthProviderStatus::OauthServerError)) } _ => Err(AuthProviderError::new(AuthProviderStatus::OauthServerError)), } } /// Parses an auth code out of a redirect URL reached through an OAuth /// authorization flow. pub fn parse_auth_code_from_redirect(url: Url) -> AuthProviderResult<AuthCode> { if (url.scheme(), url.domain(), url.path()) != (REDIRECT_URI.scheme(), REDIRECT_URI.domain(), REDIRECT_URI.path()) { return Err(AuthProviderError::new(AuthProviderStatus::InternalError) .with_cause(format_err!("Redirected to unexpected URL"))); } let params = url.query_pairs().collect::<HashMap<Cow<str>, Cow<str>>>(); if let Some(auth_code) = params.get("code") { Ok(AuthCode(auth_code.as_ref().to_string())) } else if let Some(error_code) = params.get("error") { let error_status = match error_code.as_ref() { "access_denied" => AuthProviderStatus::UserCancelled, "server_error" => AuthProviderStatus::OauthServerError, "temporarily_unavailable" => AuthProviderStatus::OauthServerError, _ => AuthProviderStatus::UnknownError, }; Err(AuthProviderError::new(error_status)) } else { Err(AuthProviderError::new(AuthProviderStatus::UnknownError) .with_cause(format_err!("Authorize redirect contained neither code nor error"))) } } #[cfg(test)] mod test { use super::*; fn url_with_query(url_base: &Url, query: &str) -> Url { let mut url = url_base.clone(); url.set_query(Some(query)); url } #[test] fn test_parse_response_with_refresh_token_success() { let response_body = Some( "{\"refresh_token\": \"test-refresh-token\", \"access_token\": \"test-access-token\"}" .to_string(), ); assert_eq!( ( RefreshToken("test-refresh-token".to_string()), AccessToken("test-access-token".to_string()) ), parse_response_with_refresh_token(response_body, StatusCode::OK).unwrap() ) } #[test] fn test_parse_response_with_refresh_token_failures() { // Expired auth token let response = "{\"error\": \"invalid_grant\", \"error_description\": \"ouch\"}".to_string(); let result = parse_response_with_refresh_token(Some(response), StatusCode::BAD_REQUEST); assert_eq!(result.unwrap_err().status, AuthProviderStatus::ReauthRequired); // Server side error let result = parse_response_with_refresh_token(None, StatusCode::INTERNAL_SERVER_ERROR); assert_eq!(result.unwrap_err().status, AuthProviderStatus::OauthServerError); // Invalid client error let response = "{\"error\": \"invalid_client\"}".to_string(); let result = parse_response_with_refresh_token(Some(response), StatusCode::UNAUTHORIZED); assert_eq!(result.unwrap_err().status, AuthProviderStatus::OauthServerError); // Malformed response let response = "{\"a malformed response\"}".to_string(); let result = parse_response_with_refresh_token(Some(response), StatusCode::OK); assert_eq!(result.unwrap_err().status, AuthProviderStatus::OauthServerError); } #[test] fn test_parse_response_without_refresh_token_success() { let response_body = Some("{\"access_token\": \"test-access-token\", \"expires_in\": 3600}".to_string()); assert_eq!( (AccessToken("test-access-token".to_string()), 3600), parse_response_without_refresh_token(response_body, StatusCode::OK).unwrap() ) } #[test] fn test_parse_response_without_refresh_token_failures() { // Expired auth token let response = "{\"error\": \"invalid_grant\", \"error_description\": \"expired\"}".to_string(); let result = parse_response_without_refresh_token(Some(response), StatusCode::BAD_REQUEST); assert_eq!(result.unwrap_err().status, AuthProviderStatus::ReauthRequired); // Server side error let result = parse_response_without_refresh_token(None, StatusCode::INTERNAL_SERVER_ERROR); assert_eq!(result.unwrap_err().status, AuthProviderStatus::OauthServerError); // Invalid client error let response = "{\"error\": \"invalid_client\"}".to_string(); let result = parse_response_without_refresh_token(Some(response), StatusCode::UNAUTHORIZED); assert_eq!(result.unwrap_err().status, AuthProviderStatus::OauthServerError); // Malformed response let response = "{\"a malformed response\"}".to_string(); let result = parse_response_without_refresh_token(Some(response), StatusCode::OK); assert_eq!(result.unwrap_err().status, AuthProviderStatus::OauthServerError); } #[test] fn test_parse_revocation_response_success() { assert!(parse_revocation_response(None, StatusCode::OK).is_ok()); } #[test] fn test_parse_revocation_response_failures() { // Server side error let result = parse_revocation_response(None, StatusCode::INTERNAL_SERVER_ERROR); assert_eq!(result.unwrap_err().status, AuthProviderStatus::OauthServerError); // Malformed response let response = "bad response".to_string(); let result = parse_revocation_response(Some(response), StatusCode::BAD_REQUEST); assert_eq!(result.unwrap_err().status, AuthProviderStatus::OauthServerError); } #[test] fn test_auth_code_from_redirect() { // Success case let success_url = url_with_query(&REDIRECT_URI, "code=test-auth-code"); assert_eq!( AuthCode("test-auth-code".to_string()), parse_auth_code_from_redirect(success_url).unwrap() ); // Access denied case let canceled_url = url_with_query(&REDIRECT_URI, "error=access_denied"); assert_eq!( AuthProviderStatus::UserCancelled, parse_auth_code_from_redirect(canceled_url).unwrap_err().status ); // Unexpected redirect let error_url = Url::parse("ftp://incorrect/some-page").unwrap(); assert_eq!( AuthProviderStatus::InternalError, parse_auth_code_from_redirect(error_url).unwrap_err().status ); // Unknown error let invalid_url = url_with_query(&REDIRECT_URI, "error=invalid_request"); assert_eq!( AuthProviderStatus::UnknownError, parse_auth_code_from_redirect(invalid_url).unwrap_err().status ); // No code or error in url. assert_eq!( AuthProviderStatus::UnknownError, parse_auth_code_from_redirect(REDIRECT_URI.clone()).unwrap_err().status ); } }
use crate::prelude::*; #[repr(C)] #[derive(Debug)] pub struct VkMVKDeviceConfiguration { pub supportDisplayContentsScale: VkBool32, pub imageFlipY: VkBool32, pub shaderConversionFlipFragmentY: VkBool32, pub shaderConversionFlipVertexY: VkBool32, pub shaderConversionLogging: VkBool32, pub performanceTracking: VkBool32, pub performanceLoggingFrameCount: u32, }
use std::fs::File; use std::io::{self, Read, Seek, SeekFrom, Write}; use std::path::Path; use lz4::EncoderBuilder; #[derive(Debug, Default)] struct WriteCount { written: u64, } impl Write for WriteCount { fn write(&mut self, buf: &[u8]) -> io::Result<usize> { self.written += buf.len() as u64; Ok(buf.len()) } fn flush(&mut self) -> io::Result<()> { Ok(()) } } #[derive(Debug, Clone, Copy)] enum Confidence { C80, C85, C90, C95, C99, } impl From<Confidence> for f32 { fn from(c: Confidence) -> f32 { match c { Confidence::C80 => 1.28, Confidence::C85 => 1.44, Confidence::C90 => 1.65, Confidence::C95 => 1.96, Confidence::C99 => 2.58, } } } fn sample_size(pop: u64, moe: u8, confidence: Confidence) -> f32 { let pop = pop as f32; let n_naught = 0.25 * (f32::from(confidence) / (f32::from(moe) / 100.0)).powi(2); ((pop * n_naught) / (n_naught + pop - 1.0)).ceil() } #[derive(Debug, Clone, Copy)] pub struct Compresstimator { block_size: u64, error_margin: u8, confidence: Confidence, } const DEFAULT_BLOCK_SIZE: u64 = 4096; impl Default for Compresstimator { fn default() -> Self { Self { block_size: DEFAULT_BLOCK_SIZE, error_margin: 15, confidence: Confidence::C90, } } } impl Compresstimator { pub fn new() -> Self { Self::default() } /// Use a given block size for compresstimation. This should usually be the /// underlying filesystem's block size. pub fn with_block_size(block_size: usize) -> Self { Self { block_size: block_size as u64, ..Self::default() } } /// Exhaustively compress the file and return the ratio. pub fn base_truth<P: AsRef<Path>>(&self, path: P) -> io::Result<f32> { let mut input = File::open(path)?; let output = WriteCount::default(); let mut encoder = EncoderBuilder::new().level(1).build(output)?; let written = std::io::copy(&mut input, &mut encoder)?; let (output, result) = encoder.finish(); result.map(|_| output.written as f32 / written as f32) } /// Compresstimate the seekable stream `input` of `len` bytes, returning an /// estimated conservative compress ratio (based on lz4 level 1). pub fn compresstimate_len<R: Read + Seek>(&self, mut input: R, len: u64) -> io::Result<f32> { let output = WriteCount::default(); let mut encoder = EncoderBuilder::new().level(1).build(output)?; let blocks = len / self.block_size; let samples = sample_size(blocks, 15, Confidence::C90) as u64; let written; // If we're going to be randomly sampling a big chunk of the file anyway, // we might as well read in the lot. if samples == 0 || len < samples * self.block_size * 4 { let _ = input.seek(SeekFrom::Start(0))?; written = std::io::copy(&mut input, &mut encoder)?; } else { let step = self.block_size * (blocks / samples); let mut buf = vec![0; self.block_size as usize]; written = self.block_size * samples; for i in 0..samples { input.seek(SeekFrom::Start(step * i))?; input.read_exact(&mut buf)?; encoder.write_all(&buf)?; } } let (output, result) = encoder.finish(); result.map(|_| output.written as f32 / written as f32) } /// Compresstimate the seekable stream `input` of unknown size, returning an /// estimated conservative compress ratio (based on lz4 level 1). pub fn compresstimate<R: Read + Seek>(&self, mut input: R) -> io::Result<f32> { let len = input.seek(SeekFrom::End(0))?; self.compresstimate_len(input, len) } pub fn compresstimate_file_len<P: AsRef<Path>>(&self, path: P, len: u64) -> io::Result<f32> { self._compresstimate_file_len(path.as_ref(), len) } fn _compresstimate_file_len(&self, path: &Path, len: u64) -> io::Result<f32> { let input = File::open(path)?; self.compresstimate_len(input, len) } /// Compresstimate a path. pub fn compresstimate_file<P: AsRef<Path>>(&self, path: P) -> io::Result<f32> { self._compresstimate_file(path.as_ref()) } /// Compresstimate a path. fn _compresstimate_file(&self, path: &Path) -> io::Result<f32> { let input = File::open(path)?; let len = input.metadata()?.len(); self.compresstimate_len(input, len) } } #[test] fn test_real_files() { let est = Compresstimator::default(); assert!(est.compresstimate_file("Cargo.lock").expect("Cargo.lock") < 1.0); if std::path::PathBuf::from("/dev/urandom").exists() { assert!(est.compresstimate_file_len("/dev/urandom", 1024 * 1024).expect("/dev/urandom") >= 1.0); } } #[test] fn test_repeated_estimates() { use std::convert::TryInto; let est = Compresstimator::default(); let file: &[u8] = include_bytes!("../Cargo.lock"); let len: u64 = file.len().try_into().unwrap(); let mut file = io::Cursor::new(file); let estimate1 = est.compresstimate(&mut file).unwrap(); let estimate2 = est.compresstimate(&mut file).unwrap(); let sized_estimate = est.compresstimate_len(&mut file, len as u64).unwrap(); assert!(estimate1 < 1.0); assert_eq!(estimate1, estimate2); assert_eq!(sized_estimate, estimate2); }
#![feature(test)] //learn from https://medium.com/@james_32022/unit-tests-and-benchmarks-in-rust-f5de0a0ea19a extern crate test; use rand::{thread_rng, Rng}; use test::Bencher; pub fn random_vector(i: i32) -> Vec<i32> { let mut numbers: Vec<i32> = Vec::new(); let mut rng = rand::thread_rng(); for i in 0..i { numbers.push(rng.gen()); } return numbers; } pub fn swap(numbers: &mut Vec<i32>, i: usize, j: usize) { let temp = numbers[i]; numbers[i] = numbers[j]; numbers[j] = temp; } pub fn insertion_sorter(numbers: &mut Vec<i32>) { for i in 1..numbers.len() { let mut j = i; while j > 0 && numbers[j - 1] > numbers[j] { swap(numbers, j, j - 1); j = j - 1; } } } #[bench] fn bench_insertion_sort_100_ints(b: &mut Bencher) { b.iter(|| { let mut numbers: Vec<i32> = random_vector(100); insertion_sorter(&mut numbers) }); } fn main() {}
//! Types defined by the SDK. pub mod address; pub mod callformat; pub mod message; pub mod token; pub mod transaction;
fn main(){ let a:[isize;3] = [1,2,3]; let b:&[isize] = &a; println!("{:?}",b); for elm in b { println!("{}",elm) } }
use std::cmp::{max, min}; use std::collections::{HashMap, HashSet}; use itertools::Itertools; use whiteread::parse_line; const ten97: usize = 1000000007; fn alphabet2idx(c: char) -> usize { if c.is_ascii_lowercase() { c as u8 as usize - 'a' as u8 as usize } else if c.is_ascii_uppercase() { c as u8 as usize - 'A' as u8 as usize } else { panic!("wtf") } } fn main() { let (a, b): (usize, usize) = parse_line().unwrap(); let tmp = lcm(a as u128, b as u128); if tmp > 10_u128.pow(18) { println!("Large"); } else { println!("{}", tmp); } } fn lcm(a: u128, b: u128) -> u128 { let tmp = gcd(a, b); a * b / tmp } fn gcd(a: u128, b: u128) -> u128 { if a > b { let tmp = a % b; if tmp == 0 { b } else { gcd(b, tmp) } } else { let tmp = b % a; if tmp == 0 { a } else { gcd(a, tmp) } } }
use griddle::HashMap as IncrHashMap; use hashbrown::HashMap; use ritekv::{MemStore, Store}; use std::time::{Duration, Instant}; use griddle::hash_map::DefaultHashBuilder; type AHashMap<K, V> = IncrHashMap<K, V, DefaultHashBuilder>; const N: u32 = 1 << 22; fn main() { let mut hm = HashMap::new(); let mut mx = 0.0f64; let mut sum = Duration::new(0, 0); for i in 0..N { let t = Instant::now(); hm.insert(i.to_string(), i.to_string()); let took = t.elapsed(); mx = mx.max(took.as_secs_f64()); sum += took; println!("{} hashbrown {} ms", i, took.as_secs_f64() * 1000.0); } eprintln!("hashbrown::HashMap max: {:?}, mean: {:?}", Duration::from_secs_f64(mx), sum / N); let mut hm = AHashMap::default(); let mut mx = 0.0f64; let mut sum = Duration::new(0, 0); for i in 0..N { let t = Instant::now(); hm.insert(i.to_string(), i.to_string()); let took = t.elapsed(); mx = mx.max(took.as_secs_f64()); sum += took; println!("{} griddle {} ms", i, took.as_secs_f64() * 1000.0); } eprintln!("griddle::HashMap max: {:?}, mean: {:?}", Duration::from_secs_f64(mx), sum / N); let mut hm = MemStore::open(); let mut mx = 0.0f64; let mut sum = Duration::new(0, 0); for i in 0..N { let t = Instant::now(); hm.set(i.to_string(), i.to_string()); let took = t.elapsed(); mx = mx.max(took.as_secs_f64()); sum += took; println!("{} ritekv {} ms", i, took.as_secs_f64() * 1000.0); } eprintln!("ritekv::MemStore max: {:?}, mean: {:?}", Duration::from_secs_f64(mx), sum / N); }
// Copyright 2018 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 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. use core::DocContext; use super::*; pub fn get_def_from_def_id<F>(cx: &DocContext, def_id: DefId, callback: &F, ) -> Vec<Item> where F: Fn(& dyn Fn(DefId) -> Def) -> Vec<Item> { let ty = cx.tcx.type_of(def_id); match ty.sty { ty::TyAdt(adt, _) => callback(&match adt.adt_kind() { AdtKind::Struct => Def::Struct, AdtKind::Enum => Def::Enum, AdtKind::Union => Def::Union, }), ty::TyInt(_) | ty::TyUint(_) | ty::TyFloat(_) | ty::TyStr | ty::TyBool | ty::TyChar => callback(&move |_: DefId| { match ty.sty { ty::TyInt(x) => Def::PrimTy(hir::TyInt(x)), ty::TyUint(x) => Def::PrimTy(hir::TyUint(x)), ty::TyFloat(x) => Def::PrimTy(hir::TyFloat(x)), ty::TyStr => Def::PrimTy(hir::TyStr), ty::TyBool => Def::PrimTy(hir::TyBool), ty::TyChar => Def::PrimTy(hir::TyChar), _ => unreachable!(), } }), _ => { debug!("Unexpected type {:?}", def_id); Vec::new() } } } pub fn get_def_from_node_id<F>(cx: &DocContext, id: ast::NodeId, name: String, callback: &F, ) -> Vec<Item> where F: Fn(& dyn Fn(DefId) -> Def, String) -> Vec<Item> { let item = &cx.tcx.hir.expect_item(id).node; callback(&match *item { hir::ItemKind::Struct(_, _) => Def::Struct, hir::ItemKind::Union(_, _) => Def::Union, hir::ItemKind::Enum(_, _) => Def::Enum, _ => panic!("Unexpected type {:?} {:?}", item, id), }, name) }
use super::*; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Kernel { pub id: Uuid, pub name: String, pub storage_id: Uuid, } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct NewKernel { pub name: String, pub storage_id: Uuid, } #[derive(Error, Debug)] pub enum KernelError { #[error("Failed to list kernels: {0}")] List(#[from] sqlx::Error), #[error("Failed to add kernel: {0}, error: {1}")] Add(String, sqlx::Error), #[error("Can't find kernel: {0}, error: {1}")] Find(Uuid, sqlx::Error), } pub async fn list(pool: &PgPool) -> Result<Vec<Kernel>, KernelError> { let kernels = sqlx::query_as!( Kernel, r#" SELECT id, name, storage_id FROM kernels "# ) .fetch_all(pool) .await .map_err(KernelError::List)?; Ok(kernels) } pub async fn by_id(pool: &PgPool, kernel_id: &Uuid) -> Result<Kernel, KernelError> { let kernel = sqlx::query_as!( Kernel, r#" SELECT id, name, storage_id FROM kernels WHERE id = $1 "#, kernel_id ) .fetch_one(pool) .await .map_err(|e| KernelError::Find(*kernel_id, e))?; Ok(kernel) } pub async fn add(pool: &PgPool, kernel: &NewKernel) -> Result<Uuid, KernelError> { let rec = sqlx::query!( r#" INSERT INTO kernels (name, storage_id) VALUES ( $1, $2) RETURNING id "#, kernel.name, kernel.storage_id ) .fetch_one(pool) .await .map_err(|e| KernelError::Add(kernel.name.to_owned(), e))?; Ok(rec.id) }
#[doc = "Reader of register CR"] pub type R = crate::R<u32, super::CR>; #[doc = "Writer for register CR"] pub type W = crate::W<u32, super::CR>; #[doc = "Register CR `reset()`'s with value 0"] impl crate::ResetValue for super::CR { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `TXMODE`"] pub type TXMODE_R = crate::R<u8, u8>; #[doc = "Write proxy for field `TXMODE`"] pub struct TXMODE_W<'a> { w: &'a mut W, } impl<'a> TXMODE_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03); self.w } } #[doc = "Reader of field `TXSEND`"] pub type TXSEND_R = crate::R<bool, bool>; #[doc = "Write proxy for field `TXSEND`"] pub struct TXSEND_W<'a> { w: &'a mut W, } impl<'a> TXSEND_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } #[doc = "Reader of field `TXHRST`"] pub type TXHRST_R = crate::R<bool, bool>; #[doc = "Write proxy for field `TXHRST`"] pub struct TXHRST_W<'a> { w: &'a mut W, } impl<'a> TXHRST_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } #[doc = "Reader of field `RXMODE`"] pub type RXMODE_R = crate::R<bool, bool>; #[doc = "Write proxy for field `RXMODE`"] pub struct RXMODE_W<'a> { w: &'a mut W, } impl<'a> RXMODE_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } #[doc = "Reader of field `PHYRXEN`"] pub type PHYRXEN_R = crate::R<bool, bool>; #[doc = "Write proxy for field `PHYRXEN`"] pub struct PHYRXEN_W<'a> { w: &'a mut W, } impl<'a> PHYRXEN_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } #[doc = "Reader of field `PHYCCSEL`"] pub type PHYCCSEL_R = crate::R<bool, bool>; #[doc = "Write proxy for field `PHYCCSEL`"] pub struct PHYCCSEL_W<'a> { w: &'a mut W, } impl<'a> PHYCCSEL_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } #[doc = "Reader of field `ANASUBMODE`"] pub type ANASUBMODE_R = crate::R<u8, u8>; #[doc = "Write proxy for field `ANASUBMODE`"] pub struct ANASUBMODE_W<'a> { w: &'a mut W, } impl<'a> ANASUBMODE_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 7)) | (((value as u32) & 0x03) << 7); self.w } } #[doc = "Reader of field `ANAMODE`"] pub type ANAMODE_R = crate::R<bool, bool>; #[doc = "Write proxy for field `ANAMODE`"] pub struct ANAMODE_W<'a> { w: &'a mut W, } impl<'a> ANAMODE_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } #[doc = "Reader of field `CCENABLE`"] pub type CCENABLE_R = crate::R<u8, u8>; #[doc = "Write proxy for field `CCENABLE`"] pub struct CCENABLE_W<'a> { w: &'a mut W, } impl<'a> CCENABLE_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } #[doc = "Reader of field `FRSRXEN`"] pub type FRSRXEN_R = crate::R<bool, bool>; #[doc = "Write proxy for field `FRSRXEN`"] pub struct FRSRXEN_W<'a> { w: &'a mut W, } impl<'a> FRSRXEN_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } #[doc = "Reader of field `FRSTX`"] pub type FRSTX_R = crate::R<bool, bool>; #[doc = "Write proxy for field `FRSTX`"] pub struct FRSTX_W<'a> { w: &'a mut W, } impl<'a> FRSTX_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } #[doc = "Reader of field `RDCH`"] pub type RDCH_R = crate::R<bool, bool>; #[doc = "Write proxy for field `RDCH`"] pub struct RDCH_W<'a> { w: &'a mut W, } impl<'a> RDCH_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } #[doc = "Reader of field `CC1TCDIS`"] pub type CC1TCDIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `CC1TCDIS`"] pub struct CC1TCDIS_W<'a> { w: &'a mut W, } impl<'a> CC1TCDIS_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } #[doc = "Reader of field `CC2TCDIS`"] pub type CC2TCDIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `CC2TCDIS`"] pub struct CC2TCDIS_W<'a> { w: &'a mut W, } impl<'a> CC2TCDIS_W<'a> { #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } impl R { #[doc = "Bits 0:1 - TXMODE"] #[inline(always)] pub fn txmode(&self) -> TXMODE_R { TXMODE_R::new((self.bits & 0x03) as u8) } #[doc = "Bit 2 - TXSEND"] #[inline(always)] pub fn txsend(&self) -> TXSEND_R { TXSEND_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - TXHRST"] #[inline(always)] pub fn txhrst(&self) -> TXHRST_R { TXHRST_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - RXMODE"] #[inline(always)] pub fn rxmode(&self) -> RXMODE_R { RXMODE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - PHYRXEN"] #[inline(always)] pub fn phyrxen(&self) -> PHYRXEN_R { PHYRXEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - PHYCCSEL"] #[inline(always)] pub fn phyccsel(&self) -> PHYCCSEL_R { PHYCCSEL_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bits 7:8 - ANASUBMODE"] #[inline(always)] pub fn anasubmode(&self) -> ANASUBMODE_R { ANASUBMODE_R::new(((self.bits >> 7) & 0x03) as u8) } #[doc = "Bit 9 - ANAMODE"] #[inline(always)] pub fn anamode(&self) -> ANAMODE_R { ANAMODE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bits 10:11 - CCENABLE"] #[inline(always)] pub fn ccenable(&self) -> CCENABLE_R { CCENABLE_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bit 16 - FRSRXEN"] #[inline(always)] pub fn frsrxen(&self) -> FRSRXEN_R { FRSRXEN_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - FRSTX"] #[inline(always)] pub fn frstx(&self) -> FRSTX_R { FRSTX_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - RDCH"] #[inline(always)] pub fn rdch(&self) -> RDCH_R { RDCH_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 20 - CC1TCDIS"] #[inline(always)] pub fn cc1tcdis(&self) -> CC1TCDIS_R { CC1TCDIS_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - CC2TCDIS"] #[inline(always)] pub fn cc2tcdis(&self) -> CC2TCDIS_R { CC2TCDIS_R::new(((self.bits >> 21) & 0x01) != 0) } } impl W { #[doc = "Bits 0:1 - TXMODE"] #[inline(always)] pub fn txmode(&mut self) -> TXMODE_W { TXMODE_W { w: self } } #[doc = "Bit 2 - TXSEND"] #[inline(always)] pub fn txsend(&mut self) -> TXSEND_W { TXSEND_W { w: self } } #[doc = "Bit 3 - TXHRST"] #[inline(always)] pub fn txhrst(&mut self) -> TXHRST_W { TXHRST_W { w: self } } #[doc = "Bit 4 - RXMODE"] #[inline(always)] pub fn rxmode(&mut self) -> RXMODE_W { RXMODE_W { w: self } } #[doc = "Bit 5 - PHYRXEN"] #[inline(always)] pub fn phyrxen(&mut self) -> PHYRXEN_W { PHYRXEN_W { w: self } } #[doc = "Bit 6 - PHYCCSEL"] #[inline(always)] pub fn phyccsel(&mut self) -> PHYCCSEL_W { PHYCCSEL_W { w: self } } #[doc = "Bits 7:8 - ANASUBMODE"] #[inline(always)] pub fn anasubmode(&mut self) -> ANASUBMODE_W { ANASUBMODE_W { w: self } } #[doc = "Bit 9 - ANAMODE"] #[inline(always)] pub fn anamode(&mut self) -> ANAMODE_W { ANAMODE_W { w: self } } #[doc = "Bits 10:11 - CCENABLE"] #[inline(always)] pub fn ccenable(&mut self) -> CCENABLE_W { CCENABLE_W { w: self } } #[doc = "Bit 16 - FRSRXEN"] #[inline(always)] pub fn frsrxen(&mut self) -> FRSRXEN_W { FRSRXEN_W { w: self } } #[doc = "Bit 17 - FRSTX"] #[inline(always)] pub fn frstx(&mut self) -> FRSTX_W { FRSTX_W { w: self } } #[doc = "Bit 18 - RDCH"] #[inline(always)] pub fn rdch(&mut self) -> RDCH_W { RDCH_W { w: self } } #[doc = "Bit 20 - CC1TCDIS"] #[inline(always)] pub fn cc1tcdis(&mut self) -> CC1TCDIS_W { CC1TCDIS_W { w: self } } #[doc = "Bit 21 - CC2TCDIS"] #[inline(always)] pub fn cc2tcdis(&mut self) -> CC2TCDIS_W { CC2TCDIS_W { w: self } } }
use lazy_static::lazy_static; use std::collections::HashMap; pub fn run() { lazy_static! { static ref INPUT: String = std::fs::read_to_string("data/input-day-6.txt") .unwrap() .strip_suffix("\n") .unwrap() .to_string(); } let answers: Vec<Vec<&str>> = INPUT.split("\n\n") .map(|s| s.split("\n") .collect() ).collect(); let mut inclusive_count = 0; let mut exclusive_count = 0; for answer in answers { let mut set: HashMap<char, i32> = HashMap::new(); for list in answer.clone() { for c in list.chars() { let i = match set.get_mut(&c) { Some(a) => *a + 1, None => 1 }; *set.entry(c).or_insert(i) = i; } } inclusive_count = inclusive_count + set.len(); for (_key, val) in set.iter() { if *val == answer.len() as i32 { exclusive_count += 1; } } } println!("total inclusive answers: {}", inclusive_count); println!("total exclusive answers: {}", exclusive_count); }
//! # FCM/APNs/HMS Push Relay //! //! This server accepts push requests via HTTPS and notifies the push //! service. //! //! Supported service: //! //! - Google FCM //! - Apple APNs //! - Huawei HMS #![deny(clippy::all)] #![allow(clippy::too_many_arguments)] #![allow(clippy::manual_unwrap_or)] #[macro_use] extern crate log; mod config; mod errors; mod http_client; mod influxdb; mod push; mod server; use std::{fs::File, io::Read, net::SocketAddr, path::PathBuf, process}; use clap::Parser; use data_encoding::HEXLOWER_PERMISSIVE; use zeroize::{ZeroizeOnDrop, Zeroizing}; use config::Config; const VERSION: &str = env!("CARGO_PKG_VERSION"); #[derive(Clone, ZeroizeOnDrop)] pub struct ThreemaGatewayPrivateKey([u8; 32]); #[derive(Parser, Debug)] #[clap(about, version)] #[clap(setting = clap::AppSettings::DisableColoredHelp)] struct Args { /// The ip/port to listen on #[clap(short, long, default_value = "127.0.0.1:3000")] listen: SocketAddr, /// Path to a config file #[clap(short, long, default_value = "config.toml")] config: PathBuf, } #[tokio::main(flavor = "multi_thread")] async fn main() { env_logger::init(); let args = Args::parse(); // Load config file let config = Config::load(&args.config).unwrap_or_else(|e| { error!("Could not load config file {:?}: {}", args.config, e); process::exit(2); }); // Determine HMS credentials info!("Found FCM config"); info!("Found APNs config"); match config.hms { None => { warn!("No HMS credentials found in config, HMS pushes cannot be handled"); } Some(ref map) if map.is_empty() => { warn!("No HMS credentials found in config, HMS pushes cannot be handled"); } Some(ref map) => { let keys = map.keys().collect::<Vec<_>>(); info!("Found {} HMS config(s): {:?}", map.len(), keys); } } // Determine Threema Gateway credentials let threema_gateway_private_key = match config.threema_gateway { None => { warn!( "No Threema Gateway credentials found in config, Threema pushes cannot be handled" ); None } Some(ref threema_gateway_config) => { info!( "Found Threema Gateway config: {}", &threema_gateway_config.identity ); // Open and read private key let mut private_key = Zeroizing::new(Vec::new()); File::open(&threema_gateway_config.private_key_file) .unwrap_or_else(|e| { error!( "Invalid Threema Gateway 'private_key_file' path: Could not open '{}': {}", threema_gateway_config.private_key_file, e ); process::exit(3); }) .read_to_end(&mut private_key) .unwrap_or_else(|e| { error!( "Invalid Threema Gateway 'private_key_file': Could not read '{}': {}", threema_gateway_config.private_key_file, e ); process::exit(3); }); // Strip `private:` prefix and new-line suffix let private_key = private_key.strip_prefix(b"private:").unwrap_or_else(|| { error!( "Invalid Threema Gateway 'private_key_file': Private key not prefixed with 'private:'", ); process::exit(3); }); let private_key = private_key.strip_suffix(b"\n").unwrap_or(private_key); // Decode private key let private_key = Zeroizing::new(HEXLOWER_PERMISSIVE .decode(private_key) .unwrap_or_else(|e| { error!( "Invalid Threema Gateway 'private_key_file': Could not hex decode private key: {}", e ); process::exit(3); })); let private_key_length = private_key.len(); let private_key = ThreemaGatewayPrivateKey(<[u8; 32]>::try_from(private_key.as_ref()).unwrap_or_else(|_| { error!( "Invalid Threema Gateway 'private_key_file': Could not decode private key, invalid length: {}", private_key_length ); process::exit(3); })); Some(private_key) } }; // Open and read APNs keyfile let mut apns_keyfile = File::open(&config.apns.keyfile).unwrap_or_else(|e| { error!( "Invalid APNs 'keyfile' path: Could not open '{}': {}", config.apns.keyfile, e ); process::exit(3); }); let mut apns_api_key = Vec::new(); apns_keyfile .read_to_end(&mut apns_api_key) .unwrap_or_else(|e| { error!( "Invalid 'keyfile': Could not read '{}': {}", config.apns.keyfile, e ); process::exit(3); }); info!("Starting Push Relay Server {} on {}", VERSION, &args.listen); if let Err(e) = server::serve( config, &apns_api_key, threema_gateway_private_key, args.listen, ) .await { error!("Server error: {}", e); process::exit(3); } }
// Copyright 2022 Datafuse Labs. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. use std::sync::Arc; use common_exception::Result; use common_expression::DataBlock; use common_expression::SortColumnDescription; use common_pipeline_core::processors::port::InputPort; use common_pipeline_core::processors::port::OutputPort; use common_pipeline_core::processors::Processor; use crate::processors::transforms::Transform; use crate::processors::transforms::Transformer; pub struct TransformSortPartial { limit: Option<usize>, sort_columns_descriptions: Vec<SortColumnDescription>, } impl TransformSortPartial { pub fn try_create( input: Arc<InputPort>, output: Arc<OutputPort>, limit: Option<usize>, sort_columns_descriptions: Vec<SortColumnDescription>, ) -> Result<Box<dyn Processor>> { Ok(Transformer::create(input, output, TransformSortPartial { limit, sort_columns_descriptions, })) } } #[async_trait::async_trait] impl Transform for TransformSortPartial { const NAME: &'static str = "SortPartialTransform"; fn transform(&mut self, block: DataBlock) -> Result<DataBlock> { DataBlock::sort(&block, &self.sort_columns_descriptions, self.limit) } }
pub const SEED_NOTE_HASH: &'static [u8] = b"note"; pub const SEED_NULLIFIER: &'static [u8] = b"nullifier";
#![allow(unused_unsafe)] use crate::com::*; use crate::consts::*; use crate::texture::*; use raw_window_handle::HasRawWindowHandle; use winapi::_core::f32::consts::PI; use winapi::_core::mem; use winapi::shared::basetsd::UINT16; use winapi::shared::minwindef::{FALSE, TRUE}; use winapi::shared::ntdef::HANDLE; use winapi::shared::windef::HWND; use winapi::shared::winerror::HRESULT; use winapi::vc::limits::UINT_MAX; use winit::platform::windows::*; use winit::window::Window; struct ArrayIterator3<T> { item: [T; 3], index: usize, } impl<T: Copy> ArrayIterator3<T> { pub fn new(item: [T; 3]) -> ArrayIterator3<T> { ArrayIterator3 { item: item, index: 0, } } } impl<T: Copy> Iterator for ArrayIterator3<T> { type Item = T; fn next(&mut self) -> Option<Self::Item> { match self.index < self.item.len() { true => { let rc = self.item[self.index]; self.index += 1; Some(rc) } false => None, } } } #[allow(dead_code)] pub struct DxModel { // Window aspect_ratio: f32, // D3D12 Targets device: ComRc<ID3D12Device>, command_queue: ComRc<ID3D12CommandQueue>, swap_chain: ComRc<IDXGISwapChain3>, dc_dev: ComRc<IDCompositionDevice>, dc_target: ComRc<IDCompositionTarget>, dc_visual: ComRc<IDCompositionVisual>, frame_index: u32, rtv_heap: ComRc<ID3D12DescriptorHeap>, srv_heap: ComRc<ID3D12DescriptorHeap>, rtv_descriptor_size: u32, render_targets: Vec<ComRc<ID3D12Resource>>, command_allocator: ComRc<ID3D12CommandAllocator>, // D3D12 Assets root_signature: ComRc<ID3D12RootSignature>, pipeline_state: ComRc<ID3D12PipelineState>, command_list: ComRc<ID3D12GraphicsCommandList>, // App resources. vertex_buffer: ComRc<ID3D12Resource>, vertex_buffer_view: D3D12_VERTEX_BUFFER_VIEW, index_buffer: ComRc<ID3D12Resource>, index_buffer_view: D3D12_INDEX_BUFFER_VIEW, texture: ComRc<ID3D12Resource>, // Synchronization objects. fence: ComRc<ID3D12Fence>, fence_value: u64, fence_event: HANDLE, // Pipeline objects. rotation_radians: f32, viewport: D3D12_VIEWPORT, scissor_rect: D3D12_RECT, } impl DxModel { pub fn new(window: &Window) -> Result<DxModel, HRESULT> { // window params let size = window.inner_size(); println!("inner_size={:?}", size); let hwnd = window.raw_window_handle(); let aspect_ratio = (size.width as f32) / (size.height as f32); let viewport = D3D12_VIEWPORT { Width: size.width as _, Height: size.height as _, MaxDepth: 1.0_f32, ..unsafe { mem::zeroed() } }; let scissor_rect = D3D12_RECT { right: size.width as _, bottom: size.height as _, ..unsafe { mem::zeroed() } }; // Enable the D3D12 debug layer. #[cfg(build = "debug")] { let debugController = d3d12_get_debug_interface::<ID3D12Debug>()?; unsafe { debugController.EnableDebugLayer() } } let factory = create_dxgi_factory1::<IDXGIFactory4>()?; // d3d12デバイスの作成 // ハードウェアデバイスが取得できなければ // WARPデバイスを取得する let device = factory.d3d12_create_best_device()?; // コマンドキューの作成 let command_queue = { let desc = D3D12_COMMAND_QUEUE_DESC { Flags: D3D12_COMMAND_QUEUE_FLAG_NONE, Type: D3D12_COMMAND_LIST_TYPE_DIRECT, NodeMask: 0, Priority: 0, }; device.create_command_queue::<ID3D12CommandQueue>(&desc)? }; // swap chainの作成 let swap_chain = { let desc = DXGI_SWAP_CHAIN_DESC1 { BufferCount: FRAME_COUNT, Width: size.width, Height: size.height, Format: DXGI_FORMAT_R8G8B8A8_UNORM, BufferUsage: DXGI_USAGE_RENDER_TARGET_OUTPUT, SwapEffect: DXGI_SWAP_EFFECT_FLIP_DISCARD, SampleDesc: DXGI_SAMPLE_DESC { Count: 1, Quality: 0, }, AlphaMode: DXGI_ALPHA_MODE_PREMULTIPLIED, Flags: 0, Scaling: 0, Stereo: 0, }; factory .create_swap_chain_for_composition(&command_queue, &desc)? .query_interface::<IDXGISwapChain3>()? }; // DirectComposition 設定 let dc_dev = dcomp_create_device::<IDCompositionDevice>(None)?; let dc_target = dc_dev.create_target_for_hwnd(hwnd, true)?; let dc_visual = dc_dev.create_visual()?; dc_visual.set_content(&swap_chain)?; dc_target.set_root(&dc_visual)?; dc_dev.commit()?; // このサンプルはフルスクリーンへの遷移をサポートしません。 factory.make_window_association(hwnd, DXGI_MWA_NO_ALT_ENTER)?; let mut frame_index = swap_chain.get_current_back_buffer_index(); // Create descriptor heaps. // Describe and create a render target view (RTV) descriptor heap. let rtv_heap = { let desc = D3D12_DESCRIPTOR_HEAP_DESC { NumDescriptors: FRAME_COUNT, Type: D3D12_DESCRIPTOR_HEAP_TYPE_RTV, Flags: D3D12_DESCRIPTOR_HEAP_FLAG_NONE, NodeMask: 0, }; device.create_descriptor_heap::<ID3D12DescriptorHeap>(&desc)? }; // Describe and create a shader resource view (SRV) heap for the texture. let srv_heap = { let desc = D3D12_DESCRIPTOR_HEAP_DESC { NumDescriptors: 1, Type: D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, Flags: D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE, NodeMask: 0, }; device.create_descriptor_heap::<ID3D12DescriptorHeap>(&desc)? }; let rtv_descriptor_size = device.get_descriptor_handle_increment_size(D3D12_DESCRIPTOR_HEAP_TYPE_RTV); // フレームバッファの作成 let render_targets = { let mut rtv_handle = rtv_heap.get_cpu_descriptor_handle_for_heap_start(); let mut targets: Vec<ComRc<ID3D12Resource>> = Vec::with_capacity(FRAME_COUNT as usize); for n in 0..FRAME_COUNT { let target = swap_chain.get_buffer::<ID3D12Resource>(n)?; device.create_render_target_view(&target, None, rtv_handle); rtv_handle.offset(1, rtv_descriptor_size); targets.push(target); } targets }; // コマンドアロケータ let command_allocator = device.create_command_allocator(D3D12_COMMAND_LIST_TYPE_DIRECT)?; //------------------------------------------------------------------ // LoadAssets(d3d12の描画初期化) //------------------------------------------------------------------ // Create the root signature. let root_signature = { let ranges = { let range = D3D12_DESCRIPTOR_RANGE::new(D3D12_DESCRIPTOR_RANGE_TYPE_SRV, 1, 0); [range] }; let root_parameters = { let a = D3D12_ROOT_PARAMETER::new_constants(1, 0, 0, D3D12_SHADER_VISIBILITY_VERTEX); let b = D3D12_ROOT_PARAMETER::new_descriptor_table( &ranges, D3D12_SHADER_VISIBILITY_PIXEL, ); [a, b] }; let samplers = unsafe { let mut sampler = mem::zeroed::<D3D12_STATIC_SAMPLER_DESC>(); sampler.Filter = D3D12_FILTER_MIN_MAG_MIP_POINT; sampler.AddressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP; sampler.AddressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP; sampler.AddressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP; sampler.MipLODBias = 0.0; sampler.MaxAnisotropy = 0; sampler.ComparisonFunc = D3D12_COMPARISON_FUNC_NEVER; sampler.BorderColor = D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK; sampler.MinLOD = 0.0; sampler.MaxLOD = D3D12_FLOAT32_MAX; sampler.ShaderRegister = 0; sampler.RegisterSpace = 0; sampler.ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL; [sampler] }; let desc = D3D12_ROOT_SIGNATURE_DESC::new( &root_parameters, &samplers, D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT, ); let (signature, _error) = d3d12_serialize_root_signature(&desc, D3D_ROOT_SIGNATURE_VERSION_1)?; device.create_root_signature::<ID3D12RootSignature>( 0, signature.get_buffer_pointer(), signature.get_buffer_size(), )? }; // Create the pipeline state, which includes compiling and loading shaders. let pipeline_state = { let flags: u32 = { #[cfg(debug)] { D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION } #[cfg(not(debug))] { 0 } }; let file = "resources\\shaders.hlsl"; let (vertex_shader, _) = d3d_compile_from_file(file, None, None, "VSMain", "vs_5_0", flags, 0)?; let (pixel_shader, _) = d3d_compile_from_file(file, None, None, "PSMain", "ps_5_0", flags, 0)?; // Define the vertex input layout. let input_element_descs = { let a = D3D12_INPUT_ELEMENT_DESC::new( *t::POSITION, 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0, ); let b = D3D12_INPUT_ELEMENT_DESC::new( *t::TEXCOORD, 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12, D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0, ); [a, b] }; let alpha_blend = { let mut desc: D3D12_BLEND_DESC = unsafe { mem::zeroed() }; desc.AlphaToCoverageEnable = FALSE; desc.IndependentBlendEnable = FALSE; desc.RenderTarget[0] = D3D12_RENDER_TARGET_BLEND_DESC { BlendEnable: TRUE, LogicOpEnable: FALSE, SrcBlend: D3D12_BLEND_ONE, DestBlend: D3D12_BLEND_INV_SRC_ALPHA, BlendOp: D3D12_BLEND_OP_ADD, SrcBlendAlpha: D3D12_BLEND_ONE, DestBlendAlpha: D3D12_BLEND_INV_SRC_ALPHA, BlendOpAlpha: D3D12_BLEND_OP_ADD, LogicOp: D3D12_LOGIC_OP_CLEAR, RenderTargetWriteMask: D3D12_COLOR_WRITE_ENABLE_ALL as u8, }; desc }; // Describe and create the graphics pipeline state object (PSO). let pso_desc = { let mut desc: D3D12_GRAPHICS_PIPELINE_STATE_DESC = unsafe { mem::zeroed() }; desc.InputLayout = input_element_descs.layout(); desc.pRootSignature = to_mut_ptr(root_signature.as_ptr()); desc.VS = D3D12_SHADER_BYTECODE::new(&vertex_shader); desc.PS = D3D12_SHADER_BYTECODE::new(&pixel_shader); desc.RasterizerState = D3D12_RASTERIZER_DESC::default(); desc.RasterizerState.CullMode = D3D12_CULL_MODE_NONE; desc.BlendState = alpha_blend; desc.DepthStencilState.DepthEnable = FALSE; desc.DepthStencilState.StencilEnable = FALSE; desc.SampleMask = UINT_MAX; desc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE; desc.NumRenderTargets = 1; desc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM; desc.SampleDesc.Count = 1; desc }; device.create_graphics_pipeline_state(&pso_desc)? }; // Create the command list. let command_list = device.create_command_list::<ID3D12GraphicsCommandList>( 0, D3D12_COMMAND_LIST_TYPE_DIRECT, &command_allocator, &pipeline_state, )?; // Create the vertex buffer. let (vertex_buffer, vertex_buffer_view) = { // Define the geometry for a circle. let items = (-1..CIRCLE_SEGMENTS) .map(|i| match i { -1 => { let pos = [0_f32, 0_f32, 0_f32]; let uv = [0.5_f32, 0.5_f32]; Vertex::new(pos, uv) } _ => { let theta = PI * 2.0_f32 * (i as f32) / (CIRCLE_SEGMENTS as f32); let x = theta.sin(); let y = theta.cos(); let pos = [x, y * aspect_ratio, 0.0_f32]; let uv = [x * 0.5_f32 + 0.5_f32, y * 0.5_f32 + 0.5_f32]; Vertex::new(pos, uv) } }) .collect::<Vec<_>>(); println!("{:?}", items); let size_of = mem::size_of::<Vertex>(); let size = size_of * items.len(); let p = items.as_ptr(); // Note: using upload heaps to transfer static data like vert buffers is not // recommended. Every time the GPU needs it, the upload heap will be marshalled // over. Please read up on Default Heap usage. An upload heap is used here for // code simplicity and because there are very few verts to actually transfer. let properties = D3D12_HEAP_PROPERTIES::new(D3D12_HEAP_TYPE_UPLOAD); let desc = D3D12_RESOURCE_DESC::buffer(size as u64); let buffer = device.create_committed_resource::<ID3D12Resource>( &properties, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_GENERIC_READ, None, )?; // Copy the triangle data to the vertex buffer. let read_range = D3D12_RANGE::new(0, 0); // We do not intend to read from this resource on the CPU. buffer.map(0, Some(&read_range))?.memcpy(p, size); // Initialize the vertex buffer view. let view = D3D12_VERTEX_BUFFER_VIEW { BufferLocation: buffer.get_gpu_virtual_address(), SizeInBytes: size as u32, StrideInBytes: size_of as u32, }; (buffer, view) }; // Create the index buffer let (index_buffer, index_buffer_view) = { // Define the geometry for a circle. let items = (0..CIRCLE_SEGMENTS) .map(|i| { let a = 0 as UINT16; let b = (1 + i) as UINT16; let c = (2 + i) as UINT16; [a, b, c] }) .flat_map(|a| ArrayIterator3::new(a)) .collect::<Vec<_>>(); let size_of = mem::size_of::<UINT16>(); let size = size_of * items.len(); let p = items.as_ptr(); // Note: using upload heaps to transfer static data like vert buffers is not // recommended. Every time the GPU needs it, the upload heap will be marshalled // over. Please read up on Default Heap usage. An upload heap is used here for // code simplicity and because there are very few verts to actually transfer. let properties = D3D12_HEAP_PROPERTIES::new(D3D12_HEAP_TYPE_UPLOAD); let desc = D3D12_RESOURCE_DESC::buffer(size as u64); let buffer = device.create_committed_resource::<ID3D12Resource>( &properties, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_GENERIC_READ, None, )?; // Copy the index data to the index buffer. let read_range = D3D12_RANGE::new(0, 0); // We do not intend to read from this resource on the CPU. buffer.map(0, Some(&read_range))?.memcpy(p, size); // Intialize the index buffer view let view = D3D12_INDEX_BUFFER_VIEW { BufferLocation: buffer.get_gpu_virtual_address(), SizeInBytes: size as u32, Format: DXGI_FORMAT_R16_UINT, }; (buffer, view) }; // Create the texture. // Note: ComPtr's are CPU objects but this resource needs to stay in scope until // the command list that references it has finished executing on the GPU. // We will flush the GPU at the end of this method to ensure the resource is not // prematurely destroyed. // texture_upload_heapの開放タイミングがGPUへのフラッシュ後になるように // 所有権を関数スコープに追い出しておく let (_texture_upload_heap, texture) = { // Describe and create a Texture2D. let texture_desc = D3D12_RESOURCE_DESC::new( D3D12_RESOURCE_DIMENSION_TEXTURE2D, 0, TEXTURE_WIDTH, TEXTURE_HEIGHT, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM, 1, 0, D3D12_TEXTURE_LAYOUT_UNKNOWN, D3D12_RESOURCE_FLAG_NONE, ); let texture = { let properties = D3D12_HEAP_PROPERTIES::new(D3D12_HEAP_TYPE_DEFAULT); device.create_committed_resource::<ID3D12Resource>( &properties, D3D12_HEAP_FLAG_NONE, &texture_desc, D3D12_RESOURCE_STATE_COPY_DEST, None, )? }; let upload_buffer_size = texture.get_required_intermediate_size(0, 1)?; // Create the GPU upload buffer. let texture_upload_heap = { let properties = D3D12_HEAP_PROPERTIES::new(D3D12_HEAP_TYPE_UPLOAD); let desc = D3D12_RESOURCE_DESC::buffer(upload_buffer_size); device.create_committed_resource::<ID3D12Resource>( &properties, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_GENERIC_READ, None, )? }; // Copy data to the intermediate upload heap and then schedule a copy // from the upload heap to the Texture2D. let texture_bytes = generate_texture_data(); let texture_data = { let ptr = texture_bytes.as_ptr(); let row_pitch = ((TEXTURE_WIDTH as usize) * mem::size_of::<u32>()) as isize; let slice_pitch = row_pitch * (TEXTURE_HEIGHT as isize); [D3D12_SUBRESOURCE_DATA { pData: ptr as _, RowPitch: row_pitch, SlicePitch: slice_pitch, }] }; let _ = command_list.update_subresources_as_heap( &texture, &texture_upload_heap, 0, &texture_data, )?; { let barrier = D3D12_RESOURCE_BARRIER::transition( &texture, D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE, ); command_list.resource_barrier(1, &barrier); } // Describe and create a SRV for the texture. { let desc = unsafe { let mut desc = mem::zeroed::<D3D12_SHADER_RESOURCE_VIEW_DESC>(); desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING; desc.Format = texture_desc.Format; desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D; { let mut t = desc.u.Texture2D_mut(); t.MipLevels = 1; } desc }; device.create_shader_resource_view( &texture, &desc, srv_heap.get_cpu_descriptor_handle_for_heap_start(), ); } (texture_upload_heap, texture) }; // Close the command list and execute it to begin the initial GPU setup. { command_list.close()?; let a: &ID3D12GraphicsCommandList = &command_list; command_queue.execute_command_lists(&[a]); } // Create synchronization objects and wait until assets have been uploaded to the GPU. let (fence, fence_value, fence_event) = { let fence = device.create_fence::<ID3D12Fence>(0, D3D12_FENCE_FLAG_NONE)?; let mut fence_value = 1_u64; // Create an event handle to use for frame synchronization. let fence_event = create_event(None, false, false, None)?; // Wait for the command list to execute; we are reusing the same command // list in our main loop but for now, we just want to wait for setup to // complete before continuing. wait_for_previous_frame( &swap_chain, &command_queue, &fence, fence_event, &mut fence_value, &mut frame_index, )?; (fence, fence_value, fence_event) }; //------------------------------------------------------------------ // result //------------------------------------------------------------------ Ok(DxModel { aspect_ratio: aspect_ratio, device: device, command_queue: command_queue, swap_chain: swap_chain, dc_dev: dc_dev, dc_target: dc_target, dc_visual: dc_visual, frame_index: frame_index, rtv_heap: rtv_heap, srv_heap: srv_heap, rtv_descriptor_size: rtv_descriptor_size, render_targets: render_targets, command_allocator: command_allocator, root_signature: root_signature, pipeline_state: pipeline_state, command_list: command_list, vertex_buffer: vertex_buffer, vertex_buffer_view: vertex_buffer_view, index_buffer: index_buffer, index_buffer_view: index_buffer_view, texture: texture, fence: fence, fence_value: fence_value, fence_event: fence_event, rotation_radians: 0_f32, viewport: viewport, scissor_rect: scissor_rect, }) } pub fn render(&mut self) -> Result<(), HRESULT> { { self.populate_command_list()?; } { let command_queue = &self.command_queue; let command_list = &self.command_list; let swap_chain = &self.swap_chain; command_queue.execute_command_lists(&[command_list]); swap_chain.present(1, 0)?; } { self.wait_for_previous_frame()?; } Ok(()) } /// 描画コマンドリストを構築する fn populate_command_list(&mut self) -> Result<(), HRESULT> { let command_allocator = self.command_allocator.as_ref(); let command_list = self.command_list.as_ref(); let pipeline_state = self.pipeline_state.as_ref(); let root_signature = self.root_signature.as_ref(); let srv_heap = self.srv_heap.as_ref(); let rtv_heap = self.rtv_heap.as_ref(); let rtv_descriptor_size = self.rtv_descriptor_size; let viewport = &self.viewport; let scissor_rect = &self.scissor_rect; let render_targets = self.render_targets.as_slice(); let frame_index = self.frame_index as usize; let vertex_buffer_view = &self.vertex_buffer_view; let index_buffer_view = &self.index_buffer_view; // Command list allocators can only be reset when the associated // command lists have finished execution on the GPU; apps should use // fences to determine GPU execution progress. command_allocator.reset()?; // However, when ExecuteCommandList() is called on a particular command // list, that command list can then be reset at any time and must be before // re-recording. command_list.reset(command_allocator, pipeline_state)?; // Set necessary state. command_list.set_graphics_root_signature(root_signature); let pp_heaps = [srv_heap]; command_list.set_descriptor_heaps(&pp_heaps); self.rotation_radians += 0.02_f32; let rotation_radians = self.rotation_radians; command_list.set_graphics_root_f32_constant(0, rotation_radians, 0); command_list.set_graphics_root_descriptor_table( 1, srv_heap.get_gpu_descriptor_handle_for_heap_start(), ); let viewports = [*viewport]; command_list.rs_set_viewports(&viewports); let scissor_rects = [*scissor_rect]; command_list.rs_set_scissor_rects(&scissor_rects); // Indicate that the back buffer will be used as a render target. { let barrier = D3D12_RESOURCE_BARRIER::transition( &render_targets[frame_index], D3D12_RESOURCE_STATE_PRESENT, D3D12_RESOURCE_STATE_RENDER_TARGET, ); command_list.resource_barrier(1, &barrier); } let mut rtv_handle = rtv_heap.get_cpu_descriptor_handle_for_heap_start(); rtv_handle.offset(frame_index as _, rtv_descriptor_size); let rtv_handles = [rtv_handle]; command_list.om_set_render_targets(&rtv_handles, false, None); // Record commands. let clear_color = [0_f32; 4]; let no_rects = []; command_list.clear_render_target_view(rtv_handle, &clear_color, &no_rects); command_list.ia_set_primitive_topology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST); let vertex_buffer_views = [vertex_buffer_view.clone()]; command_list.ia_set_vertex_buffers(0, &vertex_buffer_views); command_list.ia_set_index_buffer(index_buffer_view); command_list.draw_indexed_instanced((CIRCLE_SEGMENTS * 3) as _, 1, 0, 0, 0); // Indicate that the back buffer will now be used to present. { let barrier = D3D12_RESOURCE_BARRIER::transition( &render_targets[frame_index], D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_PRESENT, ); command_list.resource_barrier(1, &barrier); } command_list.close()?; Ok(()) } fn wait_for_previous_frame(&mut self) -> Result<(), HRESULT> { let mut fence_value = self.fence_value; let mut frame_index = self.frame_index; wait_for_previous_frame( &self.swap_chain, &self.command_queue, &self.fence, self.fence_event, &mut fence_value, &mut frame_index, )?; self.fence_value = fence_value; self.frame_index = frame_index; Ok(()) } } // WAITING FOR THE FRAME TO COMPLETE BEFORE CONTINUING IS NOT BEST PRACTICE. // This is code implemented as such for simplicity. The D3D12HelloFrameBuffering // sample illustrates how to use fences for efficient resource usage and to // maximize GPU utilization. fn wait_for_previous_frame( swap_chain: &IDXGISwapChain3, command_queue: &ID3D12CommandQueue, fence: &ID3D12Fence, event: HANDLE, fence_value: &mut u64, frame_index: &mut u32, ) -> Result<(), HRESULT> { // Signal and increment the fence value. let old_fence_value = *fence_value; command_queue.signal(fence, old_fence_value)?; *fence_value += 1; // Wait until the previous frame is finished. fence.wait_infinite(old_fence_value, event)?; *frame_index = swap_chain.get_current_back_buffer_index(); Ok(()) }
mod drawing; mod tool; mod fs; pub use self::drawing::draw_bin; pub use self::tool::RunOptions; pub use self::fs::{new_work_dir, cleanup_work_dir, copy_result_to_out};
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CLASSIC_EVENT_ID { pub EventGuid: ::windows::core::GUID, pub Type: u8, pub Reserved: [u8; 7], } impl CLASSIC_EVENT_ID {} impl ::core::default::Default for CLASSIC_EVENT_ID { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CLASSIC_EVENT_ID { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CLASSIC_EVENT_ID").field("EventGuid", &self.EventGuid).field("Type", &self.Type).field("Reserved", &self.Reserved).finish() } } impl ::core::cmp::PartialEq for CLASSIC_EVENT_ID { fn eq(&self, other: &Self) -> bool { self.EventGuid == other.EventGuid && self.Type == other.Type && self.Reserved == other.Reserved } } impl ::core::cmp::Eq for CLASSIC_EVENT_ID {} unsafe impl ::windows::core::Abi for CLASSIC_EVENT_ID { type Abi = Self; } pub const CLSID_TraceRelogger: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7b40792d_05ff_44c4_9058_f440c71f17d4); pub const CTraceRelogger: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7b40792d_05ff_44c4_9058_f440c71f17d4); #[inline] pub unsafe fn CloseTrace(tracehandle: u64) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CloseTrace(tracehandle: u64) -> u32; } ::core::mem::transmute(CloseTrace(::core::mem::transmute(tracehandle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ControlTraceA<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PSTR>>(tracehandle: u64, instancename: Param1, properties: *mut EVENT_TRACE_PROPERTIES, controlcode: EVENT_TRACE_CONTROL) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ControlTraceA(tracehandle: u64, instancename: super::super::super::Foundation::PSTR, properties: *mut EVENT_TRACE_PROPERTIES, controlcode: EVENT_TRACE_CONTROL) -> u32; } ::core::mem::transmute(ControlTraceA(::core::mem::transmute(tracehandle), instancename.into_param().abi(), ::core::mem::transmute(properties), ::core::mem::transmute(controlcode))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ControlTraceW<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(tracehandle: u64, instancename: Param1, properties: *mut EVENT_TRACE_PROPERTIES, controlcode: EVENT_TRACE_CONTROL) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ControlTraceW(tracehandle: u64, instancename: super::super::super::Foundation::PWSTR, properties: *mut EVENT_TRACE_PROPERTIES, controlcode: EVENT_TRACE_CONTROL) -> u32; } ::core::mem::transmute(ControlTraceW(::core::mem::transmute(tracehandle), instancename.into_param().abi(), ::core::mem::transmute(properties), ::core::mem::transmute(controlcode))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CreateTraceInstanceId<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::HANDLE>>(reghandle: Param0, instinfo: *mut EVENT_INSTANCE_INFO) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CreateTraceInstanceId(reghandle: super::super::super::Foundation::HANDLE, instinfo: *mut EVENT_INSTANCE_INFO) -> u32; } ::core::mem::transmute(CreateTraceInstanceId(reghandle.into_param().abi(), ::core::mem::transmute(instinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CveEventWrite<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(cveid: Param0, additionaldetails: Param1) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CveEventWrite(cveid: super::super::super::Foundation::PWSTR, additionaldetails: super::super::super::Foundation::PWSTR) -> i32; } ::core::mem::transmute(CveEventWrite(cveid.into_param().abi(), additionaldetails.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DECODING_SOURCE(pub i32); pub const DecodingSourceXMLFile: DECODING_SOURCE = DECODING_SOURCE(0i32); pub const DecodingSourceWbem: DECODING_SOURCE = DECODING_SOURCE(1i32); pub const DecodingSourceWPP: DECODING_SOURCE = DECODING_SOURCE(2i32); pub const DecodingSourceTlg: DECODING_SOURCE = DECODING_SOURCE(3i32); pub const DecodingSourceMax: DECODING_SOURCE = DECODING_SOURCE(4i32); impl ::core::convert::From<i32> for DECODING_SOURCE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DECODING_SOURCE { type Abi = Self; } pub const DefaultTraceSecurityGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0811c1af_7a07_4a06_82ed_869455cdf713); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ENABLECALLBACK_ENABLED_STATE(pub u32); pub const EVENT_CONTROL_CODE_DISABLE_PROVIDER: ENABLECALLBACK_ENABLED_STATE = ENABLECALLBACK_ENABLED_STATE(0u32); pub const EVENT_CONTROL_CODE_ENABLE_PROVIDER: ENABLECALLBACK_ENABLED_STATE = ENABLECALLBACK_ENABLED_STATE(1u32); pub const EVENT_CONTROL_CODE_CAPTURE_STATE: ENABLECALLBACK_ENABLED_STATE = ENABLECALLBACK_ENABLED_STATE(2u32); impl ::core::convert::From<u32> for ENABLECALLBACK_ENABLED_STATE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ENABLECALLBACK_ENABLED_STATE { type Abi = Self; } impl ::core::ops::BitOr for ENABLECALLBACK_ENABLED_STATE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for ENABLECALLBACK_ENABLED_STATE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for ENABLECALLBACK_ENABLED_STATE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for ENABLECALLBACK_ENABLED_STATE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for ENABLECALLBACK_ENABLED_STATE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ENABLE_TRACE_PARAMETERS { pub Version: u32, pub EnableProperty: u32, pub ControlFlags: u32, pub SourceId: ::windows::core::GUID, pub EnableFilterDesc: *mut EVENT_FILTER_DESCRIPTOR, pub FilterDescCount: u32, } impl ENABLE_TRACE_PARAMETERS {} impl ::core::default::Default for ENABLE_TRACE_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ENABLE_TRACE_PARAMETERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ENABLE_TRACE_PARAMETERS") .field("Version", &self.Version) .field("EnableProperty", &self.EnableProperty) .field("ControlFlags", &self.ControlFlags) .field("SourceId", &self.SourceId) .field("EnableFilterDesc", &self.EnableFilterDesc) .field("FilterDescCount", &self.FilterDescCount) .finish() } } impl ::core::cmp::PartialEq for ENABLE_TRACE_PARAMETERS { fn eq(&self, other: &Self) -> bool { self.Version == other.Version && self.EnableProperty == other.EnableProperty && self.ControlFlags == other.ControlFlags && self.SourceId == other.SourceId && self.EnableFilterDesc == other.EnableFilterDesc && self.FilterDescCount == other.FilterDescCount } } impl ::core::cmp::Eq for ENABLE_TRACE_PARAMETERS {} unsafe impl ::windows::core::Abi for ENABLE_TRACE_PARAMETERS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ENABLE_TRACE_PARAMETERS_V1 { pub Version: u32, pub EnableProperty: u32, pub ControlFlags: u32, pub SourceId: ::windows::core::GUID, pub EnableFilterDesc: *mut EVENT_FILTER_DESCRIPTOR, } impl ENABLE_TRACE_PARAMETERS_V1 {} impl ::core::default::Default for ENABLE_TRACE_PARAMETERS_V1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ENABLE_TRACE_PARAMETERS_V1 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ENABLE_TRACE_PARAMETERS_V1").field("Version", &self.Version).field("EnableProperty", &self.EnableProperty).field("ControlFlags", &self.ControlFlags).field("SourceId", &self.SourceId).field("EnableFilterDesc", &self.EnableFilterDesc).finish() } } impl ::core::cmp::PartialEq for ENABLE_TRACE_PARAMETERS_V1 { fn eq(&self, other: &Self) -> bool { self.Version == other.Version && self.EnableProperty == other.EnableProperty && self.ControlFlags == other.ControlFlags && self.SourceId == other.SourceId && self.EnableFilterDesc == other.EnableFilterDesc } } impl ::core::cmp::Eq for ENABLE_TRACE_PARAMETERS_V1 {} unsafe impl ::windows::core::Abi for ENABLE_TRACE_PARAMETERS_V1 { type Abi = Self; } pub const ENABLE_TRACE_PARAMETERS_VERSION: u32 = 1u32; pub const ENABLE_TRACE_PARAMETERS_VERSION_2: u32 = 2u32; pub const ETW_ASCIICHAR_TYPE_VALUE: u32 = 102u32; pub const ETW_ASCIISTRING_TYPE_VALUE: u32 = 103u32; pub const ETW_BOOLEAN_TYPE_VALUE: u32 = 14u32; pub const ETW_BOOL_TYPE_VALUE: u32 = 108u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ETW_BUFFER_CONTEXT { pub Anonymous: ETW_BUFFER_CONTEXT_0, pub LoggerId: u16, } impl ETW_BUFFER_CONTEXT {} impl ::core::default::Default for ETW_BUFFER_CONTEXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for ETW_BUFFER_CONTEXT { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for ETW_BUFFER_CONTEXT {} unsafe impl ::windows::core::Abi for ETW_BUFFER_CONTEXT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union ETW_BUFFER_CONTEXT_0 { pub Anonymous: ETW_BUFFER_CONTEXT_0_0, pub ProcessorIndex: u16, } impl ETW_BUFFER_CONTEXT_0 {} impl ::core::default::Default for ETW_BUFFER_CONTEXT_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for ETW_BUFFER_CONTEXT_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for ETW_BUFFER_CONTEXT_0 {} unsafe impl ::windows::core::Abi for ETW_BUFFER_CONTEXT_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ETW_BUFFER_CONTEXT_0_0 { pub ProcessorNumber: u8, pub Alignment: u8, } impl ETW_BUFFER_CONTEXT_0_0 {} impl ::core::default::Default for ETW_BUFFER_CONTEXT_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ETW_BUFFER_CONTEXT_0_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("ProcessorNumber", &self.ProcessorNumber).field("Alignment", &self.Alignment).finish() } } impl ::core::cmp::PartialEq for ETW_BUFFER_CONTEXT_0_0 { fn eq(&self, other: &Self) -> bool { self.ProcessorNumber == other.ProcessorNumber && self.Alignment == other.Alignment } } impl ::core::cmp::Eq for ETW_BUFFER_CONTEXT_0_0 {} unsafe impl ::windows::core::Abi for ETW_BUFFER_CONTEXT_0_0 { type Abi = Self; } pub const ETW_BYTE_TYPE_VALUE: u32 = 4u32; pub const ETW_CHAR_TYPE_VALUE: u32 = 11u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ETW_COMPRESSION_RESUMPTION_MODE(pub i32); pub const EtwCompressionModeRestart: ETW_COMPRESSION_RESUMPTION_MODE = ETW_COMPRESSION_RESUMPTION_MODE(0i32); pub const EtwCompressionModeNoDisable: ETW_COMPRESSION_RESUMPTION_MODE = ETW_COMPRESSION_RESUMPTION_MODE(1i32); pub const EtwCompressionModeNoRestart: ETW_COMPRESSION_RESUMPTION_MODE = ETW_COMPRESSION_RESUMPTION_MODE(2i32); impl ::core::convert::From<i32> for ETW_COMPRESSION_RESUMPTION_MODE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ETW_COMPRESSION_RESUMPTION_MODE { type Abi = Self; } pub const ETW_COUNTED_ANSISTRING_TYPE_VALUE: u32 = 109u32; pub const ETW_COUNTED_STRING_TYPE_VALUE: u32 = 104u32; pub const ETW_DATETIME_TYPE_VALUE: u32 = 119u32; pub const ETW_DECIMAL_TYPE_VALUE: u32 = 15u32; pub const ETW_DOUBLE_TYPE_VALUE: u32 = 13u32; pub const ETW_GUID_TYPE_VALUE: u32 = 101u32; pub const ETW_HIDDEN_TYPE_VALUE: u32 = 107u32; pub const ETW_INT16_TYPE_VALUE: u32 = 5u32; pub const ETW_INT32_TYPE_VALUE: u32 = 7u32; pub const ETW_INT64_TYPE_VALUE: u32 = 9u32; pub const ETW_NON_NULL_TERMINATED_STRING_TYPE_VALUE: u32 = 112u32; pub const ETW_NULL_TYPE_VALUE: u32 = 0u32; pub const ETW_OBJECT_TYPE_VALUE: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ETW_PMC_COUNTER_OWNER { pub OwnerType: ETW_PMC_COUNTER_OWNER_TYPE, pub ProfileSource: u32, pub OwnerTag: u32, } impl ETW_PMC_COUNTER_OWNER {} impl ::core::default::Default for ETW_PMC_COUNTER_OWNER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ETW_PMC_COUNTER_OWNER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ETW_PMC_COUNTER_OWNER").field("OwnerType", &self.OwnerType).field("ProfileSource", &self.ProfileSource).field("OwnerTag", &self.OwnerTag).finish() } } impl ::core::cmp::PartialEq for ETW_PMC_COUNTER_OWNER { fn eq(&self, other: &Self) -> bool { self.OwnerType == other.OwnerType && self.ProfileSource == other.ProfileSource && self.OwnerTag == other.OwnerTag } } impl ::core::cmp::Eq for ETW_PMC_COUNTER_OWNER {} unsafe impl ::windows::core::Abi for ETW_PMC_COUNTER_OWNER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ETW_PMC_COUNTER_OWNERSHIP_STATUS { pub ProcessorNumber: u32, pub NumberOfCounters: u32, pub CounterOwners: [ETW_PMC_COUNTER_OWNER; 1], } impl ETW_PMC_COUNTER_OWNERSHIP_STATUS {} impl ::core::default::Default for ETW_PMC_COUNTER_OWNERSHIP_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ETW_PMC_COUNTER_OWNERSHIP_STATUS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ETW_PMC_COUNTER_OWNERSHIP_STATUS").field("ProcessorNumber", &self.ProcessorNumber).field("NumberOfCounters", &self.NumberOfCounters).field("CounterOwners", &self.CounterOwners).finish() } } impl ::core::cmp::PartialEq for ETW_PMC_COUNTER_OWNERSHIP_STATUS { fn eq(&self, other: &Self) -> bool { self.ProcessorNumber == other.ProcessorNumber && self.NumberOfCounters == other.NumberOfCounters && self.CounterOwners == other.CounterOwners } } impl ::core::cmp::Eq for ETW_PMC_COUNTER_OWNERSHIP_STATUS {} unsafe impl ::windows::core::Abi for ETW_PMC_COUNTER_OWNERSHIP_STATUS { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ETW_PMC_COUNTER_OWNER_TYPE(pub i32); pub const EtwPmcOwnerFree: ETW_PMC_COUNTER_OWNER_TYPE = ETW_PMC_COUNTER_OWNER_TYPE(0i32); pub const EtwPmcOwnerUntagged: ETW_PMC_COUNTER_OWNER_TYPE = ETW_PMC_COUNTER_OWNER_TYPE(1i32); pub const EtwPmcOwnerTagged: ETW_PMC_COUNTER_OWNER_TYPE = ETW_PMC_COUNTER_OWNER_TYPE(2i32); pub const EtwPmcOwnerTaggedWithSource: ETW_PMC_COUNTER_OWNER_TYPE = ETW_PMC_COUNTER_OWNER_TYPE(3i32); impl ::core::convert::From<i32> for ETW_PMC_COUNTER_OWNER_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ETW_PMC_COUNTER_OWNER_TYPE { type Abi = Self; } pub const ETW_POINTER_TYPE_VALUE: u32 = 105u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ETW_PROCESS_HANDLE_INFO_TYPE(pub i32); pub const EtwQueryPartitionInformation: ETW_PROCESS_HANDLE_INFO_TYPE = ETW_PROCESS_HANDLE_INFO_TYPE(1i32); pub const EtwQueryPartitionInformationV2: ETW_PROCESS_HANDLE_INFO_TYPE = ETW_PROCESS_HANDLE_INFO_TYPE(2i32); pub const EtwQueryLastDroppedTimes: ETW_PROCESS_HANDLE_INFO_TYPE = ETW_PROCESS_HANDLE_INFO_TYPE(3i32); pub const EtwQueryProcessHandleInfoMax: ETW_PROCESS_HANDLE_INFO_TYPE = ETW_PROCESS_HANDLE_INFO_TYPE(4i32); impl ::core::convert::From<i32> for ETW_PROCESS_HANDLE_INFO_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ETW_PROCESS_HANDLE_INFO_TYPE { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ETW_PROVIDER_TRAIT_TYPE(pub i32); pub const EtwProviderTraitTypeGroup: ETW_PROVIDER_TRAIT_TYPE = ETW_PROVIDER_TRAIT_TYPE(1i32); pub const EtwProviderTraitDecodeGuid: ETW_PROVIDER_TRAIT_TYPE = ETW_PROVIDER_TRAIT_TYPE(2i32); pub const EtwProviderTraitTypeMax: ETW_PROVIDER_TRAIT_TYPE = ETW_PROVIDER_TRAIT_TYPE(3i32); impl ::core::convert::From<i32> for ETW_PROVIDER_TRAIT_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ETW_PROVIDER_TRAIT_TYPE { type Abi = Self; } pub const ETW_PTVECTOR_TYPE_VALUE: u32 = 117u32; pub const ETW_REDUCED_ANSISTRING_TYPE_VALUE: u32 = 113u32; pub const ETW_REDUCED_STRING_TYPE_VALUE: u32 = 114u32; pub const ETW_REFRENCE_TYPE_VALUE: u32 = 120u32; pub const ETW_REVERSED_COUNTED_ANSISTRING_TYPE_VALUE: u32 = 111u32; pub const ETW_REVERSED_COUNTED_STRING_TYPE_VALUE: u32 = 110u32; pub const ETW_SBYTE_TYPE_VALUE: u32 = 3u32; pub const ETW_SID_TYPE_VALUE: u32 = 115u32; pub const ETW_SINGLE_TYPE_VALUE: u32 = 12u32; pub const ETW_SIZET_TYPE_VALUE: u32 = 106u32; pub const ETW_STRING_TYPE_VALUE: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ETW_TRACE_PARTITION_INFORMATION { pub PartitionId: ::windows::core::GUID, pub ParentId: ::windows::core::GUID, pub QpcOffsetFromRoot: i64, pub PartitionType: u32, } impl ETW_TRACE_PARTITION_INFORMATION {} impl ::core::default::Default for ETW_TRACE_PARTITION_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ETW_TRACE_PARTITION_INFORMATION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ETW_TRACE_PARTITION_INFORMATION").field("PartitionId", &self.PartitionId).field("ParentId", &self.ParentId).field("QpcOffsetFromRoot", &self.QpcOffsetFromRoot).field("PartitionType", &self.PartitionType).finish() } } impl ::core::cmp::PartialEq for ETW_TRACE_PARTITION_INFORMATION { fn eq(&self, other: &Self) -> bool { self.PartitionId == other.PartitionId && self.ParentId == other.ParentId && self.QpcOffsetFromRoot == other.QpcOffsetFromRoot && self.PartitionType == other.PartitionType } } impl ::core::cmp::Eq for ETW_TRACE_PARTITION_INFORMATION {} unsafe impl ::windows::core::Abi for ETW_TRACE_PARTITION_INFORMATION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ETW_TRACE_PARTITION_INFORMATION_V2 { pub QpcOffsetFromRoot: i64, pub PartitionType: u32, pub PartitionId: super::super::super::Foundation::PWSTR, pub ParentId: super::super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl ETW_TRACE_PARTITION_INFORMATION_V2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ETW_TRACE_PARTITION_INFORMATION_V2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ETW_TRACE_PARTITION_INFORMATION_V2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ETW_TRACE_PARTITION_INFORMATION_V2").field("QpcOffsetFromRoot", &self.QpcOffsetFromRoot).field("PartitionType", &self.PartitionType).field("PartitionId", &self.PartitionId).field("ParentId", &self.ParentId).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ETW_TRACE_PARTITION_INFORMATION_V2 { fn eq(&self, other: &Self) -> bool { self.QpcOffsetFromRoot == other.QpcOffsetFromRoot && self.PartitionType == other.PartitionType && self.PartitionId == other.PartitionId && self.ParentId == other.ParentId } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ETW_TRACE_PARTITION_INFORMATION_V2 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ETW_TRACE_PARTITION_INFORMATION_V2 { type Abi = Self; } pub const ETW_UINT16_TYPE_VALUE: u32 = 6u32; pub const ETW_UINT32_TYPE_VALUE: u32 = 8u32; pub const ETW_UINT64_TYPE_VALUE: u32 = 10u32; pub const ETW_VARIANT_TYPE_VALUE: u32 = 116u32; pub const ETW_WMITIME_TYPE_VALUE: u32 = 118u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct EVENTSECURITYOPERATION(pub i32); pub const EventSecuritySetDACL: EVENTSECURITYOPERATION = EVENTSECURITYOPERATION(0i32); pub const EventSecuritySetSACL: EVENTSECURITYOPERATION = EVENTSECURITYOPERATION(1i32); pub const EventSecurityAddDACL: EVENTSECURITYOPERATION = EVENTSECURITYOPERATION(2i32); pub const EventSecurityAddSACL: EVENTSECURITYOPERATION = EVENTSECURITYOPERATION(3i32); pub const EventSecurityMax: EVENTSECURITYOPERATION = EVENTSECURITYOPERATION(4i32); impl ::core::convert::From<i32> for EVENTSECURITYOPERATION { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EVENTSECURITYOPERATION { type Abi = Self; } pub const EVENT_ACTIVITY_CTRL_CREATE_ID: u32 = 3u32; pub const EVENT_ACTIVITY_CTRL_CREATE_SET_ID: u32 = 5u32; pub const EVENT_ACTIVITY_CTRL_GET_ID: u32 = 1u32; pub const EVENT_ACTIVITY_CTRL_GET_SET_ID: u32 = 4u32; pub const EVENT_ACTIVITY_CTRL_SET_ID: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_DATA_DESCRIPTOR { pub Ptr: u64, pub Size: u32, pub Anonymous: EVENT_DATA_DESCRIPTOR_0, } impl EVENT_DATA_DESCRIPTOR {} impl ::core::default::Default for EVENT_DATA_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_DATA_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_DATA_DESCRIPTOR {} unsafe impl ::windows::core::Abi for EVENT_DATA_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_DATA_DESCRIPTOR_0 { pub Reserved: u32, pub Anonymous: EVENT_DATA_DESCRIPTOR_0_0, } impl EVENT_DATA_DESCRIPTOR_0 {} impl ::core::default::Default for EVENT_DATA_DESCRIPTOR_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_DATA_DESCRIPTOR_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_DATA_DESCRIPTOR_0 {} unsafe impl ::windows::core::Abi for EVENT_DATA_DESCRIPTOR_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_DATA_DESCRIPTOR_0_0 { pub Type: u8, pub Reserved1: u8, pub Reserved2: u16, } impl EVENT_DATA_DESCRIPTOR_0_0 {} impl ::core::default::Default for EVENT_DATA_DESCRIPTOR_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_DATA_DESCRIPTOR_0_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("Type", &self.Type).field("Reserved1", &self.Reserved1).field("Reserved2", &self.Reserved2).finish() } } impl ::core::cmp::PartialEq for EVENT_DATA_DESCRIPTOR_0_0 { fn eq(&self, other: &Self) -> bool { self.Type == other.Type && self.Reserved1 == other.Reserved1 && self.Reserved2 == other.Reserved2 } } impl ::core::cmp::Eq for EVENT_DATA_DESCRIPTOR_0_0 {} unsafe impl ::windows::core::Abi for EVENT_DATA_DESCRIPTOR_0_0 { type Abi = Self; } pub const EVENT_DATA_DESCRIPTOR_TYPE_EVENT_METADATA: u32 = 1u32; pub const EVENT_DATA_DESCRIPTOR_TYPE_NONE: u32 = 0u32; pub const EVENT_DATA_DESCRIPTOR_TYPE_PROVIDER_METADATA: u32 = 2u32; pub const EVENT_DATA_DESCRIPTOR_TYPE_TIMESTAMP_OVERRIDE: u32 = 3u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_DESCRIPTOR { pub Id: u16, pub Version: u8, pub Channel: u8, pub Level: u8, pub Opcode: u8, pub Task: u16, pub Keyword: u64, } impl EVENT_DESCRIPTOR {} impl ::core::default::Default for EVENT_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_DESCRIPTOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_DESCRIPTOR").field("Id", &self.Id).field("Version", &self.Version).field("Channel", &self.Channel).field("Level", &self.Level).field("Opcode", &self.Opcode).field("Task", &self.Task).field("Keyword", &self.Keyword).finish() } } impl ::core::cmp::PartialEq for EVENT_DESCRIPTOR { fn eq(&self, other: &Self) -> bool { self.Id == other.Id && self.Version == other.Version && self.Channel == other.Channel && self.Level == other.Level && self.Opcode == other.Opcode && self.Task == other.Task && self.Keyword == other.Keyword } } impl ::core::cmp::Eq for EVENT_DESCRIPTOR {} unsafe impl ::windows::core::Abi for EVENT_DESCRIPTOR { type Abi = Self; } pub const EVENT_ENABLE_PROPERTY_ENABLE_KEYWORD_0: u32 = 64u32; pub const EVENT_ENABLE_PROPERTY_ENABLE_SILOS: u32 = 1024u32; pub const EVENT_ENABLE_PROPERTY_EVENT_KEY: u32 = 256u32; pub const EVENT_ENABLE_PROPERTY_EXCLUDE_INPRIVATE: u32 = 512u32; pub const EVENT_ENABLE_PROPERTY_IGNORE_KEYWORD_0: u32 = 16u32; pub const EVENT_ENABLE_PROPERTY_PROCESS_START_KEY: u32 = 128u32; pub const EVENT_ENABLE_PROPERTY_PROVIDER_GROUP: u32 = 32u32; pub const EVENT_ENABLE_PROPERTY_PSM_KEY: u32 = 8u32; pub const EVENT_ENABLE_PROPERTY_SID: u32 = 1u32; pub const EVENT_ENABLE_PROPERTY_SOURCE_CONTAINER_TRACKING: u32 = 2048u32; pub const EVENT_ENABLE_PROPERTY_STACK_TRACE: u32 = 4u32; pub const EVENT_ENABLE_PROPERTY_TS_ID: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_EXTENDED_ITEM_EVENT_KEY { pub Key: u64, } impl EVENT_EXTENDED_ITEM_EVENT_KEY {} impl ::core::default::Default for EVENT_EXTENDED_ITEM_EVENT_KEY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_EXTENDED_ITEM_EVENT_KEY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_EXTENDED_ITEM_EVENT_KEY").field("Key", &self.Key).finish() } } impl ::core::cmp::PartialEq for EVENT_EXTENDED_ITEM_EVENT_KEY { fn eq(&self, other: &Self) -> bool { self.Key == other.Key } } impl ::core::cmp::Eq for EVENT_EXTENDED_ITEM_EVENT_KEY {} unsafe impl ::windows::core::Abi for EVENT_EXTENDED_ITEM_EVENT_KEY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_EXTENDED_ITEM_INSTANCE { pub InstanceId: u32, pub ParentInstanceId: u32, pub ParentGuid: ::windows::core::GUID, } impl EVENT_EXTENDED_ITEM_INSTANCE {} impl ::core::default::Default for EVENT_EXTENDED_ITEM_INSTANCE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_EXTENDED_ITEM_INSTANCE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_EXTENDED_ITEM_INSTANCE").field("InstanceId", &self.InstanceId).field("ParentInstanceId", &self.ParentInstanceId).field("ParentGuid", &self.ParentGuid).finish() } } impl ::core::cmp::PartialEq for EVENT_EXTENDED_ITEM_INSTANCE { fn eq(&self, other: &Self) -> bool { self.InstanceId == other.InstanceId && self.ParentInstanceId == other.ParentInstanceId && self.ParentGuid == other.ParentGuid } } impl ::core::cmp::Eq for EVENT_EXTENDED_ITEM_INSTANCE {} unsafe impl ::windows::core::Abi for EVENT_EXTENDED_ITEM_INSTANCE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_EXTENDED_ITEM_PEBS_INDEX { pub PebsIndex: u64, } impl EVENT_EXTENDED_ITEM_PEBS_INDEX {} impl ::core::default::Default for EVENT_EXTENDED_ITEM_PEBS_INDEX { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_EXTENDED_ITEM_PEBS_INDEX { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_EXTENDED_ITEM_PEBS_INDEX").field("PebsIndex", &self.PebsIndex).finish() } } impl ::core::cmp::PartialEq for EVENT_EXTENDED_ITEM_PEBS_INDEX { fn eq(&self, other: &Self) -> bool { self.PebsIndex == other.PebsIndex } } impl ::core::cmp::Eq for EVENT_EXTENDED_ITEM_PEBS_INDEX {} unsafe impl ::windows::core::Abi for EVENT_EXTENDED_ITEM_PEBS_INDEX { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_EXTENDED_ITEM_PMC_COUNTERS { pub Counter: [u64; 1], } impl EVENT_EXTENDED_ITEM_PMC_COUNTERS {} impl ::core::default::Default for EVENT_EXTENDED_ITEM_PMC_COUNTERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_EXTENDED_ITEM_PMC_COUNTERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_EXTENDED_ITEM_PMC_COUNTERS").field("Counter", &self.Counter).finish() } } impl ::core::cmp::PartialEq for EVENT_EXTENDED_ITEM_PMC_COUNTERS { fn eq(&self, other: &Self) -> bool { self.Counter == other.Counter } } impl ::core::cmp::Eq for EVENT_EXTENDED_ITEM_PMC_COUNTERS {} unsafe impl ::windows::core::Abi for EVENT_EXTENDED_ITEM_PMC_COUNTERS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_EXTENDED_ITEM_PROCESS_START_KEY { pub ProcessStartKey: u64, } impl EVENT_EXTENDED_ITEM_PROCESS_START_KEY {} impl ::core::default::Default for EVENT_EXTENDED_ITEM_PROCESS_START_KEY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_EXTENDED_ITEM_PROCESS_START_KEY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_EXTENDED_ITEM_PROCESS_START_KEY").field("ProcessStartKey", &self.ProcessStartKey).finish() } } impl ::core::cmp::PartialEq for EVENT_EXTENDED_ITEM_PROCESS_START_KEY { fn eq(&self, other: &Self) -> bool { self.ProcessStartKey == other.ProcessStartKey } } impl ::core::cmp::Eq for EVENT_EXTENDED_ITEM_PROCESS_START_KEY {} unsafe impl ::windows::core::Abi for EVENT_EXTENDED_ITEM_PROCESS_START_KEY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_EXTENDED_ITEM_RELATED_ACTIVITYID { pub RelatedActivityId: ::windows::core::GUID, } impl EVENT_EXTENDED_ITEM_RELATED_ACTIVITYID {} impl ::core::default::Default for EVENT_EXTENDED_ITEM_RELATED_ACTIVITYID { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_EXTENDED_ITEM_RELATED_ACTIVITYID { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_EXTENDED_ITEM_RELATED_ACTIVITYID").field("RelatedActivityId", &self.RelatedActivityId).finish() } } impl ::core::cmp::PartialEq for EVENT_EXTENDED_ITEM_RELATED_ACTIVITYID { fn eq(&self, other: &Self) -> bool { self.RelatedActivityId == other.RelatedActivityId } } impl ::core::cmp::Eq for EVENT_EXTENDED_ITEM_RELATED_ACTIVITYID {} unsafe impl ::windows::core::Abi for EVENT_EXTENDED_ITEM_RELATED_ACTIVITYID { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_EXTENDED_ITEM_STACK_KEY32 { pub MatchId: u64, pub StackKey: u32, pub Padding: u32, } impl EVENT_EXTENDED_ITEM_STACK_KEY32 {} impl ::core::default::Default for EVENT_EXTENDED_ITEM_STACK_KEY32 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_EXTENDED_ITEM_STACK_KEY32 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_EXTENDED_ITEM_STACK_KEY32").field("MatchId", &self.MatchId).field("StackKey", &self.StackKey).field("Padding", &self.Padding).finish() } } impl ::core::cmp::PartialEq for EVENT_EXTENDED_ITEM_STACK_KEY32 { fn eq(&self, other: &Self) -> bool { self.MatchId == other.MatchId && self.StackKey == other.StackKey && self.Padding == other.Padding } } impl ::core::cmp::Eq for EVENT_EXTENDED_ITEM_STACK_KEY32 {} unsafe impl ::windows::core::Abi for EVENT_EXTENDED_ITEM_STACK_KEY32 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_EXTENDED_ITEM_STACK_KEY64 { pub MatchId: u64, pub StackKey: u64, } impl EVENT_EXTENDED_ITEM_STACK_KEY64 {} impl ::core::default::Default for EVENT_EXTENDED_ITEM_STACK_KEY64 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_EXTENDED_ITEM_STACK_KEY64 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_EXTENDED_ITEM_STACK_KEY64").field("MatchId", &self.MatchId).field("StackKey", &self.StackKey).finish() } } impl ::core::cmp::PartialEq for EVENT_EXTENDED_ITEM_STACK_KEY64 { fn eq(&self, other: &Self) -> bool { self.MatchId == other.MatchId && self.StackKey == other.StackKey } } impl ::core::cmp::Eq for EVENT_EXTENDED_ITEM_STACK_KEY64 {} unsafe impl ::windows::core::Abi for EVENT_EXTENDED_ITEM_STACK_KEY64 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_EXTENDED_ITEM_STACK_TRACE32 { pub MatchId: u64, pub Address: [u32; 1], } impl EVENT_EXTENDED_ITEM_STACK_TRACE32 {} impl ::core::default::Default for EVENT_EXTENDED_ITEM_STACK_TRACE32 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_EXTENDED_ITEM_STACK_TRACE32 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_EXTENDED_ITEM_STACK_TRACE32").field("MatchId", &self.MatchId).field("Address", &self.Address).finish() } } impl ::core::cmp::PartialEq for EVENT_EXTENDED_ITEM_STACK_TRACE32 { fn eq(&self, other: &Self) -> bool { self.MatchId == other.MatchId && self.Address == other.Address } } impl ::core::cmp::Eq for EVENT_EXTENDED_ITEM_STACK_TRACE32 {} unsafe impl ::windows::core::Abi for EVENT_EXTENDED_ITEM_STACK_TRACE32 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_EXTENDED_ITEM_STACK_TRACE64 { pub MatchId: u64, pub Address: [u64; 1], } impl EVENT_EXTENDED_ITEM_STACK_TRACE64 {} impl ::core::default::Default for EVENT_EXTENDED_ITEM_STACK_TRACE64 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_EXTENDED_ITEM_STACK_TRACE64 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_EXTENDED_ITEM_STACK_TRACE64").field("MatchId", &self.MatchId).field("Address", &self.Address).finish() } } impl ::core::cmp::PartialEq for EVENT_EXTENDED_ITEM_STACK_TRACE64 { fn eq(&self, other: &Self) -> bool { self.MatchId == other.MatchId && self.Address == other.Address } } impl ::core::cmp::Eq for EVENT_EXTENDED_ITEM_STACK_TRACE64 {} unsafe impl ::windows::core::Abi for EVENT_EXTENDED_ITEM_STACK_TRACE64 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_EXTENDED_ITEM_TS_ID { pub SessionId: u32, } impl EVENT_EXTENDED_ITEM_TS_ID {} impl ::core::default::Default for EVENT_EXTENDED_ITEM_TS_ID { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_EXTENDED_ITEM_TS_ID { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_EXTENDED_ITEM_TS_ID").field("SessionId", &self.SessionId).finish() } } impl ::core::cmp::PartialEq for EVENT_EXTENDED_ITEM_TS_ID { fn eq(&self, other: &Self) -> bool { self.SessionId == other.SessionId } } impl ::core::cmp::Eq for EVENT_EXTENDED_ITEM_TS_ID {} unsafe impl ::windows::core::Abi for EVENT_EXTENDED_ITEM_TS_ID { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct EVENT_FIELD_TYPE(pub i32); pub const EventKeywordInformation: EVENT_FIELD_TYPE = EVENT_FIELD_TYPE(0i32); pub const EventLevelInformation: EVENT_FIELD_TYPE = EVENT_FIELD_TYPE(1i32); pub const EventChannelInformation: EVENT_FIELD_TYPE = EVENT_FIELD_TYPE(2i32); pub const EventTaskInformation: EVENT_FIELD_TYPE = EVENT_FIELD_TYPE(3i32); pub const EventOpcodeInformation: EVENT_FIELD_TYPE = EVENT_FIELD_TYPE(4i32); pub const EventInformationMax: EVENT_FIELD_TYPE = EVENT_FIELD_TYPE(5i32); impl ::core::convert::From<i32> for EVENT_FIELD_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EVENT_FIELD_TYPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_FILTER_DESCRIPTOR { pub Ptr: u64, pub Size: u32, pub Type: u32, } impl EVENT_FILTER_DESCRIPTOR {} impl ::core::default::Default for EVENT_FILTER_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_FILTER_DESCRIPTOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_FILTER_DESCRIPTOR").field("Ptr", &self.Ptr).field("Size", &self.Size).field("Type", &self.Type).finish() } } impl ::core::cmp::PartialEq for EVENT_FILTER_DESCRIPTOR { fn eq(&self, other: &Self) -> bool { self.Ptr == other.Ptr && self.Size == other.Size && self.Type == other.Type } } impl ::core::cmp::Eq for EVENT_FILTER_DESCRIPTOR {} unsafe impl ::windows::core::Abi for EVENT_FILTER_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EVENT_FILTER_EVENT_ID { pub FilterIn: super::super::super::Foundation::BOOLEAN, pub Reserved: u8, pub Count: u16, pub Events: [u16; 1], } #[cfg(feature = "Win32_Foundation")] impl EVENT_FILTER_EVENT_ID {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EVENT_FILTER_EVENT_ID { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EVENT_FILTER_EVENT_ID { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_FILTER_EVENT_ID").field("FilterIn", &self.FilterIn).field("Reserved", &self.Reserved).field("Count", &self.Count).field("Events", &self.Events).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EVENT_FILTER_EVENT_ID { fn eq(&self, other: &Self) -> bool { self.FilterIn == other.FilterIn && self.Reserved == other.Reserved && self.Count == other.Count && self.Events == other.Events } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EVENT_FILTER_EVENT_ID {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EVENT_FILTER_EVENT_ID { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EVENT_FILTER_EVENT_NAME { pub MatchAnyKeyword: u64, pub MatchAllKeyword: u64, pub Level: u8, pub FilterIn: super::super::super::Foundation::BOOLEAN, pub NameCount: u16, pub Names: [u8; 1], } #[cfg(feature = "Win32_Foundation")] impl EVENT_FILTER_EVENT_NAME {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EVENT_FILTER_EVENT_NAME { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EVENT_FILTER_EVENT_NAME { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_FILTER_EVENT_NAME").field("MatchAnyKeyword", &self.MatchAnyKeyword).field("MatchAllKeyword", &self.MatchAllKeyword).field("Level", &self.Level).field("FilterIn", &self.FilterIn).field("NameCount", &self.NameCount).field("Names", &self.Names).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EVENT_FILTER_EVENT_NAME { fn eq(&self, other: &Self) -> bool { self.MatchAnyKeyword == other.MatchAnyKeyword && self.MatchAllKeyword == other.MatchAllKeyword && self.Level == other.Level && self.FilterIn == other.FilterIn && self.NameCount == other.NameCount && self.Names == other.Names } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EVENT_FILTER_EVENT_NAME {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EVENT_FILTER_EVENT_NAME { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_FILTER_HEADER { pub Id: u16, pub Version: u8, pub Reserved: [u8; 5], pub InstanceId: u64, pub Size: u32, pub NextOffset: u32, } impl EVENT_FILTER_HEADER {} impl ::core::default::Default for EVENT_FILTER_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_FILTER_HEADER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_FILTER_HEADER").field("Id", &self.Id).field("Version", &self.Version).field("Reserved", &self.Reserved).field("InstanceId", &self.InstanceId).field("Size", &self.Size).field("NextOffset", &self.NextOffset).finish() } } impl ::core::cmp::PartialEq for EVENT_FILTER_HEADER { fn eq(&self, other: &Self) -> bool { self.Id == other.Id && self.Version == other.Version && self.Reserved == other.Reserved && self.InstanceId == other.InstanceId && self.Size == other.Size && self.NextOffset == other.NextOffset } } impl ::core::cmp::Eq for EVENT_FILTER_HEADER {} unsafe impl ::windows::core::Abi for EVENT_FILTER_HEADER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EVENT_FILTER_LEVEL_KW { pub MatchAnyKeyword: u64, pub MatchAllKeyword: u64, pub Level: u8, pub FilterIn: super::super::super::Foundation::BOOLEAN, } #[cfg(feature = "Win32_Foundation")] impl EVENT_FILTER_LEVEL_KW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EVENT_FILTER_LEVEL_KW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EVENT_FILTER_LEVEL_KW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_FILTER_LEVEL_KW").field("MatchAnyKeyword", &self.MatchAnyKeyword).field("MatchAllKeyword", &self.MatchAllKeyword).field("Level", &self.Level).field("FilterIn", &self.FilterIn).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EVENT_FILTER_LEVEL_KW { fn eq(&self, other: &Self) -> bool { self.MatchAnyKeyword == other.MatchAnyKeyword && self.MatchAllKeyword == other.MatchAllKeyword && self.Level == other.Level && self.FilterIn == other.FilterIn } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EVENT_FILTER_LEVEL_KW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EVENT_FILTER_LEVEL_KW { type Abi = Self; } pub const EVENT_FILTER_TYPE_CONTAINER: u32 = 2147516416u32; pub const EVENT_FILTER_TYPE_EVENT_ID: u32 = 2147484160u32; pub const EVENT_FILTER_TYPE_EVENT_NAME: u32 = 2147484672u32; pub const EVENT_FILTER_TYPE_EXECUTABLE_NAME: u32 = 2147483656u32; pub const EVENT_FILTER_TYPE_NONE: u32 = 0u32; pub const EVENT_FILTER_TYPE_PACKAGE_APP_ID: u32 = 2147483680u32; pub const EVENT_FILTER_TYPE_PACKAGE_ID: u32 = 2147483664u32; pub const EVENT_FILTER_TYPE_PAYLOAD: u32 = 2147483904u32; pub const EVENT_FILTER_TYPE_PID: u32 = 2147483652u32; pub const EVENT_FILTER_TYPE_SCHEMATIZED: u32 = 2147483648u32; pub const EVENT_FILTER_TYPE_STACKWALK: u32 = 2147487744u32; pub const EVENT_FILTER_TYPE_STACKWALK_LEVEL_KW: u32 = 2147500032u32; pub const EVENT_FILTER_TYPE_STACKWALK_NAME: u32 = 2147491840u32; pub const EVENT_FILTER_TYPE_SYSTEM_FLAGS: u32 = 2147483649u32; pub const EVENT_FILTER_TYPE_TRACEHANDLE: u32 = 2147483650u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_HEADER { pub Size: u16, pub HeaderType: u16, pub Flags: u16, pub EventProperty: u16, pub ThreadId: u32, pub ProcessId: u32, pub TimeStamp: i64, pub ProviderId: ::windows::core::GUID, pub EventDescriptor: EVENT_DESCRIPTOR, pub Anonymous: EVENT_HEADER_0, pub ActivityId: ::windows::core::GUID, } impl EVENT_HEADER {} impl ::core::default::Default for EVENT_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_HEADER { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_HEADER {} unsafe impl ::windows::core::Abi for EVENT_HEADER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_HEADER_0 { pub Anonymous: EVENT_HEADER_0_0, pub ProcessorTime: u64, } impl EVENT_HEADER_0 {} impl ::core::default::Default for EVENT_HEADER_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_HEADER_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_HEADER_0 {} unsafe impl ::windows::core::Abi for EVENT_HEADER_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_HEADER_0_0 { pub KernelTime: u32, pub UserTime: u32, } impl EVENT_HEADER_0_0 {} impl ::core::default::Default for EVENT_HEADER_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_HEADER_0_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("KernelTime", &self.KernelTime).field("UserTime", &self.UserTime).finish() } } impl ::core::cmp::PartialEq for EVENT_HEADER_0_0 { fn eq(&self, other: &Self) -> bool { self.KernelTime == other.KernelTime && self.UserTime == other.UserTime } } impl ::core::cmp::Eq for EVENT_HEADER_0_0 {} unsafe impl ::windows::core::Abi for EVENT_HEADER_0_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_HEADER_EXTENDED_DATA_ITEM { pub Reserved1: u16, pub ExtType: u16, pub Anonymous: EVENT_HEADER_EXTENDED_DATA_ITEM_0, pub DataSize: u16, pub DataPtr: u64, } impl EVENT_HEADER_EXTENDED_DATA_ITEM {} impl ::core::default::Default for EVENT_HEADER_EXTENDED_DATA_ITEM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_HEADER_EXTENDED_DATA_ITEM { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_HEADER_EXTENDED_DATA_ITEM").field("Reserved1", &self.Reserved1).field("ExtType", &self.ExtType).field("Anonymous", &self.Anonymous).field("DataSize", &self.DataSize).field("DataPtr", &self.DataPtr).finish() } } impl ::core::cmp::PartialEq for EVENT_HEADER_EXTENDED_DATA_ITEM { fn eq(&self, other: &Self) -> bool { self.Reserved1 == other.Reserved1 && self.ExtType == other.ExtType && self.Anonymous == other.Anonymous && self.DataSize == other.DataSize && self.DataPtr == other.DataPtr } } impl ::core::cmp::Eq for EVENT_HEADER_EXTENDED_DATA_ITEM {} unsafe impl ::windows::core::Abi for EVENT_HEADER_EXTENDED_DATA_ITEM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_HEADER_EXTENDED_DATA_ITEM_0 { pub _bitfield: u16, } impl EVENT_HEADER_EXTENDED_DATA_ITEM_0 {} impl ::core::default::Default for EVENT_HEADER_EXTENDED_DATA_ITEM_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_HEADER_EXTENDED_DATA_ITEM_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("_bitfield", &self._bitfield).finish() } } impl ::core::cmp::PartialEq for EVENT_HEADER_EXTENDED_DATA_ITEM_0 { fn eq(&self, other: &Self) -> bool { self._bitfield == other._bitfield } } impl ::core::cmp::Eq for EVENT_HEADER_EXTENDED_DATA_ITEM_0 {} unsafe impl ::windows::core::Abi for EVENT_HEADER_EXTENDED_DATA_ITEM_0 { type Abi = Self; } pub const EVENT_HEADER_EXT_TYPE_CONTAINER_ID: u32 = 16u32; pub const EVENT_HEADER_EXT_TYPE_CONTROL_GUID: u32 = 14u32; pub const EVENT_HEADER_EXT_TYPE_EVENT_KEY: u32 = 10u32; pub const EVENT_HEADER_EXT_TYPE_EVENT_SCHEMA_TL: u32 = 11u32; pub const EVENT_HEADER_EXT_TYPE_INSTANCE_INFO: u32 = 4u32; pub const EVENT_HEADER_EXT_TYPE_MAX: u32 = 19u32; pub const EVENT_HEADER_EXT_TYPE_PEBS_INDEX: u32 = 7u32; pub const EVENT_HEADER_EXT_TYPE_PMC_COUNTERS: u32 = 8u32; pub const EVENT_HEADER_EXT_TYPE_PROCESS_START_KEY: u32 = 13u32; pub const EVENT_HEADER_EXT_TYPE_PROV_TRAITS: u32 = 12u32; pub const EVENT_HEADER_EXT_TYPE_PSM_KEY: u32 = 9u32; pub const EVENT_HEADER_EXT_TYPE_QPC_DELTA: u32 = 15u32; pub const EVENT_HEADER_EXT_TYPE_RELATED_ACTIVITYID: u32 = 1u32; pub const EVENT_HEADER_EXT_TYPE_SID: u32 = 2u32; pub const EVENT_HEADER_EXT_TYPE_STACK_KEY32: u32 = 17u32; pub const EVENT_HEADER_EXT_TYPE_STACK_KEY64: u32 = 18u32; pub const EVENT_HEADER_EXT_TYPE_STACK_TRACE32: u32 = 5u32; pub const EVENT_HEADER_EXT_TYPE_STACK_TRACE64: u32 = 6u32; pub const EVENT_HEADER_EXT_TYPE_TS_ID: u32 = 3u32; pub const EVENT_HEADER_FLAG_32_BIT_HEADER: u32 = 32u32; pub const EVENT_HEADER_FLAG_64_BIT_HEADER: u32 = 64u32; pub const EVENT_HEADER_FLAG_CLASSIC_HEADER: u32 = 256u32; pub const EVENT_HEADER_FLAG_DECODE_GUID: u32 = 128u32; pub const EVENT_HEADER_FLAG_EXTENDED_INFO: u32 = 1u32; pub const EVENT_HEADER_FLAG_NO_CPUTIME: u32 = 16u32; pub const EVENT_HEADER_FLAG_PRIVATE_SESSION: u32 = 2u32; pub const EVENT_HEADER_FLAG_PROCESSOR_INDEX: u32 = 512u32; pub const EVENT_HEADER_FLAG_STRING_ONLY: u32 = 4u32; pub const EVENT_HEADER_FLAG_TRACE_MESSAGE: u32 = 8u32; pub const EVENT_HEADER_PROPERTY_FORWARDED_XML: u32 = 2u32; pub const EVENT_HEADER_PROPERTY_LEGACY_EVENTLOG: u32 = 4u32; pub const EVENT_HEADER_PROPERTY_RELOGGABLE: u32 = 8u32; pub const EVENT_HEADER_PROPERTY_XML: u32 = 1u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct EVENT_INFO_CLASS(pub i32); pub const EventProviderBinaryTrackInfo: EVENT_INFO_CLASS = EVENT_INFO_CLASS(0i32); pub const EventProviderSetReserved1: EVENT_INFO_CLASS = EVENT_INFO_CLASS(1i32); pub const EventProviderSetTraits: EVENT_INFO_CLASS = EVENT_INFO_CLASS(2i32); pub const EventProviderUseDescriptorType: EVENT_INFO_CLASS = EVENT_INFO_CLASS(3i32); pub const MaxEventInfo: EVENT_INFO_CLASS = EVENT_INFO_CLASS(4i32); impl ::core::convert::From<i32> for EVENT_INFO_CLASS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EVENT_INFO_CLASS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_INSTANCE_HEADER { pub Size: u16, pub Anonymous1: EVENT_INSTANCE_HEADER_0, pub Anonymous2: EVENT_INSTANCE_HEADER_1, pub ThreadId: u32, pub ProcessId: u32, pub TimeStamp: i64, pub RegHandle: u64, pub InstanceId: u32, pub ParentInstanceId: u32, pub Anonymous3: EVENT_INSTANCE_HEADER_2, pub ParentRegHandle: u64, } impl EVENT_INSTANCE_HEADER {} impl ::core::default::Default for EVENT_INSTANCE_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_INSTANCE_HEADER { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_INSTANCE_HEADER {} unsafe impl ::windows::core::Abi for EVENT_INSTANCE_HEADER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_INSTANCE_HEADER_0 { pub FieldTypeFlags: u16, pub Anonymous: EVENT_INSTANCE_HEADER_0_0, } impl EVENT_INSTANCE_HEADER_0 {} impl ::core::default::Default for EVENT_INSTANCE_HEADER_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_INSTANCE_HEADER_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_INSTANCE_HEADER_0 {} unsafe impl ::windows::core::Abi for EVENT_INSTANCE_HEADER_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_INSTANCE_HEADER_0_0 { pub HeaderType: u8, pub MarkerFlags: u8, } impl EVENT_INSTANCE_HEADER_0_0 {} impl ::core::default::Default for EVENT_INSTANCE_HEADER_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_INSTANCE_HEADER_0_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("HeaderType", &self.HeaderType).field("MarkerFlags", &self.MarkerFlags).finish() } } impl ::core::cmp::PartialEq for EVENT_INSTANCE_HEADER_0_0 { fn eq(&self, other: &Self) -> bool { self.HeaderType == other.HeaderType && self.MarkerFlags == other.MarkerFlags } } impl ::core::cmp::Eq for EVENT_INSTANCE_HEADER_0_0 {} unsafe impl ::windows::core::Abi for EVENT_INSTANCE_HEADER_0_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_INSTANCE_HEADER_1 { pub Version: u32, pub Class: EVENT_INSTANCE_HEADER_1_0, } impl EVENT_INSTANCE_HEADER_1 {} impl ::core::default::Default for EVENT_INSTANCE_HEADER_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_INSTANCE_HEADER_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_INSTANCE_HEADER_1 {} unsafe impl ::windows::core::Abi for EVENT_INSTANCE_HEADER_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_INSTANCE_HEADER_1_0 { pub Type: u8, pub Level: u8, pub Version: u16, } impl EVENT_INSTANCE_HEADER_1_0 {} impl ::core::default::Default for EVENT_INSTANCE_HEADER_1_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_INSTANCE_HEADER_1_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Class_e__Struct").field("Type", &self.Type).field("Level", &self.Level).field("Version", &self.Version).finish() } } impl ::core::cmp::PartialEq for EVENT_INSTANCE_HEADER_1_0 { fn eq(&self, other: &Self) -> bool { self.Type == other.Type && self.Level == other.Level && self.Version == other.Version } } impl ::core::cmp::Eq for EVENT_INSTANCE_HEADER_1_0 {} unsafe impl ::windows::core::Abi for EVENT_INSTANCE_HEADER_1_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_INSTANCE_HEADER_2 { pub Anonymous1: EVENT_INSTANCE_HEADER_2_0, pub ProcessorTime: u64, pub Anonymous2: EVENT_INSTANCE_HEADER_2_1, } impl EVENT_INSTANCE_HEADER_2 {} impl ::core::default::Default for EVENT_INSTANCE_HEADER_2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_INSTANCE_HEADER_2 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_INSTANCE_HEADER_2 {} unsafe impl ::windows::core::Abi for EVENT_INSTANCE_HEADER_2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_INSTANCE_HEADER_2_0 { pub KernelTime: u32, pub UserTime: u32, } impl EVENT_INSTANCE_HEADER_2_0 {} impl ::core::default::Default for EVENT_INSTANCE_HEADER_2_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_INSTANCE_HEADER_2_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous1_e__Struct").field("KernelTime", &self.KernelTime).field("UserTime", &self.UserTime).finish() } } impl ::core::cmp::PartialEq for EVENT_INSTANCE_HEADER_2_0 { fn eq(&self, other: &Self) -> bool { self.KernelTime == other.KernelTime && self.UserTime == other.UserTime } } impl ::core::cmp::Eq for EVENT_INSTANCE_HEADER_2_0 {} unsafe impl ::windows::core::Abi for EVENT_INSTANCE_HEADER_2_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_INSTANCE_HEADER_2_1 { pub EventId: u32, pub Flags: u32, } impl EVENT_INSTANCE_HEADER_2_1 {} impl ::core::default::Default for EVENT_INSTANCE_HEADER_2_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_INSTANCE_HEADER_2_1 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous2_e__Struct").field("EventId", &self.EventId).field("Flags", &self.Flags).finish() } } impl ::core::cmp::PartialEq for EVENT_INSTANCE_HEADER_2_1 { fn eq(&self, other: &Self) -> bool { self.EventId == other.EventId && self.Flags == other.Flags } } impl ::core::cmp::Eq for EVENT_INSTANCE_HEADER_2_1 {} unsafe impl ::windows::core::Abi for EVENT_INSTANCE_HEADER_2_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EVENT_INSTANCE_INFO { pub RegHandle: super::super::super::Foundation::HANDLE, pub InstanceId: u32, } #[cfg(feature = "Win32_Foundation")] impl EVENT_INSTANCE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EVENT_INSTANCE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EVENT_INSTANCE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EVENT_INSTANCE_INFO").field("RegHandle", &self.RegHandle).field("InstanceId", &self.InstanceId).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EVENT_INSTANCE_INFO { fn eq(&self, other: &Self) -> bool { self.RegHandle == other.RegHandle && self.InstanceId == other.InstanceId } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EVENT_INSTANCE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EVENT_INSTANCE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_MAP_ENTRY { pub OutputOffset: u32, pub Anonymous: EVENT_MAP_ENTRY_0, } impl EVENT_MAP_ENTRY {} impl ::core::default::Default for EVENT_MAP_ENTRY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_MAP_ENTRY { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_MAP_ENTRY {} unsafe impl ::windows::core::Abi for EVENT_MAP_ENTRY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_MAP_ENTRY_0 { pub Value: u32, pub InputOffset: u32, } impl EVENT_MAP_ENTRY_0 {} impl ::core::default::Default for EVENT_MAP_ENTRY_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_MAP_ENTRY_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_MAP_ENTRY_0 {} unsafe impl ::windows::core::Abi for EVENT_MAP_ENTRY_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_MAP_INFO { pub NameOffset: u32, pub Flag: MAP_FLAGS, pub EntryCount: u32, pub Anonymous: EVENT_MAP_INFO_0, pub MapEntryArray: [EVENT_MAP_ENTRY; 1], } impl EVENT_MAP_INFO {} impl ::core::default::Default for EVENT_MAP_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_MAP_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_MAP_INFO {} unsafe impl ::windows::core::Abi for EVENT_MAP_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_MAP_INFO_0 { pub MapEntryValueType: MAP_VALUETYPE, pub FormatStringOffset: u32, } impl EVENT_MAP_INFO_0 {} impl ::core::default::Default for EVENT_MAP_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_MAP_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_MAP_INFO_0 {} unsafe impl ::windows::core::Abi for EVENT_MAP_INFO_0 { type Abi = Self; } pub const EVENT_MAX_LEVEL: u32 = 255u32; pub const EVENT_MIN_LEVEL: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_PROPERTY_INFO { pub Flags: PROPERTY_FLAGS, pub NameOffset: u32, pub Anonymous1: EVENT_PROPERTY_INFO_0, pub Anonymous2: EVENT_PROPERTY_INFO_1, pub Anonymous3: EVENT_PROPERTY_INFO_2, pub Anonymous4: EVENT_PROPERTY_INFO_3, } impl EVENT_PROPERTY_INFO {} impl ::core::default::Default for EVENT_PROPERTY_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_PROPERTY_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_PROPERTY_INFO {} unsafe impl ::windows::core::Abi for EVENT_PROPERTY_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_PROPERTY_INFO_0 { pub nonStructType: EVENT_PROPERTY_INFO_0_1, pub structType: EVENT_PROPERTY_INFO_0_2, pub customSchemaType: EVENT_PROPERTY_INFO_0_0, } impl EVENT_PROPERTY_INFO_0 {} impl ::core::default::Default for EVENT_PROPERTY_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_PROPERTY_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_PROPERTY_INFO_0 {} unsafe impl ::windows::core::Abi for EVENT_PROPERTY_INFO_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_PROPERTY_INFO_0_0 { pub InType: u16, pub OutType: u16, pub CustomSchemaOffset: u32, } impl EVENT_PROPERTY_INFO_0_0 {} impl ::core::default::Default for EVENT_PROPERTY_INFO_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_PROPERTY_INFO_0_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_customSchemaType").field("InType", &self.InType).field("OutType", &self.OutType).field("CustomSchemaOffset", &self.CustomSchemaOffset).finish() } } impl ::core::cmp::PartialEq for EVENT_PROPERTY_INFO_0_0 { fn eq(&self, other: &Self) -> bool { self.InType == other.InType && self.OutType == other.OutType && self.CustomSchemaOffset == other.CustomSchemaOffset } } impl ::core::cmp::Eq for EVENT_PROPERTY_INFO_0_0 {} unsafe impl ::windows::core::Abi for EVENT_PROPERTY_INFO_0_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_PROPERTY_INFO_0_1 { pub InType: u16, pub OutType: u16, pub MapNameOffset: u32, } impl EVENT_PROPERTY_INFO_0_1 {} impl ::core::default::Default for EVENT_PROPERTY_INFO_0_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_PROPERTY_INFO_0_1 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_nonStructType").field("InType", &self.InType).field("OutType", &self.OutType).field("MapNameOffset", &self.MapNameOffset).finish() } } impl ::core::cmp::PartialEq for EVENT_PROPERTY_INFO_0_1 { fn eq(&self, other: &Self) -> bool { self.InType == other.InType && self.OutType == other.OutType && self.MapNameOffset == other.MapNameOffset } } impl ::core::cmp::Eq for EVENT_PROPERTY_INFO_0_1 {} unsafe impl ::windows::core::Abi for EVENT_PROPERTY_INFO_0_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_PROPERTY_INFO_0_2 { pub StructStartIndex: u16, pub NumOfStructMembers: u16, pub padding: u32, } impl EVENT_PROPERTY_INFO_0_2 {} impl ::core::default::Default for EVENT_PROPERTY_INFO_0_2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_PROPERTY_INFO_0_2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_structType").field("StructStartIndex", &self.StructStartIndex).field("NumOfStructMembers", &self.NumOfStructMembers).field("padding", &self.padding).finish() } } impl ::core::cmp::PartialEq for EVENT_PROPERTY_INFO_0_2 { fn eq(&self, other: &Self) -> bool { self.StructStartIndex == other.StructStartIndex && self.NumOfStructMembers == other.NumOfStructMembers && self.padding == other.padding } } impl ::core::cmp::Eq for EVENT_PROPERTY_INFO_0_2 {} unsafe impl ::windows::core::Abi for EVENT_PROPERTY_INFO_0_2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_PROPERTY_INFO_1 { pub count: u16, pub countPropertyIndex: u16, } impl EVENT_PROPERTY_INFO_1 {} impl ::core::default::Default for EVENT_PROPERTY_INFO_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_PROPERTY_INFO_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_PROPERTY_INFO_1 {} unsafe impl ::windows::core::Abi for EVENT_PROPERTY_INFO_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_PROPERTY_INFO_2 { pub length: u16, pub lengthPropertyIndex: u16, } impl EVENT_PROPERTY_INFO_2 {} impl ::core::default::Default for EVENT_PROPERTY_INFO_2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_PROPERTY_INFO_2 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_PROPERTY_INFO_2 {} unsafe impl ::windows::core::Abi for EVENT_PROPERTY_INFO_2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_PROPERTY_INFO_3 { pub Reserved: u32, pub Anonymous: EVENT_PROPERTY_INFO_3_0, } impl EVENT_PROPERTY_INFO_3 {} impl ::core::default::Default for EVENT_PROPERTY_INFO_3 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_PROPERTY_INFO_3 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_PROPERTY_INFO_3 {} unsafe impl ::windows::core::Abi for EVENT_PROPERTY_INFO_3 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_PROPERTY_INFO_3_0 { pub _bitfield: u32, } impl EVENT_PROPERTY_INFO_3_0 {} impl ::core::default::Default for EVENT_PROPERTY_INFO_3_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_PROPERTY_INFO_3_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("_bitfield", &self._bitfield).finish() } } impl ::core::cmp::PartialEq for EVENT_PROPERTY_INFO_3_0 { fn eq(&self, other: &Self) -> bool { self._bitfield == other._bitfield } } impl ::core::cmp::Eq for EVENT_PROPERTY_INFO_3_0 {} unsafe impl ::windows::core::Abi for EVENT_PROPERTY_INFO_3_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_RECORD { pub EventHeader: EVENT_HEADER, pub BufferContext: ETW_BUFFER_CONTEXT, pub ExtendedDataCount: u16, pub UserDataLength: u16, pub ExtendedData: *mut EVENT_HEADER_EXTENDED_DATA_ITEM, pub UserData: *mut ::core::ffi::c_void, pub UserContext: *mut ::core::ffi::c_void, } impl EVENT_RECORD {} impl ::core::default::Default for EVENT_RECORD { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_RECORD { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_RECORD {} unsafe impl ::windows::core::Abi for EVENT_RECORD { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_TRACE { pub Header: EVENT_TRACE_HEADER, pub InstanceId: u32, pub ParentInstanceId: u32, pub ParentGuid: ::windows::core::GUID, pub MofData: *mut ::core::ffi::c_void, pub MofLength: u32, pub Anonymous: EVENT_TRACE_0, } impl EVENT_TRACE {} impl ::core::default::Default for EVENT_TRACE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_TRACE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_TRACE {} unsafe impl ::windows::core::Abi for EVENT_TRACE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_TRACE_0 { pub ClientContext: u32, pub BufferContext: ETW_BUFFER_CONTEXT, } impl EVENT_TRACE_0 {} impl ::core::default::Default for EVENT_TRACE_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_TRACE_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_TRACE_0 {} unsafe impl ::windows::core::Abi for EVENT_TRACE_0 { type Abi = Self; } pub const EVENT_TRACE_ADDTO_TRIAGE_DUMP: u32 = 2147483648u32; pub const EVENT_TRACE_ADD_HEADER_MODE: u32 = 4096u32; pub const EVENT_TRACE_BUFFERING_MODE: u32 = 1024u32; pub const EVENT_TRACE_COMPRESSED_MODE: u32 = 67108864u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct EVENT_TRACE_CONTROL(pub u32); pub const EVENT_TRACE_CONTROL_FLUSH: EVENT_TRACE_CONTROL = EVENT_TRACE_CONTROL(3u32); pub const EVENT_TRACE_CONTROL_QUERY: EVENT_TRACE_CONTROL = EVENT_TRACE_CONTROL(0u32); pub const EVENT_TRACE_CONTROL_STOP: EVENT_TRACE_CONTROL = EVENT_TRACE_CONTROL(1u32); pub const EVENT_TRACE_CONTROL_UPDATE: EVENT_TRACE_CONTROL = EVENT_TRACE_CONTROL(2u32); impl ::core::convert::From<u32> for EVENT_TRACE_CONTROL { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EVENT_TRACE_CONTROL { type Abi = Self; } impl ::core::ops::BitOr for EVENT_TRACE_CONTROL { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for EVENT_TRACE_CONTROL { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for EVENT_TRACE_CONTROL { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for EVENT_TRACE_CONTROL { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for EVENT_TRACE_CONTROL { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const EVENT_TRACE_CONTROL_CONVERT_TO_REALTIME: u32 = 5u32; pub const EVENT_TRACE_CONTROL_INCREMENT_FILE: u32 = 4u32; pub const EVENT_TRACE_DELAY_OPEN_FILE_MODE: u32 = 512u32; pub const EVENT_TRACE_FILE_MODE_APPEND: u32 = 4u32; pub const EVENT_TRACE_FILE_MODE_CIRCULAR: u32 = 2u32; pub const EVENT_TRACE_FILE_MODE_NEWFILE: u32 = 8u32; pub const EVENT_TRACE_FILE_MODE_NONE: u32 = 0u32; pub const EVENT_TRACE_FILE_MODE_PREALLOCATE: u32 = 32u32; pub const EVENT_TRACE_FILE_MODE_SEQUENTIAL: u32 = 1u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct EVENT_TRACE_FLAG(pub u32); pub const EVENT_TRACE_FLAG_ALPC: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(1048576u32); pub const EVENT_TRACE_FLAG_CSWITCH: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(16u32); pub const EVENT_TRACE_FLAG_DBGPRINT: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(262144u32); pub const EVENT_TRACE_FLAG_DISK_FILE_IO: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(512u32); pub const EVENT_TRACE_FLAG_DISK_IO: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(256u32); pub const EVENT_TRACE_FLAG_DISK_IO_INIT: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(1024u32); pub const EVENT_TRACE_FLAG_DISPATCHER: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(2048u32); pub const EVENT_TRACE_FLAG_DPC: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(32u32); pub const EVENT_TRACE_FLAG_DRIVER: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(8388608u32); pub const EVENT_TRACE_FLAG_FILE_IO: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(33554432u32); pub const EVENT_TRACE_FLAG_FILE_IO_INIT: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(67108864u32); pub const EVENT_TRACE_FLAG_IMAGE_LOAD: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(4u32); pub const EVENT_TRACE_FLAG_INTERRUPT: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(64u32); pub const EVENT_TRACE_FLAG_JOB: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(524288u32); pub const EVENT_TRACE_FLAG_MEMORY_HARD_FAULTS: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(8192u32); pub const EVENT_TRACE_FLAG_MEMORY_PAGE_FAULTS: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(4096u32); pub const EVENT_TRACE_FLAG_NETWORK_TCPIP: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(65536u32); pub const EVENT_TRACE_FLAG_NO_SYSCONFIG: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(268435456u32); pub const EVENT_TRACE_FLAG_PROCESS: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(1u32); pub const EVENT_TRACE_FLAG_PROCESS_COUNTERS: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(8u32); pub const EVENT_TRACE_FLAG_PROFILE: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(16777216u32); pub const EVENT_TRACE_FLAG_REGISTRY: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(131072u32); pub const EVENT_TRACE_FLAG_SPLIT_IO: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(2097152u32); pub const EVENT_TRACE_FLAG_SYSTEMCALL: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(128u32); pub const EVENT_TRACE_FLAG_THREAD: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(2u32); pub const EVENT_TRACE_FLAG_VAMAP: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(32768u32); pub const EVENT_TRACE_FLAG_VIRTUAL_ALLOC: EVENT_TRACE_FLAG = EVENT_TRACE_FLAG(16384u32); impl ::core::convert::From<u32> for EVENT_TRACE_FLAG { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EVENT_TRACE_FLAG { type Abi = Self; } impl ::core::ops::BitOr for EVENT_TRACE_FLAG { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for EVENT_TRACE_FLAG { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for EVENT_TRACE_FLAG { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for EVENT_TRACE_FLAG { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for EVENT_TRACE_FLAG { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const EVENT_TRACE_FLAG_DEBUG_EVENTS: u32 = 4194304u32; pub const EVENT_TRACE_FLAG_ENABLE_RESERVE: u32 = 536870912u32; pub const EVENT_TRACE_FLAG_EXTENSION: u32 = 2147483648u32; pub const EVENT_TRACE_FLAG_FORWARD_WMI: u32 = 1073741824u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_TRACE_HEADER { pub Size: u16, pub Anonymous1: EVENT_TRACE_HEADER_0, pub Anonymous2: EVENT_TRACE_HEADER_1, pub ThreadId: u32, pub ProcessId: u32, pub TimeStamp: i64, pub Anonymous3: EVENT_TRACE_HEADER_2, pub Anonymous4: EVENT_TRACE_HEADER_3, } impl EVENT_TRACE_HEADER {} impl ::core::default::Default for EVENT_TRACE_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_TRACE_HEADER { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_TRACE_HEADER {} unsafe impl ::windows::core::Abi for EVENT_TRACE_HEADER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_TRACE_HEADER_0 { pub FieldTypeFlags: u16, pub Anonymous: EVENT_TRACE_HEADER_0_0, } impl EVENT_TRACE_HEADER_0 {} impl ::core::default::Default for EVENT_TRACE_HEADER_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_TRACE_HEADER_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_TRACE_HEADER_0 {} unsafe impl ::windows::core::Abi for EVENT_TRACE_HEADER_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_TRACE_HEADER_0_0 { pub HeaderType: u8, pub MarkerFlags: u8, } impl EVENT_TRACE_HEADER_0_0 {} impl ::core::default::Default for EVENT_TRACE_HEADER_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_TRACE_HEADER_0_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("HeaderType", &self.HeaderType).field("MarkerFlags", &self.MarkerFlags).finish() } } impl ::core::cmp::PartialEq for EVENT_TRACE_HEADER_0_0 { fn eq(&self, other: &Self) -> bool { self.HeaderType == other.HeaderType && self.MarkerFlags == other.MarkerFlags } } impl ::core::cmp::Eq for EVENT_TRACE_HEADER_0_0 {} unsafe impl ::windows::core::Abi for EVENT_TRACE_HEADER_0_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_TRACE_HEADER_1 { pub Version: u32, pub Class: EVENT_TRACE_HEADER_1_0, } impl EVENT_TRACE_HEADER_1 {} impl ::core::default::Default for EVENT_TRACE_HEADER_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_TRACE_HEADER_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_TRACE_HEADER_1 {} unsafe impl ::windows::core::Abi for EVENT_TRACE_HEADER_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_TRACE_HEADER_1_0 { pub Type: u8, pub Level: u8, pub Version: u16, } impl EVENT_TRACE_HEADER_1_0 {} impl ::core::default::Default for EVENT_TRACE_HEADER_1_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_TRACE_HEADER_1_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Class_e__Struct").field("Type", &self.Type).field("Level", &self.Level).field("Version", &self.Version).finish() } } impl ::core::cmp::PartialEq for EVENT_TRACE_HEADER_1_0 { fn eq(&self, other: &Self) -> bool { self.Type == other.Type && self.Level == other.Level && self.Version == other.Version } } impl ::core::cmp::Eq for EVENT_TRACE_HEADER_1_0 {} unsafe impl ::windows::core::Abi for EVENT_TRACE_HEADER_1_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_TRACE_HEADER_2 { pub Guid: ::windows::core::GUID, pub GuidPtr: u64, } impl EVENT_TRACE_HEADER_2 {} impl ::core::default::Default for EVENT_TRACE_HEADER_2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_TRACE_HEADER_2 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_TRACE_HEADER_2 {} unsafe impl ::windows::core::Abi for EVENT_TRACE_HEADER_2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union EVENT_TRACE_HEADER_3 { pub Anonymous1: EVENT_TRACE_HEADER_3_0, pub ProcessorTime: u64, pub Anonymous2: EVENT_TRACE_HEADER_3_1, } impl EVENT_TRACE_HEADER_3 {} impl ::core::default::Default for EVENT_TRACE_HEADER_3 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for EVENT_TRACE_HEADER_3 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for EVENT_TRACE_HEADER_3 {} unsafe impl ::windows::core::Abi for EVENT_TRACE_HEADER_3 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_TRACE_HEADER_3_0 { pub KernelTime: u32, pub UserTime: u32, } impl EVENT_TRACE_HEADER_3_0 {} impl ::core::default::Default for EVENT_TRACE_HEADER_3_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_TRACE_HEADER_3_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous1_e__Struct").field("KernelTime", &self.KernelTime).field("UserTime", &self.UserTime).finish() } } impl ::core::cmp::PartialEq for EVENT_TRACE_HEADER_3_0 { fn eq(&self, other: &Self) -> bool { self.KernelTime == other.KernelTime && self.UserTime == other.UserTime } } impl ::core::cmp::Eq for EVENT_TRACE_HEADER_3_0 {} unsafe impl ::windows::core::Abi for EVENT_TRACE_HEADER_3_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EVENT_TRACE_HEADER_3_1 { pub ClientContext: u32, pub Flags: u32, } impl EVENT_TRACE_HEADER_3_1 {} impl ::core::default::Default for EVENT_TRACE_HEADER_3_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EVENT_TRACE_HEADER_3_1 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous2_e__Struct").field("ClientContext", &self.ClientContext).field("Flags", &self.Flags).finish() } } impl ::core::cmp::PartialEq for EVENT_TRACE_HEADER_3_1 { fn eq(&self, other: &Self) -> bool { self.ClientContext == other.ClientContext && self.Flags == other.Flags } } impl ::core::cmp::Eq for EVENT_TRACE_HEADER_3_1 {} unsafe impl ::windows::core::Abi for EVENT_TRACE_HEADER_3_1 { type Abi = Self; } pub const EVENT_TRACE_INDEPENDENT_SESSION_MODE: u32 = 134217728u32; #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::clone::Clone for EVENT_TRACE_LOGFILEA { fn clone(&self) -> Self { unimplemented!() } } #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub struct EVENT_TRACE_LOGFILEA { pub LogFileName: super::super::super::Foundation::PSTR, pub LoggerName: super::super::super::Foundation::PSTR, pub CurrentTime: i64, pub BuffersRead: u32, pub Anonymous1: EVENT_TRACE_LOGFILEA_0, pub CurrentEvent: EVENT_TRACE, pub LogfileHeader: TRACE_LOGFILE_HEADER, pub BufferCallback: ::core::option::Option<PEVENT_TRACE_BUFFER_CALLBACKA>, pub BufferSize: u32, pub Filled: u32, pub EventsLost: u32, pub Anonymous2: EVENT_TRACE_LOGFILEA_1, pub IsKernelTrace: u32, pub Context: *mut ::core::ffi::c_void, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl EVENT_TRACE_LOGFILEA {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for EVENT_TRACE_LOGFILEA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for EVENT_TRACE_LOGFILEA { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for EVENT_TRACE_LOGFILEA {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for EVENT_TRACE_LOGFILEA { type Abi = ::core::mem::ManuallyDrop<Self>; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub union EVENT_TRACE_LOGFILEA_0 { pub LogFileMode: u32, pub ProcessTraceMode: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl EVENT_TRACE_LOGFILEA_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for EVENT_TRACE_LOGFILEA_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for EVENT_TRACE_LOGFILEA_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for EVENT_TRACE_LOGFILEA_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for EVENT_TRACE_LOGFILEA_0 { type Abi = Self; } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::clone::Clone for EVENT_TRACE_LOGFILEA_1 { fn clone(&self) -> Self { unimplemented!() } } #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub union EVENT_TRACE_LOGFILEA_1 { pub EventCallback: ::windows::core::RawPtr, pub EventRecordCallback: ::windows::core::RawPtr, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl EVENT_TRACE_LOGFILEA_1 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for EVENT_TRACE_LOGFILEA_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for EVENT_TRACE_LOGFILEA_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for EVENT_TRACE_LOGFILEA_1 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for EVENT_TRACE_LOGFILEA_1 { type Abi = ::core::mem::ManuallyDrop<Self>; } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::clone::Clone for EVENT_TRACE_LOGFILEW { fn clone(&self) -> Self { unimplemented!() } } #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub struct EVENT_TRACE_LOGFILEW { pub LogFileName: super::super::super::Foundation::PWSTR, pub LoggerName: super::super::super::Foundation::PWSTR, pub CurrentTime: i64, pub BuffersRead: u32, pub Anonymous1: EVENT_TRACE_LOGFILEW_0, pub CurrentEvent: EVENT_TRACE, pub LogfileHeader: TRACE_LOGFILE_HEADER, pub BufferCallback: ::core::option::Option<PEVENT_TRACE_BUFFER_CALLBACKW>, pub BufferSize: u32, pub Filled: u32, pub EventsLost: u32, pub Anonymous2: EVENT_TRACE_LOGFILEW_1, pub IsKernelTrace: u32, pub Context: *mut ::core::ffi::c_void, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl EVENT_TRACE_LOGFILEW {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for EVENT_TRACE_LOGFILEW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for EVENT_TRACE_LOGFILEW { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for EVENT_TRACE_LOGFILEW {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for EVENT_TRACE_LOGFILEW { type Abi = ::core::mem::ManuallyDrop<Self>; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub union EVENT_TRACE_LOGFILEW_0 { pub LogFileMode: u32, pub ProcessTraceMode: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl EVENT_TRACE_LOGFILEW_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for EVENT_TRACE_LOGFILEW_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for EVENT_TRACE_LOGFILEW_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for EVENT_TRACE_LOGFILEW_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for EVENT_TRACE_LOGFILEW_0 { type Abi = Self; } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::clone::Clone for EVENT_TRACE_LOGFILEW_1 { fn clone(&self) -> Self { unimplemented!() } } #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub union EVENT_TRACE_LOGFILEW_1 { pub EventCallback: ::windows::core::RawPtr, pub EventRecordCallback: ::windows::core::RawPtr, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl EVENT_TRACE_LOGFILEW_1 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for EVENT_TRACE_LOGFILEW_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for EVENT_TRACE_LOGFILEW_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for EVENT_TRACE_LOGFILEW_1 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for EVENT_TRACE_LOGFILEW_1 { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const EVENT_TRACE_MODE_RESERVED: u32 = 1048576u32; pub const EVENT_TRACE_NONSTOPPABLE_MODE: u32 = 64u32; pub const EVENT_TRACE_NO_PER_PROCESSOR_BUFFERING: u32 = 268435456u32; pub const EVENT_TRACE_PERSIST_ON_HYBRID_SHUTDOWN: u32 = 8388608u32; pub const EVENT_TRACE_PRIVATE_IN_PROC: u32 = 131072u32; pub const EVENT_TRACE_PRIVATE_LOGGER_MODE: u32 = 2048u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EVENT_TRACE_PROPERTIES { pub Wnode: WNODE_HEADER, pub BufferSize: u32, pub MinimumBuffers: u32, pub MaximumBuffers: u32, pub MaximumFileSize: u32, pub LogFileMode: u32, pub FlushTimer: u32, pub EnableFlags: EVENT_TRACE_FLAG, pub Anonymous: EVENT_TRACE_PROPERTIES_0, pub NumberOfBuffers: u32, pub FreeBuffers: u32, pub EventsLost: u32, pub BuffersWritten: u32, pub LogBuffersLost: u32, pub RealTimeBuffersLost: u32, pub LoggerThreadId: super::super::super::Foundation::HANDLE, pub LogFileNameOffset: u32, pub LoggerNameOffset: u32, } #[cfg(feature = "Win32_Foundation")] impl EVENT_TRACE_PROPERTIES {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EVENT_TRACE_PROPERTIES { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EVENT_TRACE_PROPERTIES { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EVENT_TRACE_PROPERTIES {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EVENT_TRACE_PROPERTIES { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union EVENT_TRACE_PROPERTIES_0 { pub AgeLimit: i32, pub FlushThreshold: i32, } #[cfg(feature = "Win32_Foundation")] impl EVENT_TRACE_PROPERTIES_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EVENT_TRACE_PROPERTIES_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EVENT_TRACE_PROPERTIES_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EVENT_TRACE_PROPERTIES_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EVENT_TRACE_PROPERTIES_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EVENT_TRACE_PROPERTIES_V2 { pub Wnode: WNODE_HEADER, pub BufferSize: u32, pub MinimumBuffers: u32, pub MaximumBuffers: u32, pub MaximumFileSize: u32, pub LogFileMode: u32, pub FlushTimer: u32, pub EnableFlags: EVENT_TRACE_FLAG, pub Anonymous1: EVENT_TRACE_PROPERTIES_V2_0, pub NumberOfBuffers: u32, pub FreeBuffers: u32, pub EventsLost: u32, pub BuffersWritten: u32, pub LogBuffersLost: u32, pub RealTimeBuffersLost: u32, pub LoggerThreadId: super::super::super::Foundation::HANDLE, pub LogFileNameOffset: u32, pub LoggerNameOffset: u32, pub Anonymous2: EVENT_TRACE_PROPERTIES_V2_1, pub FilterDescCount: u32, pub FilterDesc: *mut EVENT_FILTER_DESCRIPTOR, pub Anonymous3: EVENT_TRACE_PROPERTIES_V2_2, } #[cfg(feature = "Win32_Foundation")] impl EVENT_TRACE_PROPERTIES_V2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EVENT_TRACE_PROPERTIES_V2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EVENT_TRACE_PROPERTIES_V2 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EVENT_TRACE_PROPERTIES_V2 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EVENT_TRACE_PROPERTIES_V2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union EVENT_TRACE_PROPERTIES_V2_0 { pub AgeLimit: i32, pub FlushThreshold: i32, } #[cfg(feature = "Win32_Foundation")] impl EVENT_TRACE_PROPERTIES_V2_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EVENT_TRACE_PROPERTIES_V2_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EVENT_TRACE_PROPERTIES_V2_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EVENT_TRACE_PROPERTIES_V2_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EVENT_TRACE_PROPERTIES_V2_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union EVENT_TRACE_PROPERTIES_V2_1 { pub Anonymous: EVENT_TRACE_PROPERTIES_V2_1_0, pub V2Control: u32, } #[cfg(feature = "Win32_Foundation")] impl EVENT_TRACE_PROPERTIES_V2_1 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EVENT_TRACE_PROPERTIES_V2_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EVENT_TRACE_PROPERTIES_V2_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EVENT_TRACE_PROPERTIES_V2_1 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EVENT_TRACE_PROPERTIES_V2_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EVENT_TRACE_PROPERTIES_V2_1_0 { pub _bitfield: u32, } #[cfg(feature = "Win32_Foundation")] impl EVENT_TRACE_PROPERTIES_V2_1_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EVENT_TRACE_PROPERTIES_V2_1_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EVENT_TRACE_PROPERTIES_V2_1_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("_bitfield", &self._bitfield).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EVENT_TRACE_PROPERTIES_V2_1_0 { fn eq(&self, other: &Self) -> bool { self._bitfield == other._bitfield } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EVENT_TRACE_PROPERTIES_V2_1_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EVENT_TRACE_PROPERTIES_V2_1_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union EVENT_TRACE_PROPERTIES_V2_2 { pub Anonymous: EVENT_TRACE_PROPERTIES_V2_2_0, pub V2Options: u64, } #[cfg(feature = "Win32_Foundation")] impl EVENT_TRACE_PROPERTIES_V2_2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EVENT_TRACE_PROPERTIES_V2_2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EVENT_TRACE_PROPERTIES_V2_2 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EVENT_TRACE_PROPERTIES_V2_2 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EVENT_TRACE_PROPERTIES_V2_2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EVENT_TRACE_PROPERTIES_V2_2_0 { pub _bitfield: u32, } #[cfg(feature = "Win32_Foundation")] impl EVENT_TRACE_PROPERTIES_V2_2_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EVENT_TRACE_PROPERTIES_V2_2_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EVENT_TRACE_PROPERTIES_V2_2_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("_bitfield", &self._bitfield).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EVENT_TRACE_PROPERTIES_V2_2_0 { fn eq(&self, other: &Self) -> bool { self._bitfield == other._bitfield } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EVENT_TRACE_PROPERTIES_V2_2_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EVENT_TRACE_PROPERTIES_V2_2_0 { type Abi = Self; } pub const EVENT_TRACE_REAL_TIME_MODE: u32 = 256u32; pub const EVENT_TRACE_RELOG_MODE: u32 = 65536u32; pub const EVENT_TRACE_SECURE_MODE: u32 = 128u32; pub const EVENT_TRACE_STOP_ON_HYBRID_SHUTDOWN: u32 = 4194304u32; pub const EVENT_TRACE_SYSTEM_LOGGER_MODE: u32 = 33554432u32; pub const EVENT_TRACE_TYPE_ACCEPT: u32 = 15u32; pub const EVENT_TRACE_TYPE_ACKDUP: u32 = 22u32; pub const EVENT_TRACE_TYPE_ACKFULL: u32 = 20u32; pub const EVENT_TRACE_TYPE_ACKPART: u32 = 21u32; pub const EVENT_TRACE_TYPE_CHECKPOINT: u32 = 8u32; pub const EVENT_TRACE_TYPE_CONFIG: u32 = 11u32; pub const EVENT_TRACE_TYPE_CONFIG_BOOT: u32 = 37u32; pub const EVENT_TRACE_TYPE_CONFIG_CI_INFO: u32 = 29u32; pub const EVENT_TRACE_TYPE_CONFIG_CPU: u32 = 10u32; pub const EVENT_TRACE_TYPE_CONFIG_DEFRAG: u32 = 31u32; pub const EVENT_TRACE_TYPE_CONFIG_DEVICEFAMILY: u32 = 33u32; pub const EVENT_TRACE_TYPE_CONFIG_DPI: u32 = 28u32; pub const EVENT_TRACE_TYPE_CONFIG_FLIGHTID: u32 = 34u32; pub const EVENT_TRACE_TYPE_CONFIG_IDECHANNEL: u32 = 23u32; pub const EVENT_TRACE_TYPE_CONFIG_IRQ: u32 = 21u32; pub const EVENT_TRACE_TYPE_CONFIG_LOGICALDISK: u32 = 12u32; pub const EVENT_TRACE_TYPE_CONFIG_MACHINEID: u32 = 30u32; pub const EVENT_TRACE_TYPE_CONFIG_MOBILEPLATFORM: u32 = 32u32; pub const EVENT_TRACE_TYPE_CONFIG_NETINFO: u32 = 17u32; pub const EVENT_TRACE_TYPE_CONFIG_NIC: u32 = 13u32; pub const EVENT_TRACE_TYPE_CONFIG_NUMANODE: u32 = 24u32; pub const EVENT_TRACE_TYPE_CONFIG_OPTICALMEDIA: u32 = 18u32; pub const EVENT_TRACE_TYPE_CONFIG_PHYSICALDISK: u32 = 11u32; pub const EVENT_TRACE_TYPE_CONFIG_PLATFORM: u32 = 25u32; pub const EVENT_TRACE_TYPE_CONFIG_PNP: u32 = 22u32; pub const EVENT_TRACE_TYPE_CONFIG_POWER: u32 = 16u32; pub const EVENT_TRACE_TYPE_CONFIG_PROCESSOR: u32 = 35u32; pub const EVENT_TRACE_TYPE_CONFIG_PROCESSORGROUP: u32 = 26u32; pub const EVENT_TRACE_TYPE_CONFIG_PROCESSORNUMBER: u32 = 27u32; pub const EVENT_TRACE_TYPE_CONFIG_SERVICES: u32 = 15u32; pub const EVENT_TRACE_TYPE_CONFIG_VIDEO: u32 = 14u32; pub const EVENT_TRACE_TYPE_CONFIG_VIRTUALIZATION: u32 = 36u32; pub const EVENT_TRACE_TYPE_CONNECT: u32 = 12u32; pub const EVENT_TRACE_TYPE_CONNFAIL: u32 = 17u32; pub const EVENT_TRACE_TYPE_COPY_ARP: u32 = 19u32; pub const EVENT_TRACE_TYPE_COPY_TCP: u32 = 18u32; pub const EVENT_TRACE_TYPE_DBGID_RSDS: u32 = 64u32; pub const EVENT_TRACE_TYPE_DC_END: u32 = 4u32; pub const EVENT_TRACE_TYPE_DC_START: u32 = 3u32; pub const EVENT_TRACE_TYPE_DEQUEUE: u32 = 7u32; pub const EVENT_TRACE_TYPE_DISCONNECT: u32 = 13u32; pub const EVENT_TRACE_TYPE_END: u32 = 2u32; pub const EVENT_TRACE_TYPE_EXTENSION: u32 = 5u32; pub const EVENT_TRACE_TYPE_FLT_POSTOP_COMPLETION: u32 = 99u32; pub const EVENT_TRACE_TYPE_FLT_POSTOP_FAILURE: u32 = 101u32; pub const EVENT_TRACE_TYPE_FLT_POSTOP_INIT: u32 = 97u32; pub const EVENT_TRACE_TYPE_FLT_PREOP_COMPLETION: u32 = 98u32; pub const EVENT_TRACE_TYPE_FLT_PREOP_FAILURE: u32 = 100u32; pub const EVENT_TRACE_TYPE_FLT_PREOP_INIT: u32 = 96u32; pub const EVENT_TRACE_TYPE_GUIDMAP: u32 = 10u32; pub const EVENT_TRACE_TYPE_INFO: u32 = 0u32; pub const EVENT_TRACE_TYPE_IO_FLUSH: u32 = 14u32; pub const EVENT_TRACE_TYPE_IO_FLUSH_INIT: u32 = 15u32; pub const EVENT_TRACE_TYPE_IO_READ: u32 = 10u32; pub const EVENT_TRACE_TYPE_IO_READ_INIT: u32 = 12u32; pub const EVENT_TRACE_TYPE_IO_REDIRECTED_INIT: u32 = 16u32; pub const EVENT_TRACE_TYPE_IO_WRITE: u32 = 11u32; pub const EVENT_TRACE_TYPE_IO_WRITE_INIT: u32 = 13u32; pub const EVENT_TRACE_TYPE_LOAD: u32 = 10u32; pub const EVENT_TRACE_TYPE_MM_AV: u32 = 15u32; pub const EVENT_TRACE_TYPE_MM_COW: u32 = 12u32; pub const EVENT_TRACE_TYPE_MM_DZF: u32 = 11u32; pub const EVENT_TRACE_TYPE_MM_GPF: u32 = 13u32; pub const EVENT_TRACE_TYPE_MM_HPF: u32 = 14u32; pub const EVENT_TRACE_TYPE_MM_TF: u32 = 10u32; pub const EVENT_TRACE_TYPE_OPTICAL_IO_FLUSH: u32 = 57u32; pub const EVENT_TRACE_TYPE_OPTICAL_IO_FLUSH_INIT: u32 = 60u32; pub const EVENT_TRACE_TYPE_OPTICAL_IO_READ: u32 = 55u32; pub const EVENT_TRACE_TYPE_OPTICAL_IO_READ_INIT: u32 = 58u32; pub const EVENT_TRACE_TYPE_OPTICAL_IO_WRITE: u32 = 56u32; pub const EVENT_TRACE_TYPE_OPTICAL_IO_WRITE_INIT: u32 = 59u32; pub const EVENT_TRACE_TYPE_RECEIVE: u32 = 11u32; pub const EVENT_TRACE_TYPE_RECONNECT: u32 = 16u32; pub const EVENT_TRACE_TYPE_REGCLOSE: u32 = 27u32; pub const EVENT_TRACE_TYPE_REGCOMMIT: u32 = 30u32; pub const EVENT_TRACE_TYPE_REGCREATE: u32 = 10u32; pub const EVENT_TRACE_TYPE_REGDELETE: u32 = 12u32; pub const EVENT_TRACE_TYPE_REGDELETEVALUE: u32 = 15u32; pub const EVENT_TRACE_TYPE_REGENUMERATEKEY: u32 = 17u32; pub const EVENT_TRACE_TYPE_REGENUMERATEVALUEKEY: u32 = 18u32; pub const EVENT_TRACE_TYPE_REGFLUSH: u32 = 21u32; pub const EVENT_TRACE_TYPE_REGKCBCREATE: u32 = 22u32; pub const EVENT_TRACE_TYPE_REGKCBDELETE: u32 = 23u32; pub const EVENT_TRACE_TYPE_REGKCBRUNDOWNBEGIN: u32 = 24u32; pub const EVENT_TRACE_TYPE_REGKCBRUNDOWNEND: u32 = 25u32; pub const EVENT_TRACE_TYPE_REGMOUNTHIVE: u32 = 33u32; pub const EVENT_TRACE_TYPE_REGOPEN: u32 = 11u32; pub const EVENT_TRACE_TYPE_REGPREPARE: u32 = 31u32; pub const EVENT_TRACE_TYPE_REGQUERY: u32 = 13u32; pub const EVENT_TRACE_TYPE_REGQUERYMULTIPLEVALUE: u32 = 19u32; pub const EVENT_TRACE_TYPE_REGQUERYSECURITY: u32 = 29u32; pub const EVENT_TRACE_TYPE_REGQUERYVALUE: u32 = 16u32; pub const EVENT_TRACE_TYPE_REGROLLBACK: u32 = 32u32; pub const EVENT_TRACE_TYPE_REGSETINFORMATION: u32 = 20u32; pub const EVENT_TRACE_TYPE_REGSETSECURITY: u32 = 28u32; pub const EVENT_TRACE_TYPE_REGSETVALUE: u32 = 14u32; pub const EVENT_TRACE_TYPE_REGVIRTUALIZE: u32 = 26u32; pub const EVENT_TRACE_TYPE_REPLY: u32 = 6u32; pub const EVENT_TRACE_TYPE_RESUME: u32 = 7u32; pub const EVENT_TRACE_TYPE_RETRANSMIT: u32 = 14u32; pub const EVENT_TRACE_TYPE_SECURITY: u32 = 13u32; pub const EVENT_TRACE_TYPE_SEND: u32 = 10u32; pub const EVENT_TRACE_TYPE_SIDINFO: u32 = 12u32; pub const EVENT_TRACE_TYPE_START: u32 = 1u32; pub const EVENT_TRACE_TYPE_STOP: u32 = 2u32; pub const EVENT_TRACE_TYPE_SUSPEND: u32 = 8u32; pub const EVENT_TRACE_TYPE_TERMINATE: u32 = 11u32; pub const EVENT_TRACE_TYPE_WINEVT_RECEIVE: u32 = 240u32; pub const EVENT_TRACE_TYPE_WINEVT_SEND: u32 = 9u32; pub const EVENT_TRACE_USE_GLOBAL_SEQUENCE: u32 = 16384u32; pub const EVENT_TRACE_USE_KBYTES_FOR_SIZE: u32 = 8192u32; pub const EVENT_TRACE_USE_LOCAL_SEQUENCE: u32 = 32768u32; pub const EVENT_TRACE_USE_NOCPUTIME: u32 = 2u32; pub const EVENT_TRACE_USE_PAGED_MEMORY: u32 = 16777216u32; pub const EVENT_TRACE_USE_PROCTIME: u32 = 1u32; pub const EVENT_WRITE_FLAG_INPRIVATE: u32 = 2u32; pub const EVENT_WRITE_FLAG_NO_FAULTING: u32 = 1u32; #[inline] pub unsafe fn EnableTrace(enable: u32, enableflag: u32, enablelevel: u32, controlguid: *const ::windows::core::GUID, tracehandle: u64) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EnableTrace(enable: u32, enableflag: u32, enablelevel: u32, controlguid: *const ::windows::core::GUID, tracehandle: u64) -> u32; } ::core::mem::transmute(EnableTrace(::core::mem::transmute(enable), ::core::mem::transmute(enableflag), ::core::mem::transmute(enablelevel), ::core::mem::transmute(controlguid), ::core::mem::transmute(tracehandle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EnableTraceEx(providerid: *const ::windows::core::GUID, sourceid: *const ::windows::core::GUID, tracehandle: u64, isenabled: u32, level: u8, matchanykeyword: u64, matchallkeyword: u64, enableproperty: u32, enablefilterdesc: *const EVENT_FILTER_DESCRIPTOR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EnableTraceEx(providerid: *const ::windows::core::GUID, sourceid: *const ::windows::core::GUID, tracehandle: u64, isenabled: u32, level: u8, matchanykeyword: u64, matchallkeyword: u64, enableproperty: u32, enablefilterdesc: *const EVENT_FILTER_DESCRIPTOR) -> u32; } ::core::mem::transmute(EnableTraceEx( ::core::mem::transmute(providerid), ::core::mem::transmute(sourceid), ::core::mem::transmute(tracehandle), ::core::mem::transmute(isenabled), ::core::mem::transmute(level), ::core::mem::transmute(matchanykeyword), ::core::mem::transmute(matchallkeyword), ::core::mem::transmute(enableproperty), ::core::mem::transmute(enablefilterdesc), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EnableTraceEx2(tracehandle: u64, providerid: *const ::windows::core::GUID, controlcode: u32, level: u8, matchanykeyword: u64, matchallkeyword: u64, timeout: u32, enableparameters: *const ENABLE_TRACE_PARAMETERS) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EnableTraceEx2(tracehandle: u64, providerid: *const ::windows::core::GUID, controlcode: u32, level: u8, matchanykeyword: u64, matchallkeyword: u64, timeout: u32, enableparameters: *const ENABLE_TRACE_PARAMETERS) -> u32; } ::core::mem::transmute(EnableTraceEx2( ::core::mem::transmute(tracehandle), ::core::mem::transmute(providerid), ::core::mem::transmute(controlcode), ::core::mem::transmute(level), ::core::mem::transmute(matchanykeyword), ::core::mem::transmute(matchallkeyword), ::core::mem::transmute(timeout), ::core::mem::transmute(enableparameters), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EnumerateTraceGuids(guidpropertiesarray: *mut *mut TRACE_GUID_PROPERTIES, propertyarraycount: u32, guidcount: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EnumerateTraceGuids(guidpropertiesarray: *mut *mut TRACE_GUID_PROPERTIES, propertyarraycount: u32, guidcount: *mut u32) -> u32; } ::core::mem::transmute(EnumerateTraceGuids(::core::mem::transmute(guidpropertiesarray), ::core::mem::transmute(propertyarraycount), ::core::mem::transmute(guidcount))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EnumerateTraceGuidsEx(tracequeryinfoclass: TRACE_QUERY_INFO_CLASS, inbuffer: *const ::core::ffi::c_void, inbuffersize: u32, outbuffer: *mut ::core::ffi::c_void, outbuffersize: u32, returnlength: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EnumerateTraceGuidsEx(tracequeryinfoclass: TRACE_QUERY_INFO_CLASS, inbuffer: *const ::core::ffi::c_void, inbuffersize: u32, outbuffer: *mut ::core::ffi::c_void, outbuffersize: u32, returnlength: *mut u32) -> u32; } ::core::mem::transmute(EnumerateTraceGuidsEx(::core::mem::transmute(tracequeryinfoclass), ::core::mem::transmute(inbuffer), ::core::mem::transmute(inbuffersize), ::core::mem::transmute(outbuffer), ::core::mem::transmute(outbuffersize), ::core::mem::transmute(returnlength))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EventAccessControl<'a, Param2: ::windows::core::IntoParam<'a, super::super::super::Foundation::PSID>, Param4: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOLEAN>>(guid: *const ::windows::core::GUID, operation: u32, sid: Param2, rights: u32, allowordeny: Param4) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventAccessControl(guid: *const ::windows::core::GUID, operation: u32, sid: super::super::super::Foundation::PSID, rights: u32, allowordeny: super::super::super::Foundation::BOOLEAN) -> u32; } ::core::mem::transmute(EventAccessControl(::core::mem::transmute(guid), ::core::mem::transmute(operation), sid.into_param().abi(), ::core::mem::transmute(rights), allowordeny.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] pub unsafe fn EventAccessQuery(guid: *const ::windows::core::GUID, buffer: *mut super::super::super::Security::SECURITY_DESCRIPTOR, buffersize: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventAccessQuery(guid: *const ::windows::core::GUID, buffer: *mut super::super::super::Security::SECURITY_DESCRIPTOR, buffersize: *mut u32) -> u32; } ::core::mem::transmute(EventAccessQuery(::core::mem::transmute(guid), ::core::mem::transmute(buffer), ::core::mem::transmute(buffersize))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EventAccessRemove(guid: *const ::windows::core::GUID) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventAccessRemove(guid: *const ::windows::core::GUID) -> u32; } ::core::mem::transmute(EventAccessRemove(::core::mem::transmute(guid))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EventActivityIdControl(controlcode: u32, activityid: *mut ::windows::core::GUID) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventActivityIdControl(controlcode: u32, activityid: *mut ::windows::core::GUID) -> u32; } ::core::mem::transmute(EventActivityIdControl(::core::mem::transmute(controlcode), ::core::mem::transmute(activityid))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EventEnabled(reghandle: u64, eventdescriptor: *const EVENT_DESCRIPTOR) -> super::super::super::Foundation::BOOLEAN { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventEnabled(reghandle: u64, eventdescriptor: *const EVENT_DESCRIPTOR) -> super::super::super::Foundation::BOOLEAN; } ::core::mem::transmute(EventEnabled(::core::mem::transmute(reghandle), ::core::mem::transmute(eventdescriptor))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EventProviderEnabled(reghandle: u64, level: u8, keyword: u64) -> super::super::super::Foundation::BOOLEAN { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventProviderEnabled(reghandle: u64, level: u8, keyword: u64) -> super::super::super::Foundation::BOOLEAN; } ::core::mem::transmute(EventProviderEnabled(::core::mem::transmute(reghandle), ::core::mem::transmute(level), ::core::mem::transmute(keyword))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EventRegister(providerid: *const ::windows::core::GUID, enablecallback: ::core::option::Option<PENABLECALLBACK>, callbackcontext: *const ::core::ffi::c_void, reghandle: *mut u64) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventRegister(providerid: *const ::windows::core::GUID, enablecallback: ::windows::core::RawPtr, callbackcontext: *const ::core::ffi::c_void, reghandle: *mut u64) -> u32; } ::core::mem::transmute(EventRegister(::core::mem::transmute(providerid), ::core::mem::transmute(enablecallback), ::core::mem::transmute(callbackcontext), ::core::mem::transmute(reghandle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EventSetInformation(reghandle: u64, informationclass: EVENT_INFO_CLASS, eventinformation: *const ::core::ffi::c_void, informationlength: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventSetInformation(reghandle: u64, informationclass: EVENT_INFO_CLASS, eventinformation: *const ::core::ffi::c_void, informationlength: u32) -> u32; } ::core::mem::transmute(EventSetInformation(::core::mem::transmute(reghandle), ::core::mem::transmute(informationclass), ::core::mem::transmute(eventinformation), ::core::mem::transmute(informationlength))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const EventTraceConfigGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x01853a65_418f_4f36_aefc_dc0f1d2fd235); pub const EventTraceGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x68fdd900_4a3e_11d1_84f4_0000f80464e3); #[inline] pub unsafe fn EventUnregister(reghandle: u64) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventUnregister(reghandle: u64) -> u32; } ::core::mem::transmute(EventUnregister(::core::mem::transmute(reghandle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EventWrite(reghandle: u64, eventdescriptor: *const EVENT_DESCRIPTOR, userdatacount: u32, userdata: *const EVENT_DATA_DESCRIPTOR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventWrite(reghandle: u64, eventdescriptor: *const EVENT_DESCRIPTOR, userdatacount: u32, userdata: *const EVENT_DATA_DESCRIPTOR) -> u32; } ::core::mem::transmute(EventWrite(::core::mem::transmute(reghandle), ::core::mem::transmute(eventdescriptor), ::core::mem::transmute(userdatacount), ::core::mem::transmute(userdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EventWriteEx(reghandle: u64, eventdescriptor: *const EVENT_DESCRIPTOR, filter: u64, flags: u32, activityid: *const ::windows::core::GUID, relatedactivityid: *const ::windows::core::GUID, userdatacount: u32, userdata: *const EVENT_DATA_DESCRIPTOR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventWriteEx(reghandle: u64, eventdescriptor: *const EVENT_DESCRIPTOR, filter: u64, flags: u32, activityid: *const ::windows::core::GUID, relatedactivityid: *const ::windows::core::GUID, userdatacount: u32, userdata: *const EVENT_DATA_DESCRIPTOR) -> u32; } ::core::mem::transmute(EventWriteEx( ::core::mem::transmute(reghandle), ::core::mem::transmute(eventdescriptor), ::core::mem::transmute(filter), ::core::mem::transmute(flags), ::core::mem::transmute(activityid), ::core::mem::transmute(relatedactivityid), ::core::mem::transmute(userdatacount), ::core::mem::transmute(userdata), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EventWriteString<'a, Param3: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(reghandle: u64, level: u8, keyword: u64, string: Param3) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventWriteString(reghandle: u64, level: u8, keyword: u64, string: super::super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(EventWriteString(::core::mem::transmute(reghandle), ::core::mem::transmute(level), ::core::mem::transmute(keyword), string.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EventWriteTransfer(reghandle: u64, eventdescriptor: *const EVENT_DESCRIPTOR, activityid: *const ::windows::core::GUID, relatedactivityid: *const ::windows::core::GUID, userdatacount: u32, userdata: *const EVENT_DATA_DESCRIPTOR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EventWriteTransfer(reghandle: u64, eventdescriptor: *const EVENT_DESCRIPTOR, activityid: *const ::windows::core::GUID, relatedactivityid: *const ::windows::core::GUID, userdatacount: u32, userdata: *const EVENT_DATA_DESCRIPTOR) -> u32; } ::core::mem::transmute(EventWriteTransfer(::core::mem::transmute(reghandle), ::core::mem::transmute(eventdescriptor), ::core::mem::transmute(activityid), ::core::mem::transmute(relatedactivityid), ::core::mem::transmute(userdatacount), ::core::mem::transmute(userdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn FlushTraceA<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PSTR>>(tracehandle: u64, instancename: Param1, properties: *mut EVENT_TRACE_PROPERTIES) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn FlushTraceA(tracehandle: u64, instancename: super::super::super::Foundation::PSTR, properties: *mut EVENT_TRACE_PROPERTIES) -> u32; } ::core::mem::transmute(FlushTraceA(::core::mem::transmute(tracehandle), instancename.into_param().abi(), ::core::mem::transmute(properties))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn FlushTraceW<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(tracehandle: u64, instancename: Param1, properties: *mut EVENT_TRACE_PROPERTIES) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn FlushTraceW(tracehandle: u64, instancename: super::super::super::Foundation::PWSTR, properties: *mut EVENT_TRACE_PROPERTIES) -> u32; } ::core::mem::transmute(FlushTraceW(::core::mem::transmute(tracehandle), instancename.into_param().abi(), ::core::mem::transmute(properties))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn GetTraceEnableFlags(tracehandle: u64) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn GetTraceEnableFlags(tracehandle: u64) -> u32; } ::core::mem::transmute(GetTraceEnableFlags(::core::mem::transmute(tracehandle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn GetTraceEnableLevel(tracehandle: u64) -> u8 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn GetTraceEnableLevel(tracehandle: u64) -> u8; } ::core::mem::transmute(GetTraceEnableLevel(::core::mem::transmute(tracehandle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn GetTraceLoggerHandle(buffer: *const ::core::ffi::c_void) -> u64 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn GetTraceLoggerHandle(buffer: *const ::core::ffi::c_void) -> u64; } ::core::mem::transmute(GetTraceLoggerHandle(::core::mem::transmute(buffer))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ITraceEvent(pub ::windows::core::IUnknown); impl ITraceEvent { pub unsafe fn Clone(&self) -> ::windows::core::Result<ITraceEvent> { let mut result__: <ITraceEvent as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ITraceEvent>(result__) } pub unsafe fn GetUserContext(&self, usercontext: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(usercontext)).ok() } pub unsafe fn GetEventRecord(&self) -> ::windows::core::Result<*mut EVENT_RECORD> { let mut result__: <*mut EVENT_RECORD as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), &mut result__).from_abi::<*mut EVENT_RECORD>(result__) } pub unsafe fn SetPayload(&self, payload: *const u8, payloadsize: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(payload), ::core::mem::transmute(payloadsize)).ok() } pub unsafe fn SetEventDescriptor(&self, eventdescriptor: *const EVENT_DESCRIPTOR) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(eventdescriptor)).ok() } pub unsafe fn SetProcessId(&self, processid: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(processid)).ok() } pub unsafe fn SetProcessorIndex(&self, processorindex: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(processorindex)).ok() } pub unsafe fn SetThreadId(&self, threadid: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(threadid)).ok() } pub unsafe fn SetThreadTimes(&self, kerneltime: u32, usertime: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(kerneltime), ::core::mem::transmute(usertime)).ok() } pub unsafe fn SetActivityId(&self, activityid: *const ::windows::core::GUID) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(activityid)).ok() } pub unsafe fn SetTimeStamp(&self, timestamp: *const i64) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(timestamp)).ok() } pub unsafe fn SetProviderId(&self, providerid: *const ::windows::core::GUID) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(providerid)).ok() } } unsafe impl ::windows::core::Interface for ITraceEvent { type Vtable = ITraceEvent_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8cc97f40_9028_4ff3_9b62_7d1f79ca7bcb); } impl ::core::convert::From<ITraceEvent> for ::windows::core::IUnknown { fn from(value: ITraceEvent) -> Self { value.0 } } impl ::core::convert::From<&ITraceEvent> for ::windows::core::IUnknown { fn from(value: &ITraceEvent) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ITraceEvent { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ITraceEvent { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ITraceEvent_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, newevent: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, usercontext: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, eventrecord: *mut *mut EVENT_RECORD) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, payload: *const u8, payloadsize: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, eventdescriptor: *const EVENT_DESCRIPTOR) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, processid: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, processorindex: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, threadid: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, kerneltime: u32, usertime: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, activityid: *const ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, timestamp: *const i64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, providerid: *const ::windows::core::GUID) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ITraceEventCallback(pub ::windows::core::IUnknown); impl ITraceEventCallback { pub unsafe fn OnBeginProcessTrace<'a, Param0: ::windows::core::IntoParam<'a, ITraceEvent>, Param1: ::windows::core::IntoParam<'a, ITraceRelogger>>(&self, headerevent: Param0, relogger: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), headerevent.into_param().abi(), relogger.into_param().abi()).ok() } pub unsafe fn OnFinalizeProcessTrace<'a, Param0: ::windows::core::IntoParam<'a, ITraceRelogger>>(&self, relogger: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), relogger.into_param().abi()).ok() } pub unsafe fn OnEvent<'a, Param0: ::windows::core::IntoParam<'a, ITraceEvent>, Param1: ::windows::core::IntoParam<'a, ITraceRelogger>>(&self, event: Param0, relogger: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), event.into_param().abi(), relogger.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for ITraceEventCallback { type Vtable = ITraceEventCallback_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3ed25501_593f_43e9_8f38_3ab46f5a4a52); } impl ::core::convert::From<ITraceEventCallback> for ::windows::core::IUnknown { fn from(value: ITraceEventCallback) -> Self { value.0 } } impl ::core::convert::From<&ITraceEventCallback> for ::windows::core::IUnknown { fn from(value: &ITraceEventCallback) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ITraceEventCallback { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ITraceEventCallback { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ITraceEventCallback_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, headerevent: ::windows::core::RawPtr, relogger: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, relogger: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, event: ::windows::core::RawPtr, relogger: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ITraceRelogger(pub ::windows::core::IUnknown); impl ITraceRelogger { #[cfg(feature = "Win32_Foundation")] pub unsafe fn AddLogfileTraceStream<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::BSTR>>(&self, logfilename: Param0, usercontext: *const ::core::ffi::c_void) -> ::windows::core::Result<u64> { let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), logfilename.into_param().abi(), ::core::mem::transmute(usercontext), &mut result__).from_abi::<u64>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn AddRealtimeTraceStream<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::BSTR>>(&self, loggername: Param0, usercontext: *const ::core::ffi::c_void) -> ::windows::core::Result<u64> { let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), loggername.into_param().abi(), ::core::mem::transmute(usercontext), &mut result__).from_abi::<u64>(result__) } pub unsafe fn RegisterCallback<'a, Param0: ::windows::core::IntoParam<'a, ITraceEventCallback>>(&self, callback: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), callback.into_param().abi()).ok() } pub unsafe fn Inject<'a, Param0: ::windows::core::IntoParam<'a, ITraceEvent>>(&self, event: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), event.into_param().abi()).ok() } pub unsafe fn CreateEventInstance(&self, tracehandle: u64, flags: u32) -> ::windows::core::Result<ITraceEvent> { let mut result__: <ITraceEvent as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(tracehandle), ::core::mem::transmute(flags), &mut result__).from_abi::<ITraceEvent>(result__) } pub unsafe fn ProcessTrace(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetOutputFilename<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::BSTR>>(&self, logfilename: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), logfilename.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetCompressionMode<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOLEAN>>(&self, compressionmode: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), compressionmode.into_param().abi()).ok() } pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for ITraceRelogger { type Vtable = ITraceRelogger_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf754ad43_3bcc_4286_8009_9c5da214e84e); } impl ::core::convert::From<ITraceRelogger> for ::windows::core::IUnknown { fn from(value: ITraceRelogger) -> Self { value.0 } } impl ::core::convert::From<&ITraceRelogger> for ::windows::core::IUnknown { fn from(value: &ITraceRelogger) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ITraceRelogger { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ITraceRelogger { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ITraceRelogger_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, logfilename: ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>, usercontext: *const ::core::ffi::c_void, tracehandle: *mut u64) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, loggername: ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>, usercontext: *const ::core::ffi::c_void, tracehandle: *mut u64) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, callback: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, event: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, tracehandle: u64, flags: u32, event: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, logfilename: ::core::mem::ManuallyDrop<super::super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, compressionmode: super::super::super::Foundation::BOOLEAN) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MAP_FLAGS(pub i32); pub const EVENTMAP_INFO_FLAG_MANIFEST_VALUEMAP: MAP_FLAGS = MAP_FLAGS(1i32); pub const EVENTMAP_INFO_FLAG_MANIFEST_BITMAP: MAP_FLAGS = MAP_FLAGS(2i32); pub const EVENTMAP_INFO_FLAG_MANIFEST_PATTERNMAP: MAP_FLAGS = MAP_FLAGS(4i32); pub const EVENTMAP_INFO_FLAG_WBEM_VALUEMAP: MAP_FLAGS = MAP_FLAGS(8i32); pub const EVENTMAP_INFO_FLAG_WBEM_BITMAP: MAP_FLAGS = MAP_FLAGS(16i32); pub const EVENTMAP_INFO_FLAG_WBEM_FLAG: MAP_FLAGS = MAP_FLAGS(32i32); pub const EVENTMAP_INFO_FLAG_WBEM_NO_MAP: MAP_FLAGS = MAP_FLAGS(64i32); impl ::core::convert::From<i32> for MAP_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MAP_FLAGS { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MAP_VALUETYPE(pub i32); pub const EVENTMAP_ENTRY_VALUETYPE_ULONG: MAP_VALUETYPE = MAP_VALUETYPE(0i32); pub const EVENTMAP_ENTRY_VALUETYPE_STRING: MAP_VALUETYPE = MAP_VALUETYPE(1i32); impl ::core::convert::From<i32> for MAP_VALUETYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MAP_VALUETYPE { type Abi = Self; } pub const MAX_EVENT_DATA_DESCRIPTORS: u32 = 128u32; pub const MAX_EVENT_FILTERS_COUNT: u32 = 13u32; pub const MAX_EVENT_FILTER_DATA_SIZE: u32 = 1024u32; pub const MAX_EVENT_FILTER_EVENT_ID_COUNT: u32 = 64u32; pub const MAX_EVENT_FILTER_EVENT_NAME_SIZE: u32 = 4096u32; pub const MAX_EVENT_FILTER_PAYLOAD_SIZE: u32 = 4096u32; pub const MAX_EVENT_FILTER_PID_COUNT: u32 = 8u32; pub const MAX_MOF_FIELDS: u32 = 16u32; pub const MAX_PAYLOAD_PREDICATES: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MOF_FIELD { pub DataPtr: u64, pub Length: u32, pub DataType: u32, } impl MOF_FIELD {} impl ::core::default::Default for MOF_FIELD { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MOF_FIELD { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MOF_FIELD").field("DataPtr", &self.DataPtr).field("Length", &self.Length).field("DataType", &self.DataType).finish() } } impl ::core::cmp::PartialEq for MOF_FIELD { fn eq(&self, other: &Self) -> bool { self.DataPtr == other.DataPtr && self.Length == other.Length && self.DataType == other.DataType } } impl ::core::cmp::Eq for MOF_FIELD {} unsafe impl ::windows::core::Abi for MOF_FIELD { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct OFFSETINSTANCEDATAANDLENGTH { pub OffsetInstanceData: u32, pub LengthInstanceData: u32, } impl OFFSETINSTANCEDATAANDLENGTH {} impl ::core::default::Default for OFFSETINSTANCEDATAANDLENGTH { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for OFFSETINSTANCEDATAANDLENGTH { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("OFFSETINSTANCEDATAANDLENGTH").field("OffsetInstanceData", &self.OffsetInstanceData).field("LengthInstanceData", &self.LengthInstanceData).finish() } } impl ::core::cmp::PartialEq for OFFSETINSTANCEDATAANDLENGTH { fn eq(&self, other: &Self) -> bool { self.OffsetInstanceData == other.OffsetInstanceData && self.LengthInstanceData == other.LengthInstanceData } } impl ::core::cmp::Eq for OFFSETINSTANCEDATAANDLENGTH {} unsafe impl ::windows::core::Abi for OFFSETINSTANCEDATAANDLENGTH { type Abi = Self; } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] #[inline] pub unsafe fn OpenTraceA(logfile: *mut EVENT_TRACE_LOGFILEA) -> u64 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn OpenTraceA(logfile: *mut ::core::mem::ManuallyDrop<EVENT_TRACE_LOGFILEA>) -> u64; } ::core::mem::transmute(OpenTraceA(::core::mem::transmute(logfile))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] #[inline] pub unsafe fn OpenTraceW(logfile: *mut EVENT_TRACE_LOGFILEW) -> u64 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn OpenTraceW(logfile: *mut ::core::mem::ManuallyDrop<EVENT_TRACE_LOGFILEW>) -> u64; } ::core::mem::transmute(OpenTraceW(::core::mem::transmute(logfile))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct PAYLOAD_FILTER_PREDICATE { pub FieldName: super::super::super::Foundation::PWSTR, pub CompareOp: u16, pub Value: super::super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl PAYLOAD_FILTER_PREDICATE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PAYLOAD_FILTER_PREDICATE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for PAYLOAD_FILTER_PREDICATE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PAYLOAD_FILTER_PREDICATE").field("FieldName", &self.FieldName).field("CompareOp", &self.CompareOp).field("Value", &self.Value).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PAYLOAD_FILTER_PREDICATE { fn eq(&self, other: &Self) -> bool { self.FieldName == other.FieldName && self.CompareOp == other.CompareOp && self.Value == other.Value } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PAYLOAD_FILTER_PREDICATE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PAYLOAD_FILTER_PREDICATE { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PAYLOAD_OPERATOR(pub i32); pub const PAYLOADFIELD_EQ: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(0i32); pub const PAYLOADFIELD_NE: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(1i32); pub const PAYLOADFIELD_LE: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(2i32); pub const PAYLOADFIELD_GT: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(3i32); pub const PAYLOADFIELD_LT: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(4i32); pub const PAYLOADFIELD_GE: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(5i32); pub const PAYLOADFIELD_BETWEEN: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(6i32); pub const PAYLOADFIELD_NOTBETWEEN: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(7i32); pub const PAYLOADFIELD_MODULO: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(8i32); pub const PAYLOADFIELD_CONTAINS: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(20i32); pub const PAYLOADFIELD_DOESNTCONTAIN: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(21i32); pub const PAYLOADFIELD_IS: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(30i32); pub const PAYLOADFIELD_ISNOT: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(31i32); pub const PAYLOADFIELD_INVALID: PAYLOAD_OPERATOR = PAYLOAD_OPERATOR(32i32); impl ::core::convert::From<i32> for PAYLOAD_OPERATOR { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PAYLOAD_OPERATOR { type Abi = Self; } pub type PENABLECALLBACK = unsafe extern "system" fn(sourceid: *const ::windows::core::GUID, isenabled: ENABLECALLBACK_ENABLED_STATE, level: u8, matchanykeyword: u64, matchallkeyword: u64, filterdata: *const EVENT_FILTER_DESCRIPTOR, callbackcontext: *mut ::core::ffi::c_void); pub type PEVENT_CALLBACK = unsafe extern "system" fn(pevent: *mut EVENT_TRACE); pub type PEVENT_RECORD_CALLBACK = unsafe extern "system" fn(eventrecord: *mut EVENT_RECORD); #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub type PEVENT_TRACE_BUFFER_CALLBACKA = unsafe extern "system" fn(logfile: *mut ::core::mem::ManuallyDrop<EVENT_TRACE_LOGFILEA>) -> u32; #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub type PEVENT_TRACE_BUFFER_CALLBACKW = unsafe extern "system" fn(logfile: *mut ::core::mem::ManuallyDrop<EVENT_TRACE_LOGFILEW>) -> u32; pub const PROCESS_TRACE_MODE_EVENT_RECORD: u32 = 268435456u32; pub const PROCESS_TRACE_MODE_RAW_TIMESTAMP: u32 = 4096u32; pub const PROCESS_TRACE_MODE_REAL_TIME: u32 = 256u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PROFILE_SOURCE_INFO { pub NextEntryOffset: u32, pub Source: u32, pub MinInterval: u32, pub MaxInterval: u32, pub Reserved: u64, pub Description: [u16; 1], } impl PROFILE_SOURCE_INFO {} impl ::core::default::Default for PROFILE_SOURCE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for PROFILE_SOURCE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PROFILE_SOURCE_INFO").field("NextEntryOffset", &self.NextEntryOffset).field("Source", &self.Source).field("MinInterval", &self.MinInterval).field("MaxInterval", &self.MaxInterval).field("Reserved", &self.Reserved).field("Description", &self.Description).finish() } } impl ::core::cmp::PartialEq for PROFILE_SOURCE_INFO { fn eq(&self, other: &Self) -> bool { self.NextEntryOffset == other.NextEntryOffset && self.Source == other.Source && self.MinInterval == other.MinInterval && self.MaxInterval == other.MaxInterval && self.Reserved == other.Reserved && self.Description == other.Description } } impl ::core::cmp::Eq for PROFILE_SOURCE_INFO {} unsafe impl ::windows::core::Abi for PROFILE_SOURCE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PROPERTY_DATA_DESCRIPTOR { pub PropertyName: u64, pub ArrayIndex: u32, pub Reserved: u32, } impl PROPERTY_DATA_DESCRIPTOR {} impl ::core::default::Default for PROPERTY_DATA_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for PROPERTY_DATA_DESCRIPTOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PROPERTY_DATA_DESCRIPTOR").field("PropertyName", &self.PropertyName).field("ArrayIndex", &self.ArrayIndex).field("Reserved", &self.Reserved).finish() } } impl ::core::cmp::PartialEq for PROPERTY_DATA_DESCRIPTOR { fn eq(&self, other: &Self) -> bool { self.PropertyName == other.PropertyName && self.ArrayIndex == other.ArrayIndex && self.Reserved == other.Reserved } } impl ::core::cmp::Eq for PROPERTY_DATA_DESCRIPTOR {} unsafe impl ::windows::core::Abi for PROPERTY_DATA_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PROPERTY_FLAGS(pub i32); pub const PropertyStruct: PROPERTY_FLAGS = PROPERTY_FLAGS(1i32); pub const PropertyParamLength: PROPERTY_FLAGS = PROPERTY_FLAGS(2i32); pub const PropertyParamCount: PROPERTY_FLAGS = PROPERTY_FLAGS(4i32); pub const PropertyWBEMXmlFragment: PROPERTY_FLAGS = PROPERTY_FLAGS(8i32); pub const PropertyParamFixedLength: PROPERTY_FLAGS = PROPERTY_FLAGS(16i32); pub const PropertyParamFixedCount: PROPERTY_FLAGS = PROPERTY_FLAGS(32i32); pub const PropertyHasTags: PROPERTY_FLAGS = PROPERTY_FLAGS(64i32); pub const PropertyHasCustomSchema: PROPERTY_FLAGS = PROPERTY_FLAGS(128i32); impl ::core::convert::From<i32> for PROPERTY_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PROPERTY_FLAGS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PROVIDER_ENUMERATION_INFO { pub NumberOfProviders: u32, pub Reserved: u32, pub TraceProviderInfoArray: [TRACE_PROVIDER_INFO; 1], } impl PROVIDER_ENUMERATION_INFO {} impl ::core::default::Default for PROVIDER_ENUMERATION_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for PROVIDER_ENUMERATION_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PROVIDER_ENUMERATION_INFO").field("NumberOfProviders", &self.NumberOfProviders).field("Reserved", &self.Reserved).field("TraceProviderInfoArray", &self.TraceProviderInfoArray).finish() } } impl ::core::cmp::PartialEq for PROVIDER_ENUMERATION_INFO { fn eq(&self, other: &Self) -> bool { self.NumberOfProviders == other.NumberOfProviders && self.Reserved == other.Reserved && self.TraceProviderInfoArray == other.TraceProviderInfoArray } } impl ::core::cmp::Eq for PROVIDER_ENUMERATION_INFO {} unsafe impl ::windows::core::Abi for PROVIDER_ENUMERATION_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PROVIDER_EVENT_INFO { pub NumberOfEvents: u32, pub Reserved: u32, pub EventDescriptorsArray: [EVENT_DESCRIPTOR; 1], } impl PROVIDER_EVENT_INFO {} impl ::core::default::Default for PROVIDER_EVENT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for PROVIDER_EVENT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PROVIDER_EVENT_INFO").field("NumberOfEvents", &self.NumberOfEvents).field("Reserved", &self.Reserved).field("EventDescriptorsArray", &self.EventDescriptorsArray).finish() } } impl ::core::cmp::PartialEq for PROVIDER_EVENT_INFO { fn eq(&self, other: &Self) -> bool { self.NumberOfEvents == other.NumberOfEvents && self.Reserved == other.Reserved && self.EventDescriptorsArray == other.EventDescriptorsArray } } impl ::core::cmp::Eq for PROVIDER_EVENT_INFO {} unsafe impl ::windows::core::Abi for PROVIDER_EVENT_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PROVIDER_FIELD_INFO { pub NameOffset: u32, pub DescriptionOffset: u32, pub Value: u64, } impl PROVIDER_FIELD_INFO {} impl ::core::default::Default for PROVIDER_FIELD_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for PROVIDER_FIELD_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PROVIDER_FIELD_INFO").field("NameOffset", &self.NameOffset).field("DescriptionOffset", &self.DescriptionOffset).field("Value", &self.Value).finish() } } impl ::core::cmp::PartialEq for PROVIDER_FIELD_INFO { fn eq(&self, other: &Self) -> bool { self.NameOffset == other.NameOffset && self.DescriptionOffset == other.DescriptionOffset && self.Value == other.Value } } impl ::core::cmp::Eq for PROVIDER_FIELD_INFO {} unsafe impl ::windows::core::Abi for PROVIDER_FIELD_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PROVIDER_FIELD_INFOARRAY { pub NumberOfElements: u32, pub FieldType: EVENT_FIELD_TYPE, pub FieldInfoArray: [PROVIDER_FIELD_INFO; 1], } impl PROVIDER_FIELD_INFOARRAY {} impl ::core::default::Default for PROVIDER_FIELD_INFOARRAY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for PROVIDER_FIELD_INFOARRAY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PROVIDER_FIELD_INFOARRAY").field("NumberOfElements", &self.NumberOfElements).field("FieldType", &self.FieldType).field("FieldInfoArray", &self.FieldInfoArray).finish() } } impl ::core::cmp::PartialEq for PROVIDER_FIELD_INFOARRAY { fn eq(&self, other: &Self) -> bool { self.NumberOfElements == other.NumberOfElements && self.FieldType == other.FieldType && self.FieldInfoArray == other.FieldInfoArray } } impl ::core::cmp::Eq for PROVIDER_FIELD_INFOARRAY {} unsafe impl ::windows::core::Abi for PROVIDER_FIELD_INFOARRAY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PROVIDER_FILTER_INFO { pub Id: u8, pub Version: u8, pub MessageOffset: u32, pub Reserved: u32, pub PropertyCount: u32, pub EventPropertyInfoArray: [EVENT_PROPERTY_INFO; 1], } impl PROVIDER_FILTER_INFO {} impl ::core::default::Default for PROVIDER_FILTER_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for PROVIDER_FILTER_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for PROVIDER_FILTER_INFO {} unsafe impl ::windows::core::Abi for PROVIDER_FILTER_INFO { type Abi = Self; } pub const PrivateLoggerNotificationGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3595ab5c_042a_4c8e_b942_2d059bfeb1b1); #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ProcessTrace(handlearray: *const u64, handlecount: u32, starttime: *const super::super::super::Foundation::FILETIME, endtime: *const super::super::super::Foundation::FILETIME) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ProcessTrace(handlearray: *const u64, handlecount: u32, starttime: *const super::super::super::Foundation::FILETIME, endtime: *const super::super::super::Foundation::FILETIME) -> u32; } ::core::mem::transmute(ProcessTrace(::core::mem::transmute(handlearray), ::core::mem::transmute(handlecount), ::core::mem::transmute(starttime), ::core::mem::transmute(endtime))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn QueryAllTracesA(propertyarray: *mut *mut EVENT_TRACE_PROPERTIES, propertyarraycount: u32, loggercount: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn QueryAllTracesA(propertyarray: *mut *mut EVENT_TRACE_PROPERTIES, propertyarraycount: u32, loggercount: *mut u32) -> u32; } ::core::mem::transmute(QueryAllTracesA(::core::mem::transmute(propertyarray), ::core::mem::transmute(propertyarraycount), ::core::mem::transmute(loggercount))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn QueryAllTracesW(propertyarray: *mut *mut EVENT_TRACE_PROPERTIES, propertyarraycount: u32, loggercount: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn QueryAllTracesW(propertyarray: *mut *mut EVENT_TRACE_PROPERTIES, propertyarraycount: u32, loggercount: *mut u32) -> u32; } ::core::mem::transmute(QueryAllTracesW(::core::mem::transmute(propertyarray), ::core::mem::transmute(propertyarraycount), ::core::mem::transmute(loggercount))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn QueryTraceA<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PSTR>>(tracehandle: u64, instancename: Param1, properties: *mut EVENT_TRACE_PROPERTIES) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn QueryTraceA(tracehandle: u64, instancename: super::super::super::Foundation::PSTR, properties: *mut EVENT_TRACE_PROPERTIES) -> u32; } ::core::mem::transmute(QueryTraceA(::core::mem::transmute(tracehandle), instancename.into_param().abi(), ::core::mem::transmute(properties))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn QueryTraceProcessingHandle(processinghandle: u64, informationclass: ETW_PROCESS_HANDLE_INFO_TYPE, inbuffer: *const ::core::ffi::c_void, inbuffersize: u32, outbuffer: *mut ::core::ffi::c_void, outbuffersize: u32, returnlength: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn QueryTraceProcessingHandle(processinghandle: u64, informationclass: ETW_PROCESS_HANDLE_INFO_TYPE, inbuffer: *const ::core::ffi::c_void, inbuffersize: u32, outbuffer: *mut ::core::ffi::c_void, outbuffersize: u32, returnlength: *mut u32) -> u32; } ::core::mem::transmute(QueryTraceProcessingHandle(::core::mem::transmute(processinghandle), ::core::mem::transmute(informationclass), ::core::mem::transmute(inbuffer), ::core::mem::transmute(inbuffersize), ::core::mem::transmute(outbuffer), ::core::mem::transmute(outbuffersize), ::core::mem::transmute(returnlength))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn QueryTraceW<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(tracehandle: u64, instancename: Param1, properties: *mut EVENT_TRACE_PROPERTIES) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn QueryTraceW(tracehandle: u64, instancename: super::super::super::Foundation::PWSTR, properties: *mut EVENT_TRACE_PROPERTIES) -> u32; } ::core::mem::transmute(QueryTraceW(::core::mem::transmute(tracehandle), instancename.into_param().abi(), ::core::mem::transmute(properties))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn RegisterTraceGuidsA<'a, Param5: ::windows::core::IntoParam<'a, super::super::super::Foundation::PSTR>, Param6: ::windows::core::IntoParam<'a, super::super::super::Foundation::PSTR>>(requestaddress: ::core::option::Option<WMIDPREQUEST>, requestcontext: *const ::core::ffi::c_void, controlguid: *const ::windows::core::GUID, guidcount: u32, traceguidreg: *const TRACE_GUID_REGISTRATION, mofimagepath: Param5, mofresourcename: Param6, registrationhandle: *mut u64) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn RegisterTraceGuidsA(requestaddress: ::windows::core::RawPtr, requestcontext: *const ::core::ffi::c_void, controlguid: *const ::windows::core::GUID, guidcount: u32, traceguidreg: *const TRACE_GUID_REGISTRATION, mofimagepath: super::super::super::Foundation::PSTR, mofresourcename: super::super::super::Foundation::PSTR, registrationhandle: *mut u64) -> u32; } ::core::mem::transmute(RegisterTraceGuidsA( ::core::mem::transmute(requestaddress), ::core::mem::transmute(requestcontext), ::core::mem::transmute(controlguid), ::core::mem::transmute(guidcount), ::core::mem::transmute(traceguidreg), mofimagepath.into_param().abi(), mofresourcename.into_param().abi(), ::core::mem::transmute(registrationhandle), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn RegisterTraceGuidsW<'a, Param5: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param6: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(requestaddress: ::core::option::Option<WMIDPREQUEST>, requestcontext: *const ::core::ffi::c_void, controlguid: *const ::windows::core::GUID, guidcount: u32, traceguidreg: *const TRACE_GUID_REGISTRATION, mofimagepath: Param5, mofresourcename: Param6, registrationhandle: *mut u64) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn RegisterTraceGuidsW(requestaddress: ::windows::core::RawPtr, requestcontext: *const ::core::ffi::c_void, controlguid: *const ::windows::core::GUID, guidcount: u32, traceguidreg: *const TRACE_GUID_REGISTRATION, mofimagepath: super::super::super::Foundation::PWSTR, mofresourcename: super::super::super::Foundation::PWSTR, registrationhandle: *mut u64) -> u32; } ::core::mem::transmute(RegisterTraceGuidsW( ::core::mem::transmute(requestaddress), ::core::mem::transmute(requestcontext), ::core::mem::transmute(controlguid), ::core::mem::transmute(guidcount), ::core::mem::transmute(traceguidreg), mofimagepath.into_param().abi(), mofresourcename.into_param().abi(), ::core::mem::transmute(registrationhandle), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn RemoveTraceCallback(pguid: *const ::windows::core::GUID) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn RemoveTraceCallback(pguid: *const ::windows::core::GUID) -> u32; } ::core::mem::transmute(RemoveTraceCallback(::core::mem::transmute(pguid))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const SYSTEM_ALPC_KW_GENERAL: u64 = 1u64; pub const SYSTEM_CONFIG_KW_GRAPHICS: u64 = 2u64; pub const SYSTEM_CONFIG_KW_NETWORK: u64 = 8u64; pub const SYSTEM_CONFIG_KW_OPTICAL: u64 = 64u64; pub const SYSTEM_CONFIG_KW_PNP: u64 = 32u64; pub const SYSTEM_CONFIG_KW_SERVICES: u64 = 16u64; pub const SYSTEM_CONFIG_KW_STORAGE: u64 = 4u64; pub const SYSTEM_CONFIG_KW_SYSTEM: u64 = 1u64; pub const SYSTEM_CPU_KW_CACHE_FLUSH: u64 = 2u64; pub const SYSTEM_CPU_KW_CONFIG: u64 = 1u64; pub const SYSTEM_CPU_KW_SPEC_CONTROL: u64 = 4u64; pub const SYSTEM_EVENT_TYPE: u32 = 1u32; pub const SYSTEM_HYPERVISOR_KW_CALLOUTS: u64 = 2u64; pub const SYSTEM_HYPERVISOR_KW_PROFILE: u64 = 1u64; pub const SYSTEM_HYPERVISOR_KW_VTL_CHANGE: u64 = 4u64; pub const SYSTEM_INTERRUPT_KW_CLOCK_INTERRUPT: u64 = 2u64; pub const SYSTEM_INTERRUPT_KW_DPC: u64 = 4u64; pub const SYSTEM_INTERRUPT_KW_DPC_QUEUE: u64 = 8u64; pub const SYSTEM_INTERRUPT_KW_GENERAL: u64 = 1u64; pub const SYSTEM_INTERRUPT_KW_IPI: u64 = 64u64; pub const SYSTEM_INTERRUPT_KW_WDF_DPC: u64 = 16u64; pub const SYSTEM_INTERRUPT_KW_WDF_INTERRUPT: u64 = 32u64; pub const SYSTEM_IOFILTER_KW_FAILURE: u64 = 8u64; pub const SYSTEM_IOFILTER_KW_FASTIO: u64 = 4u64; pub const SYSTEM_IOFILTER_KW_GENERAL: u64 = 1u64; pub const SYSTEM_IOFILTER_KW_INIT: u64 = 2u64; pub const SYSTEM_IO_KW_CC: u64 = 256u64; pub const SYSTEM_IO_KW_DISK: u64 = 1u64; pub const SYSTEM_IO_KW_DISK_INIT: u64 = 2u64; pub const SYSTEM_IO_KW_DRIVERS: u64 = 128u64; pub const SYSTEM_IO_KW_FILE: u64 = 16u64; pub const SYSTEM_IO_KW_FILENAME: u64 = 4u64; pub const SYSTEM_IO_KW_NETWORK: u64 = 512u64; pub const SYSTEM_IO_KW_OPTICAL: u64 = 32u64; pub const SYSTEM_IO_KW_OPTICAL_INIT: u64 = 64u64; pub const SYSTEM_IO_KW_SPLIT: u64 = 8u64; pub const SYSTEM_LOCK_KW_SPINLOCK: u64 = 1u64; pub const SYSTEM_LOCK_KW_SPINLOCK_COUNTERS: u64 = 2u64; pub const SYSTEM_LOCK_KW_SYNC_OBJECTS: u64 = 4u64; pub const SYSTEM_MEMORY_KW_ALL_FAULTS: u64 = 4u64; pub const SYSTEM_MEMORY_KW_CONTMEM_GEN: u64 = 512u64; pub const SYSTEM_MEMORY_KW_FOOTPRINT: u64 = 2048u64; pub const SYSTEM_MEMORY_KW_GENERAL: u64 = 1u64; pub const SYSTEM_MEMORY_KW_HARD_FAULTS: u64 = 2u64; pub const SYSTEM_MEMORY_KW_HEAP: u64 = 128u64; pub const SYSTEM_MEMORY_KW_MEMINFO: u64 = 16u64; pub const SYSTEM_MEMORY_KW_MEMINFO_WS: u64 = 64u64; pub const SYSTEM_MEMORY_KW_NONTRADEABLE: u64 = 32768u64; pub const SYSTEM_MEMORY_KW_PFSECTION: u64 = 32u64; pub const SYSTEM_MEMORY_KW_POOL: u64 = 8u64; pub const SYSTEM_MEMORY_KW_REFSET: u64 = 8192u64; pub const SYSTEM_MEMORY_KW_SESSION: u64 = 4096u64; pub const SYSTEM_MEMORY_KW_VAMAP: u64 = 16384u64; pub const SYSTEM_MEMORY_KW_VIRTUAL_ALLOC: u64 = 1024u64; pub const SYSTEM_MEMORY_KW_WS: u64 = 256u64; pub const SYSTEM_MEMORY_POOL_FILTER_ID: u32 = 1u32; pub const SYSTEM_OBJECT_KW_GENERAL: u64 = 1u64; pub const SYSTEM_OBJECT_KW_HANDLE: u64 = 2u64; pub const SYSTEM_POWER_KW_GENERAL: u64 = 1u64; pub const SYSTEM_POWER_KW_HIBER_RUNDOWN: u64 = 2u64; pub const SYSTEM_POWER_KW_IDLE_SELECTION: u64 = 8u64; pub const SYSTEM_POWER_KW_PPM_EXIT_LATENCY: u64 = 16u64; pub const SYSTEM_POWER_KW_PROCESSOR_IDLE: u64 = 4u64; pub const SYSTEM_PROCESS_KW_DBGPRINT: u64 = 256u64; pub const SYSTEM_PROCESS_KW_DEBUG_EVENTS: u64 = 128u64; pub const SYSTEM_PROCESS_KW_FREEZE: u64 = 4u64; pub const SYSTEM_PROCESS_KW_GENERAL: u64 = 1u64; pub const SYSTEM_PROCESS_KW_INSWAP: u64 = 2u64; pub const SYSTEM_PROCESS_KW_JOB: u64 = 512u64; pub const SYSTEM_PROCESS_KW_LOADER: u64 = 4096u64; pub const SYSTEM_PROCESS_KW_PERF_COUNTER: u64 = 8u64; pub const SYSTEM_PROCESS_KW_THREAD: u64 = 2048u64; pub const SYSTEM_PROCESS_KW_WAKE_COUNTER: u64 = 16u64; pub const SYSTEM_PROCESS_KW_WAKE_DROP: u64 = 32u64; pub const SYSTEM_PROCESS_KW_WAKE_EVENT: u64 = 64u64; pub const SYSTEM_PROCESS_KW_WORKER_THREAD: u64 = 1024u64; pub const SYSTEM_PROFILE_KW_GENERAL: u64 = 1u64; pub const SYSTEM_PROFILE_KW_PMC_PROFILE: u64 = 2u64; pub const SYSTEM_REGISTRY_KW_GENERAL: u64 = 1u64; pub const SYSTEM_REGISTRY_KW_HIVE: u64 = 2u64; pub const SYSTEM_REGISTRY_KW_NOTIFICATION: u64 = 4u64; pub const SYSTEM_SCHEDULER_KW_AFFINITY: u64 = 64u64; pub const SYSTEM_SCHEDULER_KW_ANTI_STARVATION: u64 = 16u64; pub const SYSTEM_SCHEDULER_KW_COMPACT_CSWITCH: u64 = 1024u64; pub const SYSTEM_SCHEDULER_KW_CONTEXT_SWITCH: u64 = 512u64; pub const SYSTEM_SCHEDULER_KW_DISPATCHER: u64 = 2u64; pub const SYSTEM_SCHEDULER_KW_IDEAL_PROCESSOR: u64 = 256u64; pub const SYSTEM_SCHEDULER_KW_KERNEL_QUEUE: u64 = 4u64; pub const SYSTEM_SCHEDULER_KW_LOAD_BALANCER: u64 = 32u64; pub const SYSTEM_SCHEDULER_KW_PRIORITY: u64 = 128u64; pub const SYSTEM_SCHEDULER_KW_SHOULD_YIELD: u64 = 8u64; pub const SYSTEM_SCHEDULER_KW_XSCHEDULER: u64 = 1u64; pub const SYSTEM_SYSCALL_KW_GENERAL: u64 = 1u64; pub const SYSTEM_TIMER_KW_CLOCK_TIMER: u64 = 2u64; pub const SYSTEM_TIMER_KW_GENERAL: u64 = 1u64; #[inline] pub unsafe fn SetTraceCallback(pguid: *const ::windows::core::GUID, eventcallback: ::core::option::Option<PEVENT_CALLBACK>) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn SetTraceCallback(pguid: *const ::windows::core::GUID, eventcallback: ::windows::core::RawPtr) -> u32; } ::core::mem::transmute(SetTraceCallback(::core::mem::transmute(pguid), ::core::mem::transmute(eventcallback))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StartTraceA<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PSTR>>(tracehandle: *mut u64, instancename: Param1, properties: *mut EVENT_TRACE_PROPERTIES) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StartTraceA(tracehandle: *mut u64, instancename: super::super::super::Foundation::PSTR, properties: *mut EVENT_TRACE_PROPERTIES) -> u32; } ::core::mem::transmute(StartTraceA(::core::mem::transmute(tracehandle), instancename.into_param().abi(), ::core::mem::transmute(properties))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StartTraceW<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(tracehandle: *mut u64, instancename: Param1, properties: *mut EVENT_TRACE_PROPERTIES) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StartTraceW(tracehandle: *mut u64, instancename: super::super::super::Foundation::PWSTR, properties: *mut EVENT_TRACE_PROPERTIES) -> u32; } ::core::mem::transmute(StartTraceW(::core::mem::transmute(tracehandle), instancename.into_param().abi(), ::core::mem::transmute(properties))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StopTraceA<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PSTR>>(tracehandle: u64, instancename: Param1, properties: *mut EVENT_TRACE_PROPERTIES) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StopTraceA(tracehandle: u64, instancename: super::super::super::Foundation::PSTR, properties: *mut EVENT_TRACE_PROPERTIES) -> u32; } ::core::mem::transmute(StopTraceA(::core::mem::transmute(tracehandle), instancename.into_param().abi(), ::core::mem::transmute(properties))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn StopTraceW<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(tracehandle: u64, instancename: Param1, properties: *mut EVENT_TRACE_PROPERTIES) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn StopTraceW(tracehandle: u64, instancename: super::super::super::Foundation::PWSTR, properties: *mut EVENT_TRACE_PROPERTIES) -> u32; } ::core::mem::transmute(StopTraceW(::core::mem::transmute(tracehandle), instancename.into_param().abi(), ::core::mem::transmute(properties))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const SystemAlpcProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfcb9baaf_e529_4980_92e9_ced1a6aadfdf); pub const SystemConfigProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfef3a8b6_318d_4b67_a96a_3b0f6b8f18fe); pub const SystemCpuProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc6c5265f_eae8_4650_aae4_9d48603d8510); pub const SystemHypervisorProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbafa072a_918a_4bed_b622_bc152097098f); pub const SystemInterruptProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd4bbee17_b545_4888_858b_744169015b25); pub const SystemIoFilterProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfbd09363_9e22_4661_b8bf_e7a34b535b8c); pub const SystemIoProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3d5c43e3_0f1c_4202_b817_174c0070dc79); pub const SystemLockProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x721ddfd3_dacc_4e1e_b26a_a2cb31d4705a); pub const SystemMemoryProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x82958ca9_b6cd_47f8_a3a8_03ae85a4bc24); pub const SystemObjectProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfebd7460_3d1d_47eb_af49_c9eeb1e146f2); pub const SystemPowerProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc134884a_32d5_4488_80e5_14ed7abb8269); pub const SystemProcessProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x151f55dc_467d_471f_83b5_5f889d46ff66); pub const SystemProfileProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbfeb0324_1cee_496f_a409_2ac2b48a6322); pub const SystemRegistryProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x16156bd9_fab4_4cfa_a232_89d1099058e3); pub const SystemSchedulerProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x599a2a76_4d91_4910_9ac7_7d33f2e97a6c); pub const SystemSyscallProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x434286f7_6f1b_45bb_b37e_95f623046c7c); pub const SystemTimerProviderGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4f061568_e215_499f_ab2e_eda0ae890a5b); pub const SystemTraceControlGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9e814aad_3204_11d2_9a82_006008a86939); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct TDH_CONTEXT { pub ParameterValue: u64, pub ParameterType: TDH_CONTEXT_TYPE, pub ParameterSize: u32, } impl TDH_CONTEXT {} impl ::core::default::Default for TDH_CONTEXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for TDH_CONTEXT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("TDH_CONTEXT").field("ParameterValue", &self.ParameterValue).field("ParameterType", &self.ParameterType).field("ParameterSize", &self.ParameterSize).finish() } } impl ::core::cmp::PartialEq for TDH_CONTEXT { fn eq(&self, other: &Self) -> bool { self.ParameterValue == other.ParameterValue && self.ParameterType == other.ParameterType && self.ParameterSize == other.ParameterSize } } impl ::core::cmp::Eq for TDH_CONTEXT {} unsafe impl ::windows::core::Abi for TDH_CONTEXT { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct TDH_CONTEXT_TYPE(pub i32); pub const TDH_CONTEXT_WPP_TMFFILE: TDH_CONTEXT_TYPE = TDH_CONTEXT_TYPE(0i32); pub const TDH_CONTEXT_WPP_TMFSEARCHPATH: TDH_CONTEXT_TYPE = TDH_CONTEXT_TYPE(1i32); pub const TDH_CONTEXT_WPP_GMT: TDH_CONTEXT_TYPE = TDH_CONTEXT_TYPE(2i32); pub const TDH_CONTEXT_POINTERSIZE: TDH_CONTEXT_TYPE = TDH_CONTEXT_TYPE(3i32); pub const TDH_CONTEXT_PDB_PATH: TDH_CONTEXT_TYPE = TDH_CONTEXT_TYPE(4i32); pub const TDH_CONTEXT_MAXIMUM: TDH_CONTEXT_TYPE = TDH_CONTEXT_TYPE(5i32); impl ::core::convert::From<i32> for TDH_CONTEXT_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for TDH_CONTEXT_TYPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy, :: core :: fmt :: Debug, :: core :: cmp :: PartialEq, :: core :: cmp :: Eq)] #[repr(transparent)] pub struct TDH_HANDLE(pub isize); impl ::core::default::Default for TDH_HANDLE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } unsafe impl ::windows::core::Handle for TDH_HANDLE {} unsafe impl ::windows::core::Abi for TDH_HANDLE { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct TEMPLATE_FLAGS(pub i32); pub const TEMPLATE_EVENT_DATA: TEMPLATE_FLAGS = TEMPLATE_FLAGS(1i32); pub const TEMPLATE_USER_DATA: TEMPLATE_FLAGS = TEMPLATE_FLAGS(2i32); pub const TEMPLATE_CONTROL_GUID: TEMPLATE_FLAGS = TEMPLATE_FLAGS(4i32); impl ::core::convert::From<i32> for TEMPLATE_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for TEMPLATE_FLAGS { type Abi = Self; } pub const TRACELOG_ACCESS_KERNEL_LOGGER: u32 = 256u32; pub const TRACELOG_ACCESS_REALTIME: u32 = 1024u32; pub const TRACELOG_CREATE_INPROC: u32 = 512u32; pub const TRACELOG_CREATE_ONDISK: u32 = 64u32; pub const TRACELOG_CREATE_REALTIME: u32 = 32u32; pub const TRACELOG_GUID_ENABLE: u32 = 128u32; pub const TRACELOG_JOIN_GROUP: u32 = 4096u32; pub const TRACELOG_LOG_EVENT: u32 = 512u32; pub const TRACELOG_REGISTER_GUIDS: u32 = 2048u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct TRACE_ENABLE_INFO { pub IsEnabled: u32, pub Level: u8, pub Reserved1: u8, pub LoggerId: u16, pub EnableProperty: u32, pub Reserved2: u32, pub MatchAnyKeyword: u64, pub MatchAllKeyword: u64, } impl TRACE_ENABLE_INFO {} impl ::core::default::Default for TRACE_ENABLE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for TRACE_ENABLE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("TRACE_ENABLE_INFO") .field("IsEnabled", &self.IsEnabled) .field("Level", &self.Level) .field("Reserved1", &self.Reserved1) .field("LoggerId", &self.LoggerId) .field("EnableProperty", &self.EnableProperty) .field("Reserved2", &self.Reserved2) .field("MatchAnyKeyword", &self.MatchAnyKeyword) .field("MatchAllKeyword", &self.MatchAllKeyword) .finish() } } impl ::core::cmp::PartialEq for TRACE_ENABLE_INFO { fn eq(&self, other: &Self) -> bool { self.IsEnabled == other.IsEnabled && self.Level == other.Level && self.Reserved1 == other.Reserved1 && self.LoggerId == other.LoggerId && self.EnableProperty == other.EnableProperty && self.Reserved2 == other.Reserved2 && self.MatchAnyKeyword == other.MatchAnyKeyword && self.MatchAllKeyword == other.MatchAllKeyword } } impl ::core::cmp::Eq for TRACE_ENABLE_INFO {} unsafe impl ::windows::core::Abi for TRACE_ENABLE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct TRACE_EVENT_INFO { pub ProviderGuid: ::windows::core::GUID, pub EventGuid: ::windows::core::GUID, pub EventDescriptor: EVENT_DESCRIPTOR, pub DecodingSource: DECODING_SOURCE, pub ProviderNameOffset: u32, pub LevelNameOffset: u32, pub ChannelNameOffset: u32, pub KeywordsNameOffset: u32, pub TaskNameOffset: u32, pub OpcodeNameOffset: u32, pub EventMessageOffset: u32, pub ProviderMessageOffset: u32, pub BinaryXMLOffset: u32, pub BinaryXMLSize: u32, pub Anonymous1: TRACE_EVENT_INFO_0, pub Anonymous2: TRACE_EVENT_INFO_1, pub PropertyCount: u32, pub TopLevelPropertyCount: u32, pub Anonymous3: TRACE_EVENT_INFO_2, pub EventPropertyInfoArray: [EVENT_PROPERTY_INFO; 1], } impl TRACE_EVENT_INFO {} impl ::core::default::Default for TRACE_EVENT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for TRACE_EVENT_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for TRACE_EVENT_INFO {} unsafe impl ::windows::core::Abi for TRACE_EVENT_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union TRACE_EVENT_INFO_0 { pub EventNameOffset: u32, pub ActivityIDNameOffset: u32, } impl TRACE_EVENT_INFO_0 {} impl ::core::default::Default for TRACE_EVENT_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for TRACE_EVENT_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for TRACE_EVENT_INFO_0 {} unsafe impl ::windows::core::Abi for TRACE_EVENT_INFO_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union TRACE_EVENT_INFO_1 { pub EventAttributesOffset: u32, pub RelatedActivityIDNameOffset: u32, } impl TRACE_EVENT_INFO_1 {} impl ::core::default::Default for TRACE_EVENT_INFO_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for TRACE_EVENT_INFO_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for TRACE_EVENT_INFO_1 {} unsafe impl ::windows::core::Abi for TRACE_EVENT_INFO_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union TRACE_EVENT_INFO_2 { pub Flags: TEMPLATE_FLAGS, pub Anonymous: TRACE_EVENT_INFO_2_0, } impl TRACE_EVENT_INFO_2 {} impl ::core::default::Default for TRACE_EVENT_INFO_2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for TRACE_EVENT_INFO_2 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for TRACE_EVENT_INFO_2 {} unsafe impl ::windows::core::Abi for TRACE_EVENT_INFO_2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct TRACE_EVENT_INFO_2_0 { pub _bitfield: u32, } impl TRACE_EVENT_INFO_2_0 {} impl ::core::default::Default for TRACE_EVENT_INFO_2_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for TRACE_EVENT_INFO_2_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("_bitfield", &self._bitfield).finish() } } impl ::core::cmp::PartialEq for TRACE_EVENT_INFO_2_0 { fn eq(&self, other: &Self) -> bool { self._bitfield == other._bitfield } } impl ::core::cmp::Eq for TRACE_EVENT_INFO_2_0 {} unsafe impl ::windows::core::Abi for TRACE_EVENT_INFO_2_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct TRACE_GUID_INFO { pub InstanceCount: u32, pub Reserved: u32, } impl TRACE_GUID_INFO {} impl ::core::default::Default for TRACE_GUID_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for TRACE_GUID_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("TRACE_GUID_INFO").field("InstanceCount", &self.InstanceCount).field("Reserved", &self.Reserved).finish() } } impl ::core::cmp::PartialEq for TRACE_GUID_INFO { fn eq(&self, other: &Self) -> bool { self.InstanceCount == other.InstanceCount && self.Reserved == other.Reserved } } impl ::core::cmp::Eq for TRACE_GUID_INFO {} unsafe impl ::windows::core::Abi for TRACE_GUID_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct TRACE_GUID_PROPERTIES { pub Guid: ::windows::core::GUID, pub GuidType: u32, pub LoggerId: u32, pub EnableLevel: u32, pub EnableFlags: u32, pub IsEnable: super::super::super::Foundation::BOOLEAN, } #[cfg(feature = "Win32_Foundation")] impl TRACE_GUID_PROPERTIES {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for TRACE_GUID_PROPERTIES { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for TRACE_GUID_PROPERTIES { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("TRACE_GUID_PROPERTIES").field("Guid", &self.Guid).field("GuidType", &self.GuidType).field("LoggerId", &self.LoggerId).field("EnableLevel", &self.EnableLevel).field("EnableFlags", &self.EnableFlags).field("IsEnable", &self.IsEnable).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for TRACE_GUID_PROPERTIES { fn eq(&self, other: &Self) -> bool { self.Guid == other.Guid && self.GuidType == other.GuidType && self.LoggerId == other.LoggerId && self.EnableLevel == other.EnableLevel && self.EnableFlags == other.EnableFlags && self.IsEnable == other.IsEnable } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for TRACE_GUID_PROPERTIES {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for TRACE_GUID_PROPERTIES { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct TRACE_GUID_REGISTRATION { pub Guid: *mut ::windows::core::GUID, pub RegHandle: super::super::super::Foundation::HANDLE, } #[cfg(feature = "Win32_Foundation")] impl TRACE_GUID_REGISTRATION {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for TRACE_GUID_REGISTRATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for TRACE_GUID_REGISTRATION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("TRACE_GUID_REGISTRATION").field("Guid", &self.Guid).field("RegHandle", &self.RegHandle).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for TRACE_GUID_REGISTRATION { fn eq(&self, other: &Self) -> bool { self.Guid == other.Guid && self.RegHandle == other.RegHandle } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for TRACE_GUID_REGISTRATION {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for TRACE_GUID_REGISTRATION { type Abi = Self; } pub const TRACE_HEADER_FLAG_LOG_WNODE: u32 = 262144u32; pub const TRACE_HEADER_FLAG_TRACED_GUID: u32 = 131072u32; pub const TRACE_HEADER_FLAG_USE_GUID_PTR: u32 = 524288u32; pub const TRACE_HEADER_FLAG_USE_MOF_PTR: u32 = 1048576u32; pub const TRACE_HEADER_FLAG_USE_TIMESTAMP: u32 = 512u32; pub const TRACE_LEVEL_CRITICAL: u32 = 1u32; pub const TRACE_LEVEL_ERROR: u32 = 2u32; pub const TRACE_LEVEL_FATAL: u32 = 1u32; pub const TRACE_LEVEL_INFORMATION: u32 = 4u32; pub const TRACE_LEVEL_NONE: u32 = 0u32; pub const TRACE_LEVEL_RESERVED6: u32 = 6u32; pub const TRACE_LEVEL_RESERVED7: u32 = 7u32; pub const TRACE_LEVEL_RESERVED8: u32 = 8u32; pub const TRACE_LEVEL_RESERVED9: u32 = 9u32; pub const TRACE_LEVEL_VERBOSE: u32 = 5u32; pub const TRACE_LEVEL_WARNING: u32 = 3u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub struct TRACE_LOGFILE_HEADER { pub BufferSize: u32, pub Anonymous1: TRACE_LOGFILE_HEADER_0, pub ProviderVersion: u32, pub NumberOfProcessors: u32, pub EndTime: i64, pub TimerResolution: u32, pub MaximumFileSize: u32, pub LogFileMode: u32, pub BuffersWritten: u32, pub Anonymous2: TRACE_LOGFILE_HEADER_1, pub LoggerName: super::super::super::Foundation::PWSTR, pub LogFileName: super::super::super::Foundation::PWSTR, pub TimeZone: super::super::Time::TIME_ZONE_INFORMATION, pub BootTime: i64, pub PerfFreq: i64, pub StartTime: i64, pub ReservedFlags: u32, pub BuffersLost: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub union TRACE_LOGFILE_HEADER_0 { pub Version: u32, pub VersionDetail: TRACE_LOGFILE_HEADER_0_0, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub struct TRACE_LOGFILE_HEADER_0_0 { pub MajorVersion: u8, pub MinorVersion: u8, pub SubVersion: u8, pub SubMinorVersion: u8, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER_0_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::fmt::Debug for TRACE_LOGFILE_HEADER_0_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_VersionDetail_e__Struct").field("MajorVersion", &self.MajorVersion).field("MinorVersion", &self.MinorVersion).field("SubVersion", &self.SubVersion).field("SubMinorVersion", &self.SubMinorVersion).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER_0_0 { fn eq(&self, other: &Self) -> bool { self.MajorVersion == other.MajorVersion && self.MinorVersion == other.MinorVersion && self.SubVersion == other.SubVersion && self.SubMinorVersion == other.SubMinorVersion } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER_0_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER_0_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub union TRACE_LOGFILE_HEADER_1 { pub LogInstanceGuid: ::windows::core::GUID, pub Anonymous: TRACE_LOGFILE_HEADER_1_0, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER_1 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER_1 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub struct TRACE_LOGFILE_HEADER_1_0 { pub StartBuffers: u32, pub PointerSize: u32, pub EventsLost: u32, pub CpuSpeedInMHz: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER_1_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER_1_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::fmt::Debug for TRACE_LOGFILE_HEADER_1_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("StartBuffers", &self.StartBuffers).field("PointerSize", &self.PointerSize).field("EventsLost", &self.EventsLost).field("CpuSpeedInMHz", &self.CpuSpeedInMHz).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER_1_0 { fn eq(&self, other: &Self) -> bool { self.StartBuffers == other.StartBuffers && self.PointerSize == other.PointerSize && self.EventsLost == other.EventsLost && self.CpuSpeedInMHz == other.CpuSpeedInMHz } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER_1_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER_1_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub struct TRACE_LOGFILE_HEADER32 { pub BufferSize: u32, pub Anonymous1: TRACE_LOGFILE_HEADER32_0, pub ProviderVersion: u32, pub NumberOfProcessors: u32, pub EndTime: i64, pub TimerResolution: u32, pub MaximumFileSize: u32, pub LogFileMode: u32, pub BuffersWritten: u32, pub Anonymous2: TRACE_LOGFILE_HEADER32_1, pub LoggerName: u32, pub LogFileName: u32, pub TimeZone: super::super::Time::TIME_ZONE_INFORMATION, pub BootTime: i64, pub PerfFreq: i64, pub StartTime: i64, pub ReservedFlags: u32, pub BuffersLost: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER32 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER32 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER32 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER32 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER32 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub union TRACE_LOGFILE_HEADER32_0 { pub Version: u32, pub VersionDetail: TRACE_LOGFILE_HEADER32_0_0, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER32_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER32_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER32_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER32_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER32_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub struct TRACE_LOGFILE_HEADER32_0_0 { pub MajorVersion: u8, pub MinorVersion: u8, pub SubVersion: u8, pub SubMinorVersion: u8, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER32_0_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER32_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::fmt::Debug for TRACE_LOGFILE_HEADER32_0_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_VersionDetail_e__Struct").field("MajorVersion", &self.MajorVersion).field("MinorVersion", &self.MinorVersion).field("SubVersion", &self.SubVersion).field("SubMinorVersion", &self.SubMinorVersion).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER32_0_0 { fn eq(&self, other: &Self) -> bool { self.MajorVersion == other.MajorVersion && self.MinorVersion == other.MinorVersion && self.SubVersion == other.SubVersion && self.SubMinorVersion == other.SubMinorVersion } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER32_0_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER32_0_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub union TRACE_LOGFILE_HEADER32_1 { pub LogInstanceGuid: ::windows::core::GUID, pub Anonymous: TRACE_LOGFILE_HEADER32_1_0, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER32_1 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER32_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER32_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER32_1 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER32_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub struct TRACE_LOGFILE_HEADER32_1_0 { pub StartBuffers: u32, pub PointerSize: u32, pub EventsLost: u32, pub CpuSpeedInMHz: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER32_1_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER32_1_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::fmt::Debug for TRACE_LOGFILE_HEADER32_1_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("StartBuffers", &self.StartBuffers).field("PointerSize", &self.PointerSize).field("EventsLost", &self.EventsLost).field("CpuSpeedInMHz", &self.CpuSpeedInMHz).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER32_1_0 { fn eq(&self, other: &Self) -> bool { self.StartBuffers == other.StartBuffers && self.PointerSize == other.PointerSize && self.EventsLost == other.EventsLost && self.CpuSpeedInMHz == other.CpuSpeedInMHz } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER32_1_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER32_1_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub struct TRACE_LOGFILE_HEADER64 { pub BufferSize: u32, pub Anonymous1: TRACE_LOGFILE_HEADER64_0, pub ProviderVersion: u32, pub NumberOfProcessors: u32, pub EndTime: i64, pub TimerResolution: u32, pub MaximumFileSize: u32, pub LogFileMode: u32, pub BuffersWritten: u32, pub Anonymous2: TRACE_LOGFILE_HEADER64_1, pub LoggerName: u64, pub LogFileName: u64, pub TimeZone: super::super::Time::TIME_ZONE_INFORMATION, pub BootTime: i64, pub PerfFreq: i64, pub StartTime: i64, pub ReservedFlags: u32, pub BuffersLost: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER64 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER64 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER64 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER64 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER64 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub union TRACE_LOGFILE_HEADER64_0 { pub Version: u32, pub VersionDetail: TRACE_LOGFILE_HEADER64_0_0, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER64_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER64_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER64_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER64_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER64_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub struct TRACE_LOGFILE_HEADER64_0_0 { pub MajorVersion: u8, pub MinorVersion: u8, pub SubVersion: u8, pub SubMinorVersion: u8, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER64_0_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER64_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::fmt::Debug for TRACE_LOGFILE_HEADER64_0_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_VersionDetail_e__Struct").field("MajorVersion", &self.MajorVersion).field("MinorVersion", &self.MinorVersion).field("SubVersion", &self.SubVersion).field("SubMinorVersion", &self.SubMinorVersion).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER64_0_0 { fn eq(&self, other: &Self) -> bool { self.MajorVersion == other.MajorVersion && self.MinorVersion == other.MinorVersion && self.SubVersion == other.SubVersion && self.SubMinorVersion == other.SubMinorVersion } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER64_0_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER64_0_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub union TRACE_LOGFILE_HEADER64_1 { pub LogInstanceGuid: ::windows::core::GUID, pub Anonymous: TRACE_LOGFILE_HEADER64_1_0, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER64_1 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER64_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER64_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER64_1 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER64_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] pub struct TRACE_LOGFILE_HEADER64_1_0 { pub StartBuffers: u32, pub PointerSize: u32, pub EventsLost: u32, pub CpuSpeedInMHz: u32, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl TRACE_LOGFILE_HEADER64_1_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::default::Default for TRACE_LOGFILE_HEADER64_1_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::fmt::Debug for TRACE_LOGFILE_HEADER64_1_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("StartBuffers", &self.StartBuffers).field("PointerSize", &self.PointerSize).field("EventsLost", &self.EventsLost).field("CpuSpeedInMHz", &self.CpuSpeedInMHz).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::PartialEq for TRACE_LOGFILE_HEADER64_1_0 { fn eq(&self, other: &Self) -> bool { self.StartBuffers == other.StartBuffers && self.PointerSize == other.PointerSize && self.EventsLost == other.EventsLost && self.CpuSpeedInMHz == other.CpuSpeedInMHz } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] impl ::core::cmp::Eq for TRACE_LOGFILE_HEADER64_1_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Time"))] unsafe impl ::windows::core::Abi for TRACE_LOGFILE_HEADER64_1_0 { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct TRACE_MESSAGE_FLAGS(pub u32); pub const TRACE_MESSAGE_COMPONENTID: TRACE_MESSAGE_FLAGS = TRACE_MESSAGE_FLAGS(4u32); pub const TRACE_MESSAGE_GUID: TRACE_MESSAGE_FLAGS = TRACE_MESSAGE_FLAGS(2u32); pub const TRACE_MESSAGE_SEQUENCE: TRACE_MESSAGE_FLAGS = TRACE_MESSAGE_FLAGS(1u32); pub const TRACE_MESSAGE_SYSTEMINFO: TRACE_MESSAGE_FLAGS = TRACE_MESSAGE_FLAGS(32u32); pub const TRACE_MESSAGE_TIMESTAMP: TRACE_MESSAGE_FLAGS = TRACE_MESSAGE_FLAGS(8u32); impl ::core::convert::From<u32> for TRACE_MESSAGE_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for TRACE_MESSAGE_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for TRACE_MESSAGE_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for TRACE_MESSAGE_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for TRACE_MESSAGE_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for TRACE_MESSAGE_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for TRACE_MESSAGE_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const TRACE_MESSAGE_FLAG_MASK: u32 = 65535u32; pub const TRACE_MESSAGE_PERFORMANCE_TIMESTAMP: u32 = 16u32; pub const TRACE_MESSAGE_POINTER32: u32 = 64u32; pub const TRACE_MESSAGE_POINTER64: u32 = 128u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct TRACE_PERIODIC_CAPTURE_STATE_INFO { pub CaptureStateFrequencyInSeconds: u32, pub ProviderCount: u16, pub Reserved: u16, } impl TRACE_PERIODIC_CAPTURE_STATE_INFO {} impl ::core::default::Default for TRACE_PERIODIC_CAPTURE_STATE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for TRACE_PERIODIC_CAPTURE_STATE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("TRACE_PERIODIC_CAPTURE_STATE_INFO").field("CaptureStateFrequencyInSeconds", &self.CaptureStateFrequencyInSeconds).field("ProviderCount", &self.ProviderCount).field("Reserved", &self.Reserved).finish() } } impl ::core::cmp::PartialEq for TRACE_PERIODIC_CAPTURE_STATE_INFO { fn eq(&self, other: &Self) -> bool { self.CaptureStateFrequencyInSeconds == other.CaptureStateFrequencyInSeconds && self.ProviderCount == other.ProviderCount && self.Reserved == other.Reserved } } impl ::core::cmp::Eq for TRACE_PERIODIC_CAPTURE_STATE_INFO {} unsafe impl ::windows::core::Abi for TRACE_PERIODIC_CAPTURE_STATE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct TRACE_PROFILE_INTERVAL { pub Source: u32, pub Interval: u32, } impl TRACE_PROFILE_INTERVAL {} impl ::core::default::Default for TRACE_PROFILE_INTERVAL { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for TRACE_PROFILE_INTERVAL { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("TRACE_PROFILE_INTERVAL").field("Source", &self.Source).field("Interval", &self.Interval).finish() } } impl ::core::cmp::PartialEq for TRACE_PROFILE_INTERVAL { fn eq(&self, other: &Self) -> bool { self.Source == other.Source && self.Interval == other.Interval } } impl ::core::cmp::Eq for TRACE_PROFILE_INTERVAL {} unsafe impl ::windows::core::Abi for TRACE_PROFILE_INTERVAL { type Abi = Self; } pub const TRACE_PROVIDER_FLAG_LEGACY: u32 = 1u32; pub const TRACE_PROVIDER_FLAG_PRE_ENABLE: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct TRACE_PROVIDER_INFO { pub ProviderGuid: ::windows::core::GUID, pub SchemaSource: u32, pub ProviderNameOffset: u32, } impl TRACE_PROVIDER_INFO {} impl ::core::default::Default for TRACE_PROVIDER_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for TRACE_PROVIDER_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("TRACE_PROVIDER_INFO").field("ProviderGuid", &self.ProviderGuid).field("SchemaSource", &self.SchemaSource).field("ProviderNameOffset", &self.ProviderNameOffset).finish() } } impl ::core::cmp::PartialEq for TRACE_PROVIDER_INFO { fn eq(&self, other: &Self) -> bool { self.ProviderGuid == other.ProviderGuid && self.SchemaSource == other.SchemaSource && self.ProviderNameOffset == other.ProviderNameOffset } } impl ::core::cmp::Eq for TRACE_PROVIDER_INFO {} unsafe impl ::windows::core::Abi for TRACE_PROVIDER_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct TRACE_PROVIDER_INSTANCE_INFO { pub NextOffset: u32, pub EnableCount: u32, pub Pid: u32, pub Flags: u32, } impl TRACE_PROVIDER_INSTANCE_INFO {} impl ::core::default::Default for TRACE_PROVIDER_INSTANCE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for TRACE_PROVIDER_INSTANCE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("TRACE_PROVIDER_INSTANCE_INFO").field("NextOffset", &self.NextOffset).field("EnableCount", &self.EnableCount).field("Pid", &self.Pid).field("Flags", &self.Flags).finish() } } impl ::core::cmp::PartialEq for TRACE_PROVIDER_INSTANCE_INFO { fn eq(&self, other: &Self) -> bool { self.NextOffset == other.NextOffset && self.EnableCount == other.EnableCount && self.Pid == other.Pid && self.Flags == other.Flags } } impl ::core::cmp::Eq for TRACE_PROVIDER_INSTANCE_INFO {} unsafe impl ::windows::core::Abi for TRACE_PROVIDER_INSTANCE_INFO { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct TRACE_QUERY_INFO_CLASS(pub i32); pub const TraceGuidQueryList: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(0i32); pub const TraceGuidQueryInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(1i32); pub const TraceGuidQueryProcess: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(2i32); pub const TraceStackTracingInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(3i32); pub const TraceSystemTraceEnableFlagsInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(4i32); pub const TraceSampledProfileIntervalInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(5i32); pub const TraceProfileSourceConfigInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(6i32); pub const TraceProfileSourceListInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(7i32); pub const TracePmcEventListInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(8i32); pub const TracePmcCounterListInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(9i32); pub const TraceSetDisallowList: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(10i32); pub const TraceVersionInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(11i32); pub const TraceGroupQueryList: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(12i32); pub const TraceGroupQueryInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(13i32); pub const TraceDisallowListQuery: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(14i32); pub const TraceInfoReserved15: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(15i32); pub const TracePeriodicCaptureStateListInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(16i32); pub const TracePeriodicCaptureStateInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(17i32); pub const TraceProviderBinaryTracking: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(18i32); pub const TraceMaxLoggersQuery: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(19i32); pub const TraceLbrConfigurationInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(20i32); pub const TraceLbrEventListInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(21i32); pub const TraceMaxPmcCounterQuery: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(22i32); pub const TraceStreamCount: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(23i32); pub const TraceStackCachingInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(24i32); pub const TracePmcCounterOwners: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(25i32); pub const TraceUnifiedStackCachingInfo: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(26i32); pub const MaxTraceSetInfoClass: TRACE_QUERY_INFO_CLASS = TRACE_QUERY_INFO_CLASS(27i32); impl ::core::convert::From<i32> for TRACE_QUERY_INFO_CLASS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for TRACE_QUERY_INFO_CLASS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct TRACE_STACK_CACHING_INFO { pub Enabled: super::super::super::Foundation::BOOLEAN, pub CacheSize: u32, pub BucketCount: u32, } #[cfg(feature = "Win32_Foundation")] impl TRACE_STACK_CACHING_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for TRACE_STACK_CACHING_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for TRACE_STACK_CACHING_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("TRACE_STACK_CACHING_INFO").field("Enabled", &self.Enabled).field("CacheSize", &self.CacheSize).field("BucketCount", &self.BucketCount).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for TRACE_STACK_CACHING_INFO { fn eq(&self, other: &Self) -> bool { self.Enabled == other.Enabled && self.CacheSize == other.CacheSize && self.BucketCount == other.BucketCount } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for TRACE_STACK_CACHING_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for TRACE_STACK_CACHING_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct TRACE_VERSION_INFO { pub EtwTraceProcessingVersion: u32, pub Reserved: u32, } impl TRACE_VERSION_INFO {} impl ::core::default::Default for TRACE_VERSION_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for TRACE_VERSION_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("TRACE_VERSION_INFO").field("EtwTraceProcessingVersion", &self.EtwTraceProcessingVersion).field("Reserved", &self.Reserved).finish() } } impl ::core::cmp::PartialEq for TRACE_VERSION_INFO { fn eq(&self, other: &Self) -> bool { self.EtwTraceProcessingVersion == other.EtwTraceProcessingVersion && self.Reserved == other.Reserved } } impl ::core::cmp::Eq for TRACE_VERSION_INFO {} unsafe impl ::windows::core::Abi for TRACE_VERSION_INFO { type Abi = Self; } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn TdhAggregatePayloadFilters(payloadfiltercount: u32, payloadfilterptrs: *const *const ::core::ffi::c_void, eventmatchallflags: *const super::super::super::Foundation::BOOLEAN, eventfilterdescriptor: *mut EVENT_FILTER_DESCRIPTOR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhAggregatePayloadFilters(payloadfiltercount: u32, payloadfilterptrs: *const *const ::core::ffi::c_void, eventmatchallflags: *const super::super::super::Foundation::BOOLEAN, eventfilterdescriptor: *mut EVENT_FILTER_DESCRIPTOR) -> u32; } ::core::mem::transmute(TdhAggregatePayloadFilters(::core::mem::transmute(payloadfiltercount), ::core::mem::transmute(payloadfilterptrs), ::core::mem::transmute(eventmatchallflags), ::core::mem::transmute(eventfilterdescriptor))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhCleanupPayloadEventFilterDescriptor(eventfilterdescriptor: *mut EVENT_FILTER_DESCRIPTOR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhCleanupPayloadEventFilterDescriptor(eventfilterdescriptor: *mut EVENT_FILTER_DESCRIPTOR) -> u32; } ::core::mem::transmute(TdhCleanupPayloadEventFilterDescriptor(::core::mem::transmute(eventfilterdescriptor))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhCloseDecodingHandle<'a, Param0: ::windows::core::IntoParam<'a, TDH_HANDLE>>(handle: Param0) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhCloseDecodingHandle(handle: TDH_HANDLE) -> u32; } ::core::mem::transmute(TdhCloseDecodingHandle(handle.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn TdhCreatePayloadFilter<'a, Param2: ::windows::core::IntoParam<'a, super::super::super::Foundation::BOOLEAN>>(providerguid: *const ::windows::core::GUID, eventdescriptor: *const EVENT_DESCRIPTOR, eventmatchany: Param2, payloadpredicatecount: u32, payloadpredicates: *const PAYLOAD_FILTER_PREDICATE, payloadfilter: *mut *mut ::core::ffi::c_void) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhCreatePayloadFilter(providerguid: *const ::windows::core::GUID, eventdescriptor: *const EVENT_DESCRIPTOR, eventmatchany: super::super::super::Foundation::BOOLEAN, payloadpredicatecount: u32, payloadpredicates: *const PAYLOAD_FILTER_PREDICATE, payloadfilter: *mut *mut ::core::ffi::c_void) -> u32; } ::core::mem::transmute(TdhCreatePayloadFilter(::core::mem::transmute(providerguid), ::core::mem::transmute(eventdescriptor), eventmatchany.into_param().abi(), ::core::mem::transmute(payloadpredicatecount), ::core::mem::transmute(payloadpredicates), ::core::mem::transmute(payloadfilter))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhDeletePayloadFilter(payloadfilter: *mut *mut ::core::ffi::c_void) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhDeletePayloadFilter(payloadfilter: *mut *mut ::core::ffi::c_void) -> u32; } ::core::mem::transmute(TdhDeletePayloadFilter(::core::mem::transmute(payloadfilter))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhEnumerateManifestProviderEvents(providerguid: *const ::windows::core::GUID, buffer: *mut PROVIDER_EVENT_INFO, buffersize: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhEnumerateManifestProviderEvents(providerguid: *const ::windows::core::GUID, buffer: *mut PROVIDER_EVENT_INFO, buffersize: *mut u32) -> u32; } ::core::mem::transmute(TdhEnumerateManifestProviderEvents(::core::mem::transmute(providerguid), ::core::mem::transmute(buffer), ::core::mem::transmute(buffersize))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhEnumerateProviderFieldInformation(pguid: *const ::windows::core::GUID, eventfieldtype: EVENT_FIELD_TYPE, pbuffer: *mut PROVIDER_FIELD_INFOARRAY, pbuffersize: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhEnumerateProviderFieldInformation(pguid: *const ::windows::core::GUID, eventfieldtype: EVENT_FIELD_TYPE, pbuffer: *mut PROVIDER_FIELD_INFOARRAY, pbuffersize: *mut u32) -> u32; } ::core::mem::transmute(TdhEnumerateProviderFieldInformation(::core::mem::transmute(pguid), ::core::mem::transmute(eventfieldtype), ::core::mem::transmute(pbuffer), ::core::mem::transmute(pbuffersize))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhEnumerateProviderFilters(guid: *const ::windows::core::GUID, tdhcontextcount: u32, tdhcontext: *const TDH_CONTEXT, filtercount: *mut u32, buffer: *mut *mut PROVIDER_FILTER_INFO, buffersize: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhEnumerateProviderFilters(guid: *const ::windows::core::GUID, tdhcontextcount: u32, tdhcontext: *const TDH_CONTEXT, filtercount: *mut u32, buffer: *mut *mut PROVIDER_FILTER_INFO, buffersize: *mut u32) -> u32; } ::core::mem::transmute(TdhEnumerateProviderFilters(::core::mem::transmute(guid), ::core::mem::transmute(tdhcontextcount), ::core::mem::transmute(tdhcontext), ::core::mem::transmute(filtercount), ::core::mem::transmute(buffer), ::core::mem::transmute(buffersize))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhEnumerateProviders(pbuffer: *mut PROVIDER_ENUMERATION_INFO, pbuffersize: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhEnumerateProviders(pbuffer: *mut PROVIDER_ENUMERATION_INFO, pbuffersize: *mut u32) -> u32; } ::core::mem::transmute(TdhEnumerateProviders(::core::mem::transmute(pbuffer), ::core::mem::transmute(pbuffersize))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhEnumerateProvidersForDecodingSource(filter: DECODING_SOURCE, buffer: *mut PROVIDER_ENUMERATION_INFO, buffersize: u32, bufferrequired: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhEnumerateProvidersForDecodingSource(filter: DECODING_SOURCE, buffer: *mut PROVIDER_ENUMERATION_INFO, buffersize: u32, bufferrequired: *mut u32) -> u32; } ::core::mem::transmute(TdhEnumerateProvidersForDecodingSource(::core::mem::transmute(filter), ::core::mem::transmute(buffer), ::core::mem::transmute(buffersize), ::core::mem::transmute(bufferrequired))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn TdhFormatProperty(eventinfo: *const TRACE_EVENT_INFO, mapinfo: *const EVENT_MAP_INFO, pointersize: u32, propertyintype: u16, propertyouttype: u16, propertylength: u16, userdatalength: u16, userdata: *const u8, buffersize: *mut u32, buffer: super::super::super::Foundation::PWSTR, userdataconsumed: *mut u16) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhFormatProperty(eventinfo: *const TRACE_EVENT_INFO, mapinfo: *const EVENT_MAP_INFO, pointersize: u32, propertyintype: u16, propertyouttype: u16, propertylength: u16, userdatalength: u16, userdata: *const u8, buffersize: *mut u32, buffer: super::super::super::Foundation::PWSTR, userdataconsumed: *mut u16) -> u32; } ::core::mem::transmute(TdhFormatProperty( ::core::mem::transmute(eventinfo), ::core::mem::transmute(mapinfo), ::core::mem::transmute(pointersize), ::core::mem::transmute(propertyintype), ::core::mem::transmute(propertyouttype), ::core::mem::transmute(propertylength), ::core::mem::transmute(userdatalength), ::core::mem::transmute(userdata), ::core::mem::transmute(buffersize), ::core::mem::transmute(buffer), ::core::mem::transmute(userdataconsumed), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhGetDecodingParameter<'a, Param0: ::windows::core::IntoParam<'a, TDH_HANDLE>>(handle: Param0, tdhcontext: *mut TDH_CONTEXT) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhGetDecodingParameter(handle: TDH_HANDLE, tdhcontext: *mut TDH_CONTEXT) -> u32; } ::core::mem::transmute(TdhGetDecodingParameter(handle.into_param().abi(), ::core::mem::transmute(tdhcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhGetEventInformation(event: *const EVENT_RECORD, tdhcontextcount: u32, tdhcontext: *const TDH_CONTEXT, buffer: *mut TRACE_EVENT_INFO, buffersize: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhGetEventInformation(event: *const EVENT_RECORD, tdhcontextcount: u32, tdhcontext: *const TDH_CONTEXT, buffer: *mut TRACE_EVENT_INFO, buffersize: *mut u32) -> u32; } ::core::mem::transmute(TdhGetEventInformation(::core::mem::transmute(event), ::core::mem::transmute(tdhcontextcount), ::core::mem::transmute(tdhcontext), ::core::mem::transmute(buffer), ::core::mem::transmute(buffersize))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn TdhGetEventMapInformation<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(pevent: *const EVENT_RECORD, pmapname: Param1, pbuffer: *mut EVENT_MAP_INFO, pbuffersize: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhGetEventMapInformation(pevent: *const EVENT_RECORD, pmapname: super::super::super::Foundation::PWSTR, pbuffer: *mut EVENT_MAP_INFO, pbuffersize: *mut u32) -> u32; } ::core::mem::transmute(TdhGetEventMapInformation(::core::mem::transmute(pevent), pmapname.into_param().abi(), ::core::mem::transmute(pbuffer), ::core::mem::transmute(pbuffersize))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhGetManifestEventInformation(providerguid: *const ::windows::core::GUID, eventdescriptor: *const EVENT_DESCRIPTOR, buffer: *mut TRACE_EVENT_INFO, buffersize: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhGetManifestEventInformation(providerguid: *const ::windows::core::GUID, eventdescriptor: *const EVENT_DESCRIPTOR, buffer: *mut TRACE_EVENT_INFO, buffersize: *mut u32) -> u32; } ::core::mem::transmute(TdhGetManifestEventInformation(::core::mem::transmute(providerguid), ::core::mem::transmute(eventdescriptor), ::core::mem::transmute(buffer), ::core::mem::transmute(buffersize))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhGetProperty(pevent: *const EVENT_RECORD, tdhcontextcount: u32, ptdhcontext: *const TDH_CONTEXT, propertydatacount: u32, ppropertydata: *const PROPERTY_DATA_DESCRIPTOR, buffersize: u32, pbuffer: *mut u8) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhGetProperty(pevent: *const EVENT_RECORD, tdhcontextcount: u32, ptdhcontext: *const TDH_CONTEXT, propertydatacount: u32, ppropertydata: *const PROPERTY_DATA_DESCRIPTOR, buffersize: u32, pbuffer: *mut u8) -> u32; } ::core::mem::transmute(TdhGetProperty(::core::mem::transmute(pevent), ::core::mem::transmute(tdhcontextcount), ::core::mem::transmute(ptdhcontext), ::core::mem::transmute(propertydatacount), ::core::mem::transmute(ppropertydata), ::core::mem::transmute(buffersize), ::core::mem::transmute(pbuffer))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhGetPropertySize(pevent: *const EVENT_RECORD, tdhcontextcount: u32, ptdhcontext: *const TDH_CONTEXT, propertydatacount: u32, ppropertydata: *const PROPERTY_DATA_DESCRIPTOR, ppropertysize: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhGetPropertySize(pevent: *const EVENT_RECORD, tdhcontextcount: u32, ptdhcontext: *const TDH_CONTEXT, propertydatacount: u32, ppropertydata: *const PROPERTY_DATA_DESCRIPTOR, ppropertysize: *mut u32) -> u32; } ::core::mem::transmute(TdhGetPropertySize(::core::mem::transmute(pevent), ::core::mem::transmute(tdhcontextcount), ::core::mem::transmute(ptdhcontext), ::core::mem::transmute(propertydatacount), ::core::mem::transmute(ppropertydata), ::core::mem::transmute(ppropertysize))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhGetWppMessage<'a, Param0: ::windows::core::IntoParam<'a, TDH_HANDLE>>(handle: Param0, eventrecord: *const EVENT_RECORD, buffersize: *mut u32, buffer: *mut u8) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhGetWppMessage(handle: TDH_HANDLE, eventrecord: *const EVENT_RECORD, buffersize: *mut u32, buffer: *mut u8) -> u32; } ::core::mem::transmute(TdhGetWppMessage(handle.into_param().abi(), ::core::mem::transmute(eventrecord), ::core::mem::transmute(buffersize), ::core::mem::transmute(buffer))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn TdhGetWppProperty<'a, Param0: ::windows::core::IntoParam<'a, TDH_HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(handle: Param0, eventrecord: *const EVENT_RECORD, propertyname: Param2, buffersize: *mut u32, buffer: *mut u8) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhGetWppProperty(handle: TDH_HANDLE, eventrecord: *const EVENT_RECORD, propertyname: super::super::super::Foundation::PWSTR, buffersize: *mut u32, buffer: *mut u8) -> u32; } ::core::mem::transmute(TdhGetWppProperty(handle.into_param().abi(), ::core::mem::transmute(eventrecord), propertyname.into_param().abi(), ::core::mem::transmute(buffersize), ::core::mem::transmute(buffer))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn TdhLoadManifest<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(manifest: Param0) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhLoadManifest(manifest: super::super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(TdhLoadManifest(manifest.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn TdhLoadManifestFromBinary<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(binarypath: Param0) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhLoadManifestFromBinary(binarypath: super::super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(TdhLoadManifestFromBinary(binarypath.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhLoadManifestFromMemory(pdata: *const ::core::ffi::c_void, cbdata: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhLoadManifestFromMemory(pdata: *const ::core::ffi::c_void, cbdata: u32) -> u32; } ::core::mem::transmute(TdhLoadManifestFromMemory(::core::mem::transmute(pdata), ::core::mem::transmute(cbdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhOpenDecodingHandle(handle: *mut TDH_HANDLE) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhOpenDecodingHandle(handle: *mut TDH_HANDLE) -> u32; } ::core::mem::transmute(TdhOpenDecodingHandle(::core::mem::transmute(handle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhQueryProviderFieldInformation(pguid: *const ::windows::core::GUID, eventfieldvalue: u64, eventfieldtype: EVENT_FIELD_TYPE, pbuffer: *mut PROVIDER_FIELD_INFOARRAY, pbuffersize: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhQueryProviderFieldInformation(pguid: *const ::windows::core::GUID, eventfieldvalue: u64, eventfieldtype: EVENT_FIELD_TYPE, pbuffer: *mut PROVIDER_FIELD_INFOARRAY, pbuffersize: *mut u32) -> u32; } ::core::mem::transmute(TdhQueryProviderFieldInformation(::core::mem::transmute(pguid), ::core::mem::transmute(eventfieldvalue), ::core::mem::transmute(eventfieldtype), ::core::mem::transmute(pbuffer), ::core::mem::transmute(pbuffersize))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhSetDecodingParameter<'a, Param0: ::windows::core::IntoParam<'a, TDH_HANDLE>>(handle: Param0, tdhcontext: *const TDH_CONTEXT) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhSetDecodingParameter(handle: TDH_HANDLE, tdhcontext: *const TDH_CONTEXT) -> u32; } ::core::mem::transmute(TdhSetDecodingParameter(handle.into_param().abi(), ::core::mem::transmute(tdhcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn TdhUnloadManifest<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(manifest: Param0) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhUnloadManifest(manifest: super::super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(TdhUnloadManifest(manifest.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TdhUnloadManifestFromMemory(pdata: *const ::core::ffi::c_void, cbdata: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TdhUnloadManifestFromMemory(pdata: *const ::core::ffi::c_void, cbdata: u32) -> u32; } ::core::mem::transmute(TdhUnloadManifestFromMemory(::core::mem::transmute(pdata), ::core::mem::transmute(cbdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TraceEvent(tracehandle: u64, eventtrace: *const EVENT_TRACE_HEADER) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TraceEvent(tracehandle: u64, eventtrace: *const EVENT_TRACE_HEADER) -> u32; } ::core::mem::transmute(TraceEvent(::core::mem::transmute(tracehandle), ::core::mem::transmute(eventtrace))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn TraceEventInstance(tracehandle: u64, eventtrace: *const EVENT_INSTANCE_HEADER, instinfo: *const EVENT_INSTANCE_INFO, parentinstinfo: *const EVENT_INSTANCE_INFO) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TraceEventInstance(tracehandle: u64, eventtrace: *const EVENT_INSTANCE_HEADER, instinfo: *const EVENT_INSTANCE_INFO, parentinstinfo: *const EVENT_INSTANCE_INFO) -> u32; } ::core::mem::transmute(TraceEventInstance(::core::mem::transmute(tracehandle), ::core::mem::transmute(eventtrace), ::core::mem::transmute(instinfo), ::core::mem::transmute(parentinstinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TraceMessage(loggerhandle: u64, messageflags: TRACE_MESSAGE_FLAGS, messageguid: *const ::windows::core::GUID, messagenumber: u16) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TraceMessage(loggerhandle: u64, messageflags: TRACE_MESSAGE_FLAGS, messageguid: *const ::windows::core::GUID, messagenumber: u16) -> u32; } ::core::mem::transmute(TraceMessage(::core::mem::transmute(loggerhandle), ::core::mem::transmute(messageflags), ::core::mem::transmute(messageguid), ::core::mem::transmute(messagenumber))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TraceMessageVa(loggerhandle: u64, messageflags: TRACE_MESSAGE_FLAGS, messageguid: *const ::windows::core::GUID, messagenumber: u16, messagearglist: *const i8) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TraceMessageVa(loggerhandle: u64, messageflags: TRACE_MESSAGE_FLAGS, messageguid: *const ::windows::core::GUID, messagenumber: u16, messagearglist: *const i8) -> u32; } ::core::mem::transmute(TraceMessageVa(::core::mem::transmute(loggerhandle), ::core::mem::transmute(messageflags), ::core::mem::transmute(messageguid), ::core::mem::transmute(messagenumber), ::core::mem::transmute(messagearglist))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TraceQueryInformation(sessionhandle: u64, informationclass: TRACE_QUERY_INFO_CLASS, traceinformation: *mut ::core::ffi::c_void, informationlength: u32, returnlength: *mut u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TraceQueryInformation(sessionhandle: u64, informationclass: TRACE_QUERY_INFO_CLASS, traceinformation: *mut ::core::ffi::c_void, informationlength: u32, returnlength: *mut u32) -> u32; } ::core::mem::transmute(TraceQueryInformation(::core::mem::transmute(sessionhandle), ::core::mem::transmute(informationclass), ::core::mem::transmute(traceinformation), ::core::mem::transmute(informationlength), ::core::mem::transmute(returnlength))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TraceSetInformation(sessionhandle: u64, informationclass: TRACE_QUERY_INFO_CLASS, traceinformation: *const ::core::ffi::c_void, informationlength: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TraceSetInformation(sessionhandle: u64, informationclass: TRACE_QUERY_INFO_CLASS, traceinformation: *const ::core::ffi::c_void, informationlength: u32) -> u32; } ::core::mem::transmute(TraceSetInformation(::core::mem::transmute(sessionhandle), ::core::mem::transmute(informationclass), ::core::mem::transmute(traceinformation), ::core::mem::transmute(informationlength))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn UnregisterTraceGuids(registrationhandle: u64) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn UnregisterTraceGuids(registrationhandle: u64) -> u32; } ::core::mem::transmute(UnregisterTraceGuids(::core::mem::transmute(registrationhandle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn UpdateTraceA<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PSTR>>(tracehandle: u64, instancename: Param1, properties: *mut EVENT_TRACE_PROPERTIES) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn UpdateTraceA(tracehandle: u64, instancename: super::super::super::Foundation::PSTR, properties: *mut EVENT_TRACE_PROPERTIES) -> u32; } ::core::mem::transmute(UpdateTraceA(::core::mem::transmute(tracehandle), instancename.into_param().abi(), ::core::mem::transmute(properties))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn UpdateTraceW<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::PWSTR>>(tracehandle: u64, instancename: Param1, properties: *mut EVENT_TRACE_PROPERTIES) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn UpdateTraceW(tracehandle: u64, instancename: super::super::super::Foundation::PWSTR, properties: *mut EVENT_TRACE_PROPERTIES) -> u32; } ::core::mem::transmute(UpdateTraceW(::core::mem::transmute(tracehandle), instancename.into_param().abi(), ::core::mem::transmute(properties))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub type WMIDPREQUEST = unsafe extern "system" fn(requestcode: WMIDPREQUESTCODE, requestcontext: *const ::core::ffi::c_void, buffersize: *mut u32, buffer: *mut ::core::ffi::c_void) -> u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct WMIDPREQUESTCODE(pub i32); pub const WMI_GET_ALL_DATA: WMIDPREQUESTCODE = WMIDPREQUESTCODE(0i32); pub const WMI_GET_SINGLE_INSTANCE: WMIDPREQUESTCODE = WMIDPREQUESTCODE(1i32); pub const WMI_SET_SINGLE_INSTANCE: WMIDPREQUESTCODE = WMIDPREQUESTCODE(2i32); pub const WMI_SET_SINGLE_ITEM: WMIDPREQUESTCODE = WMIDPREQUESTCODE(3i32); pub const WMI_ENABLE_EVENTS: WMIDPREQUESTCODE = WMIDPREQUESTCODE(4i32); pub const WMI_DISABLE_EVENTS: WMIDPREQUESTCODE = WMIDPREQUESTCODE(5i32); pub const WMI_ENABLE_COLLECTION: WMIDPREQUESTCODE = WMIDPREQUESTCODE(6i32); pub const WMI_DISABLE_COLLECTION: WMIDPREQUESTCODE = WMIDPREQUESTCODE(7i32); pub const WMI_REGINFO: WMIDPREQUESTCODE = WMIDPREQUESTCODE(8i32); pub const WMI_EXECUTE_METHOD: WMIDPREQUESTCODE = WMIDPREQUESTCODE(9i32); pub const WMI_CAPTURE_STATE: WMIDPREQUESTCODE = WMIDPREQUESTCODE(10i32); impl ::core::convert::From<i32> for WMIDPREQUESTCODE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WMIDPREQUESTCODE { type Abi = Self; } pub const WMIGUID_EXECUTE: u32 = 16u32; pub const WMIGUID_NOTIFICATION: u32 = 4u32; pub const WMIGUID_QUERY: u32 = 1u32; pub const WMIGUID_READ_DESCRIPTION: u32 = 8u32; pub const WMIGUID_SET: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct WMIREGGUIDW { pub Guid: ::windows::core::GUID, pub Flags: u32, pub InstanceCount: u32, pub Anonymous: WMIREGGUIDW_0, } impl WMIREGGUIDW {} impl ::core::default::Default for WMIREGGUIDW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for WMIREGGUIDW { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for WMIREGGUIDW {} unsafe impl ::windows::core::Abi for WMIREGGUIDW { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union WMIREGGUIDW_0 { pub InstanceNameList: u32, pub BaseNameOffset: u32, pub Pdo: usize, pub InstanceInfo: usize, } impl WMIREGGUIDW_0 {} impl ::core::default::Default for WMIREGGUIDW_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for WMIREGGUIDW_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for WMIREGGUIDW_0 {} unsafe impl ::windows::core::Abi for WMIREGGUIDW_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct WMIREGINFOW { pub BufferSize: u32, pub NextWmiRegInfo: u32, pub RegistryPath: u32, pub MofResourceName: u32, pub GuidCount: u32, pub WmiRegGuid: [WMIREGGUIDW; 1], } impl WMIREGINFOW {} impl ::core::default::Default for WMIREGINFOW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for WMIREGINFOW { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for WMIREGINFOW {} unsafe impl ::windows::core::Abi for WMIREGINFOW { type Abi = Self; } pub const WMIREG_FLAG_EVENT_ONLY_GUID: u32 = 64u32; pub const WMIREG_FLAG_EXPENSIVE: u32 = 1u32; pub const WMIREG_FLAG_INSTANCE_BASENAME: u32 = 8u32; pub const WMIREG_FLAG_INSTANCE_LIST: u32 = 4u32; pub const WMIREG_FLAG_INSTANCE_PDO: u32 = 32u32; pub const WMIREG_FLAG_REMOVE_GUID: u32 = 65536u32; pub const WMIREG_FLAG_RESERVED1: u32 = 131072u32; pub const WMIREG_FLAG_RESERVED2: u32 = 262144u32; pub const WMIREG_FLAG_TRACED_GUID: u32 = 524288u32; pub const WMIREG_FLAG_TRACE_CONTROL_GUID: u32 = 4096u32; pub const WMI_GLOBAL_LOGGER_ID: u32 = 1u32; pub const WMI_GUIDTYPE_DATA: u32 = 2u32; pub const WMI_GUIDTYPE_EVENT: u32 = 3u32; pub const WMI_GUIDTYPE_TRACE: u32 = 1u32; pub const WMI_GUIDTYPE_TRACECONTROL: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct WNODE_ALL_DATA { pub WnodeHeader: WNODE_HEADER, pub DataBlockOffset: u32, pub InstanceCount: u32, pub OffsetInstanceNameOffsets: u32, pub Anonymous: WNODE_ALL_DATA_0, } #[cfg(feature = "Win32_Foundation")] impl WNODE_ALL_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_ALL_DATA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_ALL_DATA { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_ALL_DATA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_ALL_DATA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union WNODE_ALL_DATA_0 { pub FixedInstanceSize: u32, pub OffsetInstanceDataAndLength: [OFFSETINSTANCEDATAANDLENGTH; 1], } #[cfg(feature = "Win32_Foundation")] impl WNODE_ALL_DATA_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_ALL_DATA_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_ALL_DATA_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_ALL_DATA_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_ALL_DATA_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct WNODE_EVENT_ITEM { pub WnodeHeader: WNODE_HEADER, } #[cfg(feature = "Win32_Foundation")] impl WNODE_EVENT_ITEM {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_EVENT_ITEM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_EVENT_ITEM { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_EVENT_ITEM {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_EVENT_ITEM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct WNODE_EVENT_REFERENCE { pub WnodeHeader: WNODE_HEADER, pub TargetGuid: ::windows::core::GUID, pub TargetDataBlockSize: u32, pub Anonymous: WNODE_EVENT_REFERENCE_0, } #[cfg(feature = "Win32_Foundation")] impl WNODE_EVENT_REFERENCE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_EVENT_REFERENCE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_EVENT_REFERENCE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_EVENT_REFERENCE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_EVENT_REFERENCE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union WNODE_EVENT_REFERENCE_0 { pub TargetInstanceIndex: u32, pub TargetInstanceName: [u16; 1], } #[cfg(feature = "Win32_Foundation")] impl WNODE_EVENT_REFERENCE_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_EVENT_REFERENCE_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_EVENT_REFERENCE_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_EVENT_REFERENCE_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_EVENT_REFERENCE_0 { type Abi = Self; } pub const WNODE_FLAG_ALL_DATA: u32 = 1u32; pub const WNODE_FLAG_ANSI_INSTANCENAMES: u32 = 16384u32; pub const WNODE_FLAG_EVENT_ITEM: u32 = 8u32; pub const WNODE_FLAG_EVENT_REFERENCE: u32 = 8192u32; pub const WNODE_FLAG_FIXED_INSTANCE_SIZE: u32 = 16u32; pub const WNODE_FLAG_INSTANCES_SAME: u32 = 64u32; pub const WNODE_FLAG_INTERNAL: u32 = 256u32; pub const WNODE_FLAG_LOG_WNODE: u32 = 262144u32; pub const WNODE_FLAG_METHOD_ITEM: u32 = 32768u32; pub const WNODE_FLAG_NO_HEADER: u32 = 2097152u32; pub const WNODE_FLAG_PDO_INSTANCE_NAMES: u32 = 65536u32; pub const WNODE_FLAG_PERSIST_EVENT: u32 = 1024u32; pub const WNODE_FLAG_SEND_DATA_BLOCK: u32 = 4194304u32; pub const WNODE_FLAG_SEVERITY_MASK: u32 = 4278190080u32; pub const WNODE_FLAG_SINGLE_INSTANCE: u32 = 2u32; pub const WNODE_FLAG_SINGLE_ITEM: u32 = 4u32; pub const WNODE_FLAG_STATIC_INSTANCE_NAMES: u32 = 128u32; pub const WNODE_FLAG_TOO_SMALL: u32 = 32u32; pub const WNODE_FLAG_TRACED_GUID: u32 = 131072u32; pub const WNODE_FLAG_USE_GUID_PTR: u32 = 524288u32; pub const WNODE_FLAG_USE_MOF_PTR: u32 = 1048576u32; pub const WNODE_FLAG_USE_TIMESTAMP: u32 = 512u32; pub const WNODE_FLAG_VERSIONED_PROPERTIES: u32 = 8388608u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct WNODE_HEADER { pub BufferSize: u32, pub ProviderId: u32, pub Anonymous1: WNODE_HEADER_0, pub Anonymous2: WNODE_HEADER_1, pub Guid: ::windows::core::GUID, pub ClientContext: u32, pub Flags: u32, } #[cfg(feature = "Win32_Foundation")] impl WNODE_HEADER {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_HEADER { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_HEADER {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_HEADER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union WNODE_HEADER_0 { pub HistoricalContext: u64, pub Anonymous: WNODE_HEADER_0_0, } #[cfg(feature = "Win32_Foundation")] impl WNODE_HEADER_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_HEADER_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_HEADER_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_HEADER_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_HEADER_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct WNODE_HEADER_0_0 { pub Version: u32, pub Linkage: u32, } #[cfg(feature = "Win32_Foundation")] impl WNODE_HEADER_0_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_HEADER_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for WNODE_HEADER_0_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("Version", &self.Version).field("Linkage", &self.Linkage).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_HEADER_0_0 { fn eq(&self, other: &Self) -> bool { self.Version == other.Version && self.Linkage == other.Linkage } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_HEADER_0_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_HEADER_0_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union WNODE_HEADER_1 { pub CountLost: u32, pub KernelHandle: super::super::super::Foundation::HANDLE, pub TimeStamp: i64, } #[cfg(feature = "Win32_Foundation")] impl WNODE_HEADER_1 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_HEADER_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_HEADER_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_HEADER_1 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_HEADER_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct WNODE_METHOD_ITEM { pub WnodeHeader: WNODE_HEADER, pub OffsetInstanceName: u32, pub InstanceIndex: u32, pub MethodId: u32, pub DataBlockOffset: u32, pub SizeDataBlock: u32, pub VariableData: [u8; 1], } #[cfg(feature = "Win32_Foundation")] impl WNODE_METHOD_ITEM {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_METHOD_ITEM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_METHOD_ITEM { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_METHOD_ITEM {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_METHOD_ITEM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct WNODE_SINGLE_INSTANCE { pub WnodeHeader: WNODE_HEADER, pub OffsetInstanceName: u32, pub InstanceIndex: u32, pub DataBlockOffset: u32, pub SizeDataBlock: u32, pub VariableData: [u8; 1], } #[cfg(feature = "Win32_Foundation")] impl WNODE_SINGLE_INSTANCE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_SINGLE_INSTANCE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_SINGLE_INSTANCE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_SINGLE_INSTANCE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_SINGLE_INSTANCE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct WNODE_SINGLE_ITEM { pub WnodeHeader: WNODE_HEADER, pub OffsetInstanceName: u32, pub InstanceIndex: u32, pub ItemId: u32, pub DataBlockOffset: u32, pub SizeDataItem: u32, pub VariableData: [u8; 1], } #[cfg(feature = "Win32_Foundation")] impl WNODE_SINGLE_ITEM {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_SINGLE_ITEM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_SINGLE_ITEM { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_SINGLE_ITEM {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_SINGLE_ITEM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct WNODE_TOO_SMALL { pub WnodeHeader: WNODE_HEADER, pub SizeNeeded: u32, } #[cfg(feature = "Win32_Foundation")] impl WNODE_TOO_SMALL {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for WNODE_TOO_SMALL { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for WNODE_TOO_SMALL { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for WNODE_TOO_SMALL {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for WNODE_TOO_SMALL { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct _TDH_IN_TYPE(pub i32); pub const TDH_INTYPE_NULL: _TDH_IN_TYPE = _TDH_IN_TYPE(0i32); pub const TDH_INTYPE_UNICODESTRING: _TDH_IN_TYPE = _TDH_IN_TYPE(1i32); pub const TDH_INTYPE_ANSISTRING: _TDH_IN_TYPE = _TDH_IN_TYPE(2i32); pub const TDH_INTYPE_INT8: _TDH_IN_TYPE = _TDH_IN_TYPE(3i32); pub const TDH_INTYPE_UINT8: _TDH_IN_TYPE = _TDH_IN_TYPE(4i32); pub const TDH_INTYPE_INT16: _TDH_IN_TYPE = _TDH_IN_TYPE(5i32); pub const TDH_INTYPE_UINT16: _TDH_IN_TYPE = _TDH_IN_TYPE(6i32); pub const TDH_INTYPE_INT32: _TDH_IN_TYPE = _TDH_IN_TYPE(7i32); pub const TDH_INTYPE_UINT32: _TDH_IN_TYPE = _TDH_IN_TYPE(8i32); pub const TDH_INTYPE_INT64: _TDH_IN_TYPE = _TDH_IN_TYPE(9i32); pub const TDH_INTYPE_UINT64: _TDH_IN_TYPE = _TDH_IN_TYPE(10i32); pub const TDH_INTYPE_FLOAT: _TDH_IN_TYPE = _TDH_IN_TYPE(11i32); pub const TDH_INTYPE_DOUBLE: _TDH_IN_TYPE = _TDH_IN_TYPE(12i32); pub const TDH_INTYPE_BOOLEAN: _TDH_IN_TYPE = _TDH_IN_TYPE(13i32); pub const TDH_INTYPE_BINARY: _TDH_IN_TYPE = _TDH_IN_TYPE(14i32); pub const TDH_INTYPE_GUID: _TDH_IN_TYPE = _TDH_IN_TYPE(15i32); pub const TDH_INTYPE_POINTER: _TDH_IN_TYPE = _TDH_IN_TYPE(16i32); pub const TDH_INTYPE_FILETIME: _TDH_IN_TYPE = _TDH_IN_TYPE(17i32); pub const TDH_INTYPE_SYSTEMTIME: _TDH_IN_TYPE = _TDH_IN_TYPE(18i32); pub const TDH_INTYPE_SID: _TDH_IN_TYPE = _TDH_IN_TYPE(19i32); pub const TDH_INTYPE_HEXINT32: _TDH_IN_TYPE = _TDH_IN_TYPE(20i32); pub const TDH_INTYPE_HEXINT64: _TDH_IN_TYPE = _TDH_IN_TYPE(21i32); pub const TDH_INTYPE_MANIFEST_COUNTEDSTRING: _TDH_IN_TYPE = _TDH_IN_TYPE(22i32); pub const TDH_INTYPE_MANIFEST_COUNTEDANSISTRING: _TDH_IN_TYPE = _TDH_IN_TYPE(23i32); pub const TDH_INTYPE_RESERVED24: _TDH_IN_TYPE = _TDH_IN_TYPE(24i32); pub const TDH_INTYPE_MANIFEST_COUNTEDBINARY: _TDH_IN_TYPE = _TDH_IN_TYPE(25i32); pub const TDH_INTYPE_COUNTEDSTRING: _TDH_IN_TYPE = _TDH_IN_TYPE(300i32); pub const TDH_INTYPE_COUNTEDANSISTRING: _TDH_IN_TYPE = _TDH_IN_TYPE(301i32); pub const TDH_INTYPE_REVERSEDCOUNTEDSTRING: _TDH_IN_TYPE = _TDH_IN_TYPE(302i32); pub const TDH_INTYPE_REVERSEDCOUNTEDANSISTRING: _TDH_IN_TYPE = _TDH_IN_TYPE(303i32); pub const TDH_INTYPE_NONNULLTERMINATEDSTRING: _TDH_IN_TYPE = _TDH_IN_TYPE(304i32); pub const TDH_INTYPE_NONNULLTERMINATEDANSISTRING: _TDH_IN_TYPE = _TDH_IN_TYPE(305i32); pub const TDH_INTYPE_UNICODECHAR: _TDH_IN_TYPE = _TDH_IN_TYPE(306i32); pub const TDH_INTYPE_ANSICHAR: _TDH_IN_TYPE = _TDH_IN_TYPE(307i32); pub const TDH_INTYPE_SIZET: _TDH_IN_TYPE = _TDH_IN_TYPE(308i32); pub const TDH_INTYPE_HEXDUMP: _TDH_IN_TYPE = _TDH_IN_TYPE(309i32); pub const TDH_INTYPE_WBEMSID: _TDH_IN_TYPE = _TDH_IN_TYPE(310i32); impl ::core::convert::From<i32> for _TDH_IN_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for _TDH_IN_TYPE { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct _TDH_OUT_TYPE(pub i32); pub const TDH_OUTTYPE_NULL: _TDH_OUT_TYPE = _TDH_OUT_TYPE(0i32); pub const TDH_OUTTYPE_STRING: _TDH_OUT_TYPE = _TDH_OUT_TYPE(1i32); pub const TDH_OUTTYPE_DATETIME: _TDH_OUT_TYPE = _TDH_OUT_TYPE(2i32); pub const TDH_OUTTYPE_BYTE: _TDH_OUT_TYPE = _TDH_OUT_TYPE(3i32); pub const TDH_OUTTYPE_UNSIGNEDBYTE: _TDH_OUT_TYPE = _TDH_OUT_TYPE(4i32); pub const TDH_OUTTYPE_SHORT: _TDH_OUT_TYPE = _TDH_OUT_TYPE(5i32); pub const TDH_OUTTYPE_UNSIGNEDSHORT: _TDH_OUT_TYPE = _TDH_OUT_TYPE(6i32); pub const TDH_OUTTYPE_INT: _TDH_OUT_TYPE = _TDH_OUT_TYPE(7i32); pub const TDH_OUTTYPE_UNSIGNEDINT: _TDH_OUT_TYPE = _TDH_OUT_TYPE(8i32); pub const TDH_OUTTYPE_LONG: _TDH_OUT_TYPE = _TDH_OUT_TYPE(9i32); pub const TDH_OUTTYPE_UNSIGNEDLONG: _TDH_OUT_TYPE = _TDH_OUT_TYPE(10i32); pub const TDH_OUTTYPE_FLOAT: _TDH_OUT_TYPE = _TDH_OUT_TYPE(11i32); pub const TDH_OUTTYPE_DOUBLE: _TDH_OUT_TYPE = _TDH_OUT_TYPE(12i32); pub const TDH_OUTTYPE_BOOLEAN: _TDH_OUT_TYPE = _TDH_OUT_TYPE(13i32); pub const TDH_OUTTYPE_GUID: _TDH_OUT_TYPE = _TDH_OUT_TYPE(14i32); pub const TDH_OUTTYPE_HEXBINARY: _TDH_OUT_TYPE = _TDH_OUT_TYPE(15i32); pub const TDH_OUTTYPE_HEXINT8: _TDH_OUT_TYPE = _TDH_OUT_TYPE(16i32); pub const TDH_OUTTYPE_HEXINT16: _TDH_OUT_TYPE = _TDH_OUT_TYPE(17i32); pub const TDH_OUTTYPE_HEXINT32: _TDH_OUT_TYPE = _TDH_OUT_TYPE(18i32); pub const TDH_OUTTYPE_HEXINT64: _TDH_OUT_TYPE = _TDH_OUT_TYPE(19i32); pub const TDH_OUTTYPE_PID: _TDH_OUT_TYPE = _TDH_OUT_TYPE(20i32); pub const TDH_OUTTYPE_TID: _TDH_OUT_TYPE = _TDH_OUT_TYPE(21i32); pub const TDH_OUTTYPE_PORT: _TDH_OUT_TYPE = _TDH_OUT_TYPE(22i32); pub const TDH_OUTTYPE_IPV4: _TDH_OUT_TYPE = _TDH_OUT_TYPE(23i32); pub const TDH_OUTTYPE_IPV6: _TDH_OUT_TYPE = _TDH_OUT_TYPE(24i32); pub const TDH_OUTTYPE_SOCKETADDRESS: _TDH_OUT_TYPE = _TDH_OUT_TYPE(25i32); pub const TDH_OUTTYPE_CIMDATETIME: _TDH_OUT_TYPE = _TDH_OUT_TYPE(26i32); pub const TDH_OUTTYPE_ETWTIME: _TDH_OUT_TYPE = _TDH_OUT_TYPE(27i32); pub const TDH_OUTTYPE_XML: _TDH_OUT_TYPE = _TDH_OUT_TYPE(28i32); pub const TDH_OUTTYPE_ERRORCODE: _TDH_OUT_TYPE = _TDH_OUT_TYPE(29i32); pub const TDH_OUTTYPE_WIN32ERROR: _TDH_OUT_TYPE = _TDH_OUT_TYPE(30i32); pub const TDH_OUTTYPE_NTSTATUS: _TDH_OUT_TYPE = _TDH_OUT_TYPE(31i32); pub const TDH_OUTTYPE_HRESULT: _TDH_OUT_TYPE = _TDH_OUT_TYPE(32i32); pub const TDH_OUTTYPE_CULTURE_INSENSITIVE_DATETIME: _TDH_OUT_TYPE = _TDH_OUT_TYPE(33i32); pub const TDH_OUTTYPE_JSON: _TDH_OUT_TYPE = _TDH_OUT_TYPE(34i32); pub const TDH_OUTTYPE_UTF8: _TDH_OUT_TYPE = _TDH_OUT_TYPE(35i32); pub const TDH_OUTTYPE_PKCS7_WITH_TYPE_INFO: _TDH_OUT_TYPE = _TDH_OUT_TYPE(36i32); pub const TDH_OUTTYPE_CODE_POINTER: _TDH_OUT_TYPE = _TDH_OUT_TYPE(37i32); pub const TDH_OUTTYPE_DATETIME_UTC: _TDH_OUT_TYPE = _TDH_OUT_TYPE(38i32); pub const TDH_OUTTYPE_REDUCEDSTRING: _TDH_OUT_TYPE = _TDH_OUT_TYPE(300i32); pub const TDH_OUTTYPE_NOPRINT: _TDH_OUT_TYPE = _TDH_OUT_TYPE(301i32); impl ::core::convert::From<i32> for _TDH_OUT_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for _TDH_OUT_TYPE { type Abi = Self; }
use std::{path::PathBuf, process::Command}; pub fn main() { set_casm_compiler_version(); } #[derive(serde::Deserialize)] struct CargoMetadata { pub packages: Vec<Package>, } #[derive(serde::Deserialize)] struct Package { pub name: String, pub id: String, } fn set_casm_compiler_version() { let manifest_path = PathBuf::from( std::env::var_os("CARGO_MANIFEST_DIR") .ok_or_else(|| std::io::Error::new(std::io::ErrorKind::NotFound, "CARGO_MANIFEST_DIR")) .unwrap(), ) .join("Cargo.toml"); let cargo_args = [ "metadata", "--locked", "--format-version=1", "--manifest-path", manifest_path.to_str().unwrap(), ]; let cargo_binary = std::env::var("CARGO").unwrap(); let cargo_output = Command::new(cargo_binary) .args(cargo_args) .output() .unwrap(); let metadata = serde_json::from_slice::<CargoMetadata>(&cargo_output.stdout).unwrap_or_else(|_| { panic!( "{}", std::str::from_utf8(&cargo_output.stderr) .unwrap() .to_string() ) }); let sierra_compiler_package = metadata .packages .iter() .find(|p| p.name == "cairo-lang-starknet") .expect("cairo-lang-starknet should be a dependency"); // We use the `id` here because `version` might not be unique (for example when using the compiler // package from a Git repository). println!( "cargo:rustc-env=SIERRA_CASM_COMPILER_VERSION={}", sierra_compiler_package.id ); }
use input_i_scanner::InputIScanner; fn main() { let stdin = std::io::stdin(); let mut _i_i = InputIScanner::from(stdin.lock()); macro_rules! scan { (($($t: ty),+)) => { ($(scan!($t)),+) }; ($t: ty) => { _i_i.scan::<$t>() as $t }; (($($t: ty),+); $n: expr) => { std::iter::repeat_with(|| scan!(($($t),+))).take($n).collect::<Vec<_>>() }; ($t: ty; $n: expr) => { std::iter::repeat_with(|| scan!($t)).take($n).collect::<Vec<_>>() }; } // for n in 0..=100 { // eprintln!("{} {}", n, (0..=n).fold(0, |acc, x| acc ^ x)); // } let (a, b) = scan!((u64, u64)); let mut ans = f(b); if a >= 1 { ans ^= f(a - 1); } println!("{}", ans); } fn f(n: u64) -> u64 { match n % 4 { 0 => n, 1 => 1, 2 => n + 1, 3 => 0, _ => unreachable!(), } }
use crate::{DocBase, VarType}; const DESCRIPTION: &'static str = r#" Fills background between two plots or hlines with a given color. "#; const EXAMPLES: &'static str = r#" ```pine h1 = hline(20) h2 = hline(10) fill(h1, h2) p1 = plot(open) p2 = plot(close) fill(p1, p2, color=color.green) ``` "#; const ARGUMENTS: &'static str = r#" **hline1 (hline)** The first hline object. Required argument. **hline2 (hline)** The second hline object. Required argument. **plot1 (plot)** The first plot object. Required argument. **plot2 (plot)** The second plot object. Required argument. **color (color)** Color of the plot. You can use constants like `color=color.red` or `color=#ff001a` as well as complex expressions like `color = close >= open ? color.green : color.red`. Optional argument. **opacity (int)** Transparency of the filled background. Possible values are from 0 (not transparent) to 100 (invisible). Optional argument. **title (string)** Title of the created fill object. Optional argument. "#; pub fn gen_doc() -> Vec<DocBase> { let fn_doc = DocBase { var_type: VarType::Function, name: "fill", signatures: vec![], description: DESCRIPTION, example: EXAMPLES, returns: "", arguments: ARGUMENTS, remarks: "", links: "[plot](#fun-plot) [hline](#fun-hline)", }; vec![fn_doc] }
use crate::ai::AI; use std::process::{Command, Stdio, Child}; use std::io::Write; use std::io::Read; pub struct PipeAI { process: Child, } impl AI for PipeAI { fn get_move(&mut self, last_move: i64) -> i64 { let to_send = last_move.to_string() + "\r\n"; match self.process.stdin.as_mut().unwrap().write(to_send.as_bytes()) { Err(why) => panic!("couldn't write to AI: {}", why), Ok(_) => (), } self.process.stdin.as_mut().unwrap().flush().unwrap(); //println!("sent {} successfully", to_send); let mut res_vec : Vec<u8> = vec![32; 100]; match self.process.stdout.as_mut().unwrap().read(&mut res_vec[..]) { Err(_) => panic!("couldn't read from AI:"), Ok(_) => (), }; let untrimmed_response = String::from_utf8(res_vec).unwrap(); let response = untrimmed_response.trim(); //println!("received {} successfully", response); return match response.parse::<i64>() { Err(_) => -1, Ok(t) => t, } } fn cleanup(&mut self) { unsafe { self.process.kill(); } } } impl PipeAI { pub fn new(cmd: String, args: Vec<String>) -> PipeAI { PipeAI { process: match Command::new(cmd.clone()) .stdin(Stdio::piped()) .stdout(Stdio::piped()) .args(&args[..]) .spawn() { Err(why) => panic!("couldn't spawn {}: {:?}", cmd, why), Ok(process) => process, }, } } }
//! Handles configuration of the game use piston::input; use serde_derive::{Deserialize, Serialize}; use std::{collections::BTreeMap, env, fmt, fs, io, path}; mod serde_buffer_size; mod serde_key_bindings; /// Holds all the configuration values relevant to the gameplay itself, such as like skin /// paths or key bindings. #[derive(Serialize, Deserialize, Debug, Clone)] struct UnverifiedGameConfig { /// Timing offset, in seconds. Applies to visual and timing judgement. Positive means you have /// to hit later, and vice versa. offset: f64, scroll_speed: f64, default_osu_skin_path: path::PathBuf, current_skin: String, current_judge: String, osu_hitsound_enable: bool, skins: BTreeMap<String, SkinEntry>, judges: BTreeMap<String, Judge>, #[serde(with = "serde_key_bindings")] key_bindings: [input::Button; 7], } #[derive(Clone, Debug)] pub struct GameConfig { /// Timing offset, in seconds. Applies to visual and timing judgement. Positive means you have /// to hit later, and vice versa. pub offset: f64, pub scroll_speed: f64, pub default_osu_skin_path: path::PathBuf, /// An index into the `skins` field current_skin_index: usize, /// An index into the `judges` field current_judge_index: usize, /// Osu mania has two types of sounds: hitsounds and keysounds. Keysounds are sounds that are /// supposed to make up part of the music e.g. piano notes. Hitsounds are sounds that aren't /// part of the music, but are meant to provide audio feedback, like a drum kick or whistle. I /// don't know if there are any maps that put the keysounds where the hitsounds are supposed to /// be, so this setting is here. pub osu_hitsound_enable: bool, pub skins: Vec<(String, SkinEntry)>, pub judges: Vec<(String, Judge)>, pub key_bindings: [input::Button; 7], } #[derive(Copy, Clone, Debug)] pub enum GameConfigVerifyError { BadCurrentSkin, BadCurrentJudge, } impl UnverifiedGameConfig { fn verify(self) -> Result<GameConfig, GameConfigVerifyError> { let mut skins: Vec<(String, SkinEntry)> = self.skins.into_iter().collect(); let mut judges: Vec<(String, Judge)> = self.judges.into_iter().collect(); skins.sort_unstable_by(|a, b| a.0.cmp(&b.0)); judges.sort_unstable_by(|a, b| a.0.cmp(&b.0)); let current_skin: String = self.current_skin; let current_judge: String = self.current_judge; Ok(GameConfig { offset: self.offset, scroll_speed: self.scroll_speed, default_osu_skin_path: self.default_osu_skin_path, current_skin_index: skins .binary_search_by_key(&&current_skin, |v| &v.0) .map_err(|_| GameConfigVerifyError::BadCurrentSkin)?, current_judge_index: judges .binary_search_by_key(&&current_judge, |v| &v.0) .map_err(|_| GameConfigVerifyError::BadCurrentJudge)?, osu_hitsound_enable: self.osu_hitsound_enable, skins, judges, key_bindings: self.key_bindings, }) } } impl From<GameConfig> for UnverifiedGameConfig { fn from(game_config: GameConfig) -> Self { UnverifiedGameConfig { current_skin: game_config.current_skin().0.clone(), current_judge: game_config.current_judge().0.clone(), offset: game_config.offset, scroll_speed: game_config.scroll_speed, default_osu_skin_path: game_config.default_osu_skin_path, osu_hitsound_enable: game_config.osu_hitsound_enable, skins: game_config.skins.into_iter().collect(), judges: game_config.judges.into_iter().collect(), key_bindings: game_config.key_bindings, } } } impl GameConfig { /// The string is the name of the skin pub fn current_skin(&self) -> &(String, SkinEntry) { &self.skins[self.current_skin_index] } /// The string is the name of the judge pub fn current_judge(&self) -> &(String, Judge) { &self.judges[self.current_judge_index] } } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Judge { pub miss_tolerance: f64, pub windows: Vec<[f64; 2]>, } #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(tag = "type", content = "path", rename_all = "lowercase")] pub enum SkinEntry { Osu(path::PathBuf), O2Jam(path::PathBuf), } #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GeneralConfig { pub resolution: [u32; 2], #[serde(with = "serde_buffer_size")] pub audio_buffer_size: cpal::BufferSize, pub chart_path: Vec<ChartPath>, } #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(tag = "type", content = "path", rename_all = "lowercase")] pub enum ChartPath { Osu(path::PathBuf), O2Jam(path::PathBuf), } #[derive(Serialize, Deserialize, Debug, Clone)] struct UnverifiedConfig { general: GeneralConfig, game: UnverifiedGameConfig, } #[derive(Debug, Clone)] pub struct Config { pub general: GeneralConfig, pub game: GameConfig, } impl From<Config> for UnverifiedConfig { fn from(c: Config) -> Self { UnverifiedConfig { general: c.general, game: c.game.into(), } } } #[derive(Debug)] pub enum ConfigReadError { /// An error in the toml formatting Toml(toml::de::Error), /// An error somewhere in file IO Io(io::Error), /// An error in the values of the config ConfigError(GameConfigVerifyError), } impl From<io::Error> for ConfigReadError { fn from(t: io::Error) -> Self { ConfigReadError::Io(t) } } impl From<toml::de::Error> for ConfigReadError { fn from(t: toml::de::Error) -> Self { ConfigReadError::Toml(t) } } impl From<GameConfigVerifyError> for ConfigReadError { fn from(t: GameConfigVerifyError) -> Self { ConfigReadError::ConfigError(t) } } impl fmt::Display for ConfigReadError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { ConfigReadError::Toml(e) => write!(f, "Formatting error: {}", e), ConfigReadError::Io(e) => write!(f, "IO error: {}", e), ConfigReadError::ConfigError(e) => write!(f, "Config error: {:?}", e), } } } /// Load configuration from a file except that part isn't implemented yet. fn read_config_from_path<P: AsRef<path::Path>>(config_file_path: P) -> Result<Config, ConfigReadError> { let file_data = fs::read(config_file_path)?; let config = toml::from_slice::<UnverifiedConfig>(&file_data)?; Ok(Config { general: config.general, game: config.game.verify()?, }) } pub fn get_config<P: AsRef<path::Path>>(config_file_path: P) -> Config { match read_config_from_path(config_file_path.as_ref()) { Ok(c) => c, Err(e) => { remani_warn!("Error reading from {}: {}", config_file_path.as_ref().display(), e); remani_warn!("Using default config"); default_config() } } } #[derive(Debug)] pub enum ConfigWriteError { Io(io::Error), Toml(toml::ser::Error), } impl fmt::Display for ConfigWriteError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { match self { ConfigWriteError::Io(e) => write!(f, "{}", e), ConfigWriteError::Toml(e) => write!(f, "{}", e), } } } impl std::error::Error for ConfigWriteError { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { match self { ConfigWriteError::Io(e) => Some(e), ConfigWriteError::Toml(e) => Some(e), } } } impl From<toml::ser::Error> for ConfigWriteError { fn from(t: toml::ser::Error) -> Self { ConfigWriteError::Toml(t) } } impl From<io::Error> for ConfigWriteError { fn from(t: io::Error) -> Self { ConfigWriteError::Io(t) } } pub fn write_config_to_path<P: AsRef<path::Path>>(config: Config, path: P) -> Result<(), ConfigWriteError> { use std::io::Write; let path = path.as_ref(); match path.parent() { Some(p) => std::fs::create_dir_all(p)?, None => (), } let mut file = fs::File::create(path)?; file.write(toml::ser::to_string(&UnverifiedConfig::from(config))?.as_bytes())?; Ok(()) } /// Create the default configuration fn default_config() -> Config { use piston::input::{keyboard::Key, Button::Keyboard}; let mut skin_map = BTreeMap::new(); skin_map.insert("test".into(), SkinEntry::Osu("test/test_skin".into())); let mut judge_map = BTreeMap::new(); judge_map.insert( "easy".into(), Judge { miss_tolerance: 1.0, windows: vec![[0.05, -0.05], [0.1, -0.1], [0.2, -0.2]], }, ); judge_map.insert( "hell".into(), Judge { miss_tolerance: 2.0, windows: vec![[0.005, -0.005], [0.008, -0.008], [0.013, -0.013]], }, ); Config { general: GeneralConfig { resolution: [800, 600], audio_buffer_size: cpal::BufferSize::Fixed(1024), chart_path: vec![], // TODO use directories crate }, game: UnverifiedGameConfig { key_bindings: [ Keyboard(Key::S), Keyboard(Key::D), Keyboard(Key::F), Keyboard(Key::Space), Keyboard(Key::J), Keyboard(Key::K), Keyboard(Key::L), ], // TODO decide whether to include this in the binary or not default_osu_skin_path: path::PathBuf::from("rsc/default_osu_skin"), current_skin: "test".into(), current_judge: "easy".into(), osu_hitsound_enable: false, skins: skin_map, judges: judge_map, scroll_speed: 1.7, offset: -0.1, }.verify().unwrap(), } } pub fn config_path() -> path::PathBuf { env::var_os("REMANI_CONF") .map(|s| s.into()) .unwrap_or(directories::ProjectDirs::from("", "0e4ef622", "Remani") .unwrap() .config_dir() .join("config.toml") ) }
/** * Collections for the Order Signal. * * Take into account that the methods here expect the translation to be done * already, SkillLoader is the one responsible for that (either directly or * expecting the translation to be done already). */ // Standard library use std::collections::HashMap; use std::fmt::Debug; // This crate use crate::nlu::{IntentData, NluManager, NluManagerStatic, OrderKind}; use crate::signals::order::NluState; use crate::vars::mangle; // Other crates use anyhow::{anyhow, Result}; use serde::Deserialize; use unic_langid::LanguageIdentifier; /*** Config ********************************************************************/ #[derive(Clone, Debug, Deserialize)] pub enum Hook { #[serde(rename = "query")] Query(String), #[serde(rename = "action")] Action(String), #[serde(rename = "signal")] Signal(String), } /*** NluMap *******************************************************************/ #[derive(Debug)] pub struct NluMap<M: NluManager + NluManagerStatic + Debug + Send> { map: HashMap<LanguageIdentifier, NluState<M>>, } impl<M: NluManager + NluManagerStatic + Debug + Send> NluMap<M> { pub fn new(langs: Vec<LanguageIdentifier>) -> Self { let mut managers = HashMap::new(); // Create a nlu manager per language for lang in langs { managers.insert(lang.to_owned(), NluState::new(M::new())); } NluMap { map: managers } } pub fn get_nlu(&mut self, lang: &LanguageIdentifier) -> &mut <M as NluManager>::NluType { const ERR_MSG: &str = "Received language to the NLU was not registered"; const NO_NLU_MSG: &str = "received_order can't be called before end_loading"; self.map .get_mut(lang) .expect(ERR_MSG) .nlu .as_mut() .expect(NO_NLU_MSG) } pub fn get_mut(&mut self, lang: &LanguageIdentifier) -> Result<&mut NluState<M>> { let err = || { anyhow!( "Received language '{}' has not been registered", lang.to_string() ) }; self.map.get_mut(lang).ok_or_else(err) } pub fn get_mut_nlu_man(&mut self, lang: &LanguageIdentifier) -> &mut M { self.map .get_mut(lang) .expect("Language not registered") .get_mut_nlu_man() } pub fn add_intent_to_nlu( &mut self, sig_arg: IntentData, intent_name: &str, skill_name: &str, lang: &LanguageIdentifier, ) -> Result<()> { //First, register all slots for (slot_name, slot_data) in sig_arg.slots.iter() { // Handle that slot types might be defined on the spot if let OrderKind::Def(def) = slot_data.slot_type.clone() { let name = mangle(skill_name, slot_name); self.map .get_mut(lang) .expect("Language not registered") .get_mut_nlu_man() .add_entity(name.clone(), def.clone()); } } self.map .get_mut(lang) .expect("Input language was not present before") .get_mut_nlu_man() .add_intent(intent_name, sig_arg.into_utterances(skill_name)); Ok(()) } }
use crate::physics::{Mass, PhysicsBundle}; use game_controller::{Player, PlayerBundle}; use game_core::{modes::ModeExt, GameStage, GlobalMode, ModeEvent}; use game_lib::{ bevy::{ecs as bevy_ecs, prelude::*}, tracing::{self, instrument}, }; use game_tiles::{EntityWorldPosition, EntityWorldRect}; #[derive(Clone, Copy, PartialEq, Eq, Debug, Hash, SystemLabel)] pub struct PlayerPlugin; impl PlayerPlugin { #[instrument(skip(commands, materials))] fn add_player(mut commands: Commands, mut materials: ResMut<Assets<ColorMaterial>>) { let size = Vec2::new(1.6, 2.9); commands.spawn_bundle(PlayerBundle { sprite_bundle: SpriteBundle { sprite: Sprite { size, ..Default::default() }, material: materials.add(ColorMaterial::color(Color::BLUE)), ..Default::default() }, physics_bundle: PhysicsBundle { bounds: EntityWorldRect::from_center( EntityWorldPosition::new(0.0, 0.0), (size / 2.0).into(), ), mass: Mass(62.0), ..Default::default() }, ..Default::default() }); } #[instrument(skip(commands, players))] fn remove_player(mut commands: Commands, players: Query<Entity, With<Player>>) { for entity in players.iter() { commands.entity(entity).despawn(); } } } impl Plugin for PlayerPlugin { fn build(&self, app: &mut AppBuilder) { app.add_system_set_to_stage( GameStage::GamePreUpdate, SystemSet::new() .label(PlayerPlugin) .with_run_criteria(GlobalMode::InGame.on(ModeEvent::Enter)) .with_system(Self::add_player.system()), ) .add_system_set_to_stage( GameStage::GamePostUpdate, SystemSet::new() .label(PlayerPlugin) .with_run_criteria(GlobalMode::InGame.on(ModeEvent::Exit)) .with_system(Self::remove_player.system()), ); } }
#[doc = r" Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Start HFCLK clock source."] pub tasks_hfclkstart: TASKS_HFCLKSTART, #[doc = "0x04 - Stop HFCLK clock source."] pub tasks_hfclkstop: TASKS_HFCLKSTOP, #[doc = "0x08 - Start LFCLK clock source."] pub tasks_lfclkstart: TASKS_LFCLKSTART, #[doc = "0x0c - Stop LFCLK clock source."] pub tasks_lfclkstop: TASKS_LFCLKSTOP, #[doc = "0x10 - Start calibration of LFCLK RC oscillator."] pub tasks_cal: TASKS_CAL, #[doc = "0x14 - Start calibration timer."] pub tasks_ctstart: TASKS_CTSTART, #[doc = "0x18 - Stop calibration timer."] pub tasks_ctstop: TASKS_CTSTOP, _reserved0: [u8; 228usize], #[doc = "0x100 - HFCLK oscillator started."] pub events_hfclkstarted: EVENTS_HFCLKSTARTED, #[doc = "0x104 - LFCLK oscillator started."] pub events_lfclkstarted: EVENTS_LFCLKSTARTED, _reserved1: [u8; 4usize], #[doc = "0x10c - Callibration of LFCLK RC oscillator completed."] pub events_done: EVENTS_DONE, #[doc = "0x110 - Callibration timer timeout."] pub events_ctto: EVENTS_CTTO, _reserved2: [u8; 496usize], #[doc = "0x304 - Interrupt enable set register."] pub intenset: INTENSET, #[doc = "0x308 - Interrupt enable clear register."] pub intenclr: INTENCLR, _reserved3: [u8; 256usize], #[doc = "0x40c - High frequency clock status."] pub hfclkstat: HFCLKSTAT, _reserved4: [u8; 8usize], #[doc = "0x418 - Low frequency clock status."] pub lfclkstat: LFCLKSTAT, _reserved5: [u8; 252usize], #[doc = "0x518 - Clock source for the LFCLK clock."] pub lfclksrc: LFCLKSRC, _reserved6: [u8; 28usize], #[doc = "0x538 - Calibration timer interval."] pub ctiv: CTIV, _reserved7: [u8; 20usize], #[doc = "0x550 - Crystal frequency."] pub xtalfreq: XTALFREQ, } #[doc = "Start HFCLK clock source."] pub struct TASKS_HFCLKSTART { register: ::vcell::VolatileCell<u32>, } #[doc = "Start HFCLK clock source."] pub mod tasks_hfclkstart; #[doc = "Stop HFCLK clock source."] pub struct TASKS_HFCLKSTOP { register: ::vcell::VolatileCell<u32>, } #[doc = "Stop HFCLK clock source."] pub mod tasks_hfclkstop; #[doc = "Start LFCLK clock source."] pub struct TASKS_LFCLKSTART { register: ::vcell::VolatileCell<u32>, } #[doc = "Start LFCLK clock source."] pub mod tasks_lfclkstart; #[doc = "Stop LFCLK clock source."] pub struct TASKS_LFCLKSTOP { register: ::vcell::VolatileCell<u32>, } #[doc = "Stop LFCLK clock source."] pub mod tasks_lfclkstop; #[doc = "Start calibration of LFCLK RC oscillator."] pub struct TASKS_CAL { register: ::vcell::VolatileCell<u32>, } #[doc = "Start calibration of LFCLK RC oscillator."] pub mod tasks_cal; #[doc = "Start calibration timer."] pub struct TASKS_CTSTART { register: ::vcell::VolatileCell<u32>, } #[doc = "Start calibration timer."] pub mod tasks_ctstart; #[doc = "Stop calibration timer."] pub struct TASKS_CTSTOP { register: ::vcell::VolatileCell<u32>, } #[doc = "Stop calibration timer."] pub mod tasks_ctstop; #[doc = "HFCLK oscillator started."] pub struct EVENTS_HFCLKSTARTED { register: ::vcell::VolatileCell<u32>, } #[doc = "HFCLK oscillator started."] pub mod events_hfclkstarted; #[doc = "LFCLK oscillator started."] pub struct EVENTS_LFCLKSTARTED { register: ::vcell::VolatileCell<u32>, } #[doc = "LFCLK oscillator started."] pub mod events_lfclkstarted; #[doc = "Callibration of LFCLK RC oscillator completed."] pub struct EVENTS_DONE { register: ::vcell::VolatileCell<u32>, } #[doc = "Callibration of LFCLK RC oscillator completed."] pub mod events_done; #[doc = "Callibration timer timeout."] pub struct EVENTS_CTTO { register: ::vcell::VolatileCell<u32>, } #[doc = "Callibration timer timeout."] pub mod events_ctto; #[doc = "Interrupt enable set register."] pub struct INTENSET { register: ::vcell::VolatileCell<u32>, } #[doc = "Interrupt enable set register."] pub mod intenset; #[doc = "Interrupt enable clear register."] pub struct INTENCLR { register: ::vcell::VolatileCell<u32>, } #[doc = "Interrupt enable clear register."] pub mod intenclr; #[doc = "High frequency clock status."] pub struct HFCLKSTAT { register: ::vcell::VolatileCell<u32>, } #[doc = "High frequency clock status."] pub mod hfclkstat; #[doc = "Low frequency clock status."] pub struct LFCLKSTAT { register: ::vcell::VolatileCell<u32>, } #[doc = "Low frequency clock status."] pub mod lfclkstat; #[doc = "Clock source for the LFCLK clock."] pub struct LFCLKSRC { register: ::vcell::VolatileCell<u32>, } #[doc = "Clock source for the LFCLK clock."] pub mod lfclksrc; #[doc = "Calibration timer interval."] pub struct CTIV { register: ::vcell::VolatileCell<u32>, } #[doc = "Calibration timer interval."] pub mod ctiv; #[doc = "Crystal frequency."] pub struct XTALFREQ { register: ::vcell::VolatileCell<u32>, } #[doc = "Crystal frequency."] pub mod xtalfreq;
// error-pattern:assignment to immutable vec content fn main() { let v: vec[int] = [1, 2, 3]; v.(1) = 4; }
use std::collections::HashMap; impl Solution { pub fn two_sum(nums: Vec<i32>, target: i32) -> Vec<i32> { let mut map = HashMap::new(); let mut ans = Vec::new(); for i in 0..nums.len() { let tmp = map.entry(target - nums[i]).or_insert(-1); if *tmp != -1 { ans = vec![*tmp, i as i32]; } map.insert(nums[i], i as i32); } ans } }
use gotham::state::State; use gotham::router::Router; use gotham::router::builder::*; fn sample(state: State) -> (State, String) { (state, "sample".to_string()) } fn router() -> Router { build_simple_router(|route| { route.get("/sample").to(sample); }) } fn main() { let addr = "127.0.0.1:8080"; println!("start, {}", addr); gotham::start(addr, router()); }
//! A module containing crate-local data types that are shared across the //! ingester's internals for processing DML payloads mod ingest_op; pub use ingest_op::*; pub mod encode; pub mod write;
use serde::de; use serde::{Deserialize, Serialize}; use color_eyre::{ eyre::{eyre, Report, Result, WrapErr}, Section, }; use reqwest::header::{ HeaderMap, HeaderName, HeaderValue, ACCEPT, CONTENT_TYPE, REFERER, USER_AGENT, }; use tokio::{runtime::Handle, task}; use crate::{ nix::{NixLicense, NixPackage, NixPackageMeta}, sources::{get_hash, get_long_description}, }; const EXT_QUERY_ADDRESS: &str = "https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery"; #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Payload { pub filters: Vec<PayloadCriteria>, pub asset_types: Vec<String>, pub flags: u64, } #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PayloadCriteria { pub criteria: Vec<PayloadCriterion>, pub direction: u64, pub page_number: u64, pub page_size: u64, pub sort_by: u64, pub sort_order: u64, } #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PayloadCriterion { pub filter_type: u64, pub value: String, } impl Payload { pub fn new(unique_id: String) -> Self { Payload { filters: vec![PayloadCriteria { criteria: vec![PayloadCriterion { filter_type: 7, value: unique_id, }], direction: 2, page_number: 1, page_size: 100, sort_by: 0, sort_order: 0, }], asset_types: Vec::with_capacity(1), flags: 103, } } } #[derive(Debug, Serialize, Deserialize)] pub struct VSMarketPlaceQueryResultResponse { pub results: Vec<VSMarketPlaceQueryResults>, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(rename_all = "camelCase")] pub struct VSMarketPlaceQueryResults { pub extensions: Vec<VSMarketPlaceExtension>, pub paging_token: Option<String>, pub result_metadata: Vec<VSMarketPlaceQueryResultMetaData>, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(rename_all = "camelCase")] pub struct VSMarketPlaceExtension { pub publisher: VSMarketPlaceExtensionPublisher, pub extension_id: String, pub extension_name: String, pub display_name: String, pub flags: String, pub last_updated: String, pub published_date: String, pub release_date: String, pub short_description: Option<String>, pub versions: Vec<VSMarketPlaceExtensionVersion>, pub categories: Vec<String>, pub tags: Vec<String>, pub installation_targets: Vec<VSMarketPlaceExtensionInstallationTarget>, pub deployment_type: u64, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(rename_all = "camelCase")] pub struct VSMarketPlaceExtensionPublisher { pub publisher_id: String, pub publisher_name: String, pub display_name: String, pub flags: String, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(rename_all = "camelCase")] pub struct VSMarketPlaceExtensionVersion { pub version: String, pub flags: String, pub last_updated: String, pub files: Vec<VSMarketPlaceExtensionVersionFile>, pub asset_uri: String, pub fallback_asset_uri: String, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(rename_all = "camelCase")] pub struct VSMarketPlaceExtensionVersionFile { pub asset_type: AssetTypeMicrosoftVisualStudio, pub source: String, } #[derive(Debug, Serialize, Deserialize, Clone, Copy, PartialEq)] pub enum AssetTypeMicrosoftVisualStudio { #[serde(rename = "Microsoft.VisualStudio.Code.Manifest")] CodeManifest, #[serde(rename = "Microsoft.VisualStudio.Services.Content.Changelog")] ServicesContentChangelog, #[serde(rename = "Microsoft.VisualStudio.Services.Content.Details")] ServicesContentDetails, #[serde(rename = "Microsoft.VisualStudio.Services.Content.License")] ServicesContentLicense, #[serde(rename = "Microsoft.VisualStudio.Services.Icons.Default")] ServicesIconsDefault, #[serde(rename = "Microsoft.VisualStudio.Services.Icons.Small")] ServicesIconsSmall, #[serde(rename = "Microsoft.VisualStudio.Services.VsixManifest")] ServicesVSIXManifest, #[serde(rename = "Microsoft.VisualStudio.Services.VSIXPackage")] ServicesVSIXPackage, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(rename_all = "camelCase")] pub struct VSMarketPlaceExtensionInstallationTarget { pub target: String, pub target_version: String, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] #[serde(rename_all = "camelCase")] pub struct VSMarketPlaceQueryResultMetaData { pub metadata_type: String, pub metadata_items: Vec<VSMarketPlaceQueryResultMetaDataItem>, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] pub struct VSMarketPlaceQueryResultMetaDataItem { pub name: String, pub count: u64, } #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct VSMarketPlaceExtensionRefined { pub publisher: String, pub extension_name: String, pub display_name: String, pub description: Option<String>, pub version: String, pub vsix_url: String, pub vsix_manifest_url: String, pub changelog_url: Option<String>, pub readme_url: Option<String>, } impl VSMarketPlaceExtensionRefined { pub async fn get(unique_id: String) -> Result<Self, Report> { let data = Payload::new(unique_id); let mut headers = HeaderMap::new(); // Declare headers headers.insert( ACCEPT, HeaderValue::from_static("application/json;api-version=6.1-preview.1"), ); headers.insert(REFERER, HeaderValue::from_static("")); headers.insert(USER_AGENT, HeaderValue::from_static("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.51.0 Chrome/83.0.4103.122 Electron/9.3.3 Safari/537.36")); headers.insert( HeaderName::from_static("x-market-client-id"), HeaderValue::from_static("VSCode 1.51.0"), ); headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); let response = reqwest::Client::new() .post(EXT_QUERY_ADDRESS) .headers(headers) .json(&data) .send() .await?; let resp_status = response.status(); if resp_status.is_success() { let mut vsmarketplace_response_json: VSMarketPlaceQueryResultResponse = match response.json().await { Ok(query_result) => query_result, Err(e) => { return Err(eyre!("Unable to parse json from vscode marketplace")).error(e) } }; if !vsmarketplace_response_json.results.is_empty() { let mut query_result = vsmarketplace_response_json.results.remove(0); vsmarketplace_response_json.results.clear(); if !query_result.extensions.is_empty() { let mut extension = query_result.extensions.remove(0); query_result.extensions.clear(); let mut vsix_url = Box::new(String::new()); let mut vsix_manifest_url = Box::new(String::new()); let mut changelog_url_box = Box::new(String::new()); let mut readme_url_box = Box::new(String::new()); let version_struct = extension.versions.remove(0); extension.versions.clear(); for file in version_struct.files { match file.asset_type { AssetTypeMicrosoftVisualStudio::ServicesVSIXPackage => { *vsix_url = file.source; } AssetTypeMicrosoftVisualStudio::ServicesVSIXManifest => { *vsix_manifest_url = file.source; } AssetTypeMicrosoftVisualStudio::ServicesContentChangelog => { *changelog_url_box = file.source; } AssetTypeMicrosoftVisualStudio::ServicesContentDetails => { *readme_url_box = file.source; } _ => (), } } let changelog_url: Option<String> = if *changelog_url_box != String::new() { Some(*changelog_url_box) } else { None }; let readme_url: Option<String> = if *readme_url_box != String::new() { Some(*readme_url_box) } else { None }; if *vsix_url != String::new() && *vsix_manifest_url != String::new() { Ok(VSMarketPlaceExtensionRefined { publisher: extension.publisher.publisher_name, extension_name: extension.extension_name, display_name: extension.display_name, description: extension.short_description, version: version_struct.version, vsix_url: *vsix_url, vsix_manifest_url: *vsix_manifest_url, changelog_url, readme_url, }) } else { return Err(eyre!("No VSIX or VSIX Manifest found")); } } else { return Err(eyre!("No extensions found from vscode marketplace query")); } } else { return Err(eyre!("No results found from vscode marketplace")); } } else if let Some(reason) = resp_status.canonical_reason() { return Err(eyre!( "Recieved {}, while attempting to get extension from vscode marketplace.", reason )); } else { return Err(eyre!("{}", resp_status.to_string())); } } pub async fn get_with_version(unique_id: String, version: String) -> Result<Self, Report> { let data = Payload::new(unique_id); let mut headers = HeaderMap::new(); // Declare headers headers.insert( ACCEPT, HeaderValue::from_static("application/json;api-version=6.1-preview.1"), ); headers.insert(REFERER, HeaderValue::from_static("")); headers.insert(USER_AGENT, HeaderValue::from_static("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.51.0 Chrome/83.0.4103.122 Electron/9.3.3 Safari/537.36")); headers.insert( HeaderName::from_static("x-market-client-id"), HeaderValue::from_static("VSCode 1.51.0"), ); headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); let response = reqwest::Client::new() .post(EXT_QUERY_ADDRESS) .headers(headers) .json(&data) .send() .await?; let resp_status = response.status(); if resp_status.is_success() { let mut vsmarketplace_response_json: VSMarketPlaceQueryResultResponse = match response.json().await { Ok(query_result) => query_result, Err(e) => { return Err(eyre!("Unable to parse json from vscode marketplace")).error(e) } }; if !vsmarketplace_response_json.results.is_empty() { let mut query_result = vsmarketplace_response_json.results.remove(0); vsmarketplace_response_json.results.clear(); if !query_result.extensions.is_empty() { let extension = query_result.extensions.remove(0); query_result.extensions.clear(); let mut vsix_url = Box::new(String::new()); let mut vsix_manifest_url = Box::new(String::new()); let mut changelog_url_box = Box::new(String::new()); let mut readme_url_box = Box::new(String::new()); let mut vers: Option<VSMarketPlaceExtensionVersion> = None; for v in extension.versions { if v.version == version { vers = Some(v); } } if let Some(v) = vers { for file in v.files { match file.asset_type { AssetTypeMicrosoftVisualStudio::ServicesVSIXPackage => { *vsix_url = file.source; } AssetTypeMicrosoftVisualStudio::ServicesVSIXManifest => { *vsix_manifest_url = file.source; } AssetTypeMicrosoftVisualStudio::ServicesContentChangelog => { *changelog_url_box = file.source; } AssetTypeMicrosoftVisualStudio::ServicesContentDetails => { *readme_url_box = file.source; } _ => (), } } let changelog_url: Option<String> = if *changelog_url_box != String::new() { Some(*changelog_url_box) } else { None }; let readme_url: Option<String> = if *readme_url_box != String::new() { Some(*readme_url_box) } else { None }; if *vsix_url != String::new() && *vsix_manifest_url != String::new() { Ok(VSMarketPlaceExtensionRefined { publisher: extension.publisher.publisher_name, extension_name: extension.extension_name, display_name: extension.display_name, description: extension.short_description, version: v.version, vsix_url: *vsix_url, vsix_manifest_url: *vsix_manifest_url, changelog_url, readme_url, }) } else { return Err(eyre!("No VSIX or VSIX Manifest found")); } } else { return Err(eyre!( "No version found for extensions from vscode marketplace query" )); } } else { return Err(eyre!("No extensions found from vscode marketplace query")); } } else { return Err(eyre!("No results found from vscode marketplace")); } } else if let Some(reason) = resp_status.canonical_reason() { return Err(eyre!( "Recieved {}, while attempting to get extension from vscode marketplace.", reason )); } else { return Err(eyre!("{}", resp_status.to_string())); } } pub fn to_nixpkg(self, pname: String) -> NixPackage { let publisher: String = self.publisher.clone(); let extension_name: String = self.extension_name.clone(); let version: String = self.version.clone(); let src = format!("https://{publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/{publisher}/extension/{extName}/{version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage", publisher=&publisher, extName=&extension_name, version=&version); let src_clone = &src.to_string(); let description = self.description.clone(); let changelog = self.changelog_url.clone().map(|change| vec![change]); let sha256: String = task::block_in_place(move || { Handle::current().block_on(async move { get_hash(src_clone) .await .expect("Error: unable to get hash of vsix") }) }); let (homepage, github, source) = task::block_in_place(move || { Handle::current().block_on(async move { let mut homepage_box = Box::new(String::from("")); let mut github_box = Box::new(String::from("")); let mut source_box = Box::new(String::from("")); if let Ok(doc) = roxmltree::Document::parse(self.vsix_manifest_url.as_ref()) { for node in doc.descendants() { if node.is_element() && node.has_tag_name("Property") { if let Some(property_id) = node.attribute_node("Id") { match property_id.value() { "Microsoft.VisualStudio.Services.Links.Learn" => { if let Some(property_value) = node.attribute_node("Value") { *homepage_box = property_value.value().to_string() } } "Microsoft.VisualStudio.Services.Links.GitHub" => { if let Some(property_value) = node.attribute_node("Value") { *github_box = property_value.value().to_string() } } "Microsoft.VisualStudio.Services.Links.Source" => { if let Some(property_value) = node.attribute_node("Value") { *source_box = property_value.value().to_string() } } _ => (), } } } } let homepage: Option<String> = if *homepage_box != String::new() { Some(*homepage_box) } else { None }; let github: Option<String> = if *github_box != String::new() { Some(*github_box) } else { None }; let source: Option<String> = if *source_box != String::new() { Some(*source_box) } else { None }; (homepage, github, source) } else { (None, None, None) } }) }); let long_description: Option<String> = if let Some(s) = source { let desc = task::block_in_place(move || { Handle::current().block_on(async move { // do something async get_long_description(s) .await .expect("Error: unable to get readme of extension") }) }); if desc == String::new() { None } else { Some(desc) } } else { None }; let license = if let Some(github_url) = github { task::block_in_place(move || { Handle::current().block_on(async move { // do something async let github = github_url.trim_end_matches(".git"); let github = github.trim_start_matches("https://github.com/"); let split_github_url: Vec<&str> = github.split('/').collect(); let github_author = split_github_url[0]; let github_repo = split_github_url[1]; if let Some(lic) = octocrab::instance() .repos(github_author, github_repo) .license() .await .expect("Error: getting repo information") .license { NixLicense::from_str(&lic.name) } else { None } }) }) .map(|lic| vec![*lic]) } else { None }; let meta = NixPackageMeta { description, long_description, homepage, license, changelog, ..Default::default() }; NixPackage { name: pname.clone(), pname, src, version, sha256, meta, } } } #[cfg(test)] mod tests { use super::*; use serde_json::json; /* pub struct VSMarketPlaceExtensionRefined { pub publisher: String, pub extension_name: String, pub display_name: String, pub description: Option<String>, pub version: String, pub vsix_url: String, pub vsix_manifest_url: String, pub changelog_url: Option<String>, pub readme_url: Option<String> } */ #[tokio::test] async fn test_get() { let expected: VSMarketPlaceExtensionRefined = serde_json::from_value(json!({ "publisher": "cometeer", "extensionName": "spacemacs", "displayName": "Spacemacs", "description": "Spacemacs themes for Visual Studio Code", "version": "1.1.1", "vsixUrl": "https://cometeer.gallerycdn.vsassets.io/extensions/cometeer/spacemacs/1.1.1/1507198251877/Microsoft.VisualStudio.Services.VSIXPackage", "vsixManifestUrl": "https://cometeer.gallerycdn.vsassets.io/extensions/cometeer/spacemacs/1.1.1/1507198251877/Microsoft.VisualStudio.Services.VsixManifest", "changelogUrl": "https://cometeer.gallerycdn.vsassets.io/extensions/cometeer/spacemacs/1.1.1/1507198251877/Microsoft.VisualStudio.Services.Content.Changelog", "readmeUrl": "https://cometeer.gallerycdn.vsassets.io/extensions/cometeer/spacemacs/1.1.1/1507198251877/Microsoft.VisualStudio.Services.Content.Details" })).unwrap(); let actual: VSMarketPlaceExtensionRefined = VSMarketPlaceExtensionRefined::get(String::from("cometeer.spacemacs")) .await .unwrap(); assert_eq!(actual.publisher, expected.publisher); assert_eq!(actual.extension_name, expected.extension_name); assert_eq!(actual.display_name, expected.display_name); assert_eq!(actual.description, expected.description); assert_eq!(actual.version, expected.version); assert_eq!(actual.vsix_url, expected.vsix_url); assert_eq!(actual.vsix_manifest_url, expected.vsix_manifest_url); assert_eq!(actual.changelog_url, expected.changelog_url); assert_eq!(actual.readme_url, expected.readme_url); } #[tokio::test] async fn test_get_with_version() { let expected: VSMarketPlaceExtensionRefined = serde_json::from_value(json!({ "publisher": "cometeer", "extensionName": "spacemacs", "displayName": "Spacemacs", "description": "Spacemacs themes for Visual Studio Code", "version": "1.1.0", "vsixUrl": "https://cometeer.gallerycdn.vsassets.io/extensions/cometeer/spacemacs/1.1.0/1507198207264/Microsoft.VisualStudio.Services.VSIXPackage", "vsixManifestUrl": "https://cometeer.gallerycdn.vsassets.io/extensions/cometeer/spacemacs/1.1.0/1507198207264/Microsoft.VisualStudio.Services.VsixManifest", "changelogUrl": "https://cometeer.gallerycdn.vsassets.io/extensions/cometeer/spacemacs/1.1.0/1507198207264/Microsoft.VisualStudio.Services.Content.Changelog", "readmeUrl": "https://cometeer.gallerycdn.vsassets.io/extensions/cometeer/spacemacs/1.1.0/1507198207264/Microsoft.VisualStudio.Services.Content.Details" })).unwrap(); let actual: VSMarketPlaceExtensionRefined = VSMarketPlaceExtensionRefined::get_with_version( String::from("cometeer.spacemacs"), String::from("1.1.0"), ) .await .unwrap(); assert_eq!(actual.publisher, expected.publisher); assert_eq!(actual.extension_name, expected.extension_name); assert_eq!(actual.display_name, expected.display_name); assert_eq!(actual.description, expected.description); assert_eq!(actual.version, expected.version); assert_eq!(actual.vsix_url, expected.vsix_url); assert_eq!(actual.vsix_manifest_url, expected.vsix_manifest_url); assert_eq!(actual.changelog_url, expected.changelog_url); assert_eq!(actual.readme_url, expected.readme_url); } }
extern crate asciii; use std::error::Error; use asciii::actions; use asciii::storage::StorageDir; fn main() { let dir = StorageDir::All; match actions::calendar(dir) { Ok(cal) => println!("{}", cal), Err(er) => println!("{}", er.description()) } }
use input_i_scanner::InputIScanner; use union_find::UnionFind; fn main() { let stdin = std::io::stdin(); let mut _i_i = InputIScanner::from(stdin.lock()); macro_rules! scan { (($($t: ty),+)) => { ($(scan!($t)),+) }; ($t: ty) => { _i_i.scan::<$t>() as $t }; (($($t: ty),+); $n: expr) => { std::iter::repeat_with(|| scan!(($($t),+))).take($n).collect::<Vec<_>>() }; ($t: ty; $n: expr) => { std::iter::repeat_with(|| scan!($t)).take($n).collect::<Vec<_>>() }; } let (n, m) = scan!((usize, usize)); let mut deg = vec![0; n]; let mut edges = Vec::new(); for _ in 0..m { let (a, b) = scan!((usize, usize)); deg[a - 1] += 1; deg[b - 1] += 1; edges.push((a - 1, b - 1)); } let ng = deg.iter().any(|&d| d > 2); if ng { println!("No"); return; } let mut uf = UnionFind::new(n); for (a, b) in edges { if uf.same(a, b) { println!("No"); return; } uf.unite(a, b); } println!("Yes"); }
#[doc = r" Register block"] #[repr(C)] pub struct RegisterBlock { _reserved0: [u8; 2048usize], #[doc = "0x800 - Unspecified"] pub acl: [ACL; 8], } #[doc = r" Register block"] #[repr(C)] pub struct ACL { #[doc = "0x00 - Description cluster[n]: Configure the word-aligned start address of region n to protect"] pub addr: self::acl::ADDR, #[doc = "0x04 - Description cluster[n]: Size of region to protect counting from address ACL[n].ADDR. Write '0' as no effect."] pub size: self::acl::SIZE, #[doc = "0x08 - Description cluster[n]: Access permissions for region n as defined by start address ACL[n].ADDR and size ACL[n].SIZE"] pub perm: self::acl::PERM, #[doc = "0x0c - Unspecified"] pub unused0: self::acl::UNUSED0, } #[doc = r" Register block"] #[doc = "Unspecified"] pub mod acl;
#![deny(clippy::all, clippy::if_not_else, clippy::enum_glob_use)] #![cfg_attr(feature = "cargo-clippy", deny(warnings))] use proc_macro::TokenStream; use proc_macro2::TokenStream as TokenStream2; use quote::quote; use syn::parse::{self, Parse, ParseStream}; use syn::punctuated::Punctuated; use syn::{GenericParam, Ident, LitStr, Token, TypeParam}; mod config_deserialize; mod serde_replace; /// Error message when attempting to flatten multiple fields. pub(crate) const MULTIPLE_FLATTEN_ERROR: &str = "At most one instance of #[config(flatten)] is supported"; #[proc_macro_derive(ConfigDeserialize, attributes(config))] pub fn derive_config_deserialize(input: TokenStream) -> TokenStream { config_deserialize::derive(input) } #[proc_macro_derive(SerdeReplace)] pub fn derive_serde_replace(input: TokenStream) -> TokenStream { serde_replace::derive(input) } /// Storage for all necessary generics information. #[derive(Default)] struct GenericsStreams { unconstrained: TokenStream2, constrained: TokenStream2, phantoms: TokenStream2, } /// Create the necessary generics annotations. /// /// This will create three different token streams, which might look like this: /// - unconstrained: `T` /// - constrained: `T: Default + Deserialize<'de>` /// - phantoms: `T: PhantomData<T>,` pub(crate) fn generics_streams<T>(params: &Punctuated<GenericParam, T>) -> GenericsStreams { let mut generics = GenericsStreams::default(); for generic in params { // NOTE: Lifetimes and const params are not supported. if let GenericParam::Type(TypeParam { ident, .. }) = generic { generics.unconstrained.extend(quote!( #ident , )); generics.constrained.extend(quote! { #ident : Default + serde::Deserialize<'de> + alacritty_config::SerdeReplace, }); generics.phantoms.extend(quote! { #ident : std::marker::PhantomData < #ident >, }); } } generics } /// Field attribute. pub(crate) struct Attr { ident: String, param: Option<LitStr>, } impl Parse for Attr { fn parse(input: ParseStream<'_>) -> parse::Result<Self> { let ident = input.parse::<Ident>()?.to_string(); let param = input.parse::<Token![=]>().and_then(|_| input.parse()).ok(); Ok(Self { ident, param }) } }
/// By convention: /// * K is a map's key type, implementing `Copy` and `Ord`. /// * T is an arbitrary type, typically stored as a value in a map. /// * Op is an arbitrary operation type (typically a mode-specific enum). use disambiguation_map::{DisambiguationMap, Match}; use ordered_vec_map::InsertionResult; use std::cmp::min; use std::ops::Range; use typeahead::{Parse, Typeahead, RemapType}; impl Parse for u8 { fn decimal(&self) -> Option<char> { match *self { b'0'...b'9' => Some(*self as char), _ => None, } } fn character(&self) -> Option<char> { Some(*self as char) } } #[derive(Clone, Debug, PartialEq)] pub enum MapErr { NoMatch, // No matching op mapping was found. InfiniteRecursion, // An infinite loop due to remapping is suspected. } #[derive(Debug, PartialEq)] pub struct ModeMap<K, Op> where K: Ord, K: Copy, K: Parse, Op: Copy, { remap_map: DisambiguationMap<K, Vec<K>>, op_map: DisambiguationMap<K, Op>, } impl<K, Op> ModeMap<K, Op> where K: Ord, K: Copy, K: Parse, Op: Copy, { pub fn new() -> Self { ModeMap { remap_map: DisambiguationMap::new(), op_map: DisambiguationMap::new(), } } /// Process a typeahead buffer. /// Parse string prefixes are managed by each mode after this method. pub fn process(&self, typeahead: &mut Typeahead<K>) -> Result<Op, MapErr> { // Grab keys from the front of the queue, looking for matches. let mut i: i32 = 0; const MAX_REMAP_ITERATIONS: i32 = 1000; while typeahead.len() > 0 { if i > MAX_REMAP_ITERATIONS { return Err(MapErr::InfiniteRecursion); } i += 1; let remap_result = self.remap_map.process(typeahead, RemapType::Remap); let op_result = self.op_map.process(typeahead, RemapType::NotRelavant); match (remap_result, op_result) { (Match::PartialMatch, _) | (_, Match::PartialMatch) => { break; // Ambiguous results. } (Match::FullMatch(mapped), _) => { // Remapping takes precedence over op-mapping. let len = min(mapped.0.len(), typeahead.len()); typeahead.drain(Range { start: 0, end: len }); typeahead.put_front(&mapped.1, RemapType::Remap); } (Match::NoMatch, Match::FullMatch(mapped)) => { // If no remapping, try op-mapping. let len = min(mapped.0.len(), typeahead.len()); typeahead.drain(Range { start: 0, end: len }); return Ok(mapped.1); } (Match::NoMatch, Match::NoMatch) => { break; // No matches found. } } } return Err(MapErr::NoMatch); } /// Insert a mapping from `key` to `value` in the operations map. /// Empty `key`s are not allowed. pub fn insert_op(&mut self, key: Vec<K>, value: Op) -> InsertionResult { if key.is_empty() { InsertionResult::InvalidKey } else { self.op_map.insert((key, value)) } } /// Insert a mapping from `key` to `value` in the remap map. /// Empty `key`s are not allowed and `key` must not equal `value`. pub fn insert_remap( &mut self, key: Vec<K>, value: Vec<K>, ) -> InsertionResult { if key.is_empty() || key == value { InsertionResult::InvalidKey } else { self.remap_map.insert((key, value)) } } } #[cfg(test)] mod test { use super::*; #[derive(Copy, Clone, Debug, PartialEq)] enum TestOp { ThingOne, ThingTwo, } #[test] fn insert_overwrite() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![1u8], TestOp::ThingOne) ); assert_eq!( InsertionResult::Overwrite, mode_map.insert_op(vec![1u8], TestOp::ThingTwo) ); assert_eq!( InsertionResult::Create, mode_map.insert_remap(vec![1u8], vec![2u8]) ); assert_eq!( InsertionResult::Overwrite, mode_map.insert_remap(vec![1u8], vec![3u8]) ); } #[test] fn insert_empty_key() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::InvalidKey, mode_map.insert_op(Vec::<u8>::new(), TestOp::ThingOne) ); assert_eq!( InsertionResult::InvalidKey, mode_map.insert_remap(Vec::<u8>::new(), vec![1u8]) ); } #[test] fn insert_key_value_parity() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::InvalidKey, mode_map.insert_remap(vec![1u8], vec![1u8]) ); } #[test] fn process_one_op() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![1u8], TestOp::ThingOne) ); let mut typeahead = Typeahead::<u8>::new(); typeahead.push_back(1u8, RemapType::Remap); assert_eq!(Ok(TestOp::ThingOne), mode_map.process(&mut typeahead)); assert!(typeahead.is_empty()); } #[test] fn process_two_ops() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![1u8], TestOp::ThingOne) ); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![2u8], TestOp::ThingTwo) ); let mut typeahead = Typeahead::<u8>::new(); typeahead.push_back(2u8, RemapType::Remap); assert_eq!(Ok(TestOp::ThingTwo), mode_map.process(&mut typeahead)); assert!(typeahead.is_empty()); } #[test] fn process_overspecified_full_match() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![1u8], TestOp::ThingOne) ); let mut typeahead = Typeahead::<u8>::new(); typeahead.push_back(1u8, RemapType::Remap); typeahead.push_back(1u8, RemapType::Remap); assert_eq!(Ok(TestOp::ThingOne), mode_map.process(&mut typeahead)); } #[test] fn process_put_back_leftovers() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![1u8], TestOp::ThingOne) ); let mut typeahead = Typeahead::<u8>::new(); typeahead.push_back(1u8, RemapType::Remap); typeahead.push_back(1u8, RemapType::Remap); assert_eq!(Ok(TestOp::ThingOne), mode_map.process(&mut typeahead)); assert_eq!(Some((1u8, RemapType::Remap)), typeahead.pop_front()); assert_eq!(None, typeahead.pop_front()); } #[test] fn process_remap() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_remap(vec![1u8], vec![2u8]) ); let mut typeahead = Typeahead::<u8>::new(); typeahead.push_back(1u8, RemapType::Remap); typeahead.push_back(1u8, RemapType::Remap); assert_eq!(Err(MapErr::NoMatch), mode_map.process(&mut typeahead)); assert_eq!(Some((2u8, RemapType::Remap)), typeahead.pop_front()); assert_eq!(Some((1u8, RemapType::Remap)), typeahead.pop_front()); assert_eq!(None, typeahead.pop_front()); } #[test] fn process_overspecified_remap() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_remap(vec![1u8, 1u8, 1u8], vec![2u8]) ); let mut typeahead = Typeahead::<u8>::new(); typeahead.push_back(1u8, RemapType::Remap); typeahead.push_back(1u8, RemapType::Remap); assert_eq!(Err(MapErr::NoMatch), mode_map.process(&mut typeahead)); assert_eq!(Some((1u8, RemapType::Remap)), typeahead.pop_front()); assert_eq!(Some((1u8, RemapType::Remap)), typeahead.pop_front()); assert_eq!(None, typeahead.pop_front()); } #[test] fn process_shadow_op_with_remap() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_remap(vec![1u8], vec![2u8]) ); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![1u8], TestOp::ThingOne) ); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![2u8], TestOp::ThingTwo) ); let mut typeahead = Typeahead::<u8>::new(); typeahead.push_back(1u8, RemapType::Remap); typeahead.push_back(1u8, RemapType::Remap); assert_eq!(Ok(TestOp::ThingTwo), mode_map.process(&mut typeahead)); assert_eq!(Some((1u8, RemapType::Remap)), typeahead.pop_front()); assert_eq!(None, typeahead.pop_front()); } #[test] fn process_remap_then_op() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_remap(vec![1u8, 1u8], vec![2u8]) ); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![1u8], TestOp::ThingOne) ); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![2u8], TestOp::ThingTwo) ); let mut typeahead = Typeahead::<u8>::new(); typeahead.push_back(1u8, RemapType::Remap); typeahead.push_back(1u8, RemapType::Remap); assert_eq!(Ok(TestOp::ThingTwo), mode_map.process(&mut typeahead)); assert_eq!(None, typeahead.pop_front()); } #[test] fn process_op_remap_ambiguate() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_remap(vec![1u8, 1u8], vec![2u8]) ); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![1u8, 1u8, 1u8], TestOp::ThingOne) ); let mut typeahead = Typeahead::<u8>::new(); typeahead.push_back(1u8, RemapType::Remap); typeahead.push_back(1u8, RemapType::Remap); // In this test, we expect the remap not to take place since we haven't // yet disambiguated it from the op. assert_eq!(Err(MapErr::NoMatch), mode_map.process(&mut typeahead)); assert_eq!(Some((1u8, RemapType::Remap)), typeahead.pop_front()); assert_eq!(Some((1u8, RemapType::Remap)), typeahead.pop_front()); assert_eq!(None, typeahead.pop_front()); } #[test] fn process_ambiguous_sequence() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_remap(vec![1u8, 1u8], vec![2u8]) ); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![1u8], TestOp::ThingOne) ); let mut typeahead = Typeahead::<u8>::new(); // Ambiguous sequence. typeahead.push_back(1u8, RemapType::Remap); assert_eq!(Err(MapErr::NoMatch), mode_map.process(&mut typeahead)); assert_eq!(1, typeahead.len()); } #[test] fn process_disambiguated_remap() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_remap(vec![1u8, 1u8], vec![2u8]) ); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![1u8], TestOp::ThingOne) ); let mut typeahead = Typeahead::<u8>::new(); // Disambiguate for remap. typeahead.push_back(1u8, RemapType::Remap); typeahead.push_back(1u8, RemapType::Remap); assert_eq!(Err(MapErr::NoMatch), mode_map.process(&mut typeahead)); assert_eq!(Some((2u8, RemapType::Remap)), typeahead.pop_front()); assert_eq!(0, typeahead.len()); } #[test] fn process_disambiguated_op() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_remap(vec![1u8, 1u8], vec![2u8]) ); assert_eq!( InsertionResult::Create, mode_map.insert_op(vec![1u8], TestOp::ThingOne) ); let mut typeahead = Typeahead::<u8>::new(); // Disambiguated sequence for op. typeahead.push_back(1u8, RemapType::Remap); typeahead.push_back(2u8, RemapType::Remap); assert_eq!(Ok(TestOp::ThingOne), mode_map.process(&mut typeahead)); assert_eq!(Some((2u8, RemapType::Remap)), typeahead.pop_front()); assert_eq!(None, typeahead.pop_front()); } #[test] fn process_push_front_reversed() { let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_remap(vec![1u8, 2u8], vec![3u8, 4u8]) ); let mut typeahead = Typeahead::<u8>::new(); typeahead.push_back(1u8, RemapType::Remap); typeahead.push_back(2u8, RemapType::Remap); assert_eq!(Err(MapErr::NoMatch), mode_map.process(&mut typeahead)); assert_eq!(Some((3u8, RemapType::Remap)), typeahead.pop_front()); assert_eq!(Some((4u8, RemapType::Remap)), typeahead.pop_front()); assert_eq!(None, typeahead.pop_front()); } #[test] fn process_inf_recursion() { // Test that infinite recursion eventually errors out. let mut mode_map = ModeMap::<u8, TestOp>::new(); assert_eq!( InsertionResult::Create, mode_map.insert_remap(vec![1u8], vec![2u8]) ); assert_eq!( InsertionResult::Create, mode_map.insert_remap(vec![2u8], vec![1u8]) ); let mut typeahead = Typeahead::<u8>::new(); typeahead.push_back(1u8, RemapType::Remap); assert_eq!( Err(MapErr::InfiniteRecursion), mode_map.process(&mut typeahead) ); } }
pub use self::base::*; pub use self::iterable::*; pub mod base; pub mod iterable;
use crate::get_segment_from_slot; use log::*; use serde_derive::{Deserialize, Serialize}; use morgan_interface::account::Account; use morgan_interface::account::KeyedAccount; use morgan_interface::account_utils::State; use morgan_interface::hash::Hash; use morgan_interface::instruction::InstructionError; use morgan_interface::pubkey::Pubkey; use morgan_interface::signature::Signature; use std::collections::HashMap; use morgan_helper::logHelper::*; pub const TOTAL_VALIDATOR_REWARDS: u64 = 1; pub const TOTAL_REPLICATOR_REWARDS: u64 = 1; // Todo Tune this for actual use cases when replicators are feature complete pub const STORAGE_ACCOUNT_SPACE: u64 = 1024 * 8; #[derive(Debug, Serialize, Deserialize, Clone, PartialEq)] pub enum ProofStatus { Skipped, Valid, NotValid, } impl Default for ProofStatus { fn default() -> Self { ProofStatus::Skipped } } #[derive(Default, Debug, Serialize, Deserialize, Clone, PartialEq)] pub struct Proof { pub signature: Signature, pub sha_state: Hash, } #[derive(Default, Debug, Serialize, Deserialize, Clone)] pub struct CheckedProof { pub proof: Proof, pub status: ProofStatus, } #[derive(Debug, Serialize, Deserialize)] pub enum StorageContract { Uninitialized, // Must be first (aka, 0) ValidatorStorage { // Most recently advertised slot slot: u64, // Most recently advertised blockhash hash: Hash, lockout_validations: HashMap<usize, HashMap<Hash, ProofStatus>>, reward_validations: HashMap<usize, HashMap<Hash, ProofStatus>>, }, ReplicatorStorage { /// Map of Proofs per segment, in a HashMap based on the sha_state proofs: HashMap<usize, HashMap<Hash, Proof>>, /// Map of Rewards per segment, in a HashMap based on the sha_state /// Multiple validators can validate the same set of proofs so it needs a Vec reward_validations: HashMap<usize, HashMap<Hash, Vec<ProofStatus>>>, }, MiningPool, } // utility function, used by Bank, tests, genesis pub fn create_validator_storage_account(difs: u64) -> Account { let mut storage_account = Account::new(difs, 0, STORAGE_ACCOUNT_SPACE as usize, &crate::id()); storage_account .set_state(&StorageContract::ValidatorStorage { slot: 0, hash: Hash::default(), lockout_validations: HashMap::new(), reward_validations: HashMap::new(), }) .expect("set_state"); storage_account } pub struct StorageAccount<'a> { account: &'a mut Account, } impl<'a> StorageAccount<'a> { pub fn new(account: &'a mut Account) -> Self { Self { account } } pub fn initialize_mining_pool(&mut self) -> Result<(), InstructionError> { let storage_contract = &mut self.account.state()?; if let StorageContract::Uninitialized = storage_contract { *storage_contract = StorageContract::MiningPool; self.account.set_state(storage_contract) } else { Err(InstructionError::AccountAlreadyInitialized)? } } pub fn initialize_replicator_storage(&mut self) -> Result<(), InstructionError> { let storage_contract = &mut self.account.state()?; if let StorageContract::Uninitialized = storage_contract { *storage_contract = StorageContract::ReplicatorStorage { proofs: HashMap::new(), reward_validations: HashMap::new(), }; self.account.set_state(storage_contract) } else { Err(InstructionError::AccountAlreadyInitialized)? } } pub fn initialize_validator_storage(&mut self) -> Result<(), InstructionError> { let storage_contract = &mut self.account.state()?; if let StorageContract::Uninitialized = storage_contract { *storage_contract = StorageContract::ValidatorStorage { slot: 0, hash: Hash::default(), lockout_validations: HashMap::new(), reward_validations: HashMap::new(), }; self.account.set_state(storage_contract) } else { Err(InstructionError::AccountAlreadyInitialized)? } } pub fn submit_mining_proof( &mut self, sha_state: Hash, slot: u64, signature: Signature, current_slot: u64, ) -> Result<(), InstructionError> { let mut storage_contract = &mut self.account.state()?; if let StorageContract::ReplicatorStorage { proofs, .. } = &mut storage_contract { let segment_index = get_segment_from_slot(slot); let current_segment = get_segment_from_slot(current_slot); if segment_index >= current_segment { // attempt to submit proof for unconfirmed segment return Err(InstructionError::InvalidArgument); } debug!( "Mining proof submitted with contract {:?} slot: {}", sha_state, slot ); let segment_proofs = proofs.entry(segment_index).or_default(); if segment_proofs.contains_key(&sha_state) { // do not accept duplicate proofs return Err(InstructionError::InvalidArgument); } segment_proofs.insert( sha_state, Proof { sha_state, signature, }, ); self.account.set_state(storage_contract) } else { Err(InstructionError::InvalidArgument)? } } pub fn advertise_storage_recent_blockhash( &mut self, hash: Hash, slot: u64, current_slot: u64, ) -> Result<(), InstructionError> { let mut storage_contract = &mut self.account.state()?; if let StorageContract::ValidatorStorage { slot: state_slot, hash: state_hash, reward_validations, lockout_validations, } = &mut storage_contract { let current_segment = get_segment_from_slot(current_slot); let original_segment = get_segment_from_slot(*state_slot); let segment = get_segment_from_slot(slot); debug!( "advertise new segment: {} orig: {}", segment, current_segment ); if segment < original_segment || segment >= current_segment { return Err(InstructionError::InvalidArgument); } *state_slot = slot; *state_hash = hash; // move storage epoch updated, move the lockout_validations to reward_validations reward_validations.extend(lockout_validations.drain()); self.account.set_state(storage_contract) } else { Err(InstructionError::InvalidArgument)? } } pub fn proof_validation( &mut self, segment: u64, proofs: Vec<(Pubkey, Vec<CheckedProof>)>, replicator_accounts: &mut [StorageAccount], ) -> Result<(), InstructionError> { let mut storage_contract = &mut self.account.state()?; if let StorageContract::ValidatorStorage { slot: state_slot, lockout_validations, .. } = &mut storage_contract { let segment_index = segment as usize; let state_segment = get_segment_from_slot(*state_slot); if segment_index > state_segment { return Err(InstructionError::InvalidArgument); } let accounts_and_proofs = replicator_accounts .iter_mut() .filter_map(|account| { account .account .state() .ok() .map(move |contract| match contract { StorageContract::ReplicatorStorage { proofs, .. } => { if let Some(proofs) = proofs.get(&segment_index).cloned() { Some((account, proofs)) } else { None } } _ => None, }) }) .flatten() .collect::<Vec<_>>(); if accounts_and_proofs.len() != proofs.len() { // don't have all the accounts to validate the proofs against return Err(InstructionError::InvalidArgument); } let valid_proofs: Vec<_> = proofs .into_iter() .zip(accounts_and_proofs.into_iter()) .flat_map(|((_id, checked_proofs), (account, proofs))| { checked_proofs.into_iter().filter_map(move |checked_proof| { proofs.get(&checked_proof.proof.sha_state).map(|proof| { process_validation(account, segment_index, &proof, &checked_proof) .map(|_| checked_proof) }) }) }) .flatten() .collect(); // allow validators to store successful validations valid_proofs.into_iter().for_each(|proof| { lockout_validations .entry(segment_index) .or_default() .insert(proof.proof.sha_state, proof.status); }); self.account.set_state(storage_contract) } else { Err(InstructionError::InvalidArgument)? } } pub fn claim_storage_reward( &mut self, mining_pool: &mut KeyedAccount, slot: u64, current_slot: u64, ) -> Result<(), InstructionError> { let mut storage_contract = &mut self.account.state()?; if let StorageContract::ValidatorStorage { reward_validations, slot: state_slot, .. } = &mut storage_contract { let state_segment = get_segment_from_slot(*state_slot); let claim_segment = get_segment_from_slot(slot); if state_segment <= claim_segment || !reward_validations.contains_key(&claim_segment) { debug!( "current {:?}, claim {:?}, have rewards for {:?} segments", state_segment, claim_segment, reward_validations.len() ); return Err(InstructionError::InvalidArgument); } let num_validations = count_valid_proofs( &reward_validations .remove(&claim_segment) .map(|mut proofs| proofs.drain().map(|(_, proof)| proof).collect::<Vec<_>>()) .unwrap_or_default(), ); let reward = TOTAL_VALIDATOR_REWARDS * num_validations; mining_pool.account.difs -= reward; self.account.difs += reward; self.account.set_state(storage_contract) } else if let StorageContract::ReplicatorStorage { proofs, reward_validations, } = &mut storage_contract { // if current tick height is a full segment away, allow reward collection let claim_index = get_segment_from_slot(current_slot); let claim_segment = get_segment_from_slot(slot); // Todo this might might always be true if claim_index <= claim_segment || !reward_validations.contains_key(&claim_segment) || !proofs.contains_key(&claim_segment) { // info!( // "{}", // Info(format!("current {:?}, claim {:?}, have rewards for {:?} segments", // claim_index, // claim_segment, // reward_validations.len()).to_string()) // ); let info:String = format!("current {:?}, claim {:?}, have rewards for {:?} segments", claim_index, claim_segment, reward_validations.len()).to_string(); println!("{}", printLn( info, module_path!().to_string() ) ); return Err(InstructionError::InvalidArgument); } // remove proofs for which rewards have already been collected let segment_proofs = proofs.get_mut(&claim_segment).unwrap(); let checked_proofs = reward_validations .remove(&claim_segment) .map(|mut proofs| { proofs .drain() .map(|(sha_state, proof)| { proof .into_iter() .map(|proof| { segment_proofs.remove(&sha_state); proof }) .collect::<Vec<_>>() }) .flatten() .collect::<Vec<_>>() }) .unwrap_or_default(); let total_proofs = checked_proofs.len() as u64; let num_validations = count_valid_proofs(&checked_proofs); let reward = num_validations * TOTAL_REPLICATOR_REWARDS * (num_validations / total_proofs); mining_pool.account.difs -= reward; self.account.difs += reward; self.account.set_state(storage_contract) } else { Err(InstructionError::InvalidArgument)? } } } /// Store the result of a proof validation into the replicator account fn store_validation_result( storage_account: &mut StorageAccount, segment: usize, checked_proof: CheckedProof, ) -> Result<(), InstructionError> { let mut storage_contract = storage_account.account.state()?; match &mut storage_contract { StorageContract::ReplicatorStorage { proofs, reward_validations, .. } => { if !proofs.contains_key(&segment) { return Err(InstructionError::InvalidAccountData); } if proofs .get(&segment) .unwrap() .contains_key(&checked_proof.proof.sha_state) { reward_validations .entry(segment) .or_default() .entry(checked_proof.proof.sha_state) .or_default() .push(checked_proof.status); } else { return Err(InstructionError::InvalidAccountData); } } _ => return Err(InstructionError::InvalidAccountData), } storage_account.account.set_state(&storage_contract) } fn count_valid_proofs(proofs: &[ProofStatus]) -> u64 { let mut num = 0; for proof in proofs { if let ProofStatus::Valid = proof { num += 1; } } num } fn process_validation( account: &mut StorageAccount, segment_index: usize, proof: &Proof, checked_proof: &CheckedProof, ) -> Result<(), InstructionError> { store_validation_result(account, segment_index, checked_proof.clone())?; if proof.signature != checked_proof.proof.signature || checked_proof.status != ProofStatus::Valid { return Err(InstructionError::GenericError); } Ok(()) } #[cfg(test)] mod tests { use super::*; use crate::id; #[test] fn test_account_data() { morgan_logger::setup(); let mut account = Account::default(); account.data.resize(STORAGE_ACCOUNT_SPACE as usize, 0); let storage_account = StorageAccount::new(&mut account); // pretend it's a validator op code let mut contract = storage_account.account.state().unwrap(); if let StorageContract::ValidatorStorage { .. } = contract { assert!(true) } if let StorageContract::ReplicatorStorage { .. } = &mut contract { panic!("Contract should not decode into two types"); } contract = StorageContract::ValidatorStorage { slot: 0, hash: Hash::default(), lockout_validations: HashMap::new(), reward_validations: HashMap::new(), }; storage_account.account.set_state(&contract).unwrap(); if let StorageContract::ReplicatorStorage { .. } = contract { panic!("Wrong contract type"); } contract = StorageContract::ReplicatorStorage { proofs: HashMap::new(), reward_validations: HashMap::new(), }; storage_account.account.set_state(&contract).unwrap(); if let StorageContract::ValidatorStorage { .. } = contract { panic!("Wrong contract type"); } } #[test] fn test_process_validation() { let mut account = StorageAccount { account: &mut Account { difs: 0, reputations: 0, data: vec![], owner: id(), executable: false, }, }; let segment_index = 0_usize; let proof = Proof { signature: Signature::default(), sha_state: Hash::default(), }; let mut checked_proof = CheckedProof { proof: proof.clone(), status: ProofStatus::Valid, }; // account has no space process_validation(&mut account, segment_index, &proof, &checked_proof).unwrap_err(); account .account .data .resize(STORAGE_ACCOUNT_SPACE as usize, 0); let storage_contract = &mut account.account.state().unwrap(); if let StorageContract::Uninitialized = storage_contract { let mut proof_map = HashMap::new(); proof_map.insert(proof.sha_state, proof.clone()); let mut proofs = HashMap::new(); proofs.insert(0, proof_map); *storage_contract = StorageContract::ReplicatorStorage { proofs, reward_validations: HashMap::new(), }; }; account.account.set_state(storage_contract).unwrap(); // proof is valid process_validation(&mut account, segment_index, &proof, &checked_proof).unwrap(); checked_proof.status = ProofStatus::NotValid; // proof failed verification process_validation(&mut account, segment_index, &proof, &checked_proof).unwrap_err(); } }
pub mod front_of_house;
pub mod events; pub mod input; pub mod chatlog; pub mod chatroom;
use super::{BinOperation, Number, Var}; use derive_more::Display; #[derive(Display)] pub enum Expr { Number(Number), Var(Var), BinOperation(BinOperation), } impl Expr { pub fn derivative(&self, var: &Var) -> Self { use Expr::{BinOperation, Number, Var}; match self { Number(_contained) => Self::Number(super::Number::Int(0)), Var(contained) => contained.derivative(var), BinOperation(contained) => contained.derivative(var), } } pub fn simplify(&self) -> Self { use Expr::{BinOperation, Number, Var}; match self { Number(contained) => contained.simplify(), Var(contained) => contained.simplify(), BinOperation(contained) => contained.simplify(), } } }
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] #[cfg(feature = "Win32_Security_Cryptography_Catalog")] pub mod Catalog; #[cfg(feature = "Win32_Security_Cryptography_Certificates")] pub mod Certificates; #[cfg(feature = "Win32_Security_Cryptography_Sip")] pub mod Sip; #[cfg(feature = "Win32_Security_Cryptography_UI")] pub mod UI; pub const ALG_CLASS_ALL: u32 = 57344u32; pub const ALG_CLASS_ANY: u32 = 0u32; pub const ALG_CLASS_DATA_ENCRYPT: u32 = 24576u32; pub const ALG_CLASS_HASH: u32 = 32768u32; pub const ALG_CLASS_KEY_EXCHANGE: u32 = 40960u32; pub const ALG_CLASS_MSG_ENCRYPT: u32 = 16384u32; pub const ALG_CLASS_SIGNATURE: u32 = 8192u32; pub const ALG_SID_3DES: u32 = 3u32; pub const ALG_SID_3DES_112: u32 = 9u32; pub const ALG_SID_AES: u32 = 17u32; pub const ALG_SID_AES_128: u32 = 14u32; pub const ALG_SID_AES_192: u32 = 15u32; pub const ALG_SID_AES_256: u32 = 16u32; pub const ALG_SID_AGREED_KEY_ANY: u32 = 3u32; pub const ALG_SID_ANY: u32 = 0u32; pub const ALG_SID_CAST: u32 = 6u32; pub const ALG_SID_CYLINK_MEK: u32 = 12u32; pub const ALG_SID_DES: u32 = 1u32; pub const ALG_SID_DESX: u32 = 4u32; pub const ALG_SID_DH_EPHEM: u32 = 2u32; pub const ALG_SID_DH_SANDF: u32 = 1u32; pub const ALG_SID_DSS_ANY: u32 = 0u32; pub const ALG_SID_DSS_DMS: u32 = 2u32; pub const ALG_SID_DSS_PKCS: u32 = 1u32; pub const ALG_SID_ECDH: u32 = 5u32; pub const ALG_SID_ECDH_EPHEM: u32 = 6u32; pub const ALG_SID_ECDSA: u32 = 3u32; pub const ALG_SID_ECMQV: u32 = 1u32; pub const ALG_SID_EXAMPLE: u32 = 80u32; pub const ALG_SID_HASH_REPLACE_OWF: u32 = 11u32; pub const ALG_SID_HMAC: u32 = 9u32; pub const ALG_SID_IDEA: u32 = 5u32; pub const ALG_SID_KEA: u32 = 4u32; pub const ALG_SID_MAC: u32 = 5u32; pub const ALG_SID_MD2: u32 = 1u32; pub const ALG_SID_MD4: u32 = 2u32; pub const ALG_SID_MD5: u32 = 3u32; pub const ALG_SID_PCT1_MASTER: u32 = 4u32; pub const ALG_SID_RC2: u32 = 2u32; pub const ALG_SID_RC4: u32 = 1u32; pub const ALG_SID_RC5: u32 = 13u32; pub const ALG_SID_RIPEMD: u32 = 6u32; pub const ALG_SID_RIPEMD160: u32 = 7u32; pub const ALG_SID_RSA_ANY: u32 = 0u32; pub const ALG_SID_RSA_ENTRUST: u32 = 3u32; pub const ALG_SID_RSA_MSATWORK: u32 = 2u32; pub const ALG_SID_RSA_PGP: u32 = 4u32; pub const ALG_SID_RSA_PKCS: u32 = 1u32; pub const ALG_SID_SAFERSK128: u32 = 8u32; pub const ALG_SID_SAFERSK64: u32 = 7u32; pub const ALG_SID_SCHANNEL_ENC_KEY: u32 = 7u32; pub const ALG_SID_SCHANNEL_MAC_KEY: u32 = 3u32; pub const ALG_SID_SCHANNEL_MASTER_HASH: u32 = 2u32; pub const ALG_SID_SEAL: u32 = 2u32; pub const ALG_SID_SHA: u32 = 4u32; pub const ALG_SID_SHA1: u32 = 4u32; pub const ALG_SID_SHA_256: u32 = 12u32; pub const ALG_SID_SHA_384: u32 = 13u32; pub const ALG_SID_SHA_512: u32 = 14u32; pub const ALG_SID_SKIPJACK: u32 = 10u32; pub const ALG_SID_SSL2_MASTER: u32 = 5u32; pub const ALG_SID_SSL3SHAMD5: u32 = 8u32; pub const ALG_SID_SSL3_MASTER: u32 = 1u32; pub const ALG_SID_TEK: u32 = 11u32; pub const ALG_SID_THIRDPARTY_ANY: u32 = 0u32; pub const ALG_SID_TLS1PRF: u32 = 10u32; pub const ALG_SID_TLS1_MASTER: u32 = 6u32; pub const ALG_TYPE_ANY: u32 = 0u32; pub const ALG_TYPE_BLOCK: u32 = 1536u32; pub const ALG_TYPE_DH: u32 = 2560u32; pub const ALG_TYPE_DSS: u32 = 512u32; pub const ALG_TYPE_ECDH: u32 = 3584u32; pub const ALG_TYPE_RSA: u32 = 1024u32; pub const ALG_TYPE_SECURECHANNEL: u32 = 3072u32; pub const ALG_TYPE_STREAM: u32 = 2048u32; pub const ALG_TYPE_THIRDPARTY: u32 = 4096u32; pub const AUDIT_CARD_DELETE: ::windows::core::HRESULT = ::windows::core::HRESULT(1074070017i32 as _); pub const AUDIT_CARD_IMPORT: ::windows::core::HRESULT = ::windows::core::HRESULT(1074070018i32 as _); pub const AUDIT_CARD_WRITTEN: ::windows::core::HRESULT = ::windows::core::HRESULT(1074070016i32 as _); pub const AUDIT_SERVICE_IDLE_STOP: ::windows::core::HRESULT = ::windows::core::HRESULT(1074070022i32 as _); pub const AUDIT_STORE_DELETE: ::windows::core::HRESULT = ::windows::core::HRESULT(1074070021i32 as _); pub const AUDIT_STORE_EXPORT: ::windows::core::HRESULT = ::windows::core::HRESULT(1074070020i32 as _); pub const AUDIT_STORE_IMPORT: ::windows::core::HRESULT = ::windows::core::HRESULT(1074070019i32 as _); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA { pub cbSize: u32, pub dwRegPolicySettings: u32, pub pSignerInfo: *mut CMSG_SIGNER_INFO, } #[cfg(feature = "Win32_Foundation")] impl AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA").field("cbSize", &self.cbSize).field("dwRegPolicySettings", &self.dwRegPolicySettings).field("pSignerInfo", &self.pSignerInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwRegPolicySettings == other.dwRegPolicySettings && self.pSignerInfo == other.pSignerInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS { pub cbSize: u32, pub fCommercial: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS").field("cbSize", &self.cbSize).field("fCommercial", &self.fCommercial).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.fCommercial == other.fCommercial } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_STATUS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA { pub cbSize: u32, pub dwRegPolicySettings: u32, pub fCommercial: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA").field("cbSize", &self.cbSize).field("dwRegPolicySettings", &self.dwRegPolicySettings).field("fCommercial", &self.fCommercial).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwRegPolicySettings == other.dwRegPolicySettings && self.fCommercial == other.fCommercial } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for AUTHENTICODE_TS_EXTRA_CERT_CHAIN_POLICY_PARA { type Abi = Self; } pub const BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_CA_FLAG: u32 = 2147483648u32; pub const BASIC_CONSTRAINTS_CERT_CHAIN_POLICY_END_ENTITY_FLAG: u32 = 1073741824u32; pub const BCRYPTBUFFER_VERSION: u32 = 0u32; pub const BCRYPT_3DES_112_CBC_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(369u32 as _); pub const BCRYPT_3DES_112_CFB_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(401u32 as _); pub const BCRYPT_3DES_112_ECB_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(385u32 as _); pub const BCRYPT_3DES_CBC_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(321u32 as _); pub const BCRYPT_3DES_CFB_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(353u32 as _); pub const BCRYPT_3DES_ECB_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(337u32 as _); pub const BCRYPT_AES_CBC_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(417u32 as _); pub const BCRYPT_AES_CCM_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(465u32 as _); pub const BCRYPT_AES_CFB_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(449u32 as _); pub const BCRYPT_AES_CMAC_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(257u32 as _); pub const BCRYPT_AES_ECB_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(433u32 as _); pub const BCRYPT_AES_GCM_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(481u32 as _); pub const BCRYPT_AES_GMAC_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(273u32 as _); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct BCRYPT_ALGORITHM_IDENTIFIER { pub pszName: super::super::Foundation::PWSTR, pub dwClass: u32, pub dwFlags: u32, } #[cfg(feature = "Win32_Foundation")] impl BCRYPT_ALGORITHM_IDENTIFIER {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for BCRYPT_ALGORITHM_IDENTIFIER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for BCRYPT_ALGORITHM_IDENTIFIER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_ALGORITHM_IDENTIFIER").field("pszName", &self.pszName).field("dwClass", &self.dwClass).field("dwFlags", &self.dwFlags).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for BCRYPT_ALGORITHM_IDENTIFIER { fn eq(&self, other: &Self) -> bool { self.pszName == other.pszName && self.dwClass == other.dwClass && self.dwFlags == other.dwFlags } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for BCRYPT_ALGORITHM_IDENTIFIER {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for BCRYPT_ALGORITHM_IDENTIFIER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy, :: core :: fmt :: Debug, :: core :: cmp :: PartialEq, :: core :: cmp :: Eq)] #[repr(transparent)] pub struct BCRYPT_ALG_HANDLE(pub isize); impl ::core::default::Default for BCRYPT_ALG_HANDLE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } unsafe impl ::windows::core::Handle for BCRYPT_ALG_HANDLE {} unsafe impl ::windows::core::Abi for BCRYPT_ALG_HANDLE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO { pub cbSize: u32, pub dwInfoVersion: u32, pub pbNonce: *mut u8, pub cbNonce: u32, pub pbAuthData: *mut u8, pub cbAuthData: u32, pub pbTag: *mut u8, pub cbTag: u32, pub pbMacContext: *mut u8, pub cbMacContext: u32, pub cbAAD: u32, pub cbData: u64, pub dwFlags: u32, } impl BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO {} impl ::core::default::Default for BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO") .field("cbSize", &self.cbSize) .field("dwInfoVersion", &self.dwInfoVersion) .field("pbNonce", &self.pbNonce) .field("cbNonce", &self.cbNonce) .field("pbAuthData", &self.pbAuthData) .field("cbAuthData", &self.cbAuthData) .field("pbTag", &self.pbTag) .field("cbTag", &self.cbTag) .field("pbMacContext", &self.pbMacContext) .field("cbMacContext", &self.cbMacContext) .field("cbAAD", &self.cbAAD) .field("cbData", &self.cbData) .field("dwFlags", &self.dwFlags) .finish() } } impl ::core::cmp::PartialEq for BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwInfoVersion == other.dwInfoVersion && self.pbNonce == other.pbNonce && self.cbNonce == other.cbNonce && self.pbAuthData == other.pbAuthData && self.cbAuthData == other.cbAuthData && self.pbTag == other.pbTag && self.cbTag == other.cbTag && self.pbMacContext == other.pbMacContext && self.cbMacContext == other.cbMacContext && self.cbAAD == other.cbAAD && self.cbData == other.cbData && self.dwFlags == other.dwFlags } } impl ::core::cmp::Eq for BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO {} unsafe impl ::windows::core::Abi for BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO { type Abi = Self; } pub const BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_VERSION: u32 = 1u32; pub const BCRYPT_AUTH_MODE_CHAIN_CALLS_FLAG: u32 = 1u32; pub const BCRYPT_AUTH_MODE_IN_PROGRESS_FLAG: u32 = 2u32; pub const BCRYPT_BLOCK_PADDING: u32 = 1u32; pub const BCRYPT_BUFFERS_LOCKED_FLAG: u32 = 64u32; pub const BCRYPT_CAPI_AES_FLAG: u32 = 16u32; pub const BCRYPT_CAPI_KDF_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(801u32 as _); pub const BCRYPT_CHACHA20_POLY1305_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(929u32 as _); pub const BCRYPT_DESX_CBC_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(545u32 as _); pub const BCRYPT_DESX_CFB_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(577u32 as _); pub const BCRYPT_DESX_ECB_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(561u32 as _); pub const BCRYPT_DES_CBC_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(497u32 as _); pub const BCRYPT_DES_CFB_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(529u32 as _); pub const BCRYPT_DES_ECB_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(513u32 as _); pub const BCRYPT_DH_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(641u32 as _); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_DH_KEY_BLOB { pub dwMagic: BCRYPT_DH_KEY_BLOB_MAGIC, pub cbKey: u32, } impl BCRYPT_DH_KEY_BLOB {} impl ::core::default::Default for BCRYPT_DH_KEY_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_DH_KEY_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_DH_KEY_BLOB").field("dwMagic", &self.dwMagic).field("cbKey", &self.cbKey).finish() } } impl ::core::cmp::PartialEq for BCRYPT_DH_KEY_BLOB { fn eq(&self, other: &Self) -> bool { self.dwMagic == other.dwMagic && self.cbKey == other.cbKey } } impl ::core::cmp::Eq for BCRYPT_DH_KEY_BLOB {} unsafe impl ::windows::core::Abi for BCRYPT_DH_KEY_BLOB { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BCRYPT_DH_KEY_BLOB_MAGIC(pub u32); pub const BCRYPT_DH_PUBLIC_MAGIC: BCRYPT_DH_KEY_BLOB_MAGIC = BCRYPT_DH_KEY_BLOB_MAGIC(1112557636u32); pub const BCRYPT_DH_PRIVATE_MAGIC: BCRYPT_DH_KEY_BLOB_MAGIC = BCRYPT_DH_KEY_BLOB_MAGIC(1448101956u32); impl ::core::convert::From<u32> for BCRYPT_DH_KEY_BLOB_MAGIC { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BCRYPT_DH_KEY_BLOB_MAGIC { type Abi = Self; } impl ::core::ops::BitOr for BCRYPT_DH_KEY_BLOB_MAGIC { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for BCRYPT_DH_KEY_BLOB_MAGIC { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for BCRYPT_DH_KEY_BLOB_MAGIC { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for BCRYPT_DH_KEY_BLOB_MAGIC { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for BCRYPT_DH_KEY_BLOB_MAGIC { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const BCRYPT_DH_PARAMETERS_MAGIC: u32 = 1297107012u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_DH_PARAMETER_HEADER { pub cbLength: u32, pub dwMagic: u32, pub cbKeyLength: u32, } impl BCRYPT_DH_PARAMETER_HEADER {} impl ::core::default::Default for BCRYPT_DH_PARAMETER_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_DH_PARAMETER_HEADER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_DH_PARAMETER_HEADER").field("cbLength", &self.cbLength).field("dwMagic", &self.dwMagic).field("cbKeyLength", &self.cbKeyLength).finish() } } impl ::core::cmp::PartialEq for BCRYPT_DH_PARAMETER_HEADER { fn eq(&self, other: &Self) -> bool { self.cbLength == other.cbLength && self.dwMagic == other.dwMagic && self.cbKeyLength == other.cbKeyLength } } impl ::core::cmp::Eq for BCRYPT_DH_PARAMETER_HEADER {} unsafe impl ::windows::core::Abi for BCRYPT_DH_PARAMETER_HEADER { type Abi = Self; } pub const BCRYPT_DSA_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(721u32 as _); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_DSA_KEY_BLOB { pub dwMagic: BCRYPT_DSA_MAGIC, pub cbKey: u32, pub Count: [u8; 4], pub Seed: [u8; 20], pub q: [u8; 20], } impl BCRYPT_DSA_KEY_BLOB {} impl ::core::default::Default for BCRYPT_DSA_KEY_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_DSA_KEY_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_DSA_KEY_BLOB").field("dwMagic", &self.dwMagic).field("cbKey", &self.cbKey).field("Count", &self.Count).field("Seed", &self.Seed).field("q", &self.q).finish() } } impl ::core::cmp::PartialEq for BCRYPT_DSA_KEY_BLOB { fn eq(&self, other: &Self) -> bool { self.dwMagic == other.dwMagic && self.cbKey == other.cbKey && self.Count == other.Count && self.Seed == other.Seed && self.q == other.q } } impl ::core::cmp::Eq for BCRYPT_DSA_KEY_BLOB {} unsafe impl ::windows::core::Abi for BCRYPT_DSA_KEY_BLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_DSA_KEY_BLOB_V2 { pub dwMagic: BCRYPT_DSA_MAGIC, pub cbKey: u32, pub hashAlgorithm: HASHALGORITHM_ENUM, pub standardVersion: DSAFIPSVERSION_ENUM, pub cbSeedLength: u32, pub cbGroupSize: u32, pub Count: [u8; 4], } impl BCRYPT_DSA_KEY_BLOB_V2 {} impl ::core::default::Default for BCRYPT_DSA_KEY_BLOB_V2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_DSA_KEY_BLOB_V2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_DSA_KEY_BLOB_V2") .field("dwMagic", &self.dwMagic) .field("cbKey", &self.cbKey) .field("hashAlgorithm", &self.hashAlgorithm) .field("standardVersion", &self.standardVersion) .field("cbSeedLength", &self.cbSeedLength) .field("cbGroupSize", &self.cbGroupSize) .field("Count", &self.Count) .finish() } } impl ::core::cmp::PartialEq for BCRYPT_DSA_KEY_BLOB_V2 { fn eq(&self, other: &Self) -> bool { self.dwMagic == other.dwMagic && self.cbKey == other.cbKey && self.hashAlgorithm == other.hashAlgorithm && self.standardVersion == other.standardVersion && self.cbSeedLength == other.cbSeedLength && self.cbGroupSize == other.cbGroupSize && self.Count == other.Count } } impl ::core::cmp::Eq for BCRYPT_DSA_KEY_BLOB_V2 {} unsafe impl ::windows::core::Abi for BCRYPT_DSA_KEY_BLOB_V2 { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BCRYPT_DSA_MAGIC(pub u32); pub const BCRYPT_DSA_PUBLIC_MAGIC: BCRYPT_DSA_MAGIC = BCRYPT_DSA_MAGIC(1112560452u32); pub const BCRYPT_DSA_PRIVATE_MAGIC: BCRYPT_DSA_MAGIC = BCRYPT_DSA_MAGIC(1448104772u32); impl ::core::convert::From<u32> for BCRYPT_DSA_MAGIC { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BCRYPT_DSA_MAGIC { type Abi = Self; } impl ::core::ops::BitOr for BCRYPT_DSA_MAGIC { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for BCRYPT_DSA_MAGIC { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for BCRYPT_DSA_MAGIC { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for BCRYPT_DSA_MAGIC { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for BCRYPT_DSA_MAGIC { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const BCRYPT_DSA_PARAMETERS_MAGIC: u32 = 1297109828u32; pub const BCRYPT_DSA_PARAMETERS_MAGIC_V2: u32 = 843927620u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_DSA_PARAMETER_HEADER { pub cbLength: u32, pub dwMagic: u32, pub cbKeyLength: u32, pub Count: [u8; 4], pub Seed: [u8; 20], pub q: [u8; 20], } impl BCRYPT_DSA_PARAMETER_HEADER {} impl ::core::default::Default for BCRYPT_DSA_PARAMETER_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_DSA_PARAMETER_HEADER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_DSA_PARAMETER_HEADER").field("cbLength", &self.cbLength).field("dwMagic", &self.dwMagic).field("cbKeyLength", &self.cbKeyLength).field("Count", &self.Count).field("Seed", &self.Seed).field("q", &self.q).finish() } } impl ::core::cmp::PartialEq for BCRYPT_DSA_PARAMETER_HEADER { fn eq(&self, other: &Self) -> bool { self.cbLength == other.cbLength && self.dwMagic == other.dwMagic && self.cbKeyLength == other.cbKeyLength && self.Count == other.Count && self.Seed == other.Seed && self.q == other.q } } impl ::core::cmp::Eq for BCRYPT_DSA_PARAMETER_HEADER {} unsafe impl ::windows::core::Abi for BCRYPT_DSA_PARAMETER_HEADER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_DSA_PARAMETER_HEADER_V2 { pub cbLength: u32, pub dwMagic: u32, pub cbKeyLength: u32, pub hashAlgorithm: HASHALGORITHM_ENUM, pub standardVersion: DSAFIPSVERSION_ENUM, pub cbSeedLength: u32, pub cbGroupSize: u32, pub Count: [u8; 4], } impl BCRYPT_DSA_PARAMETER_HEADER_V2 {} impl ::core::default::Default for BCRYPT_DSA_PARAMETER_HEADER_V2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_DSA_PARAMETER_HEADER_V2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_DSA_PARAMETER_HEADER_V2") .field("cbLength", &self.cbLength) .field("dwMagic", &self.dwMagic) .field("cbKeyLength", &self.cbKeyLength) .field("hashAlgorithm", &self.hashAlgorithm) .field("standardVersion", &self.standardVersion) .field("cbSeedLength", &self.cbSeedLength) .field("cbGroupSize", &self.cbGroupSize) .field("Count", &self.Count) .finish() } } impl ::core::cmp::PartialEq for BCRYPT_DSA_PARAMETER_HEADER_V2 { fn eq(&self, other: &Self) -> bool { self.cbLength == other.cbLength && self.dwMagic == other.dwMagic && self.cbKeyLength == other.cbKeyLength && self.hashAlgorithm == other.hashAlgorithm && self.standardVersion == other.standardVersion && self.cbSeedLength == other.cbSeedLength && self.cbGroupSize == other.cbGroupSize && self.Count == other.Count } } impl ::core::cmp::Eq for BCRYPT_DSA_PARAMETER_HEADER_V2 {} unsafe impl ::windows::core::Abi for BCRYPT_DSA_PARAMETER_HEADER_V2 { type Abi = Self; } pub const BCRYPT_DSA_PRIVATE_MAGIC_V2: u32 = 844517444u32; pub const BCRYPT_DSA_PUBLIC_MAGIC_V2: u32 = 843206724u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_ECCFULLKEY_BLOB { pub dwMagic: u32, pub dwVersion: u32, pub dwCurveType: ECC_CURVE_TYPE_ENUM, pub dwCurveGenerationAlgId: ECC_CURVE_ALG_ID_ENUM, pub cbFieldLength: u32, pub cbSubgroupOrder: u32, pub cbCofactor: u32, pub cbSeed: u32, } impl BCRYPT_ECCFULLKEY_BLOB {} impl ::core::default::Default for BCRYPT_ECCFULLKEY_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_ECCFULLKEY_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_ECCFULLKEY_BLOB") .field("dwMagic", &self.dwMagic) .field("dwVersion", &self.dwVersion) .field("dwCurveType", &self.dwCurveType) .field("dwCurveGenerationAlgId", &self.dwCurveGenerationAlgId) .field("cbFieldLength", &self.cbFieldLength) .field("cbSubgroupOrder", &self.cbSubgroupOrder) .field("cbCofactor", &self.cbCofactor) .field("cbSeed", &self.cbSeed) .finish() } } impl ::core::cmp::PartialEq for BCRYPT_ECCFULLKEY_BLOB { fn eq(&self, other: &Self) -> bool { self.dwMagic == other.dwMagic && self.dwVersion == other.dwVersion && self.dwCurveType == other.dwCurveType && self.dwCurveGenerationAlgId == other.dwCurveGenerationAlgId && self.cbFieldLength == other.cbFieldLength && self.cbSubgroupOrder == other.cbSubgroupOrder && self.cbCofactor == other.cbCofactor && self.cbSeed == other.cbSeed } } impl ::core::cmp::Eq for BCRYPT_ECCFULLKEY_BLOB {} unsafe impl ::windows::core::Abi for BCRYPT_ECCFULLKEY_BLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_ECCKEY_BLOB { pub dwMagic: u32, pub cbKey: u32, } impl BCRYPT_ECCKEY_BLOB {} impl ::core::default::Default for BCRYPT_ECCKEY_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_ECCKEY_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_ECCKEY_BLOB").field("dwMagic", &self.dwMagic).field("cbKey", &self.cbKey).finish() } } impl ::core::cmp::PartialEq for BCRYPT_ECCKEY_BLOB { fn eq(&self, other: &Self) -> bool { self.dwMagic == other.dwMagic && self.cbKey == other.cbKey } } impl ::core::cmp::Eq for BCRYPT_ECCKEY_BLOB {} unsafe impl ::windows::core::Abi for BCRYPT_ECCKEY_BLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct BCRYPT_ECC_CURVE_NAMES { pub dwEccCurveNames: u32, pub pEccCurveNames: *mut super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl BCRYPT_ECC_CURVE_NAMES {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for BCRYPT_ECC_CURVE_NAMES { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for BCRYPT_ECC_CURVE_NAMES { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_ECC_CURVE_NAMES").field("dwEccCurveNames", &self.dwEccCurveNames).field("pEccCurveNames", &self.pEccCurveNames).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for BCRYPT_ECC_CURVE_NAMES { fn eq(&self, other: &Self) -> bool { self.dwEccCurveNames == other.dwEccCurveNames && self.pEccCurveNames == other.pEccCurveNames } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for BCRYPT_ECC_CURVE_NAMES {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for BCRYPT_ECC_CURVE_NAMES { type Abi = Self; } pub const BCRYPT_ECC_FULLKEY_BLOB_V1: u32 = 1u32; pub const BCRYPT_ECC_PARAMETERS_MAGIC: u32 = 1346585413u32; pub const BCRYPT_ECDH_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(657u32 as _); pub const BCRYPT_ECDH_P256_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(673u32 as _); pub const BCRYPT_ECDH_P384_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(689u32 as _); pub const BCRYPT_ECDH_P521_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(705u32 as _); pub const BCRYPT_ECDH_PRIVATE_GENERIC_MAGIC: u32 = 1447772997u32; pub const BCRYPT_ECDH_PRIVATE_P256_MAGIC: u32 = 843793221u32; pub const BCRYPT_ECDH_PRIVATE_P384_MAGIC: u32 = 877347653u32; pub const BCRYPT_ECDH_PRIVATE_P521_MAGIC: u32 = 910902085u32; pub const BCRYPT_ECDH_PUBLIC_GENERIC_MAGIC: u32 = 1347109701u32; pub const BCRYPT_ECDH_PUBLIC_P256_MAGIC: u32 = 827016005u32; pub const BCRYPT_ECDH_PUBLIC_P384_MAGIC: u32 = 860570437u32; pub const BCRYPT_ECDH_PUBLIC_P521_MAGIC: u32 = 894124869u32; pub const BCRYPT_ECDSA_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(241u32 as _); pub const BCRYPT_ECDSA_P256_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(737u32 as _); pub const BCRYPT_ECDSA_P384_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(753u32 as _); pub const BCRYPT_ECDSA_P521_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(769u32 as _); pub const BCRYPT_ECDSA_PRIVATE_GENERIC_MAGIC: u32 = 1447314245u32; pub const BCRYPT_ECDSA_PRIVATE_P256_MAGIC: u32 = 844317509u32; pub const BCRYPT_ECDSA_PRIVATE_P384_MAGIC: u32 = 877871941u32; pub const BCRYPT_ECDSA_PRIVATE_P521_MAGIC: u32 = 911426373u32; pub const BCRYPT_ECDSA_PUBLIC_GENERIC_MAGIC: u32 = 1346650949u32; pub const BCRYPT_ECDSA_PUBLIC_P256_MAGIC: u32 = 827540293u32; pub const BCRYPT_ECDSA_PUBLIC_P384_MAGIC: u32 = 861094725u32; pub const BCRYPT_ECDSA_PUBLIC_P521_MAGIC: u32 = 894649157u32; pub const BCRYPT_ENABLE_INCOMPATIBLE_FIPS_CHECKS: u32 = 256u32; pub const BCRYPT_EXTENDED_KEYSIZE: u32 = 128u32; pub const BCRYPT_GENERATE_IV: u32 = 32u32; pub const BCRYPT_HASH_INTERFACE_MAJORVERSION_2: u32 = 2u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BCRYPT_HASH_OPERATION_TYPE(pub i32); pub const BCRYPT_HASH_OPERATION_HASH_DATA: BCRYPT_HASH_OPERATION_TYPE = BCRYPT_HASH_OPERATION_TYPE(1i32); pub const BCRYPT_HASH_OPERATION_FINISH_HASH: BCRYPT_HASH_OPERATION_TYPE = BCRYPT_HASH_OPERATION_TYPE(2i32); impl ::core::convert::From<i32> for BCRYPT_HASH_OPERATION_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BCRYPT_HASH_OPERATION_TYPE { type Abi = Self; } pub const BCRYPT_HKDF_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(913u32 as _); pub const BCRYPT_HMAC_MD2_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(289u32 as _); pub const BCRYPT_HMAC_MD4_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(305u32 as _); pub const BCRYPT_HMAC_MD5_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(145u32 as _); pub const BCRYPT_HMAC_SHA1_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(161u32 as _); pub const BCRYPT_HMAC_SHA256_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(177u32 as _); pub const BCRYPT_HMAC_SHA384_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(193u32 as _); pub const BCRYPT_HMAC_SHA512_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(209u32 as _); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BCRYPT_INTERFACE(pub u32); pub const BCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE: BCRYPT_INTERFACE = BCRYPT_INTERFACE(3u32); pub const BCRYPT_CIPHER_INTERFACE: BCRYPT_INTERFACE = BCRYPT_INTERFACE(1u32); pub const BCRYPT_HASH_INTERFACE: BCRYPT_INTERFACE = BCRYPT_INTERFACE(2u32); pub const BCRYPT_RNG_INTERFACE: BCRYPT_INTERFACE = BCRYPT_INTERFACE(6u32); pub const BCRYPT_SECRET_AGREEMENT_INTERFACE: BCRYPT_INTERFACE = BCRYPT_INTERFACE(4u32); pub const BCRYPT_SIGNATURE_INTERFACE: BCRYPT_INTERFACE = BCRYPT_INTERFACE(5u32); pub const NCRYPT_KEY_STORAGE_INTERFACE: BCRYPT_INTERFACE = BCRYPT_INTERFACE(65537u32); pub const NCRYPT_SCHANNEL_INTERFACE: BCRYPT_INTERFACE = BCRYPT_INTERFACE(65538u32); pub const NCRYPT_SCHANNEL_SIGNATURE_INTERFACE: BCRYPT_INTERFACE = BCRYPT_INTERFACE(65539u32); impl ::core::convert::From<u32> for BCRYPT_INTERFACE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BCRYPT_INTERFACE { type Abi = Self; } impl ::core::ops::BitOr for BCRYPT_INTERFACE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for BCRYPT_INTERFACE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for BCRYPT_INTERFACE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for BCRYPT_INTERFACE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for BCRYPT_INTERFACE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_INTERFACE_VERSION { pub MajorVersion: u16, pub MinorVersion: u16, } impl BCRYPT_INTERFACE_VERSION {} impl ::core::default::Default for BCRYPT_INTERFACE_VERSION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_INTERFACE_VERSION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_INTERFACE_VERSION").field("MajorVersion", &self.MajorVersion).field("MinorVersion", &self.MinorVersion).finish() } } impl ::core::cmp::PartialEq for BCRYPT_INTERFACE_VERSION { fn eq(&self, other: &Self) -> bool { self.MajorVersion == other.MajorVersion && self.MinorVersion == other.MinorVersion } } impl ::core::cmp::Eq for BCRYPT_INTERFACE_VERSION {} unsafe impl ::windows::core::Abi for BCRYPT_INTERFACE_VERSION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_KEY_BLOB { pub Magic: u32, } impl BCRYPT_KEY_BLOB {} impl ::core::default::Default for BCRYPT_KEY_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_KEY_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_KEY_BLOB").field("Magic", &self.Magic).finish() } } impl ::core::cmp::PartialEq for BCRYPT_KEY_BLOB { fn eq(&self, other: &Self) -> bool { self.Magic == other.Magic } } impl ::core::cmp::Eq for BCRYPT_KEY_BLOB {} unsafe impl ::windows::core::Abi for BCRYPT_KEY_BLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_KEY_DATA_BLOB_HEADER { pub dwMagic: u32, pub dwVersion: u32, pub cbKeyData: u32, } impl BCRYPT_KEY_DATA_BLOB_HEADER {} impl ::core::default::Default for BCRYPT_KEY_DATA_BLOB_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_KEY_DATA_BLOB_HEADER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_KEY_DATA_BLOB_HEADER").field("dwMagic", &self.dwMagic).field("dwVersion", &self.dwVersion).field("cbKeyData", &self.cbKeyData).finish() } } impl ::core::cmp::PartialEq for BCRYPT_KEY_DATA_BLOB_HEADER { fn eq(&self, other: &Self) -> bool { self.dwMagic == other.dwMagic && self.dwVersion == other.dwVersion && self.cbKeyData == other.cbKeyData } } impl ::core::cmp::Eq for BCRYPT_KEY_DATA_BLOB_HEADER {} unsafe impl ::windows::core::Abi for BCRYPT_KEY_DATA_BLOB_HEADER { type Abi = Self; } pub const BCRYPT_KEY_DATA_BLOB_MAGIC: u32 = 1296188491u32; pub const BCRYPT_KEY_DATA_BLOB_VERSION1: u32 = 1u32; pub const BCRYPT_KEY_DERIVATION_INTERFACE: u32 = 7u32; pub const BCRYPT_KEY_DERIVATION_OPERATION: u32 = 64u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy, :: core :: fmt :: Debug, :: core :: cmp :: PartialEq, :: core :: cmp :: Eq)] #[repr(transparent)] pub struct BCRYPT_KEY_HANDLE(pub isize); impl ::core::default::Default for BCRYPT_KEY_HANDLE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } unsafe impl ::windows::core::Handle for BCRYPT_KEY_HANDLE {} unsafe impl ::windows::core::Abi for BCRYPT_KEY_HANDLE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_KEY_LENGTHS_STRUCT { pub dwMinLength: u32, pub dwMaxLength: u32, pub dwIncrement: u32, } impl BCRYPT_KEY_LENGTHS_STRUCT {} impl ::core::default::Default for BCRYPT_KEY_LENGTHS_STRUCT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_KEY_LENGTHS_STRUCT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_KEY_LENGTHS_STRUCT").field("dwMinLength", &self.dwMinLength).field("dwMaxLength", &self.dwMaxLength).field("dwIncrement", &self.dwIncrement).finish() } } impl ::core::cmp::PartialEq for BCRYPT_KEY_LENGTHS_STRUCT { fn eq(&self, other: &Self) -> bool { self.dwMinLength == other.dwMinLength && self.dwMaxLength == other.dwMaxLength && self.dwIncrement == other.dwIncrement } } impl ::core::cmp::Eq for BCRYPT_KEY_LENGTHS_STRUCT {} unsafe impl ::windows::core::Abi for BCRYPT_KEY_LENGTHS_STRUCT { type Abi = Self; } pub const BCRYPT_KEY_VALIDATION_RANGE: u32 = 16u32; pub const BCRYPT_KEY_VALIDATION_RANGE_AND_ORDER: u32 = 24u32; pub const BCRYPT_KEY_VALIDATION_REGENERATE: u32 = 32u32; pub const BCRYPT_MD2_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(1u32 as _); pub const BCRYPT_MD4_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(17u32 as _); pub const BCRYPT_MD5_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(33u32 as _); pub const BCRYPT_MULTI_FLAG: u32 = 64u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_MULTI_HASH_OPERATION { pub iHash: u32, pub hashOperation: BCRYPT_HASH_OPERATION_TYPE, pub pbBuffer: *mut u8, pub cbBuffer: u32, } impl BCRYPT_MULTI_HASH_OPERATION {} impl ::core::default::Default for BCRYPT_MULTI_HASH_OPERATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_MULTI_HASH_OPERATION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_MULTI_HASH_OPERATION").field("iHash", &self.iHash).field("hashOperation", &self.hashOperation).field("pbBuffer", &self.pbBuffer).field("cbBuffer", &self.cbBuffer).finish() } } impl ::core::cmp::PartialEq for BCRYPT_MULTI_HASH_OPERATION { fn eq(&self, other: &Self) -> bool { self.iHash == other.iHash && self.hashOperation == other.hashOperation && self.pbBuffer == other.pbBuffer && self.cbBuffer == other.cbBuffer } } impl ::core::cmp::Eq for BCRYPT_MULTI_HASH_OPERATION {} unsafe impl ::windows::core::Abi for BCRYPT_MULTI_HASH_OPERATION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_MULTI_OBJECT_LENGTH_STRUCT { pub cbPerObject: u32, pub cbPerElement: u32, } impl BCRYPT_MULTI_OBJECT_LENGTH_STRUCT {} impl ::core::default::Default for BCRYPT_MULTI_OBJECT_LENGTH_STRUCT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_MULTI_OBJECT_LENGTH_STRUCT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_MULTI_OBJECT_LENGTH_STRUCT").field("cbPerObject", &self.cbPerObject).field("cbPerElement", &self.cbPerElement).finish() } } impl ::core::cmp::PartialEq for BCRYPT_MULTI_OBJECT_LENGTH_STRUCT { fn eq(&self, other: &Self) -> bool { self.cbPerObject == other.cbPerObject && self.cbPerElement == other.cbPerElement } } impl ::core::cmp::Eq for BCRYPT_MULTI_OBJECT_LENGTH_STRUCT {} unsafe impl ::windows::core::Abi for BCRYPT_MULTI_OBJECT_LENGTH_STRUCT { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BCRYPT_MULTI_OPERATION_TYPE(pub i32); pub const BCRYPT_OPERATION_TYPE_HASH: BCRYPT_MULTI_OPERATION_TYPE = BCRYPT_MULTI_OPERATION_TYPE(1i32); impl ::core::convert::From<i32> for BCRYPT_MULTI_OPERATION_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BCRYPT_MULTI_OPERATION_TYPE { type Abi = Self; } pub const BCRYPT_NO_KEY_VALIDATION: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct BCRYPT_OAEP_PADDING_INFO { pub pszAlgId: super::super::Foundation::PWSTR, pub pbLabel: *mut u8, pub cbLabel: u32, } #[cfg(feature = "Win32_Foundation")] impl BCRYPT_OAEP_PADDING_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for BCRYPT_OAEP_PADDING_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for BCRYPT_OAEP_PADDING_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_OAEP_PADDING_INFO").field("pszAlgId", &self.pszAlgId).field("pbLabel", &self.pbLabel).field("cbLabel", &self.cbLabel).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for BCRYPT_OAEP_PADDING_INFO { fn eq(&self, other: &Self) -> bool { self.pszAlgId == other.pszAlgId && self.pbLabel == other.pbLabel && self.cbLabel == other.cbLabel } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for BCRYPT_OAEP_PADDING_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for BCRYPT_OAEP_PADDING_INFO { type Abi = Self; } pub const BCRYPT_OBJECT_ALIGNMENT: u32 = 16u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_OID { pub cbOID: u32, pub pbOID: *mut u8, } impl BCRYPT_OID {} impl ::core::default::Default for BCRYPT_OID { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_OID { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_OID").field("cbOID", &self.cbOID).field("pbOID", &self.pbOID).finish() } } impl ::core::cmp::PartialEq for BCRYPT_OID { fn eq(&self, other: &Self) -> bool { self.cbOID == other.cbOID && self.pbOID == other.pbOID } } impl ::core::cmp::Eq for BCRYPT_OID {} unsafe impl ::windows::core::Abi for BCRYPT_OID { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_OID_LIST { pub dwOIDCount: u32, pub pOIDs: *mut BCRYPT_OID, } impl BCRYPT_OID_LIST {} impl ::core::default::Default for BCRYPT_OID_LIST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_OID_LIST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_OID_LIST").field("dwOIDCount", &self.dwOIDCount).field("pOIDs", &self.pOIDs).finish() } } impl ::core::cmp::PartialEq for BCRYPT_OID_LIST { fn eq(&self, other: &Self) -> bool { self.dwOIDCount == other.dwOIDCount && self.pOIDs == other.pOIDs } } impl ::core::cmp::Eq for BCRYPT_OID_LIST {} unsafe impl ::windows::core::Abi for BCRYPT_OID_LIST { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS(pub u32); pub const BCRYPT_ALG_HANDLE_HMAC_FLAG: BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS = BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS(8u32); pub const BCRYPT_PROV_DISPATCH: BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS = BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS(1u32); pub const BCRYPT_HASH_REUSABLE_FLAG: BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS = BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS(32u32); impl ::core::convert::From<u32> for BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BCRYPT_OPERATION(pub u32); pub const BCRYPT_CIPHER_OPERATION: BCRYPT_OPERATION = BCRYPT_OPERATION(1u32); pub const BCRYPT_HASH_OPERATION: BCRYPT_OPERATION = BCRYPT_OPERATION(2u32); pub const BCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION: BCRYPT_OPERATION = BCRYPT_OPERATION(4u32); pub const BCRYPT_SECRET_AGREEMENT_OPERATION: BCRYPT_OPERATION = BCRYPT_OPERATION(8u32); pub const BCRYPT_SIGNATURE_OPERATION: BCRYPT_OPERATION = BCRYPT_OPERATION(16u32); pub const BCRYPT_RNG_OPERATION: BCRYPT_OPERATION = BCRYPT_OPERATION(32u32); impl ::core::convert::From<u32> for BCRYPT_OPERATION { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BCRYPT_OPERATION { type Abi = Self; } impl ::core::ops::BitOr for BCRYPT_OPERATION { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for BCRYPT_OPERATION { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for BCRYPT_OPERATION { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for BCRYPT_OPERATION { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for BCRYPT_OPERATION { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const BCRYPT_PAD_PKCS1_OPTIONAL_HASH_OID: u32 = 16u32; pub const BCRYPT_PBKDF2_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(817u32 as _); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct BCRYPT_PKCS1_PADDING_INFO { pub pszAlgId: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl BCRYPT_PKCS1_PADDING_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for BCRYPT_PKCS1_PADDING_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for BCRYPT_PKCS1_PADDING_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_PKCS1_PADDING_INFO").field("pszAlgId", &self.pszAlgId).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for BCRYPT_PKCS1_PADDING_INFO { fn eq(&self, other: &Self) -> bool { self.pszAlgId == other.pszAlgId } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for BCRYPT_PKCS1_PADDING_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for BCRYPT_PKCS1_PADDING_INFO { type Abi = Self; } pub const BCRYPT_PRIVATE_KEY_FLAG: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct BCRYPT_PROVIDER_NAME { pub pszProviderName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl BCRYPT_PROVIDER_NAME {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for BCRYPT_PROVIDER_NAME { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for BCRYPT_PROVIDER_NAME { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_PROVIDER_NAME").field("pszProviderName", &self.pszProviderName).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for BCRYPT_PROVIDER_NAME { fn eq(&self, other: &Self) -> bool { self.pszProviderName == other.pszProviderName } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for BCRYPT_PROVIDER_NAME {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for BCRYPT_PROVIDER_NAME { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct BCRYPT_PSS_PADDING_INFO { pub pszAlgId: super::super::Foundation::PWSTR, pub cbSalt: u32, } #[cfg(feature = "Win32_Foundation")] impl BCRYPT_PSS_PADDING_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for BCRYPT_PSS_PADDING_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for BCRYPT_PSS_PADDING_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_PSS_PADDING_INFO").field("pszAlgId", &self.pszAlgId).field("cbSalt", &self.cbSalt).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for BCRYPT_PSS_PADDING_INFO { fn eq(&self, other: &Self) -> bool { self.pszAlgId == other.pszAlgId && self.cbSalt == other.cbSalt } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for BCRYPT_PSS_PADDING_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for BCRYPT_PSS_PADDING_INFO { type Abi = Self; } pub const BCRYPT_PUBLIC_KEY_FLAG: u32 = 1u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BCRYPT_QUERY_PROVIDER_MODE(pub u32); pub const CRYPT_ANY: BCRYPT_QUERY_PROVIDER_MODE = BCRYPT_QUERY_PROVIDER_MODE(4u32); pub const CRYPT_UM: BCRYPT_QUERY_PROVIDER_MODE = BCRYPT_QUERY_PROVIDER_MODE(1u32); pub const CRYPT_KM: BCRYPT_QUERY_PROVIDER_MODE = BCRYPT_QUERY_PROVIDER_MODE(2u32); pub const CRYPT_MM: BCRYPT_QUERY_PROVIDER_MODE = BCRYPT_QUERY_PROVIDER_MODE(3u32); impl ::core::convert::From<u32> for BCRYPT_QUERY_PROVIDER_MODE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BCRYPT_QUERY_PROVIDER_MODE { type Abi = Self; } impl ::core::ops::BitOr for BCRYPT_QUERY_PROVIDER_MODE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for BCRYPT_QUERY_PROVIDER_MODE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for BCRYPT_QUERY_PROVIDER_MODE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for BCRYPT_QUERY_PROVIDER_MODE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for BCRYPT_QUERY_PROVIDER_MODE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const BCRYPT_RC2_CBC_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(593u32 as _); pub const BCRYPT_RC2_CFB_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(625u32 as _); pub const BCRYPT_RC2_ECB_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(609u32 as _); pub const BCRYPT_RC4_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(113u32 as _); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BCRYPT_RESOLVE_PROVIDERS_FLAGS(pub u32); pub const CRYPT_ALL_FUNCTIONS: BCRYPT_RESOLVE_PROVIDERS_FLAGS = BCRYPT_RESOLVE_PROVIDERS_FLAGS(1u32); pub const CRYPT_ALL_PROVIDERS: BCRYPT_RESOLVE_PROVIDERS_FLAGS = BCRYPT_RESOLVE_PROVIDERS_FLAGS(2u32); impl ::core::convert::From<u32> for BCRYPT_RESOLVE_PROVIDERS_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BCRYPT_RESOLVE_PROVIDERS_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for BCRYPT_RESOLVE_PROVIDERS_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for BCRYPT_RESOLVE_PROVIDERS_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for BCRYPT_RESOLVE_PROVIDERS_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for BCRYPT_RESOLVE_PROVIDERS_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for BCRYPT_RESOLVE_PROVIDERS_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const BCRYPT_RNG_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(129u32 as _); pub const BCRYPT_RNG_USE_ENTROPY_IN_BUFFER: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCRYPT_RSAKEY_BLOB { pub Magic: BCRYPT_RSAKEY_BLOB_MAGIC, pub BitLength: u32, pub cbPublicExp: u32, pub cbModulus: u32, pub cbPrime1: u32, pub cbPrime2: u32, } impl BCRYPT_RSAKEY_BLOB {} impl ::core::default::Default for BCRYPT_RSAKEY_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCRYPT_RSAKEY_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCRYPT_RSAKEY_BLOB").field("Magic", &self.Magic).field("BitLength", &self.BitLength).field("cbPublicExp", &self.cbPublicExp).field("cbModulus", &self.cbModulus).field("cbPrime1", &self.cbPrime1).field("cbPrime2", &self.cbPrime2).finish() } } impl ::core::cmp::PartialEq for BCRYPT_RSAKEY_BLOB { fn eq(&self, other: &Self) -> bool { self.Magic == other.Magic && self.BitLength == other.BitLength && self.cbPublicExp == other.cbPublicExp && self.cbModulus == other.cbModulus && self.cbPrime1 == other.cbPrime1 && self.cbPrime2 == other.cbPrime2 } } impl ::core::cmp::Eq for BCRYPT_RSAKEY_BLOB {} unsafe impl ::windows::core::Abi for BCRYPT_RSAKEY_BLOB { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BCRYPT_RSAKEY_BLOB_MAGIC(pub u32); pub const BCRYPT_RSAPUBLIC_MAGIC: BCRYPT_RSAKEY_BLOB_MAGIC = BCRYPT_RSAKEY_BLOB_MAGIC(826364754u32); pub const BCRYPT_RSAPRIVATE_MAGIC: BCRYPT_RSAKEY_BLOB_MAGIC = BCRYPT_RSAKEY_BLOB_MAGIC(843141970u32); pub const BCRYPT_RSAFULLPRIVATE_MAGIC: BCRYPT_RSAKEY_BLOB_MAGIC = BCRYPT_RSAKEY_BLOB_MAGIC(859919186u32); impl ::core::convert::From<u32> for BCRYPT_RSAKEY_BLOB_MAGIC { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BCRYPT_RSAKEY_BLOB_MAGIC { type Abi = Self; } impl ::core::ops::BitOr for BCRYPT_RSAKEY_BLOB_MAGIC { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for BCRYPT_RSAKEY_BLOB_MAGIC { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for BCRYPT_RSAKEY_BLOB_MAGIC { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for BCRYPT_RSAKEY_BLOB_MAGIC { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for BCRYPT_RSAKEY_BLOB_MAGIC { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const BCRYPT_RSA_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(225u32 as _); pub const BCRYPT_RSA_SIGN_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(785u32 as _); pub const BCRYPT_SHA1_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(49u32 as _); pub const BCRYPT_SHA256_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(65u32 as _); pub const BCRYPT_SHA384_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(81u32 as _); pub const BCRYPT_SHA512_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(97u32 as _); pub const BCRYPT_SP800108_CTR_HMAC_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(833u32 as _); pub const BCRYPT_SP80056A_CONCAT_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(849u32 as _); pub const BCRYPT_SUPPORTED_PAD_OAEP: u32 = 8u32; pub const BCRYPT_SUPPORTED_PAD_PKCS1_ENC: u32 = 2u32; pub const BCRYPT_SUPPORTED_PAD_PKCS1_SIG: u32 = 4u32; pub const BCRYPT_SUPPORTED_PAD_PSS: u32 = 16u32; pub const BCRYPT_SUPPORTED_PAD_ROUTER: u32 = 1u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct BCRYPT_TABLE(pub u32); pub const CRYPT_LOCAL: BCRYPT_TABLE = BCRYPT_TABLE(1u32); pub const CRYPT_DOMAIN: BCRYPT_TABLE = BCRYPT_TABLE(2u32); impl ::core::convert::From<u32> for BCRYPT_TABLE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for BCRYPT_TABLE { type Abi = Self; } impl ::core::ops::BitOr for BCRYPT_TABLE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for BCRYPT_TABLE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for BCRYPT_TABLE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for BCRYPT_TABLE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for BCRYPT_TABLE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const BCRYPT_TLS1_1_KDF_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(865u32 as _); pub const BCRYPT_TLS1_2_KDF_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(881u32 as _); pub const BCRYPT_TLS_CBC_HMAC_VERIFY_FLAG: u32 = 4u32; pub const BCRYPT_USE_SYSTEM_PREFERRED_RNG: u32 = 2u32; pub const BCRYPT_XTS_AES_ALG_HANDLE: BCRYPT_ALG_HANDLE = BCRYPT_ALG_HANDLE(897u32 as _); #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptAddContextFunction<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwtable: BCRYPT_TABLE, pszcontext: Param1, dwinterface: BCRYPT_INTERFACE, pszfunction: Param3, dwposition: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptAddContextFunction(dwtable: BCRYPT_TABLE, pszcontext: super::super::Foundation::PWSTR, dwinterface: BCRYPT_INTERFACE, pszfunction: super::super::Foundation::PWSTR, dwposition: u32) -> super::super::Foundation::NTSTATUS; } BCryptAddContextFunction(::core::mem::transmute(dwtable), pszcontext.into_param().abi(), ::core::mem::transmute(dwinterface), pszfunction.into_param().abi(), ::core::mem::transmute(dwposition)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCryptBuffer { pub cbBuffer: u32, pub BufferType: u32, pub pvBuffer: *mut ::core::ffi::c_void, } impl BCryptBuffer {} impl ::core::default::Default for BCryptBuffer { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCryptBuffer { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCryptBuffer").field("cbBuffer", &self.cbBuffer).field("BufferType", &self.BufferType).field("pvBuffer", &self.pvBuffer).finish() } } impl ::core::cmp::PartialEq for BCryptBuffer { fn eq(&self, other: &Self) -> bool { self.cbBuffer == other.cbBuffer && self.BufferType == other.BufferType && self.pvBuffer == other.pvBuffer } } impl ::core::cmp::Eq for BCryptBuffer {} unsafe impl ::windows::core::Abi for BCryptBuffer { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BCryptBufferDesc { pub ulVersion: u32, pub cBuffers: u32, pub pBuffers: *mut BCryptBuffer, } impl BCryptBufferDesc {} impl ::core::default::Default for BCryptBufferDesc { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BCryptBufferDesc { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("BCryptBufferDesc").field("ulVersion", &self.ulVersion).field("cBuffers", &self.cBuffers).field("pBuffers", &self.pBuffers).finish() } } impl ::core::cmp::PartialEq for BCryptBufferDesc { fn eq(&self, other: &Self) -> bool { self.ulVersion == other.ulVersion && self.cBuffers == other.cBuffers && self.pBuffers == other.pBuffers } } impl ::core::cmp::Eq for BCryptBufferDesc {} unsafe impl ::windows::core::Abi for BCryptBufferDesc { type Abi = Self; } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptCloseAlgorithmProvider<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_ALG_HANDLE>>(halgorithm: Param0, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptCloseAlgorithmProvider(halgorithm: BCRYPT_ALG_HANDLE, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptCloseAlgorithmProvider(halgorithm.into_param().abi(), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptConfigureContext<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwtable: BCRYPT_TABLE, pszcontext: Param1, pconfig: *const CRYPT_CONTEXT_CONFIG) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptConfigureContext(dwtable: BCRYPT_TABLE, pszcontext: super::super::Foundation::PWSTR, pconfig: *const CRYPT_CONTEXT_CONFIG) -> super::super::Foundation::NTSTATUS; } BCryptConfigureContext(::core::mem::transmute(dwtable), pszcontext.into_param().abi(), ::core::mem::transmute(pconfig)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptConfigureContextFunction<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwtable: BCRYPT_TABLE, pszcontext: Param1, dwinterface: BCRYPT_INTERFACE, pszfunction: Param3, pconfig: *const CRYPT_CONTEXT_FUNCTION_CONFIG) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptConfigureContextFunction(dwtable: BCRYPT_TABLE, pszcontext: super::super::Foundation::PWSTR, dwinterface: BCRYPT_INTERFACE, pszfunction: super::super::Foundation::PWSTR, pconfig: *const CRYPT_CONTEXT_FUNCTION_CONFIG) -> super::super::Foundation::NTSTATUS; } BCryptConfigureContextFunction(::core::mem::transmute(dwtable), pszcontext.into_param().abi(), ::core::mem::transmute(dwinterface), pszfunction.into_param().abi(), ::core::mem::transmute(pconfig)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptCreateContext<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwtable: BCRYPT_TABLE, pszcontext: Param1, pconfig: *const CRYPT_CONTEXT_CONFIG) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptCreateContext(dwtable: BCRYPT_TABLE, pszcontext: super::super::Foundation::PWSTR, pconfig: *const CRYPT_CONTEXT_CONFIG) -> super::super::Foundation::NTSTATUS; } BCryptCreateContext(::core::mem::transmute(dwtable), pszcontext.into_param().abi(), ::core::mem::transmute(pconfig)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptCreateHash<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_ALG_HANDLE>>(halgorithm: Param0, phhash: *mut *mut ::core::ffi::c_void, pbhashobject: *mut u8, cbhashobject: u32, pbsecret: *const u8, cbsecret: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptCreateHash(halgorithm: BCRYPT_ALG_HANDLE, phhash: *mut *mut ::core::ffi::c_void, pbhashobject: *mut u8, cbhashobject: u32, pbsecret: *const u8, cbsecret: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptCreateHash(halgorithm.into_param().abi(), ::core::mem::transmute(phhash), ::core::mem::transmute(pbhashobject), ::core::mem::transmute(cbhashobject), ::core::mem::transmute(pbsecret), ::core::mem::transmute(cbsecret), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptCreateMultiHash<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_ALG_HANDLE>>(halgorithm: Param0, phhash: *mut *mut ::core::ffi::c_void, nhashes: u32, pbhashobject: *mut u8, cbhashobject: u32, pbsecret: *const u8, cbsecret: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptCreateMultiHash(halgorithm: BCRYPT_ALG_HANDLE, phhash: *mut *mut ::core::ffi::c_void, nhashes: u32, pbhashobject: *mut u8, cbhashobject: u32, pbsecret: *const u8, cbsecret: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptCreateMultiHash(halgorithm.into_param().abi(), ::core::mem::transmute(phhash), ::core::mem::transmute(nhashes), ::core::mem::transmute(pbhashobject), ::core::mem::transmute(cbhashobject), ::core::mem::transmute(pbsecret), ::core::mem::transmute(cbsecret), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptDecrypt<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>>(hkey: Param0, pbinput: *const u8, cbinput: u32, ppaddinginfo: *const ::core::ffi::c_void, pbiv: *mut u8, cbiv: u32, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptDecrypt(hkey: BCRYPT_KEY_HANDLE, pbinput: *const u8, cbinput: u32, ppaddinginfo: *const ::core::ffi::c_void, pbiv: *mut u8, cbiv: u32, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> super::super::Foundation::NTSTATUS; } BCryptDecrypt( hkey.into_param().abi(), ::core::mem::transmute(pbinput), ::core::mem::transmute(cbinput), ::core::mem::transmute(ppaddinginfo), ::core::mem::transmute(pbiv), ::core::mem::transmute(cbiv), ::core::mem::transmute(pboutput), ::core::mem::transmute(cboutput), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags), ) .ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptDeleteContext<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwtable: BCRYPT_TABLE, pszcontext: Param1) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptDeleteContext(dwtable: BCRYPT_TABLE, pszcontext: super::super::Foundation::PWSTR) -> super::super::Foundation::NTSTATUS; } BCryptDeleteContext(::core::mem::transmute(dwtable), pszcontext.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptDeriveKey<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hsharedsecret: *const ::core::ffi::c_void, pwszkdf: Param1, pparameterlist: *const BCryptBufferDesc, pbderivedkey: *mut u8, cbderivedkey: u32, pcbresult: *mut u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptDeriveKey(hsharedsecret: *const ::core::ffi::c_void, pwszkdf: super::super::Foundation::PWSTR, pparameterlist: *const BCryptBufferDesc, pbderivedkey: *mut u8, cbderivedkey: u32, pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptDeriveKey(::core::mem::transmute(hsharedsecret), pwszkdf.into_param().abi(), ::core::mem::transmute(pparameterlist), ::core::mem::transmute(pbderivedkey), ::core::mem::transmute(cbderivedkey), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptDeriveKeyCapi<'a, Param1: ::windows::core::IntoParam<'a, BCRYPT_ALG_HANDLE>>(hhash: *const ::core::ffi::c_void, htargetalg: Param1, pbderivedkey: *mut u8, cbderivedkey: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptDeriveKeyCapi(hhash: *const ::core::ffi::c_void, htargetalg: BCRYPT_ALG_HANDLE, pbderivedkey: *mut u8, cbderivedkey: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptDeriveKeyCapi(::core::mem::transmute(hhash), htargetalg.into_param().abi(), ::core::mem::transmute(pbderivedkey), ::core::mem::transmute(cbderivedkey), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptDeriveKeyPBKDF2<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_ALG_HANDLE>>(hprf: Param0, pbpassword: *const u8, cbpassword: u32, pbsalt: *const u8, cbsalt: u32, citerations: u64, pbderivedkey: *mut u8, cbderivedkey: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptDeriveKeyPBKDF2(hprf: BCRYPT_ALG_HANDLE, pbpassword: *const u8, cbpassword: u32, pbsalt: *const u8, cbsalt: u32, citerations: u64, pbderivedkey: *mut u8, cbderivedkey: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptDeriveKeyPBKDF2( hprf.into_param().abi(), ::core::mem::transmute(pbpassword), ::core::mem::transmute(cbpassword), ::core::mem::transmute(pbsalt), ::core::mem::transmute(cbsalt), ::core::mem::transmute(citerations), ::core::mem::transmute(pbderivedkey), ::core::mem::transmute(cbderivedkey), ::core::mem::transmute(dwflags), ) .ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptDestroyHash(hhash: *mut ::core::ffi::c_void) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptDestroyHash(hhash: *mut ::core::ffi::c_void) -> super::super::Foundation::NTSTATUS; } BCryptDestroyHash(::core::mem::transmute(hhash)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptDestroyKey<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>>(hkey: Param0) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptDestroyKey(hkey: BCRYPT_KEY_HANDLE) -> super::super::Foundation::NTSTATUS; } BCryptDestroyKey(hkey.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptDestroySecret(hsecret: *mut ::core::ffi::c_void) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptDestroySecret(hsecret: *mut ::core::ffi::c_void) -> super::super::Foundation::NTSTATUS; } BCryptDestroySecret(::core::mem::transmute(hsecret)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptDuplicateHash(hhash: *const ::core::ffi::c_void, phnewhash: *mut *mut ::core::ffi::c_void, pbhashobject: *mut u8, cbhashobject: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptDuplicateHash(hhash: *const ::core::ffi::c_void, phnewhash: *mut *mut ::core::ffi::c_void, pbhashobject: *mut u8, cbhashobject: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptDuplicateHash(::core::mem::transmute(hhash), ::core::mem::transmute(phnewhash), ::core::mem::transmute(pbhashobject), ::core::mem::transmute(cbhashobject), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptDuplicateKey<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>>(hkey: Param0, phnewkey: *mut BCRYPT_KEY_HANDLE, pbkeyobject: *mut u8, cbkeyobject: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptDuplicateKey(hkey: BCRYPT_KEY_HANDLE, phnewkey: *mut BCRYPT_KEY_HANDLE, pbkeyobject: *mut u8, cbkeyobject: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptDuplicateKey(hkey.into_param().abi(), ::core::mem::transmute(phnewkey), ::core::mem::transmute(pbkeyobject), ::core::mem::transmute(cbkeyobject), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptEncrypt<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>>(hkey: Param0, pbinput: *const u8, cbinput: u32, ppaddinginfo: *const ::core::ffi::c_void, pbiv: *mut u8, cbiv: u32, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptEncrypt(hkey: BCRYPT_KEY_HANDLE, pbinput: *const u8, cbinput: u32, ppaddinginfo: *const ::core::ffi::c_void, pbiv: *mut u8, cbiv: u32, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> super::super::Foundation::NTSTATUS; } BCryptEncrypt( hkey.into_param().abi(), ::core::mem::transmute(pbinput), ::core::mem::transmute(cbinput), ::core::mem::transmute(ppaddinginfo), ::core::mem::transmute(pbiv), ::core::mem::transmute(cbiv), ::core::mem::transmute(pboutput), ::core::mem::transmute(cboutput), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags), ) .ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptEnumAlgorithms(dwalgoperations: BCRYPT_OPERATION, palgcount: *mut u32, ppalglist: *mut *mut BCRYPT_ALGORITHM_IDENTIFIER, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptEnumAlgorithms(dwalgoperations: BCRYPT_OPERATION, palgcount: *mut u32, ppalglist: *mut *mut BCRYPT_ALGORITHM_IDENTIFIER, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptEnumAlgorithms(::core::mem::transmute(dwalgoperations), ::core::mem::transmute(palgcount), ::core::mem::transmute(ppalglist), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptEnumContextFunctionProviders<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwtable: BCRYPT_TABLE, pszcontext: Param1, dwinterface: BCRYPT_INTERFACE, pszfunction: Param3, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_CONTEXT_FUNCTION_PROVIDERS) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptEnumContextFunctionProviders(dwtable: BCRYPT_TABLE, pszcontext: super::super::Foundation::PWSTR, dwinterface: BCRYPT_INTERFACE, pszfunction: super::super::Foundation::PWSTR, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_CONTEXT_FUNCTION_PROVIDERS) -> super::super::Foundation::NTSTATUS; } BCryptEnumContextFunctionProviders(::core::mem::transmute(dwtable), pszcontext.into_param().abi(), ::core::mem::transmute(dwinterface), pszfunction.into_param().abi(), ::core::mem::transmute(pcbbuffer), ::core::mem::transmute(ppbuffer)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptEnumContextFunctions<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwtable: BCRYPT_TABLE, pszcontext: Param1, dwinterface: BCRYPT_INTERFACE, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_CONTEXT_FUNCTIONS) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptEnumContextFunctions(dwtable: BCRYPT_TABLE, pszcontext: super::super::Foundation::PWSTR, dwinterface: BCRYPT_INTERFACE, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_CONTEXT_FUNCTIONS) -> super::super::Foundation::NTSTATUS; } BCryptEnumContextFunctions(::core::mem::transmute(dwtable), pszcontext.into_param().abi(), ::core::mem::transmute(dwinterface), ::core::mem::transmute(pcbbuffer), ::core::mem::transmute(ppbuffer)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptEnumContexts(dwtable: BCRYPT_TABLE, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_CONTEXTS) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptEnumContexts(dwtable: BCRYPT_TABLE, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_CONTEXTS) -> super::super::Foundation::NTSTATUS; } BCryptEnumContexts(::core::mem::transmute(dwtable), ::core::mem::transmute(pcbbuffer), ::core::mem::transmute(ppbuffer)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptEnumProviders<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszalgid: Param0, pimplcount: *mut u32, ppimpllist: *mut *mut BCRYPT_PROVIDER_NAME, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptEnumProviders(pszalgid: super::super::Foundation::PWSTR, pimplcount: *mut u32, ppimpllist: *mut *mut BCRYPT_PROVIDER_NAME, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptEnumProviders(pszalgid.into_param().abi(), ::core::mem::transmute(pimplcount), ::core::mem::transmute(ppimpllist), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptEnumRegisteredProviders(pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_PROVIDERS) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptEnumRegisteredProviders(pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_PROVIDERS) -> super::super::Foundation::NTSTATUS; } BCryptEnumRegisteredProviders(::core::mem::transmute(pcbbuffer), ::core::mem::transmute(ppbuffer)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptExportKey<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>, Param1: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hkey: Param0, hexportkey: Param1, pszblobtype: Param2, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptExportKey(hkey: BCRYPT_KEY_HANDLE, hexportkey: BCRYPT_KEY_HANDLE, pszblobtype: super::super::Foundation::PWSTR, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptExportKey(hkey.into_param().abi(), hexportkey.into_param().abi(), pszblobtype.into_param().abi(), ::core::mem::transmute(pboutput), ::core::mem::transmute(cboutput), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptFinalizeKeyPair<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>>(hkey: Param0, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptFinalizeKeyPair(hkey: BCRYPT_KEY_HANDLE, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptFinalizeKeyPair(hkey.into_param().abi(), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptFinishHash(hhash: *mut ::core::ffi::c_void, pboutput: *mut u8, cboutput: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptFinishHash(hhash: *mut ::core::ffi::c_void, pboutput: *mut u8, cboutput: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptFinishHash(::core::mem::transmute(hhash), ::core::mem::transmute(pboutput), ::core::mem::transmute(cboutput), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn BCryptFreeBuffer(pvbuffer: *const ::core::ffi::c_void) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptFreeBuffer(pvbuffer: *const ::core::ffi::c_void); } ::core::mem::transmute(BCryptFreeBuffer(::core::mem::transmute(pvbuffer))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptGenRandom<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_ALG_HANDLE>>(halgorithm: Param0, pbbuffer: *mut u8, cbbuffer: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptGenRandom(halgorithm: BCRYPT_ALG_HANDLE, pbbuffer: *mut u8, cbbuffer: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptGenRandom(halgorithm.into_param().abi(), ::core::mem::transmute(pbbuffer), ::core::mem::transmute(cbbuffer), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptGenerateKeyPair<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_ALG_HANDLE>>(halgorithm: Param0, phkey: *mut BCRYPT_KEY_HANDLE, dwlength: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptGenerateKeyPair(halgorithm: BCRYPT_ALG_HANDLE, phkey: *mut BCRYPT_KEY_HANDLE, dwlength: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptGenerateKeyPair(halgorithm.into_param().abi(), ::core::mem::transmute(phkey), ::core::mem::transmute(dwlength), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptGenerateSymmetricKey<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_ALG_HANDLE>>(halgorithm: Param0, phkey: *mut BCRYPT_KEY_HANDLE, pbkeyobject: *mut u8, cbkeyobject: u32, pbsecret: *const u8, cbsecret: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptGenerateSymmetricKey(halgorithm: BCRYPT_ALG_HANDLE, phkey: *mut BCRYPT_KEY_HANDLE, pbkeyobject: *mut u8, cbkeyobject: u32, pbsecret: *const u8, cbsecret: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptGenerateSymmetricKey(halgorithm.into_param().abi(), ::core::mem::transmute(phkey), ::core::mem::transmute(pbkeyobject), ::core::mem::transmute(cbkeyobject), ::core::mem::transmute(pbsecret), ::core::mem::transmute(cbsecret), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptGetFipsAlgorithmMode(pfenabled: *mut u8) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptGetFipsAlgorithmMode(pfenabled: *mut u8) -> super::super::Foundation::NTSTATUS; } BCryptGetFipsAlgorithmMode(::core::mem::transmute(pfenabled)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptGetProperty<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hobject: *const ::core::ffi::c_void, pszproperty: Param1, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptGetProperty(hobject: *const ::core::ffi::c_void, pszproperty: super::super::Foundation::PWSTR, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptGetProperty(::core::mem::transmute(hobject), pszproperty.into_param().abi(), ::core::mem::transmute(pboutput), ::core::mem::transmute(cboutput), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptHash<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_ALG_HANDLE>>(halgorithm: Param0, pbsecret: *const u8, cbsecret: u32, pbinput: *const u8, cbinput: u32, pboutput: *mut u8, cboutput: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptHash(halgorithm: BCRYPT_ALG_HANDLE, pbsecret: *const u8, cbsecret: u32, pbinput: *const u8, cbinput: u32, pboutput: *mut u8, cboutput: u32) -> super::super::Foundation::NTSTATUS; } BCryptHash(halgorithm.into_param().abi(), ::core::mem::transmute(pbsecret), ::core::mem::transmute(cbsecret), ::core::mem::transmute(pbinput), ::core::mem::transmute(cbinput), ::core::mem::transmute(pboutput), ::core::mem::transmute(cboutput)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptHashData(hhash: *mut ::core::ffi::c_void, pbinput: *const u8, cbinput: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptHashData(hhash: *mut ::core::ffi::c_void, pbinput: *const u8, cbinput: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptHashData(::core::mem::transmute(hhash), ::core::mem::transmute(pbinput), ::core::mem::transmute(cbinput), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptImportKey<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_ALG_HANDLE>, Param1: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(halgorithm: Param0, himportkey: Param1, pszblobtype: Param2, phkey: *mut BCRYPT_KEY_HANDLE, pbkeyobject: *mut u8, cbkeyobject: u32, pbinput: *const u8, cbinput: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptImportKey(halgorithm: BCRYPT_ALG_HANDLE, himportkey: BCRYPT_KEY_HANDLE, pszblobtype: super::super::Foundation::PWSTR, phkey: *mut BCRYPT_KEY_HANDLE, pbkeyobject: *mut u8, cbkeyobject: u32, pbinput: *const u8, cbinput: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptImportKey(halgorithm.into_param().abi(), himportkey.into_param().abi(), pszblobtype.into_param().abi(), ::core::mem::transmute(phkey), ::core::mem::transmute(pbkeyobject), ::core::mem::transmute(cbkeyobject), ::core::mem::transmute(pbinput), ::core::mem::transmute(cbinput), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptImportKeyPair<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_ALG_HANDLE>, Param1: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(halgorithm: Param0, himportkey: Param1, pszblobtype: Param2, phkey: *mut BCRYPT_KEY_HANDLE, pbinput: *const u8, cbinput: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptImportKeyPair(halgorithm: BCRYPT_ALG_HANDLE, himportkey: BCRYPT_KEY_HANDLE, pszblobtype: super::super::Foundation::PWSTR, phkey: *mut BCRYPT_KEY_HANDLE, pbinput: *const u8, cbinput: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptImportKeyPair(halgorithm.into_param().abi(), himportkey.into_param().abi(), pszblobtype.into_param().abi(), ::core::mem::transmute(phkey), ::core::mem::transmute(pbinput), ::core::mem::transmute(cbinput), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptKeyDerivation<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>>(hkey: Param0, pparameterlist: *const BCryptBufferDesc, pbderivedkey: *mut u8, cbderivedkey: u32, pcbresult: *mut u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptKeyDerivation(hkey: BCRYPT_KEY_HANDLE, pparameterlist: *const BCryptBufferDesc, pbderivedkey: *mut u8, cbderivedkey: u32, pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptKeyDerivation(hkey.into_param().abi(), ::core::mem::transmute(pparameterlist), ::core::mem::transmute(pbderivedkey), ::core::mem::transmute(cbderivedkey), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptOpenAlgorithmProvider<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(phalgorithm: *mut BCRYPT_ALG_HANDLE, pszalgid: Param1, pszimplementation: Param2, dwflags: BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptOpenAlgorithmProvider(phalgorithm: *mut BCRYPT_ALG_HANDLE, pszalgid: super::super::Foundation::PWSTR, pszimplementation: super::super::Foundation::PWSTR, dwflags: BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS) -> super::super::Foundation::NTSTATUS; } BCryptOpenAlgorithmProvider(::core::mem::transmute(phalgorithm), pszalgid.into_param().abi(), pszimplementation.into_param().abi(), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptProcessMultiOperations(hobject: *mut ::core::ffi::c_void, operationtype: BCRYPT_MULTI_OPERATION_TYPE, poperations: *const ::core::ffi::c_void, cboperations: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptProcessMultiOperations(hobject: *mut ::core::ffi::c_void, operationtype: BCRYPT_MULTI_OPERATION_TYPE, poperations: *const ::core::ffi::c_void, cboperations: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptProcessMultiOperations(::core::mem::transmute(hobject), ::core::mem::transmute(operationtype), ::core::mem::transmute(poperations), ::core::mem::transmute(cboperations), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptQueryContextConfiguration<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwtable: BCRYPT_TABLE, pszcontext: Param1, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_CONTEXT_CONFIG) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptQueryContextConfiguration(dwtable: BCRYPT_TABLE, pszcontext: super::super::Foundation::PWSTR, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_CONTEXT_CONFIG) -> super::super::Foundation::NTSTATUS; } BCryptQueryContextConfiguration(::core::mem::transmute(dwtable), pszcontext.into_param().abi(), ::core::mem::transmute(pcbbuffer), ::core::mem::transmute(ppbuffer)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptQueryContextFunctionConfiguration<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwtable: BCRYPT_TABLE, pszcontext: Param1, dwinterface: BCRYPT_INTERFACE, pszfunction: Param3, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_CONTEXT_FUNCTION_CONFIG) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptQueryContextFunctionConfiguration(dwtable: BCRYPT_TABLE, pszcontext: super::super::Foundation::PWSTR, dwinterface: BCRYPT_INTERFACE, pszfunction: super::super::Foundation::PWSTR, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_CONTEXT_FUNCTION_CONFIG) -> super::super::Foundation::NTSTATUS; } BCryptQueryContextFunctionConfiguration(::core::mem::transmute(dwtable), pszcontext.into_param().abi(), ::core::mem::transmute(dwinterface), pszfunction.into_param().abi(), ::core::mem::transmute(pcbbuffer), ::core::mem::transmute(ppbuffer)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptQueryContextFunctionProperty<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwtable: BCRYPT_TABLE, pszcontext: Param1, dwinterface: BCRYPT_INTERFACE, pszfunction: Param3, pszproperty: Param4, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptQueryContextFunctionProperty(dwtable: BCRYPT_TABLE, pszcontext: super::super::Foundation::PWSTR, dwinterface: BCRYPT_INTERFACE, pszfunction: super::super::Foundation::PWSTR, pszproperty: super::super::Foundation::PWSTR, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> super::super::Foundation::NTSTATUS; } BCryptQueryContextFunctionProperty(::core::mem::transmute(dwtable), pszcontext.into_param().abi(), ::core::mem::transmute(dwinterface), pszfunction.into_param().abi(), pszproperty.into_param().abi(), ::core::mem::transmute(pcbvalue), ::core::mem::transmute(ppbvalue)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptQueryProviderRegistration<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszprovider: Param0, dwmode: BCRYPT_QUERY_PROVIDER_MODE, dwinterface: BCRYPT_INTERFACE, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_PROVIDER_REG) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptQueryProviderRegistration(pszprovider: super::super::Foundation::PWSTR, dwmode: BCRYPT_QUERY_PROVIDER_MODE, dwinterface: BCRYPT_INTERFACE, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_PROVIDER_REG) -> super::super::Foundation::NTSTATUS; } BCryptQueryProviderRegistration(pszprovider.into_param().abi(), ::core::mem::transmute(dwmode), ::core::mem::transmute(dwinterface), ::core::mem::transmute(pcbbuffer), ::core::mem::transmute(ppbuffer)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptRegisterConfigChangeNotify(phevent: *mut super::super::Foundation::HANDLE) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptRegisterConfigChangeNotify(phevent: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::NTSTATUS; } BCryptRegisterConfigChangeNotify(::core::mem::transmute(phevent)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptRemoveContextFunction<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwtable: BCRYPT_TABLE, pszcontext: Param1, dwinterface: BCRYPT_INTERFACE, pszfunction: Param3) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptRemoveContextFunction(dwtable: BCRYPT_TABLE, pszcontext: super::super::Foundation::PWSTR, dwinterface: BCRYPT_INTERFACE, pszfunction: super::super::Foundation::PWSTR) -> super::super::Foundation::NTSTATUS; } BCryptRemoveContextFunction(::core::mem::transmute(dwtable), pszcontext.into_param().abi(), ::core::mem::transmute(dwinterface), pszfunction.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptResolveProviders<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>( pszcontext: Param0, dwinterface: u32, pszfunction: Param2, pszprovider: Param3, dwmode: BCRYPT_QUERY_PROVIDER_MODE, dwflags: BCRYPT_RESOLVE_PROVIDERS_FLAGS, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_PROVIDER_REFS, ) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptResolveProviders(pszcontext: super::super::Foundation::PWSTR, dwinterface: u32, pszfunction: super::super::Foundation::PWSTR, pszprovider: super::super::Foundation::PWSTR, dwmode: BCRYPT_QUERY_PROVIDER_MODE, dwflags: BCRYPT_RESOLVE_PROVIDERS_FLAGS, pcbbuffer: *mut u32, ppbuffer: *mut *mut CRYPT_PROVIDER_REFS) -> super::super::Foundation::NTSTATUS; } BCryptResolveProviders(pszcontext.into_param().abi(), ::core::mem::transmute(dwinterface), pszfunction.into_param().abi(), pszprovider.into_param().abi(), ::core::mem::transmute(dwmode), ::core::mem::transmute(dwflags), ::core::mem::transmute(pcbbuffer), ::core::mem::transmute(ppbuffer)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptSecretAgreement<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>, Param1: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>>(hprivkey: Param0, hpubkey: Param1, phagreedsecret: *mut *mut ::core::ffi::c_void, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptSecretAgreement(hprivkey: BCRYPT_KEY_HANDLE, hpubkey: BCRYPT_KEY_HANDLE, phagreedsecret: *mut *mut ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptSecretAgreement(hprivkey.into_param().abi(), hpubkey.into_param().abi(), ::core::mem::transmute(phagreedsecret), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptSetContextFunctionProperty<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwtable: BCRYPT_TABLE, pszcontext: Param1, dwinterface: BCRYPT_INTERFACE, pszfunction: Param3, pszproperty: Param4, cbvalue: u32, pbvalue: *const u8) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptSetContextFunctionProperty(dwtable: BCRYPT_TABLE, pszcontext: super::super::Foundation::PWSTR, dwinterface: BCRYPT_INTERFACE, pszfunction: super::super::Foundation::PWSTR, pszproperty: super::super::Foundation::PWSTR, cbvalue: u32, pbvalue: *const u8) -> super::super::Foundation::NTSTATUS; } BCryptSetContextFunctionProperty(::core::mem::transmute(dwtable), pszcontext.into_param().abi(), ::core::mem::transmute(dwinterface), pszfunction.into_param().abi(), pszproperty.into_param().abi(), ::core::mem::transmute(cbvalue), ::core::mem::transmute(pbvalue)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptSetProperty<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hobject: *mut ::core::ffi::c_void, pszproperty: Param1, pbinput: *const u8, cbinput: u32, dwflags: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptSetProperty(hobject: *mut ::core::ffi::c_void, pszproperty: super::super::Foundation::PWSTR, pbinput: *const u8, cbinput: u32, dwflags: u32) -> super::super::Foundation::NTSTATUS; } BCryptSetProperty(::core::mem::transmute(hobject), pszproperty.into_param().abi(), ::core::mem::transmute(pbinput), ::core::mem::transmute(cbinput), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptSignHash<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>>(hkey: Param0, ppaddinginfo: *const ::core::ffi::c_void, pbinput: *const u8, cbinput: u32, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptSignHash(hkey: BCRYPT_KEY_HANDLE, ppaddinginfo: *const ::core::ffi::c_void, pbinput: *const u8, cbinput: u32, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> super::super::Foundation::NTSTATUS; } BCryptSignHash(hkey.into_param().abi(), ::core::mem::transmute(ppaddinginfo), ::core::mem::transmute(pbinput), ::core::mem::transmute(cbinput), ::core::mem::transmute(pboutput), ::core::mem::transmute(cboutput), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptUnregisterConfigChangeNotify<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(hevent: Param0) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptUnregisterConfigChangeNotify(hevent: super::super::Foundation::HANDLE) -> super::super::Foundation::NTSTATUS; } BCryptUnregisterConfigChangeNotify(hevent.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptVerifySignature<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>>(hkey: Param0, ppaddinginfo: *const ::core::ffi::c_void, pbhash: *const u8, cbhash: u32, pbsignature: *const u8, cbsignature: u32, dwflags: NCRYPT_FLAGS) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn BCryptVerifySignature(hkey: BCRYPT_KEY_HANDLE, ppaddinginfo: *const ::core::ffi::c_void, pbhash: *const u8, cbhash: u32, pbsignature: *const u8, cbsignature: u32, dwflags: NCRYPT_FLAGS) -> super::super::Foundation::NTSTATUS; } BCryptVerifySignature(hkey.into_param().abi(), ::core::mem::transmute(ppaddinginfo), ::core::mem::transmute(pbhash), ::core::mem::transmute(cbhash), ::core::mem::transmute(pbsignature), ::core::mem::transmute(cbsignature), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const CALG_OID_INFO_CNG_ONLY: u32 = 4294967295u32; pub const CALG_OID_INFO_PARAMETERS: u32 = 4294967294u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CASetupProperty(pub i32); pub const ENUM_SETUPPROP_INVALID: CASetupProperty = CASetupProperty(-1i32); pub const ENUM_SETUPPROP_CATYPE: CASetupProperty = CASetupProperty(0i32); pub const ENUM_SETUPPROP_CAKEYINFORMATION: CASetupProperty = CASetupProperty(1i32); pub const ENUM_SETUPPROP_INTERACTIVE: CASetupProperty = CASetupProperty(2i32); pub const ENUM_SETUPPROP_CANAME: CASetupProperty = CASetupProperty(3i32); pub const ENUM_SETUPPROP_CADSSUFFIX: CASetupProperty = CASetupProperty(4i32); pub const ENUM_SETUPPROP_VALIDITYPERIOD: CASetupProperty = CASetupProperty(5i32); pub const ENUM_SETUPPROP_VALIDITYPERIODUNIT: CASetupProperty = CASetupProperty(6i32); pub const ENUM_SETUPPROP_EXPIRATIONDATE: CASetupProperty = CASetupProperty(7i32); pub const ENUM_SETUPPROP_PRESERVEDATABASE: CASetupProperty = CASetupProperty(8i32); pub const ENUM_SETUPPROP_DATABASEDIRECTORY: CASetupProperty = CASetupProperty(9i32); pub const ENUM_SETUPPROP_LOGDIRECTORY: CASetupProperty = CASetupProperty(10i32); pub const ENUM_SETUPPROP_SHAREDFOLDER: CASetupProperty = CASetupProperty(11i32); pub const ENUM_SETUPPROP_PARENTCAMACHINE: CASetupProperty = CASetupProperty(12i32); pub const ENUM_SETUPPROP_PARENTCANAME: CASetupProperty = CASetupProperty(13i32); pub const ENUM_SETUPPROP_REQUESTFILE: CASetupProperty = CASetupProperty(14i32); pub const ENUM_SETUPPROP_WEBCAMACHINE: CASetupProperty = CASetupProperty(15i32); pub const ENUM_SETUPPROP_WEBCANAME: CASetupProperty = CASetupProperty(16i32); impl ::core::convert::From<i32> for CASetupProperty { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CASetupProperty { type Abi = Self; } pub const CCertSrvSetup: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x961f180f_f55c_413d_a9b3_7d2af4d8e42f); pub const CCertSrvSetupKeyInformation: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x38373906_5433_4633_b0fb_29b7e78262e1); pub const CCertificateEnrollmentPolicyServerSetup: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xafe2fa32_41b1_459d_a5de_49add8a72182); pub const CCertificateEnrollmentServerSetup: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9902f3bc_88af_4cf8_ae62_7140531552b6); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CEPSetupProperty(pub i32); pub const ENUM_CEPSETUPPROP_AUTHENTICATION: CEPSetupProperty = CEPSetupProperty(0i32); pub const ENUM_CEPSETUPPROP_SSLCERTHASH: CEPSetupProperty = CEPSetupProperty(1i32); pub const ENUM_CEPSETUPPROP_URL: CEPSetupProperty = CEPSetupProperty(2i32); pub const ENUM_CEPSETUPPROP_KEYBASED_RENEWAL: CEPSetupProperty = CEPSetupProperty(3i32); impl ::core::convert::From<i32> for CEPSetupProperty { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CEPSetupProperty { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERTIFICATE_CHAIN_BLOB { pub certCount: u32, pub rawCertificates: *mut CRYPTOAPI_BLOB, } impl CERTIFICATE_CHAIN_BLOB {} impl ::core::default::Default for CERTIFICATE_CHAIN_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERTIFICATE_CHAIN_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERTIFICATE_CHAIN_BLOB").field("certCount", &self.certCount).field("rawCertificates", &self.rawCertificates).finish() } } impl ::core::cmp::PartialEq for CERTIFICATE_CHAIN_BLOB { fn eq(&self, other: &Self) -> bool { self.certCount == other.certCount && self.rawCertificates == other.rawCertificates } } impl ::core::cmp::Eq for CERTIFICATE_CHAIN_BLOB {} unsafe impl ::windows::core::Abi for CERTIFICATE_CHAIN_BLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_ACCESS_DESCRIPTION { pub pszAccessMethod: super::super::Foundation::PSTR, pub AccessLocation: CERT_ALT_NAME_ENTRY, } #[cfg(feature = "Win32_Foundation")] impl CERT_ACCESS_DESCRIPTION {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_ACCESS_DESCRIPTION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_ACCESS_DESCRIPTION { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_ACCESS_DESCRIPTION {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_ACCESS_DESCRIPTION { type Abi = Self; } pub const CERT_ACCESS_STATE_GP_SYSTEM_STORE_FLAG: u32 = 8u32; pub const CERT_ACCESS_STATE_LM_SYSTEM_STORE_FLAG: u32 = 4u32; pub const CERT_ACCESS_STATE_PROP_ID: u32 = 14u32; pub const CERT_ACCESS_STATE_SHARED_USER_FLAG: u32 = 16u32; pub const CERT_ACCESS_STATE_SYSTEM_STORE_FLAG: u32 = 2u32; pub const CERT_ACCESS_STATE_WRITE_PERSIST_FLAG: u32 = 1u32; pub const CERT_AIA_URL_RETRIEVED_PROP_ID: u32 = 67u32; pub const CERT_ALT_NAME_EDI_PARTY_NAME: u32 = 6u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_ALT_NAME_ENTRY { pub dwAltNameChoice: u32, pub Anonymous: CERT_ALT_NAME_ENTRY_0, } #[cfg(feature = "Win32_Foundation")] impl CERT_ALT_NAME_ENTRY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_ALT_NAME_ENTRY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_ALT_NAME_ENTRY { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_ALT_NAME_ENTRY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_ALT_NAME_ENTRY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CERT_ALT_NAME_ENTRY_0 { pub pOtherName: *mut CERT_OTHER_NAME, pub pwszRfc822Name: super::super::Foundation::PWSTR, pub pwszDNSName: super::super::Foundation::PWSTR, pub DirectoryName: CRYPTOAPI_BLOB, pub pwszURL: super::super::Foundation::PWSTR, pub IPAddress: CRYPTOAPI_BLOB, pub pszRegisteredID: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_ALT_NAME_ENTRY_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_ALT_NAME_ENTRY_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_ALT_NAME_ENTRY_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_ALT_NAME_ENTRY_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_ALT_NAME_ENTRY_0 { type Abi = Self; } pub const CERT_ALT_NAME_ENTRY_ERR_INDEX_MASK: u32 = 255u32; pub const CERT_ALT_NAME_ENTRY_ERR_INDEX_SHIFT: u32 = 16u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_ALT_NAME_INFO { pub cAltEntry: u32, pub rgAltEntry: *mut CERT_ALT_NAME_ENTRY, } #[cfg(feature = "Win32_Foundation")] impl CERT_ALT_NAME_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_ALT_NAME_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_ALT_NAME_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_ALT_NAME_INFO").field("cAltEntry", &self.cAltEntry).field("rgAltEntry", &self.rgAltEntry).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_ALT_NAME_INFO { fn eq(&self, other: &Self) -> bool { self.cAltEntry == other.cAltEntry && self.rgAltEntry == other.rgAltEntry } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_ALT_NAME_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_ALT_NAME_INFO { type Abi = Self; } pub const CERT_ALT_NAME_VALUE_ERR_INDEX_MASK: u32 = 65535u32; pub const CERT_ALT_NAME_VALUE_ERR_INDEX_SHIFT: u32 = 0u32; pub const CERT_ALT_NAME_X400_ADDRESS: u32 = 4u32; pub const CERT_ARCHIVED_KEY_HASH_PROP_ID: u32 = 65u32; pub const CERT_ARCHIVED_PROP_ID: u32 = 19u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_AUTHORITY_INFO_ACCESS { pub cAccDescr: u32, pub rgAccDescr: *mut CERT_ACCESS_DESCRIPTION, } #[cfg(feature = "Win32_Foundation")] impl CERT_AUTHORITY_INFO_ACCESS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_AUTHORITY_INFO_ACCESS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_AUTHORITY_INFO_ACCESS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_AUTHORITY_INFO_ACCESS").field("cAccDescr", &self.cAccDescr).field("rgAccDescr", &self.rgAccDescr).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_AUTHORITY_INFO_ACCESS { fn eq(&self, other: &Self) -> bool { self.cAccDescr == other.cAccDescr && self.rgAccDescr == other.rgAccDescr } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_AUTHORITY_INFO_ACCESS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_AUTHORITY_INFO_ACCESS { type Abi = Self; } pub const CERT_AUTHORITY_INFO_ACCESS_PROP_ID: u32 = 68u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_AUTHORITY_KEY_ID2_INFO { pub KeyId: CRYPTOAPI_BLOB, pub AuthorityCertIssuer: CERT_ALT_NAME_INFO, pub AuthorityCertSerialNumber: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CERT_AUTHORITY_KEY_ID2_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_AUTHORITY_KEY_ID2_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_AUTHORITY_KEY_ID2_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_AUTHORITY_KEY_ID2_INFO").field("KeyId", &self.KeyId).field("AuthorityCertIssuer", &self.AuthorityCertIssuer).field("AuthorityCertSerialNumber", &self.AuthorityCertSerialNumber).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_AUTHORITY_KEY_ID2_INFO { fn eq(&self, other: &Self) -> bool { self.KeyId == other.KeyId && self.AuthorityCertIssuer == other.AuthorityCertIssuer && self.AuthorityCertSerialNumber == other.AuthorityCertSerialNumber } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_AUTHORITY_KEY_ID2_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_AUTHORITY_KEY_ID2_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_AUTHORITY_KEY_ID_INFO { pub KeyId: CRYPTOAPI_BLOB, pub CertIssuer: CRYPTOAPI_BLOB, pub CertSerialNumber: CRYPTOAPI_BLOB, } impl CERT_AUTHORITY_KEY_ID_INFO {} impl ::core::default::Default for CERT_AUTHORITY_KEY_ID_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_AUTHORITY_KEY_ID_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_AUTHORITY_KEY_ID_INFO").field("KeyId", &self.KeyId).field("CertIssuer", &self.CertIssuer).field("CertSerialNumber", &self.CertSerialNumber).finish() } } impl ::core::cmp::PartialEq for CERT_AUTHORITY_KEY_ID_INFO { fn eq(&self, other: &Self) -> bool { self.KeyId == other.KeyId && self.CertIssuer == other.CertIssuer && self.CertSerialNumber == other.CertSerialNumber } } impl ::core::cmp::Eq for CERT_AUTHORITY_KEY_ID_INFO {} unsafe impl ::windows::core::Abi for CERT_AUTHORITY_KEY_ID_INFO { type Abi = Self; } pub const CERT_AUTH_ROOT_AUTO_UPDATE_DISABLE_PARTIAL_CHAIN_LOGGING_FLAG: u32 = 2u32; pub const CERT_AUTH_ROOT_AUTO_UPDATE_DISABLE_UNTRUSTED_ROOT_LOGGING_FLAG: u32 = 1u32; pub const CERT_AUTH_ROOT_SHA256_HASH_PROP_ID: u32 = 98u32; pub const CERT_AUTO_ENROLL_PROP_ID: u32 = 21u32; pub const CERT_AUTO_ENROLL_RETRY_PROP_ID: u32 = 66u32; pub const CERT_AUTO_UPDATE_DISABLE_RANDOM_QUERY_STRING_FLAG: u32 = 4u32; pub const CERT_BACKED_UP_PROP_ID: u32 = 69u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_BASIC_CONSTRAINTS2_INFO { pub fCA: super::super::Foundation::BOOL, pub fPathLenConstraint: super::super::Foundation::BOOL, pub dwPathLenConstraint: u32, } #[cfg(feature = "Win32_Foundation")] impl CERT_BASIC_CONSTRAINTS2_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_BASIC_CONSTRAINTS2_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_BASIC_CONSTRAINTS2_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_BASIC_CONSTRAINTS2_INFO").field("fCA", &self.fCA).field("fPathLenConstraint", &self.fPathLenConstraint).field("dwPathLenConstraint", &self.dwPathLenConstraint).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_BASIC_CONSTRAINTS2_INFO { fn eq(&self, other: &Self) -> bool { self.fCA == other.fCA && self.fPathLenConstraint == other.fPathLenConstraint && self.dwPathLenConstraint == other.dwPathLenConstraint } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_BASIC_CONSTRAINTS2_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_BASIC_CONSTRAINTS2_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_BASIC_CONSTRAINTS_INFO { pub SubjectType: CRYPT_BIT_BLOB, pub fPathLenConstraint: super::super::Foundation::BOOL, pub dwPathLenConstraint: u32, pub cSubtreesConstraint: u32, pub rgSubtreesConstraint: *mut CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CERT_BASIC_CONSTRAINTS_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_BASIC_CONSTRAINTS_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_BASIC_CONSTRAINTS_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_BASIC_CONSTRAINTS_INFO") .field("SubjectType", &self.SubjectType) .field("fPathLenConstraint", &self.fPathLenConstraint) .field("dwPathLenConstraint", &self.dwPathLenConstraint) .field("cSubtreesConstraint", &self.cSubtreesConstraint) .field("rgSubtreesConstraint", &self.rgSubtreesConstraint) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_BASIC_CONSTRAINTS_INFO { fn eq(&self, other: &Self) -> bool { self.SubjectType == other.SubjectType && self.fPathLenConstraint == other.fPathLenConstraint && self.dwPathLenConstraint == other.dwPathLenConstraint && self.cSubtreesConstraint == other.cSubtreesConstraint && self.rgSubtreesConstraint == other.rgSubtreesConstraint } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_BASIC_CONSTRAINTS_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_BASIC_CONSTRAINTS_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_BIOMETRIC_DATA { pub dwTypeOfBiometricDataChoice: CERT_BIOMETRIC_DATA_TYPE, pub Anonymous: CERT_BIOMETRIC_DATA_0, pub HashedUrl: CERT_HASHED_URL, } #[cfg(feature = "Win32_Foundation")] impl CERT_BIOMETRIC_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_BIOMETRIC_DATA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_BIOMETRIC_DATA { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_BIOMETRIC_DATA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_BIOMETRIC_DATA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CERT_BIOMETRIC_DATA_0 { pub dwPredefined: u32, pub pszObjId: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_BIOMETRIC_DATA_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_BIOMETRIC_DATA_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_BIOMETRIC_DATA_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_BIOMETRIC_DATA_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_BIOMETRIC_DATA_0 { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_BIOMETRIC_DATA_TYPE(pub u32); pub const CERT_BIOMETRIC_PREDEFINED_DATA_CHOICE: CERT_BIOMETRIC_DATA_TYPE = CERT_BIOMETRIC_DATA_TYPE(1u32); pub const CERT_BIOMETRIC_OID_DATA_CHOICE: CERT_BIOMETRIC_DATA_TYPE = CERT_BIOMETRIC_DATA_TYPE(2u32); impl ::core::convert::From<u32> for CERT_BIOMETRIC_DATA_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_BIOMETRIC_DATA_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CERT_BIOMETRIC_DATA_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_BIOMETRIC_DATA_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_BIOMETRIC_DATA_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_BIOMETRIC_DATA_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_BIOMETRIC_DATA_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_BIOMETRIC_EXT_INFO { pub cBiometricData: u32, pub rgBiometricData: *mut CERT_BIOMETRIC_DATA, } #[cfg(feature = "Win32_Foundation")] impl CERT_BIOMETRIC_EXT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_BIOMETRIC_EXT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_BIOMETRIC_EXT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_BIOMETRIC_EXT_INFO").field("cBiometricData", &self.cBiometricData).field("rgBiometricData", &self.rgBiometricData).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_BIOMETRIC_EXT_INFO { fn eq(&self, other: &Self) -> bool { self.cBiometricData == other.cBiometricData && self.rgBiometricData == other.rgBiometricData } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_BIOMETRIC_EXT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_BIOMETRIC_EXT_INFO { type Abi = Self; } pub const CERT_BIOMETRIC_PICTURE_TYPE: u32 = 0u32; pub const CERT_BIOMETRIC_SIGNATURE_TYPE: u32 = 1u32; pub const CERT_BUNDLE_CERTIFICATE: u32 = 0u32; pub const CERT_BUNDLE_CRL: u32 = 1u32; pub const CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG: u32 = 2u32; pub const CERT_CA_DISABLE_CRL_PROP_ID: u32 = 82u32; pub const CERT_CA_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID: u32 = 81u32; pub const CERT_CA_SUBJECT_FLAG: u32 = 128u32; pub const CERT_CEP_PROP_ID: u32 = 87u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_CHAIN { pub cCerts: u32, pub certs: *mut CRYPTOAPI_BLOB, pub keyLocatorInfo: CRYPT_KEY_PROV_INFO, } #[cfg(feature = "Win32_Foundation")] impl CERT_CHAIN {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_CHAIN { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_CHAIN { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_CHAIN").field("cCerts", &self.cCerts).field("certs", &self.certs).field("keyLocatorInfo", &self.keyLocatorInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_CHAIN { fn eq(&self, other: &Self) -> bool { self.cCerts == other.cCerts && self.certs == other.certs && self.keyLocatorInfo == other.keyLocatorInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_CHAIN {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_CHAIN { type Abi = Self; } pub const CERT_CHAIN_AUTO_CURRENT_USER: u32 = 1u32; pub const CERT_CHAIN_AUTO_FLUSH_DISABLE_FLAG: u32 = 1u32; pub const CERT_CHAIN_AUTO_HPKP_RULE_INFO: u32 = 8u32; pub const CERT_CHAIN_AUTO_IMPERSONATED: u32 = 3u32; pub const CERT_CHAIN_AUTO_LOCAL_MACHINE: u32 = 2u32; pub const CERT_CHAIN_AUTO_LOG_CREATE_FLAG: u32 = 2u32; pub const CERT_CHAIN_AUTO_LOG_FLUSH_FLAG: u32 = 8u32; pub const CERT_CHAIN_AUTO_LOG_FREE_FLAG: u32 = 4u32; pub const CERT_CHAIN_AUTO_NETWORK_INFO: u32 = 6u32; pub const CERT_CHAIN_AUTO_PINRULE_INFO: u32 = 5u32; pub const CERT_CHAIN_AUTO_PROCESS_INFO: u32 = 4u32; pub const CERT_CHAIN_AUTO_SERIAL_LOCAL_MACHINE: u32 = 7u32; pub const CERT_CHAIN_CACHE_END_CERT: u32 = 1u32; pub const CERT_CHAIN_CACHE_ONLY_URL_RETRIEVAL: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_CHAIN_CONTEXT { pub cbSize: u32, pub TrustStatus: CERT_TRUST_STATUS, pub cChain: u32, pub rgpChain: *mut *mut CERT_SIMPLE_CHAIN, pub cLowerQualityChainContext: u32, pub rgpLowerQualityChainContext: *mut *mut CERT_CHAIN_CONTEXT, pub fHasRevocationFreshnessTime: super::super::Foundation::BOOL, pub dwRevocationFreshnessTime: u32, pub dwCreateFlags: u32, pub ChainId: ::windows::core::GUID, } #[cfg(feature = "Win32_Foundation")] impl CERT_CHAIN_CONTEXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_CHAIN_CONTEXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_CHAIN_CONTEXT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_CHAIN_CONTEXT") .field("cbSize", &self.cbSize) .field("TrustStatus", &self.TrustStatus) .field("cChain", &self.cChain) .field("rgpChain", &self.rgpChain) .field("cLowerQualityChainContext", &self.cLowerQualityChainContext) .field("rgpLowerQualityChainContext", &self.rgpLowerQualityChainContext) .field("fHasRevocationFreshnessTime", &self.fHasRevocationFreshnessTime) .field("dwRevocationFreshnessTime", &self.dwRevocationFreshnessTime) .field("dwCreateFlags", &self.dwCreateFlags) .field("ChainId", &self.ChainId) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_CHAIN_CONTEXT { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.TrustStatus == other.TrustStatus && self.cChain == other.cChain && self.rgpChain == other.rgpChain && self.cLowerQualityChainContext == other.cLowerQualityChainContext && self.rgpLowerQualityChainContext == other.rgpLowerQualityChainContext && self.fHasRevocationFreshnessTime == other.fHasRevocationFreshnessTime && self.dwRevocationFreshnessTime == other.dwRevocationFreshnessTime && self.dwCreateFlags == other.dwCreateFlags && self.ChainId == other.ChainId } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_CHAIN_CONTEXT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_CHAIN_CONTEXT { type Abi = Self; } pub const CERT_CHAIN_CRL_VALIDITY_EXT_PERIOD_HOURS_DEFAULT: u32 = 12u32; pub const CERT_CHAIN_DISABLE_AIA: u32 = 8192u32; pub const CERT_CHAIN_DISABLE_ALL_EKU_WEAK_FLAG: u32 = 65536u32; pub const CERT_CHAIN_DISABLE_AUTH_ROOT_AUTO_UPDATE: u32 = 256u32; pub const CERT_CHAIN_DISABLE_CODE_SIGNING_WEAK_FLAG: u32 = 4194304u32; pub const CERT_CHAIN_DISABLE_ECC_PARA_FLAG: u32 = 16u32; pub const CERT_CHAIN_DISABLE_FILE_HASH_WEAK_FLAG: u32 = 4096u32; pub const CERT_CHAIN_DISABLE_MD2_MD4: u32 = 4096u32; pub const CERT_CHAIN_DISABLE_MOTW_CODE_SIGNING_WEAK_FLAG: u32 = 8388608u32; pub const CERT_CHAIN_DISABLE_MOTW_FILE_HASH_WEAK_FLAG: u32 = 8192u32; pub const CERT_CHAIN_DISABLE_MOTW_TIMESTAMP_HASH_WEAK_FLAG: u32 = 32768u32; pub const CERT_CHAIN_DISABLE_MOTW_TIMESTAMP_WEAK_FLAG: u32 = 134217728u32; pub const CERT_CHAIN_DISABLE_MY_PEER_TRUST: u32 = 2048u32; pub const CERT_CHAIN_DISABLE_OPT_IN_SERVER_AUTH_WEAK_FLAG: u32 = 262144u32; pub const CERT_CHAIN_DISABLE_PASS1_QUALITY_FILTERING: u32 = 64u32; pub const CERT_CHAIN_DISABLE_SERVER_AUTH_WEAK_FLAG: u32 = 1048576u32; pub const CERT_CHAIN_DISABLE_TIMESTAMP_HASH_WEAK_FLAG: u32 = 16384u32; pub const CERT_CHAIN_DISABLE_TIMESTAMP_WEAK_FLAG: u32 = 67108864u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_CHAIN_ELEMENT { pub cbSize: u32, pub pCertContext: *mut CERT_CONTEXT, pub TrustStatus: CERT_TRUST_STATUS, pub pRevocationInfo: *mut CERT_REVOCATION_INFO, pub pIssuanceUsage: *mut CTL_USAGE, pub pApplicationUsage: *mut CTL_USAGE, pub pwszExtendedErrorInfo: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_CHAIN_ELEMENT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_CHAIN_ELEMENT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_CHAIN_ELEMENT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_CHAIN_ELEMENT") .field("cbSize", &self.cbSize) .field("pCertContext", &self.pCertContext) .field("TrustStatus", &self.TrustStatus) .field("pRevocationInfo", &self.pRevocationInfo) .field("pIssuanceUsage", &self.pIssuanceUsage) .field("pApplicationUsage", &self.pApplicationUsage) .field("pwszExtendedErrorInfo", &self.pwszExtendedErrorInfo) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_CHAIN_ELEMENT { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pCertContext == other.pCertContext && self.TrustStatus == other.TrustStatus && self.pRevocationInfo == other.pRevocationInfo && self.pIssuanceUsage == other.pIssuanceUsage && self.pApplicationUsage == other.pApplicationUsage && self.pwszExtendedErrorInfo == other.pwszExtendedErrorInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_CHAIN_ELEMENT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_CHAIN_ELEMENT { type Abi = Self; } pub const CERT_CHAIN_ENABLE_ALL_EKU_HYGIENE_FLAG: u32 = 131072u32; pub const CERT_CHAIN_ENABLE_CACHE_AUTO_UPDATE: u32 = 16u32; pub const CERT_CHAIN_ENABLE_CODE_SIGNING_HYGIENE_FLAG: u32 = 16777216u32; pub const CERT_CHAIN_ENABLE_MD2_MD4_FLAG: u32 = 1u32; pub const CERT_CHAIN_ENABLE_MOTW_CODE_SIGNING_HYGIENE_FLAG: u32 = 33554432u32; pub const CERT_CHAIN_ENABLE_MOTW_TIMESTAMP_HYGIENE_FLAG: u32 = 536870912u32; pub const CERT_CHAIN_ENABLE_ONLY_WEAK_LOGGING_FLAG: u32 = 8u32; pub const CERT_CHAIN_ENABLE_PEER_TRUST: u32 = 1024u32; pub const CERT_CHAIN_ENABLE_SERVER_AUTH_HYGIENE_FLAG: u32 = 2097152u32; pub const CERT_CHAIN_ENABLE_SHARE_STORE: u32 = 32u32; pub const CERT_CHAIN_ENABLE_TIMESTAMP_HYGIENE_FLAG: u32 = 268435456u32; pub const CERT_CHAIN_ENABLE_WEAK_LOGGING_FLAG: u32 = 4u32; pub const CERT_CHAIN_ENABLE_WEAK_RSA_ROOT_FLAG: u32 = 2u32; pub const CERT_CHAIN_ENABLE_WEAK_SETTINGS_FLAG: u32 = 2147483648u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_CHAIN_ENGINE_CONFIG { pub cbSize: u32, pub hRestrictedRoot: *mut ::core::ffi::c_void, pub hRestrictedTrust: *mut ::core::ffi::c_void, pub hRestrictedOther: *mut ::core::ffi::c_void, pub cAdditionalStore: u32, pub rghAdditionalStore: *mut *mut ::core::ffi::c_void, pub dwFlags: u32, pub dwUrlRetrievalTimeout: u32, pub MaximumCachedCertificates: u32, pub CycleDetectionModulus: u32, pub hExclusiveRoot: *mut ::core::ffi::c_void, pub hExclusiveTrustedPeople: *mut ::core::ffi::c_void, pub dwExclusiveFlags: u32, } impl CERT_CHAIN_ENGINE_CONFIG {} impl ::core::default::Default for CERT_CHAIN_ENGINE_CONFIG { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_CHAIN_ENGINE_CONFIG { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_CHAIN_ENGINE_CONFIG") .field("cbSize", &self.cbSize) .field("hRestrictedRoot", &self.hRestrictedRoot) .field("hRestrictedTrust", &self.hRestrictedTrust) .field("hRestrictedOther", &self.hRestrictedOther) .field("cAdditionalStore", &self.cAdditionalStore) .field("rghAdditionalStore", &self.rghAdditionalStore) .field("dwFlags", &self.dwFlags) .field("dwUrlRetrievalTimeout", &self.dwUrlRetrievalTimeout) .field("MaximumCachedCertificates", &self.MaximumCachedCertificates) .field("CycleDetectionModulus", &self.CycleDetectionModulus) .field("hExclusiveRoot", &self.hExclusiveRoot) .field("hExclusiveTrustedPeople", &self.hExclusiveTrustedPeople) .field("dwExclusiveFlags", &self.dwExclusiveFlags) .finish() } } impl ::core::cmp::PartialEq for CERT_CHAIN_ENGINE_CONFIG { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.hRestrictedRoot == other.hRestrictedRoot && self.hRestrictedTrust == other.hRestrictedTrust && self.hRestrictedOther == other.hRestrictedOther && self.cAdditionalStore == other.cAdditionalStore && self.rghAdditionalStore == other.rghAdditionalStore && self.dwFlags == other.dwFlags && self.dwUrlRetrievalTimeout == other.dwUrlRetrievalTimeout && self.MaximumCachedCertificates == other.MaximumCachedCertificates && self.CycleDetectionModulus == other.CycleDetectionModulus && self.hExclusiveRoot == other.hExclusiveRoot && self.hExclusiveTrustedPeople == other.hExclusiveTrustedPeople && self.dwExclusiveFlags == other.dwExclusiveFlags } } impl ::core::cmp::Eq for CERT_CHAIN_ENGINE_CONFIG {} unsafe impl ::windows::core::Abi for CERT_CHAIN_ENGINE_CONFIG { type Abi = Self; } pub const CERT_CHAIN_EXCLUSIVE_ENABLE_CA_FLAG: u32 = 1u32; pub const CERT_CHAIN_FIND_BY_ISSUER: u32 = 1u32; #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_CHAIN_FIND_BY_ISSUER_PARA { pub cbSize: u32, pub pszUsageIdentifier: super::super::Foundation::PSTR, pub dwKeySpec: u32, pub dwAcquirePrivateKeyFlags: u32, pub cIssuer: u32, pub rgIssuer: *mut CRYPTOAPI_BLOB, pub pfnFindCallback: ::core::option::Option<PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK>, pub pvFindArg: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CERT_CHAIN_FIND_BY_ISSUER_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_CHAIN_FIND_BY_ISSUER_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_CHAIN_FIND_BY_ISSUER_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_CHAIN_FIND_BY_ISSUER_PARA") .field("cbSize", &self.cbSize) .field("pszUsageIdentifier", &self.pszUsageIdentifier) .field("dwKeySpec", &self.dwKeySpec) .field("dwAcquirePrivateKeyFlags", &self.dwAcquirePrivateKeyFlags) .field("cIssuer", &self.cIssuer) .field("rgIssuer", &self.rgIssuer) .field("pvFindArg", &self.pvFindArg) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_CHAIN_FIND_BY_ISSUER_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pszUsageIdentifier == other.pszUsageIdentifier && self.dwKeySpec == other.dwKeySpec && self.dwAcquirePrivateKeyFlags == other.dwAcquirePrivateKeyFlags && self.cIssuer == other.cIssuer && self.rgIssuer == other.rgIssuer && self.pfnFindCallback.map(|f| f as usize) == other.pfnFindCallback.map(|f| f as usize) && self.pvFindArg == other.pvFindArg } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_CHAIN_FIND_BY_ISSUER_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_CHAIN_FIND_BY_ISSUER_PARA { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const CERT_CHAIN_HAS_MOTW: u32 = 16384u32; pub const CERT_CHAIN_MAX_AIA_URL_COUNT_IN_CERT_DEFAULT: u32 = 5u32; pub const CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_BYTE_COUNT_DEFAULT: u32 = 100000u32; pub const CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_CERT_COUNT_DEFAULT: u32 = 10u32; pub const CERT_CHAIN_MAX_AIA_URL_RETRIEVAL_COUNT_PER_CHAIN_DEFAULT: u32 = 3u32; pub const CERT_CHAIN_MAX_SSL_TIME_UPDATED_EVENT_COUNT_DEFAULT: u32 = 5u32; pub const CERT_CHAIN_MAX_SSL_TIME_UPDATED_EVENT_COUNT_DISABLE: u32 = 4294967295u32; pub const CERT_CHAIN_MIN_PUB_KEY_BIT_LENGTH_DISABLE: u32 = 4294967295u32; pub const CERT_CHAIN_MIN_RSA_PUB_KEY_BIT_LENGTH_DEFAULT: u32 = 1023u32; pub const CERT_CHAIN_MIN_RSA_PUB_KEY_BIT_LENGTH_DISABLE: u32 = 4294967295u32; pub const CERT_CHAIN_MOTW_IGNORE_AFTER_TIME_WEAK_FLAG: u32 = 1073741824u32; pub const CERT_CHAIN_ONLY_ADDITIONAL_AND_AUTH_ROOT: u32 = 32768u32; pub const CERT_CHAIN_OPTION_DISABLE_AIA_URL_RETRIEVAL: u32 = 2u32; pub const CERT_CHAIN_OPTION_ENABLE_SIA_URL_RETRIEVAL: u32 = 4u32; pub const CERT_CHAIN_OPT_IN_WEAK_FLAGS: u32 = 262144u32; pub const CERT_CHAIN_OPT_IN_WEAK_SIGNATURE: u32 = 65536u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_CHAIN_PARA { pub cbSize: u32, pub RequestedUsage: CERT_USAGE_MATCH, } #[cfg(feature = "Win32_Foundation")] impl CERT_CHAIN_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_CHAIN_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_CHAIN_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_CHAIN_PARA").field("cbSize", &self.cbSize).field("RequestedUsage", &self.RequestedUsage).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_CHAIN_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.RequestedUsage == other.RequestedUsage } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_CHAIN_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_CHAIN_PARA { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_CHAIN_POLICY_FLAGS(pub u32); pub const CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(1u32); pub const CERT_CHAIN_POLICY_IGNORE_CTL_NOT_TIME_VALID_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(2u32); pub const CERT_CHAIN_POLICY_IGNORE_NOT_TIME_NESTED_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(4u32); pub const CERT_CHAIN_POLICY_IGNORE_ALL_NOT_TIME_VALID_FLAGS: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(7u32); pub const CERT_CHAIN_POLICY_IGNORE_INVALID_BASIC_CONSTRAINTS_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(8u32); pub const CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(16u32); pub const CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(32u32); pub const CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(64u32); pub const CERT_CHAIN_POLICY_IGNORE_INVALID_POLICY_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(128u32); pub const CERT_CHAIN_POLICY_IGNORE_END_REV_UNKNOWN_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(256u32); pub const CERT_CHAIN_POLICY_IGNORE_CTL_SIGNER_REV_UNKNOWN_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(512u32); pub const CERT_CHAIN_POLICY_IGNORE_CA_REV_UNKNOWN_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(1024u32); pub const CERT_CHAIN_POLICY_IGNORE_ROOT_REV_UNKNOWN_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(2048u32); pub const CERT_CHAIN_POLICY_IGNORE_ALL_REV_UNKNOWN_FLAGS: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(3840u32); pub const CERT_CHAIN_POLICY_ALLOW_TESTROOT_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(32768u32); pub const CERT_CHAIN_POLICY_TRUST_TESTROOT_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(16384u32); pub const CERT_CHAIN_POLICY_IGNORE_NOT_SUPPORTED_CRITICAL_EXT_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(8192u32); pub const CERT_CHAIN_POLICY_IGNORE_PEER_TRUST_FLAG: CERT_CHAIN_POLICY_FLAGS = CERT_CHAIN_POLICY_FLAGS(4096u32); impl ::core::convert::From<u32> for CERT_CHAIN_POLICY_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_CHAIN_POLICY_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CERT_CHAIN_POLICY_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_CHAIN_POLICY_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_CHAIN_POLICY_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_CHAIN_POLICY_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_CHAIN_POLICY_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_CHAIN_POLICY_IGNORE_WEAK_SIGNATURE_FLAG: u32 = 134217728u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_CHAIN_POLICY_PARA { pub cbSize: u32, pub dwFlags: CERT_CHAIN_POLICY_FLAGS, pub pvExtraPolicyPara: *mut ::core::ffi::c_void, } impl CERT_CHAIN_POLICY_PARA {} impl ::core::default::Default for CERT_CHAIN_POLICY_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_CHAIN_POLICY_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_CHAIN_POLICY_PARA").field("cbSize", &self.cbSize).field("dwFlags", &self.dwFlags).field("pvExtraPolicyPara", &self.pvExtraPolicyPara).finish() } } impl ::core::cmp::PartialEq for CERT_CHAIN_POLICY_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwFlags == other.dwFlags && self.pvExtraPolicyPara == other.pvExtraPolicyPara } } impl ::core::cmp::Eq for CERT_CHAIN_POLICY_PARA {} unsafe impl ::windows::core::Abi for CERT_CHAIN_POLICY_PARA { type Abi = Self; } pub const CERT_CHAIN_POLICY_SSL_F12_ERROR_LEVEL: u32 = 2u32; pub const CERT_CHAIN_POLICY_SSL_F12_NONE_CATEGORY: u32 = 0u32; pub const CERT_CHAIN_POLICY_SSL_F12_ROOT_PROGRAM_CATEGORY: u32 = 2u32; pub const CERT_CHAIN_POLICY_SSL_F12_SUCCESS_LEVEL: u32 = 0u32; pub const CERT_CHAIN_POLICY_SSL_F12_WARNING_LEVEL: u32 = 1u32; pub const CERT_CHAIN_POLICY_SSL_F12_WEAK_CRYPTO_CATEGORY: u32 = 1u32; pub const CERT_CHAIN_POLICY_SSL_KEY_PIN_MISMATCH_ERROR: i32 = -2i32; pub const CERT_CHAIN_POLICY_SSL_KEY_PIN_MISMATCH_WARNING: u32 = 2u32; pub const CERT_CHAIN_POLICY_SSL_KEY_PIN_MITM_ERROR: i32 = -1i32; pub const CERT_CHAIN_POLICY_SSL_KEY_PIN_MITM_WARNING: u32 = 1u32; pub const CERT_CHAIN_POLICY_SSL_KEY_PIN_SUCCESS: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_CHAIN_POLICY_STATUS { pub cbSize: u32, pub dwError: u32, pub lChainIndex: i32, pub lElementIndex: i32, pub pvExtraPolicyStatus: *mut ::core::ffi::c_void, } impl CERT_CHAIN_POLICY_STATUS {} impl ::core::default::Default for CERT_CHAIN_POLICY_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_CHAIN_POLICY_STATUS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_CHAIN_POLICY_STATUS").field("cbSize", &self.cbSize).field("dwError", &self.dwError).field("lChainIndex", &self.lChainIndex).field("lElementIndex", &self.lElementIndex).field("pvExtraPolicyStatus", &self.pvExtraPolicyStatus).finish() } } impl ::core::cmp::PartialEq for CERT_CHAIN_POLICY_STATUS { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwError == other.dwError && self.lChainIndex == other.lChainIndex && self.lElementIndex == other.lElementIndex && self.pvExtraPolicyStatus == other.pvExtraPolicyStatus } } impl ::core::cmp::Eq for CERT_CHAIN_POLICY_STATUS {} unsafe impl ::windows::core::Abi for CERT_CHAIN_POLICY_STATUS { type Abi = Self; } pub const CERT_CHAIN_RETURN_LOWER_QUALITY_CONTEXTS: u32 = 128u32; pub const CERT_CHAIN_REVOCATION_ACCUMULATIVE_TIMEOUT: u32 = 134217728u32; pub const CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY: u32 = 2147483648u32; pub const CERT_CHAIN_REVOCATION_CHECK_CHAIN: u32 = 536870912u32; pub const CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT: u32 = 1073741824u32; pub const CERT_CHAIN_REVOCATION_CHECK_END_CERT: u32 = 268435456u32; pub const CERT_CHAIN_REVOCATION_CHECK_OCSP_CERT: u32 = 67108864u32; pub const CERT_CHAIN_STRONG_SIGN_DISABLE_END_CHECK_FLAG: u32 = 1u32; pub const CERT_CHAIN_THREAD_STORE_SYNC: u32 = 2u32; pub const CERT_CHAIN_TIMESTAMP_TIME: u32 = 512u32; pub const CERT_CHAIN_USE_LOCAL_MACHINE_STORE: u32 = 8u32; pub const CERT_CLOSE_STORE_CHECK_FLAG: u32 = 2u32; pub const CERT_CLOSE_STORE_FORCE_FLAG: u32 = 1u32; pub const CERT_CLR_DELETE_KEY_PROP_ID: u32 = 125u32; pub const CERT_COMPARE_ANY: u32 = 0u32; pub const CERT_COMPARE_ATTR: u32 = 3u32; pub const CERT_COMPARE_CERT_ID: u32 = 16u32; pub const CERT_COMPARE_CROSS_CERT_DIST_POINTS: u32 = 17u32; pub const CERT_COMPARE_CTL_USAGE: u32 = 10u32; pub const CERT_COMPARE_ENHKEY_USAGE: u32 = 10u32; pub const CERT_COMPARE_EXISTING: u32 = 13u32; pub const CERT_COMPARE_HASH: u32 = 1u32; pub const CERT_COMPARE_HASH_STR: u32 = 20u32; pub const CERT_COMPARE_HAS_PRIVATE_KEY: u32 = 21u32; pub const CERT_COMPARE_ISSUER_OF: u32 = 12u32; pub const CERT_COMPARE_KEY_IDENTIFIER: u32 = 15u32; pub const CERT_COMPARE_KEY_SPEC: u32 = 9u32; pub const CERT_COMPARE_MASK: u32 = 65535u32; pub const CERT_COMPARE_MD5_HASH: u32 = 4u32; pub const CERT_COMPARE_NAME: u32 = 2u32; pub const CERT_COMPARE_NAME_STR_A: u32 = 7u32; pub const CERT_COMPARE_NAME_STR_W: u32 = 8u32; pub const CERT_COMPARE_PROPERTY: u32 = 5u32; pub const CERT_COMPARE_PUBKEY_MD5_HASH: u32 = 18u32; pub const CERT_COMPARE_PUBLIC_KEY: u32 = 6u32; pub const CERT_COMPARE_SHA1_HASH: u32 = 1u32; pub const CERT_COMPARE_SHIFT: i32 = 16i32; pub const CERT_COMPARE_SIGNATURE_HASH: u32 = 14u32; pub const CERT_COMPARE_SUBJECT_CERT: u32 = 11u32; pub const CERT_COMPARE_SUBJECT_INFO_ACCESS: u32 = 19u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_CONTEXT { pub dwCertEncodingType: u32, pub pbCertEncoded: *mut u8, pub cbCertEncoded: u32, pub pCertInfo: *mut CERT_INFO, pub hCertStore: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CERT_CONTEXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_CONTEXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_CONTEXT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_CONTEXT").field("dwCertEncodingType", &self.dwCertEncodingType).field("pbCertEncoded", &self.pbCertEncoded).field("cbCertEncoded", &self.cbCertEncoded).field("pCertInfo", &self.pCertInfo).field("hCertStore", &self.hCertStore).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_CONTEXT { fn eq(&self, other: &Self) -> bool { self.dwCertEncodingType == other.dwCertEncodingType && self.pbCertEncoded == other.pbCertEncoded && self.cbCertEncoded == other.cbCertEncoded && self.pCertInfo == other.pCertInfo && self.hCertStore == other.hCertStore } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_CONTEXT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_CONTEXT { type Abi = Self; } pub const CERT_CONTEXT_REVOCATION_TYPE: u32 = 1u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_CONTROL_STORE_FLAGS(pub u32); pub const CERT_STORE_CTRL_COMMIT_FORCE_FLAG: CERT_CONTROL_STORE_FLAGS = CERT_CONTROL_STORE_FLAGS(1u32); pub const CERT_STORE_CTRL_COMMIT_CLEAR_FLAG: CERT_CONTROL_STORE_FLAGS = CERT_CONTROL_STORE_FLAGS(2u32); pub const CERT_STORE_CTRL_INHIBIT_DUPLICATE_HANDLE_FLAG: CERT_CONTROL_STORE_FLAGS = CERT_CONTROL_STORE_FLAGS(1u32); impl ::core::convert::From<u32> for CERT_CONTROL_STORE_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_CONTROL_STORE_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CERT_CONTROL_STORE_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_CONTROL_STORE_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_CONTROL_STORE_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_CONTROL_STORE_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_CONTROL_STORE_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_CREATE_CONTEXT_NOCOPY_FLAG: u32 = 1u32; pub const CERT_CREATE_CONTEXT_NO_ENTRY_FLAG: u32 = 8u32; pub const CERT_CREATE_CONTEXT_NO_HCRYPTMSG_FLAG: u32 = 4u32; #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_CREATE_CONTEXT_PARA { pub cbSize: u32, pub pfnFree: ::core::option::Option<PFN_CRYPT_FREE>, pub pvFree: *mut ::core::ffi::c_void, pub pfnSort: ::core::option::Option<PFN_CERT_CREATE_CONTEXT_SORT_FUNC>, pub pvSort: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CERT_CREATE_CONTEXT_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_CREATE_CONTEXT_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_CREATE_CONTEXT_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_CREATE_CONTEXT_PARA").field("cbSize", &self.cbSize).field("pvFree", &self.pvFree).field("pvSort", &self.pvSort).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_CREATE_CONTEXT_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pfnFree.map(|f| f as usize) == other.pfnFree.map(|f| f as usize) && self.pvFree == other.pvFree && self.pfnSort.map(|f| f as usize) == other.pfnSort.map(|f| f as usize) && self.pvSort == other.pvSort } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_CREATE_CONTEXT_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_CREATE_CONTEXT_PARA { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const CERT_CREATE_CONTEXT_SORTED_FLAG: u32 = 2u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_CREATE_SELFSIGN_FLAGS(pub u32); pub const CERT_CREATE_SELFSIGN_NO_KEY_INFO: CERT_CREATE_SELFSIGN_FLAGS = CERT_CREATE_SELFSIGN_FLAGS(2u32); pub const CERT_CREATE_SELFSIGN_NO_SIGN: CERT_CREATE_SELFSIGN_FLAGS = CERT_CREATE_SELFSIGN_FLAGS(1u32); impl ::core::convert::From<u32> for CERT_CREATE_SELFSIGN_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_CREATE_SELFSIGN_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CERT_CREATE_SELFSIGN_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_CREATE_SELFSIGN_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_CREATE_SELFSIGN_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_CREATE_SELFSIGN_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_CREATE_SELFSIGN_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_CRL_CONTEXT_PAIR { pub pCertContext: *mut CERT_CONTEXT, pub pCrlContext: *mut CRL_CONTEXT, } #[cfg(feature = "Win32_Foundation")] impl CERT_CRL_CONTEXT_PAIR {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_CRL_CONTEXT_PAIR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_CRL_CONTEXT_PAIR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_CRL_CONTEXT_PAIR").field("pCertContext", &self.pCertContext).field("pCrlContext", &self.pCrlContext).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_CRL_CONTEXT_PAIR { fn eq(&self, other: &Self) -> bool { self.pCertContext == other.pCertContext && self.pCrlContext == other.pCrlContext } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_CRL_CONTEXT_PAIR {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_CRL_CONTEXT_PAIR { type Abi = Self; } pub const CERT_CRL_SIGN_KEY_USAGE: u32 = 2u32; pub const CERT_CROSS_CERT_DIST_POINTS_PROP_ID: u32 = 23u32; pub const CERT_CTL_USAGE_PROP_ID: u32 = 9u32; pub const CERT_DATA_ENCIPHERMENT_KEY_USAGE: u32 = 16u32; pub const CERT_DATE_STAMP_PROP_ID: u32 = 27u32; pub const CERT_DECIPHER_ONLY_KEY_USAGE: u32 = 128u32; pub const CERT_DESCRIPTION_PROP_ID: u32 = 13u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_DH_PARAMETERS { pub p: CRYPTOAPI_BLOB, pub g: CRYPTOAPI_BLOB, } impl CERT_DH_PARAMETERS {} impl ::core::default::Default for CERT_DH_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_DH_PARAMETERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_DH_PARAMETERS").field("p", &self.p).field("g", &self.g).finish() } } impl ::core::cmp::PartialEq for CERT_DH_PARAMETERS { fn eq(&self, other: &Self) -> bool { self.p == other.p && self.g == other.g } } impl ::core::cmp::Eq for CERT_DH_PARAMETERS {} unsafe impl ::windows::core::Abi for CERT_DH_PARAMETERS { type Abi = Self; } pub const CERT_DIGITAL_SIGNATURE_KEY_USAGE: u32 = 128u32; pub const CERT_DISALLOWED_ENHKEY_USAGE_PROP_ID: u32 = 122u32; pub const CERT_DISALLOWED_FILETIME_PROP_ID: u32 = 104u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_DSS_PARAMETERS { pub p: CRYPTOAPI_BLOB, pub q: CRYPTOAPI_BLOB, pub g: CRYPTOAPI_BLOB, } impl CERT_DSS_PARAMETERS {} impl ::core::default::Default for CERT_DSS_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_DSS_PARAMETERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_DSS_PARAMETERS").field("p", &self.p).field("q", &self.q).field("g", &self.g).finish() } } impl ::core::cmp::PartialEq for CERT_DSS_PARAMETERS { fn eq(&self, other: &Self) -> bool { self.p == other.p && self.q == other.q && self.g == other.g } } impl ::core::cmp::Eq for CERT_DSS_PARAMETERS {} unsafe impl ::windows::core::Abi for CERT_DSS_PARAMETERS { type Abi = Self; } pub const CERT_DSS_R_LEN: u32 = 20u32; pub const CERT_DSS_S_LEN: u32 = 20u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_ECC_SIGNATURE { pub r: CRYPTOAPI_BLOB, pub s: CRYPTOAPI_BLOB, } impl CERT_ECC_SIGNATURE {} impl ::core::default::Default for CERT_ECC_SIGNATURE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_ECC_SIGNATURE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_ECC_SIGNATURE").field("r", &self.r).field("s", &self.s).finish() } } impl ::core::cmp::PartialEq for CERT_ECC_SIGNATURE { fn eq(&self, other: &Self) -> bool { self.r == other.r && self.s == other.s } } impl ::core::cmp::Eq for CERT_ECC_SIGNATURE {} unsafe impl ::windows::core::Abi for CERT_ECC_SIGNATURE { type Abi = Self; } pub const CERT_EFS_PROP_ID: u32 = 17u32; pub const CERT_ENCIPHER_ONLY_KEY_USAGE: u32 = 1u32; pub const CERT_ENCODING_TYPE_MASK: u32 = 65535u32; pub const CERT_END_ENTITY_SUBJECT_FLAG: u32 = 64u32; pub const CERT_ENHKEY_USAGE_PROP_ID: u32 = 9u32; pub const CERT_ENROLLMENT_PROP_ID: u32 = 26u32; pub const CERT_EXCLUDED_SUBTREE_BIT: i32 = -2147483648i32; pub const CERT_EXTENDED_ERROR_INFO_PROP_ID: u32 = 30u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_EXTENSION { pub pszObjId: super::super::Foundation::PSTR, pub fCritical: super::super::Foundation::BOOL, pub Value: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CERT_EXTENSION {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_EXTENSION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_EXTENSION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_EXTENSION").field("pszObjId", &self.pszObjId).field("fCritical", &self.fCritical).field("Value", &self.Value).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_EXTENSION { fn eq(&self, other: &Self) -> bool { self.pszObjId == other.pszObjId && self.fCritical == other.fCritical && self.Value == other.Value } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_EXTENSION {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_EXTENSION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_EXTENSIONS { pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl CERT_EXTENSIONS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_EXTENSIONS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_EXTENSIONS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_EXTENSIONS").field("cExtension", &self.cExtension).field("rgExtension", &self.rgExtension).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_EXTENSIONS { fn eq(&self, other: &Self) -> bool { self.cExtension == other.cExtension && self.rgExtension == other.rgExtension } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_EXTENSIONS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_EXTENSIONS { type Abi = Self; } pub const CERT_FILE_HASH_USE_TYPE: u32 = 1u32; pub const CERT_FILE_STORE_COMMIT_ENABLE_FLAG: u32 = 65536u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_FIND_CHAIN_IN_STORE_FLAGS(pub u32); pub const CERT_CHAIN_FIND_BY_ISSUER_COMPARE_KEY_FLAG: CERT_FIND_CHAIN_IN_STORE_FLAGS = CERT_FIND_CHAIN_IN_STORE_FLAGS(1u32); pub const CERT_CHAIN_FIND_BY_ISSUER_COMPLEX_CHAIN_FLAG: CERT_FIND_CHAIN_IN_STORE_FLAGS = CERT_FIND_CHAIN_IN_STORE_FLAGS(2u32); pub const CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG: CERT_FIND_CHAIN_IN_STORE_FLAGS = CERT_FIND_CHAIN_IN_STORE_FLAGS(32768u32); pub const CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG: CERT_FIND_CHAIN_IN_STORE_FLAGS = CERT_FIND_CHAIN_IN_STORE_FLAGS(4u32); pub const CERT_CHAIN_FIND_BY_ISSUER_LOCAL_MACHINE_FLAG: CERT_FIND_CHAIN_IN_STORE_FLAGS = CERT_FIND_CHAIN_IN_STORE_FLAGS(8u32); pub const CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG: CERT_FIND_CHAIN_IN_STORE_FLAGS = CERT_FIND_CHAIN_IN_STORE_FLAGS(16384u32); impl ::core::convert::From<u32> for CERT_FIND_CHAIN_IN_STORE_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_FIND_CHAIN_IN_STORE_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CERT_FIND_CHAIN_IN_STORE_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_FIND_CHAIN_IN_STORE_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_FIND_CHAIN_IN_STORE_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_FIND_CHAIN_IN_STORE_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_FIND_CHAIN_IN_STORE_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_FIND_FLAGS(pub u32); pub const CERT_FIND_ANY: CERT_FIND_FLAGS = CERT_FIND_FLAGS(0u32); pub const CERT_FIND_CERT_ID: CERT_FIND_FLAGS = CERT_FIND_FLAGS(1048576u32); pub const CERT_FIND_CTL_USAGE: CERT_FIND_FLAGS = CERT_FIND_FLAGS(655360u32); pub const CERT_FIND_ENHKEY_USAGE: CERT_FIND_FLAGS = CERT_FIND_FLAGS(655360u32); pub const CERT_FIND_EXISTING: CERT_FIND_FLAGS = CERT_FIND_FLAGS(851968u32); pub const CERT_FIND_HASH: CERT_FIND_FLAGS = CERT_FIND_FLAGS(65536u32); pub const CERT_FIND_HAS_PRIVATE_KEY: CERT_FIND_FLAGS = CERT_FIND_FLAGS(1376256u32); pub const CERT_FIND_ISSUER_ATTR: CERT_FIND_FLAGS = CERT_FIND_FLAGS(196612u32); pub const CERT_FIND_ISSUER_NAME: CERT_FIND_FLAGS = CERT_FIND_FLAGS(131076u32); pub const CERT_FIND_ISSUER_OF: CERT_FIND_FLAGS = CERT_FIND_FLAGS(786432u32); pub const CERT_FIND_ISSUER_STR: CERT_FIND_FLAGS = CERT_FIND_FLAGS(524292u32); pub const CERT_FIND_KEY_IDENTIFIER: CERT_FIND_FLAGS = CERT_FIND_FLAGS(983040u32); pub const CERT_FIND_KEY_SPEC: CERT_FIND_FLAGS = CERT_FIND_FLAGS(589824u32); pub const CERT_FIND_MD5_HASH: CERT_FIND_FLAGS = CERT_FIND_FLAGS(262144u32); pub const CERT_FIND_PROPERTY: CERT_FIND_FLAGS = CERT_FIND_FLAGS(327680u32); pub const CERT_FIND_PUBLIC_KEY: CERT_FIND_FLAGS = CERT_FIND_FLAGS(393216u32); pub const CERT_FIND_SHA1_HASH: CERT_FIND_FLAGS = CERT_FIND_FLAGS(65536u32); pub const CERT_FIND_SIGNATURE_HASH: CERT_FIND_FLAGS = CERT_FIND_FLAGS(917504u32); pub const CERT_FIND_SUBJECT_ATTR: CERT_FIND_FLAGS = CERT_FIND_FLAGS(196615u32); pub const CERT_FIND_SUBJECT_CERT: CERT_FIND_FLAGS = CERT_FIND_FLAGS(720896u32); pub const CERT_FIND_SUBJECT_NAME: CERT_FIND_FLAGS = CERT_FIND_FLAGS(131079u32); pub const CERT_FIND_SUBJECT_STR: CERT_FIND_FLAGS = CERT_FIND_FLAGS(524295u32); pub const CERT_FIND_CROSS_CERT_DIST_POINTS: CERT_FIND_FLAGS = CERT_FIND_FLAGS(1114112u32); pub const CERT_FIND_PUBKEY_MD5_HASH: CERT_FIND_FLAGS = CERT_FIND_FLAGS(1179648u32); pub const CERT_FIND_SUBJECT_STR_A: CERT_FIND_FLAGS = CERT_FIND_FLAGS(458759u32); pub const CERT_FIND_SUBJECT_STR_W: CERT_FIND_FLAGS = CERT_FIND_FLAGS(524295u32); pub const CERT_FIND_ISSUER_STR_A: CERT_FIND_FLAGS = CERT_FIND_FLAGS(458756u32); pub const CERT_FIND_ISSUER_STR_W: CERT_FIND_FLAGS = CERT_FIND_FLAGS(524292u32); pub const CERT_FIND_SUBJECT_INFO_ACCESS: CERT_FIND_FLAGS = CERT_FIND_FLAGS(1245184u32); pub const CERT_FIND_HASH_STR: CERT_FIND_FLAGS = CERT_FIND_FLAGS(1310720u32); pub const CERT_FIND_OPTIONAL_ENHKEY_USAGE_FLAG: CERT_FIND_FLAGS = CERT_FIND_FLAGS(1u32); pub const CERT_FIND_EXT_ONLY_ENHKEY_USAGE_FLAG: CERT_FIND_FLAGS = CERT_FIND_FLAGS(2u32); pub const CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG: CERT_FIND_FLAGS = CERT_FIND_FLAGS(4u32); pub const CERT_FIND_NO_ENHKEY_USAGE_FLAG: CERT_FIND_FLAGS = CERT_FIND_FLAGS(8u32); pub const CERT_FIND_OR_ENHKEY_USAGE_FLAG: CERT_FIND_FLAGS = CERT_FIND_FLAGS(16u32); pub const CERT_FIND_VALID_ENHKEY_USAGE_FLAG: CERT_FIND_FLAGS = CERT_FIND_FLAGS(32u32); pub const CERT_FIND_OPTIONAL_CTL_USAGE_FLAG: CERT_FIND_FLAGS = CERT_FIND_FLAGS(1u32); pub const CERT_FIND_EXT_ONLY_CTL_USAGE_FLAG: CERT_FIND_FLAGS = CERT_FIND_FLAGS(2u32); pub const CERT_FIND_PROP_ONLY_CTL_USAGE_FLAG: CERT_FIND_FLAGS = CERT_FIND_FLAGS(4u32); pub const CERT_FIND_NO_CTL_USAGE_FLAG: CERT_FIND_FLAGS = CERT_FIND_FLAGS(8u32); pub const CERT_FIND_OR_CTL_USAGE_FLAG: CERT_FIND_FLAGS = CERT_FIND_FLAGS(16u32); pub const CERT_FIND_VALID_CTL_USAGE_FLAG: CERT_FIND_FLAGS = CERT_FIND_FLAGS(32u32); impl ::core::convert::From<u32> for CERT_FIND_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_FIND_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CERT_FIND_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_FIND_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_FIND_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_FIND_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_FIND_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_FIND_TYPE(pub u32); pub const CTL_FIND_ANY: CERT_FIND_TYPE = CERT_FIND_TYPE(0u32); pub const CTL_FIND_SHA1_HASH: CERT_FIND_TYPE = CERT_FIND_TYPE(1u32); pub const CTL_FIND_MD5_HASH: CERT_FIND_TYPE = CERT_FIND_TYPE(2u32); pub const CTL_FIND_USAGE: CERT_FIND_TYPE = CERT_FIND_TYPE(3u32); pub const CTL_FIND_SAME_USAGE_FLAG: CERT_FIND_TYPE = CERT_FIND_TYPE(1u32); pub const CTL_FIND_EXISTING: CERT_FIND_TYPE = CERT_FIND_TYPE(5u32); pub const CTL_FIND_SUBJECT: CERT_FIND_TYPE = CERT_FIND_TYPE(4u32); impl ::core::convert::From<u32> for CERT_FIND_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_FIND_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CERT_FIND_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_FIND_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_FIND_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_FIND_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_FIND_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_FIRST_RESERVED_PROP_ID: u32 = 128u32; pub const CERT_FIRST_USER_PROP_ID: u32 = 32768u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_FORTEZZA_DATA_PROP { pub SerialNumber: [u8; 8], pub CertIndex: i32, pub CertLabel: [u8; 36], } impl CERT_FORTEZZA_DATA_PROP {} impl ::core::default::Default for CERT_FORTEZZA_DATA_PROP { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_FORTEZZA_DATA_PROP { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_FORTEZZA_DATA_PROP").field("SerialNumber", &self.SerialNumber).field("CertIndex", &self.CertIndex).field("CertLabel", &self.CertLabel).finish() } } impl ::core::cmp::PartialEq for CERT_FORTEZZA_DATA_PROP { fn eq(&self, other: &Self) -> bool { self.SerialNumber == other.SerialNumber && self.CertIndex == other.CertIndex && self.CertLabel == other.CertLabel } } impl ::core::cmp::Eq for CERT_FORTEZZA_DATA_PROP {} unsafe impl ::windows::core::Abi for CERT_FORTEZZA_DATA_PROP { type Abi = Self; } pub const CERT_FORTEZZA_DATA_PROP_ID: u32 = 18u32; pub const CERT_FRIENDLY_NAME_PROP_ID: u32 = 11u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_GENERAL_SUBTREE { pub Base: CERT_ALT_NAME_ENTRY, pub dwMinimum: u32, pub fMaximum: super::super::Foundation::BOOL, pub dwMaximum: u32, } #[cfg(feature = "Win32_Foundation")] impl CERT_GENERAL_SUBTREE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_GENERAL_SUBTREE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_GENERAL_SUBTREE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_GENERAL_SUBTREE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_GENERAL_SUBTREE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_HASHED_URL { pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub Hash: CRYPTOAPI_BLOB, pub pwszUrl: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_HASHED_URL {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_HASHED_URL { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_HASHED_URL { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_HASHED_URL").field("HashAlgorithm", &self.HashAlgorithm).field("Hash", &self.Hash).field("pwszUrl", &self.pwszUrl).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_HASHED_URL { fn eq(&self, other: &Self) -> bool { self.HashAlgorithm == other.HashAlgorithm && self.Hash == other.Hash && self.pwszUrl == other.pwszUrl } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_HASHED_URL {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_HASHED_URL { type Abi = Self; } pub const CERT_HASH_PROP_ID: u32 = 3u32; pub const CERT_HCRYPTPROV_OR_NCRYPT_KEY_HANDLE_PROP_ID: u32 = 79u32; pub const CERT_HCRYPTPROV_TRANSFER_PROP_ID: u32 = 100u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_ID { pub dwIdChoice: CERT_ID_OPTION, pub Anonymous: CERT_ID_0, } impl CERT_ID {} impl ::core::default::Default for CERT_ID { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for CERT_ID { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for CERT_ID {} unsafe impl ::windows::core::Abi for CERT_ID { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union CERT_ID_0 { pub IssuerSerialNumber: CERT_ISSUER_SERIAL_NUMBER, pub KeyId: CRYPTOAPI_BLOB, pub HashId: CRYPTOAPI_BLOB, } impl CERT_ID_0 {} impl ::core::default::Default for CERT_ID_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for CERT_ID_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for CERT_ID_0 {} unsafe impl ::windows::core::Abi for CERT_ID_0 { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_ID_OPTION(pub u32); pub const CERT_ID_ISSUER_SERIAL_NUMBER: CERT_ID_OPTION = CERT_ID_OPTION(1u32); pub const CERT_ID_KEY_IDENTIFIER: CERT_ID_OPTION = CERT_ID_OPTION(2u32); pub const CERT_ID_SHA1_HASH: CERT_ID_OPTION = CERT_ID_OPTION(3u32); impl ::core::convert::From<u32> for CERT_ID_OPTION { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_ID_OPTION { type Abi = Self; } impl ::core::ops::BitOr for CERT_ID_OPTION { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_ID_OPTION { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_ID_OPTION { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_ID_OPTION { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_ID_OPTION { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_IE30_RESERVED_PROP_ID: u32 = 7u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_INFO { pub dwVersion: u32, pub SerialNumber: CRYPTOAPI_BLOB, pub SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub Issuer: CRYPTOAPI_BLOB, pub NotBefore: super::super::Foundation::FILETIME, pub NotAfter: super::super::Foundation::FILETIME, pub Subject: CRYPTOAPI_BLOB, pub SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, pub IssuerUniqueId: CRYPT_BIT_BLOB, pub SubjectUniqueId: CRYPT_BIT_BLOB, pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl CERT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_INFO") .field("dwVersion", &self.dwVersion) .field("SerialNumber", &self.SerialNumber) .field("SignatureAlgorithm", &self.SignatureAlgorithm) .field("Issuer", &self.Issuer) .field("NotBefore", &self.NotBefore) .field("NotAfter", &self.NotAfter) .field("Subject", &self.Subject) .field("SubjectPublicKeyInfo", &self.SubjectPublicKeyInfo) .field("IssuerUniqueId", &self.IssuerUniqueId) .field("SubjectUniqueId", &self.SubjectUniqueId) .field("cExtension", &self.cExtension) .field("rgExtension", &self.rgExtension) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.SerialNumber == other.SerialNumber && self.SignatureAlgorithm == other.SignatureAlgorithm && self.Issuer == other.Issuer && self.NotBefore == other.NotBefore && self.NotAfter == other.NotAfter && self.Subject == other.Subject && self.SubjectPublicKeyInfo == other.SubjectPublicKeyInfo && self.IssuerUniqueId == other.IssuerUniqueId && self.SubjectUniqueId == other.SubjectUniqueId && self.cExtension == other.cExtension && self.rgExtension == other.rgExtension } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_INFO { type Abi = Self; } pub const CERT_INFO_EXTENSION_FLAG: u32 = 11u32; pub const CERT_INFO_ISSUER_FLAG: u32 = 4u32; pub const CERT_INFO_ISSUER_UNIQUE_ID_FLAG: u32 = 9u32; pub const CERT_INFO_NOT_AFTER_FLAG: u32 = 6u32; pub const CERT_INFO_NOT_BEFORE_FLAG: u32 = 5u32; pub const CERT_INFO_SERIAL_NUMBER_FLAG: u32 = 2u32; pub const CERT_INFO_SIGNATURE_ALGORITHM_FLAG: u32 = 3u32; pub const CERT_INFO_SUBJECT_FLAG: u32 = 7u32; pub const CERT_INFO_SUBJECT_PUBLIC_KEY_INFO_FLAG: u32 = 8u32; pub const CERT_INFO_SUBJECT_UNIQUE_ID_FLAG: u32 = 10u32; pub const CERT_INFO_VERSION_FLAG: u32 = 1u32; pub const CERT_ISOLATED_KEY_PROP_ID: u32 = 118u32; pub const CERT_ISSUER_CHAIN_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID: u32 = 96u32; pub const CERT_ISSUER_CHAIN_SIGN_HASH_CNG_ALG_PROP_ID: u32 = 95u32; pub const CERT_ISSUER_PUBLIC_KEY_MD5_HASH_PROP_ID: u32 = 24u32; pub const CERT_ISSUER_PUB_KEY_BIT_LENGTH_PROP_ID: u32 = 94u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_ISSUER_SERIAL_NUMBER { pub Issuer: CRYPTOAPI_BLOB, pub SerialNumber: CRYPTOAPI_BLOB, } impl CERT_ISSUER_SERIAL_NUMBER {} impl ::core::default::Default for CERT_ISSUER_SERIAL_NUMBER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_ISSUER_SERIAL_NUMBER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_ISSUER_SERIAL_NUMBER").field("Issuer", &self.Issuer).field("SerialNumber", &self.SerialNumber).finish() } } impl ::core::cmp::PartialEq for CERT_ISSUER_SERIAL_NUMBER { fn eq(&self, other: &Self) -> bool { self.Issuer == other.Issuer && self.SerialNumber == other.SerialNumber } } impl ::core::cmp::Eq for CERT_ISSUER_SERIAL_NUMBER {} unsafe impl ::windows::core::Abi for CERT_ISSUER_SERIAL_NUMBER { type Abi = Self; } pub const CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID: u32 = 28u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_KEYGEN_REQUEST_INFO { pub dwVersion: u32, pub SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, pub pwszChallengeString: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_KEYGEN_REQUEST_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_KEYGEN_REQUEST_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_KEYGEN_REQUEST_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_KEYGEN_REQUEST_INFO").field("dwVersion", &self.dwVersion).field("SubjectPublicKeyInfo", &self.SubjectPublicKeyInfo).field("pwszChallengeString", &self.pwszChallengeString).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_KEYGEN_REQUEST_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.SubjectPublicKeyInfo == other.SubjectPublicKeyInfo && self.pwszChallengeString == other.pwszChallengeString } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_KEYGEN_REQUEST_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_KEYGEN_REQUEST_INFO { type Abi = Self; } pub const CERT_KEYGEN_REQUEST_V1: u32 = 0u32; pub const CERT_KEY_AGREEMENT_KEY_USAGE: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_KEY_ATTRIBUTES_INFO { pub KeyId: CRYPTOAPI_BLOB, pub IntendedKeyUsage: CRYPT_BIT_BLOB, pub pPrivateKeyUsagePeriod: *mut CERT_PRIVATE_KEY_VALIDITY, } #[cfg(feature = "Win32_Foundation")] impl CERT_KEY_ATTRIBUTES_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_KEY_ATTRIBUTES_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_KEY_ATTRIBUTES_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_KEY_ATTRIBUTES_INFO").field("KeyId", &self.KeyId).field("IntendedKeyUsage", &self.IntendedKeyUsage).field("pPrivateKeyUsagePeriod", &self.pPrivateKeyUsagePeriod).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_KEY_ATTRIBUTES_INFO { fn eq(&self, other: &Self) -> bool { self.KeyId == other.KeyId && self.IntendedKeyUsage == other.IntendedKeyUsage && self.pPrivateKeyUsagePeriod == other.pPrivateKeyUsagePeriod } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_KEY_ATTRIBUTES_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_KEY_ATTRIBUTES_INFO { type Abi = Self; } pub const CERT_KEY_CERT_SIGN_KEY_USAGE: u32 = 4u32; pub const CERT_KEY_CLASSIFICATION_PROP_ID: u32 = 120u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_KEY_CONTEXT { pub cbSize: u32, pub Anonymous: CERT_KEY_CONTEXT_0, pub dwKeySpec: u32, } impl CERT_KEY_CONTEXT {} impl ::core::default::Default for CERT_KEY_CONTEXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for CERT_KEY_CONTEXT { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for CERT_KEY_CONTEXT {} unsafe impl ::windows::core::Abi for CERT_KEY_CONTEXT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union CERT_KEY_CONTEXT_0 { pub hCryptProv: usize, pub hNCryptKey: usize, } impl CERT_KEY_CONTEXT_0 {} impl ::core::default::Default for CERT_KEY_CONTEXT_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for CERT_KEY_CONTEXT_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for CERT_KEY_CONTEXT_0 {} unsafe impl ::windows::core::Abi for CERT_KEY_CONTEXT_0 { type Abi = Self; } pub const CERT_KEY_CONTEXT_PROP_ID: u32 = 5u32; pub const CERT_KEY_ENCIPHERMENT_KEY_USAGE: u32 = 32u32; pub const CERT_KEY_IDENTIFIER_PROP_ID: u32 = 20u32; pub const CERT_KEY_PROV_HANDLE_PROP_ID: u32 = 1u32; pub const CERT_KEY_PROV_INFO_PROP_ID: u32 = 2u32; pub const CERT_KEY_REPAIR_ATTEMPTED_PROP_ID: u32 = 103u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_KEY_SPEC(pub u32); pub const AT_KEYEXCHANGE: CERT_KEY_SPEC = CERT_KEY_SPEC(1u32); pub const AT_SIGNATURE: CERT_KEY_SPEC = CERT_KEY_SPEC(2u32); pub const CERT_NCRYPT_KEY_SPEC: CERT_KEY_SPEC = CERT_KEY_SPEC(4294967295u32); impl ::core::convert::From<u32> for CERT_KEY_SPEC { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_KEY_SPEC { type Abi = Self; } impl ::core::ops::BitOr for CERT_KEY_SPEC { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_KEY_SPEC { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_KEY_SPEC { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_KEY_SPEC { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_KEY_SPEC { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_KEY_SPEC_PROP_ID: u32 = 6u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_KEY_USAGE_RESTRICTION_INFO { pub cCertPolicyId: u32, pub rgCertPolicyId: *mut CERT_POLICY_ID, pub RestrictedKeyUsage: CRYPT_BIT_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CERT_KEY_USAGE_RESTRICTION_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_KEY_USAGE_RESTRICTION_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_KEY_USAGE_RESTRICTION_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_KEY_USAGE_RESTRICTION_INFO").field("cCertPolicyId", &self.cCertPolicyId).field("rgCertPolicyId", &self.rgCertPolicyId).field("RestrictedKeyUsage", &self.RestrictedKeyUsage).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_KEY_USAGE_RESTRICTION_INFO { fn eq(&self, other: &Self) -> bool { self.cCertPolicyId == other.cCertPolicyId && self.rgCertPolicyId == other.rgCertPolicyId && self.RestrictedKeyUsage == other.RestrictedKeyUsage } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_KEY_USAGE_RESTRICTION_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_KEY_USAGE_RESTRICTION_INFO { type Abi = Self; } pub const CERT_LAST_RESERVED_PROP_ID: u32 = 32767u32; pub const CERT_LAST_USER_PROP_ID: u32 = 65535u32; pub const CERT_LDAP_STORE_AREC_EXCLUSIVE_FLAG: u32 = 131072u32; pub const CERT_LDAP_STORE_OPENED_FLAG: u32 = 262144u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_LDAP_STORE_OPENED_PARA { pub pvLdapSessionHandle: *mut ::core::ffi::c_void, pub pwszLdapUrl: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_LDAP_STORE_OPENED_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_LDAP_STORE_OPENED_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_LDAP_STORE_OPENED_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_LDAP_STORE_OPENED_PARA").field("pvLdapSessionHandle", &self.pvLdapSessionHandle).field("pwszLdapUrl", &self.pwszLdapUrl).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_LDAP_STORE_OPENED_PARA { fn eq(&self, other: &Self) -> bool { self.pvLdapSessionHandle == other.pvLdapSessionHandle && self.pwszLdapUrl == other.pwszLdapUrl } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_LDAP_STORE_OPENED_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_LDAP_STORE_OPENED_PARA { type Abi = Self; } pub const CERT_LDAP_STORE_SIGN_FLAG: u32 = 65536u32; pub const CERT_LDAP_STORE_UNBIND_FLAG: u32 = 524288u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_LOGOTYPE_AUDIO { pub LogotypeDetails: CERT_LOGOTYPE_DETAILS, pub pLogotypeAudioInfo: *mut CERT_LOGOTYPE_AUDIO_INFO, } #[cfg(feature = "Win32_Foundation")] impl CERT_LOGOTYPE_AUDIO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_LOGOTYPE_AUDIO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_LOGOTYPE_AUDIO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_LOGOTYPE_AUDIO").field("LogotypeDetails", &self.LogotypeDetails).field("pLogotypeAudioInfo", &self.pLogotypeAudioInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_LOGOTYPE_AUDIO { fn eq(&self, other: &Self) -> bool { self.LogotypeDetails == other.LogotypeDetails && self.pLogotypeAudioInfo == other.pLogotypeAudioInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_LOGOTYPE_AUDIO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_AUDIO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_LOGOTYPE_AUDIO_INFO { pub dwFileSize: u32, pub dwPlayTime: u32, pub dwChannels: u32, pub dwSampleRate: u32, pub pwszLanguage: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_LOGOTYPE_AUDIO_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_LOGOTYPE_AUDIO_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_LOGOTYPE_AUDIO_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_LOGOTYPE_AUDIO_INFO").field("dwFileSize", &self.dwFileSize).field("dwPlayTime", &self.dwPlayTime).field("dwChannels", &self.dwChannels).field("dwSampleRate", &self.dwSampleRate).field("pwszLanguage", &self.pwszLanguage).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_LOGOTYPE_AUDIO_INFO { fn eq(&self, other: &Self) -> bool { self.dwFileSize == other.dwFileSize && self.dwPlayTime == other.dwPlayTime && self.dwChannels == other.dwChannels && self.dwSampleRate == other.dwSampleRate && self.pwszLanguage == other.pwszLanguage } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_LOGOTYPE_AUDIO_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_AUDIO_INFO { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_LOGOTYPE_CHOICE(pub u32); pub const CERT_LOGOTYPE_NO_IMAGE_RESOLUTION_CHOICE: CERT_LOGOTYPE_CHOICE = CERT_LOGOTYPE_CHOICE(0u32); pub const CERT_LOGOTYPE_BITS_IMAGE_RESOLUTION_CHOICE: CERT_LOGOTYPE_CHOICE = CERT_LOGOTYPE_CHOICE(1u32); pub const CERT_LOGOTYPE_TABLE_SIZE_IMAGE_RESOLUTION_CHOICE: CERT_LOGOTYPE_CHOICE = CERT_LOGOTYPE_CHOICE(2u32); impl ::core::convert::From<u32> for CERT_LOGOTYPE_CHOICE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_CHOICE { type Abi = Self; } impl ::core::ops::BitOr for CERT_LOGOTYPE_CHOICE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_LOGOTYPE_CHOICE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_LOGOTYPE_CHOICE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_LOGOTYPE_CHOICE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_LOGOTYPE_CHOICE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_LOGOTYPE_DATA { pub cLogotypeImage: u32, pub rgLogotypeImage: *mut CERT_LOGOTYPE_IMAGE, pub cLogotypeAudio: u32, pub rgLogotypeAudio: *mut CERT_LOGOTYPE_AUDIO, } #[cfg(feature = "Win32_Foundation")] impl CERT_LOGOTYPE_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_LOGOTYPE_DATA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_LOGOTYPE_DATA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_LOGOTYPE_DATA").field("cLogotypeImage", &self.cLogotypeImage).field("rgLogotypeImage", &self.rgLogotypeImage).field("cLogotypeAudio", &self.cLogotypeAudio).field("rgLogotypeAudio", &self.rgLogotypeAudio).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_LOGOTYPE_DATA { fn eq(&self, other: &Self) -> bool { self.cLogotypeImage == other.cLogotypeImage && self.rgLogotypeImage == other.rgLogotypeImage && self.cLogotypeAudio == other.cLogotypeAudio && self.rgLogotypeAudio == other.rgLogotypeAudio } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_LOGOTYPE_DATA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_DATA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_LOGOTYPE_DETAILS { pub pwszMimeType: super::super::Foundation::PWSTR, pub cHashedUrl: u32, pub rgHashedUrl: *mut CERT_HASHED_URL, } #[cfg(feature = "Win32_Foundation")] impl CERT_LOGOTYPE_DETAILS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_LOGOTYPE_DETAILS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_LOGOTYPE_DETAILS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_LOGOTYPE_DETAILS").field("pwszMimeType", &self.pwszMimeType).field("cHashedUrl", &self.cHashedUrl).field("rgHashedUrl", &self.rgHashedUrl).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_LOGOTYPE_DETAILS { fn eq(&self, other: &Self) -> bool { self.pwszMimeType == other.pwszMimeType && self.cHashedUrl == other.cHashedUrl && self.rgHashedUrl == other.rgHashedUrl } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_LOGOTYPE_DETAILS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_DETAILS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_LOGOTYPE_EXT_INFO { pub cCommunityLogo: u32, pub rgCommunityLogo: *mut CERT_LOGOTYPE_INFO, pub pIssuerLogo: *mut CERT_LOGOTYPE_INFO, pub pSubjectLogo: *mut CERT_LOGOTYPE_INFO, pub cOtherLogo: u32, pub rgOtherLogo: *mut CERT_OTHER_LOGOTYPE_INFO, } #[cfg(feature = "Win32_Foundation")] impl CERT_LOGOTYPE_EXT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_LOGOTYPE_EXT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_LOGOTYPE_EXT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_LOGOTYPE_EXT_INFO") .field("cCommunityLogo", &self.cCommunityLogo) .field("rgCommunityLogo", &self.rgCommunityLogo) .field("pIssuerLogo", &self.pIssuerLogo) .field("pSubjectLogo", &self.pSubjectLogo) .field("cOtherLogo", &self.cOtherLogo) .field("rgOtherLogo", &self.rgOtherLogo) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_LOGOTYPE_EXT_INFO { fn eq(&self, other: &Self) -> bool { self.cCommunityLogo == other.cCommunityLogo && self.rgCommunityLogo == other.rgCommunityLogo && self.pIssuerLogo == other.pIssuerLogo && self.pSubjectLogo == other.pSubjectLogo && self.cOtherLogo == other.cOtherLogo && self.rgOtherLogo == other.rgOtherLogo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_LOGOTYPE_EXT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_EXT_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_LOGOTYPE_IMAGE { pub LogotypeDetails: CERT_LOGOTYPE_DETAILS, pub pLogotypeImageInfo: *mut CERT_LOGOTYPE_IMAGE_INFO, } #[cfg(feature = "Win32_Foundation")] impl CERT_LOGOTYPE_IMAGE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_LOGOTYPE_IMAGE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_LOGOTYPE_IMAGE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_LOGOTYPE_IMAGE").field("LogotypeDetails", &self.LogotypeDetails).field("pLogotypeImageInfo", &self.pLogotypeImageInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_LOGOTYPE_IMAGE { fn eq(&self, other: &Self) -> bool { self.LogotypeDetails == other.LogotypeDetails && self.pLogotypeImageInfo == other.pLogotypeImageInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_LOGOTYPE_IMAGE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_IMAGE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_LOGOTYPE_IMAGE_INFO { pub dwLogotypeImageInfoChoice: CERT_LOGOTYPE_IMAGE_INFO_TYPE, pub dwFileSize: u32, pub dwXSize: u32, pub dwYSize: u32, pub dwLogotypeImageResolutionChoice: CERT_LOGOTYPE_CHOICE, pub Anonymous: CERT_LOGOTYPE_IMAGE_INFO_0, pub pwszLanguage: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_LOGOTYPE_IMAGE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_LOGOTYPE_IMAGE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_LOGOTYPE_IMAGE_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_LOGOTYPE_IMAGE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_IMAGE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CERT_LOGOTYPE_IMAGE_INFO_0 { pub dwNumBits: u32, pub dwTableSize: u32, } #[cfg(feature = "Win32_Foundation")] impl CERT_LOGOTYPE_IMAGE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_LOGOTYPE_IMAGE_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_LOGOTYPE_IMAGE_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_LOGOTYPE_IMAGE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_IMAGE_INFO_0 { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_LOGOTYPE_IMAGE_INFO_TYPE(pub u32); pub const CERT_LOGOTYPE_GRAY_SCALE_IMAGE_INFO_CHOICE: CERT_LOGOTYPE_IMAGE_INFO_TYPE = CERT_LOGOTYPE_IMAGE_INFO_TYPE(1u32); pub const CERT_LOGOTYPE_COLOR_IMAGE_INFO_CHOICE: CERT_LOGOTYPE_IMAGE_INFO_TYPE = CERT_LOGOTYPE_IMAGE_INFO_TYPE(2u32); impl ::core::convert::From<u32> for CERT_LOGOTYPE_IMAGE_INFO_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_IMAGE_INFO_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CERT_LOGOTYPE_IMAGE_INFO_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_LOGOTYPE_IMAGE_INFO_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_LOGOTYPE_IMAGE_INFO_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_LOGOTYPE_IMAGE_INFO_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_LOGOTYPE_IMAGE_INFO_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_LOGOTYPE_INFO { pub dwLogotypeInfoChoice: CERT_LOGOTYPE_OPTION, pub Anonymous: CERT_LOGOTYPE_INFO_0, } #[cfg(feature = "Win32_Foundation")] impl CERT_LOGOTYPE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_LOGOTYPE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_LOGOTYPE_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_LOGOTYPE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CERT_LOGOTYPE_INFO_0 { pub pLogotypeDirectInfo: *mut CERT_LOGOTYPE_DATA, pub pLogotypeIndirectInfo: *mut CERT_LOGOTYPE_REFERENCE, } #[cfg(feature = "Win32_Foundation")] impl CERT_LOGOTYPE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_LOGOTYPE_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_LOGOTYPE_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_LOGOTYPE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_INFO_0 { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_LOGOTYPE_OPTION(pub u32); pub const CERT_LOGOTYPE_DIRECT_INFO_CHOICE: CERT_LOGOTYPE_OPTION = CERT_LOGOTYPE_OPTION(1u32); pub const CERT_LOGOTYPE_INDIRECT_INFO_CHOICE: CERT_LOGOTYPE_OPTION = CERT_LOGOTYPE_OPTION(2u32); impl ::core::convert::From<u32> for CERT_LOGOTYPE_OPTION { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_OPTION { type Abi = Self; } impl ::core::ops::BitOr for CERT_LOGOTYPE_OPTION { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_LOGOTYPE_OPTION { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_LOGOTYPE_OPTION { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_LOGOTYPE_OPTION { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_LOGOTYPE_OPTION { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_LOGOTYPE_REFERENCE { pub cHashedUrl: u32, pub rgHashedUrl: *mut CERT_HASHED_URL, } #[cfg(feature = "Win32_Foundation")] impl CERT_LOGOTYPE_REFERENCE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_LOGOTYPE_REFERENCE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_LOGOTYPE_REFERENCE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_LOGOTYPE_REFERENCE").field("cHashedUrl", &self.cHashedUrl).field("rgHashedUrl", &self.rgHashedUrl).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_LOGOTYPE_REFERENCE { fn eq(&self, other: &Self) -> bool { self.cHashedUrl == other.cHashedUrl && self.rgHashedUrl == other.rgHashedUrl } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_LOGOTYPE_REFERENCE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_LOGOTYPE_REFERENCE { type Abi = Self; } pub const CERT_MD5_HASH_PROP_ID: u32 = 4u32; pub const CERT_NAME_ATTR_TYPE: u32 = 3u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_NAME_CONSTRAINTS_INFO { pub cPermittedSubtree: u32, pub rgPermittedSubtree: *mut CERT_GENERAL_SUBTREE, pub cExcludedSubtree: u32, pub rgExcludedSubtree: *mut CERT_GENERAL_SUBTREE, } #[cfg(feature = "Win32_Foundation")] impl CERT_NAME_CONSTRAINTS_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_NAME_CONSTRAINTS_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_NAME_CONSTRAINTS_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_NAME_CONSTRAINTS_INFO").field("cPermittedSubtree", &self.cPermittedSubtree).field("rgPermittedSubtree", &self.rgPermittedSubtree).field("cExcludedSubtree", &self.cExcludedSubtree).field("rgExcludedSubtree", &self.rgExcludedSubtree).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_NAME_CONSTRAINTS_INFO { fn eq(&self, other: &Self) -> bool { self.cPermittedSubtree == other.cPermittedSubtree && self.rgPermittedSubtree == other.rgPermittedSubtree && self.cExcludedSubtree == other.cExcludedSubtree && self.rgExcludedSubtree == other.rgExcludedSubtree } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_NAME_CONSTRAINTS_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_NAME_CONSTRAINTS_INFO { type Abi = Self; } pub const CERT_NAME_DISABLE_IE4_UTF8_FLAG: u32 = 65536u32; pub const CERT_NAME_DNS_TYPE: u32 = 6u32; pub const CERT_NAME_EMAIL_TYPE: u32 = 1u32; pub const CERT_NAME_FRIENDLY_DISPLAY_TYPE: u32 = 5u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_NAME_INFO { pub cRDN: u32, pub rgRDN: *mut CERT_RDN, } #[cfg(feature = "Win32_Foundation")] impl CERT_NAME_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_NAME_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_NAME_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_NAME_INFO").field("cRDN", &self.cRDN).field("rgRDN", &self.rgRDN).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_NAME_INFO { fn eq(&self, other: &Self) -> bool { self.cRDN == other.cRDN && self.rgRDN == other.rgRDN } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_NAME_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_NAME_INFO { type Abi = Self; } pub const CERT_NAME_ISSUER_FLAG: u32 = 1u32; pub const CERT_NAME_RDN_TYPE: u32 = 2u32; pub const CERT_NAME_SEARCH_ALL_NAMES_FLAG: u32 = 2u32; pub const CERT_NAME_SIMPLE_DISPLAY_TYPE: u32 = 4u32; pub const CERT_NAME_STR_COMMA_FLAG: u32 = 67108864u32; pub const CERT_NAME_STR_CRLF_FLAG: u32 = 134217728u32; pub const CERT_NAME_STR_DISABLE_IE4_UTF8_FLAG: u32 = 65536u32; pub const CERT_NAME_STR_DISABLE_UTF8_DIR_STR_FLAG: u32 = 1048576u32; pub const CERT_NAME_STR_ENABLE_PUNYCODE_FLAG: u32 = 2097152u32; pub const CERT_NAME_STR_ENABLE_T61_UNICODE_FLAG: u32 = 131072u32; pub const CERT_NAME_STR_ENABLE_UTF8_UNICODE_FLAG: u32 = 262144u32; pub const CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG: u32 = 524288u32; pub const CERT_NAME_STR_FORWARD_FLAG: u32 = 16777216u32; pub const CERT_NAME_STR_NO_PLUS_FLAG: u32 = 536870912u32; pub const CERT_NAME_STR_NO_QUOTING_FLAG: u32 = 268435456u32; pub const CERT_NAME_STR_REVERSE_FLAG: u32 = 33554432u32; pub const CERT_NAME_STR_SEMICOLON_FLAG: u32 = 1073741824u32; pub const CERT_NAME_UPN_TYPE: u32 = 8u32; pub const CERT_NAME_URL_TYPE: u32 = 7u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_NAME_VALUE { pub dwValueType: u32, pub Value: CRYPTOAPI_BLOB, } impl CERT_NAME_VALUE {} impl ::core::default::Default for CERT_NAME_VALUE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_NAME_VALUE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_NAME_VALUE").field("dwValueType", &self.dwValueType).field("Value", &self.Value).finish() } } impl ::core::cmp::PartialEq for CERT_NAME_VALUE { fn eq(&self, other: &Self) -> bool { self.dwValueType == other.dwValueType && self.Value == other.Value } } impl ::core::cmp::Eq for CERT_NAME_VALUE {} unsafe impl ::windows::core::Abi for CERT_NAME_VALUE { type Abi = Self; } pub const CERT_NCRYPT_KEY_HANDLE_PROP_ID: u32 = 78u32; pub const CERT_NCRYPT_KEY_HANDLE_TRANSFER_PROP_ID: u32 = 99u32; pub const CERT_NEW_KEY_PROP_ID: u32 = 74u32; pub const CERT_NEXT_UPDATE_LOCATION_PROP_ID: u32 = 10u32; pub const CERT_NONCOMPLIANT_ROOT_URL_PROP_ID: u32 = 123u32; pub const CERT_NON_REPUDIATION_KEY_USAGE: u32 = 64u32; pub const CERT_NOT_BEFORE_ENHKEY_USAGE_PROP_ID: u32 = 127u32; pub const CERT_NOT_BEFORE_FILETIME_PROP_ID: u32 = 126u32; pub const CERT_NO_AUTO_EXPIRE_CHECK_PROP_ID: u32 = 77u32; pub const CERT_NO_EXPIRE_NOTIFICATION_PROP_ID: u32 = 97u32; pub const CERT_OCSP_CACHE_PREFIX_PROP_ID: u32 = 75u32; pub const CERT_OCSP_MUST_STAPLE_PROP_ID: u32 = 121u32; pub const CERT_OCSP_RESPONSE_PROP_ID: u32 = 70u32; pub const CERT_OFFLINE_CRL_SIGN_KEY_USAGE: u32 = 2u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_OPEN_STORE_FLAGS(pub u32); pub const CERT_STORE_BACKUP_RESTORE_FLAG: CERT_OPEN_STORE_FLAGS = CERT_OPEN_STORE_FLAGS(2048u32); pub const CERT_STORE_CREATE_NEW_FLAG: CERT_OPEN_STORE_FLAGS = CERT_OPEN_STORE_FLAGS(8192u32); pub const CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG: CERT_OPEN_STORE_FLAGS = CERT_OPEN_STORE_FLAGS(4u32); pub const CERT_STORE_DELETE_FLAG: CERT_OPEN_STORE_FLAGS = CERT_OPEN_STORE_FLAGS(16u32); pub const CERT_STORE_ENUM_ARCHIVED_FLAG: CERT_OPEN_STORE_FLAGS = CERT_OPEN_STORE_FLAGS(512u32); pub const CERT_STORE_MAXIMUM_ALLOWED_FLAG: CERT_OPEN_STORE_FLAGS = CERT_OPEN_STORE_FLAGS(4096u32); pub const CERT_STORE_NO_CRYPT_RELEASE_FLAG: CERT_OPEN_STORE_FLAGS = CERT_OPEN_STORE_FLAGS(1u32); pub const CERT_STORE_OPEN_EXISTING_FLAG: CERT_OPEN_STORE_FLAGS = CERT_OPEN_STORE_FLAGS(16384u32); pub const CERT_STORE_READONLY_FLAG: CERT_OPEN_STORE_FLAGS = CERT_OPEN_STORE_FLAGS(32768u32); pub const CERT_STORE_SET_LOCALIZED_NAME_FLAG: CERT_OPEN_STORE_FLAGS = CERT_OPEN_STORE_FLAGS(2u32); pub const CERT_STORE_SHARE_CONTEXT_FLAG: CERT_OPEN_STORE_FLAGS = CERT_OPEN_STORE_FLAGS(128u32); pub const CERT_STORE_UPDATE_KEYID_FLAG: CERT_OPEN_STORE_FLAGS = CERT_OPEN_STORE_FLAGS(1024u32); impl ::core::convert::From<u32> for CERT_OPEN_STORE_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_OPEN_STORE_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CERT_OPEN_STORE_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_OPEN_STORE_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_OPEN_STORE_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_OPEN_STORE_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_OPEN_STORE_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_OR_CRL_BLOB { pub dwChoice: u32, pub cbEncoded: u32, pub pbEncoded: *mut u8, } impl CERT_OR_CRL_BLOB {} impl ::core::default::Default for CERT_OR_CRL_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_OR_CRL_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_OR_CRL_BLOB").field("dwChoice", &self.dwChoice).field("cbEncoded", &self.cbEncoded).field("pbEncoded", &self.pbEncoded).finish() } } impl ::core::cmp::PartialEq for CERT_OR_CRL_BLOB { fn eq(&self, other: &Self) -> bool { self.dwChoice == other.dwChoice && self.cbEncoded == other.cbEncoded && self.pbEncoded == other.pbEncoded } } impl ::core::cmp::Eq for CERT_OR_CRL_BLOB {} unsafe impl ::windows::core::Abi for CERT_OR_CRL_BLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_OR_CRL_BUNDLE { pub cItem: u32, pub rgItem: *mut CERT_OR_CRL_BLOB, } impl CERT_OR_CRL_BUNDLE {} impl ::core::default::Default for CERT_OR_CRL_BUNDLE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_OR_CRL_BUNDLE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_OR_CRL_BUNDLE").field("cItem", &self.cItem).field("rgItem", &self.rgItem).finish() } } impl ::core::cmp::PartialEq for CERT_OR_CRL_BUNDLE { fn eq(&self, other: &Self) -> bool { self.cItem == other.cItem && self.rgItem == other.rgItem } } impl ::core::cmp::Eq for CERT_OR_CRL_BUNDLE {} unsafe impl ::windows::core::Abi for CERT_OR_CRL_BUNDLE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_OTHER_LOGOTYPE_INFO { pub pszObjId: super::super::Foundation::PSTR, pub LogotypeInfo: CERT_LOGOTYPE_INFO, } #[cfg(feature = "Win32_Foundation")] impl CERT_OTHER_LOGOTYPE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_OTHER_LOGOTYPE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_OTHER_LOGOTYPE_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_OTHER_LOGOTYPE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_OTHER_LOGOTYPE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_OTHER_NAME { pub pszObjId: super::super::Foundation::PSTR, pub Value: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CERT_OTHER_NAME {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_OTHER_NAME { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_OTHER_NAME { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_OTHER_NAME").field("pszObjId", &self.pszObjId).field("Value", &self.Value).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_OTHER_NAME { fn eq(&self, other: &Self) -> bool { self.pszObjId == other.pszObjId && self.Value == other.Value } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_OTHER_NAME {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_OTHER_NAME { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_PAIR { pub Forward: CRYPTOAPI_BLOB, pub Reverse: CRYPTOAPI_BLOB, } impl CERT_PAIR {} impl ::core::default::Default for CERT_PAIR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_PAIR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_PAIR").field("Forward", &self.Forward).field("Reverse", &self.Reverse).finish() } } impl ::core::cmp::PartialEq for CERT_PAIR { fn eq(&self, other: &Self) -> bool { self.Forward == other.Forward && self.Reverse == other.Reverse } } impl ::core::cmp::Eq for CERT_PAIR {} unsafe impl ::windows::core::Abi for CERT_PAIR { type Abi = Self; } pub const CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_PHYSICAL_STORE_INFO { pub cbSize: u32, pub pszOpenStoreProvider: super::super::Foundation::PSTR, pub dwOpenEncodingType: u32, pub dwOpenFlags: u32, pub OpenParameters: CRYPTOAPI_BLOB, pub dwFlags: u32, pub dwPriority: u32, } #[cfg(feature = "Win32_Foundation")] impl CERT_PHYSICAL_STORE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_PHYSICAL_STORE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_PHYSICAL_STORE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_PHYSICAL_STORE_INFO") .field("cbSize", &self.cbSize) .field("pszOpenStoreProvider", &self.pszOpenStoreProvider) .field("dwOpenEncodingType", &self.dwOpenEncodingType) .field("dwOpenFlags", &self.dwOpenFlags) .field("OpenParameters", &self.OpenParameters) .field("dwFlags", &self.dwFlags) .field("dwPriority", &self.dwPriority) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_PHYSICAL_STORE_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pszOpenStoreProvider == other.pszOpenStoreProvider && self.dwOpenEncodingType == other.dwOpenEncodingType && self.dwOpenFlags == other.dwOpenFlags && self.OpenParameters == other.OpenParameters && self.dwFlags == other.dwFlags && self.dwPriority == other.dwPriority } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_PHYSICAL_STORE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_PHYSICAL_STORE_INFO { type Abi = Self; } pub const CERT_PHYSICAL_STORE_INSERT_COMPUTER_NAME_ENABLE_FLAG: u32 = 8u32; pub const CERT_PHYSICAL_STORE_OPEN_DISABLE_FLAG: u32 = 2u32; pub const CERT_PHYSICAL_STORE_PREDEFINED_ENUM_FLAG: u32 = 1u32; pub const CERT_PHYSICAL_STORE_REMOTE_OPEN_DISABLE_FLAG: u32 = 4u32; pub const CERT_PIN_SHA256_HASH_PROP_ID: u32 = 124u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_POLICIES_INFO { pub cPolicyInfo: u32, pub rgPolicyInfo: *mut CERT_POLICY_INFO, } #[cfg(feature = "Win32_Foundation")] impl CERT_POLICIES_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_POLICIES_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_POLICIES_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_POLICIES_INFO").field("cPolicyInfo", &self.cPolicyInfo).field("rgPolicyInfo", &self.rgPolicyInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_POLICIES_INFO { fn eq(&self, other: &Self) -> bool { self.cPolicyInfo == other.cPolicyInfo && self.rgPolicyInfo == other.rgPolicyInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_POLICIES_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_POLICIES_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_POLICY95_QUALIFIER1 { pub pszPracticesReference: super::super::Foundation::PWSTR, pub pszNoticeIdentifier: super::super::Foundation::PSTR, pub pszNSINoticeIdentifier: super::super::Foundation::PSTR, pub cCPSURLs: u32, pub rgCPSURLs: *mut CPS_URLS, } #[cfg(feature = "Win32_Foundation")] impl CERT_POLICY95_QUALIFIER1 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_POLICY95_QUALIFIER1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_POLICY95_QUALIFIER1 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_POLICY95_QUALIFIER1") .field("pszPracticesReference", &self.pszPracticesReference) .field("pszNoticeIdentifier", &self.pszNoticeIdentifier) .field("pszNSINoticeIdentifier", &self.pszNSINoticeIdentifier) .field("cCPSURLs", &self.cCPSURLs) .field("rgCPSURLs", &self.rgCPSURLs) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_POLICY95_QUALIFIER1 { fn eq(&self, other: &Self) -> bool { self.pszPracticesReference == other.pszPracticesReference && self.pszNoticeIdentifier == other.pszNoticeIdentifier && self.pszNSINoticeIdentifier == other.pszNSINoticeIdentifier && self.cCPSURLs == other.cCPSURLs && self.rgCPSURLs == other.rgCPSURLs } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_POLICY95_QUALIFIER1 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_POLICY95_QUALIFIER1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_POLICY_CONSTRAINTS_INFO { pub fRequireExplicitPolicy: super::super::Foundation::BOOL, pub dwRequireExplicitPolicySkipCerts: u32, pub fInhibitPolicyMapping: super::super::Foundation::BOOL, pub dwInhibitPolicyMappingSkipCerts: u32, } #[cfg(feature = "Win32_Foundation")] impl CERT_POLICY_CONSTRAINTS_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_POLICY_CONSTRAINTS_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_POLICY_CONSTRAINTS_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_POLICY_CONSTRAINTS_INFO") .field("fRequireExplicitPolicy", &self.fRequireExplicitPolicy) .field("dwRequireExplicitPolicySkipCerts", &self.dwRequireExplicitPolicySkipCerts) .field("fInhibitPolicyMapping", &self.fInhibitPolicyMapping) .field("dwInhibitPolicyMappingSkipCerts", &self.dwInhibitPolicyMappingSkipCerts) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_POLICY_CONSTRAINTS_INFO { fn eq(&self, other: &Self) -> bool { self.fRequireExplicitPolicy == other.fRequireExplicitPolicy && self.dwRequireExplicitPolicySkipCerts == other.dwRequireExplicitPolicySkipCerts && self.fInhibitPolicyMapping == other.fInhibitPolicyMapping && self.dwInhibitPolicyMappingSkipCerts == other.dwInhibitPolicyMappingSkipCerts } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_POLICY_CONSTRAINTS_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_POLICY_CONSTRAINTS_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_POLICY_ID { pub cCertPolicyElementId: u32, pub rgpszCertPolicyElementId: *mut super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_POLICY_ID {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_POLICY_ID { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_POLICY_ID { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_POLICY_ID").field("cCertPolicyElementId", &self.cCertPolicyElementId).field("rgpszCertPolicyElementId", &self.rgpszCertPolicyElementId).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_POLICY_ID { fn eq(&self, other: &Self) -> bool { self.cCertPolicyElementId == other.cCertPolicyElementId && self.rgpszCertPolicyElementId == other.rgpszCertPolicyElementId } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_POLICY_ID {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_POLICY_ID { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_POLICY_INFO { pub pszPolicyIdentifier: super::super::Foundation::PSTR, pub cPolicyQualifier: u32, pub rgPolicyQualifier: *mut CERT_POLICY_QUALIFIER_INFO, } #[cfg(feature = "Win32_Foundation")] impl CERT_POLICY_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_POLICY_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_POLICY_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_POLICY_INFO").field("pszPolicyIdentifier", &self.pszPolicyIdentifier).field("cPolicyQualifier", &self.cPolicyQualifier).field("rgPolicyQualifier", &self.rgPolicyQualifier).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_POLICY_INFO { fn eq(&self, other: &Self) -> bool { self.pszPolicyIdentifier == other.pszPolicyIdentifier && self.cPolicyQualifier == other.cPolicyQualifier && self.rgPolicyQualifier == other.rgPolicyQualifier } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_POLICY_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_POLICY_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_POLICY_MAPPING { pub pszIssuerDomainPolicy: super::super::Foundation::PSTR, pub pszSubjectDomainPolicy: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_POLICY_MAPPING {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_POLICY_MAPPING { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_POLICY_MAPPING { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_POLICY_MAPPING").field("pszIssuerDomainPolicy", &self.pszIssuerDomainPolicy).field("pszSubjectDomainPolicy", &self.pszSubjectDomainPolicy).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_POLICY_MAPPING { fn eq(&self, other: &Self) -> bool { self.pszIssuerDomainPolicy == other.pszIssuerDomainPolicy && self.pszSubjectDomainPolicy == other.pszSubjectDomainPolicy } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_POLICY_MAPPING {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_POLICY_MAPPING { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_POLICY_MAPPINGS_INFO { pub cPolicyMapping: u32, pub rgPolicyMapping: *mut CERT_POLICY_MAPPING, } #[cfg(feature = "Win32_Foundation")] impl CERT_POLICY_MAPPINGS_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_POLICY_MAPPINGS_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_POLICY_MAPPINGS_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_POLICY_MAPPINGS_INFO").field("cPolicyMapping", &self.cPolicyMapping).field("rgPolicyMapping", &self.rgPolicyMapping).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_POLICY_MAPPINGS_INFO { fn eq(&self, other: &Self) -> bool { self.cPolicyMapping == other.cPolicyMapping && self.rgPolicyMapping == other.rgPolicyMapping } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_POLICY_MAPPINGS_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_POLICY_MAPPINGS_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_POLICY_QUALIFIER_INFO { pub pszPolicyQualifierId: super::super::Foundation::PSTR, pub Qualifier: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CERT_POLICY_QUALIFIER_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_POLICY_QUALIFIER_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_POLICY_QUALIFIER_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_POLICY_QUALIFIER_INFO").field("pszPolicyQualifierId", &self.pszPolicyQualifierId).field("Qualifier", &self.Qualifier).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_POLICY_QUALIFIER_INFO { fn eq(&self, other: &Self) -> bool { self.pszPolicyQualifierId == other.pszPolicyQualifierId && self.Qualifier == other.Qualifier } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_POLICY_QUALIFIER_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_POLICY_QUALIFIER_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_POLICY_QUALIFIER_NOTICE_REFERENCE { pub pszOrganization: super::super::Foundation::PSTR, pub cNoticeNumbers: u32, pub rgNoticeNumbers: *mut i32, } #[cfg(feature = "Win32_Foundation")] impl CERT_POLICY_QUALIFIER_NOTICE_REFERENCE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_POLICY_QUALIFIER_NOTICE_REFERENCE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_POLICY_QUALIFIER_NOTICE_REFERENCE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_POLICY_QUALIFIER_NOTICE_REFERENCE").field("pszOrganization", &self.pszOrganization).field("cNoticeNumbers", &self.cNoticeNumbers).field("rgNoticeNumbers", &self.rgNoticeNumbers).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_POLICY_QUALIFIER_NOTICE_REFERENCE { fn eq(&self, other: &Self) -> bool { self.pszOrganization == other.pszOrganization && self.cNoticeNumbers == other.cNoticeNumbers && self.rgNoticeNumbers == other.rgNoticeNumbers } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_POLICY_QUALIFIER_NOTICE_REFERENCE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_POLICY_QUALIFIER_NOTICE_REFERENCE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_POLICY_QUALIFIER_USER_NOTICE { pub pNoticeReference: *mut CERT_POLICY_QUALIFIER_NOTICE_REFERENCE, pub pszDisplayText: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_POLICY_QUALIFIER_USER_NOTICE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_POLICY_QUALIFIER_USER_NOTICE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_POLICY_QUALIFIER_USER_NOTICE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_POLICY_QUALIFIER_USER_NOTICE").field("pNoticeReference", &self.pNoticeReference).field("pszDisplayText", &self.pszDisplayText).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_POLICY_QUALIFIER_USER_NOTICE { fn eq(&self, other: &Self) -> bool { self.pNoticeReference == other.pNoticeReference && self.pszDisplayText == other.pszDisplayText } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_POLICY_QUALIFIER_USER_NOTICE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_POLICY_QUALIFIER_USER_NOTICE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_PRIVATE_KEY_VALIDITY { pub NotBefore: super::super::Foundation::FILETIME, pub NotAfter: super::super::Foundation::FILETIME, } #[cfg(feature = "Win32_Foundation")] impl CERT_PRIVATE_KEY_VALIDITY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_PRIVATE_KEY_VALIDITY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_PRIVATE_KEY_VALIDITY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_PRIVATE_KEY_VALIDITY").field("NotBefore", &self.NotBefore).field("NotAfter", &self.NotAfter).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_PRIVATE_KEY_VALIDITY { fn eq(&self, other: &Self) -> bool { self.NotBefore == other.NotBefore && self.NotAfter == other.NotAfter } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_PRIVATE_KEY_VALIDITY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_PRIVATE_KEY_VALIDITY { type Abi = Self; } pub const CERT_PROT_ROOT_DISABLE_CURRENT_USER_FLAG: u32 = 1u32; pub const CERT_PROT_ROOT_DISABLE_LM_AUTH_FLAG: u32 = 8u32; pub const CERT_PROT_ROOT_DISABLE_NOT_DEFINED_NAME_CONSTRAINT_FLAG: u32 = 32u32; pub const CERT_PROT_ROOT_DISABLE_NT_AUTH_REQUIRED_FLAG: u32 = 16u32; pub const CERT_PROT_ROOT_DISABLE_PEER_TRUST: u32 = 65536u32; pub const CERT_PROT_ROOT_INHIBIT_ADD_AT_INIT_FLAG: u32 = 2u32; pub const CERT_PROT_ROOT_INHIBIT_PURGE_LM_FLAG: u32 = 4u32; pub const CERT_PROT_ROOT_ONLY_LM_GPT_FLAG: u32 = 8u32; pub const CERT_PUBKEY_ALG_PARA_PROP_ID: u32 = 22u32; pub const CERT_PUBKEY_HASH_RESERVED_PROP_ID: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_PUBLIC_KEY_INFO { pub Algorithm: CRYPT_ALGORITHM_IDENTIFIER, pub PublicKey: CRYPT_BIT_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CERT_PUBLIC_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_PUBLIC_KEY_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_PUBLIC_KEY_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_PUBLIC_KEY_INFO").field("Algorithm", &self.Algorithm).field("PublicKey", &self.PublicKey).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_PUBLIC_KEY_INFO { fn eq(&self, other: &Self) -> bool { self.Algorithm == other.Algorithm && self.PublicKey == other.PublicKey } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_PUBLIC_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_PUBLIC_KEY_INFO { type Abi = Self; } pub const CERT_PUB_KEY_CNG_ALG_BIT_LENGTH_PROP_ID: u32 = 93u32; pub const CERT_PVK_FILE_PROP_ID: u32 = 12u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_QC_STATEMENT { pub pszStatementId: super::super::Foundation::PSTR, pub StatementInfo: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CERT_QC_STATEMENT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_QC_STATEMENT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_QC_STATEMENT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_QC_STATEMENT").field("pszStatementId", &self.pszStatementId).field("StatementInfo", &self.StatementInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_QC_STATEMENT { fn eq(&self, other: &Self) -> bool { self.pszStatementId == other.pszStatementId && self.StatementInfo == other.StatementInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_QC_STATEMENT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_QC_STATEMENT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_QC_STATEMENTS_EXT_INFO { pub cStatement: u32, pub rgStatement: *mut CERT_QC_STATEMENT, } #[cfg(feature = "Win32_Foundation")] impl CERT_QC_STATEMENTS_EXT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_QC_STATEMENTS_EXT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_QC_STATEMENTS_EXT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_QC_STATEMENTS_EXT_INFO").field("cStatement", &self.cStatement).field("rgStatement", &self.rgStatement).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_QC_STATEMENTS_EXT_INFO { fn eq(&self, other: &Self) -> bool { self.cStatement == other.cStatement && self.rgStatement == other.rgStatement } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_QC_STATEMENTS_EXT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_QC_STATEMENTS_EXT_INFO { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_QUERY_CONTENT_TYPE(pub u32); pub const CERT_QUERY_CONTENT_CERT: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(1u32); pub const CERT_QUERY_CONTENT_CTL: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(2u32); pub const CERT_QUERY_CONTENT_CRL: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(3u32); pub const CERT_QUERY_CONTENT_SERIALIZED_STORE: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(4u32); pub const CERT_QUERY_CONTENT_SERIALIZED_CERT: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(5u32); pub const CERT_QUERY_CONTENT_SERIALIZED_CTL: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(6u32); pub const CERT_QUERY_CONTENT_SERIALIZED_CRL: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(7u32); pub const CERT_QUERY_CONTENT_PKCS7_SIGNED: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(8u32); pub const CERT_QUERY_CONTENT_PKCS7_UNSIGNED: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(9u32); pub const CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(10u32); pub const CERT_QUERY_CONTENT_PKCS10: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(11u32); pub const CERT_QUERY_CONTENT_PFX: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(12u32); pub const CERT_QUERY_CONTENT_CERT_PAIR: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(13u32); pub const CERT_QUERY_CONTENT_PFX_AND_LOAD: CERT_QUERY_CONTENT_TYPE = CERT_QUERY_CONTENT_TYPE(14u32); impl ::core::convert::From<u32> for CERT_QUERY_CONTENT_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_QUERY_CONTENT_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CERT_QUERY_CONTENT_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_QUERY_CONTENT_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_QUERY_CONTENT_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_QUERY_CONTENT_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_QUERY_CONTENT_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_QUERY_CONTENT_TYPE_FLAGS(pub u32); pub const CERT_QUERY_CONTENT_FLAG_CERT: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(2u32); pub const CERT_QUERY_CONTENT_FLAG_CTL: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(4u32); pub const CERT_QUERY_CONTENT_FLAG_CRL: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(8u32); pub const CERT_QUERY_CONTENT_FLAG_SERIALIZED_STORE: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(16u32); pub const CERT_QUERY_CONTENT_FLAG_SERIALIZED_CERT: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(32u32); pub const CERT_QUERY_CONTENT_FLAG_SERIALIZED_CTL: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(64u32); pub const CERT_QUERY_CONTENT_FLAG_SERIALIZED_CRL: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(128u32); pub const CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(256u32); pub const CERT_QUERY_CONTENT_FLAG_PKCS7_UNSIGNED: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(512u32); pub const CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(1024u32); pub const CERT_QUERY_CONTENT_FLAG_PKCS10: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(2048u32); pub const CERT_QUERY_CONTENT_FLAG_PFX: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(4096u32); pub const CERT_QUERY_CONTENT_FLAG_CERT_PAIR: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(8192u32); pub const CERT_QUERY_CONTENT_FLAG_PFX_AND_LOAD: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(16384u32); pub const CERT_QUERY_CONTENT_FLAG_ALL: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(16382u32); pub const CERT_QUERY_CONTENT_FLAG_ALL_ISSUER_CERT: CERT_QUERY_CONTENT_TYPE_FLAGS = CERT_QUERY_CONTENT_TYPE_FLAGS(818u32); impl ::core::convert::From<u32> for CERT_QUERY_CONTENT_TYPE_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_QUERY_CONTENT_TYPE_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CERT_QUERY_CONTENT_TYPE_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_QUERY_CONTENT_TYPE_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_QUERY_CONTENT_TYPE_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_QUERY_CONTENT_TYPE_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_QUERY_CONTENT_TYPE_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_QUERY_ENCODING_TYPE(pub u32); pub const X509_ASN_ENCODING: CERT_QUERY_ENCODING_TYPE = CERT_QUERY_ENCODING_TYPE(1u32); pub const PKCS_7_ASN_ENCODING: CERT_QUERY_ENCODING_TYPE = CERT_QUERY_ENCODING_TYPE(65536u32); impl ::core::convert::From<u32> for CERT_QUERY_ENCODING_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_QUERY_ENCODING_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CERT_QUERY_ENCODING_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_QUERY_ENCODING_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_QUERY_ENCODING_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_QUERY_ENCODING_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_QUERY_ENCODING_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_QUERY_FORMAT_TYPE(pub u32); pub const CERT_QUERY_FORMAT_BINARY: CERT_QUERY_FORMAT_TYPE = CERT_QUERY_FORMAT_TYPE(1u32); pub const CERT_QUERY_FORMAT_BASE64_ENCODED: CERT_QUERY_FORMAT_TYPE = CERT_QUERY_FORMAT_TYPE(2u32); pub const CERT_QUERY_FORMAT_ASN_ASCII_HEX_ENCODED: CERT_QUERY_FORMAT_TYPE = CERT_QUERY_FORMAT_TYPE(3u32); impl ::core::convert::From<u32> for CERT_QUERY_FORMAT_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_QUERY_FORMAT_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CERT_QUERY_FORMAT_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_QUERY_FORMAT_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_QUERY_FORMAT_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_QUERY_FORMAT_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_QUERY_FORMAT_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_QUERY_FORMAT_TYPE_FLAGS(pub u32); pub const CERT_QUERY_FORMAT_FLAG_BINARY: CERT_QUERY_FORMAT_TYPE_FLAGS = CERT_QUERY_FORMAT_TYPE_FLAGS(2u32); pub const CERT_QUERY_FORMAT_FLAG_BASE64_ENCODED: CERT_QUERY_FORMAT_TYPE_FLAGS = CERT_QUERY_FORMAT_TYPE_FLAGS(4u32); pub const CERT_QUERY_FORMAT_FLAG_ASN_ASCII_HEX_ENCODED: CERT_QUERY_FORMAT_TYPE_FLAGS = CERT_QUERY_FORMAT_TYPE_FLAGS(8u32); pub const CERT_QUERY_FORMAT_FLAG_ALL: CERT_QUERY_FORMAT_TYPE_FLAGS = CERT_QUERY_FORMAT_TYPE_FLAGS(14u32); impl ::core::convert::From<u32> for CERT_QUERY_FORMAT_TYPE_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_QUERY_FORMAT_TYPE_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CERT_QUERY_FORMAT_TYPE_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_QUERY_FORMAT_TYPE_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_QUERY_FORMAT_TYPE_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_QUERY_FORMAT_TYPE_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_QUERY_FORMAT_TYPE_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_QUERY_OBJECT_TYPE(pub u32); pub const CERT_QUERY_OBJECT_FILE: CERT_QUERY_OBJECT_TYPE = CERT_QUERY_OBJECT_TYPE(1u32); pub const CERT_QUERY_OBJECT_BLOB: CERT_QUERY_OBJECT_TYPE = CERT_QUERY_OBJECT_TYPE(2u32); impl ::core::convert::From<u32> for CERT_QUERY_OBJECT_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_QUERY_OBJECT_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CERT_QUERY_OBJECT_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_QUERY_OBJECT_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_QUERY_OBJECT_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_QUERY_OBJECT_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_QUERY_OBJECT_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_RDN { pub cRDNAttr: u32, pub rgRDNAttr: *mut CERT_RDN_ATTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_RDN {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_RDN { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_RDN { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_RDN").field("cRDNAttr", &self.cRDNAttr).field("rgRDNAttr", &self.rgRDNAttr).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_RDN { fn eq(&self, other: &Self) -> bool { self.cRDNAttr == other.cRDNAttr && self.rgRDNAttr == other.rgRDNAttr } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_RDN {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_RDN { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_RDN_ATTR { pub pszObjId: super::super::Foundation::PSTR, pub dwValueType: CERT_RDN_ATTR_VALUE_TYPE, pub Value: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CERT_RDN_ATTR {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_RDN_ATTR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_RDN_ATTR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_RDN_ATTR").field("pszObjId", &self.pszObjId).field("dwValueType", &self.dwValueType).field("Value", &self.Value).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_RDN_ATTR { fn eq(&self, other: &Self) -> bool { self.pszObjId == other.pszObjId && self.dwValueType == other.dwValueType && self.Value == other.Value } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_RDN_ATTR {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_RDN_ATTR { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_RDN_ATTR_VALUE_TYPE(pub u32); pub const CERT_RDN_ANY_TYPE: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(0u32); pub const CERT_RDN_NUMERIC_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(3u32); pub const CERT_RDN_PRINTABLE_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(4u32); pub const CERT_RDN_T61_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(5u32); pub const CERT_RDN_VIDEOTEX_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(6u32); pub const CERT_RDN_IA5_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(7u32); pub const CERT_RDN_GRAPHIC_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(8u32); pub const CERT_RDN_ISO646_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(9u32); pub const CERT_RDN_GENERAL_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(10u32); pub const CERT_RDN_INT4_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(11u32); pub const CERT_RDN_UNICODE_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(12u32); pub const CERT_RDN_BMP_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(12u32); pub const CERT_RDN_ENCODED_BLOB: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(1u32); pub const CERT_RDN_OCTET_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(2u32); pub const CERT_RDN_TELETEX_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(5u32); pub const CERT_RDN_UNIVERSAL_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(11u32); pub const CERT_RDN_UTF8_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(13u32); pub const CERT_RDN_VISIBLE_STRING: CERT_RDN_ATTR_VALUE_TYPE = CERT_RDN_ATTR_VALUE_TYPE(9u32); impl ::core::convert::From<u32> for CERT_RDN_ATTR_VALUE_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_RDN_ATTR_VALUE_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CERT_RDN_ATTR_VALUE_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_RDN_ATTR_VALUE_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_RDN_ATTR_VALUE_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_RDN_ATTR_VALUE_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_RDN_ATTR_VALUE_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_RDN_DISABLE_CHECK_TYPE_FLAG: u32 = 1073741824u32; pub const CERT_RDN_DISABLE_IE4_UTF8_FLAG: u32 = 16777216u32; pub const CERT_RDN_ENABLE_PUNYCODE_FLAG: u32 = 33554432u32; pub const CERT_RDN_ENABLE_T61_UNICODE_FLAG: u32 = 2147483648u32; pub const CERT_RDN_ENABLE_UTF8_UNICODE_FLAG: u32 = 536870912u32; pub const CERT_RDN_FLAGS_MASK: u32 = 4278190080u32; pub const CERT_RDN_FORCE_UTF8_UNICODE_FLAG: u32 = 268435456u32; pub const CERT_RDN_TYPE_MASK: u32 = 255u32; pub const CERT_REGISTRY_STORE_CLIENT_GPT_FLAG: u32 = 2147483648u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] pub struct CERT_REGISTRY_STORE_CLIENT_GPT_PARA { pub hKeyBase: super::super::System::Registry::HKEY, pub pwszRegPath: super::super::Foundation::PWSTR, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl CERT_REGISTRY_STORE_CLIENT_GPT_PARA {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::default::Default for CERT_REGISTRY_STORE_CLIENT_GPT_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::fmt::Debug for CERT_REGISTRY_STORE_CLIENT_GPT_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_REGISTRY_STORE_CLIENT_GPT_PARA").field("hKeyBase", &self.hKeyBase).field("pwszRegPath", &self.pwszRegPath).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::cmp::PartialEq for CERT_REGISTRY_STORE_CLIENT_GPT_PARA { fn eq(&self, other: &Self) -> bool { self.hKeyBase == other.hKeyBase && self.pwszRegPath == other.pwszRegPath } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::cmp::Eq for CERT_REGISTRY_STORE_CLIENT_GPT_PARA {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] unsafe impl ::windows::core::Abi for CERT_REGISTRY_STORE_CLIENT_GPT_PARA { type Abi = Self; } pub const CERT_REGISTRY_STORE_EXTERNAL_FLAG: u32 = 1048576u32; pub const CERT_REGISTRY_STORE_LM_GPT_FLAG: u32 = 16777216u32; pub const CERT_REGISTRY_STORE_MY_IE_DIRTY_FLAG: u32 = 524288u32; pub const CERT_REGISTRY_STORE_REMOTE_FLAG: u32 = 65536u32; pub const CERT_REGISTRY_STORE_ROAMING_FLAG: u32 = 262144u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] pub struct CERT_REGISTRY_STORE_ROAMING_PARA { pub hKey: super::super::System::Registry::HKEY, pub pwszStoreDirectory: super::super::Foundation::PWSTR, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl CERT_REGISTRY_STORE_ROAMING_PARA {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::default::Default for CERT_REGISTRY_STORE_ROAMING_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::fmt::Debug for CERT_REGISTRY_STORE_ROAMING_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_REGISTRY_STORE_ROAMING_PARA").field("hKey", &self.hKey).field("pwszStoreDirectory", &self.pwszStoreDirectory).finish() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::cmp::PartialEq for CERT_REGISTRY_STORE_ROAMING_PARA { fn eq(&self, other: &Self) -> bool { self.hKey == other.hKey && self.pwszStoreDirectory == other.pwszStoreDirectory } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::cmp::Eq for CERT_REGISTRY_STORE_ROAMING_PARA {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] unsafe impl ::windows::core::Abi for CERT_REGISTRY_STORE_ROAMING_PARA { type Abi = Self; } pub const CERT_REGISTRY_STORE_SERIALIZED_FLAG: u32 = 131072u32; pub const CERT_RENEWAL_PROP_ID: u32 = 64u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_REQUEST_INFO { pub dwVersion: u32, pub Subject: CRYPTOAPI_BLOB, pub SubjectPublicKeyInfo: CERT_PUBLIC_KEY_INFO, pub cAttribute: u32, pub rgAttribute: *mut CRYPT_ATTRIBUTE, } #[cfg(feature = "Win32_Foundation")] impl CERT_REQUEST_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_REQUEST_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_REQUEST_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_REQUEST_INFO").field("dwVersion", &self.dwVersion).field("Subject", &self.Subject).field("SubjectPublicKeyInfo", &self.SubjectPublicKeyInfo).field("cAttribute", &self.cAttribute).field("rgAttribute", &self.rgAttribute).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_REQUEST_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.Subject == other.Subject && self.SubjectPublicKeyInfo == other.SubjectPublicKeyInfo && self.cAttribute == other.cAttribute && self.rgAttribute == other.rgAttribute } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_REQUEST_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_REQUEST_INFO { type Abi = Self; } pub const CERT_REQUEST_ORIGINATOR_PROP_ID: u32 = 71u32; pub const CERT_REQUEST_V1: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_REVOCATION_CHAIN_PARA { pub cbSize: u32, pub hChainEngine: HCERTCHAINENGINE, pub hAdditionalStore: *mut ::core::ffi::c_void, pub dwChainFlags: u32, pub dwUrlRetrievalTimeout: u32, pub pftCurrentTime: *mut super::super::Foundation::FILETIME, pub pftCacheResync: *mut super::super::Foundation::FILETIME, pub cbMaxUrlRetrievalByteCount: u32, } #[cfg(feature = "Win32_Foundation")] impl CERT_REVOCATION_CHAIN_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_REVOCATION_CHAIN_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_REVOCATION_CHAIN_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_REVOCATION_CHAIN_PARA") .field("cbSize", &self.cbSize) .field("hChainEngine", &self.hChainEngine) .field("hAdditionalStore", &self.hAdditionalStore) .field("dwChainFlags", &self.dwChainFlags) .field("dwUrlRetrievalTimeout", &self.dwUrlRetrievalTimeout) .field("pftCurrentTime", &self.pftCurrentTime) .field("pftCacheResync", &self.pftCacheResync) .field("cbMaxUrlRetrievalByteCount", &self.cbMaxUrlRetrievalByteCount) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_REVOCATION_CHAIN_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.hChainEngine == other.hChainEngine && self.hAdditionalStore == other.hAdditionalStore && self.dwChainFlags == other.dwChainFlags && self.dwUrlRetrievalTimeout == other.dwUrlRetrievalTimeout && self.pftCurrentTime == other.pftCurrentTime && self.pftCacheResync == other.pftCacheResync && self.cbMaxUrlRetrievalByteCount == other.cbMaxUrlRetrievalByteCount } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_REVOCATION_CHAIN_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_REVOCATION_CHAIN_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_REVOCATION_CRL_INFO { pub cbSize: u32, pub pBaseCrlContext: *mut CRL_CONTEXT, pub pDeltaCrlContext: *mut CRL_CONTEXT, pub pCrlEntry: *mut CRL_ENTRY, pub fDeltaCrlEntry: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl CERT_REVOCATION_CRL_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_REVOCATION_CRL_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_REVOCATION_CRL_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_REVOCATION_CRL_INFO").field("cbSize", &self.cbSize).field("pBaseCrlContext", &self.pBaseCrlContext).field("pDeltaCrlContext", &self.pDeltaCrlContext).field("pCrlEntry", &self.pCrlEntry).field("fDeltaCrlEntry", &self.fDeltaCrlEntry).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_REVOCATION_CRL_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pBaseCrlContext == other.pBaseCrlContext && self.pDeltaCrlContext == other.pDeltaCrlContext && self.pCrlEntry == other.pCrlEntry && self.fDeltaCrlEntry == other.fDeltaCrlEntry } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_REVOCATION_CRL_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_REVOCATION_CRL_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_REVOCATION_INFO { pub cbSize: u32, pub dwRevocationResult: u32, pub pszRevocationOid: super::super::Foundation::PSTR, pub pvOidSpecificInfo: *mut ::core::ffi::c_void, pub fHasFreshnessTime: super::super::Foundation::BOOL, pub dwFreshnessTime: u32, pub pCrlInfo: *mut CERT_REVOCATION_CRL_INFO, } #[cfg(feature = "Win32_Foundation")] impl CERT_REVOCATION_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_REVOCATION_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_REVOCATION_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_REVOCATION_INFO") .field("cbSize", &self.cbSize) .field("dwRevocationResult", &self.dwRevocationResult) .field("pszRevocationOid", &self.pszRevocationOid) .field("pvOidSpecificInfo", &self.pvOidSpecificInfo) .field("fHasFreshnessTime", &self.fHasFreshnessTime) .field("dwFreshnessTime", &self.dwFreshnessTime) .field("pCrlInfo", &self.pCrlInfo) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_REVOCATION_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwRevocationResult == other.dwRevocationResult && self.pszRevocationOid == other.pszRevocationOid && self.pvOidSpecificInfo == other.pvOidSpecificInfo && self.fHasFreshnessTime == other.fHasFreshnessTime && self.dwFreshnessTime == other.dwFreshnessTime && self.pCrlInfo == other.pCrlInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_REVOCATION_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_REVOCATION_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_REVOCATION_PARA { pub cbSize: u32, pub pIssuerCert: *mut CERT_CONTEXT, pub cCertStore: u32, pub rgCertStore: *mut *mut ::core::ffi::c_void, pub hCrlStore: *mut ::core::ffi::c_void, pub pftTimeToUse: *mut super::super::Foundation::FILETIME, } #[cfg(feature = "Win32_Foundation")] impl CERT_REVOCATION_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_REVOCATION_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_REVOCATION_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_REVOCATION_PARA").field("cbSize", &self.cbSize).field("pIssuerCert", &self.pIssuerCert).field("cCertStore", &self.cCertStore).field("rgCertStore", &self.rgCertStore).field("hCrlStore", &self.hCrlStore).field("pftTimeToUse", &self.pftTimeToUse).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_REVOCATION_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pIssuerCert == other.pIssuerCert && self.cCertStore == other.cCertStore && self.rgCertStore == other.rgCertStore && self.hCrlStore == other.hCrlStore && self.pftTimeToUse == other.pftTimeToUse } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_REVOCATION_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_REVOCATION_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_REVOCATION_STATUS { pub cbSize: u32, pub dwIndex: u32, pub dwError: u32, pub dwReason: CERT_REVOCATION_STATUS_REASON, pub fHasFreshnessTime: super::super::Foundation::BOOL, pub dwFreshnessTime: u32, } #[cfg(feature = "Win32_Foundation")] impl CERT_REVOCATION_STATUS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_REVOCATION_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_REVOCATION_STATUS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_REVOCATION_STATUS").field("cbSize", &self.cbSize).field("dwIndex", &self.dwIndex).field("dwError", &self.dwError).field("dwReason", &self.dwReason).field("fHasFreshnessTime", &self.fHasFreshnessTime).field("dwFreshnessTime", &self.dwFreshnessTime).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_REVOCATION_STATUS { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwIndex == other.dwIndex && self.dwError == other.dwError && self.dwReason == other.dwReason && self.fHasFreshnessTime == other.fHasFreshnessTime && self.dwFreshnessTime == other.dwFreshnessTime } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_REVOCATION_STATUS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_REVOCATION_STATUS { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_REVOCATION_STATUS_REASON(pub u32); pub const CRL_REASON_UNSPECIFIED: CERT_REVOCATION_STATUS_REASON = CERT_REVOCATION_STATUS_REASON(0u32); pub const CRL_REASON_KEY_COMPROMISE: CERT_REVOCATION_STATUS_REASON = CERT_REVOCATION_STATUS_REASON(1u32); pub const CRL_REASON_CA_COMPROMISE: CERT_REVOCATION_STATUS_REASON = CERT_REVOCATION_STATUS_REASON(2u32); pub const CRL_REASON_AFFILIATION_CHANGED: CERT_REVOCATION_STATUS_REASON = CERT_REVOCATION_STATUS_REASON(3u32); pub const CRL_REASON_SUPERSEDED: CERT_REVOCATION_STATUS_REASON = CERT_REVOCATION_STATUS_REASON(4u32); pub const CRL_REASON_CESSATION_OF_OPERATION: CERT_REVOCATION_STATUS_REASON = CERT_REVOCATION_STATUS_REASON(5u32); pub const CRL_REASON_CERTIFICATE_HOLD: CERT_REVOCATION_STATUS_REASON = CERT_REVOCATION_STATUS_REASON(6u32); pub const CRL_REASON_REMOVE_FROM_CRL: CERT_REVOCATION_STATUS_REASON = CERT_REVOCATION_STATUS_REASON(8u32); impl ::core::convert::From<u32> for CERT_REVOCATION_STATUS_REASON { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_REVOCATION_STATUS_REASON { type Abi = Self; } impl ::core::ops::BitOr for CERT_REVOCATION_STATUS_REASON { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_REVOCATION_STATUS_REASON { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_REVOCATION_STATUS_REASON { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_REVOCATION_STATUS_REASON { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_REVOCATION_STATUS_REASON { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_ROOT_PROGRAM_CERT_POLICIES_PROP_ID: u32 = 83u32; pub const CERT_ROOT_PROGRAM_CHAIN_POLICIES_PROP_ID: u32 = 105u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_ROOT_PROGRAM_FLAGS(pub u32); pub const CERT_ROOT_PROGRAM_FLAG_LSC: CERT_ROOT_PROGRAM_FLAGS = CERT_ROOT_PROGRAM_FLAGS(64u32); pub const CERT_ROOT_PROGRAM_FLAG_ORG: CERT_ROOT_PROGRAM_FLAGS = CERT_ROOT_PROGRAM_FLAGS(128u32); pub const CERT_ROOT_PROGRAM_FLAG_SUBJECT_LOGO: CERT_ROOT_PROGRAM_FLAGS = CERT_ROOT_PROGRAM_FLAGS(32u32); impl ::core::convert::From<u32> for CERT_ROOT_PROGRAM_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_ROOT_PROGRAM_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CERT_ROOT_PROGRAM_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_ROOT_PROGRAM_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_ROOT_PROGRAM_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_ROOT_PROGRAM_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_ROOT_PROGRAM_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_ROOT_PROGRAM_FLAG_ADDRESS: u32 = 8u32; pub const CERT_ROOT_PROGRAM_FLAG_OU: u32 = 16u32; pub const CERT_ROOT_PROGRAM_NAME_CONSTRAINTS_PROP_ID: u32 = 84u32; pub const CERT_SCARD_PIN_ID_PROP_ID: u32 = 90u32; pub const CERT_SCARD_PIN_INFO_PROP_ID: u32 = 91u32; pub const CERT_SCEP_CA_CERT_PROP_ID: u32 = 111u32; pub const CERT_SCEP_ENCRYPT_HASH_CNG_ALG_PROP_ID: u32 = 114u32; pub const CERT_SCEP_FLAGS_PROP_ID: u32 = 115u32; pub const CERT_SCEP_GUID_PROP_ID: u32 = 116u32; pub const CERT_SCEP_NONCE_PROP_ID: u32 = 113u32; pub const CERT_SCEP_RA_ENCRYPTION_CERT_PROP_ID: u32 = 110u32; pub const CERT_SCEP_RA_SIGNATURE_CERT_PROP_ID: u32 = 109u32; pub const CERT_SCEP_SERVER_CERTS_PROP_ID: u32 = 108u32; pub const CERT_SCEP_SIGNER_CERT_PROP_ID: u32 = 112u32; pub const CERT_SELECT_ALLOW_DUPLICATES: u32 = 128u32; pub const CERT_SELECT_ALLOW_EXPIRED: u32 = 1u32; pub const CERT_SELECT_BY_FRIENDLYNAME: u32 = 13u32; pub const CERT_SELECT_BY_ISSUER_DISPLAYNAME: u32 = 12u32; pub const CERT_SELECT_BY_THUMBPRINT: u32 = 14u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_SELECT_CHAIN_PARA { pub hChainEngine: HCERTCHAINENGINE, pub pTime: *mut super::super::Foundation::FILETIME, pub hAdditionalStore: *mut ::core::ffi::c_void, pub pChainPara: *mut CERT_CHAIN_PARA, pub dwFlags: u32, } #[cfg(feature = "Win32_Foundation")] impl CERT_SELECT_CHAIN_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_SELECT_CHAIN_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_SELECT_CHAIN_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_SELECT_CHAIN_PARA").field("hChainEngine", &self.hChainEngine).field("pTime", &self.pTime).field("hAdditionalStore", &self.hAdditionalStore).field("pChainPara", &self.pChainPara).field("dwFlags", &self.dwFlags).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_SELECT_CHAIN_PARA { fn eq(&self, other: &Self) -> bool { self.hChainEngine == other.hChainEngine && self.pTime == other.pTime && self.hAdditionalStore == other.hAdditionalStore && self.pChainPara == other.pChainPara && self.dwFlags == other.dwFlags } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_SELECT_CHAIN_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_SELECT_CHAIN_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_SELECT_CRITERIA { pub dwType: CERT_SELECT_CRITERIA_TYPE, pub cPara: u32, pub ppPara: *mut *mut ::core::ffi::c_void, } impl CERT_SELECT_CRITERIA {} impl ::core::default::Default for CERT_SELECT_CRITERIA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_SELECT_CRITERIA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_SELECT_CRITERIA").field("dwType", &self.dwType).field("cPara", &self.cPara).field("ppPara", &self.ppPara).finish() } } impl ::core::cmp::PartialEq for CERT_SELECT_CRITERIA { fn eq(&self, other: &Self) -> bool { self.dwType == other.dwType && self.cPara == other.cPara && self.ppPara == other.ppPara } } impl ::core::cmp::Eq for CERT_SELECT_CRITERIA {} unsafe impl ::windows::core::Abi for CERT_SELECT_CRITERIA { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_SELECT_CRITERIA_TYPE(pub u32); pub const CERT_SELECT_BY_ENHKEY_USAGE: CERT_SELECT_CRITERIA_TYPE = CERT_SELECT_CRITERIA_TYPE(1u32); pub const CERT_SELECT_BY_KEY_USAGE: CERT_SELECT_CRITERIA_TYPE = CERT_SELECT_CRITERIA_TYPE(2u32); pub const CERT_SELECT_BY_POLICY_OID: CERT_SELECT_CRITERIA_TYPE = CERT_SELECT_CRITERIA_TYPE(3u32); pub const CERT_SELECT_BY_PROV_NAME: CERT_SELECT_CRITERIA_TYPE = CERT_SELECT_CRITERIA_TYPE(4u32); pub const CERT_SELECT_BY_EXTENSION: CERT_SELECT_CRITERIA_TYPE = CERT_SELECT_CRITERIA_TYPE(5u32); pub const CERT_SELECT_BY_SUBJECT_HOST_NAME: CERT_SELECT_CRITERIA_TYPE = CERT_SELECT_CRITERIA_TYPE(6u32); pub const CERT_SELECT_BY_ISSUER_ATTR: CERT_SELECT_CRITERIA_TYPE = CERT_SELECT_CRITERIA_TYPE(7u32); pub const CERT_SELECT_BY_SUBJECT_ATTR: CERT_SELECT_CRITERIA_TYPE = CERT_SELECT_CRITERIA_TYPE(8u32); pub const CERT_SELECT_BY_ISSUER_NAME: CERT_SELECT_CRITERIA_TYPE = CERT_SELECT_CRITERIA_TYPE(9u32); pub const CERT_SELECT_BY_PUBLIC_KEY: CERT_SELECT_CRITERIA_TYPE = CERT_SELECT_CRITERIA_TYPE(10u32); pub const CERT_SELECT_BY_TLS_SIGNATURES: CERT_SELECT_CRITERIA_TYPE = CERT_SELECT_CRITERIA_TYPE(11u32); impl ::core::convert::From<u32> for CERT_SELECT_CRITERIA_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_SELECT_CRITERIA_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CERT_SELECT_CRITERIA_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_SELECT_CRITERIA_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_SELECT_CRITERIA_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_SELECT_CRITERIA_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_SELECT_CRITERIA_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_SELECT_DISALLOW_SELFSIGNED: u32 = 4u32; pub const CERT_SELECT_HARDWARE_ONLY: u32 = 64u32; pub const CERT_SELECT_HAS_KEY_FOR_KEY_EXCHANGE: u32 = 32u32; pub const CERT_SELECT_HAS_KEY_FOR_SIGNATURE: u32 = 16u32; pub const CERT_SELECT_HAS_PRIVATE_KEY: u32 = 8u32; pub const CERT_SELECT_IGNORE_AUTOSELECT: u32 = 256u32; pub const CERT_SELECT_MAX_PARA: u32 = 500u32; pub const CERT_SELECT_TRUSTED_ROOT: u32 = 2u32; pub const CERT_SEND_AS_TRUSTED_ISSUER_PROP_ID: u32 = 102u32; pub const CERT_SERIALIZABLE_KEY_CONTEXT_PROP_ID: u32 = 117u32; pub const CERT_SERIAL_CHAIN_PROP_ID: u32 = 119u32; pub const CERT_SERVER_OCSP_RESPONSE_ASYNC_FLAG: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_SERVER_OCSP_RESPONSE_CONTEXT { pub cbSize: u32, pub pbEncodedOcspResponse: *mut u8, pub cbEncodedOcspResponse: u32, } impl CERT_SERVER_OCSP_RESPONSE_CONTEXT {} impl ::core::default::Default for CERT_SERVER_OCSP_RESPONSE_CONTEXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_SERVER_OCSP_RESPONSE_CONTEXT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_SERVER_OCSP_RESPONSE_CONTEXT").field("cbSize", &self.cbSize).field("pbEncodedOcspResponse", &self.pbEncodedOcspResponse).field("cbEncodedOcspResponse", &self.cbEncodedOcspResponse).finish() } } impl ::core::cmp::PartialEq for CERT_SERVER_OCSP_RESPONSE_CONTEXT { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pbEncodedOcspResponse == other.pbEncodedOcspResponse && self.cbEncodedOcspResponse == other.cbEncodedOcspResponse } } impl ::core::cmp::Eq for CERT_SERVER_OCSP_RESPONSE_CONTEXT {} unsafe impl ::windows::core::Abi for CERT_SERVER_OCSP_RESPONSE_CONTEXT { type Abi = Self; } #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_SERVER_OCSP_RESPONSE_OPEN_PARA { pub cbSize: u32, pub dwFlags: u32, pub pcbUsedSize: *mut u32, pub pwszOcspDirectory: super::super::Foundation::PWSTR, pub pfnUpdateCallback: ::core::option::Option<PFN_CERT_SERVER_OCSP_RESPONSE_UPDATE_CALLBACK>, pub pvUpdateCallbackArg: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CERT_SERVER_OCSP_RESPONSE_OPEN_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_SERVER_OCSP_RESPONSE_OPEN_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_SERVER_OCSP_RESPONSE_OPEN_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_SERVER_OCSP_RESPONSE_OPEN_PARA").field("cbSize", &self.cbSize).field("dwFlags", &self.dwFlags).field("pcbUsedSize", &self.pcbUsedSize).field("pwszOcspDirectory", &self.pwszOcspDirectory).field("pvUpdateCallbackArg", &self.pvUpdateCallbackArg).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_SERVER_OCSP_RESPONSE_OPEN_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwFlags == other.dwFlags && self.pcbUsedSize == other.pcbUsedSize && self.pwszOcspDirectory == other.pwszOcspDirectory && self.pfnUpdateCallback.map(|f| f as usize) == other.pfnUpdateCallback.map(|f| f as usize) && self.pvUpdateCallbackArg == other.pvUpdateCallbackArg } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_SERVER_OCSP_RESPONSE_OPEN_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_SERVER_OCSP_RESPONSE_OPEN_PARA { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const CERT_SERVER_OCSP_RESPONSE_OPEN_PARA_READ_FLAG: u32 = 1u32; pub const CERT_SERVER_OCSP_RESPONSE_OPEN_PARA_WRITE_FLAG: u32 = 2u32; pub const CERT_SET_PROPERTY_IGNORE_PERSIST_ERROR_FLAG: u32 = 2147483648u32; pub const CERT_SET_PROPERTY_INHIBIT_PERSIST_FLAG: u32 = 1073741824u32; pub const CERT_SHA1_HASH_PROP_ID: u32 = 3u32; pub const CERT_SHA256_HASH_PROP_ID: u32 = 107u32; pub const CERT_SIGNATURE_HASH_PROP_ID: u32 = 15u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_SIGNED_CONTENT_INFO { pub ToBeSigned: CRYPTOAPI_BLOB, pub SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub Signature: CRYPT_BIT_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CERT_SIGNED_CONTENT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_SIGNED_CONTENT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_SIGNED_CONTENT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_SIGNED_CONTENT_INFO").field("ToBeSigned", &self.ToBeSigned).field("SignatureAlgorithm", &self.SignatureAlgorithm).field("Signature", &self.Signature).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_SIGNED_CONTENT_INFO { fn eq(&self, other: &Self) -> bool { self.ToBeSigned == other.ToBeSigned && self.SignatureAlgorithm == other.SignatureAlgorithm && self.Signature == other.Signature } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_SIGNED_CONTENT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_SIGNED_CONTENT_INFO { type Abi = Self; } pub const CERT_SIGN_HASH_CNG_ALG_PROP_ID: u32 = 89u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_SIMPLE_CHAIN { pub cbSize: u32, pub TrustStatus: CERT_TRUST_STATUS, pub cElement: u32, pub rgpElement: *mut *mut CERT_CHAIN_ELEMENT, pub pTrustListInfo: *mut CERT_TRUST_LIST_INFO, pub fHasRevocationFreshnessTime: super::super::Foundation::BOOL, pub dwRevocationFreshnessTime: u32, } #[cfg(feature = "Win32_Foundation")] impl CERT_SIMPLE_CHAIN {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_SIMPLE_CHAIN { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_SIMPLE_CHAIN { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_SIMPLE_CHAIN") .field("cbSize", &self.cbSize) .field("TrustStatus", &self.TrustStatus) .field("cElement", &self.cElement) .field("rgpElement", &self.rgpElement) .field("pTrustListInfo", &self.pTrustListInfo) .field("fHasRevocationFreshnessTime", &self.fHasRevocationFreshnessTime) .field("dwRevocationFreshnessTime", &self.dwRevocationFreshnessTime) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_SIMPLE_CHAIN { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.TrustStatus == other.TrustStatus && self.cElement == other.cElement && self.rgpElement == other.rgpElement && self.pTrustListInfo == other.pTrustListInfo && self.fHasRevocationFreshnessTime == other.fHasRevocationFreshnessTime && self.dwRevocationFreshnessTime == other.dwRevocationFreshnessTime } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_SIMPLE_CHAIN {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_SIMPLE_CHAIN { type Abi = Self; } pub const CERT_SMART_CARD_DATA_PROP_ID: u32 = 16u32; pub const CERT_SMART_CARD_READER_NON_REMOVABLE_PROP_ID: u32 = 106u32; pub const CERT_SMART_CARD_READER_PROP_ID: u32 = 101u32; pub const CERT_SMART_CARD_ROOT_INFO_PROP_ID: u32 = 76u32; pub const CERT_SOURCE_LOCATION_PROP_ID: u32 = 72u32; pub const CERT_SOURCE_URL_PROP_ID: u32 = 73u32; pub const CERT_SRV_OCSP_RESP_MIN_SYNC_CERT_FILE_SECONDS_DEFAULT: u32 = 5u32; pub const CERT_STORE_ADD_ALWAYS: u32 = 4u32; pub const CERT_STORE_ADD_NEW: u32 = 1u32; pub const CERT_STORE_ADD_NEWER: u32 = 6u32; pub const CERT_STORE_ADD_NEWER_INHERIT_PROPERTIES: u32 = 7u32; pub const CERT_STORE_ADD_REPLACE_EXISTING: u32 = 3u32; pub const CERT_STORE_ADD_REPLACE_EXISTING_INHERIT_PROPERTIES: u32 = 5u32; pub const CERT_STORE_ADD_USE_EXISTING: u32 = 2u32; pub const CERT_STORE_BASE_CRL_FLAG: u32 = 256u32; pub const CERT_STORE_CERTIFICATE_CONTEXT: u32 = 1u32; pub const CERT_STORE_CRL_CONTEXT: u32 = 2u32; pub const CERT_STORE_CTL_CONTEXT: u32 = 3u32; pub const CERT_STORE_CTRL_AUTO_RESYNC: u32 = 4u32; pub const CERT_STORE_CTRL_CANCEL_NOTIFY: u32 = 5u32; pub const CERT_STORE_CTRL_COMMIT: u32 = 3u32; pub const CERT_STORE_CTRL_NOTIFY_CHANGE: u32 = 2u32; pub const CERT_STORE_CTRL_RESYNC: u32 = 1u32; pub const CERT_STORE_DELTA_CRL_FLAG: u32 = 512u32; pub const CERT_STORE_LOCALIZED_NAME_PROP_ID: u32 = 4096u32; pub const CERT_STORE_MANIFOLD_FLAG: u32 = 256u32; pub const CERT_STORE_NO_CRL_FLAG: u32 = 65536u32; pub const CERT_STORE_NO_ISSUER_FLAG: u32 = 131072u32; pub const CERT_STORE_PROV_CLOSE_FUNC: u32 = 0u32; pub const CERT_STORE_PROV_CONTROL_FUNC: u32 = 13u32; pub const CERT_STORE_PROV_DELETE_CERT_FUNC: u32 = 3u32; pub const CERT_STORE_PROV_DELETE_CRL_FUNC: u32 = 7u32; pub const CERT_STORE_PROV_DELETE_CTL_FUNC: u32 = 11u32; pub const CERT_STORE_PROV_FIND_CERT_FUNC: u32 = 14u32; pub const CERT_STORE_PROV_FIND_CRL_FUNC: u32 = 17u32; pub const CERT_STORE_PROV_FIND_CTL_FUNC: u32 = 20u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_STORE_PROV_FIND_INFO { pub cbSize: u32, pub dwMsgAndCertEncodingType: u32, pub dwFindFlags: u32, pub dwFindType: u32, pub pvFindPara: *mut ::core::ffi::c_void, } impl CERT_STORE_PROV_FIND_INFO {} impl ::core::default::Default for CERT_STORE_PROV_FIND_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_STORE_PROV_FIND_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_STORE_PROV_FIND_INFO").field("cbSize", &self.cbSize).field("dwMsgAndCertEncodingType", &self.dwMsgAndCertEncodingType).field("dwFindFlags", &self.dwFindFlags).field("dwFindType", &self.dwFindType).field("pvFindPara", &self.pvFindPara).finish() } } impl ::core::cmp::PartialEq for CERT_STORE_PROV_FIND_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwMsgAndCertEncodingType == other.dwMsgAndCertEncodingType && self.dwFindFlags == other.dwFindFlags && self.dwFindType == other.dwFindType && self.pvFindPara == other.pvFindPara } } impl ::core::cmp::Eq for CERT_STORE_PROV_FIND_INFO {} unsafe impl ::windows::core::Abi for CERT_STORE_PROV_FIND_INFO { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_STORE_PROV_FLAGS(pub u32); pub const CERT_STORE_PROV_EXTERNAL_FLAG: CERT_STORE_PROV_FLAGS = CERT_STORE_PROV_FLAGS(1u32); pub const CERT_STORE_PROV_DELETED_FLAG: CERT_STORE_PROV_FLAGS = CERT_STORE_PROV_FLAGS(2u32); pub const CERT_STORE_PROV_NO_PERSIST_FLAG: CERT_STORE_PROV_FLAGS = CERT_STORE_PROV_FLAGS(4u32); pub const CERT_STORE_PROV_SYSTEM_STORE_FLAG: CERT_STORE_PROV_FLAGS = CERT_STORE_PROV_FLAGS(8u32); pub const CERT_STORE_PROV_LM_SYSTEM_STORE_FLAG: CERT_STORE_PROV_FLAGS = CERT_STORE_PROV_FLAGS(16u32); impl ::core::convert::From<u32> for CERT_STORE_PROV_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_STORE_PROV_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CERT_STORE_PROV_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_STORE_PROV_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_STORE_PROV_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_STORE_PROV_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_STORE_PROV_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_STORE_PROV_FREE_FIND_CERT_FUNC: u32 = 15u32; pub const CERT_STORE_PROV_FREE_FIND_CRL_FUNC: u32 = 18u32; pub const CERT_STORE_PROV_FREE_FIND_CTL_FUNC: u32 = 21u32; pub const CERT_STORE_PROV_GET_CERT_PROPERTY_FUNC: u32 = 16u32; pub const CERT_STORE_PROV_GET_CRL_PROPERTY_FUNC: u32 = 19u32; pub const CERT_STORE_PROV_GET_CTL_PROPERTY_FUNC: u32 = 22u32; pub const CERT_STORE_PROV_GP_SYSTEM_STORE_FLAG: u32 = 32u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_STORE_PROV_INFO { pub cbSize: u32, pub cStoreProvFunc: u32, pub rgpvStoreProvFunc: *mut *mut ::core::ffi::c_void, pub hStoreProv: *mut ::core::ffi::c_void, pub dwStoreProvFlags: CERT_STORE_PROV_FLAGS, pub hStoreProvFuncAddr2: *mut ::core::ffi::c_void, } impl CERT_STORE_PROV_INFO {} impl ::core::default::Default for CERT_STORE_PROV_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_STORE_PROV_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_STORE_PROV_INFO") .field("cbSize", &self.cbSize) .field("cStoreProvFunc", &self.cStoreProvFunc) .field("rgpvStoreProvFunc", &self.rgpvStoreProvFunc) .field("hStoreProv", &self.hStoreProv) .field("dwStoreProvFlags", &self.dwStoreProvFlags) .field("hStoreProvFuncAddr2", &self.hStoreProvFuncAddr2) .finish() } } impl ::core::cmp::PartialEq for CERT_STORE_PROV_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.cStoreProvFunc == other.cStoreProvFunc && self.rgpvStoreProvFunc == other.rgpvStoreProvFunc && self.hStoreProv == other.hStoreProv && self.dwStoreProvFlags == other.dwStoreProvFlags && self.hStoreProvFuncAddr2 == other.hStoreProvFuncAddr2 } } impl ::core::cmp::Eq for CERT_STORE_PROV_INFO {} unsafe impl ::windows::core::Abi for CERT_STORE_PROV_INFO { type Abi = Self; } pub const CERT_STORE_PROV_READ_CERT_FUNC: u32 = 1u32; pub const CERT_STORE_PROV_READ_CRL_FUNC: u32 = 5u32; pub const CERT_STORE_PROV_READ_CTL_FUNC: u32 = 9u32; pub const CERT_STORE_PROV_SET_CERT_PROPERTY_FUNC: u32 = 4u32; pub const CERT_STORE_PROV_SET_CRL_PROPERTY_FUNC: u32 = 8u32; pub const CERT_STORE_PROV_SET_CTL_PROPERTY_FUNC: u32 = 12u32; pub const CERT_STORE_PROV_SHARED_USER_FLAG: u32 = 64u32; pub const CERT_STORE_PROV_WRITE_ADD_FLAG: u32 = 1u32; pub const CERT_STORE_PROV_WRITE_CERT_FUNC: u32 = 2u32; pub const CERT_STORE_PROV_WRITE_CRL_FUNC: u32 = 6u32; pub const CERT_STORE_PROV_WRITE_CTL_FUNC: u32 = 10u32; pub const CERT_STORE_REVOCATION_FLAG: u32 = 4u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_STORE_SAVE_AS(pub u32); pub const CERT_STORE_SAVE_AS_PKCS7: CERT_STORE_SAVE_AS = CERT_STORE_SAVE_AS(2u32); pub const CERT_STORE_SAVE_AS_STORE: CERT_STORE_SAVE_AS = CERT_STORE_SAVE_AS(1u32); impl ::core::convert::From<u32> for CERT_STORE_SAVE_AS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_STORE_SAVE_AS { type Abi = Self; } impl ::core::ops::BitOr for CERT_STORE_SAVE_AS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_STORE_SAVE_AS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_STORE_SAVE_AS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_STORE_SAVE_AS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_STORE_SAVE_AS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_STORE_SAVE_AS_PKCS12: u32 = 3u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_STORE_SAVE_TO(pub u32); pub const CERT_STORE_SAVE_TO_FILE: CERT_STORE_SAVE_TO = CERT_STORE_SAVE_TO(1u32); pub const CERT_STORE_SAVE_TO_FILENAME: CERT_STORE_SAVE_TO = CERT_STORE_SAVE_TO(4u32); pub const CERT_STORE_SAVE_TO_FILENAME_A: CERT_STORE_SAVE_TO = CERT_STORE_SAVE_TO(3u32); pub const CERT_STORE_SAVE_TO_FILENAME_W: CERT_STORE_SAVE_TO = CERT_STORE_SAVE_TO(4u32); pub const CERT_STORE_SAVE_TO_MEMORY: CERT_STORE_SAVE_TO = CERT_STORE_SAVE_TO(2u32); impl ::core::convert::From<u32> for CERT_STORE_SAVE_TO { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_STORE_SAVE_TO { type Abi = Self; } impl ::core::ops::BitOr for CERT_STORE_SAVE_TO { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_STORE_SAVE_TO { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_STORE_SAVE_TO { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_STORE_SAVE_TO { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_STORE_SAVE_TO { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_STORE_SHARE_STORE_FLAG: u32 = 64u32; pub const CERT_STORE_SIGNATURE_FLAG: u32 = 1u32; pub const CERT_STORE_TIME_VALIDITY_FLAG: u32 = 2u32; pub const CERT_STORE_UNSAFE_PHYSICAL_FLAG: u32 = 32u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_STRING_TYPE(pub u32); pub const CERT_SIMPLE_NAME_STR: CERT_STRING_TYPE = CERT_STRING_TYPE(1u32); pub const CERT_OID_NAME_STR: CERT_STRING_TYPE = CERT_STRING_TYPE(2u32); pub const CERT_X500_NAME_STR: CERT_STRING_TYPE = CERT_STRING_TYPE(3u32); impl ::core::convert::From<u32> for CERT_STRING_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_STRING_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CERT_STRING_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_STRING_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_STRING_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_STRING_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_STRING_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_STRONG_SIGN_FLAGS(pub u32); pub const CERT_STRONG_SIGN_ENABLE_CRL_CHECK: CERT_STRONG_SIGN_FLAGS = CERT_STRONG_SIGN_FLAGS(1u32); pub const CERT_STRONG_SIGN_ENABLE_OCSP_CHECK: CERT_STRONG_SIGN_FLAGS = CERT_STRONG_SIGN_FLAGS(2u32); impl ::core::convert::From<u32> for CERT_STRONG_SIGN_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_STRONG_SIGN_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CERT_STRONG_SIGN_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_STRONG_SIGN_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_STRONG_SIGN_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_STRONG_SIGN_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_STRONG_SIGN_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CERT_STRONG_SIGN_OID_INFO_CHOICE: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_STRONG_SIGN_PARA { pub cbSize: u32, pub dwInfoChoice: u32, pub Anonymous: CERT_STRONG_SIGN_PARA_0, } #[cfg(feature = "Win32_Foundation")] impl CERT_STRONG_SIGN_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_STRONG_SIGN_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_STRONG_SIGN_PARA { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_STRONG_SIGN_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_STRONG_SIGN_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CERT_STRONG_SIGN_PARA_0 { pub pvInfo: *mut ::core::ffi::c_void, pub pSerializedInfo: *mut CERT_STRONG_SIGN_SERIALIZED_INFO, pub pszOID: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_STRONG_SIGN_PARA_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_STRONG_SIGN_PARA_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_STRONG_SIGN_PARA_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_STRONG_SIGN_PARA_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_STRONG_SIGN_PARA_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_STRONG_SIGN_SERIALIZED_INFO { pub dwFlags: CERT_STRONG_SIGN_FLAGS, pub pwszCNGSignHashAlgids: super::super::Foundation::PWSTR, pub pwszCNGPubKeyMinBitLengths: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CERT_STRONG_SIGN_SERIALIZED_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_STRONG_SIGN_SERIALIZED_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_STRONG_SIGN_SERIALIZED_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_STRONG_SIGN_SERIALIZED_INFO").field("dwFlags", &self.dwFlags).field("pwszCNGSignHashAlgids", &self.pwszCNGSignHashAlgids).field("pwszCNGPubKeyMinBitLengths", &self.pwszCNGPubKeyMinBitLengths).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_STRONG_SIGN_SERIALIZED_INFO { fn eq(&self, other: &Self) -> bool { self.dwFlags == other.dwFlags && self.pwszCNGSignHashAlgids == other.pwszCNGSignHashAlgids && self.pwszCNGPubKeyMinBitLengths == other.pwszCNGPubKeyMinBitLengths } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_STRONG_SIGN_SERIALIZED_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_STRONG_SIGN_SERIALIZED_INFO { type Abi = Self; } pub const CERT_STRONG_SIGN_SERIALIZED_INFO_CHOICE: u32 = 1u32; pub const CERT_SUBJECT_DISABLE_CRL_PROP_ID: u32 = 86u32; pub const CERT_SUBJECT_INFO_ACCESS_PROP_ID: u32 = 80u32; pub const CERT_SUBJECT_NAME_MD5_HASH_PROP_ID: u32 = 29u32; pub const CERT_SUBJECT_OCSP_AUTHORITY_INFO_ACCESS_PROP_ID: u32 = 85u32; pub const CERT_SUBJECT_PUBLIC_KEY_MD5_HASH_PROP_ID: u32 = 25u32; pub const CERT_SUBJECT_PUB_KEY_BIT_LENGTH_PROP_ID: u32 = 92u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_SUPPORTED_ALGORITHM_INFO { pub Algorithm: CRYPT_ALGORITHM_IDENTIFIER, pub IntendedKeyUsage: CRYPT_BIT_BLOB, pub IntendedCertPolicies: CERT_POLICIES_INFO, } #[cfg(feature = "Win32_Foundation")] impl CERT_SUPPORTED_ALGORITHM_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_SUPPORTED_ALGORITHM_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_SUPPORTED_ALGORITHM_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_SUPPORTED_ALGORITHM_INFO").field("Algorithm", &self.Algorithm).field("IntendedKeyUsage", &self.IntendedKeyUsage).field("IntendedCertPolicies", &self.IntendedCertPolicies).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_SUPPORTED_ALGORITHM_INFO { fn eq(&self, other: &Self) -> bool { self.Algorithm == other.Algorithm && self.IntendedKeyUsage == other.IntendedKeyUsage && self.IntendedCertPolicies == other.IntendedCertPolicies } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_SUPPORTED_ALGORITHM_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_SUPPORTED_ALGORITHM_INFO { type Abi = Self; } pub const CERT_SYSTEM_STORE_CURRENT_SERVICE_ID: u32 = 4u32; pub const CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY_ID: u32 = 7u32; pub const CERT_SYSTEM_STORE_CURRENT_USER_ID: u32 = 1u32; pub const CERT_SYSTEM_STORE_DEFER_READ_FLAG: u32 = 536870912u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CERT_SYSTEM_STORE_FLAGS(pub u32); pub const CERT_SYSTEM_STORE_LOCATION_MASK: CERT_SYSTEM_STORE_FLAGS = CERT_SYSTEM_STORE_FLAGS(16711680u32); pub const CERT_SYSTEM_STORE_RELOCATE_FLAG: CERT_SYSTEM_STORE_FLAGS = CERT_SYSTEM_STORE_FLAGS(2147483648u32); impl ::core::convert::From<u32> for CERT_SYSTEM_STORE_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CERT_SYSTEM_STORE_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CERT_SYSTEM_STORE_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CERT_SYSTEM_STORE_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CERT_SYSTEM_STORE_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CERT_SYSTEM_STORE_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CERT_SYSTEM_STORE_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_SYSTEM_STORE_INFO { pub cbSize: u32, } impl CERT_SYSTEM_STORE_INFO {} impl ::core::default::Default for CERT_SYSTEM_STORE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_SYSTEM_STORE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_SYSTEM_STORE_INFO").field("cbSize", &self.cbSize).finish() } } impl ::core::cmp::PartialEq for CERT_SYSTEM_STORE_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize } } impl ::core::cmp::Eq for CERT_SYSTEM_STORE_INFO {} unsafe impl ::windows::core::Abi for CERT_SYSTEM_STORE_INFO { type Abi = Self; } pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE_ID: u32 = 9u32; pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY_ID: u32 = 8u32; pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_ID: u32 = 2u32; pub const CERT_SYSTEM_STORE_LOCAL_MACHINE_WCOS_ID: u32 = 10u32; pub const CERT_SYSTEM_STORE_LOCATION_SHIFT: u32 = 16u32; pub const CERT_SYSTEM_STORE_MASK: u32 = 4294901760u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] pub struct CERT_SYSTEM_STORE_RELOCATE_PARA { pub Anonymous1: CERT_SYSTEM_STORE_RELOCATE_PARA_0, pub Anonymous2: CERT_SYSTEM_STORE_RELOCATE_PARA_1, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl CERT_SYSTEM_STORE_RELOCATE_PARA {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::default::Default for CERT_SYSTEM_STORE_RELOCATE_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::cmp::PartialEq for CERT_SYSTEM_STORE_RELOCATE_PARA { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::cmp::Eq for CERT_SYSTEM_STORE_RELOCATE_PARA {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] unsafe impl ::windows::core::Abi for CERT_SYSTEM_STORE_RELOCATE_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] pub union CERT_SYSTEM_STORE_RELOCATE_PARA_0 { pub hKeyBase: super::super::System::Registry::HKEY, pub pvBase: *mut ::core::ffi::c_void, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl CERT_SYSTEM_STORE_RELOCATE_PARA_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::default::Default for CERT_SYSTEM_STORE_RELOCATE_PARA_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::cmp::PartialEq for CERT_SYSTEM_STORE_RELOCATE_PARA_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::cmp::Eq for CERT_SYSTEM_STORE_RELOCATE_PARA_0 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] unsafe impl ::windows::core::Abi for CERT_SYSTEM_STORE_RELOCATE_PARA_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] pub union CERT_SYSTEM_STORE_RELOCATE_PARA_1 { pub pvSystemStore: *mut ::core::ffi::c_void, pub pszSystemStore: super::super::Foundation::PSTR, pub pwszSystemStore: super::super::Foundation::PWSTR, } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl CERT_SYSTEM_STORE_RELOCATE_PARA_1 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::default::Default for CERT_SYSTEM_STORE_RELOCATE_PARA_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::cmp::PartialEq for CERT_SYSTEM_STORE_RELOCATE_PARA_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] impl ::core::cmp::Eq for CERT_SYSTEM_STORE_RELOCATE_PARA_1 {} #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] unsafe impl ::windows::core::Abi for CERT_SYSTEM_STORE_RELOCATE_PARA_1 { type Abi = Self; } pub const CERT_SYSTEM_STORE_SERVICES_ID: u32 = 5u32; pub const CERT_SYSTEM_STORE_UNPROTECTED_FLAG: u32 = 1073741824u32; pub const CERT_SYSTEM_STORE_USERS_ID: u32 = 6u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_TEMPLATE_EXT { pub pszObjId: super::super::Foundation::PSTR, pub dwMajorVersion: u32, pub fMinorVersion: super::super::Foundation::BOOL, pub dwMinorVersion: u32, } #[cfg(feature = "Win32_Foundation")] impl CERT_TEMPLATE_EXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_TEMPLATE_EXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_TEMPLATE_EXT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_TEMPLATE_EXT").field("pszObjId", &self.pszObjId).field("dwMajorVersion", &self.dwMajorVersion).field("fMinorVersion", &self.fMinorVersion).field("dwMinorVersion", &self.dwMinorVersion).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_TEMPLATE_EXT { fn eq(&self, other: &Self) -> bool { self.pszObjId == other.pszObjId && self.dwMajorVersion == other.dwMajorVersion && self.fMinorVersion == other.fMinorVersion && self.dwMinorVersion == other.dwMinorVersion } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_TEMPLATE_EXT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_TEMPLATE_EXT { type Abi = Self; } pub const CERT_TIMESTAMP_HASH_USE_TYPE: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_TPM_SPECIFICATION_INFO { pub pwszFamily: super::super::Foundation::PWSTR, pub dwLevel: u32, pub dwRevision: u32, } #[cfg(feature = "Win32_Foundation")] impl CERT_TPM_SPECIFICATION_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_TPM_SPECIFICATION_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_TPM_SPECIFICATION_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_TPM_SPECIFICATION_INFO").field("pwszFamily", &self.pwszFamily).field("dwLevel", &self.dwLevel).field("dwRevision", &self.dwRevision).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_TPM_SPECIFICATION_INFO { fn eq(&self, other: &Self) -> bool { self.pwszFamily == other.pwszFamily && self.dwLevel == other.dwLevel && self.dwRevision == other.dwRevision } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_TPM_SPECIFICATION_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_TPM_SPECIFICATION_INFO { type Abi = Self; } pub const CERT_TRUST_AUTO_UPDATE_CA_REVOCATION: u32 = 16u32; pub const CERT_TRUST_AUTO_UPDATE_END_REVOCATION: u32 = 32u32; pub const CERT_TRUST_CTL_IS_NOT_SIGNATURE_VALID: u32 = 262144u32; pub const CERT_TRUST_CTL_IS_NOT_TIME_VALID: u32 = 131072u32; pub const CERT_TRUST_CTL_IS_NOT_VALID_FOR_USAGE: u32 = 524288u32; pub const CERT_TRUST_HAS_ALLOW_WEAK_SIGNATURE: u32 = 131072u32; pub const CERT_TRUST_HAS_AUTO_UPDATE_WEAK_SIGNATURE: u32 = 32768u32; pub const CERT_TRUST_HAS_CRL_VALIDITY_EXTENDED: u32 = 4096u32; pub const CERT_TRUST_HAS_EXACT_MATCH_ISSUER: u32 = 1u32; pub const CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT: u32 = 32768u32; pub const CERT_TRUST_HAS_ISSUANCE_CHAIN_POLICY: u32 = 512u32; pub const CERT_TRUST_HAS_KEY_MATCH_ISSUER: u32 = 2u32; pub const CERT_TRUST_HAS_NAME_MATCH_ISSUER: u32 = 4u32; pub const CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT: u32 = 8192u32; pub const CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT: u32 = 16384u32; pub const CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT: u32 = 134217728u32; pub const CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT: u32 = 4096u32; pub const CERT_TRUST_HAS_PREFERRED_ISSUER: u32 = 256u32; pub const CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS: u32 = 1024u32; pub const CERT_TRUST_HAS_WEAK_HYGIENE: u32 = 2097152u32; pub const CERT_TRUST_HAS_WEAK_SIGNATURE: u32 = 1048576u32; pub const CERT_TRUST_INVALID_BASIC_CONSTRAINTS: u32 = 1024u32; pub const CERT_TRUST_INVALID_EXTENSION: u32 = 256u32; pub const CERT_TRUST_INVALID_NAME_CONSTRAINTS: u32 = 2048u32; pub const CERT_TRUST_INVALID_POLICY_CONSTRAINTS: u32 = 512u32; pub const CERT_TRUST_IS_CA_TRUSTED: u32 = 16384u32; pub const CERT_TRUST_IS_COMPLEX_CHAIN: u32 = 65536u32; pub const CERT_TRUST_IS_CYCLIC: u32 = 128u32; pub const CERT_TRUST_IS_EXPLICIT_DISTRUST: u32 = 67108864u32; pub const CERT_TRUST_IS_FROM_EXCLUSIVE_TRUST_STORE: u32 = 8192u32; pub const CERT_TRUST_IS_KEY_ROLLOVER: u32 = 128u32; pub const CERT_TRUST_IS_NOT_SIGNATURE_VALID: u32 = 8u32; pub const CERT_TRUST_IS_NOT_TIME_NESTED: u32 = 2u32; pub const CERT_TRUST_IS_NOT_TIME_VALID: u32 = 1u32; pub const CERT_TRUST_IS_NOT_VALID_FOR_USAGE: u32 = 16u32; pub const CERT_TRUST_IS_OFFLINE_REVOCATION: u32 = 16777216u32; pub const CERT_TRUST_IS_PARTIAL_CHAIN: u32 = 65536u32; pub const CERT_TRUST_IS_PEER_TRUSTED: u32 = 2048u32; pub const CERT_TRUST_IS_REVOKED: u32 = 4u32; pub const CERT_TRUST_IS_SELF_SIGNED: u32 = 8u32; pub const CERT_TRUST_IS_UNTRUSTED_ROOT: u32 = 32u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_TRUST_LIST_INFO { pub cbSize: u32, pub pCtlEntry: *mut CTL_ENTRY, pub pCtlContext: *mut CTL_CONTEXT, } #[cfg(feature = "Win32_Foundation")] impl CERT_TRUST_LIST_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_TRUST_LIST_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_TRUST_LIST_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_TRUST_LIST_INFO").field("cbSize", &self.cbSize).field("pCtlEntry", &self.pCtlEntry).field("pCtlContext", &self.pCtlContext).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_TRUST_LIST_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pCtlEntry == other.pCtlEntry && self.pCtlContext == other.pCtlContext } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_TRUST_LIST_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_TRUST_LIST_INFO { type Abi = Self; } pub const CERT_TRUST_NO_ERROR: u32 = 0u32; pub const CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY: u32 = 33554432u32; pub const CERT_TRUST_NO_OCSP_FAILOVER_TO_CRL: u32 = 64u32; pub const CERT_TRUST_NO_TIME_CHECK: u32 = 33554432u32; pub const CERT_TRUST_PUB_ALLOW_END_USER_TRUST: u32 = 0u32; pub const CERT_TRUST_PUB_ALLOW_ENTERPRISE_ADMIN_TRUST: u32 = 2u32; pub const CERT_TRUST_PUB_ALLOW_MACHINE_ADMIN_TRUST: u32 = 1u32; pub const CERT_TRUST_PUB_ALLOW_TRUST_MASK: u32 = 3u32; pub const CERT_TRUST_PUB_CHECK_PUBLISHER_REV_FLAG: u32 = 256u32; pub const CERT_TRUST_PUB_CHECK_TIMESTAMP_REV_FLAG: u32 = 512u32; pub const CERT_TRUST_REVOCATION_STATUS_UNKNOWN: u32 = 64u32; pub const CERT_TRUST_SSL_HANDSHAKE_OCSP: u32 = 262144u32; pub const CERT_TRUST_SSL_RECONNECT_OCSP: u32 = 1048576u32; pub const CERT_TRUST_SSL_TIME_VALID: u32 = 16777216u32; pub const CERT_TRUST_SSL_TIME_VALID_OCSP: u32 = 524288u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_TRUST_STATUS { pub dwErrorStatus: u32, pub dwInfoStatus: u32, } impl CERT_TRUST_STATUS {} impl ::core::default::Default for CERT_TRUST_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_TRUST_STATUS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_TRUST_STATUS").field("dwErrorStatus", &self.dwErrorStatus).field("dwInfoStatus", &self.dwInfoStatus).finish() } } impl ::core::cmp::PartialEq for CERT_TRUST_STATUS { fn eq(&self, other: &Self) -> bool { self.dwErrorStatus == other.dwErrorStatus && self.dwInfoStatus == other.dwInfoStatus } } impl ::core::cmp::Eq for CERT_TRUST_STATUS {} unsafe impl ::windows::core::Abi for CERT_TRUST_STATUS { type Abi = Self; } pub const CERT_UNICODE_ATTR_ERR_INDEX_MASK: u32 = 63u32; pub const CERT_UNICODE_ATTR_ERR_INDEX_SHIFT: u32 = 16u32; pub const CERT_UNICODE_IS_RDN_ATTRS_FLAG: u32 = 1u32; pub const CERT_UNICODE_RDN_ERR_INDEX_MASK: u32 = 1023u32; pub const CERT_UNICODE_RDN_ERR_INDEX_SHIFT: u32 = 22u32; pub const CERT_UNICODE_VALUE_ERR_INDEX_MASK: u32 = 65535u32; pub const CERT_UNICODE_VALUE_ERR_INDEX_SHIFT: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CERT_USAGE_MATCH { pub dwType: u32, pub Usage: CTL_USAGE, } #[cfg(feature = "Win32_Foundation")] impl CERT_USAGE_MATCH {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CERT_USAGE_MATCH { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CERT_USAGE_MATCH { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_USAGE_MATCH").field("dwType", &self.dwType).field("Usage", &self.Usage).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CERT_USAGE_MATCH { fn eq(&self, other: &Self) -> bool { self.dwType == other.dwType && self.Usage == other.Usage } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CERT_USAGE_MATCH {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CERT_USAGE_MATCH { type Abi = Self; } pub const CERT_V1: u32 = 0u32; pub const CERT_V2: u32 = 1u32; pub const CERT_V3: u32 = 2u32; pub const CERT_VERIFY_ALLOW_MORE_USAGE_FLAG: u32 = 8u32; pub const CERT_VERIFY_CACHE_ONLY_BASED_REVOCATION: u32 = 2u32; pub const CERT_VERIFY_INHIBIT_CTL_UPDATE_FLAG: u32 = 1u32; pub const CERT_VERIFY_NO_TIME_CHECK_FLAG: u32 = 4u32; pub const CERT_VERIFY_REV_ACCUMULATIVE_TIMEOUT_FLAG: u32 = 4u32; pub const CERT_VERIFY_REV_CHAIN_FLAG: u32 = 1u32; pub const CERT_VERIFY_REV_NO_OCSP_FAILOVER_TO_CRL_FLAG: u32 = 16u32; pub const CERT_VERIFY_REV_SERVER_OCSP_FLAG: u32 = 8u32; pub const CERT_VERIFY_REV_SERVER_OCSP_WIRE_ONLY_FLAG: u32 = 32u32; pub const CERT_VERIFY_TRUSTED_SIGNERS_FLAG: u32 = 2u32; pub const CERT_VERIFY_UPDATED_CTL_FLAG: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_X942_DH_PARAMETERS { pub p: CRYPTOAPI_BLOB, pub g: CRYPTOAPI_BLOB, pub q: CRYPTOAPI_BLOB, pub j: CRYPTOAPI_BLOB, pub pValidationParams: *mut CERT_X942_DH_VALIDATION_PARAMS, } impl CERT_X942_DH_PARAMETERS {} impl ::core::default::Default for CERT_X942_DH_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_X942_DH_PARAMETERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_X942_DH_PARAMETERS").field("p", &self.p).field("g", &self.g).field("q", &self.q).field("j", &self.j).field("pValidationParams", &self.pValidationParams).finish() } } impl ::core::cmp::PartialEq for CERT_X942_DH_PARAMETERS { fn eq(&self, other: &Self) -> bool { self.p == other.p && self.g == other.g && self.q == other.q && self.j == other.j && self.pValidationParams == other.pValidationParams } } impl ::core::cmp::Eq for CERT_X942_DH_PARAMETERS {} unsafe impl ::windows::core::Abi for CERT_X942_DH_PARAMETERS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CERT_X942_DH_VALIDATION_PARAMS { pub seed: CRYPT_BIT_BLOB, pub pgenCounter: u32, } impl CERT_X942_DH_VALIDATION_PARAMS {} impl ::core::default::Default for CERT_X942_DH_VALIDATION_PARAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CERT_X942_DH_VALIDATION_PARAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CERT_X942_DH_VALIDATION_PARAMS").field("seed", &self.seed).field("pgenCounter", &self.pgenCounter).finish() } } impl ::core::cmp::PartialEq for CERT_X942_DH_VALIDATION_PARAMS { fn eq(&self, other: &Self) -> bool { self.seed == other.seed && self.pgenCounter == other.pgenCounter } } impl ::core::cmp::Eq for CERT_X942_DH_VALIDATION_PARAMS {} unsafe impl ::windows::core::Abi for CERT_X942_DH_VALIDATION_PARAMS { type Abi = Self; } pub const CERT_XML_NAME_STR: u32 = 4u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CESSetupProperty(pub i32); pub const ENUM_CESSETUPPROP_USE_IISAPPPOOLIDENTITY: CESSetupProperty = CESSetupProperty(0i32); pub const ENUM_CESSETUPPROP_CACONFIG: CESSetupProperty = CESSetupProperty(1i32); pub const ENUM_CESSETUPPROP_AUTHENTICATION: CESSetupProperty = CESSetupProperty(2i32); pub const ENUM_CESSETUPPROP_SSLCERTHASH: CESSetupProperty = CESSetupProperty(3i32); pub const ENUM_CESSETUPPROP_URL: CESSetupProperty = CESSetupProperty(4i32); pub const ENUM_CESSETUPPROP_RENEWALONLY: CESSetupProperty = CESSetupProperty(5i32); pub const ENUM_CESSETUPPROP_ALLOW_KEYBASED_RENEWAL: CESSetupProperty = CESSetupProperty(6i32); impl ::core::convert::From<i32> for CESSetupProperty { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CESSetupProperty { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CLAIMLIST { pub count: u32, pub claims: *mut super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CLAIMLIST {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CLAIMLIST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CLAIMLIST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CLAIMLIST").field("count", &self.count).field("claims", &self.claims).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CLAIMLIST { fn eq(&self, other: &Self) -> bool { self.count == other.count && self.claims == other.claims } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CLAIMLIST {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CLAIMLIST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMC_ADD_ATTRIBUTES_INFO { pub dwCmcDataReference: u32, pub cCertReference: u32, pub rgdwCertReference: *mut u32, pub cAttribute: u32, pub rgAttribute: *mut CRYPT_ATTRIBUTE, } #[cfg(feature = "Win32_Foundation")] impl CMC_ADD_ATTRIBUTES_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMC_ADD_ATTRIBUTES_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMC_ADD_ATTRIBUTES_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMC_ADD_ATTRIBUTES_INFO").field("dwCmcDataReference", &self.dwCmcDataReference).field("cCertReference", &self.cCertReference).field("rgdwCertReference", &self.rgdwCertReference).field("cAttribute", &self.cAttribute).field("rgAttribute", &self.rgAttribute).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMC_ADD_ATTRIBUTES_INFO { fn eq(&self, other: &Self) -> bool { self.dwCmcDataReference == other.dwCmcDataReference && self.cCertReference == other.cCertReference && self.rgdwCertReference == other.rgdwCertReference && self.cAttribute == other.cAttribute && self.rgAttribute == other.rgAttribute } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMC_ADD_ATTRIBUTES_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMC_ADD_ATTRIBUTES_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMC_ADD_EXTENSIONS_INFO { pub dwCmcDataReference: u32, pub cCertReference: u32, pub rgdwCertReference: *mut u32, pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl CMC_ADD_EXTENSIONS_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMC_ADD_EXTENSIONS_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMC_ADD_EXTENSIONS_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMC_ADD_EXTENSIONS_INFO").field("dwCmcDataReference", &self.dwCmcDataReference).field("cCertReference", &self.cCertReference).field("rgdwCertReference", &self.rgdwCertReference).field("cExtension", &self.cExtension).field("rgExtension", &self.rgExtension).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMC_ADD_EXTENSIONS_INFO { fn eq(&self, other: &Self) -> bool { self.dwCmcDataReference == other.dwCmcDataReference && self.cCertReference == other.cCertReference && self.rgdwCertReference == other.rgdwCertReference && self.cExtension == other.cExtension && self.rgExtension == other.rgExtension } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMC_ADD_EXTENSIONS_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMC_ADD_EXTENSIONS_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMC_DATA_INFO { pub cTaggedAttribute: u32, pub rgTaggedAttribute: *mut CMC_TAGGED_ATTRIBUTE, pub cTaggedRequest: u32, pub rgTaggedRequest: *mut CMC_TAGGED_REQUEST, pub cTaggedContentInfo: u32, pub rgTaggedContentInfo: *mut CMC_TAGGED_CONTENT_INFO, pub cTaggedOtherMsg: u32, pub rgTaggedOtherMsg: *mut CMC_TAGGED_OTHER_MSG, } #[cfg(feature = "Win32_Foundation")] impl CMC_DATA_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMC_DATA_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMC_DATA_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMC_DATA_INFO") .field("cTaggedAttribute", &self.cTaggedAttribute) .field("rgTaggedAttribute", &self.rgTaggedAttribute) .field("cTaggedRequest", &self.cTaggedRequest) .field("rgTaggedRequest", &self.rgTaggedRequest) .field("cTaggedContentInfo", &self.cTaggedContentInfo) .field("rgTaggedContentInfo", &self.rgTaggedContentInfo) .field("cTaggedOtherMsg", &self.cTaggedOtherMsg) .field("rgTaggedOtherMsg", &self.rgTaggedOtherMsg) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMC_DATA_INFO { fn eq(&self, other: &Self) -> bool { self.cTaggedAttribute == other.cTaggedAttribute && self.rgTaggedAttribute == other.rgTaggedAttribute && self.cTaggedRequest == other.cTaggedRequest && self.rgTaggedRequest == other.rgTaggedRequest && self.cTaggedContentInfo == other.cTaggedContentInfo && self.rgTaggedContentInfo == other.rgTaggedContentInfo && self.cTaggedOtherMsg == other.cTaggedOtherMsg && self.rgTaggedOtherMsg == other.rgTaggedOtherMsg } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMC_DATA_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMC_DATA_INFO { type Abi = Self; } pub const CMC_FAIL_BAD_ALG: u32 = 0u32; pub const CMC_FAIL_BAD_CERT_ID: u32 = 4u32; pub const CMC_FAIL_BAD_IDENTITY: u32 = 7u32; pub const CMC_FAIL_BAD_MESSAGE_CHECK: u32 = 1u32; pub const CMC_FAIL_BAD_REQUEST: u32 = 2u32; pub const CMC_FAIL_BAD_TIME: u32 = 3u32; pub const CMC_FAIL_INTERNAL_CA_ERROR: u32 = 11u32; pub const CMC_FAIL_MUST_ARCHIVE_KEYS: u32 = 6u32; pub const CMC_FAIL_NO_KEY_REUSE: u32 = 10u32; pub const CMC_FAIL_POP_FAILED: u32 = 9u32; pub const CMC_FAIL_POP_REQUIRED: u32 = 8u32; pub const CMC_FAIL_TRY_LATER: u32 = 12u32; pub const CMC_FAIL_UNSUPORTED_EXT: u32 = 5u32; pub const CMC_OTHER_INFO_FAIL_CHOICE: u32 = 1u32; pub const CMC_OTHER_INFO_NO_CHOICE: u32 = 0u32; pub const CMC_OTHER_INFO_PEND_CHOICE: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMC_PEND_INFO { pub PendToken: CRYPTOAPI_BLOB, pub PendTime: super::super::Foundation::FILETIME, } #[cfg(feature = "Win32_Foundation")] impl CMC_PEND_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMC_PEND_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMC_PEND_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMC_PEND_INFO").field("PendToken", &self.PendToken).field("PendTime", &self.PendTime).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMC_PEND_INFO { fn eq(&self, other: &Self) -> bool { self.PendToken == other.PendToken && self.PendTime == other.PendTime } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMC_PEND_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMC_PEND_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMC_RESPONSE_INFO { pub cTaggedAttribute: u32, pub rgTaggedAttribute: *mut CMC_TAGGED_ATTRIBUTE, pub cTaggedContentInfo: u32, pub rgTaggedContentInfo: *mut CMC_TAGGED_CONTENT_INFO, pub cTaggedOtherMsg: u32, pub rgTaggedOtherMsg: *mut CMC_TAGGED_OTHER_MSG, } #[cfg(feature = "Win32_Foundation")] impl CMC_RESPONSE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMC_RESPONSE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMC_RESPONSE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMC_RESPONSE_INFO") .field("cTaggedAttribute", &self.cTaggedAttribute) .field("rgTaggedAttribute", &self.rgTaggedAttribute) .field("cTaggedContentInfo", &self.cTaggedContentInfo) .field("rgTaggedContentInfo", &self.rgTaggedContentInfo) .field("cTaggedOtherMsg", &self.cTaggedOtherMsg) .field("rgTaggedOtherMsg", &self.rgTaggedOtherMsg) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMC_RESPONSE_INFO { fn eq(&self, other: &Self) -> bool { self.cTaggedAttribute == other.cTaggedAttribute && self.rgTaggedAttribute == other.rgTaggedAttribute && self.cTaggedContentInfo == other.cTaggedContentInfo && self.rgTaggedContentInfo == other.rgTaggedContentInfo && self.cTaggedOtherMsg == other.cTaggedOtherMsg && self.rgTaggedOtherMsg == other.rgTaggedOtherMsg } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMC_RESPONSE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMC_RESPONSE_INFO { type Abi = Self; } pub const CMC_STATUS_CONFIRM_REQUIRED: u32 = 5u32; pub const CMC_STATUS_FAILED: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMC_STATUS_INFO { pub dwStatus: u32, pub cBodyList: u32, pub rgdwBodyList: *mut u32, pub pwszStatusString: super::super::Foundation::PWSTR, pub dwOtherInfoChoice: u32, pub Anonymous: CMC_STATUS_INFO_0, } #[cfg(feature = "Win32_Foundation")] impl CMC_STATUS_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMC_STATUS_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMC_STATUS_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMC_STATUS_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMC_STATUS_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CMC_STATUS_INFO_0 { pub dwFailInfo: u32, pub pPendInfo: *mut CMC_PEND_INFO, } #[cfg(feature = "Win32_Foundation")] impl CMC_STATUS_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMC_STATUS_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMC_STATUS_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMC_STATUS_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMC_STATUS_INFO_0 { type Abi = Self; } pub const CMC_STATUS_NO_SUPPORT: u32 = 4u32; pub const CMC_STATUS_PENDING: u32 = 3u32; pub const CMC_STATUS_SUCCESS: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMC_TAGGED_ATTRIBUTE { pub dwBodyPartID: u32, pub Attribute: CRYPT_ATTRIBUTE, } #[cfg(feature = "Win32_Foundation")] impl CMC_TAGGED_ATTRIBUTE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMC_TAGGED_ATTRIBUTE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMC_TAGGED_ATTRIBUTE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMC_TAGGED_ATTRIBUTE").field("dwBodyPartID", &self.dwBodyPartID).field("Attribute", &self.Attribute).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMC_TAGGED_ATTRIBUTE { fn eq(&self, other: &Self) -> bool { self.dwBodyPartID == other.dwBodyPartID && self.Attribute == other.Attribute } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMC_TAGGED_ATTRIBUTE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMC_TAGGED_ATTRIBUTE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CMC_TAGGED_CERT_REQUEST { pub dwBodyPartID: u32, pub SignedCertRequest: CRYPTOAPI_BLOB, } impl CMC_TAGGED_CERT_REQUEST {} impl ::core::default::Default for CMC_TAGGED_CERT_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CMC_TAGGED_CERT_REQUEST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMC_TAGGED_CERT_REQUEST").field("dwBodyPartID", &self.dwBodyPartID).field("SignedCertRequest", &self.SignedCertRequest).finish() } } impl ::core::cmp::PartialEq for CMC_TAGGED_CERT_REQUEST { fn eq(&self, other: &Self) -> bool { self.dwBodyPartID == other.dwBodyPartID && self.SignedCertRequest == other.SignedCertRequest } } impl ::core::cmp::Eq for CMC_TAGGED_CERT_REQUEST {} unsafe impl ::windows::core::Abi for CMC_TAGGED_CERT_REQUEST { type Abi = Self; } pub const CMC_TAGGED_CERT_REQUEST_CHOICE: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CMC_TAGGED_CONTENT_INFO { pub dwBodyPartID: u32, pub EncodedContentInfo: CRYPTOAPI_BLOB, } impl CMC_TAGGED_CONTENT_INFO {} impl ::core::default::Default for CMC_TAGGED_CONTENT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CMC_TAGGED_CONTENT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMC_TAGGED_CONTENT_INFO").field("dwBodyPartID", &self.dwBodyPartID).field("EncodedContentInfo", &self.EncodedContentInfo).finish() } } impl ::core::cmp::PartialEq for CMC_TAGGED_CONTENT_INFO { fn eq(&self, other: &Self) -> bool { self.dwBodyPartID == other.dwBodyPartID && self.EncodedContentInfo == other.EncodedContentInfo } } impl ::core::cmp::Eq for CMC_TAGGED_CONTENT_INFO {} unsafe impl ::windows::core::Abi for CMC_TAGGED_CONTENT_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMC_TAGGED_OTHER_MSG { pub dwBodyPartID: u32, pub pszObjId: super::super::Foundation::PSTR, pub Value: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CMC_TAGGED_OTHER_MSG {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMC_TAGGED_OTHER_MSG { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMC_TAGGED_OTHER_MSG { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMC_TAGGED_OTHER_MSG").field("dwBodyPartID", &self.dwBodyPartID).field("pszObjId", &self.pszObjId).field("Value", &self.Value).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMC_TAGGED_OTHER_MSG { fn eq(&self, other: &Self) -> bool { self.dwBodyPartID == other.dwBodyPartID && self.pszObjId == other.pszObjId && self.Value == other.Value } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMC_TAGGED_OTHER_MSG {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMC_TAGGED_OTHER_MSG { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CMC_TAGGED_REQUEST { pub dwTaggedRequestChoice: u32, pub Anonymous: CMC_TAGGED_REQUEST_0, } impl CMC_TAGGED_REQUEST {} impl ::core::default::Default for CMC_TAGGED_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for CMC_TAGGED_REQUEST { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for CMC_TAGGED_REQUEST {} unsafe impl ::windows::core::Abi for CMC_TAGGED_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union CMC_TAGGED_REQUEST_0 { pub pTaggedCertRequest: *mut CMC_TAGGED_CERT_REQUEST, } impl CMC_TAGGED_REQUEST_0 {} impl ::core::default::Default for CMC_TAGGED_REQUEST_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for CMC_TAGGED_REQUEST_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for CMC_TAGGED_REQUEST_0 {} unsafe impl ::windows::core::Abi for CMC_TAGGED_REQUEST_0 { type Abi = Self; } pub const CMSCEPSetup: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xaa4f5c02_8e7c_49c4_94fa_67a5cc5eadb4); pub const CMSG_ATTR_CERT_COUNT_PARAM: u32 = 31u32; pub const CMSG_ATTR_CERT_PARAM: u32 = 32u32; pub const CMSG_AUTHENTICATED_ATTRIBUTES_FLAG: u32 = 8u32; pub const CMSG_BARE_CONTENT_FLAG: u32 = 1u32; pub const CMSG_BARE_CONTENT_PARAM: u32 = 3u32; pub const CMSG_CERT_COUNT_PARAM: u32 = 11u32; pub const CMSG_CERT_PARAM: u32 = 12u32; pub const CMSG_CMS_ENCAPSULATED_CONTENT_FLAG: u32 = 64u32; pub const CMSG_CMS_ENCAPSULATED_CTL_FLAG: u32 = 32768u32; pub const CMSG_CMS_RECIPIENT_COUNT_PARAM: u32 = 33u32; pub const CMSG_CMS_RECIPIENT_ENCRYPTED_KEY_INDEX_PARAM: u32 = 35u32; pub const CMSG_CMS_RECIPIENT_INDEX_PARAM: u32 = 34u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_CMS_RECIPIENT_INFO { pub dwRecipientChoice: u32, pub Anonymous: CMSG_CMS_RECIPIENT_INFO_0, } #[cfg(feature = "Win32_Foundation")] impl CMSG_CMS_RECIPIENT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_CMS_RECIPIENT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_CMS_RECIPIENT_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_CMS_RECIPIENT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_CMS_RECIPIENT_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CMSG_CMS_RECIPIENT_INFO_0 { pub pKeyTrans: *mut CMSG_KEY_TRANS_RECIPIENT_INFO, pub pKeyAgree: *mut CMSG_KEY_AGREE_RECIPIENT_INFO, pub pMailList: *mut CMSG_MAIL_LIST_RECIPIENT_INFO, } #[cfg(feature = "Win32_Foundation")] impl CMSG_CMS_RECIPIENT_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_CMS_RECIPIENT_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_CMS_RECIPIENT_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_CMS_RECIPIENT_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_CMS_RECIPIENT_INFO_0 { type Abi = Self; } pub const CMSG_CMS_RECIPIENT_INFO_PARAM: u32 = 36u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_CMS_SIGNER_INFO { pub dwVersion: u32, pub SignerId: CERT_ID, pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub HashEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub EncryptedHash: CRYPTOAPI_BLOB, pub AuthAttrs: CRYPT_ATTRIBUTES, pub UnauthAttrs: CRYPT_ATTRIBUTES, } #[cfg(feature = "Win32_Foundation")] impl CMSG_CMS_SIGNER_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_CMS_SIGNER_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_CMS_SIGNER_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_CMS_SIGNER_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_CMS_SIGNER_INFO { type Abi = Self; } pub const CMSG_CMS_SIGNER_INFO_PARAM: u32 = 39u32; #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_CNG_CONTENT_DECRYPT_INFO { pub cbSize: u32, pub ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pfnAlloc: ::core::option::Option<PFN_CMSG_ALLOC>, pub pfnFree: ::core::option::Option<PFN_CMSG_FREE>, pub hNCryptKey: usize, pub pbContentEncryptKey: *mut u8, pub cbContentEncryptKey: u32, pub hCNGContentEncryptKey: BCRYPT_KEY_HANDLE, pub pbCNGContentEncryptKeyObject: *mut u8, } #[cfg(feature = "Win32_Foundation")] impl CMSG_CNG_CONTENT_DECRYPT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_CNG_CONTENT_DECRYPT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMSG_CNG_CONTENT_DECRYPT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_CNG_CONTENT_DECRYPT_INFO") .field("cbSize", &self.cbSize) .field("ContentEncryptionAlgorithm", &self.ContentEncryptionAlgorithm) .field("hNCryptKey", &self.hNCryptKey) .field("pbContentEncryptKey", &self.pbContentEncryptKey) .field("cbContentEncryptKey", &self.cbContentEncryptKey) .field("hCNGContentEncryptKey", &self.hCNGContentEncryptKey) .field("pbCNGContentEncryptKeyObject", &self.pbCNGContentEncryptKeyObject) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_CNG_CONTENT_DECRYPT_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.ContentEncryptionAlgorithm == other.ContentEncryptionAlgorithm && self.pfnAlloc.map(|f| f as usize) == other.pfnAlloc.map(|f| f as usize) && self.pfnFree.map(|f| f as usize) == other.pfnFree.map(|f| f as usize) && self.hNCryptKey == other.hNCryptKey && self.pbContentEncryptKey == other.pbContentEncryptKey && self.cbContentEncryptKey == other.cbContentEncryptKey && self.hCNGContentEncryptKey == other.hCNGContentEncryptKey && self.pbCNGContentEncryptKeyObject == other.pbCNGContentEncryptKeyObject } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_CNG_CONTENT_DECRYPT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_CNG_CONTENT_DECRYPT_INFO { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const CMSG_COMPUTED_HASH_PARAM: u32 = 22u32; pub const CMSG_CONTENTS_OCTETS_FLAG: u32 = 16u32; pub const CMSG_CONTENT_ENCRYPT_FREE_OBJID_FLAG: u32 = 2u32; pub const CMSG_CONTENT_ENCRYPT_FREE_PARA_FLAG: u32 = 1u32; #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for CMSG_CONTENT_ENCRYPT_INFO { fn clone(&self) -> Self { unimplemented!() } } #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_CONTENT_ENCRYPT_INFO { pub cbSize: u32, pub hCryptProv: usize, pub ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvEncryptionAuxInfo: *mut ::core::ffi::c_void, pub cRecipients: u32, pub rgCmsRecipients: *mut CMSG_RECIPIENT_ENCODE_INFO, pub pfnAlloc: ::core::option::Option<PFN_CMSG_ALLOC>, pub pfnFree: ::core::option::Option<PFN_CMSG_FREE>, pub dwEncryptFlags: u32, pub Anonymous: CMSG_CONTENT_ENCRYPT_INFO_0, pub dwFlags: u32, pub fCNG: super::super::Foundation::BOOL, pub pbCNGContentEncryptKeyObject: *mut u8, pub pbContentEncryptKey: *mut u8, pub cbContentEncryptKey: u32, } #[cfg(feature = "Win32_Foundation")] impl CMSG_CONTENT_ENCRYPT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_CONTENT_ENCRYPT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_CONTENT_ENCRYPT_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_CONTENT_ENCRYPT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_CONTENT_ENCRYPT_INFO { type Abi = ::core::mem::ManuallyDrop<Self>; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CMSG_CONTENT_ENCRYPT_INFO_0 { pub hContentEncryptKey: usize, pub hCNGContentEncryptKey: BCRYPT_KEY_HANDLE, } #[cfg(feature = "Win32_Foundation")] impl CMSG_CONTENT_ENCRYPT_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_CONTENT_ENCRYPT_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_CONTENT_ENCRYPT_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_CONTENT_ENCRYPT_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_CONTENT_ENCRYPT_INFO_0 { type Abi = Self; } pub const CMSG_CONTENT_ENCRYPT_PAD_ENCODED_LEN_FLAG: u32 = 1u32; pub const CMSG_CONTENT_ENCRYPT_RELEASE_CONTEXT_FLAG: u32 = 32768u32; pub const CMSG_CONTENT_PARAM: u32 = 2u32; pub const CMSG_CRL_COUNT_PARAM: u32 = 13u32; pub const CMSG_CRL_PARAM: u32 = 14u32; pub const CMSG_CRYPT_RELEASE_CONTEXT_FLAG: u32 = 32768u32; pub const CMSG_CTRL_ADD_ATTR_CERT: u32 = 14u32; pub const CMSG_CTRL_ADD_CERT: u32 = 10u32; pub const CMSG_CTRL_ADD_CMS_SIGNER_INFO: u32 = 20u32; pub const CMSG_CTRL_ADD_CRL: u32 = 12u32; pub const CMSG_CTRL_ADD_SIGNER: u32 = 6u32; pub const CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA { pub cbSize: u32, pub dwSignerIndex: u32, pub blob: CRYPTOAPI_BLOB, } impl CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA {} impl ::core::default::Default for CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA").field("cbSize", &self.cbSize).field("dwSignerIndex", &self.dwSignerIndex).field("blob", &self.blob).finish() } } impl ::core::cmp::PartialEq for CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwSignerIndex == other.dwSignerIndex && self.blob == other.blob } } impl ::core::cmp::Eq for CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA {} unsafe impl ::windows::core::Abi for CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR_PARA { type Abi = Self; } pub const CMSG_CTRL_DECRYPT: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CMSG_CTRL_DECRYPT_PARA { pub cbSize: u32, pub Anonymous: CMSG_CTRL_DECRYPT_PARA_0, pub dwKeySpec: u32, pub dwRecipientIndex: u32, } impl CMSG_CTRL_DECRYPT_PARA {} impl ::core::default::Default for CMSG_CTRL_DECRYPT_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for CMSG_CTRL_DECRYPT_PARA { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for CMSG_CTRL_DECRYPT_PARA {} unsafe impl ::windows::core::Abi for CMSG_CTRL_DECRYPT_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union CMSG_CTRL_DECRYPT_PARA_0 { pub hCryptProv: usize, pub hNCryptKey: usize, } impl CMSG_CTRL_DECRYPT_PARA_0 {} impl ::core::default::Default for CMSG_CTRL_DECRYPT_PARA_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for CMSG_CTRL_DECRYPT_PARA_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for CMSG_CTRL_DECRYPT_PARA_0 {} unsafe impl ::windows::core::Abi for CMSG_CTRL_DECRYPT_PARA_0 { type Abi = Self; } pub const CMSG_CTRL_DEL_ATTR_CERT: u32 = 15u32; pub const CMSG_CTRL_DEL_CERT: u32 = 11u32; pub const CMSG_CTRL_DEL_CRL: u32 = 13u32; pub const CMSG_CTRL_DEL_SIGNER: u32 = 7u32; pub const CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR: u32 = 9u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA { pub cbSize: u32, pub dwSignerIndex: u32, pub dwUnauthAttrIndex: u32, } impl CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA {} impl ::core::default::Default for CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA").field("cbSize", &self.cbSize).field("dwSignerIndex", &self.dwSignerIndex).field("dwUnauthAttrIndex", &self.dwUnauthAttrIndex).finish() } } impl ::core::cmp::PartialEq for CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwSignerIndex == other.dwSignerIndex && self.dwUnauthAttrIndex == other.dwUnauthAttrIndex } } impl ::core::cmp::Eq for CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA {} unsafe impl ::windows::core::Abi for CMSG_CTRL_DEL_SIGNER_UNAUTH_ATTR_PARA { type Abi = Self; } pub const CMSG_CTRL_ENABLE_STRONG_SIGNATURE: u32 = 21u32; pub const CMSG_CTRL_KEY_AGREE_DECRYPT: u32 = 17u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_CTRL_KEY_AGREE_DECRYPT_PARA { pub cbSize: u32, pub Anonymous: CMSG_CTRL_KEY_AGREE_DECRYPT_PARA_0, pub dwKeySpec: u32, pub pKeyAgree: *mut CMSG_KEY_AGREE_RECIPIENT_INFO, pub dwRecipientIndex: u32, pub dwRecipientEncryptedKeyIndex: u32, pub OriginatorPublicKey: CRYPT_BIT_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CMSG_CTRL_KEY_AGREE_DECRYPT_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_CTRL_KEY_AGREE_DECRYPT_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_CTRL_KEY_AGREE_DECRYPT_PARA { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_CTRL_KEY_AGREE_DECRYPT_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_CTRL_KEY_AGREE_DECRYPT_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CMSG_CTRL_KEY_AGREE_DECRYPT_PARA_0 { pub hCryptProv: usize, pub hNCryptKey: usize, } #[cfg(feature = "Win32_Foundation")] impl CMSG_CTRL_KEY_AGREE_DECRYPT_PARA_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_CTRL_KEY_AGREE_DECRYPT_PARA_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_CTRL_KEY_AGREE_DECRYPT_PARA_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_CTRL_KEY_AGREE_DECRYPT_PARA_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_CTRL_KEY_AGREE_DECRYPT_PARA_0 { type Abi = Self; } pub const CMSG_CTRL_KEY_TRANS_DECRYPT: u32 = 16u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_CTRL_KEY_TRANS_DECRYPT_PARA { pub cbSize: u32, pub Anonymous: CMSG_CTRL_KEY_TRANS_DECRYPT_PARA_0, pub dwKeySpec: u32, pub pKeyTrans: *mut CMSG_KEY_TRANS_RECIPIENT_INFO, pub dwRecipientIndex: u32, } #[cfg(feature = "Win32_Foundation")] impl CMSG_CTRL_KEY_TRANS_DECRYPT_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_CTRL_KEY_TRANS_DECRYPT_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_CTRL_KEY_TRANS_DECRYPT_PARA { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_CTRL_KEY_TRANS_DECRYPT_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_CTRL_KEY_TRANS_DECRYPT_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CMSG_CTRL_KEY_TRANS_DECRYPT_PARA_0 { pub hCryptProv: usize, pub hNCryptKey: usize, } #[cfg(feature = "Win32_Foundation")] impl CMSG_CTRL_KEY_TRANS_DECRYPT_PARA_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_CTRL_KEY_TRANS_DECRYPT_PARA_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_CTRL_KEY_TRANS_DECRYPT_PARA_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_CTRL_KEY_TRANS_DECRYPT_PARA_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_CTRL_KEY_TRANS_DECRYPT_PARA_0 { type Abi = Self; } pub const CMSG_CTRL_MAIL_LIST_DECRYPT: u32 = 18u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_CTRL_MAIL_LIST_DECRYPT_PARA { pub cbSize: u32, pub hCryptProv: usize, pub pMailList: *mut CMSG_MAIL_LIST_RECIPIENT_INFO, pub dwRecipientIndex: u32, pub dwKeyChoice: u32, pub Anonymous: CMSG_CTRL_MAIL_LIST_DECRYPT_PARA_0, } #[cfg(feature = "Win32_Foundation")] impl CMSG_CTRL_MAIL_LIST_DECRYPT_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_CTRL_MAIL_LIST_DECRYPT_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_CTRL_MAIL_LIST_DECRYPT_PARA { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_CTRL_MAIL_LIST_DECRYPT_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_CTRL_MAIL_LIST_DECRYPT_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CMSG_CTRL_MAIL_LIST_DECRYPT_PARA_0 { pub hKeyEncryptionKey: usize, pub pvKeyEncryptionKey: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CMSG_CTRL_MAIL_LIST_DECRYPT_PARA_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_CTRL_MAIL_LIST_DECRYPT_PARA_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_CTRL_MAIL_LIST_DECRYPT_PARA_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_CTRL_MAIL_LIST_DECRYPT_PARA_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_CTRL_MAIL_LIST_DECRYPT_PARA_0 { type Abi = Self; } pub const CMSG_CTRL_VERIFY_HASH: u32 = 5u32; pub const CMSG_CTRL_VERIFY_SIGNATURE: u32 = 1u32; pub const CMSG_CTRL_VERIFY_SIGNATURE_EX: u32 = 19u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA { pub cbSize: u32, pub hCryptProv: usize, pub dwSignerIndex: u32, pub dwSignerType: u32, pub pvSigner: *mut ::core::ffi::c_void, } impl CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA {} impl ::core::default::Default for CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA").field("cbSize", &self.cbSize).field("hCryptProv", &self.hCryptProv).field("dwSignerIndex", &self.dwSignerIndex).field("dwSignerType", &self.dwSignerType).field("pvSigner", &self.pvSigner).finish() } } impl ::core::cmp::PartialEq for CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.hCryptProv == other.hCryptProv && self.dwSignerIndex == other.dwSignerIndex && self.dwSignerType == other.dwSignerType && self.pvSigner == other.pvSigner } } impl ::core::cmp::Eq for CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA {} unsafe impl ::windows::core::Abi for CMSG_CTRL_VERIFY_SIGNATURE_EX_PARA { type Abi = Self; } pub const CMSG_DETACHED_FLAG: u32 = 4u32; pub const CMSG_ENCODED_MESSAGE: u32 = 29u32; pub const CMSG_ENCODED_SIGNER: u32 = 28u32; pub const CMSG_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG: u32 = 2u32; pub const CMSG_ENCODE_SORTED_CTL_FLAG: u32 = 1u32; pub const CMSG_ENCODING_TYPE_MASK: u32 = 4294901760u32; pub const CMSG_ENCRYPTED: u32 = 6u32; pub const CMSG_ENCRYPTED_DIGEST: u32 = 27u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_ENCRYPTED_ENCODE_INFO { pub cbSize: u32, pub ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvEncryptionAuxInfo: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CMSG_ENCRYPTED_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_ENCRYPTED_ENCODE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMSG_ENCRYPTED_ENCODE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_ENCRYPTED_ENCODE_INFO").field("cbSize", &self.cbSize).field("ContentEncryptionAlgorithm", &self.ContentEncryptionAlgorithm).field("pvEncryptionAuxInfo", &self.pvEncryptionAuxInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_ENCRYPTED_ENCODE_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.ContentEncryptionAlgorithm == other.ContentEncryptionAlgorithm && self.pvEncryptionAuxInfo == other.pvEncryptionAuxInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_ENCRYPTED_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_ENCRYPTED_ENCODE_INFO { type Abi = Self; } pub const CMSG_ENCRYPT_PARAM: u32 = 26u32; pub const CMSG_ENVELOPED_DATA_CMS_VERSION: u32 = 2u32; pub const CMSG_ENVELOPED_DATA_PKCS_1_5_VERSION: u32 = 0u32; pub const CMSG_ENVELOPED_DATA_V0: u32 = 0u32; pub const CMSG_ENVELOPED_DATA_V2: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_ENVELOPED_ENCODE_INFO { pub cbSize: u32, pub hCryptProv: usize, pub ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvEncryptionAuxInfo: *mut ::core::ffi::c_void, pub cRecipients: u32, pub rgpRecipients: *mut *mut CERT_INFO, } #[cfg(feature = "Win32_Foundation")] impl CMSG_ENVELOPED_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_ENVELOPED_ENCODE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMSG_ENVELOPED_ENCODE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_ENVELOPED_ENCODE_INFO") .field("cbSize", &self.cbSize) .field("hCryptProv", &self.hCryptProv) .field("ContentEncryptionAlgorithm", &self.ContentEncryptionAlgorithm) .field("pvEncryptionAuxInfo", &self.pvEncryptionAuxInfo) .field("cRecipients", &self.cRecipients) .field("rgpRecipients", &self.rgpRecipients) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_ENVELOPED_ENCODE_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.hCryptProv == other.hCryptProv && self.ContentEncryptionAlgorithm == other.ContentEncryptionAlgorithm && self.pvEncryptionAuxInfo == other.pvEncryptionAuxInfo && self.cRecipients == other.cRecipients && self.rgpRecipients == other.rgpRecipients } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_ENVELOPED_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_ENVELOPED_ENCODE_INFO { type Abi = Self; } pub const CMSG_ENVELOPED_RECIPIENT_V0: u32 = 0u32; pub const CMSG_ENVELOPED_RECIPIENT_V2: u32 = 2u32; pub const CMSG_ENVELOPED_RECIPIENT_V3: u32 = 3u32; pub const CMSG_ENVELOPED_RECIPIENT_V4: u32 = 4u32; pub const CMSG_ENVELOPE_ALGORITHM_PARAM: u32 = 15u32; pub const CMSG_HASHED_DATA_CMS_VERSION: u32 = 2u32; pub const CMSG_HASHED_DATA_PKCS_1_5_VERSION: u32 = 0u32; pub const CMSG_HASHED_DATA_V0: u32 = 0u32; pub const CMSG_HASHED_DATA_V2: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_HASHED_ENCODE_INFO { pub cbSize: u32, pub hCryptProv: usize, pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvHashAuxInfo: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CMSG_HASHED_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_HASHED_ENCODE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMSG_HASHED_ENCODE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_HASHED_ENCODE_INFO").field("cbSize", &self.cbSize).field("hCryptProv", &self.hCryptProv).field("HashAlgorithm", &self.HashAlgorithm).field("pvHashAuxInfo", &self.pvHashAuxInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_HASHED_ENCODE_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.hCryptProv == other.hCryptProv && self.HashAlgorithm == other.HashAlgorithm && self.pvHashAuxInfo == other.pvHashAuxInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_HASHED_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_HASHED_ENCODE_INFO { type Abi = Self; } pub const CMSG_HASH_ALGORITHM_PARAM: u32 = 20u32; pub const CMSG_HASH_DATA_PARAM: u32 = 21u32; pub const CMSG_INDEFINITE_LENGTH: u32 = 4294967295u32; pub const CMSG_INNER_CONTENT_TYPE_PARAM: u32 = 4u32; pub const CMSG_KEY_AGREE_ENCRYPT_FREE_MATERIAL_FLAG: u32 = 2u32; pub const CMSG_KEY_AGREE_ENCRYPT_FREE_OBJID_FLAG: u32 = 32u32; pub const CMSG_KEY_AGREE_ENCRYPT_FREE_PARA_FLAG: u32 = 1u32; pub const CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_ALG_FLAG: u32 = 4u32; pub const CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_BITS_FLAG: u32 = 16u32; pub const CMSG_KEY_AGREE_ENCRYPT_FREE_PUBKEY_PARA_FLAG: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_KEY_AGREE_ENCRYPT_INFO { pub cbSize: u32, pub dwRecipientIndex: u32, pub KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub UserKeyingMaterial: CRYPTOAPI_BLOB, pub dwOriginatorChoice: CMSG_KEY_AGREE_ORIGINATOR, pub Anonymous: CMSG_KEY_AGREE_ENCRYPT_INFO_0, pub cKeyAgreeKeyEncryptInfo: u32, pub rgpKeyAgreeKeyEncryptInfo: *mut *mut CMSG_KEY_AGREE_KEY_ENCRYPT_INFO, pub dwFlags: u32, } #[cfg(feature = "Win32_Foundation")] impl CMSG_KEY_AGREE_ENCRYPT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_KEY_AGREE_ENCRYPT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_KEY_AGREE_ENCRYPT_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_KEY_AGREE_ENCRYPT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_KEY_AGREE_ENCRYPT_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CMSG_KEY_AGREE_ENCRYPT_INFO_0 { pub OriginatorCertId: CERT_ID, pub OriginatorPublicKeyInfo: CERT_PUBLIC_KEY_INFO, } #[cfg(feature = "Win32_Foundation")] impl CMSG_KEY_AGREE_ENCRYPT_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_KEY_AGREE_ENCRYPT_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_KEY_AGREE_ENCRYPT_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_KEY_AGREE_ENCRYPT_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_KEY_AGREE_ENCRYPT_INFO_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CMSG_KEY_AGREE_KEY_ENCRYPT_INFO { pub cbSize: u32, pub EncryptedKey: CRYPTOAPI_BLOB, } impl CMSG_KEY_AGREE_KEY_ENCRYPT_INFO {} impl ::core::default::Default for CMSG_KEY_AGREE_KEY_ENCRYPT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CMSG_KEY_AGREE_KEY_ENCRYPT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_KEY_AGREE_KEY_ENCRYPT_INFO").field("cbSize", &self.cbSize).field("EncryptedKey", &self.EncryptedKey).finish() } } impl ::core::cmp::PartialEq for CMSG_KEY_AGREE_KEY_ENCRYPT_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.EncryptedKey == other.EncryptedKey } } impl ::core::cmp::Eq for CMSG_KEY_AGREE_KEY_ENCRYPT_INFO {} unsafe impl ::windows::core::Abi for CMSG_KEY_AGREE_KEY_ENCRYPT_INFO { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CMSG_KEY_AGREE_OPTION(pub u32); pub const CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE: CMSG_KEY_AGREE_OPTION = CMSG_KEY_AGREE_OPTION(1u32); pub const CMSG_KEY_AGREE_STATIC_KEY_CHOICE: CMSG_KEY_AGREE_OPTION = CMSG_KEY_AGREE_OPTION(2u32); impl ::core::convert::From<u32> for CMSG_KEY_AGREE_OPTION { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CMSG_KEY_AGREE_OPTION { type Abi = Self; } impl ::core::ops::BitOr for CMSG_KEY_AGREE_OPTION { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CMSG_KEY_AGREE_OPTION { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CMSG_KEY_AGREE_OPTION { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CMSG_KEY_AGREE_OPTION { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CMSG_KEY_AGREE_OPTION { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CMSG_KEY_AGREE_ORIGINATOR(pub u32); pub const CMSG_KEY_AGREE_ORIGINATOR_CERT: CMSG_KEY_AGREE_ORIGINATOR = CMSG_KEY_AGREE_ORIGINATOR(1u32); pub const CMSG_KEY_AGREE_ORIGINATOR_PUBLIC_KEY: CMSG_KEY_AGREE_ORIGINATOR = CMSG_KEY_AGREE_ORIGINATOR(2u32); impl ::core::convert::From<u32> for CMSG_KEY_AGREE_ORIGINATOR { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CMSG_KEY_AGREE_ORIGINATOR { type Abi = Self; } impl ::core::ops::BitOr for CMSG_KEY_AGREE_ORIGINATOR { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CMSG_KEY_AGREE_ORIGINATOR { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CMSG_KEY_AGREE_ORIGINATOR { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CMSG_KEY_AGREE_ORIGINATOR { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CMSG_KEY_AGREE_ORIGINATOR { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CMSG_KEY_AGREE_RECIPIENT: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO { pub cbSize: u32, pub KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvKeyEncryptionAuxInfo: *mut ::core::ffi::c_void, pub KeyWrapAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvKeyWrapAuxInfo: *mut ::core::ffi::c_void, pub hCryptProv: usize, pub dwKeySpec: u32, pub dwKeyChoice: CMSG_KEY_AGREE_OPTION, pub Anonymous: CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO_0, pub UserKeyingMaterial: CRYPTOAPI_BLOB, pub cRecipientEncryptedKeys: u32, pub rgpRecipientEncryptedKeys: *mut *mut CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO, } #[cfg(feature = "Win32_Foundation")] impl CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO_0 { pub pEphemeralAlgorithm: *mut CRYPT_ALGORITHM_IDENTIFIER, pub pSenderId: *mut CERT_ID, } #[cfg(feature = "Win32_Foundation")] impl CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_KEY_AGREE_RECIPIENT_INFO { pub dwVersion: u32, pub dwOriginatorChoice: CMSG_KEY_AGREE_ORIGINATOR, pub Anonymous: CMSG_KEY_AGREE_RECIPIENT_INFO_0, pub UserKeyingMaterial: CRYPTOAPI_BLOB, pub KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub cRecipientEncryptedKeys: u32, pub rgpRecipientEncryptedKeys: *mut *mut CMSG_RECIPIENT_ENCRYPTED_KEY_INFO, } #[cfg(feature = "Win32_Foundation")] impl CMSG_KEY_AGREE_RECIPIENT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_KEY_AGREE_RECIPIENT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_KEY_AGREE_RECIPIENT_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_KEY_AGREE_RECIPIENT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_KEY_AGREE_RECIPIENT_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CMSG_KEY_AGREE_RECIPIENT_INFO_0 { pub OriginatorCertId: CERT_ID, pub OriginatorPublicKeyInfo: CERT_PUBLIC_KEY_INFO, } #[cfg(feature = "Win32_Foundation")] impl CMSG_KEY_AGREE_RECIPIENT_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_KEY_AGREE_RECIPIENT_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_KEY_AGREE_RECIPIENT_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_KEY_AGREE_RECIPIENT_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_KEY_AGREE_RECIPIENT_INFO_0 { type Abi = Self; } pub const CMSG_KEY_AGREE_VERSION: u32 = 3u32; pub const CMSG_KEY_TRANS_CMS_VERSION: u32 = 2u32; pub const CMSG_KEY_TRANS_ENCRYPT_FREE_OBJID_FLAG: u32 = 2u32; pub const CMSG_KEY_TRANS_ENCRYPT_FREE_PARA_FLAG: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_KEY_TRANS_ENCRYPT_INFO { pub cbSize: u32, pub dwRecipientIndex: u32, pub KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub EncryptedKey: CRYPTOAPI_BLOB, pub dwFlags: u32, } #[cfg(feature = "Win32_Foundation")] impl CMSG_KEY_TRANS_ENCRYPT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_KEY_TRANS_ENCRYPT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMSG_KEY_TRANS_ENCRYPT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_KEY_TRANS_ENCRYPT_INFO").field("cbSize", &self.cbSize).field("dwRecipientIndex", &self.dwRecipientIndex).field("KeyEncryptionAlgorithm", &self.KeyEncryptionAlgorithm).field("EncryptedKey", &self.EncryptedKey).field("dwFlags", &self.dwFlags).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_KEY_TRANS_ENCRYPT_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwRecipientIndex == other.dwRecipientIndex && self.KeyEncryptionAlgorithm == other.KeyEncryptionAlgorithm && self.EncryptedKey == other.EncryptedKey && self.dwFlags == other.dwFlags } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_KEY_TRANS_ENCRYPT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_KEY_TRANS_ENCRYPT_INFO { type Abi = Self; } pub const CMSG_KEY_TRANS_PKCS_1_5_VERSION: u32 = 0u32; pub const CMSG_KEY_TRANS_RECIPIENT: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO { pub cbSize: u32, pub KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvKeyEncryptionAuxInfo: *mut ::core::ffi::c_void, pub hCryptProv: usize, pub RecipientPublicKey: CRYPT_BIT_BLOB, pub RecipientId: CERT_ID, } #[cfg(feature = "Win32_Foundation")] impl CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_KEY_TRANS_RECIPIENT_INFO { pub dwVersion: u32, pub RecipientId: CERT_ID, pub KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub EncryptedKey: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CMSG_KEY_TRANS_RECIPIENT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_KEY_TRANS_RECIPIENT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_KEY_TRANS_RECIPIENT_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_KEY_TRANS_RECIPIENT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_KEY_TRANS_RECIPIENT_INFO { type Abi = Self; } pub const CMSG_LENGTH_ONLY_FLAG: u32 = 2u32; pub const CMSG_MAIL_LIST_ENCRYPT_FREE_OBJID_FLAG: u32 = 2u32; pub const CMSG_MAIL_LIST_ENCRYPT_FREE_PARA_FLAG: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_MAIL_LIST_ENCRYPT_INFO { pub cbSize: u32, pub dwRecipientIndex: u32, pub KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub EncryptedKey: CRYPTOAPI_BLOB, pub dwFlags: u32, } #[cfg(feature = "Win32_Foundation")] impl CMSG_MAIL_LIST_ENCRYPT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_MAIL_LIST_ENCRYPT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMSG_MAIL_LIST_ENCRYPT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_MAIL_LIST_ENCRYPT_INFO").field("cbSize", &self.cbSize).field("dwRecipientIndex", &self.dwRecipientIndex).field("KeyEncryptionAlgorithm", &self.KeyEncryptionAlgorithm).field("EncryptedKey", &self.EncryptedKey).field("dwFlags", &self.dwFlags).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_MAIL_LIST_ENCRYPT_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwRecipientIndex == other.dwRecipientIndex && self.KeyEncryptionAlgorithm == other.KeyEncryptionAlgorithm && self.EncryptedKey == other.EncryptedKey && self.dwFlags == other.dwFlags } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_MAIL_LIST_ENCRYPT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_MAIL_LIST_ENCRYPT_INFO { type Abi = Self; } pub const CMSG_MAIL_LIST_HANDLE_KEY_CHOICE: u32 = 1u32; pub const CMSG_MAIL_LIST_RECIPIENT: u32 = 3u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO { pub cbSize: u32, pub KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvKeyEncryptionAuxInfo: *mut ::core::ffi::c_void, pub hCryptProv: usize, pub dwKeyChoice: u32, pub Anonymous: CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO_0, pub KeyId: CRYPTOAPI_BLOB, pub Date: super::super::Foundation::FILETIME, pub pOtherAttr: *mut CRYPT_ATTRIBUTE_TYPE_VALUE, } #[cfg(feature = "Win32_Foundation")] impl CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO_0 { pub hKeyEncryptionKey: usize, pub pvKeyEncryptionKey: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_MAIL_LIST_RECIPIENT_INFO { pub dwVersion: u32, pub KeyId: CRYPTOAPI_BLOB, pub KeyEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub EncryptedKey: CRYPTOAPI_BLOB, pub Date: super::super::Foundation::FILETIME, pub pOtherAttr: *mut CRYPT_ATTRIBUTE_TYPE_VALUE, } #[cfg(feature = "Win32_Foundation")] impl CMSG_MAIL_LIST_RECIPIENT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_MAIL_LIST_RECIPIENT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMSG_MAIL_LIST_RECIPIENT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_MAIL_LIST_RECIPIENT_INFO").field("dwVersion", &self.dwVersion).field("KeyId", &self.KeyId).field("KeyEncryptionAlgorithm", &self.KeyEncryptionAlgorithm).field("EncryptedKey", &self.EncryptedKey).field("Date", &self.Date).field("pOtherAttr", &self.pOtherAttr).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_MAIL_LIST_RECIPIENT_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.KeyId == other.KeyId && self.KeyEncryptionAlgorithm == other.KeyEncryptionAlgorithm && self.EncryptedKey == other.EncryptedKey && self.Date == other.Date && self.pOtherAttr == other.pOtherAttr } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_MAIL_LIST_RECIPIENT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_MAIL_LIST_RECIPIENT_INFO { type Abi = Self; } pub const CMSG_MAIL_LIST_VERSION: u32 = 4u32; pub const CMSG_MAX_LENGTH_FLAG: u32 = 32u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CMSG_RC2_AUX_INFO { pub cbSize: u32, pub dwBitLen: u32, } impl CMSG_RC2_AUX_INFO {} impl ::core::default::Default for CMSG_RC2_AUX_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CMSG_RC2_AUX_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_RC2_AUX_INFO").field("cbSize", &self.cbSize).field("dwBitLen", &self.dwBitLen).finish() } } impl ::core::cmp::PartialEq for CMSG_RC2_AUX_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwBitLen == other.dwBitLen } } impl ::core::cmp::Eq for CMSG_RC2_AUX_INFO {} unsafe impl ::windows::core::Abi for CMSG_RC2_AUX_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CMSG_RC4_AUX_INFO { pub cbSize: u32, pub dwBitLen: u32, } impl CMSG_RC4_AUX_INFO {} impl ::core::default::Default for CMSG_RC4_AUX_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CMSG_RC4_AUX_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_RC4_AUX_INFO").field("cbSize", &self.cbSize).field("dwBitLen", &self.dwBitLen).finish() } } impl ::core::cmp::PartialEq for CMSG_RC4_AUX_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwBitLen == other.dwBitLen } } impl ::core::cmp::Eq for CMSG_RC4_AUX_INFO {} unsafe impl ::windows::core::Abi for CMSG_RC4_AUX_INFO { type Abi = Self; } pub const CMSG_RC4_NO_SALT_FLAG: u32 = 1073741824u32; pub const CMSG_RECIPIENT_COUNT_PARAM: u32 = 17u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_RECIPIENT_ENCODE_INFO { pub dwRecipientChoice: u32, pub Anonymous: CMSG_RECIPIENT_ENCODE_INFO_0, } #[cfg(feature = "Win32_Foundation")] impl CMSG_RECIPIENT_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_RECIPIENT_ENCODE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_RECIPIENT_ENCODE_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_RECIPIENT_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_RECIPIENT_ENCODE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CMSG_RECIPIENT_ENCODE_INFO_0 { pub pKeyTrans: *mut CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO, pub pKeyAgree: *mut CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO, pub pMailList: *mut CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO, } #[cfg(feature = "Win32_Foundation")] impl CMSG_RECIPIENT_ENCODE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_RECIPIENT_ENCODE_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_RECIPIENT_ENCODE_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_RECIPIENT_ENCODE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_RECIPIENT_ENCODE_INFO_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO { pub cbSize: u32, pub RecipientPublicKey: CRYPT_BIT_BLOB, pub RecipientId: CERT_ID, pub Date: super::super::Foundation::FILETIME, pub pOtherAttr: *mut CRYPT_ATTRIBUTE_TYPE_VALUE, } #[cfg(feature = "Win32_Foundation")] impl CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_RECIPIENT_ENCRYPTED_KEY_INFO { pub RecipientId: CERT_ID, pub EncryptedKey: CRYPTOAPI_BLOB, pub Date: super::super::Foundation::FILETIME, pub pOtherAttr: *mut CRYPT_ATTRIBUTE_TYPE_VALUE, } #[cfg(feature = "Win32_Foundation")] impl CMSG_RECIPIENT_ENCRYPTED_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_RECIPIENT_ENCRYPTED_KEY_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_RECIPIENT_ENCRYPTED_KEY_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_RECIPIENT_ENCRYPTED_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_RECIPIENT_ENCRYPTED_KEY_INFO { type Abi = Self; } pub const CMSG_RECIPIENT_INDEX_PARAM: u32 = 18u32; pub const CMSG_RECIPIENT_INFO_PARAM: u32 = 19u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO { pub cbSize: u32, pub SignedInfo: CMSG_SIGNED_ENCODE_INFO, pub EnvelopedInfo: CMSG_ENVELOPED_ENCODE_INFO, } #[cfg(feature = "Win32_Foundation")] impl CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO").field("cbSize", &self.cbSize).field("SignedInfo", &self.SignedInfo).field("EnvelopedInfo", &self.EnvelopedInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.SignedInfo == other.SignedInfo && self.EnvelopedInfo == other.EnvelopedInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_SIGNED_AND_ENVELOPED_ENCODE_INFO { type Abi = Self; } pub const CMSG_SIGNED_DATA_CMS_VERSION: u32 = 3u32; pub const CMSG_SIGNED_DATA_NO_SIGN_FLAG: u32 = 128u32; pub const CMSG_SIGNED_DATA_PKCS_1_5_VERSION: u32 = 1u32; pub const CMSG_SIGNED_DATA_V1: u32 = 1u32; pub const CMSG_SIGNED_DATA_V3: u32 = 3u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_SIGNED_ENCODE_INFO { pub cbSize: u32, pub cSigners: u32, pub rgSigners: *mut CMSG_SIGNER_ENCODE_INFO, pub cCertEncoded: u32, pub rgCertEncoded: *mut CRYPTOAPI_BLOB, pub cCrlEncoded: u32, pub rgCrlEncoded: *mut CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CMSG_SIGNED_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_SIGNED_ENCODE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMSG_SIGNED_ENCODE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_SIGNED_ENCODE_INFO") .field("cbSize", &self.cbSize) .field("cSigners", &self.cSigners) .field("rgSigners", &self.rgSigners) .field("cCertEncoded", &self.cCertEncoded) .field("rgCertEncoded", &self.rgCertEncoded) .field("cCrlEncoded", &self.cCrlEncoded) .field("rgCrlEncoded", &self.rgCrlEncoded) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_SIGNED_ENCODE_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.cSigners == other.cSigners && self.rgSigners == other.rgSigners && self.cCertEncoded == other.cCertEncoded && self.rgCertEncoded == other.rgCertEncoded && self.cCrlEncoded == other.cCrlEncoded && self.rgCrlEncoded == other.rgCrlEncoded } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_SIGNED_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_SIGNED_ENCODE_INFO { type Abi = Self; } pub const CMSG_SIGNER_AUTH_ATTR_PARAM: u32 = 9u32; pub const CMSG_SIGNER_CERT_ID_PARAM: u32 = 38u32; pub const CMSG_SIGNER_CERT_INFO_PARAM: u32 = 7u32; pub const CMSG_SIGNER_COUNT_PARAM: u32 = 5u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_SIGNER_ENCODE_INFO { pub cbSize: u32, pub pCertInfo: *mut CERT_INFO, pub Anonymous: CMSG_SIGNER_ENCODE_INFO_0, pub dwKeySpec: u32, pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvHashAuxInfo: *mut ::core::ffi::c_void, pub cAuthAttr: u32, pub rgAuthAttr: *mut CRYPT_ATTRIBUTE, pub cUnauthAttr: u32, pub rgUnauthAttr: *mut CRYPT_ATTRIBUTE, } #[cfg(feature = "Win32_Foundation")] impl CMSG_SIGNER_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_SIGNER_ENCODE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_SIGNER_ENCODE_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_SIGNER_ENCODE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_SIGNER_ENCODE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CMSG_SIGNER_ENCODE_INFO_0 { pub hCryptProv: usize, pub hNCryptKey: usize, } #[cfg(feature = "Win32_Foundation")] impl CMSG_SIGNER_ENCODE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_SIGNER_ENCODE_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_SIGNER_ENCODE_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_SIGNER_ENCODE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_SIGNER_ENCODE_INFO_0 { type Abi = Self; } pub const CMSG_SIGNER_HASH_ALGORITHM_PARAM: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_SIGNER_INFO { pub dwVersion: u32, pub Issuer: CRYPTOAPI_BLOB, pub SerialNumber: CRYPTOAPI_BLOB, pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub HashEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub EncryptedHash: CRYPTOAPI_BLOB, pub AuthAttrs: CRYPT_ATTRIBUTES, pub UnauthAttrs: CRYPT_ATTRIBUTES, } #[cfg(feature = "Win32_Foundation")] impl CMSG_SIGNER_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_SIGNER_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMSG_SIGNER_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_SIGNER_INFO") .field("dwVersion", &self.dwVersion) .field("Issuer", &self.Issuer) .field("SerialNumber", &self.SerialNumber) .field("HashAlgorithm", &self.HashAlgorithm) .field("HashEncryptionAlgorithm", &self.HashEncryptionAlgorithm) .field("EncryptedHash", &self.EncryptedHash) .field("AuthAttrs", &self.AuthAttrs) .field("UnauthAttrs", &self.UnauthAttrs) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_SIGNER_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.Issuer == other.Issuer && self.SerialNumber == other.SerialNumber && self.HashAlgorithm == other.HashAlgorithm && self.HashEncryptionAlgorithm == other.HashEncryptionAlgorithm && self.EncryptedHash == other.EncryptedHash && self.AuthAttrs == other.AuthAttrs && self.UnauthAttrs == other.UnauthAttrs } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_SIGNER_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_SIGNER_INFO { type Abi = Self; } pub const CMSG_SIGNER_INFO_CMS_VERSION: u32 = 3u32; pub const CMSG_SIGNER_INFO_PARAM: u32 = 6u32; pub const CMSG_SIGNER_INFO_PKCS_1_5_VERSION: u32 = 1u32; pub const CMSG_SIGNER_INFO_V1: u32 = 1u32; pub const CMSG_SIGNER_INFO_V3: u32 = 3u32; pub const CMSG_SIGNER_ONLY_FLAG: u32 = 2u32; pub const CMSG_SIGNER_UNAUTH_ATTR_PARAM: u32 = 10u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CMSG_SP3_COMPATIBLE_AUX_INFO { pub cbSize: u32, pub dwFlags: u32, } impl CMSG_SP3_COMPATIBLE_AUX_INFO {} impl ::core::default::Default for CMSG_SP3_COMPATIBLE_AUX_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CMSG_SP3_COMPATIBLE_AUX_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_SP3_COMPATIBLE_AUX_INFO").field("cbSize", &self.cbSize).field("dwFlags", &self.dwFlags).finish() } } impl ::core::cmp::PartialEq for CMSG_SP3_COMPATIBLE_AUX_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwFlags == other.dwFlags } } impl ::core::cmp::Eq for CMSG_SP3_COMPATIBLE_AUX_INFO {} unsafe impl ::windows::core::Abi for CMSG_SP3_COMPATIBLE_AUX_INFO { type Abi = Self; } pub const CMSG_SP3_COMPATIBLE_ENCRYPT_FLAG: u32 = 2147483648u32; #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMSG_STREAM_INFO { pub cbContent: u32, pub pfnStreamOutput: ::core::option::Option<PFN_CMSG_STREAM_OUTPUT>, pub pvArg: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CMSG_STREAM_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMSG_STREAM_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMSG_STREAM_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMSG_STREAM_INFO").field("cbContent", &self.cbContent).field("pvArg", &self.pvArg).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMSG_STREAM_INFO { fn eq(&self, other: &Self) -> bool { self.cbContent == other.cbContent && self.pfnStreamOutput.map(|f| f as usize) == other.pfnStreamOutput.map(|f| f as usize) && self.pvArg == other.pvArg } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMSG_STREAM_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMSG_STREAM_INFO { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const CMSG_TRUSTED_SIGNER_FLAG: u32 = 1u32; pub const CMSG_TYPE_PARAM: u32 = 1u32; pub const CMSG_UNPROTECTED_ATTR_PARAM: u32 = 37u32; pub const CMSG_USE_SIGNER_INDEX_FLAG: u32 = 4u32; pub const CMSG_VERIFY_COUNTER_SIGN_ENABLE_STRONG_FLAG: u32 = 1u32; pub const CMSG_VERIFY_SIGNER_CERT: u32 = 2u32; pub const CMSG_VERIFY_SIGNER_CHAIN: u32 = 3u32; pub const CMSG_VERIFY_SIGNER_NULL: u32 = 4u32; pub const CMSG_VERIFY_SIGNER_PUBKEY: u32 = 1u32; pub const CMSG_VERSION_PARAM: u32 = 30u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CMS_DH_KEY_INFO { pub dwVersion: u32, pub Algid: u32, pub pszContentEncObjId: super::super::Foundation::PSTR, pub PubInfo: CRYPTOAPI_BLOB, pub pReserved: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CMS_DH_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CMS_DH_KEY_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CMS_DH_KEY_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMS_DH_KEY_INFO").field("dwVersion", &self.dwVersion).field("Algid", &self.Algid).field("pszContentEncObjId", &self.pszContentEncObjId).field("PubInfo", &self.PubInfo).field("pReserved", &self.pReserved).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CMS_DH_KEY_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.Algid == other.Algid && self.pszContentEncObjId == other.pszContentEncObjId && self.PubInfo == other.PubInfo && self.pReserved == other.pReserved } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CMS_DH_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CMS_DH_KEY_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CMS_KEY_INFO { pub dwVersion: u32, pub Algid: u32, pub pbOID: *mut u8, pub cbOID: u32, } impl CMS_KEY_INFO {} impl ::core::default::Default for CMS_KEY_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CMS_KEY_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CMS_KEY_INFO").field("dwVersion", &self.dwVersion).field("Algid", &self.Algid).field("pbOID", &self.pbOID).field("cbOID", &self.cbOID).finish() } } impl ::core::cmp::PartialEq for CMS_KEY_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.Algid == other.Algid && self.pbOID == other.pbOID && self.cbOID == other.cbOID } } impl ::core::cmp::Eq for CMS_KEY_INFO {} unsafe impl ::windows::core::Abi for CMS_KEY_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CPS_URLS { pub pszURL: super::super::Foundation::PWSTR, pub pAlgorithm: *mut CRYPT_ALGORITHM_IDENTIFIER, pub pDigest: *mut CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CPS_URLS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CPS_URLS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CPS_URLS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CPS_URLS").field("pszURL", &self.pszURL).field("pAlgorithm", &self.pAlgorithm).field("pDigest", &self.pDigest).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CPS_URLS { fn eq(&self, other: &Self) -> bool { self.pszURL == other.pszURL && self.pAlgorithm == other.pAlgorithm && self.pDigest == other.pDigest } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CPS_URLS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CPS_URLS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRL_CONTEXT { pub dwCertEncodingType: u32, pub pbCrlEncoded: *mut u8, pub cbCrlEncoded: u32, pub pCrlInfo: *mut CRL_INFO, pub hCertStore: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CRL_CONTEXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRL_CONTEXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRL_CONTEXT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRL_CONTEXT").field("dwCertEncodingType", &self.dwCertEncodingType).field("pbCrlEncoded", &self.pbCrlEncoded).field("cbCrlEncoded", &self.cbCrlEncoded).field("pCrlInfo", &self.pCrlInfo).field("hCertStore", &self.hCertStore).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRL_CONTEXT { fn eq(&self, other: &Self) -> bool { self.dwCertEncodingType == other.dwCertEncodingType && self.pbCrlEncoded == other.pbCrlEncoded && self.cbCrlEncoded == other.cbCrlEncoded && self.pCrlInfo == other.pCrlInfo && self.hCertStore == other.hCertStore } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRL_CONTEXT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRL_CONTEXT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRL_DIST_POINT { pub DistPointName: CRL_DIST_POINT_NAME, pub ReasonFlags: CRYPT_BIT_BLOB, pub CRLIssuer: CERT_ALT_NAME_INFO, } #[cfg(feature = "Win32_Foundation")] impl CRL_DIST_POINT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRL_DIST_POINT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRL_DIST_POINT { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRL_DIST_POINT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRL_DIST_POINT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRL_DIST_POINTS_INFO { pub cDistPoint: u32, pub rgDistPoint: *mut CRL_DIST_POINT, } #[cfg(feature = "Win32_Foundation")] impl CRL_DIST_POINTS_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRL_DIST_POINTS_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRL_DIST_POINTS_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRL_DIST_POINTS_INFO").field("cDistPoint", &self.cDistPoint).field("rgDistPoint", &self.rgDistPoint).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRL_DIST_POINTS_INFO { fn eq(&self, other: &Self) -> bool { self.cDistPoint == other.cDistPoint && self.rgDistPoint == other.rgDistPoint } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRL_DIST_POINTS_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRL_DIST_POINTS_INFO { type Abi = Self; } pub const CRL_DIST_POINT_ERR_CRL_ISSUER_BIT: i32 = -2147483648i32; pub const CRL_DIST_POINT_ERR_INDEX_MASK: u32 = 127u32; pub const CRL_DIST_POINT_ERR_INDEX_SHIFT: u32 = 24u32; pub const CRL_DIST_POINT_FULL_NAME: u32 = 1u32; pub const CRL_DIST_POINT_ISSUER_RDN_NAME: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRL_DIST_POINT_NAME { pub dwDistPointNameChoice: u32, pub Anonymous: CRL_DIST_POINT_NAME_0, } #[cfg(feature = "Win32_Foundation")] impl CRL_DIST_POINT_NAME {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRL_DIST_POINT_NAME { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRL_DIST_POINT_NAME { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRL_DIST_POINT_NAME {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRL_DIST_POINT_NAME { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CRL_DIST_POINT_NAME_0 { pub FullName: CERT_ALT_NAME_INFO, } #[cfg(feature = "Win32_Foundation")] impl CRL_DIST_POINT_NAME_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRL_DIST_POINT_NAME_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRL_DIST_POINT_NAME_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRL_DIST_POINT_NAME_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRL_DIST_POINT_NAME_0 { type Abi = Self; } pub const CRL_DIST_POINT_NO_NAME: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRL_ENTRY { pub SerialNumber: CRYPTOAPI_BLOB, pub RevocationDate: super::super::Foundation::FILETIME, pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl CRL_ENTRY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRL_ENTRY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRL_ENTRY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRL_ENTRY").field("SerialNumber", &self.SerialNumber).field("RevocationDate", &self.RevocationDate).field("cExtension", &self.cExtension).field("rgExtension", &self.rgExtension).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRL_ENTRY { fn eq(&self, other: &Self) -> bool { self.SerialNumber == other.SerialNumber && self.RevocationDate == other.RevocationDate && self.cExtension == other.cExtension && self.rgExtension == other.rgExtension } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRL_ENTRY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRL_ENTRY { type Abi = Self; } pub const CRL_FIND_ANY: u32 = 0u32; pub const CRL_FIND_EXISTING: u32 = 2u32; pub const CRL_FIND_ISSUED_BY: u32 = 1u32; pub const CRL_FIND_ISSUED_BY_AKI_FLAG: u32 = 1u32; pub const CRL_FIND_ISSUED_BY_BASE_FLAG: u32 = 8u32; pub const CRL_FIND_ISSUED_BY_DELTA_FLAG: u32 = 4u32; pub const CRL_FIND_ISSUED_BY_SIGNATURE_FLAG: u32 = 2u32; pub const CRL_FIND_ISSUED_FOR: u32 = 3u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRL_FIND_ISSUED_FOR_PARA { pub pSubjectCert: *mut CERT_CONTEXT, pub pIssuerCert: *mut CERT_CONTEXT, } #[cfg(feature = "Win32_Foundation")] impl CRL_FIND_ISSUED_FOR_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRL_FIND_ISSUED_FOR_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRL_FIND_ISSUED_FOR_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRL_FIND_ISSUED_FOR_PARA").field("pSubjectCert", &self.pSubjectCert).field("pIssuerCert", &self.pIssuerCert).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRL_FIND_ISSUED_FOR_PARA { fn eq(&self, other: &Self) -> bool { self.pSubjectCert == other.pSubjectCert && self.pIssuerCert == other.pIssuerCert } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRL_FIND_ISSUED_FOR_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRL_FIND_ISSUED_FOR_PARA { type Abi = Self; } pub const CRL_FIND_ISSUED_FOR_SET_STRONG_PROPERTIES_FLAG: u32 = 16u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRL_INFO { pub dwVersion: u32, pub SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub Issuer: CRYPTOAPI_BLOB, pub ThisUpdate: super::super::Foundation::FILETIME, pub NextUpdate: super::super::Foundation::FILETIME, pub cCRLEntry: u32, pub rgCRLEntry: *mut CRL_ENTRY, pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl CRL_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRL_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRL_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRL_INFO") .field("dwVersion", &self.dwVersion) .field("SignatureAlgorithm", &self.SignatureAlgorithm) .field("Issuer", &self.Issuer) .field("ThisUpdate", &self.ThisUpdate) .field("NextUpdate", &self.NextUpdate) .field("cCRLEntry", &self.cCRLEntry) .field("rgCRLEntry", &self.rgCRLEntry) .field("cExtension", &self.cExtension) .field("rgExtension", &self.rgExtension) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRL_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.SignatureAlgorithm == other.SignatureAlgorithm && self.Issuer == other.Issuer && self.ThisUpdate == other.ThisUpdate && self.NextUpdate == other.NextUpdate && self.cCRLEntry == other.cCRLEntry && self.rgCRLEntry == other.rgCRLEntry && self.cExtension == other.cExtension && self.rgExtension == other.rgExtension } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRL_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRL_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRL_ISSUING_DIST_POINT { pub DistPointName: CRL_DIST_POINT_NAME, pub fOnlyContainsUserCerts: super::super::Foundation::BOOL, pub fOnlyContainsCACerts: super::super::Foundation::BOOL, pub OnlySomeReasonFlags: CRYPT_BIT_BLOB, pub fIndirectCRL: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl CRL_ISSUING_DIST_POINT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRL_ISSUING_DIST_POINT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRL_ISSUING_DIST_POINT { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRL_ISSUING_DIST_POINT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRL_ISSUING_DIST_POINT { type Abi = Self; } pub const CRL_REASON_AA_COMPROMISE: u32 = 10u32; pub const CRL_REASON_AA_COMPROMISE_FLAG: u32 = 128u32; pub const CRL_REASON_AFFILIATION_CHANGED_FLAG: u32 = 16u32; pub const CRL_REASON_CA_COMPROMISE_FLAG: u32 = 32u32; pub const CRL_REASON_CERTIFICATE_HOLD_FLAG: u32 = 2u32; pub const CRL_REASON_CESSATION_OF_OPERATION_FLAG: u32 = 4u32; pub const CRL_REASON_KEY_COMPROMISE_FLAG: u32 = 64u32; pub const CRL_REASON_PRIVILEGE_WITHDRAWN: u32 = 9u32; pub const CRL_REASON_PRIVILEGE_WITHDRAWN_FLAG: u32 = 1u32; pub const CRL_REASON_SUPERSEDED_FLAG: u32 = 8u32; pub const CRL_REASON_UNUSED_FLAG: u32 = 128u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRL_REVOCATION_INFO { pub pCrlEntry: *mut CRL_ENTRY, pub pCrlContext: *mut CRL_CONTEXT, pub pCrlIssuerChain: *mut CERT_CHAIN_CONTEXT, } #[cfg(feature = "Win32_Foundation")] impl CRL_REVOCATION_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRL_REVOCATION_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRL_REVOCATION_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRL_REVOCATION_INFO").field("pCrlEntry", &self.pCrlEntry).field("pCrlContext", &self.pCrlContext).field("pCrlIssuerChain", &self.pCrlIssuerChain).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRL_REVOCATION_INFO { fn eq(&self, other: &Self) -> bool { self.pCrlEntry == other.pCrlEntry && self.pCrlContext == other.pCrlContext && self.pCrlIssuerChain == other.pCrlIssuerChain } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRL_REVOCATION_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRL_REVOCATION_INFO { type Abi = Self; } pub const CRL_V1: u32 = 0u32; pub const CRL_V2: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CROSS_CERT_DIST_POINTS_INFO { pub dwSyncDeltaTime: u32, pub cDistPoint: u32, pub rgDistPoint: *mut CERT_ALT_NAME_INFO, } #[cfg(feature = "Win32_Foundation")] impl CROSS_CERT_DIST_POINTS_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CROSS_CERT_DIST_POINTS_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CROSS_CERT_DIST_POINTS_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CROSS_CERT_DIST_POINTS_INFO").field("dwSyncDeltaTime", &self.dwSyncDeltaTime).field("cDistPoint", &self.cDistPoint).field("rgDistPoint", &self.rgDistPoint).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CROSS_CERT_DIST_POINTS_INFO { fn eq(&self, other: &Self) -> bool { self.dwSyncDeltaTime == other.dwSyncDeltaTime && self.cDistPoint == other.cDistPoint && self.rgDistPoint == other.rgDistPoint } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CROSS_CERT_DIST_POINTS_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CROSS_CERT_DIST_POINTS_INFO { type Abi = Self; } pub const CROSS_CERT_DIST_POINT_ERR_INDEX_MASK: u32 = 255u32; pub const CROSS_CERT_DIST_POINT_ERR_INDEX_SHIFT: u32 = 24u32; pub const CRYPTNET_CACHED_OCSP_SWITCH_TO_CRL_COUNT_DEFAULT: u32 = 50u32; pub const CRYPTNET_CRL_BEFORE_OCSP_ENABLE: u32 = 4294967295u32; pub const CRYPTNET_MAX_CACHED_OCSP_PER_CRL_COUNT_DEFAULT: u32 = 500u32; pub const CRYPTNET_OCSP_AFTER_CRL_DISABLE: u32 = 4294967295u32; pub const CRYPTNET_PRE_FETCH_AFTER_PUBLISH_PRE_FETCH_DIVISOR_DEFAULT: u32 = 10u32; pub const CRYPTNET_PRE_FETCH_BEFORE_NEXT_UPDATE_PRE_FETCH_DIVISOR_DEFAULT: u32 = 20u32; pub const CRYPTNET_PRE_FETCH_SCAN_AFTER_TRIGGER_DELAY_SECONDS_DEFAULT: u32 = 60u32; pub const CRYPTNET_PRE_FETCH_TRIGGER_DISABLE: u32 = 4294967295u32; pub const CRYPTNET_PRE_FETCH_VALIDITY_PERIOD_AFTER_NEXT_UPDATE_PRE_FETCH_DIVISOR_DEFAULT: u32 = 10u32; pub const CRYPTNET_URL_CACHE_DEFAULT_FLUSH: u32 = 0u32; pub const CRYPTNET_URL_CACHE_DISABLE_FLUSH: u32 = 4294967295u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPTNET_URL_CACHE_FLUSH_INFO { pub cbSize: u32, pub dwExemptSeconds: u32, pub ExpireTime: super::super::Foundation::FILETIME, } #[cfg(feature = "Win32_Foundation")] impl CRYPTNET_URL_CACHE_FLUSH_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPTNET_URL_CACHE_FLUSH_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPTNET_URL_CACHE_FLUSH_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPTNET_URL_CACHE_FLUSH_INFO").field("cbSize", &self.cbSize).field("dwExemptSeconds", &self.dwExemptSeconds).field("ExpireTime", &self.ExpireTime).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPTNET_URL_CACHE_FLUSH_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwExemptSeconds == other.dwExemptSeconds && self.ExpireTime == other.ExpireTime } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPTNET_URL_CACHE_FLUSH_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPTNET_URL_CACHE_FLUSH_INFO { type Abi = Self; } pub const CRYPTNET_URL_CACHE_PRE_FETCH_AUTOROOT_CAB: u32 = 5u32; pub const CRYPTNET_URL_CACHE_PRE_FETCH_BLOB: u32 = 1u32; pub const CRYPTNET_URL_CACHE_PRE_FETCH_CRL: u32 = 2u32; pub const CRYPTNET_URL_CACHE_PRE_FETCH_DISALLOWED_CERT_CAB: u32 = 6u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPTNET_URL_CACHE_PRE_FETCH_INFO { pub cbSize: u32, pub dwObjectType: u32, pub dwError: u32, pub dwReserved: u32, pub ThisUpdateTime: super::super::Foundation::FILETIME, pub NextUpdateTime: super::super::Foundation::FILETIME, pub PublishTime: super::super::Foundation::FILETIME, } #[cfg(feature = "Win32_Foundation")] impl CRYPTNET_URL_CACHE_PRE_FETCH_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPTNET_URL_CACHE_PRE_FETCH_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPTNET_URL_CACHE_PRE_FETCH_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPTNET_URL_CACHE_PRE_FETCH_INFO") .field("cbSize", &self.cbSize) .field("dwObjectType", &self.dwObjectType) .field("dwError", &self.dwError) .field("dwReserved", &self.dwReserved) .field("ThisUpdateTime", &self.ThisUpdateTime) .field("NextUpdateTime", &self.NextUpdateTime) .field("PublishTime", &self.PublishTime) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPTNET_URL_CACHE_PRE_FETCH_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwObjectType == other.dwObjectType && self.dwError == other.dwError && self.dwReserved == other.dwReserved && self.ThisUpdateTime == other.ThisUpdateTime && self.NextUpdateTime == other.NextUpdateTime && self.PublishTime == other.PublishTime } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPTNET_URL_CACHE_PRE_FETCH_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPTNET_URL_CACHE_PRE_FETCH_INFO { type Abi = Self; } pub const CRYPTNET_URL_CACHE_PRE_FETCH_NONE: u32 = 0u32; pub const CRYPTNET_URL_CACHE_PRE_FETCH_OCSP: u32 = 3u32; pub const CRYPTNET_URL_CACHE_PRE_FETCH_PIN_RULES_CAB: u32 = 7u32; pub const CRYPTNET_URL_CACHE_RESPONSE_HTTP: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPTNET_URL_CACHE_RESPONSE_INFO { pub cbSize: u32, pub wResponseType: u16, pub wResponseFlags: u16, pub LastModifiedTime: super::super::Foundation::FILETIME, pub dwMaxAge: u32, pub pwszETag: super::super::Foundation::PWSTR, pub dwProxyId: u32, } #[cfg(feature = "Win32_Foundation")] impl CRYPTNET_URL_CACHE_RESPONSE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPTNET_URL_CACHE_RESPONSE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPTNET_URL_CACHE_RESPONSE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPTNET_URL_CACHE_RESPONSE_INFO") .field("cbSize", &self.cbSize) .field("wResponseType", &self.wResponseType) .field("wResponseFlags", &self.wResponseFlags) .field("LastModifiedTime", &self.LastModifiedTime) .field("dwMaxAge", &self.dwMaxAge) .field("pwszETag", &self.pwszETag) .field("dwProxyId", &self.dwProxyId) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPTNET_URL_CACHE_RESPONSE_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.wResponseType == other.wResponseType && self.wResponseFlags == other.wResponseFlags && self.LastModifiedTime == other.LastModifiedTime && self.dwMaxAge == other.dwMaxAge && self.pwszETag == other.pwszETag && self.dwProxyId == other.dwProxyId } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPTNET_URL_CACHE_RESPONSE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPTNET_URL_CACHE_RESPONSE_INFO { type Abi = Self; } pub const CRYPTNET_URL_CACHE_RESPONSE_NONE: u32 = 0u32; pub const CRYPTNET_URL_CACHE_RESPONSE_VALIDATED: u32 = 32768u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPTOAPI_BLOB { pub cbData: u32, pub pbData: *mut u8, } impl CRYPTOAPI_BLOB {} impl ::core::default::Default for CRYPTOAPI_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPTOAPI_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPTOAPI_BLOB").field("cbData", &self.cbData).field("pbData", &self.pbData).finish() } } impl ::core::cmp::PartialEq for CRYPTOAPI_BLOB { fn eq(&self, other: &Self) -> bool { self.cbData == other.cbData && self.pbData == other.pbData } } impl ::core::cmp::Eq for CRYPTOAPI_BLOB {} unsafe impl ::windows::core::Abi for CRYPTOAPI_BLOB { type Abi = Self; } pub const CRYPTPROTECTMEMORY_BLOCK_SIZE: u32 = 16u32; pub const CRYPTPROTECTMEMORY_CROSS_PROCESS: u32 = 1u32; pub const CRYPTPROTECTMEMORY_SAME_LOGON: u32 = 2u32; pub const CRYPTPROTECTMEMORY_SAME_PROCESS: u32 = 0u32; pub const CRYPTPROTECT_AUDIT: u32 = 16u32; pub const CRYPTPROTECT_CRED_REGENERATE: u32 = 128u32; pub const CRYPTPROTECT_CRED_SYNC: u32 = 8u32; pub const CRYPTPROTECT_FIRST_RESERVED_FLAGVAL: u32 = 268435455u32; pub const CRYPTPROTECT_LAST_RESERVED_FLAGVAL: u32 = 4294967295u32; pub const CRYPTPROTECT_LOCAL_MACHINE: u32 = 4u32; pub const CRYPTPROTECT_NO_RECOVERY: u32 = 32u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPTPROTECT_PROMPTSTRUCT { pub cbSize: u32, pub dwPromptFlags: u32, pub hwndApp: super::super::Foundation::HWND, pub szPrompt: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPTPROTECT_PROMPTSTRUCT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPTPROTECT_PROMPTSTRUCT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPTPROTECT_PROMPTSTRUCT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPTPROTECT_PROMPTSTRUCT").field("cbSize", &self.cbSize).field("dwPromptFlags", &self.dwPromptFlags).field("hwndApp", &self.hwndApp).field("szPrompt", &self.szPrompt).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPTPROTECT_PROMPTSTRUCT { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwPromptFlags == other.dwPromptFlags && self.hwndApp == other.hwndApp && self.szPrompt == other.szPrompt } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPTPROTECT_PROMPTSTRUCT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPTPROTECT_PROMPTSTRUCT { type Abi = Self; } pub const CRYPTPROTECT_PROMPT_ON_PROTECT: u32 = 2u32; pub const CRYPTPROTECT_PROMPT_ON_UNPROTECT: u32 = 1u32; pub const CRYPTPROTECT_PROMPT_REQUIRE_STRONG: u32 = 16u32; pub const CRYPTPROTECT_PROMPT_RESERVED: u32 = 4u32; pub const CRYPTPROTECT_PROMPT_STRONG: u32 = 8u32; pub const CRYPTPROTECT_UI_FORBIDDEN: u32 = 1u32; pub const CRYPTPROTECT_VERIFY_PROTECTION: u32 = 64u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_3DES_KEY_STATE { pub Key: [u8; 24], pub IV: [u8; 8], pub Feedback: [u8; 8], } impl CRYPT_3DES_KEY_STATE {} impl ::core::default::Default for CRYPT_3DES_KEY_STATE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_3DES_KEY_STATE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_3DES_KEY_STATE").field("Key", &self.Key).field("IV", &self.IV).field("Feedback", &self.Feedback).finish() } } impl ::core::cmp::PartialEq for CRYPT_3DES_KEY_STATE { fn eq(&self, other: &Self) -> bool { self.Key == other.Key && self.IV == other.IV && self.Feedback == other.Feedback } } impl ::core::cmp::Eq for CRYPT_3DES_KEY_STATE {} unsafe impl ::windows::core::Abi for CRYPT_3DES_KEY_STATE { type Abi = Self; } pub const CRYPT_ACCUMULATIVE_TIMEOUT: u32 = 2048u32; pub const CRYPT_ACQUIRE_ALLOW_NCRYPT_KEY_FLAG: u32 = 65536u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_ACQUIRE_FLAGS(pub u32); pub const CRYPT_ACQUIRE_CACHE_FLAG: CRYPT_ACQUIRE_FLAGS = CRYPT_ACQUIRE_FLAGS(1u32); pub const CRYPT_ACQUIRE_COMPARE_KEY_FLAG: CRYPT_ACQUIRE_FLAGS = CRYPT_ACQUIRE_FLAGS(4u32); pub const CRYPT_ACQUIRE_NO_HEALING: CRYPT_ACQUIRE_FLAGS = CRYPT_ACQUIRE_FLAGS(8u32); pub const CRYPT_ACQUIRE_SILENT_FLAG: CRYPT_ACQUIRE_FLAGS = CRYPT_ACQUIRE_FLAGS(64u32); pub const CRYPT_ACQUIRE_USE_PROV_INFO_FLAG: CRYPT_ACQUIRE_FLAGS = CRYPT_ACQUIRE_FLAGS(2u32); impl ::core::convert::From<u32> for CRYPT_ACQUIRE_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_ACQUIRE_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_ACQUIRE_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_ACQUIRE_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_ACQUIRE_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_ACQUIRE_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_ACQUIRE_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_ACQUIRE_NCRYPT_KEY_FLAGS_MASK: u32 = 458752u32; pub const CRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG: u32 = 262144u32; pub const CRYPT_ACQUIRE_PREFER_NCRYPT_KEY_FLAG: u32 = 131072u32; pub const CRYPT_ACQUIRE_WINDOW_HANDLE_FLAG: u32 = 128u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_AES_128_KEY_STATE { pub Key: [u8; 16], pub IV: [u8; 16], pub EncryptionState: [u8; 176], pub DecryptionState: [u8; 176], pub Feedback: [u8; 16], } impl CRYPT_AES_128_KEY_STATE {} impl ::core::default::Default for CRYPT_AES_128_KEY_STATE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_AES_128_KEY_STATE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_AES_128_KEY_STATE").field("Key", &self.Key).field("IV", &self.IV).field("EncryptionState", &self.EncryptionState).field("DecryptionState", &self.DecryptionState).field("Feedback", &self.Feedback).finish() } } impl ::core::cmp::PartialEq for CRYPT_AES_128_KEY_STATE { fn eq(&self, other: &Self) -> bool { self.Key == other.Key && self.IV == other.IV && self.EncryptionState == other.EncryptionState && self.DecryptionState == other.DecryptionState && self.Feedback == other.Feedback } } impl ::core::cmp::Eq for CRYPT_AES_128_KEY_STATE {} unsafe impl ::windows::core::Abi for CRYPT_AES_128_KEY_STATE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_AES_256_KEY_STATE { pub Key: [u8; 32], pub IV: [u8; 16], pub EncryptionState: [u8; 240], pub DecryptionState: [u8; 240], pub Feedback: [u8; 16], } impl CRYPT_AES_256_KEY_STATE {} impl ::core::default::Default for CRYPT_AES_256_KEY_STATE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_AES_256_KEY_STATE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_AES_256_KEY_STATE").field("Key", &self.Key).field("IV", &self.IV).field("EncryptionState", &self.EncryptionState).field("DecryptionState", &self.DecryptionState).field("Feedback", &self.Feedback).finish() } } impl ::core::cmp::PartialEq for CRYPT_AES_256_KEY_STATE { fn eq(&self, other: &Self) -> bool { self.Key == other.Key && self.IV == other.IV && self.EncryptionState == other.EncryptionState && self.DecryptionState == other.DecryptionState && self.Feedback == other.Feedback } } impl ::core::cmp::Eq for CRYPT_AES_256_KEY_STATE {} unsafe impl ::windows::core::Abi for CRYPT_AES_256_KEY_STATE { type Abi = Self; } pub const CRYPT_AIA_RETRIEVAL: u32 = 524288u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_ALGORITHM_IDENTIFIER { pub pszObjId: super::super::Foundation::PSTR, pub Parameters: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_ALGORITHM_IDENTIFIER {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_ALGORITHM_IDENTIFIER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_ALGORITHM_IDENTIFIER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_ALGORITHM_IDENTIFIER").field("pszObjId", &self.pszObjId).field("Parameters", &self.Parameters).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_ALGORITHM_IDENTIFIER { fn eq(&self, other: &Self) -> bool { self.pszObjId == other.pszObjId && self.Parameters == other.Parameters } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_ALGORITHM_IDENTIFIER {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_ALGORITHM_IDENTIFIER { type Abi = Self; } pub const CRYPT_ARCHIVE: u32 = 256u32; pub const CRYPT_ASN_ENCODING: u32 = 1u32; pub const CRYPT_ASYNC_RETRIEVAL: u32 = 16u32; #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_ASYNC_RETRIEVAL_COMPLETION { pub pfnCompletion: ::core::option::Option<PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC>, pub pvCompletion: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_ASYNC_RETRIEVAL_COMPLETION {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_ASYNC_RETRIEVAL_COMPLETION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_ASYNC_RETRIEVAL_COMPLETION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_ASYNC_RETRIEVAL_COMPLETION").field("pvCompletion", &self.pvCompletion).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_ASYNC_RETRIEVAL_COMPLETION { fn eq(&self, other: &Self) -> bool { self.pfnCompletion.map(|f| f as usize) == other.pfnCompletion.map(|f| f as usize) && self.pvCompletion == other.pvCompletion } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_ASYNC_RETRIEVAL_COMPLETION {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_ASYNC_RETRIEVAL_COMPLETION { type Abi = ::core::mem::ManuallyDrop<Self>; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_ATTRIBUTE { pub pszObjId: super::super::Foundation::PSTR, pub cValue: u32, pub rgValue: *mut CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_ATTRIBUTE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_ATTRIBUTE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_ATTRIBUTE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_ATTRIBUTE").field("pszObjId", &self.pszObjId).field("cValue", &self.cValue).field("rgValue", &self.rgValue).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_ATTRIBUTE { fn eq(&self, other: &Self) -> bool { self.pszObjId == other.pszObjId && self.cValue == other.cValue && self.rgValue == other.rgValue } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_ATTRIBUTE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_ATTRIBUTE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_ATTRIBUTES { pub cAttr: u32, pub rgAttr: *mut CRYPT_ATTRIBUTE, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_ATTRIBUTES {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_ATTRIBUTES { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_ATTRIBUTES { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_ATTRIBUTES").field("cAttr", &self.cAttr).field("rgAttr", &self.rgAttr).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_ATTRIBUTES { fn eq(&self, other: &Self) -> bool { self.cAttr == other.cAttr && self.rgAttr == other.rgAttr } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_ATTRIBUTES {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_ATTRIBUTES { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_ATTRIBUTE_TYPE_VALUE { pub pszObjId: super::super::Foundation::PSTR, pub Value: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_ATTRIBUTE_TYPE_VALUE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_ATTRIBUTE_TYPE_VALUE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_ATTRIBUTE_TYPE_VALUE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_ATTRIBUTE_TYPE_VALUE").field("pszObjId", &self.pszObjId).field("Value", &self.Value).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_ATTRIBUTE_TYPE_VALUE { fn eq(&self, other: &Self) -> bool { self.pszObjId == other.pszObjId && self.Value == other.Value } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_ATTRIBUTE_TYPE_VALUE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_ATTRIBUTE_TYPE_VALUE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_BIT_BLOB { pub cbData: u32, pub pbData: *mut u8, pub cUnusedBits: u32, } impl CRYPT_BIT_BLOB {} impl ::core::default::Default for CRYPT_BIT_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_BIT_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_BIT_BLOB").field("cbData", &self.cbData).field("pbData", &self.pbData).field("cUnusedBits", &self.cUnusedBits).finish() } } impl ::core::cmp::PartialEq for CRYPT_BIT_BLOB { fn eq(&self, other: &Self) -> bool { self.cbData == other.cbData && self.pbData == other.pbData && self.cUnusedBits == other.cUnusedBits } } impl ::core::cmp::Eq for CRYPT_BIT_BLOB {} unsafe impl ::windows::core::Abi for CRYPT_BIT_BLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_BLOB_ARRAY { pub cBlob: u32, pub rgBlob: *mut CRYPTOAPI_BLOB, } impl CRYPT_BLOB_ARRAY {} impl ::core::default::Default for CRYPT_BLOB_ARRAY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_BLOB_ARRAY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_BLOB_ARRAY").field("cBlob", &self.cBlob).field("rgBlob", &self.rgBlob).finish() } } impl ::core::cmp::PartialEq for CRYPT_BLOB_ARRAY { fn eq(&self, other: &Self) -> bool { self.cBlob == other.cBlob && self.rgBlob == other.rgBlob } } impl ::core::cmp::Eq for CRYPT_BLOB_ARRAY {} unsafe impl ::windows::core::Abi for CRYPT_BLOB_ARRAY { type Abi = Self; } pub const CRYPT_CACHE_ONLY_RETRIEVAL: u32 = 2u32; pub const CRYPT_CHECK_FRESHNESS_TIME_VALIDITY: u32 = 1024u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_CONTENT_INFO { pub pszObjId: super::super::Foundation::PSTR, pub Content: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_CONTENT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_CONTENT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_CONTENT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_CONTENT_INFO").field("pszObjId", &self.pszObjId).field("Content", &self.Content).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_CONTENT_INFO { fn eq(&self, other: &Self) -> bool { self.pszObjId == other.pszObjId && self.Content == other.Content } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_CONTENT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_CONTENT_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY { pub pszObjId: super::super::Foundation::PSTR, pub cValue: u32, pub rgValue: *mut CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY").field("pszObjId", &self.pszObjId).field("cValue", &self.cValue).field("rgValue", &self.rgValue).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY { fn eq(&self, other: &Self) -> bool { self.pszObjId == other.pszObjId && self.cValue == other.cValue && self.rgValue == other.rgValue } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_CONTENT_INFO_SEQUENCE_OF_ANY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_CONTEXTS { pub cContexts: u32, pub rgpszContexts: *mut super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_CONTEXTS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_CONTEXTS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_CONTEXTS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_CONTEXTS").field("cContexts", &self.cContexts).field("rgpszContexts", &self.rgpszContexts).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_CONTEXTS { fn eq(&self, other: &Self) -> bool { self.cContexts == other.cContexts && self.rgpszContexts == other.rgpszContexts } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_CONTEXTS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_CONTEXTS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_CONTEXT_CONFIG { pub dwFlags: CRYPT_CONTEXT_CONFIG_FLAGS, pub dwReserved: u32, } impl CRYPT_CONTEXT_CONFIG {} impl ::core::default::Default for CRYPT_CONTEXT_CONFIG { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_CONTEXT_CONFIG { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_CONTEXT_CONFIG").field("dwFlags", &self.dwFlags).field("dwReserved", &self.dwReserved).finish() } } impl ::core::cmp::PartialEq for CRYPT_CONTEXT_CONFIG { fn eq(&self, other: &Self) -> bool { self.dwFlags == other.dwFlags && self.dwReserved == other.dwReserved } } impl ::core::cmp::Eq for CRYPT_CONTEXT_CONFIG {} unsafe impl ::windows::core::Abi for CRYPT_CONTEXT_CONFIG { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_CONTEXT_CONFIG_FLAGS(pub u32); pub const CRYPT_EXCLUSIVE: CRYPT_CONTEXT_CONFIG_FLAGS = CRYPT_CONTEXT_CONFIG_FLAGS(1u32); pub const CRYPT_OVERRIDE: CRYPT_CONTEXT_CONFIG_FLAGS = CRYPT_CONTEXT_CONFIG_FLAGS(65536u32); impl ::core::convert::From<u32> for CRYPT_CONTEXT_CONFIG_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_CONTEXT_CONFIG_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_CONTEXT_CONFIG_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_CONTEXT_CONFIG_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_CONTEXT_CONFIG_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_CONTEXT_CONFIG_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_CONTEXT_CONFIG_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_CONTEXT_FUNCTIONS { pub cFunctions: u32, pub rgpszFunctions: *mut super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_CONTEXT_FUNCTIONS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_CONTEXT_FUNCTIONS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_CONTEXT_FUNCTIONS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_CONTEXT_FUNCTIONS").field("cFunctions", &self.cFunctions).field("rgpszFunctions", &self.rgpszFunctions).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_CONTEXT_FUNCTIONS { fn eq(&self, other: &Self) -> bool { self.cFunctions == other.cFunctions && self.rgpszFunctions == other.rgpszFunctions } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_CONTEXT_FUNCTIONS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_CONTEXT_FUNCTIONS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_CONTEXT_FUNCTION_CONFIG { pub dwFlags: u32, pub dwReserved: u32, } impl CRYPT_CONTEXT_FUNCTION_CONFIG {} impl ::core::default::Default for CRYPT_CONTEXT_FUNCTION_CONFIG { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_CONTEXT_FUNCTION_CONFIG { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_CONTEXT_FUNCTION_CONFIG").field("dwFlags", &self.dwFlags).field("dwReserved", &self.dwReserved).finish() } } impl ::core::cmp::PartialEq for CRYPT_CONTEXT_FUNCTION_CONFIG { fn eq(&self, other: &Self) -> bool { self.dwFlags == other.dwFlags && self.dwReserved == other.dwReserved } } impl ::core::cmp::Eq for CRYPT_CONTEXT_FUNCTION_CONFIG {} unsafe impl ::windows::core::Abi for CRYPT_CONTEXT_FUNCTION_CONFIG { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_CONTEXT_FUNCTION_PROVIDERS { pub cProviders: u32, pub rgpszProviders: *mut super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_CONTEXT_FUNCTION_PROVIDERS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_CONTEXT_FUNCTION_PROVIDERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_CONTEXT_FUNCTION_PROVIDERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_CONTEXT_FUNCTION_PROVIDERS").field("cProviders", &self.cProviders).field("rgpszProviders", &self.rgpszProviders).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_CONTEXT_FUNCTION_PROVIDERS { fn eq(&self, other: &Self) -> bool { self.cProviders == other.cProviders && self.rgpszProviders == other.rgpszProviders } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_CONTEXT_FUNCTION_PROVIDERS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_CONTEXT_FUNCTION_PROVIDERS { type Abi = Self; } pub const CRYPT_CREATE_NEW_FLUSH_ENTRY: u32 = 268435456u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_CREDENTIALS { pub cbSize: u32, pub pszCredentialsOid: super::super::Foundation::PSTR, pub pvCredentials: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_CREDENTIALS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_CREDENTIALS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_CREDENTIALS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_CREDENTIALS").field("cbSize", &self.cbSize).field("pszCredentialsOid", &self.pszCredentialsOid).field("pvCredentials", &self.pvCredentials).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_CREDENTIALS { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pszCredentialsOid == other.pszCredentialsOid && self.pvCredentials == other.pvCredentials } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_CREDENTIALS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_CREDENTIALS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_CSP_PROVIDER { pub dwKeySpec: u32, pub pwszProviderName: super::super::Foundation::PWSTR, pub Signature: CRYPT_BIT_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_CSP_PROVIDER {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_CSP_PROVIDER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_CSP_PROVIDER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_CSP_PROVIDER").field("dwKeySpec", &self.dwKeySpec).field("pwszProviderName", &self.pwszProviderName).field("Signature", &self.Signature).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_CSP_PROVIDER { fn eq(&self, other: &Self) -> bool { self.dwKeySpec == other.dwKeySpec && self.pwszProviderName == other.pwszProviderName && self.Signature == other.Signature } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_CSP_PROVIDER {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_CSP_PROVIDER { type Abi = Self; } pub const CRYPT_DECODE_ALLOC_FLAG: u32 = 32768u32; pub const CRYPT_DECODE_ENABLE_PUNYCODE_FLAG: u32 = 33554432u32; pub const CRYPT_DECODE_ENABLE_UTF8PERCENT_FLAG: u32 = 67108864u32; pub const CRYPT_DECODE_NOCOPY_FLAG: u32 = 1u32; pub const CRYPT_DECODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG: u32 = 8u32; #[derive(:: core :: clone :: Clone)] #[repr(C)] pub struct CRYPT_DECODE_PARA { pub cbSize: u32, pub pfnAlloc: ::core::option::Option<PFN_CRYPT_ALLOC>, pub pfnFree: ::core::option::Option<PFN_CRYPT_FREE>, } impl CRYPT_DECODE_PARA {} impl ::core::default::Default for CRYPT_DECODE_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_DECODE_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_DECODE_PARA").field("cbSize", &self.cbSize).finish() } } impl ::core::cmp::PartialEq for CRYPT_DECODE_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pfnAlloc.map(|f| f as usize) == other.pfnAlloc.map(|f| f as usize) && self.pfnFree.map(|f| f as usize) == other.pfnFree.map(|f| f as usize) } } impl ::core::cmp::Eq for CRYPT_DECODE_PARA {} unsafe impl ::windows::core::Abi for CRYPT_DECODE_PARA { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const CRYPT_DECODE_SHARE_OID_STRING_FLAG: u32 = 4u32; pub const CRYPT_DECODE_TO_BE_SIGNED_FLAG: u32 = 2u32; pub const CRYPT_DECRYPT: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_DECRYPT_MESSAGE_PARA { pub cbSize: u32, pub dwMsgAndCertEncodingType: u32, pub cCertStore: u32, pub rghCertStore: *mut *mut ::core::ffi::c_void, } impl CRYPT_DECRYPT_MESSAGE_PARA {} impl ::core::default::Default for CRYPT_DECRYPT_MESSAGE_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_DECRYPT_MESSAGE_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_DECRYPT_MESSAGE_PARA").field("cbSize", &self.cbSize).field("dwMsgAndCertEncodingType", &self.dwMsgAndCertEncodingType).field("cCertStore", &self.cCertStore).field("rghCertStore", &self.rghCertStore).finish() } } impl ::core::cmp::PartialEq for CRYPT_DECRYPT_MESSAGE_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwMsgAndCertEncodingType == other.dwMsgAndCertEncodingType && self.cCertStore == other.cCertStore && self.rghCertStore == other.rghCertStore } } impl ::core::cmp::Eq for CRYPT_DECRYPT_MESSAGE_PARA {} unsafe impl ::windows::core::Abi for CRYPT_DECRYPT_MESSAGE_PARA { type Abi = Self; } pub const CRYPT_DECRYPT_RSA_NO_PADDING_CHECK: u32 = 32u32; pub const CRYPT_DEFAULT_CONTAINER_OPTIONAL: u32 = 128u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_DEFAULT_CONTEXT_FLAGS(pub u32); pub const CRYPT_DEFAULT_CONTEXT_AUTO_RELEASE_FLAG: CRYPT_DEFAULT_CONTEXT_FLAGS = CRYPT_DEFAULT_CONTEXT_FLAGS(1u32); pub const CRYPT_DEFAULT_CONTEXT_PROCESS_FLAG: CRYPT_DEFAULT_CONTEXT_FLAGS = CRYPT_DEFAULT_CONTEXT_FLAGS(2u32); impl ::core::convert::From<u32> for CRYPT_DEFAULT_CONTEXT_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_DEFAULT_CONTEXT_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_DEFAULT_CONTEXT_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_DEFAULT_CONTEXT_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_DEFAULT_CONTEXT_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_DEFAULT_CONTEXT_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_DEFAULT_CONTEXT_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA { pub cOID: u32, pub rgpszOID: *mut super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA").field("cOID", &self.cOID).field("rgpszOID", &self.rgpszOID).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA { fn eq(&self, other: &Self) -> bool { self.cOID == other.cOID && self.rgpszOID == other.rgpszOID } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_DEFAULT_CONTEXT_MULTI_OID_PARA { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_DEFAULT_CONTEXT_TYPE(pub u32); pub const CRYPT_DEFAULT_CONTEXT_CERT_SIGN_OID: CRYPT_DEFAULT_CONTEXT_TYPE = CRYPT_DEFAULT_CONTEXT_TYPE(1u32); pub const CRYPT_DEFAULT_CONTEXT_MULTI_CERT_SIGN_OID: CRYPT_DEFAULT_CONTEXT_TYPE = CRYPT_DEFAULT_CONTEXT_TYPE(2u32); impl ::core::convert::From<u32> for CRYPT_DEFAULT_CONTEXT_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_DEFAULT_CONTEXT_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_DEFAULT_CONTEXT_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_DEFAULT_CONTEXT_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_DEFAULT_CONTEXT_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_DEFAULT_CONTEXT_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_DEFAULT_CONTEXT_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_DELETEKEYSET: u32 = 16u32; pub const CRYPT_DELETE_DEFAULT: u32 = 4u32; pub const CRYPT_DELETE_KEYSET: u32 = 16u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_DES_KEY_STATE { pub Key: [u8; 8], pub IV: [u8; 8], pub Feedback: [u8; 8], } impl CRYPT_DES_KEY_STATE {} impl ::core::default::Default for CRYPT_DES_KEY_STATE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_DES_KEY_STATE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_DES_KEY_STATE").field("Key", &self.Key).field("IV", &self.IV).field("Feedback", &self.Feedback).finish() } } impl ::core::cmp::PartialEq for CRYPT_DES_KEY_STATE { fn eq(&self, other: &Self) -> bool { self.Key == other.Key && self.IV == other.IV && self.Feedback == other.Feedback } } impl ::core::cmp::Eq for CRYPT_DES_KEY_STATE {} unsafe impl ::windows::core::Abi for CRYPT_DES_KEY_STATE { type Abi = Self; } pub const CRYPT_DONT_CACHE_RESULT: u32 = 8u32; pub const CRYPT_DONT_CHECK_TIME_VALIDITY: u32 = 512u32; pub const CRYPT_DONT_VERIFY_SIGNATURE: u32 = 256u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_ECC_CMS_SHARED_INFO { pub Algorithm: CRYPT_ALGORITHM_IDENTIFIER, pub EntityUInfo: CRYPTOAPI_BLOB, pub rgbSuppPubInfo: [u8; 4], } #[cfg(feature = "Win32_Foundation")] impl CRYPT_ECC_CMS_SHARED_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_ECC_CMS_SHARED_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_ECC_CMS_SHARED_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_ECC_CMS_SHARED_INFO").field("Algorithm", &self.Algorithm).field("EntityUInfo", &self.EntityUInfo).field("rgbSuppPubInfo", &self.rgbSuppPubInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_ECC_CMS_SHARED_INFO { fn eq(&self, other: &Self) -> bool { self.Algorithm == other.Algorithm && self.EntityUInfo == other.EntityUInfo && self.rgbSuppPubInfo == other.rgbSuppPubInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_ECC_CMS_SHARED_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_ECC_CMS_SHARED_INFO { type Abi = Self; } pub const CRYPT_ECC_CMS_SHARED_INFO_SUPPPUBINFO_BYTE_LENGTH: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_ECC_PRIVATE_KEY_INFO { pub dwVersion: u32, pub PrivateKey: CRYPTOAPI_BLOB, pub szCurveOid: super::super::Foundation::PSTR, pub PublicKey: CRYPT_BIT_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_ECC_PRIVATE_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_ECC_PRIVATE_KEY_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_ECC_PRIVATE_KEY_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_ECC_PRIVATE_KEY_INFO").field("dwVersion", &self.dwVersion).field("PrivateKey", &self.PrivateKey).field("szCurveOid", &self.szCurveOid).field("PublicKey", &self.PublicKey).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_ECC_PRIVATE_KEY_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.PrivateKey == other.PrivateKey && self.szCurveOid == other.szCurveOid && self.PublicKey == other.PublicKey } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_ECC_PRIVATE_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_ECC_PRIVATE_KEY_INFO { type Abi = Self; } pub const CRYPT_ECC_PRIVATE_KEY_INFO_v1: u32 = 1u32; pub const CRYPT_ENABLE_FILE_RETRIEVAL: u32 = 134217728u32; pub const CRYPT_ENABLE_SSL_REVOCATION_RETRIEVAL: u32 = 8388608u32; pub const CRYPT_ENCODE_DECODE_NONE: u32 = 0u32; pub const CRYPT_ENCODE_ENABLE_UTF8PERCENT_FLAG: u32 = 262144u32; pub const CRYPT_ENCODE_NO_SIGNATURE_BYTE_REVERSAL_FLAG: u32 = 8u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_ENCODE_OBJECT_FLAGS(pub u32); pub const CRYPT_ENCODE_ALLOC_FLAG: CRYPT_ENCODE_OBJECT_FLAGS = CRYPT_ENCODE_OBJECT_FLAGS(32768u32); pub const CRYPT_ENCODE_ENABLE_PUNYCODE_FLAG: CRYPT_ENCODE_OBJECT_FLAGS = CRYPT_ENCODE_OBJECT_FLAGS(131072u32); pub const CRYPT_UNICODE_NAME_ENCODE_DISABLE_CHECK_TYPE_FLAG: CRYPT_ENCODE_OBJECT_FLAGS = CRYPT_ENCODE_OBJECT_FLAGS(1073741824u32); pub const CRYPT_UNICODE_NAME_ENCODE_ENABLE_T61_UNICODE_FLAG: CRYPT_ENCODE_OBJECT_FLAGS = CRYPT_ENCODE_OBJECT_FLAGS(2147483648u32); pub const CRYPT_UNICODE_NAME_ENCODE_ENABLE_UTF8_UNICODE_FLAG: CRYPT_ENCODE_OBJECT_FLAGS = CRYPT_ENCODE_OBJECT_FLAGS(536870912u32); impl ::core::convert::From<u32> for CRYPT_ENCODE_OBJECT_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_ENCODE_OBJECT_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_ENCODE_OBJECT_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_ENCODE_OBJECT_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_ENCODE_OBJECT_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_ENCODE_OBJECT_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_ENCODE_OBJECT_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone)] #[repr(C)] pub struct CRYPT_ENCODE_PARA { pub cbSize: u32, pub pfnAlloc: ::core::option::Option<PFN_CRYPT_ALLOC>, pub pfnFree: ::core::option::Option<PFN_CRYPT_FREE>, } impl CRYPT_ENCODE_PARA {} impl ::core::default::Default for CRYPT_ENCODE_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_ENCODE_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_ENCODE_PARA").field("cbSize", &self.cbSize).finish() } } impl ::core::cmp::PartialEq for CRYPT_ENCODE_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pfnAlloc.map(|f| f as usize) == other.pfnAlloc.map(|f| f as usize) && self.pfnFree.map(|f| f as usize) == other.pfnFree.map(|f| f as usize) } } impl ::core::cmp::Eq for CRYPT_ENCODE_PARA {} unsafe impl ::windows::core::Abi for CRYPT_ENCODE_PARA { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const CRYPT_ENCRYPT: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_ENCRYPTED_PRIVATE_KEY_INFO { pub EncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub EncryptedPrivateKey: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_ENCRYPTED_PRIVATE_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_ENCRYPTED_PRIVATE_KEY_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_ENCRYPTED_PRIVATE_KEY_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_ENCRYPTED_PRIVATE_KEY_INFO").field("EncryptionAlgorithm", &self.EncryptionAlgorithm).field("EncryptedPrivateKey", &self.EncryptedPrivateKey).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_ENCRYPTED_PRIVATE_KEY_INFO { fn eq(&self, other: &Self) -> bool { self.EncryptionAlgorithm == other.EncryptionAlgorithm && self.EncryptedPrivateKey == other.EncryptedPrivateKey } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_ENCRYPTED_PRIVATE_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_ENCRYPTED_PRIVATE_KEY_INFO { type Abi = Self; } pub const CRYPT_ENCRYPT_ALG_OID_GROUP_ID: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_ENCRYPT_MESSAGE_PARA { pub cbSize: u32, pub dwMsgEncodingType: u32, pub hCryptProv: usize, pub ContentEncryptionAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvEncryptionAuxInfo: *mut ::core::ffi::c_void, pub dwFlags: u32, pub dwInnerContentType: u32, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_ENCRYPT_MESSAGE_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_ENCRYPT_MESSAGE_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_ENCRYPT_MESSAGE_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_ENCRYPT_MESSAGE_PARA") .field("cbSize", &self.cbSize) .field("dwMsgEncodingType", &self.dwMsgEncodingType) .field("hCryptProv", &self.hCryptProv) .field("ContentEncryptionAlgorithm", &self.ContentEncryptionAlgorithm) .field("pvEncryptionAuxInfo", &self.pvEncryptionAuxInfo) .field("dwFlags", &self.dwFlags) .field("dwInnerContentType", &self.dwInnerContentType) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_ENCRYPT_MESSAGE_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwMsgEncodingType == other.dwMsgEncodingType && self.hCryptProv == other.hCryptProv && self.ContentEncryptionAlgorithm == other.ContentEncryptionAlgorithm && self.pvEncryptionAuxInfo == other.pvEncryptionAuxInfo && self.dwFlags == other.dwFlags && self.dwInnerContentType == other.dwInnerContentType } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_ENCRYPT_MESSAGE_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_ENCRYPT_MESSAGE_PARA { type Abi = Self; } pub const CRYPT_ENHKEY_USAGE_OID_GROUP_ID: u32 = 7u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_ENROLLMENT_NAME_VALUE_PAIR { pub pwszName: super::super::Foundation::PWSTR, pub pwszValue: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_ENROLLMENT_NAME_VALUE_PAIR {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_ENROLLMENT_NAME_VALUE_PAIR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_ENROLLMENT_NAME_VALUE_PAIR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_ENROLLMENT_NAME_VALUE_PAIR").field("pwszName", &self.pwszName).field("pwszValue", &self.pwszValue).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_ENROLLMENT_NAME_VALUE_PAIR { fn eq(&self, other: &Self) -> bool { self.pwszName == other.pwszName && self.pwszValue == other.pwszValue } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_ENROLLMENT_NAME_VALUE_PAIR {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_ENROLLMENT_NAME_VALUE_PAIR { type Abi = Self; } pub const CRYPT_EXPORT: u32 = 4u32; pub const CRYPT_EXPORT_KEY: u32 = 64u32; pub const CRYPT_EXT_OR_ATTR_OID_GROUP_ID: u32 = 6u32; pub const CRYPT_FAILED: u32 = 0u32; pub const CRYPT_FASTSGC: u32 = 2u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_FIND_FLAGS(pub u32); pub const CRYPT_FIND_USER_KEYSET_FLAG: CRYPT_FIND_FLAGS = CRYPT_FIND_FLAGS(1u32); pub const CRYPT_FIND_MACHINE_KEYSET_FLAG: CRYPT_FIND_FLAGS = CRYPT_FIND_FLAGS(2u32); pub const CRYPT_FIND_SILENT_KEYSET_FLAG: CRYPT_FIND_FLAGS = CRYPT_FIND_FLAGS(64u32); impl ::core::convert::From<u32> for CRYPT_FIND_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_FIND_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_FIND_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_FIND_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_FIND_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_FIND_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_FIND_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_FIRST: u32 = 1u32; pub const CRYPT_FIRST_ALG_OID_GROUP_ID: u32 = 1u32; pub const CRYPT_FLAG_IPSEC: u32 = 16u32; pub const CRYPT_FLAG_PCT1: u32 = 1u32; pub const CRYPT_FLAG_SIGNING: u32 = 32u32; pub const CRYPT_FLAG_SSL2: u32 = 2u32; pub const CRYPT_FLAG_SSL3: u32 = 4u32; pub const CRYPT_FLAG_TLS1: u32 = 8u32; pub const CRYPT_FORMAT_COMMA: u32 = 4096u32; pub const CRYPT_FORMAT_CRLF: u32 = 512u32; pub const CRYPT_FORMAT_OID: u32 = 4u32; pub const CRYPT_FORMAT_RDN_CRLF: u32 = 512u32; pub const CRYPT_FORMAT_RDN_REVERSE: u32 = 2048u32; pub const CRYPT_FORMAT_RDN_SEMICOLON: u32 = 256u32; pub const CRYPT_FORMAT_RDN_UNQUOTE: u32 = 1024u32; pub const CRYPT_FORMAT_SEMICOLON: u32 = 256u32; pub const CRYPT_FORMAT_SIMPLE: u32 = 1u32; pub const CRYPT_FORMAT_STR_MULTI_LINE: u32 = 1u32; pub const CRYPT_FORMAT_STR_NO_HEX: u32 = 16u32; pub const CRYPT_FORMAT_X509: u32 = 2u32; pub const CRYPT_GET_INSTALLED_OID_FUNC_FLAG: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO { pub cbSize: u32, pub iDeltaCrlIndicator: i32, pub pftCacheResync: *mut super::super::Foundation::FILETIME, pub pLastSyncTime: *mut super::super::Foundation::FILETIME, pub pMaxAgeTime: *mut super::super::Foundation::FILETIME, pub pChainPara: *mut CERT_REVOCATION_CHAIN_PARA, pub pDeltaCrlIndicator: *mut CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO") .field("cbSize", &self.cbSize) .field("iDeltaCrlIndicator", &self.iDeltaCrlIndicator) .field("pftCacheResync", &self.pftCacheResync) .field("pLastSyncTime", &self.pLastSyncTime) .field("pMaxAgeTime", &self.pMaxAgeTime) .field("pChainPara", &self.pChainPara) .field("pDeltaCrlIndicator", &self.pDeltaCrlIndicator) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.iDeltaCrlIndicator == other.iDeltaCrlIndicator && self.pftCacheResync == other.pftCacheResync && self.pLastSyncTime == other.pLastSyncTime && self.pMaxAgeTime == other.pMaxAgeTime && self.pChainPara == other.pChainPara && self.pDeltaCrlIndicator == other.pDeltaCrlIndicator } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_GET_TIME_VALID_OBJECT_EXTRA_INFO { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_GET_URL_FLAGS(pub u32); pub const CRYPT_GET_URL_FROM_PROPERTY: CRYPT_GET_URL_FLAGS = CRYPT_GET_URL_FLAGS(1u32); pub const CRYPT_GET_URL_FROM_EXTENSION: CRYPT_GET_URL_FLAGS = CRYPT_GET_URL_FLAGS(2u32); pub const CRYPT_GET_URL_FROM_UNAUTH_ATTRIBUTE: CRYPT_GET_URL_FLAGS = CRYPT_GET_URL_FLAGS(4u32); pub const CRYPT_GET_URL_FROM_AUTH_ATTRIBUTE: CRYPT_GET_URL_FLAGS = CRYPT_GET_URL_FLAGS(8u32); impl ::core::convert::From<u32> for CRYPT_GET_URL_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_GET_URL_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_GET_URL_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_GET_URL_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_GET_URL_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_GET_URL_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_GET_URL_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_HASH_ALG_OID_GROUP_ID: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_HASH_INFO { pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub Hash: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_HASH_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_HASH_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_HASH_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_HASH_INFO").field("HashAlgorithm", &self.HashAlgorithm).field("Hash", &self.Hash).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_HASH_INFO { fn eq(&self, other: &Self) -> bool { self.HashAlgorithm == other.HashAlgorithm && self.Hash == other.Hash } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_HASH_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_HASH_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_HASH_MESSAGE_PARA { pub cbSize: u32, pub dwMsgEncodingType: u32, pub hCryptProv: usize, pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvHashAuxInfo: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_HASH_MESSAGE_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_HASH_MESSAGE_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_HASH_MESSAGE_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_HASH_MESSAGE_PARA").field("cbSize", &self.cbSize).field("dwMsgEncodingType", &self.dwMsgEncodingType).field("hCryptProv", &self.hCryptProv).field("HashAlgorithm", &self.HashAlgorithm).field("pvHashAuxInfo", &self.pvHashAuxInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_HASH_MESSAGE_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwMsgEncodingType == other.dwMsgEncodingType && self.hCryptProv == other.hCryptProv && self.HashAlgorithm == other.HashAlgorithm && self.pvHashAuxInfo == other.pvHashAuxInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_HASH_MESSAGE_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_HASH_MESSAGE_PARA { type Abi = Self; } pub const CRYPT_HTTP_POST_RETRIEVAL: u32 = 1048576u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_IMAGE_REF { pub pszImage: super::super::Foundation::PWSTR, pub dwFlags: CRYPT_IMAGE_REF_FLAGS, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_IMAGE_REF {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_IMAGE_REF { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_IMAGE_REF { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_IMAGE_REF").field("pszImage", &self.pszImage).field("dwFlags", &self.dwFlags).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_IMAGE_REF { fn eq(&self, other: &Self) -> bool { self.pszImage == other.pszImage && self.dwFlags == other.dwFlags } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_IMAGE_REF {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_IMAGE_REF { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_IMAGE_REF_FLAGS(pub u32); pub const CRYPT_MIN_DEPENDENCIES: CRYPT_IMAGE_REF_FLAGS = CRYPT_IMAGE_REF_FLAGS(1u32); pub const CRYPT_PROCESS_ISOLATE: CRYPT_IMAGE_REF_FLAGS = CRYPT_IMAGE_REF_FLAGS(65536u32); impl ::core::convert::From<u32> for CRYPT_IMAGE_REF_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_IMAGE_REF_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_IMAGE_REF_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_IMAGE_REF_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_IMAGE_REF_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_IMAGE_REF_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_IMAGE_REF_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_IMAGE_REG { pub pszImage: super::super::Foundation::PWSTR, pub cInterfaces: u32, pub rgpInterfaces: *mut *mut CRYPT_INTERFACE_REG, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_IMAGE_REG {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_IMAGE_REG { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_IMAGE_REG { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_IMAGE_REG").field("pszImage", &self.pszImage).field("cInterfaces", &self.cInterfaces).field("rgpInterfaces", &self.rgpInterfaces).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_IMAGE_REG { fn eq(&self, other: &Self) -> bool { self.pszImage == other.pszImage && self.cInterfaces == other.cInterfaces && self.rgpInterfaces == other.rgpInterfaces } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_IMAGE_REG {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_IMAGE_REG { type Abi = Self; } pub const CRYPT_IMPL_HARDWARE: u32 = 1u32; pub const CRYPT_IMPL_MIXED: u32 = 3u32; pub const CRYPT_IMPL_REMOVABLE: u32 = 8u32; pub const CRYPT_IMPL_SOFTWARE: u32 = 2u32; pub const CRYPT_IMPL_UNKNOWN: u32 = 4u32; pub const CRYPT_IMPORT_KEY: u32 = 128u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_IMPORT_PUBLIC_KEY_FLAGS(pub u32); pub const CRYPT_OID_INFO_PUBKEY_SIGN_KEY_FLAG: CRYPT_IMPORT_PUBLIC_KEY_FLAGS = CRYPT_IMPORT_PUBLIC_KEY_FLAGS(2147483648u32); pub const CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG: CRYPT_IMPORT_PUBLIC_KEY_FLAGS = CRYPT_IMPORT_PUBLIC_KEY_FLAGS(1073741824u32); impl ::core::convert::From<u32> for CRYPT_IMPORT_PUBLIC_KEY_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_IMPORT_PUBLIC_KEY_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_IMPORT_PUBLIC_KEY_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_IMPORT_PUBLIC_KEY_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_IMPORT_PUBLIC_KEY_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_IMPORT_PUBLIC_KEY_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_IMPORT_PUBLIC_KEY_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG: u32 = 1u32; pub const CRYPT_INSTALL_OID_INFO_BEFORE_FLAG: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_INTERFACE_REG { pub dwInterface: BCRYPT_INTERFACE, pub dwFlags: BCRYPT_TABLE, pub cFunctions: u32, pub rgpszFunctions: *mut super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_INTERFACE_REG {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_INTERFACE_REG { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_INTERFACE_REG { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_INTERFACE_REG").field("dwInterface", &self.dwInterface).field("dwFlags", &self.dwFlags).field("cFunctions", &self.cFunctions).field("rgpszFunctions", &self.rgpszFunctions).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_INTERFACE_REG { fn eq(&self, other: &Self) -> bool { self.dwInterface == other.dwInterface && self.dwFlags == other.dwFlags && self.cFunctions == other.cFunctions && self.rgpszFunctions == other.rgpszFunctions } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_INTERFACE_REG {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_INTERFACE_REG { type Abi = Self; } pub const CRYPT_KDF_OID_GROUP_ID: u32 = 10u32; pub const CRYPT_KEEP_TIME_VALID: u32 = 128u32; pub const CRYPT_KEYID_ALLOC_FLAG: u32 = 32768u32; pub const CRYPT_KEYID_DELETE_FLAG: u32 = 16u32; pub const CRYPT_KEYID_MACHINE_FLAG: u32 = 32u32; pub const CRYPT_KEYID_SET_NEW_FLAG: u32 = 8192u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_KEY_FLAGS(pub u32); pub const CRYPT_EXPORTABLE: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(1u32); pub const CRYPT_USER_PROTECTED: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(2u32); pub const CRYPT_ARCHIVABLE: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(16384u32); pub const CRYPT_CREATE_IV: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(512u32); pub const CRYPT_CREATE_SALT: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(4u32); pub const CRYPT_DATA_KEY: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(2048u32); pub const CRYPT_FORCE_KEY_PROTECTION_HIGH: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(32768u32); pub const CRYPT_KEK: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(1024u32); pub const CRYPT_INITIATOR: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(64u32); pub const CRYPT_NO_SALT: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(16u32); pub const CRYPT_ONLINE: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(128u32); pub const CRYPT_PREGEN: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(64u32); pub const CRYPT_RECIPIENT: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(16u32); pub const CRYPT_SF: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(256u32); pub const CRYPT_SGCKEY: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(8192u32); pub const CRYPT_VOLATILE: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(4096u32); pub const CRYPT_MACHINE_KEYSET: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(32u32); pub const CRYPT_USER_KEYSET: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(4096u32); pub const PKCS12_PREFER_CNG_KSP: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(256u32); pub const PKCS12_ALWAYS_CNG_KSP: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(512u32); pub const PKCS12_ALLOW_OVERWRITE_KEY: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(16384u32); pub const PKCS12_NO_PERSIST_KEY: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(32768u32); pub const PKCS12_INCLUDE_EXTENDED_PROPERTIES: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(16u32); pub const CRYPT_OAEP: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(64u32); pub const CRYPT_BLOB_VER3: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(128u32); pub const CRYPT_DESTROYKEY: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(4u32); pub const CRYPT_SSL2_FALLBACK: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(2u32); pub const CRYPT_Y_ONLY: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(1u32); pub const CRYPT_IPSEC_HMAC_KEY: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(256u32); pub const CERT_SET_KEY_PROV_HANDLE_PROP_ID: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(1u32); pub const CERT_SET_KEY_CONTEXT_PROP_ID: CRYPT_KEY_FLAGS = CRYPT_KEY_FLAGS(1u32); impl ::core::convert::From<u32> for CRYPT_KEY_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_KEY_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_KEY_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_KEY_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_KEY_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_KEY_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_KEY_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_KEY_PARAM_ID(pub u32); pub const KP_ALGID: CRYPT_KEY_PARAM_ID = CRYPT_KEY_PARAM_ID(7u32); pub const KP_CERTIFICATE: CRYPT_KEY_PARAM_ID = CRYPT_KEY_PARAM_ID(26u32); pub const KP_PERMISSIONS: CRYPT_KEY_PARAM_ID = CRYPT_KEY_PARAM_ID(6u32); pub const KP_SALT: CRYPT_KEY_PARAM_ID = CRYPT_KEY_PARAM_ID(2u32); pub const KP_SALT_EX: CRYPT_KEY_PARAM_ID = CRYPT_KEY_PARAM_ID(10u32); pub const KP_BLOCKLEN: CRYPT_KEY_PARAM_ID = CRYPT_KEY_PARAM_ID(8u32); pub const KP_GET_USE_COUNT: CRYPT_KEY_PARAM_ID = CRYPT_KEY_PARAM_ID(42u32); pub const KP_KEYLEN: CRYPT_KEY_PARAM_ID = CRYPT_KEY_PARAM_ID(9u32); impl ::core::convert::From<u32> for CRYPT_KEY_PARAM_ID { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_KEY_PARAM_ID { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_KEY_PARAM_ID { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_KEY_PARAM_ID { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_KEY_PARAM_ID { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_KEY_PARAM_ID { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_KEY_PARAM_ID { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_KEY_PROV_INFO { pub pwszContainerName: super::super::Foundation::PWSTR, pub pwszProvName: super::super::Foundation::PWSTR, pub dwProvType: u32, pub dwFlags: CRYPT_KEY_FLAGS, pub cProvParam: u32, pub rgProvParam: *mut CRYPT_KEY_PROV_PARAM, pub dwKeySpec: u32, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_KEY_PROV_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_KEY_PROV_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_KEY_PROV_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_KEY_PROV_INFO") .field("pwszContainerName", &self.pwszContainerName) .field("pwszProvName", &self.pwszProvName) .field("dwProvType", &self.dwProvType) .field("dwFlags", &self.dwFlags) .field("cProvParam", &self.cProvParam) .field("rgProvParam", &self.rgProvParam) .field("dwKeySpec", &self.dwKeySpec) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_KEY_PROV_INFO { fn eq(&self, other: &Self) -> bool { self.pwszContainerName == other.pwszContainerName && self.pwszProvName == other.pwszProvName && self.dwProvType == other.dwProvType && self.dwFlags == other.dwFlags && self.cProvParam == other.cProvParam && self.rgProvParam == other.rgProvParam && self.dwKeySpec == other.dwKeySpec } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_KEY_PROV_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_KEY_PROV_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_KEY_PROV_PARAM { pub dwParam: u32, pub pbData: *mut u8, pub cbData: u32, pub dwFlags: u32, } impl CRYPT_KEY_PROV_PARAM {} impl ::core::default::Default for CRYPT_KEY_PROV_PARAM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_KEY_PROV_PARAM { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_KEY_PROV_PARAM").field("dwParam", &self.dwParam).field("pbData", &self.pbData).field("cbData", &self.cbData).field("dwFlags", &self.dwFlags).finish() } } impl ::core::cmp::PartialEq for CRYPT_KEY_PROV_PARAM { fn eq(&self, other: &Self) -> bool { self.dwParam == other.dwParam && self.pbData == other.pbData && self.cbData == other.cbData && self.dwFlags == other.dwFlags } } impl ::core::cmp::Eq for CRYPT_KEY_PROV_PARAM {} unsafe impl ::windows::core::Abi for CRYPT_KEY_PROV_PARAM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_KEY_SIGN_MESSAGE_PARA { pub cbSize: u32, pub dwMsgAndCertEncodingType: CERT_QUERY_ENCODING_TYPE, pub Anonymous: CRYPT_KEY_SIGN_MESSAGE_PARA_0, pub dwKeySpec: CERT_KEY_SPEC, pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvHashAuxInfo: *mut ::core::ffi::c_void, pub PubKeyAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_KEY_SIGN_MESSAGE_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_KEY_SIGN_MESSAGE_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_KEY_SIGN_MESSAGE_PARA { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_KEY_SIGN_MESSAGE_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_KEY_SIGN_MESSAGE_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CRYPT_KEY_SIGN_MESSAGE_PARA_0 { pub hCryptProv: usize, pub hNCryptKey: usize, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_KEY_SIGN_MESSAGE_PARA_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_KEY_SIGN_MESSAGE_PARA_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_KEY_SIGN_MESSAGE_PARA_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_KEY_SIGN_MESSAGE_PARA_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_KEY_SIGN_MESSAGE_PARA_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_KEY_VERIFY_MESSAGE_PARA { pub cbSize: u32, pub dwMsgEncodingType: u32, pub hCryptProv: usize, } impl CRYPT_KEY_VERIFY_MESSAGE_PARA {} impl ::core::default::Default for CRYPT_KEY_VERIFY_MESSAGE_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_KEY_VERIFY_MESSAGE_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_KEY_VERIFY_MESSAGE_PARA").field("cbSize", &self.cbSize).field("dwMsgEncodingType", &self.dwMsgEncodingType).field("hCryptProv", &self.hCryptProv).finish() } } impl ::core::cmp::PartialEq for CRYPT_KEY_VERIFY_MESSAGE_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwMsgEncodingType == other.dwMsgEncodingType && self.hCryptProv == other.hCryptProv } } impl ::core::cmp::Eq for CRYPT_KEY_VERIFY_MESSAGE_PARA {} unsafe impl ::windows::core::Abi for CRYPT_KEY_VERIFY_MESSAGE_PARA { type Abi = Self; } pub const CRYPT_LAST_ALG_OID_GROUP_ID: u32 = 4u32; pub const CRYPT_LAST_OID_GROUP_ID: u32 = 10u32; pub const CRYPT_LDAP_AREC_EXCLUSIVE_RETRIEVAL: u32 = 262144u32; pub const CRYPT_LDAP_INSERT_ENTRY_ATTRIBUTE: u32 = 32768u32; pub const CRYPT_LDAP_SCOPE_BASE_ONLY_RETRIEVAL: u32 = 8192u32; pub const CRYPT_LDAP_SIGN_RETRIEVAL: u32 = 65536u32; pub const CRYPT_LITTLE_ENDIAN: u32 = 1u32; pub const CRYPT_LOCALIZED_NAME_ENCODING_TYPE: u32 = 0u32; pub const CRYPT_MAC: u32 = 32u32; pub const CRYPT_MACHINE_DEFAULT: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_MASK_GEN_ALGORITHM { pub pszObjId: super::super::Foundation::PSTR, pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_MASK_GEN_ALGORITHM {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_MASK_GEN_ALGORITHM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_MASK_GEN_ALGORITHM { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_MASK_GEN_ALGORITHM").field("pszObjId", &self.pszObjId).field("HashAlgorithm", &self.HashAlgorithm).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_MASK_GEN_ALGORITHM { fn eq(&self, other: &Self) -> bool { self.pszObjId == other.pszObjId && self.HashAlgorithm == other.HashAlgorithm } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_MASK_GEN_ALGORITHM {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_MASK_GEN_ALGORITHM { type Abi = Self; } pub const CRYPT_MATCH_ANY_ENCODING_TYPE: u32 = 4294967295u32; pub const CRYPT_MESSAGE_BARE_CONTENT_OUT_FLAG: u32 = 1u32; pub const CRYPT_MESSAGE_ENCAPSULATED_CONTENT_OUT_FLAG: u32 = 2u32; pub const CRYPT_MESSAGE_KEYID_RECIPIENT_FLAG: u32 = 4u32; pub const CRYPT_MESSAGE_KEYID_SIGNER_FLAG: u32 = 4u32; pub const CRYPT_MESSAGE_SILENT_KEYSET_FLAG: u32 = 64u32; pub const CRYPT_MODE_CBC: u32 = 1u32; pub const CRYPT_MODE_CBCI: u32 = 6u32; pub const CRYPT_MODE_CBCOFM: u32 = 9u32; pub const CRYPT_MODE_CBCOFMI: u32 = 10u32; pub const CRYPT_MODE_CFB: u32 = 4u32; pub const CRYPT_MODE_CFBP: u32 = 7u32; pub const CRYPT_MODE_CTS: u32 = 5u32; pub const CRYPT_MODE_ECB: u32 = 2u32; pub const CRYPT_MODE_OFB: u32 = 3u32; pub const CRYPT_MODE_OFBP: u32 = 8u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_MSG_TYPE(pub u32); pub const CMSG_DATA: CRYPT_MSG_TYPE = CRYPT_MSG_TYPE(1u32); pub const CMSG_SIGNED: CRYPT_MSG_TYPE = CRYPT_MSG_TYPE(2u32); pub const CMSG_ENVELOPED: CRYPT_MSG_TYPE = CRYPT_MSG_TYPE(3u32); pub const CMSG_SIGNED_AND_ENVELOPED: CRYPT_MSG_TYPE = CRYPT_MSG_TYPE(4u32); pub const CMSG_HASHED: CRYPT_MSG_TYPE = CRYPT_MSG_TYPE(5u32); impl ::core::convert::From<u32> for CRYPT_MSG_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_MSG_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_MSG_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_MSG_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_MSG_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_MSG_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_MSG_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_NDR_ENCODING: u32 = 2u32; pub const CRYPT_NEWKEYSET: u32 = 8u32; pub const CRYPT_NEXT: u32 = 2u32; pub const CRYPT_NOHASHOID: u32 = 1u32; pub const CRYPT_NOT_MODIFIED_RETRIEVAL: u32 = 4194304u32; pub const CRYPT_NO_AUTH_RETRIEVAL: u32 = 131072u32; pub const CRYPT_NO_OCSP_FAILOVER_TO_CRL_RETRIEVAL: u32 = 33554432u32; pub const CRYPT_OBJECT_LOCATOR_FIRST_RESERVED_USER_NAME_TYPE: u32 = 33u32; pub const CRYPT_OBJECT_LOCATOR_LAST_RESERVED_NAME_TYPE: u32 = 32u32; pub const CRYPT_OBJECT_LOCATOR_LAST_RESERVED_USER_NAME_TYPE: u32 = 65535u32; #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_OBJECT_LOCATOR_PROVIDER_TABLE { pub cbSize: u32, pub pfnGet: ::core::option::Option<PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_GET>, pub pfnRelease: ::core::option::Option<PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_RELEASE>, pub pfnFreePassword: ::core::option::Option<PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_FREE_PASSWORD>, pub pfnFree: ::core::option::Option<PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_FREE>, pub pfnFreeIdentifier: ::core::option::Option<PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_FREE_IDENTIFIER>, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_OBJECT_LOCATOR_PROVIDER_TABLE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_OBJECT_LOCATOR_PROVIDER_TABLE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_OBJECT_LOCATOR_PROVIDER_TABLE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_OBJECT_LOCATOR_PROVIDER_TABLE").field("cbSize", &self.cbSize).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_OBJECT_LOCATOR_PROVIDER_TABLE { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pfnGet.map(|f| f as usize) == other.pfnGet.map(|f| f as usize) && self.pfnRelease.map(|f| f as usize) == other.pfnRelease.map(|f| f as usize) && self.pfnFreePassword.map(|f| f as usize) == other.pfnFreePassword.map(|f| f as usize) && self.pfnFree.map(|f| f as usize) == other.pfnFree.map(|f| f as usize) && self.pfnFreeIdentifier.map(|f| f as usize) == other.pfnFreeIdentifier.map(|f| f as usize) } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_OBJECT_LOCATOR_PROVIDER_TABLE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_OBJECT_LOCATOR_PROVIDER_TABLE { type Abi = ::core::mem::ManuallyDrop<Self>; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_OBJECT_LOCATOR_RELEASE_REASON(pub u32); pub const CRYPT_OBJECT_LOCATOR_RELEASE_SYSTEM_SHUTDOWN: CRYPT_OBJECT_LOCATOR_RELEASE_REASON = CRYPT_OBJECT_LOCATOR_RELEASE_REASON(1u32); pub const CRYPT_OBJECT_LOCATOR_RELEASE_SERVICE_STOP: CRYPT_OBJECT_LOCATOR_RELEASE_REASON = CRYPT_OBJECT_LOCATOR_RELEASE_REASON(2u32); pub const CRYPT_OBJECT_LOCATOR_RELEASE_PROCESS_EXIT: CRYPT_OBJECT_LOCATOR_RELEASE_REASON = CRYPT_OBJECT_LOCATOR_RELEASE_REASON(3u32); pub const CRYPT_OBJECT_LOCATOR_RELEASE_DLL_UNLOAD: CRYPT_OBJECT_LOCATOR_RELEASE_REASON = CRYPT_OBJECT_LOCATOR_RELEASE_REASON(4u32); impl ::core::convert::From<u32> for CRYPT_OBJECT_LOCATOR_RELEASE_REASON { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_OBJECT_LOCATOR_RELEASE_REASON { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_OBJECT_LOCATOR_RELEASE_REASON { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_OBJECT_LOCATOR_RELEASE_REASON { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_OBJECT_LOCATOR_RELEASE_REASON { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_OBJECT_LOCATOR_RELEASE_REASON { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_OBJECT_LOCATOR_RELEASE_REASON { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_OBJECT_LOCATOR_SPN_NAME_TYPE: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_OBJID_TABLE { pub dwAlgId: u32, pub pszObjId: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_OBJID_TABLE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_OBJID_TABLE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_OBJID_TABLE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_OBJID_TABLE").field("dwAlgId", &self.dwAlgId).field("pszObjId", &self.pszObjId).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_OBJID_TABLE { fn eq(&self, other: &Self) -> bool { self.dwAlgId == other.dwAlgId && self.pszObjId == other.pszObjId } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_OBJID_TABLE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_OBJID_TABLE { type Abi = Self; } pub const CRYPT_OCSP_ONLY_RETRIEVAL: u32 = 16777216u32; pub const CRYPT_OFFLINE_CHECK_RETRIEVAL: u32 = 16384u32; pub const CRYPT_OID_DISABLE_SEARCH_DS_FLAG: u32 = 2147483648u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_OID_FUNC_ENTRY { pub pszOID: super::super::Foundation::PSTR, pub pvFuncAddr: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_OID_FUNC_ENTRY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_OID_FUNC_ENTRY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_OID_FUNC_ENTRY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_OID_FUNC_ENTRY").field("pszOID", &self.pszOID).field("pvFuncAddr", &self.pvFuncAddr).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_OID_FUNC_ENTRY { fn eq(&self, other: &Self) -> bool { self.pszOID == other.pszOID && self.pvFuncAddr == other.pvFuncAddr } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_OID_FUNC_ENTRY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_OID_FUNC_ENTRY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_OID_INFO { pub cbSize: u32, pub pszOID: super::super::Foundation::PSTR, pub pwszName: super::super::Foundation::PWSTR, pub dwGroupId: u32, pub Anonymous: CRYPT_OID_INFO_0, pub ExtraInfo: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_OID_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_OID_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_OID_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_OID_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_OID_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CRYPT_OID_INFO_0 { pub dwValue: u32, pub Algid: u32, pub dwLength: u32, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_OID_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_OID_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_OID_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_OID_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_OID_INFO_0 { type Abi = Self; } pub const CRYPT_OID_INFO_ALGID_KEY: u32 = 3u32; pub const CRYPT_OID_INFO_CNG_ALGID_KEY: u32 = 5u32; pub const CRYPT_OID_INFO_CNG_SIGN_KEY: u32 = 6u32; pub const CRYPT_OID_INFO_NAME_KEY: u32 = 2u32; pub const CRYPT_OID_INFO_OID_GROUP_BIT_LEN_MASK: u32 = 268369920u32; pub const CRYPT_OID_INFO_OID_GROUP_BIT_LEN_SHIFT: u32 = 16u32; pub const CRYPT_OID_INFO_OID_KEY: u32 = 1u32; pub const CRYPT_OID_INFO_OID_KEY_FLAGS_MASK: u32 = 4294901760u32; pub const CRYPT_OID_INFO_SIGN_KEY: u32 = 4u32; pub const CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG: u32 = 1u32; pub const CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG: u32 = 4u32; pub const CRYPT_OID_PREFER_CNG_ALGID_FLAG: u32 = 1073741824u32; pub const CRYPT_OID_PUBKEY_ENCRYPT_ONLY_FLAG: u32 = 1073741824u32; pub const CRYPT_OID_PUBKEY_SIGN_ONLY_FLAG: u32 = 2147483648u32; pub const CRYPT_OID_USE_CURVE_NAME_FOR_ENCODE_FLAG: u32 = 536870912u32; pub const CRYPT_OID_USE_CURVE_PARAMETERS_FOR_ENCODE_FLAG: u32 = 268435456u32; pub const CRYPT_OID_USE_PUBKEY_PARA_FOR_PKCS7_FLAG: u32 = 2u32; pub const CRYPT_OVERWRITE: u32 = 1u32; pub const CRYPT_OWF_REPL_LM_HASH: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_PASSWORD_CREDENTIALSA { pub cbSize: u32, pub pszUsername: super::super::Foundation::PSTR, pub pszPassword: super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_PASSWORD_CREDENTIALSA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_PASSWORD_CREDENTIALSA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_PASSWORD_CREDENTIALSA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_PASSWORD_CREDENTIALSA").field("cbSize", &self.cbSize).field("pszUsername", &self.pszUsername).field("pszPassword", &self.pszPassword).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_PASSWORD_CREDENTIALSA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pszUsername == other.pszUsername && self.pszPassword == other.pszPassword } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_PASSWORD_CREDENTIALSA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_PASSWORD_CREDENTIALSA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_PASSWORD_CREDENTIALSW { pub cbSize: u32, pub pszUsername: super::super::Foundation::PWSTR, pub pszPassword: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_PASSWORD_CREDENTIALSW {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_PASSWORD_CREDENTIALSW { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_PASSWORD_CREDENTIALSW { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_PASSWORD_CREDENTIALSW").field("cbSize", &self.cbSize).field("pszUsername", &self.pszUsername).field("pszPassword", &self.pszPassword).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_PASSWORD_CREDENTIALSW { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pszUsername == other.pszUsername && self.pszPassword == other.pszPassword } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_PASSWORD_CREDENTIALSW {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_PASSWORD_CREDENTIALSW { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_PKCS12_PBE_PARAMS { pub iIterations: i32, pub cbSalt: u32, } impl CRYPT_PKCS12_PBE_PARAMS {} impl ::core::default::Default for CRYPT_PKCS12_PBE_PARAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_PKCS12_PBE_PARAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_PKCS12_PBE_PARAMS").field("iIterations", &self.iIterations).field("cbSalt", &self.cbSalt).finish() } } impl ::core::cmp::PartialEq for CRYPT_PKCS12_PBE_PARAMS { fn eq(&self, other: &Self) -> bool { self.iIterations == other.iIterations && self.cbSalt == other.cbSalt } } impl ::core::cmp::Eq for CRYPT_PKCS12_PBE_PARAMS {} unsafe impl ::windows::core::Abi for CRYPT_PKCS12_PBE_PARAMS { type Abi = Self; } #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_PKCS8_EXPORT_PARAMS { pub hCryptProv: usize, pub dwKeySpec: u32, pub pszPrivateKeyObjId: super::super::Foundation::PSTR, pub pEncryptPrivateKeyFunc: ::core::option::Option<PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC>, pub pVoidEncryptFunc: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_PKCS8_EXPORT_PARAMS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_PKCS8_EXPORT_PARAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_PKCS8_EXPORT_PARAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_PKCS8_EXPORT_PARAMS").field("hCryptProv", &self.hCryptProv).field("dwKeySpec", &self.dwKeySpec).field("pszPrivateKeyObjId", &self.pszPrivateKeyObjId).field("pVoidEncryptFunc", &self.pVoidEncryptFunc).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_PKCS8_EXPORT_PARAMS { fn eq(&self, other: &Self) -> bool { self.hCryptProv == other.hCryptProv && self.dwKeySpec == other.dwKeySpec && self.pszPrivateKeyObjId == other.pszPrivateKeyObjId && self.pEncryptPrivateKeyFunc.map(|f| f as usize) == other.pEncryptPrivateKeyFunc.map(|f| f as usize) && self.pVoidEncryptFunc == other.pVoidEncryptFunc } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_PKCS8_EXPORT_PARAMS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_PKCS8_EXPORT_PARAMS { type Abi = ::core::mem::ManuallyDrop<Self>; } #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_PKCS8_IMPORT_PARAMS { pub PrivateKey: CRYPTOAPI_BLOB, pub pResolvehCryptProvFunc: ::core::option::Option<PCRYPT_RESOLVE_HCRYPTPROV_FUNC>, pub pVoidResolveFunc: *mut ::core::ffi::c_void, pub pDecryptPrivateKeyFunc: ::core::option::Option<PCRYPT_DECRYPT_PRIVATE_KEY_FUNC>, pub pVoidDecryptFunc: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_PKCS8_IMPORT_PARAMS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_PKCS8_IMPORT_PARAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_PKCS8_IMPORT_PARAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_PKCS8_IMPORT_PARAMS").field("PrivateKey", &self.PrivateKey).field("pVoidResolveFunc", &self.pVoidResolveFunc).field("pVoidDecryptFunc", &self.pVoidDecryptFunc).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_PKCS8_IMPORT_PARAMS { fn eq(&self, other: &Self) -> bool { self.PrivateKey == other.PrivateKey && self.pResolvehCryptProvFunc.map(|f| f as usize) == other.pResolvehCryptProvFunc.map(|f| f as usize) && self.pVoidResolveFunc == other.pVoidResolveFunc && self.pDecryptPrivateKeyFunc.map(|f| f as usize) == other.pDecryptPrivateKeyFunc.map(|f| f as usize) && self.pVoidDecryptFunc == other.pVoidDecryptFunc } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_PKCS8_IMPORT_PARAMS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_PKCS8_IMPORT_PARAMS { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const CRYPT_POLICY_OID_GROUP_ID: u32 = 8u32; pub const CRYPT_PRIORITY_BOTTOM: u32 = 4294967295u32; pub const CRYPT_PRIORITY_TOP: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_PRIVATE_KEY_INFO { pub Version: u32, pub Algorithm: CRYPT_ALGORITHM_IDENTIFIER, pub PrivateKey: CRYPTOAPI_BLOB, pub pAttributes: *mut CRYPT_ATTRIBUTES, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_PRIVATE_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_PRIVATE_KEY_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_PRIVATE_KEY_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_PRIVATE_KEY_INFO").field("Version", &self.Version).field("Algorithm", &self.Algorithm).field("PrivateKey", &self.PrivateKey).field("pAttributes", &self.pAttributes).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_PRIVATE_KEY_INFO { fn eq(&self, other: &Self) -> bool { self.Version == other.Version && self.Algorithm == other.Algorithm && self.PrivateKey == other.PrivateKey && self.pAttributes == other.pAttributes } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_PRIVATE_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_PRIVATE_KEY_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_PROPERTY_REF { pub pszProperty: super::super::Foundation::PWSTR, pub cbValue: u32, pub pbValue: *mut u8, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_PROPERTY_REF {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_PROPERTY_REF { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_PROPERTY_REF { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_PROPERTY_REF").field("pszProperty", &self.pszProperty).field("cbValue", &self.cbValue).field("pbValue", &self.pbValue).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_PROPERTY_REF { fn eq(&self, other: &Self) -> bool { self.pszProperty == other.pszProperty && self.cbValue == other.cbValue && self.pbValue == other.pbValue } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_PROPERTY_REF {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_PROPERTY_REF { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_PROVIDERS { pub cProviders: u32, pub rgpszProviders: *mut super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_PROVIDERS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_PROVIDERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_PROVIDERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_PROVIDERS").field("cProviders", &self.cProviders).field("rgpszProviders", &self.rgpszProviders).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_PROVIDERS { fn eq(&self, other: &Self) -> bool { self.cProviders == other.cProviders && self.rgpszProviders == other.rgpszProviders } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_PROVIDERS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_PROVIDERS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_PROVIDER_REF { pub dwInterface: u32, pub pszFunction: super::super::Foundation::PWSTR, pub pszProvider: super::super::Foundation::PWSTR, pub cProperties: u32, pub rgpProperties: *mut *mut CRYPT_PROPERTY_REF, pub pUM: *mut CRYPT_IMAGE_REF, pub pKM: *mut CRYPT_IMAGE_REF, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_PROVIDER_REF {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_PROVIDER_REF { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_PROVIDER_REF { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_PROVIDER_REF").field("dwInterface", &self.dwInterface).field("pszFunction", &self.pszFunction).field("pszProvider", &self.pszProvider).field("cProperties", &self.cProperties).field("rgpProperties", &self.rgpProperties).field("pUM", &self.pUM).field("pKM", &self.pKM).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_PROVIDER_REF { fn eq(&self, other: &Self) -> bool { self.dwInterface == other.dwInterface && self.pszFunction == other.pszFunction && self.pszProvider == other.pszProvider && self.cProperties == other.cProperties && self.rgpProperties == other.rgpProperties && self.pUM == other.pUM && self.pKM == other.pKM } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_PROVIDER_REF {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_PROVIDER_REF { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_PROVIDER_REFS { pub cProviders: u32, pub rgpProviders: *mut *mut CRYPT_PROVIDER_REF, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_PROVIDER_REFS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_PROVIDER_REFS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_PROVIDER_REFS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_PROVIDER_REFS").field("cProviders", &self.cProviders).field("rgpProviders", &self.rgpProviders).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_PROVIDER_REFS { fn eq(&self, other: &Self) -> bool { self.cProviders == other.cProviders && self.rgpProviders == other.rgpProviders } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_PROVIDER_REFS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_PROVIDER_REFS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_PROVIDER_REG { pub cAliases: u32, pub rgpszAliases: *mut super::super::Foundation::PWSTR, pub pUM: *mut CRYPT_IMAGE_REG, pub pKM: *mut CRYPT_IMAGE_REG, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_PROVIDER_REG {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_PROVIDER_REG { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_PROVIDER_REG { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_PROVIDER_REG").field("cAliases", &self.cAliases).field("rgpszAliases", &self.rgpszAliases).field("pUM", &self.pUM).field("pKM", &self.pKM).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_PROVIDER_REG { fn eq(&self, other: &Self) -> bool { self.cAliases == other.cAliases && self.rgpszAliases == other.rgpszAliases && self.pUM == other.pUM && self.pKM == other.pKM } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_PROVIDER_REG {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_PROVIDER_REG { type Abi = Self; } pub const CRYPT_PROXY_CACHE_RETRIEVAL: u32 = 2097152u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_PSOURCE_ALGORITHM { pub pszObjId: super::super::Foundation::PSTR, pub EncodingParameters: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_PSOURCE_ALGORITHM {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_PSOURCE_ALGORITHM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_PSOURCE_ALGORITHM { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_PSOURCE_ALGORITHM").field("pszObjId", &self.pszObjId).field("EncodingParameters", &self.EncodingParameters).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_PSOURCE_ALGORITHM { fn eq(&self, other: &Self) -> bool { self.pszObjId == other.pszObjId && self.EncodingParameters == other.EncodingParameters } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_PSOURCE_ALGORITHM {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_PSOURCE_ALGORITHM { type Abi = Self; } pub const CRYPT_PSTORE: u32 = 2u32; pub const CRYPT_PUBKEY_ALG_OID_GROUP_ID: u32 = 3u32; pub const CRYPT_RANDOM_QUERY_STRING_RETRIEVAL: u32 = 67108864u32; pub const CRYPT_RC2_128BIT_VERSION: u32 = 58u32; pub const CRYPT_RC2_40BIT_VERSION: u32 = 160u32; pub const CRYPT_RC2_56BIT_VERSION: u32 = 52u32; pub const CRYPT_RC2_64BIT_VERSION: u32 = 120u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_RC2_CBC_PARAMETERS { pub dwVersion: u32, pub fIV: super::super::Foundation::BOOL, pub rgbIV: [u8; 8], } #[cfg(feature = "Win32_Foundation")] impl CRYPT_RC2_CBC_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_RC2_CBC_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_RC2_CBC_PARAMETERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_RC2_CBC_PARAMETERS").field("dwVersion", &self.dwVersion).field("fIV", &self.fIV).field("rgbIV", &self.rgbIV).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_RC2_CBC_PARAMETERS { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.fIV == other.fIV && self.rgbIV == other.rgbIV } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_RC2_CBC_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_RC2_CBC_PARAMETERS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_RC4_KEY_STATE { pub Key: [u8; 16], pub SBox: [u8; 256], pub i: u8, pub j: u8, } impl CRYPT_RC4_KEY_STATE {} impl ::core::default::Default for CRYPT_RC4_KEY_STATE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_RC4_KEY_STATE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_RC4_KEY_STATE").field("Key", &self.Key).field("SBox", &self.SBox).field("i", &self.i).field("j", &self.j).finish() } } impl ::core::cmp::PartialEq for CRYPT_RC4_KEY_STATE { fn eq(&self, other: &Self) -> bool { self.Key == other.Key && self.SBox == other.SBox && self.i == other.i && self.j == other.j } } impl ::core::cmp::Eq for CRYPT_RC4_KEY_STATE {} unsafe impl ::windows::core::Abi for CRYPT_RC4_KEY_STATE { type Abi = Self; } pub const CRYPT_RDN_ATTR_OID_GROUP_ID: u32 = 5u32; pub const CRYPT_READ: u32 = 8u32; pub const CRYPT_REGISTER_FIRST_INDEX: u32 = 0u32; pub const CRYPT_REGISTER_LAST_INDEX: u32 = 4294967295u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_RETRIEVE_AUX_INFO { pub cbSize: u32, pub pLastSyncTime: *mut super::super::Foundation::FILETIME, pub dwMaxUrlRetrievalByteCount: u32, pub pPreFetchInfo: *mut CRYPTNET_URL_CACHE_PRE_FETCH_INFO, pub pFlushInfo: *mut CRYPTNET_URL_CACHE_FLUSH_INFO, pub ppResponseInfo: *mut *mut CRYPTNET_URL_CACHE_RESPONSE_INFO, pub pwszCacheFileNamePrefix: super::super::Foundation::PWSTR, pub pftCacheResync: *mut super::super::Foundation::FILETIME, pub fProxyCacheRetrieval: super::super::Foundation::BOOL, pub dwHttpStatusCode: u32, pub ppwszErrorResponseHeaders: *mut super::super::Foundation::PWSTR, pub ppErrorContentBlob: *mut *mut CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_RETRIEVE_AUX_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_RETRIEVE_AUX_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_RETRIEVE_AUX_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_RETRIEVE_AUX_INFO") .field("cbSize", &self.cbSize) .field("pLastSyncTime", &self.pLastSyncTime) .field("dwMaxUrlRetrievalByteCount", &self.dwMaxUrlRetrievalByteCount) .field("pPreFetchInfo", &self.pPreFetchInfo) .field("pFlushInfo", &self.pFlushInfo) .field("ppResponseInfo", &self.ppResponseInfo) .field("pwszCacheFileNamePrefix", &self.pwszCacheFileNamePrefix) .field("pftCacheResync", &self.pftCacheResync) .field("fProxyCacheRetrieval", &self.fProxyCacheRetrieval) .field("dwHttpStatusCode", &self.dwHttpStatusCode) .field("ppwszErrorResponseHeaders", &self.ppwszErrorResponseHeaders) .field("ppErrorContentBlob", &self.ppErrorContentBlob) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_RETRIEVE_AUX_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pLastSyncTime == other.pLastSyncTime && self.dwMaxUrlRetrievalByteCount == other.dwMaxUrlRetrievalByteCount && self.pPreFetchInfo == other.pPreFetchInfo && self.pFlushInfo == other.pFlushInfo && self.ppResponseInfo == other.ppResponseInfo && self.pwszCacheFileNamePrefix == other.pwszCacheFileNamePrefix && self.pftCacheResync == other.pftCacheResync && self.fProxyCacheRetrieval == other.fProxyCacheRetrieval && self.dwHttpStatusCode == other.dwHttpStatusCode && self.ppwszErrorResponseHeaders == other.ppwszErrorResponseHeaders && self.ppErrorContentBlob == other.ppErrorContentBlob } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_RETRIEVE_AUX_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_RETRIEVE_AUX_INFO { type Abi = Self; } pub const CRYPT_RETRIEVE_MAX_ERROR_CONTENT_LENGTH: u32 = 4096u32; pub const CRYPT_RETRIEVE_MULTIPLE_OBJECTS: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_RSAES_OAEP_PARAMETERS { pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub MaskGenAlgorithm: CRYPT_MASK_GEN_ALGORITHM, pub PSourceAlgorithm: CRYPT_PSOURCE_ALGORITHM, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_RSAES_OAEP_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_RSAES_OAEP_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_RSAES_OAEP_PARAMETERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_RSAES_OAEP_PARAMETERS").field("HashAlgorithm", &self.HashAlgorithm).field("MaskGenAlgorithm", &self.MaskGenAlgorithm).field("PSourceAlgorithm", &self.PSourceAlgorithm).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_RSAES_OAEP_PARAMETERS { fn eq(&self, other: &Self) -> bool { self.HashAlgorithm == other.HashAlgorithm && self.MaskGenAlgorithm == other.MaskGenAlgorithm && self.PSourceAlgorithm == other.PSourceAlgorithm } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_RSAES_OAEP_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_RSAES_OAEP_PARAMETERS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_RSA_SSA_PSS_PARAMETERS { pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub MaskGenAlgorithm: CRYPT_MASK_GEN_ALGORITHM, pub dwSaltLength: u32, pub dwTrailerField: u32, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_RSA_SSA_PSS_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_RSA_SSA_PSS_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_RSA_SSA_PSS_PARAMETERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_RSA_SSA_PSS_PARAMETERS").field("HashAlgorithm", &self.HashAlgorithm).field("MaskGenAlgorithm", &self.MaskGenAlgorithm).field("dwSaltLength", &self.dwSaltLength).field("dwTrailerField", &self.dwTrailerField).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_RSA_SSA_PSS_PARAMETERS { fn eq(&self, other: &Self) -> bool { self.HashAlgorithm == other.HashAlgorithm && self.MaskGenAlgorithm == other.MaskGenAlgorithm && self.dwSaltLength == other.dwSaltLength && self.dwTrailerField == other.dwTrailerField } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_RSA_SSA_PSS_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_RSA_SSA_PSS_PARAMETERS { type Abi = Self; } pub const CRYPT_SECRETDIGEST: u32 = 1u32; pub const CRYPT_SEC_DESCR: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_SEQUENCE_OF_ANY { pub cValue: u32, pub rgValue: *mut CRYPTOAPI_BLOB, } impl CRYPT_SEQUENCE_OF_ANY {} impl ::core::default::Default for CRYPT_SEQUENCE_OF_ANY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_SEQUENCE_OF_ANY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_SEQUENCE_OF_ANY").field("cValue", &self.cValue).field("rgValue", &self.rgValue).finish() } } impl ::core::cmp::PartialEq for CRYPT_SEQUENCE_OF_ANY { fn eq(&self, other: &Self) -> bool { self.cValue == other.cValue && self.rgValue == other.rgValue } } impl ::core::cmp::Eq for CRYPT_SEQUENCE_OF_ANY {} unsafe impl ::windows::core::Abi for CRYPT_SEQUENCE_OF_ANY { type Abi = Self; } pub const CRYPT_SERVER: u32 = 1024u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_SET_HASH_PARAM(pub u32); pub const HP_HMAC_INFO: CRYPT_SET_HASH_PARAM = CRYPT_SET_HASH_PARAM(5u32); pub const HP_HASHVAL: CRYPT_SET_HASH_PARAM = CRYPT_SET_HASH_PARAM(2u32); impl ::core::convert::From<u32> for CRYPT_SET_HASH_PARAM { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_SET_HASH_PARAM { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_SET_HASH_PARAM { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_SET_HASH_PARAM { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_SET_HASH_PARAM { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_SET_HASH_PARAM { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_SET_HASH_PARAM { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_SET_PROV_PARAM_ID(pub u32); pub const PP_CLIENT_HWND: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(1u32); pub const PP_DELETEKEY: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(24u32); pub const PP_KEYEXCHANGE_ALG: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(14u32); pub const PP_KEYEXCHANGE_PIN: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(32u32); pub const PP_KEYEXCHANGE_KEYSIZE: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(12u32); pub const PP_KEYSET_SEC_DESCR: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(8u32); pub const PP_PIN_PROMPT_STRING: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(44u32); pub const PP_ROOT_CERTSTORE: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(46u32); pub const PP_SIGNATURE_ALG: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(15u32); pub const PP_SIGNATURE_PIN: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(33u32); pub const PP_SIGNATURE_KEYSIZE: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(13u32); pub const PP_UI_PROMPT: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(21u32); pub const PP_USE_HARDWARE_RNG: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(38u32); pub const PP_USER_CERTSTORE: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(42u32); pub const PP_SECURE_KEYEXCHANGE_PIN: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(47u32); pub const PP_SECURE_SIGNATURE_PIN: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(48u32); pub const PP_SMARTCARD_READER: CRYPT_SET_PROV_PARAM_ID = CRYPT_SET_PROV_PARAM_ID(43u32); impl ::core::convert::From<u32> for CRYPT_SET_PROV_PARAM_ID { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_SET_PROV_PARAM_ID { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_SET_PROV_PARAM_ID { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_SET_PROV_PARAM_ID { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_SET_PROV_PARAM_ID { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_SET_PROV_PARAM_ID { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_SET_PROV_PARAM_ID { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_SGC: u32 = 1u32; pub const CRYPT_SGC_ENUM: u32 = 4u32; pub const CRYPT_SIGN_ALG_OID_GROUP_ID: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_SIGN_MESSAGE_PARA { pub cbSize: u32, pub dwMsgEncodingType: u32, pub pSigningCert: *mut CERT_CONTEXT, pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub pvHashAuxInfo: *mut ::core::ffi::c_void, pub cMsgCert: u32, pub rgpMsgCert: *mut *mut CERT_CONTEXT, pub cMsgCrl: u32, pub rgpMsgCrl: *mut *mut CRL_CONTEXT, pub cAuthAttr: u32, pub rgAuthAttr: *mut CRYPT_ATTRIBUTE, pub cUnauthAttr: u32, pub rgUnauthAttr: *mut CRYPT_ATTRIBUTE, pub dwFlags: u32, pub dwInnerContentType: u32, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_SIGN_MESSAGE_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_SIGN_MESSAGE_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_SIGN_MESSAGE_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_SIGN_MESSAGE_PARA") .field("cbSize", &self.cbSize) .field("dwMsgEncodingType", &self.dwMsgEncodingType) .field("pSigningCert", &self.pSigningCert) .field("HashAlgorithm", &self.HashAlgorithm) .field("pvHashAuxInfo", &self.pvHashAuxInfo) .field("cMsgCert", &self.cMsgCert) .field("rgpMsgCert", &self.rgpMsgCert) .field("cMsgCrl", &self.cMsgCrl) .field("rgpMsgCrl", &self.rgpMsgCrl) .field("cAuthAttr", &self.cAuthAttr) .field("rgAuthAttr", &self.rgAuthAttr) .field("cUnauthAttr", &self.cUnauthAttr) .field("rgUnauthAttr", &self.rgUnauthAttr) .field("dwFlags", &self.dwFlags) .field("dwInnerContentType", &self.dwInnerContentType) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_SIGN_MESSAGE_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwMsgEncodingType == other.dwMsgEncodingType && self.pSigningCert == other.pSigningCert && self.HashAlgorithm == other.HashAlgorithm && self.pvHashAuxInfo == other.pvHashAuxInfo && self.cMsgCert == other.cMsgCert && self.rgpMsgCert == other.rgpMsgCert && self.cMsgCrl == other.cMsgCrl && self.rgpMsgCrl == other.rgpMsgCrl && self.cAuthAttr == other.cAuthAttr && self.rgAuthAttr == other.rgAuthAttr && self.cUnauthAttr == other.cUnauthAttr && self.rgUnauthAttr == other.rgUnauthAttr && self.dwFlags == other.dwFlags && self.dwInnerContentType == other.dwInnerContentType } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_SIGN_MESSAGE_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_SIGN_MESSAGE_PARA { type Abi = Self; } pub const CRYPT_SILENT: u32 = 64u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_SMART_CARD_ROOT_INFO { pub rgbCardID: [u8; 16], pub luid: ROOT_INFO_LUID, } impl CRYPT_SMART_CARD_ROOT_INFO {} impl ::core::default::Default for CRYPT_SMART_CARD_ROOT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_SMART_CARD_ROOT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_SMART_CARD_ROOT_INFO").field("rgbCardID", &self.rgbCardID).field("luid", &self.luid).finish() } } impl ::core::cmp::PartialEq for CRYPT_SMART_CARD_ROOT_INFO { fn eq(&self, other: &Self) -> bool { self.rgbCardID == other.rgbCardID && self.luid == other.luid } } impl ::core::cmp::Eq for CRYPT_SMART_CARD_ROOT_INFO {} unsafe impl ::windows::core::Abi for CRYPT_SMART_CARD_ROOT_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_SMIME_CAPABILITIES { pub cCapability: u32, pub rgCapability: *mut CRYPT_SMIME_CAPABILITY, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_SMIME_CAPABILITIES {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_SMIME_CAPABILITIES { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_SMIME_CAPABILITIES { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_SMIME_CAPABILITIES").field("cCapability", &self.cCapability).field("rgCapability", &self.rgCapability).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_SMIME_CAPABILITIES { fn eq(&self, other: &Self) -> bool { self.cCapability == other.cCapability && self.rgCapability == other.rgCapability } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_SMIME_CAPABILITIES {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_SMIME_CAPABILITIES { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_SMIME_CAPABILITY { pub pszObjId: super::super::Foundation::PSTR, pub Parameters: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_SMIME_CAPABILITY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_SMIME_CAPABILITY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_SMIME_CAPABILITY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_SMIME_CAPABILITY").field("pszObjId", &self.pszObjId).field("Parameters", &self.Parameters).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_SMIME_CAPABILITY { fn eq(&self, other: &Self) -> bool { self.pszObjId == other.pszObjId && self.Parameters == other.Parameters } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_SMIME_CAPABILITY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_SMIME_CAPABILITY { type Abi = Self; } pub const CRYPT_SORTED_CTL_ENCODE_HASHED_SUBJECT_IDENTIFIER_FLAG: u32 = 65536u32; pub const CRYPT_STICKY_CACHE_RETRIEVAL: u32 = 4096u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_STRING(pub u32); pub const CRYPT_STRING_BASE64HEADER: CRYPT_STRING = CRYPT_STRING(0u32); pub const CRYPT_STRING_BASE64: CRYPT_STRING = CRYPT_STRING(1u32); pub const CRYPT_STRING_BINARY: CRYPT_STRING = CRYPT_STRING(2u32); pub const CRYPT_STRING_BASE64REQUESTHEADER: CRYPT_STRING = CRYPT_STRING(3u32); pub const CRYPT_STRING_HEX: CRYPT_STRING = CRYPT_STRING(4u32); pub const CRYPT_STRING_HEXASCII: CRYPT_STRING = CRYPT_STRING(5u32); pub const CRYPT_STRING_BASE64X509CRLHEADER: CRYPT_STRING = CRYPT_STRING(9u32); pub const CRYPT_STRING_HEXADDR: CRYPT_STRING = CRYPT_STRING(10u32); pub const CRYPT_STRING_HEXASCIIADDR: CRYPT_STRING = CRYPT_STRING(11u32); pub const CRYPT_STRING_HEXRAW: CRYPT_STRING = CRYPT_STRING(12u32); pub const CRYPT_STRING_STRICT: CRYPT_STRING = CRYPT_STRING(536870912u32); pub const CRYPT_STRING_BASE64_ANY: CRYPT_STRING = CRYPT_STRING(6u32); pub const CRYPT_STRING_ANY: CRYPT_STRING = CRYPT_STRING(7u32); pub const CRYPT_STRING_HEX_ANY: CRYPT_STRING = CRYPT_STRING(8u32); impl ::core::convert::From<u32> for CRYPT_STRING { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_STRING { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_STRING { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_STRING { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_STRING { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_STRING { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_STRING { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_STRING_BASE64URI: u32 = 13u32; pub const CRYPT_STRING_ENCODEMASK: u32 = 255u32; pub const CRYPT_STRING_HASHDATA: u32 = 268435456u32; pub const CRYPT_STRING_NOCR: u32 = 2147483648u32; pub const CRYPT_STRING_NOCRLF: u32 = 1073741824u32; pub const CRYPT_STRING_PERCENTESCAPE: u32 = 134217728u32; pub const CRYPT_STRING_RESERVED100: u32 = 256u32; pub const CRYPT_STRING_RESERVED200: u32 = 512u32; pub const CRYPT_SUCCEED: u32 = 1u32; pub const CRYPT_TEMPLATE_OID_GROUP_ID: u32 = 9u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_TIMESTAMP_ACCURACY { pub dwSeconds: u32, pub dwMillis: u32, pub dwMicros: u32, } impl CRYPT_TIMESTAMP_ACCURACY {} impl ::core::default::Default for CRYPT_TIMESTAMP_ACCURACY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_TIMESTAMP_ACCURACY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_TIMESTAMP_ACCURACY").field("dwSeconds", &self.dwSeconds).field("dwMillis", &self.dwMillis).field("dwMicros", &self.dwMicros).finish() } } impl ::core::cmp::PartialEq for CRYPT_TIMESTAMP_ACCURACY { fn eq(&self, other: &Self) -> bool { self.dwSeconds == other.dwSeconds && self.dwMillis == other.dwMillis && self.dwMicros == other.dwMicros } } impl ::core::cmp::Eq for CRYPT_TIMESTAMP_ACCURACY {} unsafe impl ::windows::core::Abi for CRYPT_TIMESTAMP_ACCURACY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_TIMESTAMP_CONTEXT { pub cbEncoded: u32, pub pbEncoded: *mut u8, pub pTimeStamp: *mut CRYPT_TIMESTAMP_INFO, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_TIMESTAMP_CONTEXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_TIMESTAMP_CONTEXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_TIMESTAMP_CONTEXT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_TIMESTAMP_CONTEXT").field("cbEncoded", &self.cbEncoded).field("pbEncoded", &self.pbEncoded).field("pTimeStamp", &self.pTimeStamp).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_TIMESTAMP_CONTEXT { fn eq(&self, other: &Self) -> bool { self.cbEncoded == other.cbEncoded && self.pbEncoded == other.pbEncoded && self.pTimeStamp == other.pTimeStamp } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_TIMESTAMP_CONTEXT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_TIMESTAMP_CONTEXT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_TIMESTAMP_INFO { pub dwVersion: u32, pub pszTSAPolicyId: super::super::Foundation::PSTR, pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub HashedMessage: CRYPTOAPI_BLOB, pub SerialNumber: CRYPTOAPI_BLOB, pub ftTime: super::super::Foundation::FILETIME, pub pvAccuracy: *mut CRYPT_TIMESTAMP_ACCURACY, pub fOrdering: super::super::Foundation::BOOL, pub Nonce: CRYPTOAPI_BLOB, pub Tsa: CRYPTOAPI_BLOB, pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_TIMESTAMP_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_TIMESTAMP_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_TIMESTAMP_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_TIMESTAMP_INFO") .field("dwVersion", &self.dwVersion) .field("pszTSAPolicyId", &self.pszTSAPolicyId) .field("HashAlgorithm", &self.HashAlgorithm) .field("HashedMessage", &self.HashedMessage) .field("SerialNumber", &self.SerialNumber) .field("ftTime", &self.ftTime) .field("pvAccuracy", &self.pvAccuracy) .field("fOrdering", &self.fOrdering) .field("Nonce", &self.Nonce) .field("Tsa", &self.Tsa) .field("cExtension", &self.cExtension) .field("rgExtension", &self.rgExtension) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_TIMESTAMP_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.pszTSAPolicyId == other.pszTSAPolicyId && self.HashAlgorithm == other.HashAlgorithm && self.HashedMessage == other.HashedMessage && self.SerialNumber == other.SerialNumber && self.ftTime == other.ftTime && self.pvAccuracy == other.pvAccuracy && self.fOrdering == other.fOrdering && self.Nonce == other.Nonce && self.Tsa == other.Tsa && self.cExtension == other.cExtension && self.rgExtension == other.rgExtension } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_TIMESTAMP_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_TIMESTAMP_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_TIMESTAMP_PARA { pub pszTSAPolicyId: super::super::Foundation::PSTR, pub fRequestCerts: super::super::Foundation::BOOL, pub Nonce: CRYPTOAPI_BLOB, pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_TIMESTAMP_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_TIMESTAMP_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_TIMESTAMP_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_TIMESTAMP_PARA").field("pszTSAPolicyId", &self.pszTSAPolicyId).field("fRequestCerts", &self.fRequestCerts).field("Nonce", &self.Nonce).field("cExtension", &self.cExtension).field("rgExtension", &self.rgExtension).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_TIMESTAMP_PARA { fn eq(&self, other: &Self) -> bool { self.pszTSAPolicyId == other.pszTSAPolicyId && self.fRequestCerts == other.fRequestCerts && self.Nonce == other.Nonce && self.cExtension == other.cExtension && self.rgExtension == other.rgExtension } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_TIMESTAMP_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_TIMESTAMP_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_TIMESTAMP_REQUEST { pub dwVersion: CRYPT_TIMESTAMP_VERSION, pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub HashedMessage: CRYPTOAPI_BLOB, pub pszTSAPolicyId: super::super::Foundation::PSTR, pub Nonce: CRYPTOAPI_BLOB, pub fCertReq: super::super::Foundation::BOOL, pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_TIMESTAMP_REQUEST {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_TIMESTAMP_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_TIMESTAMP_REQUEST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_TIMESTAMP_REQUEST") .field("dwVersion", &self.dwVersion) .field("HashAlgorithm", &self.HashAlgorithm) .field("HashedMessage", &self.HashedMessage) .field("pszTSAPolicyId", &self.pszTSAPolicyId) .field("Nonce", &self.Nonce) .field("fCertReq", &self.fCertReq) .field("cExtension", &self.cExtension) .field("rgExtension", &self.rgExtension) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_TIMESTAMP_REQUEST { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.HashAlgorithm == other.HashAlgorithm && self.HashedMessage == other.HashedMessage && self.pszTSAPolicyId == other.pszTSAPolicyId && self.Nonce == other.Nonce && self.fCertReq == other.fCertReq && self.cExtension == other.cExtension && self.rgExtension == other.rgExtension } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_TIMESTAMP_REQUEST {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_TIMESTAMP_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_TIMESTAMP_RESPONSE { pub dwStatus: CRYPT_TIMESTAMP_RESPONSE_STATUS, pub cFreeText: u32, pub rgFreeText: *mut super::super::Foundation::PWSTR, pub FailureInfo: CRYPT_BIT_BLOB, pub ContentInfo: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_TIMESTAMP_RESPONSE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_TIMESTAMP_RESPONSE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_TIMESTAMP_RESPONSE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_TIMESTAMP_RESPONSE").field("dwStatus", &self.dwStatus).field("cFreeText", &self.cFreeText).field("rgFreeText", &self.rgFreeText).field("FailureInfo", &self.FailureInfo).field("ContentInfo", &self.ContentInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_TIMESTAMP_RESPONSE { fn eq(&self, other: &Self) -> bool { self.dwStatus == other.dwStatus && self.cFreeText == other.cFreeText && self.rgFreeText == other.rgFreeText && self.FailureInfo == other.FailureInfo && self.ContentInfo == other.ContentInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_TIMESTAMP_RESPONSE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_TIMESTAMP_RESPONSE { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_TIMESTAMP_RESPONSE_STATUS(pub u32); pub const TIMESTAMP_STATUS_GRANTED: CRYPT_TIMESTAMP_RESPONSE_STATUS = CRYPT_TIMESTAMP_RESPONSE_STATUS(0u32); pub const TIMESTAMP_STATUS_GRANTED_WITH_MODS: CRYPT_TIMESTAMP_RESPONSE_STATUS = CRYPT_TIMESTAMP_RESPONSE_STATUS(1u32); pub const TIMESTAMP_STATUS_REJECTED: CRYPT_TIMESTAMP_RESPONSE_STATUS = CRYPT_TIMESTAMP_RESPONSE_STATUS(2u32); pub const TIMESTAMP_STATUS_WAITING: CRYPT_TIMESTAMP_RESPONSE_STATUS = CRYPT_TIMESTAMP_RESPONSE_STATUS(3u32); pub const TIMESTAMP_STATUS_REVOCATION_WARNING: CRYPT_TIMESTAMP_RESPONSE_STATUS = CRYPT_TIMESTAMP_RESPONSE_STATUS(4u32); pub const TIMESTAMP_STATUS_REVOKED: CRYPT_TIMESTAMP_RESPONSE_STATUS = CRYPT_TIMESTAMP_RESPONSE_STATUS(5u32); impl ::core::convert::From<u32> for CRYPT_TIMESTAMP_RESPONSE_STATUS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_TIMESTAMP_RESPONSE_STATUS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_TIMESTAMP_RESPONSE_STATUS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_TIMESTAMP_RESPONSE_STATUS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_TIMESTAMP_RESPONSE_STATUS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_TIMESTAMP_RESPONSE_STATUS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_TIMESTAMP_RESPONSE_STATUS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_TIMESTAMP_VERSION(pub u32); pub const TIMESTAMP_VERSION: CRYPT_TIMESTAMP_VERSION = CRYPT_TIMESTAMP_VERSION(1u32); impl ::core::convert::From<u32> for CRYPT_TIMESTAMP_VERSION { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_TIMESTAMP_VERSION { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_TIMESTAMP_VERSION { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_TIMESTAMP_VERSION { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_TIMESTAMP_VERSION { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_TIMESTAMP_VERSION { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_TIMESTAMP_VERSION { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_TIME_STAMP_REQUEST_INFO { pub pszTimeStampAlgorithm: super::super::Foundation::PSTR, pub pszContentType: super::super::Foundation::PSTR, pub Content: CRYPTOAPI_BLOB, pub cAttribute: u32, pub rgAttribute: *mut CRYPT_ATTRIBUTE, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_TIME_STAMP_REQUEST_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_TIME_STAMP_REQUEST_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_TIME_STAMP_REQUEST_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_TIME_STAMP_REQUEST_INFO").field("pszTimeStampAlgorithm", &self.pszTimeStampAlgorithm).field("pszContentType", &self.pszContentType).field("Content", &self.Content).field("cAttribute", &self.cAttribute).field("rgAttribute", &self.rgAttribute).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_TIME_STAMP_REQUEST_INFO { fn eq(&self, other: &Self) -> bool { self.pszTimeStampAlgorithm == other.pszTimeStampAlgorithm && self.pszContentType == other.pszContentType && self.Content == other.Content && self.cAttribute == other.cAttribute && self.rgAttribute == other.rgAttribute } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_TIME_STAMP_REQUEST_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_TIME_STAMP_REQUEST_INFO { type Abi = Self; } pub const CRYPT_TYPE2_FORMAT: u32 = 2u32; pub const CRYPT_UI_PROMPT: u32 = 4u32; pub const CRYPT_UNICODE_NAME_DECODE_DISABLE_IE4_UTF8_FLAG: u32 = 16777216u32; pub const CRYPT_UNICODE_NAME_ENCODE_FORCE_UTF8_UNICODE_FLAG: u32 = 268435456u32; pub const CRYPT_UPDATE_KEY: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_URL_ARRAY { pub cUrl: u32, pub rgwszUrl: *mut super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_URL_ARRAY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_URL_ARRAY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_URL_ARRAY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_URL_ARRAY").field("cUrl", &self.cUrl).field("rgwszUrl", &self.rgwszUrl).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_URL_ARRAY { fn eq(&self, other: &Self) -> bool { self.cUrl == other.cUrl && self.rgwszUrl == other.rgwszUrl } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_URL_ARRAY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_URL_ARRAY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_URL_INFO { pub cbSize: u32, pub dwSyncDeltaTime: u32, pub cGroup: u32, pub rgcGroupEntry: *mut u32, } impl CRYPT_URL_INFO {} impl ::core::default::Default for CRYPT_URL_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_URL_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_URL_INFO").field("cbSize", &self.cbSize).field("dwSyncDeltaTime", &self.dwSyncDeltaTime).field("cGroup", &self.cGroup).field("rgcGroupEntry", &self.rgcGroupEntry).finish() } } impl ::core::cmp::PartialEq for CRYPT_URL_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwSyncDeltaTime == other.dwSyncDeltaTime && self.cGroup == other.cGroup && self.rgcGroupEntry == other.rgcGroupEntry } } impl ::core::cmp::Eq for CRYPT_URL_INFO {} unsafe impl ::windows::core::Abi for CRYPT_URL_INFO { type Abi = Self; } pub const CRYPT_USERDATA: u32 = 1u32; pub const CRYPT_USER_DEFAULT: u32 = 2u32; pub const CRYPT_USER_PROTECTED_STRONG: u32 = 1048576u32; pub const CRYPT_VERIFYCONTEXT: u32 = 4026531840u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_VERIFY_CERT_FLAGS(pub u32); pub const CRYPT_VERIFY_CERT_SIGN_DISABLE_MD2_MD4_FLAG: CRYPT_VERIFY_CERT_FLAGS = CRYPT_VERIFY_CERT_FLAGS(1u32); pub const CRYPT_VERIFY_CERT_SIGN_SET_STRONG_PROPERTIES_FLAG: CRYPT_VERIFY_CERT_FLAGS = CRYPT_VERIFY_CERT_FLAGS(2u32); pub const CRYPT_VERIFY_CERT_SIGN_RETURN_STRONG_PROPERTIES_FLAG: CRYPT_VERIFY_CERT_FLAGS = CRYPT_VERIFY_CERT_FLAGS(4u32); impl ::core::convert::From<u32> for CRYPT_VERIFY_CERT_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_VERIFY_CERT_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_VERIFY_CERT_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_VERIFY_CERT_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_VERIFY_CERT_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_VERIFY_CERT_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_VERIFY_CERT_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_VERIFY_CERT_SIGN_CHECK_WEAK_HASH_FLAG: u32 = 8u32; pub const CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT: u32 = 2u32; pub const CRYPT_VERIFY_CERT_SIGN_ISSUER_CHAIN: u32 = 3u32; pub const CRYPT_VERIFY_CERT_SIGN_ISSUER_NULL: u32 = 4u32; pub const CRYPT_VERIFY_CERT_SIGN_ISSUER_PUBKEY: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO { pub CertSignHashCNGAlgPropData: CRYPTOAPI_BLOB, pub CertIssuerPubKeyBitLengthPropData: CRYPTOAPI_BLOB, } impl CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO {} impl ::core::default::Default for CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO").field("CertSignHashCNGAlgPropData", &self.CertSignHashCNGAlgPropData).field("CertIssuerPubKeyBitLengthPropData", &self.CertIssuerPubKeyBitLengthPropData).finish() } } impl ::core::cmp::PartialEq for CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO { fn eq(&self, other: &Self) -> bool { self.CertSignHashCNGAlgPropData == other.CertSignHashCNGAlgPropData && self.CertIssuerPubKeyBitLengthPropData == other.CertIssuerPubKeyBitLengthPropData } } impl ::core::cmp::Eq for CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO {} unsafe impl ::windows::core::Abi for CRYPT_VERIFY_CERT_SIGN_STRONG_PROPERTIES_INFO { type Abi = Self; } pub const CRYPT_VERIFY_CERT_SIGN_SUBJECT_BLOB: u32 = 1u32; pub const CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT: u32 = 2u32; pub const CRYPT_VERIFY_CERT_SIGN_SUBJECT_CRL: u32 = 3u32; pub const CRYPT_VERIFY_CERT_SIGN_SUBJECT_OCSP_BASIC_SIGNED_RESPONSE: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_VERIFY_CERT_SIGN_WEAK_HASH_INFO { pub cCNGHashAlgid: u32, pub rgpwszCNGHashAlgid: *mut super::super::Foundation::PWSTR, pub dwWeakIndex: u32, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_VERIFY_CERT_SIGN_WEAK_HASH_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_VERIFY_CERT_SIGN_WEAK_HASH_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_VERIFY_CERT_SIGN_WEAK_HASH_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_VERIFY_CERT_SIGN_WEAK_HASH_INFO").field("cCNGHashAlgid", &self.cCNGHashAlgid).field("rgpwszCNGHashAlgid", &self.rgpwszCNGHashAlgid).field("dwWeakIndex", &self.dwWeakIndex).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_VERIFY_CERT_SIGN_WEAK_HASH_INFO { fn eq(&self, other: &Self) -> bool { self.cCNGHashAlgid == other.cCNGHashAlgid && self.rgpwszCNGHashAlgid == other.rgpwszCNGHashAlgid && self.dwWeakIndex == other.dwWeakIndex } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_VERIFY_CERT_SIGN_WEAK_HASH_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_VERIFY_CERT_SIGN_WEAK_HASH_INFO { type Abi = Self; } pub const CRYPT_VERIFY_CONTEXT_SIGNATURE: u32 = 32u32; pub const CRYPT_VERIFY_DATA_HASH: u32 = 64u32; #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_VERIFY_MESSAGE_PARA { pub cbSize: u32, pub dwMsgAndCertEncodingType: u32, pub hCryptProv: usize, pub pfnGetSignerCertificate: ::core::option::Option<PFN_CRYPT_GET_SIGNER_CERTIFICATE>, pub pvGetArg: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_VERIFY_MESSAGE_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_VERIFY_MESSAGE_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_VERIFY_MESSAGE_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_VERIFY_MESSAGE_PARA").field("cbSize", &self.cbSize).field("dwMsgAndCertEncodingType", &self.dwMsgAndCertEncodingType).field("hCryptProv", &self.hCryptProv).field("pvGetArg", &self.pvGetArg).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_VERIFY_MESSAGE_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwMsgAndCertEncodingType == other.dwMsgAndCertEncodingType && self.hCryptProv == other.hCryptProv && self.pfnGetSignerCertificate.map(|f| f as usize) == other.pfnGetSignerCertificate.map(|f| f as usize) && self.pvGetArg == other.pvGetArg } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_VERIFY_MESSAGE_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_VERIFY_MESSAGE_PARA { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const CRYPT_WIRE_ONLY_RETRIEVAL: u32 = 4u32; pub const CRYPT_WRITE: u32 = 16u32; pub const CRYPT_X931_FORMAT: u32 = 4u32; pub const CRYPT_X942_COUNTER_BYTE_LENGTH: u32 = 4u32; pub const CRYPT_X942_KEY_LENGTH_BYTE_LENGTH: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_X942_OTHER_INFO { pub pszContentEncryptionObjId: super::super::Foundation::PSTR, pub rgbCounter: [u8; 4], pub rgbKeyLength: [u8; 4], pub PubInfo: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_X942_OTHER_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_X942_OTHER_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_X942_OTHER_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_X942_OTHER_INFO").field("pszContentEncryptionObjId", &self.pszContentEncryptionObjId).field("rgbCounter", &self.rgbCounter).field("rgbKeyLength", &self.rgbKeyLength).field("PubInfo", &self.PubInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_X942_OTHER_INFO { fn eq(&self, other: &Self) -> bool { self.pszContentEncryptionObjId == other.pszContentEncryptionObjId && self.rgbCounter == other.rgbCounter && self.rgbKeyLength == other.rgbKeyLength && self.PubInfo == other.PubInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_X942_OTHER_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_X942_OTHER_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_ALGORITHM { pub cbSize: u32, pub wszAlgorithm: super::super::Foundation::PWSTR, pub Encoded: CRYPT_XML_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_ALGORITHM {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_ALGORITHM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_ALGORITHM { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_ALGORITHM").field("cbSize", &self.cbSize).field("wszAlgorithm", &self.wszAlgorithm).field("Encoded", &self.Encoded).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_ALGORITHM { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.wszAlgorithm == other.wszAlgorithm && self.Encoded == other.Encoded } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_ALGORITHM {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_ALGORITHM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_ALGORITHM_INFO { pub cbSize: u32, pub wszAlgorithmURI: super::super::Foundation::PWSTR, pub wszName: super::super::Foundation::PWSTR, pub dwGroupId: CRYPT_XML_GROUP_ID, pub wszCNGAlgid: super::super::Foundation::PWSTR, pub wszCNGExtraAlgid: super::super::Foundation::PWSTR, pub dwSignFlags: u32, pub dwVerifyFlags: u32, pub pvPaddingInfo: *mut ::core::ffi::c_void, pub pvExtraInfo: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_ALGORITHM_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_ALGORITHM_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_ALGORITHM_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_ALGORITHM_INFO") .field("cbSize", &self.cbSize) .field("wszAlgorithmURI", &self.wszAlgorithmURI) .field("wszName", &self.wszName) .field("dwGroupId", &self.dwGroupId) .field("wszCNGAlgid", &self.wszCNGAlgid) .field("wszCNGExtraAlgid", &self.wszCNGExtraAlgid) .field("dwSignFlags", &self.dwSignFlags) .field("dwVerifyFlags", &self.dwVerifyFlags) .field("pvPaddingInfo", &self.pvPaddingInfo) .field("pvExtraInfo", &self.pvExtraInfo) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_ALGORITHM_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.wszAlgorithmURI == other.wszAlgorithmURI && self.wszName == other.wszName && self.dwGroupId == other.dwGroupId && self.wszCNGAlgid == other.wszCNGAlgid && self.wszCNGExtraAlgid == other.wszCNGExtraAlgid && self.dwSignFlags == other.dwSignFlags && self.dwVerifyFlags == other.dwVerifyFlags && self.pvPaddingInfo == other.pvPaddingInfo && self.pvExtraInfo == other.pvExtraInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_ALGORITHM_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_ALGORITHM_INFO { type Abi = Self; } pub const CRYPT_XML_ALGORITHM_INFO_FIND_BY_CNG_ALGID: u32 = 3u32; pub const CRYPT_XML_ALGORITHM_INFO_FIND_BY_CNG_SIGN_ALGID: u32 = 4u32; pub const CRYPT_XML_ALGORITHM_INFO_FIND_BY_NAME: u32 = 2u32; pub const CRYPT_XML_ALGORITHM_INFO_FIND_BY_URI: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_XML_BLOB { pub dwCharset: CRYPT_XML_CHARSET, pub cbData: u32, pub pbData: *mut u8, } impl CRYPT_XML_BLOB {} impl ::core::default::Default for CRYPT_XML_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_XML_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_BLOB").field("dwCharset", &self.dwCharset).field("cbData", &self.cbData).field("pbData", &self.pbData).finish() } } impl ::core::cmp::PartialEq for CRYPT_XML_BLOB { fn eq(&self, other: &Self) -> bool { self.dwCharset == other.dwCharset && self.cbData == other.cbData && self.pbData == other.pbData } } impl ::core::cmp::Eq for CRYPT_XML_BLOB {} unsafe impl ::windows::core::Abi for CRYPT_XML_BLOB { type Abi = Self; } pub const CRYPT_XML_BLOB_MAX: u32 = 2147483640u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_XML_CHARSET(pub i32); pub const CRYPT_XML_CHARSET_AUTO: CRYPT_XML_CHARSET = CRYPT_XML_CHARSET(0i32); pub const CRYPT_XML_CHARSET_UTF8: CRYPT_XML_CHARSET = CRYPT_XML_CHARSET(1i32); pub const CRYPT_XML_CHARSET_UTF16LE: CRYPT_XML_CHARSET = CRYPT_XML_CHARSET(2i32); pub const CRYPT_XML_CHARSET_UTF16BE: CRYPT_XML_CHARSET = CRYPT_XML_CHARSET(3i32); impl ::core::convert::From<i32> for CRYPT_XML_CHARSET { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_XML_CHARSET { type Abi = Self; } #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_CRYPTOGRAPHIC_INTERFACE { pub cbSize: u32, pub fpCryptXmlEncodeAlgorithm: ::core::option::Option<CryptXmlDllEncodeAlgorithm>, pub fpCryptXmlCreateDigest: ::core::option::Option<CryptXmlDllCreateDigest>, pub fpCryptXmlDigestData: ::core::option::Option<CryptXmlDllDigestData>, pub fpCryptXmlFinalizeDigest: ::core::option::Option<CryptXmlDllFinalizeDigest>, pub fpCryptXmlCloseDigest: ::core::option::Option<CryptXmlDllCloseDigest>, pub fpCryptXmlSignData: ::core::option::Option<CryptXmlDllSignData>, pub fpCryptXmlVerifySignature: ::core::option::Option<CryptXmlDllVerifySignature>, pub fpCryptXmlGetAlgorithmInfo: ::core::option::Option<CryptXmlDllGetAlgorithmInfo>, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_CRYPTOGRAPHIC_INTERFACE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_CRYPTOGRAPHIC_INTERFACE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_CRYPTOGRAPHIC_INTERFACE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_CRYPTOGRAPHIC_INTERFACE").field("cbSize", &self.cbSize).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_CRYPTOGRAPHIC_INTERFACE { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.fpCryptXmlEncodeAlgorithm.map(|f| f as usize) == other.fpCryptXmlEncodeAlgorithm.map(|f| f as usize) && self.fpCryptXmlCreateDigest.map(|f| f as usize) == other.fpCryptXmlCreateDigest.map(|f| f as usize) && self.fpCryptXmlDigestData.map(|f| f as usize) == other.fpCryptXmlDigestData.map(|f| f as usize) && self.fpCryptXmlFinalizeDigest.map(|f| f as usize) == other.fpCryptXmlFinalizeDigest.map(|f| f as usize) && self.fpCryptXmlCloseDigest.map(|f| f as usize) == other.fpCryptXmlCloseDigest.map(|f| f as usize) && self.fpCryptXmlSignData.map(|f| f as usize) == other.fpCryptXmlSignData.map(|f| f as usize) && self.fpCryptXmlVerifySignature.map(|f| f as usize) == other.fpCryptXmlVerifySignature.map(|f| f as usize) && self.fpCryptXmlGetAlgorithmInfo.map(|f| f as usize) == other.fpCryptXmlGetAlgorithmInfo.map(|f| f as usize) } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_CRYPTOGRAPHIC_INTERFACE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_CRYPTOGRAPHIC_INTERFACE { type Abi = ::core::mem::ManuallyDrop<Self>; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_XML_DATA_BLOB { pub cbData: u32, pub pbData: *mut u8, } impl CRYPT_XML_DATA_BLOB {} impl ::core::default::Default for CRYPT_XML_DATA_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_XML_DATA_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_DATA_BLOB").field("cbData", &self.cbData).field("pbData", &self.pbData).finish() } } impl ::core::cmp::PartialEq for CRYPT_XML_DATA_BLOB { fn eq(&self, other: &Self) -> bool { self.cbData == other.cbData && self.pbData == other.pbData } } impl ::core::cmp::Eq for CRYPT_XML_DATA_BLOB {} unsafe impl ::windows::core::Abi for CRYPT_XML_DATA_BLOB { type Abi = Self; } #[derive(:: core :: clone :: Clone)] #[repr(C)] pub struct CRYPT_XML_DATA_PROVIDER { pub pvCallbackState: *mut ::core::ffi::c_void, pub cbBufferSize: u32, pub pfnRead: ::core::option::Option<PFN_CRYPT_XML_DATA_PROVIDER_READ>, pub pfnClose: ::core::option::Option<PFN_CRYPT_XML_DATA_PROVIDER_CLOSE>, } impl CRYPT_XML_DATA_PROVIDER {} impl ::core::default::Default for CRYPT_XML_DATA_PROVIDER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_XML_DATA_PROVIDER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_DATA_PROVIDER").field("pvCallbackState", &self.pvCallbackState).field("cbBufferSize", &self.cbBufferSize).finish() } } impl ::core::cmp::PartialEq for CRYPT_XML_DATA_PROVIDER { fn eq(&self, other: &Self) -> bool { self.pvCallbackState == other.pvCallbackState && self.cbBufferSize == other.cbBufferSize && self.pfnRead.map(|f| f as usize) == other.pfnRead.map(|f| f as usize) && self.pfnClose.map(|f| f as usize) == other.pfnClose.map(|f| f as usize) } } impl ::core::cmp::Eq for CRYPT_XML_DATA_PROVIDER {} unsafe impl ::windows::core::Abi for CRYPT_XML_DATA_PROVIDER { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const CRYPT_XML_DIGEST_REFERENCE_DATA_TRANSFORMED: u32 = 1u32; pub const CRYPT_XML_DIGEST_VALUE_MAX: u32 = 128u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_DOC_CTXT { pub cbSize: u32, pub hDocCtxt: *mut ::core::ffi::c_void, pub pTransformsConfig: *mut CRYPT_XML_TRANSFORM_CHAIN_CONFIG, pub cSignature: u32, pub rgpSignature: *mut *mut CRYPT_XML_SIGNATURE, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_DOC_CTXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_DOC_CTXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_DOC_CTXT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_DOC_CTXT").field("cbSize", &self.cbSize).field("hDocCtxt", &self.hDocCtxt).field("pTransformsConfig", &self.pTransformsConfig).field("cSignature", &self.cSignature).field("rgpSignature", &self.rgpSignature).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_DOC_CTXT { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.hDocCtxt == other.hDocCtxt && self.pTransformsConfig == other.pTransformsConfig && self.cSignature == other.cSignature && self.rgpSignature == other.rgpSignature } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_DOC_CTXT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_DOC_CTXT { type Abi = Self; } pub const CRYPT_XML_E_ALGORITHM: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885372i32 as _); pub const CRYPT_XML_E_BASE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885376i32 as _); pub const CRYPT_XML_E_ENCODING: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885373i32 as _); pub const CRYPT_XML_E_HANDLE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885370i32 as _); pub const CRYPT_XML_E_HASH_FAILED: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885365i32 as _); pub const CRYPT_XML_E_INVALID_DIGEST: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885367i32 as _); pub const CRYPT_XML_E_INVALID_KEYVALUE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885361i32 as _); pub const CRYPT_XML_E_INVALID_SIGNATURE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885366i32 as _); pub const CRYPT_XML_E_LARGE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885375i32 as _); pub const CRYPT_XML_E_LAST: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885358i32 as _); pub const CRYPT_XML_E_NON_UNIQUE_ID: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885358i32 as _); pub const CRYPT_XML_E_OPERATION: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885369i32 as _); pub const CRYPT_XML_E_SIGNER: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885359i32 as _); pub const CRYPT_XML_E_SIGN_FAILED: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885364i32 as _); pub const CRYPT_XML_E_TOO_MANY_SIGNATURES: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885362i32 as _); pub const CRYPT_XML_E_TOO_MANY_TRANSFORMS: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885374i32 as _); pub const CRYPT_XML_E_TRANSFORM: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885371i32 as _); pub const CRYPT_XML_E_UNEXPECTED_XML: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885360i32 as _); pub const CRYPT_XML_E_UNRESOLVED_REFERENCE: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885368i32 as _); pub const CRYPT_XML_E_VERIFY_FAILED: ::windows::core::HRESULT = ::windows::core::HRESULT(-2146885363i32 as _); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_XML_FLAGS(pub u32); pub const CRYPT_XML_FLAG_DISABLE_EXTENSIONS: CRYPT_XML_FLAGS = CRYPT_XML_FLAGS(268435456u32); pub const CRYPT_XML_FLAG_NO_SERIALIZE: CRYPT_XML_FLAGS = CRYPT_XML_FLAGS(2147483648u32); pub const CRYPT_XML_SIGN_ADD_KEYVALUE: CRYPT_XML_FLAGS = CRYPT_XML_FLAGS(1u32); impl ::core::convert::From<u32> for CRYPT_XML_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_XML_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_XML_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_XML_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_XML_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_XML_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_XML_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_XML_FLAG_ADD_OBJECT_CREATE_COPY: u32 = 1u32; pub const CRYPT_XML_FLAG_ALWAYS_RETURN_ENCODED_OBJECT: u32 = 1073741824u32; pub const CRYPT_XML_FLAG_CREATE_REFERENCE_AS_OBJECT: u32 = 1u32; pub const CRYPT_XML_FLAG_ECDSA_DSIG11: u32 = 67108864u32; pub const CRYPT_XML_FLAG_ENFORCE_ID_NAME_FORMAT: u32 = 134217728u32; pub const CRYPT_XML_FLAG_ENFORCE_ID_NCNAME_FORMAT: u32 = 536870912u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_XML_GROUP_ID(pub u32); pub const CRYPT_XML_GROUP_ID_HASH_________: CRYPT_XML_GROUP_ID = CRYPT_XML_GROUP_ID(1u32); pub const CRYPT_XML_GROUP_ID_SIGN_________: CRYPT_XML_GROUP_ID = CRYPT_XML_GROUP_ID(2u32); impl ::core::convert::From<u32> for CRYPT_XML_GROUP_ID { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_XML_GROUP_ID { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_XML_GROUP_ID { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_XML_GROUP_ID { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_XML_GROUP_ID { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_XML_GROUP_ID { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_XML_GROUP_ID { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_XML_GROUP_ID_HASH: u32 = 1u32; pub const CRYPT_XML_GROUP_ID_SIGN: u32 = 2u32; pub const CRYPT_XML_ID_MAX: u32 = 256u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_ISSUER_SERIAL { pub wszIssuer: super::super::Foundation::PWSTR, pub wszSerial: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_ISSUER_SERIAL {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_ISSUER_SERIAL { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_ISSUER_SERIAL { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_ISSUER_SERIAL").field("wszIssuer", &self.wszIssuer).field("wszSerial", &self.wszSerial).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_ISSUER_SERIAL { fn eq(&self, other: &Self) -> bool { self.wszIssuer == other.wszIssuer && self.wszSerial == other.wszSerial } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_ISSUER_SERIAL {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_ISSUER_SERIAL { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_KEYINFO_PARAM { pub wszId: super::super::Foundation::PWSTR, pub wszKeyName: super::super::Foundation::PWSTR, pub SKI: CRYPTOAPI_BLOB, pub wszSubjectName: super::super::Foundation::PWSTR, pub cCertificate: u32, pub rgCertificate: *mut CRYPTOAPI_BLOB, pub cCRL: u32, pub rgCRL: *mut CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_KEYINFO_PARAM {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_KEYINFO_PARAM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_KEYINFO_PARAM { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_KEYINFO_PARAM") .field("wszId", &self.wszId) .field("wszKeyName", &self.wszKeyName) .field("SKI", &self.SKI) .field("wszSubjectName", &self.wszSubjectName) .field("cCertificate", &self.cCertificate) .field("rgCertificate", &self.rgCertificate) .field("cCRL", &self.cCRL) .field("rgCRL", &self.rgCRL) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_KEYINFO_PARAM { fn eq(&self, other: &Self) -> bool { self.wszId == other.wszId && self.wszKeyName == other.wszKeyName && self.SKI == other.SKI && self.wszSubjectName == other.wszSubjectName && self.cCertificate == other.cCertificate && self.rgCertificate == other.rgCertificate && self.cCRL == other.cCRL && self.rgCRL == other.rgCRL } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_KEYINFO_PARAM {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_KEYINFO_PARAM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_XML_KEYINFO_SPEC(pub i32); pub const CRYPT_XML_KEYINFO_SPEC_NONE: CRYPT_XML_KEYINFO_SPEC = CRYPT_XML_KEYINFO_SPEC(0i32); pub const CRYPT_XML_KEYINFO_SPEC_ENCODED: CRYPT_XML_KEYINFO_SPEC = CRYPT_XML_KEYINFO_SPEC(1i32); pub const CRYPT_XML_KEYINFO_SPEC_PARAM: CRYPT_XML_KEYINFO_SPEC = CRYPT_XML_KEYINFO_SPEC(2i32); impl ::core::convert::From<i32> for CRYPT_XML_KEYINFO_SPEC { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_XML_KEYINFO_SPEC { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_XML_KEYINFO_TYPE(pub u32); pub const CRYPT_XML_KEYINFO_TYPE_KEYNAME: CRYPT_XML_KEYINFO_TYPE = CRYPT_XML_KEYINFO_TYPE(1u32); pub const CRYPT_XML_KEYINFO_TYPE_KEYVALUE: CRYPT_XML_KEYINFO_TYPE = CRYPT_XML_KEYINFO_TYPE(2u32); pub const CRYPT_XML_KEYINFO_TYPE_RETRIEVAL: CRYPT_XML_KEYINFO_TYPE = CRYPT_XML_KEYINFO_TYPE(3u32); pub const CRYPT_XML_KEYINFO_TYPE_X509DATA: CRYPT_XML_KEYINFO_TYPE = CRYPT_XML_KEYINFO_TYPE(4u32); pub const CRYPT_XML_KEYINFO_TYPE_CUSTOM: CRYPT_XML_KEYINFO_TYPE = CRYPT_XML_KEYINFO_TYPE(5u32); impl ::core::convert::From<u32> for CRYPT_XML_KEYINFO_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_XML_KEYINFO_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_XML_KEYINFO_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_XML_KEYINFO_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_XML_KEYINFO_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_XML_KEYINFO_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_XML_KEYINFO_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_XML_KEY_DSA_KEY_VALUE { pub P: CRYPT_XML_DATA_BLOB, pub Q: CRYPT_XML_DATA_BLOB, pub G: CRYPT_XML_DATA_BLOB, pub Y: CRYPT_XML_DATA_BLOB, pub J: CRYPT_XML_DATA_BLOB, pub Seed: CRYPT_XML_DATA_BLOB, pub Counter: CRYPT_XML_DATA_BLOB, } impl CRYPT_XML_KEY_DSA_KEY_VALUE {} impl ::core::default::Default for CRYPT_XML_KEY_DSA_KEY_VALUE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_XML_KEY_DSA_KEY_VALUE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_KEY_DSA_KEY_VALUE").field("P", &self.P).field("Q", &self.Q).field("G", &self.G).field("Y", &self.Y).field("J", &self.J).field("Seed", &self.Seed).field("Counter", &self.Counter).finish() } } impl ::core::cmp::PartialEq for CRYPT_XML_KEY_DSA_KEY_VALUE { fn eq(&self, other: &Self) -> bool { self.P == other.P && self.Q == other.Q && self.G == other.G && self.Y == other.Y && self.J == other.J && self.Seed == other.Seed && self.Counter == other.Counter } } impl ::core::cmp::Eq for CRYPT_XML_KEY_DSA_KEY_VALUE {} unsafe impl ::windows::core::Abi for CRYPT_XML_KEY_DSA_KEY_VALUE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_KEY_ECDSA_KEY_VALUE { pub wszNamedCurve: super::super::Foundation::PWSTR, pub X: CRYPT_XML_DATA_BLOB, pub Y: CRYPT_XML_DATA_BLOB, pub ExplicitPara: CRYPT_XML_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_KEY_ECDSA_KEY_VALUE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_KEY_ECDSA_KEY_VALUE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_KEY_ECDSA_KEY_VALUE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_KEY_ECDSA_KEY_VALUE").field("wszNamedCurve", &self.wszNamedCurve).field("X", &self.X).field("Y", &self.Y).field("ExplicitPara", &self.ExplicitPara).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_KEY_ECDSA_KEY_VALUE { fn eq(&self, other: &Self) -> bool { self.wszNamedCurve == other.wszNamedCurve && self.X == other.X && self.Y == other.Y && self.ExplicitPara == other.ExplicitPara } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_KEY_ECDSA_KEY_VALUE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_KEY_ECDSA_KEY_VALUE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_KEY_INFO { pub cbSize: u32, pub wszId: super::super::Foundation::PWSTR, pub cKeyInfo: u32, pub rgKeyInfo: *mut CRYPT_XML_KEY_INFO_ITEM, pub hVerifyKey: BCRYPT_KEY_HANDLE, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_KEY_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_KEY_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_KEY_INFO").field("cbSize", &self.cbSize).field("wszId", &self.wszId).field("cKeyInfo", &self.cKeyInfo).field("rgKeyInfo", &self.rgKeyInfo).field("hVerifyKey", &self.hVerifyKey).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_KEY_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.wszId == other.wszId && self.cKeyInfo == other.cKeyInfo && self.rgKeyInfo == other.rgKeyInfo && self.hVerifyKey == other.hVerifyKey } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_KEY_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_KEY_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_KEY_INFO_ITEM { pub dwType: CRYPT_XML_KEYINFO_TYPE, pub Anonymous: CRYPT_XML_KEY_INFO_ITEM_0, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_KEY_INFO_ITEM {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_KEY_INFO_ITEM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_KEY_INFO_ITEM { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_KEY_INFO_ITEM {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_KEY_INFO_ITEM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CRYPT_XML_KEY_INFO_ITEM_0 { pub wszKeyName: super::super::Foundation::PWSTR, pub KeyValue: CRYPT_XML_KEY_VALUE, pub RetrievalMethod: CRYPT_XML_BLOB, pub X509Data: CRYPT_XML_X509DATA, pub Custom: CRYPT_XML_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_KEY_INFO_ITEM_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_KEY_INFO_ITEM_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_KEY_INFO_ITEM_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_KEY_INFO_ITEM_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_KEY_INFO_ITEM_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_XML_KEY_RSA_KEY_VALUE { pub Modulus: CRYPT_XML_DATA_BLOB, pub Exponent: CRYPT_XML_DATA_BLOB, } impl CRYPT_XML_KEY_RSA_KEY_VALUE {} impl ::core::default::Default for CRYPT_XML_KEY_RSA_KEY_VALUE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_XML_KEY_RSA_KEY_VALUE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_KEY_RSA_KEY_VALUE").field("Modulus", &self.Modulus).field("Exponent", &self.Exponent).finish() } } impl ::core::cmp::PartialEq for CRYPT_XML_KEY_RSA_KEY_VALUE { fn eq(&self, other: &Self) -> bool { self.Modulus == other.Modulus && self.Exponent == other.Exponent } } impl ::core::cmp::Eq for CRYPT_XML_KEY_RSA_KEY_VALUE {} unsafe impl ::windows::core::Abi for CRYPT_XML_KEY_RSA_KEY_VALUE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_KEY_VALUE { pub dwType: CRYPT_XML_KEY_VALUE_TYPE, pub Anonymous: CRYPT_XML_KEY_VALUE_0, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_KEY_VALUE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_KEY_VALUE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_KEY_VALUE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_KEY_VALUE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_KEY_VALUE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CRYPT_XML_KEY_VALUE_0 { pub DSAKeyValue: CRYPT_XML_KEY_DSA_KEY_VALUE, pub RSAKeyValue: CRYPT_XML_KEY_RSA_KEY_VALUE, pub ECDSAKeyValue: CRYPT_XML_KEY_ECDSA_KEY_VALUE, pub Custom: CRYPT_XML_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_KEY_VALUE_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_KEY_VALUE_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_KEY_VALUE_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_KEY_VALUE_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_KEY_VALUE_0 { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_XML_KEY_VALUE_TYPE(pub u32); pub const CRYPT_XML_KEY_VALUE_TYPE_DSA: CRYPT_XML_KEY_VALUE_TYPE = CRYPT_XML_KEY_VALUE_TYPE(1u32); pub const CRYPT_XML_KEY_VALUE_TYPE_RSA: CRYPT_XML_KEY_VALUE_TYPE = CRYPT_XML_KEY_VALUE_TYPE(2u32); pub const CRYPT_XML_KEY_VALUE_TYPE_ECDSA: CRYPT_XML_KEY_VALUE_TYPE = CRYPT_XML_KEY_VALUE_TYPE(3u32); pub const CRYPT_XML_KEY_VALUE_TYPE_CUSTOM: CRYPT_XML_KEY_VALUE_TYPE = CRYPT_XML_KEY_VALUE_TYPE(4u32); impl ::core::convert::From<u32> for CRYPT_XML_KEY_VALUE_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_XML_KEY_VALUE_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_XML_KEY_VALUE_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_XML_KEY_VALUE_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_XML_KEY_VALUE_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_XML_KEY_VALUE_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_XML_KEY_VALUE_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_OBJECT { pub cbSize: u32, pub hObject: *mut ::core::ffi::c_void, pub wszId: super::super::Foundation::PWSTR, pub wszMimeType: super::super::Foundation::PWSTR, pub wszEncoding: super::super::Foundation::PWSTR, pub Manifest: CRYPT_XML_REFERENCES, pub Encoded: CRYPT_XML_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_OBJECT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_OBJECT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_OBJECT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_OBJECT").field("cbSize", &self.cbSize).field("hObject", &self.hObject).field("wszId", &self.wszId).field("wszMimeType", &self.wszMimeType).field("wszEncoding", &self.wszEncoding).field("Manifest", &self.Manifest).field("Encoded", &self.Encoded).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_OBJECT { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.hObject == other.hObject && self.wszId == other.wszId && self.wszMimeType == other.wszMimeType && self.wszEncoding == other.wszEncoding && self.Manifest == other.Manifest && self.Encoded == other.Encoded } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_OBJECT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_OBJECT { type Abi = Self; } pub const CRYPT_XML_OBJECTS_MAX: u32 = 256u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_XML_PROPERTY { pub dwPropId: CRYPT_XML_PROPERTY_ID, pub pvValue: *mut ::core::ffi::c_void, pub cbValue: u32, } impl CRYPT_XML_PROPERTY {} impl ::core::default::Default for CRYPT_XML_PROPERTY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_XML_PROPERTY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_PROPERTY").field("dwPropId", &self.dwPropId).field("pvValue", &self.pvValue).field("cbValue", &self.cbValue).finish() } } impl ::core::cmp::PartialEq for CRYPT_XML_PROPERTY { fn eq(&self, other: &Self) -> bool { self.dwPropId == other.dwPropId && self.pvValue == other.pvValue && self.cbValue == other.cbValue } } impl ::core::cmp::Eq for CRYPT_XML_PROPERTY {} unsafe impl ::windows::core::Abi for CRYPT_XML_PROPERTY { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_XML_PROPERTY_ID(pub i32); pub const CRYPT_XML_PROPERTY_MAX_HEAP_SIZE: CRYPT_XML_PROPERTY_ID = CRYPT_XML_PROPERTY_ID(1i32); pub const CRYPT_XML_PROPERTY_SIGNATURE_LOCATION: CRYPT_XML_PROPERTY_ID = CRYPT_XML_PROPERTY_ID(2i32); pub const CRYPT_XML_PROPERTY_MAX_SIGNATURES: CRYPT_XML_PROPERTY_ID = CRYPT_XML_PROPERTY_ID(3i32); pub const CRYPT_XML_PROPERTY_DOC_DECLARATION: CRYPT_XML_PROPERTY_ID = CRYPT_XML_PROPERTY_ID(4i32); pub const CRYPT_XML_PROPERTY_XML_OUTPUT_CHARSET: CRYPT_XML_PROPERTY_ID = CRYPT_XML_PROPERTY_ID(5i32); impl ::core::convert::From<i32> for CRYPT_XML_PROPERTY_ID { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_XML_PROPERTY_ID { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_REFERENCE { pub cbSize: u32, pub hReference: *mut ::core::ffi::c_void, pub wszId: super::super::Foundation::PWSTR, pub wszUri: super::super::Foundation::PWSTR, pub wszType: super::super::Foundation::PWSTR, pub DigestMethod: CRYPT_XML_ALGORITHM, pub DigestValue: CRYPTOAPI_BLOB, pub cTransform: u32, pub rgTransform: *mut CRYPT_XML_ALGORITHM, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_REFERENCE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_REFERENCE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_REFERENCE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_REFERENCE") .field("cbSize", &self.cbSize) .field("hReference", &self.hReference) .field("wszId", &self.wszId) .field("wszUri", &self.wszUri) .field("wszType", &self.wszType) .field("DigestMethod", &self.DigestMethod) .field("DigestValue", &self.DigestValue) .field("cTransform", &self.cTransform) .field("rgTransform", &self.rgTransform) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_REFERENCE { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.hReference == other.hReference && self.wszId == other.wszId && self.wszUri == other.wszUri && self.wszType == other.wszType && self.DigestMethod == other.DigestMethod && self.DigestValue == other.DigestValue && self.cTransform == other.cTransform && self.rgTransform == other.rgTransform } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_REFERENCE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_REFERENCE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_REFERENCES { pub cReference: u32, pub rgpReference: *mut *mut CRYPT_XML_REFERENCE, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_REFERENCES {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_REFERENCES { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_REFERENCES { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_REFERENCES").field("cReference", &self.cReference).field("rgpReference", &self.rgpReference).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_REFERENCES { fn eq(&self, other: &Self) -> bool { self.cReference == other.cReference && self.rgpReference == other.rgpReference } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_REFERENCES {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_REFERENCES { type Abi = Self; } pub const CRYPT_XML_REFERENCES_MAX: u32 = 32760u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_SIGNATURE { pub cbSize: u32, pub hSignature: *mut ::core::ffi::c_void, pub wszId: super::super::Foundation::PWSTR, pub SignedInfo: CRYPT_XML_SIGNED_INFO, pub SignatureValue: CRYPTOAPI_BLOB, pub pKeyInfo: *mut CRYPT_XML_KEY_INFO, pub cObject: u32, pub rgpObject: *mut *mut CRYPT_XML_OBJECT, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_SIGNATURE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_SIGNATURE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_SIGNATURE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_SIGNATURE") .field("cbSize", &self.cbSize) .field("hSignature", &self.hSignature) .field("wszId", &self.wszId) .field("SignedInfo", &self.SignedInfo) .field("SignatureValue", &self.SignatureValue) .field("pKeyInfo", &self.pKeyInfo) .field("cObject", &self.cObject) .field("rgpObject", &self.rgpObject) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_SIGNATURE { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.hSignature == other.hSignature && self.wszId == other.wszId && self.SignedInfo == other.SignedInfo && self.SignatureValue == other.SignatureValue && self.pKeyInfo == other.pKeyInfo && self.cObject == other.cObject && self.rgpObject == other.rgpObject } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_SIGNATURE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_SIGNATURE { type Abi = Self; } pub const CRYPT_XML_SIGNATURES_MAX: u32 = 16u32; pub const CRYPT_XML_SIGNATURE_VALUE_MAX: u32 = 2048u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_SIGNED_INFO { pub cbSize: u32, pub wszId: super::super::Foundation::PWSTR, pub Canonicalization: CRYPT_XML_ALGORITHM, pub SignatureMethod: CRYPT_XML_ALGORITHM, pub cReference: u32, pub rgpReference: *mut *mut CRYPT_XML_REFERENCE, pub Encoded: CRYPT_XML_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_SIGNED_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_SIGNED_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_SIGNED_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_SIGNED_INFO") .field("cbSize", &self.cbSize) .field("wszId", &self.wszId) .field("Canonicalization", &self.Canonicalization) .field("SignatureMethod", &self.SignatureMethod) .field("cReference", &self.cReference) .field("rgpReference", &self.rgpReference) .field("Encoded", &self.Encoded) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_SIGNED_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.wszId == other.wszId && self.Canonicalization == other.Canonicalization && self.SignatureMethod == other.SignatureMethod && self.cReference == other.cReference && self.rgpReference == other.rgpReference && self.Encoded == other.Encoded } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_SIGNED_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_SIGNED_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CRYPT_XML_STATUS { pub cbSize: u32, pub dwErrorStatus: CRYPT_XML_STATUS_ERROR_STATUS, pub dwInfoStatus: CRYPT_XML_STATUS_INFO_STATUS, } impl CRYPT_XML_STATUS {} impl ::core::default::Default for CRYPT_XML_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CRYPT_XML_STATUS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_STATUS").field("cbSize", &self.cbSize).field("dwErrorStatus", &self.dwErrorStatus).field("dwInfoStatus", &self.dwInfoStatus).finish() } } impl ::core::cmp::PartialEq for CRYPT_XML_STATUS { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwErrorStatus == other.dwErrorStatus && self.dwInfoStatus == other.dwInfoStatus } } impl ::core::cmp::Eq for CRYPT_XML_STATUS {} unsafe impl ::windows::core::Abi for CRYPT_XML_STATUS { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_XML_STATUS_ERROR_STATUS(pub u32); pub const CRYPT_XML_STATUS_ERROR_NOT_RESOLVED: CRYPT_XML_STATUS_ERROR_STATUS = CRYPT_XML_STATUS_ERROR_STATUS(1u32); pub const CRYPT_XML_STATUS_ERROR_DIGEST_INVALID: CRYPT_XML_STATUS_ERROR_STATUS = CRYPT_XML_STATUS_ERROR_STATUS(2u32); pub const CRYPT_XML_STATUS_ERROR_NOT_SUPPORTED_ALGORITHM: CRYPT_XML_STATUS_ERROR_STATUS = CRYPT_XML_STATUS_ERROR_STATUS(5u32); pub const CRYPT_XML_STATUS_ERROR_NOT_SUPPORTED_TRANSFORM: CRYPT_XML_STATUS_ERROR_STATUS = CRYPT_XML_STATUS_ERROR_STATUS(8u32); pub const CRYPT_XML_STATUS_ERROR_SIGNATURE_INVALID: CRYPT_XML_STATUS_ERROR_STATUS = CRYPT_XML_STATUS_ERROR_STATUS(65536u32); pub const CRYPT_XML_STATUS_ERROR_KEYINFO_NOT_PARSED: CRYPT_XML_STATUS_ERROR_STATUS = CRYPT_XML_STATUS_ERROR_STATUS(131072u32); impl ::core::convert::From<u32> for CRYPT_XML_STATUS_ERROR_STATUS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_XML_STATUS_ERROR_STATUS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_XML_STATUS_ERROR_STATUS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_XML_STATUS_ERROR_STATUS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_XML_STATUS_ERROR_STATUS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_XML_STATUS_ERROR_STATUS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_XML_STATUS_ERROR_STATUS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_XML_STATUS_INFO_STATUS(pub u32); pub const CRYPT_XML_STATUS_INTERNAL_REFERENCE: CRYPT_XML_STATUS_INFO_STATUS = CRYPT_XML_STATUS_INFO_STATUS(1u32); pub const CRYPT_XML_STATUS_KEY_AVAILABLE: CRYPT_XML_STATUS_INFO_STATUS = CRYPT_XML_STATUS_INFO_STATUS(2u32); pub const CRYPT_XML_STATUS_DIGESTING: CRYPT_XML_STATUS_INFO_STATUS = CRYPT_XML_STATUS_INFO_STATUS(4u32); pub const CRYPT_XML_STATUS_DIGEST_VALID: CRYPT_XML_STATUS_INFO_STATUS = CRYPT_XML_STATUS_INFO_STATUS(8u32); pub const CRYPT_XML_STATUS_SIGNATURE_VALID: CRYPT_XML_STATUS_INFO_STATUS = CRYPT_XML_STATUS_INFO_STATUS(65536u32); pub const CRYPT_XML_STATUS_OPENED_TO_ENCODE: CRYPT_XML_STATUS_INFO_STATUS = CRYPT_XML_STATUS_INFO_STATUS(2147483648u32); impl ::core::convert::From<u32> for CRYPT_XML_STATUS_INFO_STATUS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_XML_STATUS_INFO_STATUS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_XML_STATUS_INFO_STATUS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_XML_STATUS_INFO_STATUS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_XML_STATUS_INFO_STATUS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_XML_STATUS_INFO_STATUS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_XML_STATUS_INFO_STATUS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const CRYPT_XML_STATUS_NO_ERROR: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_TRANSFORM_CHAIN_CONFIG { pub cbSize: u32, pub cTransformInfo: u32, pub rgpTransformInfo: *mut *mut CRYPT_XML_TRANSFORM_INFO, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_TRANSFORM_CHAIN_CONFIG {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_TRANSFORM_CHAIN_CONFIG { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_TRANSFORM_CHAIN_CONFIG { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_TRANSFORM_CHAIN_CONFIG").field("cbSize", &self.cbSize).field("cTransformInfo", &self.cTransformInfo).field("rgpTransformInfo", &self.rgpTransformInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_TRANSFORM_CHAIN_CONFIG { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.cTransformInfo == other.cTransformInfo && self.rgpTransformInfo == other.rgpTransformInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_TRANSFORM_CHAIN_CONFIG {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_TRANSFORM_CHAIN_CONFIG { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_XML_TRANSFORM_FLAGS(pub u32); pub const CRYPT_XML_TRANSFORM_ON_STREAM: CRYPT_XML_TRANSFORM_FLAGS = CRYPT_XML_TRANSFORM_FLAGS(1u32); pub const CRYPT_XML_TRANSFORM_ON_NODESET: CRYPT_XML_TRANSFORM_FLAGS = CRYPT_XML_TRANSFORM_FLAGS(2u32); pub const CRYPT_XML_TRANSFORM_URI_QUERY_STRING: CRYPT_XML_TRANSFORM_FLAGS = CRYPT_XML_TRANSFORM_FLAGS(3u32); impl ::core::convert::From<u32> for CRYPT_XML_TRANSFORM_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_XML_TRANSFORM_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_XML_TRANSFORM_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_XML_TRANSFORM_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_XML_TRANSFORM_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_XML_TRANSFORM_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_XML_TRANSFORM_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_TRANSFORM_INFO { pub cbSize: u32, pub wszAlgorithm: super::super::Foundation::PWSTR, pub cbBufferSize: u32, pub dwFlags: CRYPT_XML_TRANSFORM_FLAGS, pub pfnCreateTransform: ::core::option::Option<PFN_CRYPT_XML_CREATE_TRANSFORM>, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_TRANSFORM_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_TRANSFORM_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_TRANSFORM_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_TRANSFORM_INFO").field("cbSize", &self.cbSize).field("wszAlgorithm", &self.wszAlgorithm).field("cbBufferSize", &self.cbBufferSize).field("dwFlags", &self.dwFlags).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_TRANSFORM_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.wszAlgorithm == other.wszAlgorithm && self.cbBufferSize == other.cbBufferSize && self.dwFlags == other.dwFlags && self.pfnCreateTransform.map(|f| f as usize) == other.pfnCreateTransform.map(|f| f as usize) } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_TRANSFORM_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_TRANSFORM_INFO { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const CRYPT_XML_TRANSFORM_MAX: u32 = 16u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_X509DATA { pub cX509Data: u32, pub rgX509Data: *mut CRYPT_XML_X509DATA_ITEM, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_X509DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_X509DATA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CRYPT_XML_X509DATA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CRYPT_XML_X509DATA").field("cX509Data", &self.cX509Data).field("rgX509Data", &self.rgX509Data).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_X509DATA { fn eq(&self, other: &Self) -> bool { self.cX509Data == other.cX509Data && self.rgX509Data == other.rgX509Data } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_X509DATA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_X509DATA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CRYPT_XML_X509DATA_ITEM { pub dwType: CRYPT_XML_X509DATA_TYPE, pub Anonymous: CRYPT_XML_X509DATA_ITEM_0, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_X509DATA_ITEM {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_X509DATA_ITEM { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_X509DATA_ITEM { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_X509DATA_ITEM {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_X509DATA_ITEM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union CRYPT_XML_X509DATA_ITEM_0 { pub IssuerSerial: CRYPT_XML_ISSUER_SERIAL, pub SKI: CRYPT_XML_DATA_BLOB, pub wszSubjectName: super::super::Foundation::PWSTR, pub Certificate: CRYPT_XML_DATA_BLOB, pub CRL: CRYPT_XML_DATA_BLOB, pub Custom: CRYPT_XML_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CRYPT_XML_X509DATA_ITEM_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CRYPT_XML_X509DATA_ITEM_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CRYPT_XML_X509DATA_ITEM_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CRYPT_XML_X509DATA_ITEM_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CRYPT_XML_X509DATA_ITEM_0 { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CRYPT_XML_X509DATA_TYPE(pub u32); pub const CRYPT_XML_X509DATA_TYPE_ISSUER_SERIAL: CRYPT_XML_X509DATA_TYPE = CRYPT_XML_X509DATA_TYPE(1u32); pub const CRYPT_XML_X509DATA_TYPE_SKI: CRYPT_XML_X509DATA_TYPE = CRYPT_XML_X509DATA_TYPE(2u32); pub const CRYPT_XML_X509DATA_TYPE_SUBJECT_NAME: CRYPT_XML_X509DATA_TYPE = CRYPT_XML_X509DATA_TYPE(3u32); pub const CRYPT_XML_X509DATA_TYPE_CERTIFICATE: CRYPT_XML_X509DATA_TYPE = CRYPT_XML_X509DATA_TYPE(4u32); pub const CRYPT_XML_X509DATA_TYPE_CRL: CRYPT_XML_X509DATA_TYPE = CRYPT_XML_X509DATA_TYPE(5u32); pub const CRYPT_XML_X509DATA_TYPE_CUSTOM: CRYPT_XML_X509DATA_TYPE = CRYPT_XML_X509DATA_TYPE(6u32); impl ::core::convert::From<u32> for CRYPT_XML_X509DATA_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CRYPT_XML_X509DATA_TYPE { type Abi = Self; } impl ::core::ops::BitOr for CRYPT_XML_X509DATA_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CRYPT_XML_X509DATA_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CRYPT_XML_X509DATA_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CRYPT_XML_X509DATA_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CRYPT_XML_X509DATA_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CTL_ANY_SUBJECT_INFO { pub SubjectAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub SubjectIdentifier: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl CTL_ANY_SUBJECT_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CTL_ANY_SUBJECT_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CTL_ANY_SUBJECT_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CTL_ANY_SUBJECT_INFO").field("SubjectAlgorithm", &self.SubjectAlgorithm).field("SubjectIdentifier", &self.SubjectIdentifier).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CTL_ANY_SUBJECT_INFO { fn eq(&self, other: &Self) -> bool { self.SubjectAlgorithm == other.SubjectAlgorithm && self.SubjectIdentifier == other.SubjectIdentifier } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CTL_ANY_SUBJECT_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CTL_ANY_SUBJECT_INFO { type Abi = Self; } pub const CTL_ANY_SUBJECT_TYPE: u32 = 1u32; pub const CTL_CERT_SUBJECT_TYPE: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CTL_CONTEXT { pub dwMsgAndCertEncodingType: u32, pub pbCtlEncoded: *mut u8, pub cbCtlEncoded: u32, pub pCtlInfo: *mut CTL_INFO, pub hCertStore: *mut ::core::ffi::c_void, pub hCryptMsg: *mut ::core::ffi::c_void, pub pbCtlContent: *mut u8, pub cbCtlContent: u32, } #[cfg(feature = "Win32_Foundation")] impl CTL_CONTEXT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CTL_CONTEXT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CTL_CONTEXT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CTL_CONTEXT") .field("dwMsgAndCertEncodingType", &self.dwMsgAndCertEncodingType) .field("pbCtlEncoded", &self.pbCtlEncoded) .field("cbCtlEncoded", &self.cbCtlEncoded) .field("pCtlInfo", &self.pCtlInfo) .field("hCertStore", &self.hCertStore) .field("hCryptMsg", &self.hCryptMsg) .field("pbCtlContent", &self.pbCtlContent) .field("cbCtlContent", &self.cbCtlContent) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CTL_CONTEXT { fn eq(&self, other: &Self) -> bool { self.dwMsgAndCertEncodingType == other.dwMsgAndCertEncodingType && self.pbCtlEncoded == other.pbCtlEncoded && self.cbCtlEncoded == other.cbCtlEncoded && self.pCtlInfo == other.pCtlInfo && self.hCertStore == other.hCertStore && self.hCryptMsg == other.hCryptMsg && self.pbCtlContent == other.pbCtlContent && self.cbCtlContent == other.cbCtlContent } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CTL_CONTEXT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CTL_CONTEXT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CTL_ENTRY { pub SubjectIdentifier: CRYPTOAPI_BLOB, pub cAttribute: u32, pub rgAttribute: *mut CRYPT_ATTRIBUTE, } #[cfg(feature = "Win32_Foundation")] impl CTL_ENTRY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CTL_ENTRY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CTL_ENTRY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CTL_ENTRY").field("SubjectIdentifier", &self.SubjectIdentifier).field("cAttribute", &self.cAttribute).field("rgAttribute", &self.rgAttribute).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CTL_ENTRY { fn eq(&self, other: &Self) -> bool { self.SubjectIdentifier == other.SubjectIdentifier && self.cAttribute == other.cAttribute && self.rgAttribute == other.rgAttribute } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CTL_ENTRY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CTL_ENTRY { type Abi = Self; } pub const CTL_ENTRY_FROM_PROP_CHAIN_FLAG: u32 = 1u32; pub const CTL_FIND_NO_LIST_ID_CBDATA: u32 = 4294967295u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CTL_FIND_SUBJECT_PARA { pub cbSize: u32, pub pUsagePara: *mut CTL_FIND_USAGE_PARA, pub dwSubjectType: u32, pub pvSubject: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl CTL_FIND_SUBJECT_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CTL_FIND_SUBJECT_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CTL_FIND_SUBJECT_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CTL_FIND_SUBJECT_PARA").field("cbSize", &self.cbSize).field("pUsagePara", &self.pUsagePara).field("dwSubjectType", &self.dwSubjectType).field("pvSubject", &self.pvSubject).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CTL_FIND_SUBJECT_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pUsagePara == other.pUsagePara && self.dwSubjectType == other.dwSubjectType && self.pvSubject == other.pvSubject } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CTL_FIND_SUBJECT_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CTL_FIND_SUBJECT_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CTL_FIND_USAGE_PARA { pub cbSize: u32, pub SubjectUsage: CTL_USAGE, pub ListIdentifier: CRYPTOAPI_BLOB, pub pSigner: *mut CERT_INFO, } #[cfg(feature = "Win32_Foundation")] impl CTL_FIND_USAGE_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CTL_FIND_USAGE_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CTL_FIND_USAGE_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CTL_FIND_USAGE_PARA").field("cbSize", &self.cbSize).field("SubjectUsage", &self.SubjectUsage).field("ListIdentifier", &self.ListIdentifier).field("pSigner", &self.pSigner).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CTL_FIND_USAGE_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.SubjectUsage == other.SubjectUsage && self.ListIdentifier == other.ListIdentifier && self.pSigner == other.pSigner } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CTL_FIND_USAGE_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CTL_FIND_USAGE_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CTL_INFO { pub dwVersion: u32, pub SubjectUsage: CTL_USAGE, pub ListIdentifier: CRYPTOAPI_BLOB, pub SequenceNumber: CRYPTOAPI_BLOB, pub ThisUpdate: super::super::Foundation::FILETIME, pub NextUpdate: super::super::Foundation::FILETIME, pub SubjectAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub cCTLEntry: u32, pub rgCTLEntry: *mut CTL_ENTRY, pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl CTL_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CTL_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CTL_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CTL_INFO") .field("dwVersion", &self.dwVersion) .field("SubjectUsage", &self.SubjectUsage) .field("ListIdentifier", &self.ListIdentifier) .field("SequenceNumber", &self.SequenceNumber) .field("ThisUpdate", &self.ThisUpdate) .field("NextUpdate", &self.NextUpdate) .field("SubjectAlgorithm", &self.SubjectAlgorithm) .field("cCTLEntry", &self.cCTLEntry) .field("rgCTLEntry", &self.rgCTLEntry) .field("cExtension", &self.cExtension) .field("rgExtension", &self.rgExtension) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CTL_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.SubjectUsage == other.SubjectUsage && self.ListIdentifier == other.ListIdentifier && self.SequenceNumber == other.SequenceNumber && self.ThisUpdate == other.ThisUpdate && self.NextUpdate == other.NextUpdate && self.SubjectAlgorithm == other.SubjectAlgorithm && self.cCTLEntry == other.cCTLEntry && self.rgCTLEntry == other.rgCTLEntry && self.cExtension == other.cExtension && self.rgExtension == other.rgExtension } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CTL_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CTL_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CTL_USAGE { pub cUsageIdentifier: u32, pub rgpszUsageIdentifier: *mut super::super::Foundation::PSTR, } #[cfg(feature = "Win32_Foundation")] impl CTL_USAGE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CTL_USAGE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CTL_USAGE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CTL_USAGE").field("cUsageIdentifier", &self.cUsageIdentifier).field("rgpszUsageIdentifier", &self.rgpszUsageIdentifier).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CTL_USAGE { fn eq(&self, other: &Self) -> bool { self.cUsageIdentifier == other.cUsageIdentifier && self.rgpszUsageIdentifier == other.rgpszUsageIdentifier } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CTL_USAGE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CTL_USAGE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CTL_USAGE_MATCH { pub dwType: u32, pub Usage: CTL_USAGE, } #[cfg(feature = "Win32_Foundation")] impl CTL_USAGE_MATCH {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CTL_USAGE_MATCH { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CTL_USAGE_MATCH { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CTL_USAGE_MATCH").field("dwType", &self.dwType).field("Usage", &self.Usage).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CTL_USAGE_MATCH { fn eq(&self, other: &Self) -> bool { self.dwType == other.dwType && self.Usage == other.Usage } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CTL_USAGE_MATCH {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CTL_USAGE_MATCH { type Abi = Self; } pub const CTL_V1: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CTL_VERIFY_USAGE_PARA { pub cbSize: u32, pub ListIdentifier: CRYPTOAPI_BLOB, pub cCtlStore: u32, pub rghCtlStore: *mut *mut ::core::ffi::c_void, pub cSignerStore: u32, pub rghSignerStore: *mut *mut ::core::ffi::c_void, } impl CTL_VERIFY_USAGE_PARA {} impl ::core::default::Default for CTL_VERIFY_USAGE_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CTL_VERIFY_USAGE_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CTL_VERIFY_USAGE_PARA").field("cbSize", &self.cbSize).field("ListIdentifier", &self.ListIdentifier).field("cCtlStore", &self.cCtlStore).field("rghCtlStore", &self.rghCtlStore).field("cSignerStore", &self.cSignerStore).field("rghSignerStore", &self.rghSignerStore).finish() } } impl ::core::cmp::PartialEq for CTL_VERIFY_USAGE_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.ListIdentifier == other.ListIdentifier && self.cCtlStore == other.cCtlStore && self.rghCtlStore == other.rghCtlStore && self.cSignerStore == other.cSignerStore && self.rghSignerStore == other.rghSignerStore } } impl ::core::cmp::Eq for CTL_VERIFY_USAGE_PARA {} unsafe impl ::windows::core::Abi for CTL_VERIFY_USAGE_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct CTL_VERIFY_USAGE_STATUS { pub cbSize: u32, pub dwError: u32, pub dwFlags: u32, pub ppCtl: *mut *mut CTL_CONTEXT, pub dwCtlEntryIndex: u32, pub ppSigner: *mut *mut CERT_CONTEXT, pub dwSignerIndex: u32, } #[cfg(feature = "Win32_Foundation")] impl CTL_VERIFY_USAGE_STATUS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for CTL_VERIFY_USAGE_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for CTL_VERIFY_USAGE_STATUS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CTL_VERIFY_USAGE_STATUS").field("cbSize", &self.cbSize).field("dwError", &self.dwError).field("dwFlags", &self.dwFlags).field("ppCtl", &self.ppCtl).field("dwCtlEntryIndex", &self.dwCtlEntryIndex).field("ppSigner", &self.ppSigner).field("dwSignerIndex", &self.dwSignerIndex).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for CTL_VERIFY_USAGE_STATUS { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwError == other.dwError && self.dwFlags == other.dwFlags && self.ppCtl == other.ppCtl && self.dwCtlEntryIndex == other.dwCtlEntryIndex && self.ppSigner == other.ppSigner && self.dwSignerIndex == other.dwSignerIndex } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for CTL_VERIFY_USAGE_STATUS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for CTL_VERIFY_USAGE_STATUS { type Abi = Self; } pub const CUR_BLOB_VERSION: u32 = 2u32; #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddCRLContextToStore(hcertstore: *const ::core::ffi::c_void, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: *mut *mut CRL_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddCRLContextToStore(hcertstore: *const ::core::ffi::c_void, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: *mut *mut CRL_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddCRLContextToStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(pcrlcontext), ::core::mem::transmute(dwadddisposition), ::core::mem::transmute(ppstorecontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddCRLLinkToStore(hcertstore: *const ::core::ffi::c_void, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: *mut *mut CRL_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddCRLLinkToStore(hcertstore: *const ::core::ffi::c_void, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: *mut *mut CRL_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddCRLLinkToStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(pcrlcontext), ::core::mem::transmute(dwadddisposition), ::core::mem::transmute(ppstorecontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddCTLContextToStore(hcertstore: *const ::core::ffi::c_void, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: *mut *mut CTL_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddCTLContextToStore(hcertstore: *const ::core::ffi::c_void, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: *mut *mut CTL_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddCTLContextToStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(pctlcontext), ::core::mem::transmute(dwadddisposition), ::core::mem::transmute(ppstorecontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddCTLLinkToStore(hcertstore: *const ::core::ffi::c_void, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: *mut *mut CTL_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddCTLLinkToStore(hcertstore: *const ::core::ffi::c_void, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: *mut *mut CTL_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddCTLLinkToStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(pctlcontext), ::core::mem::transmute(dwadddisposition), ::core::mem::transmute(ppstorecontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddCertificateContextToStore(hcertstore: *const ::core::ffi::c_void, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddCertificateContextToStore(hcertstore: *const ::core::ffi::c_void, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddCertificateContextToStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(pcertcontext), ::core::mem::transmute(dwadddisposition), ::core::mem::transmute(ppstorecontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddCertificateLinkToStore(hcertstore: *const ::core::ffi::c_void, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddCertificateLinkToStore(hcertstore: *const ::core::ffi::c_void, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddCertificateLinkToStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(pcertcontext), ::core::mem::transmute(dwadddisposition), ::core::mem::transmute(ppstorecontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddEncodedCRLToStore(hcertstore: *const ::core::ffi::c_void, dwcertencodingtype: u32, pbcrlencoded: *const u8, cbcrlencoded: u32, dwadddisposition: u32, ppcrlcontext: *mut *mut CRL_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddEncodedCRLToStore(hcertstore: *const ::core::ffi::c_void, dwcertencodingtype: u32, pbcrlencoded: *const u8, cbcrlencoded: u32, dwadddisposition: u32, ppcrlcontext: *mut *mut CRL_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddEncodedCRLToStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pbcrlencoded), ::core::mem::transmute(cbcrlencoded), ::core::mem::transmute(dwadddisposition), ::core::mem::transmute(ppcrlcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddEncodedCTLToStore(hcertstore: *const ::core::ffi::c_void, dwmsgandcertencodingtype: u32, pbctlencoded: *const u8, cbctlencoded: u32, dwadddisposition: u32, ppctlcontext: *mut *mut CTL_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddEncodedCTLToStore(hcertstore: *const ::core::ffi::c_void, dwmsgandcertencodingtype: u32, pbctlencoded: *const u8, cbctlencoded: u32, dwadddisposition: u32, ppctlcontext: *mut *mut CTL_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddEncodedCTLToStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwmsgandcertencodingtype), ::core::mem::transmute(pbctlencoded), ::core::mem::transmute(cbctlencoded), ::core::mem::transmute(dwadddisposition), ::core::mem::transmute(ppctlcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddEncodedCertificateToStore(hcertstore: *const ::core::ffi::c_void, dwcertencodingtype: u32, pbcertencoded: *const u8, cbcertencoded: u32, dwadddisposition: u32, ppcertcontext: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddEncodedCertificateToStore(hcertstore: *const ::core::ffi::c_void, dwcertencodingtype: u32, pbcertencoded: *const u8, cbcertencoded: u32, dwadddisposition: u32, ppcertcontext: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddEncodedCertificateToStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pbcertencoded), ::core::mem::transmute(cbcertencoded), ::core::mem::transmute(dwadddisposition), ::core::mem::transmute(ppcertcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddEncodedCertificateToSystemStoreA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(szcertstorename: Param0, pbcertencoded: *const u8, cbcertencoded: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddEncodedCertificateToSystemStoreA(szcertstorename: super::super::Foundation::PSTR, pbcertencoded: *const u8, cbcertencoded: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddEncodedCertificateToSystemStoreA(szcertstorename.into_param().abi(), ::core::mem::transmute(pbcertencoded), ::core::mem::transmute(cbcertencoded))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddEncodedCertificateToSystemStoreW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(szcertstorename: Param0, pbcertencoded: *const u8, cbcertencoded: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddEncodedCertificateToSystemStoreW(szcertstorename: super::super::Foundation::PWSTR, pbcertencoded: *const u8, cbcertencoded: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddEncodedCertificateToSystemStoreW(szcertstorename.into_param().abi(), ::core::mem::transmute(pbcertencoded), ::core::mem::transmute(cbcertencoded))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddEnhancedKeyUsageIdentifier<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pcertcontext: *const CERT_CONTEXT, pszusageidentifier: Param1) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddEnhancedKeyUsageIdentifier(pcertcontext: *const CERT_CONTEXT, pszusageidentifier: super::super::Foundation::PSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddEnhancedKeyUsageIdentifier(::core::mem::transmute(pcertcontext), pszusageidentifier.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CertAddRefServerOcspResponse(hserverocspresponse: *const ::core::ffi::c_void) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddRefServerOcspResponse(hserverocspresponse: *const ::core::ffi::c_void); } ::core::mem::transmute(CertAddRefServerOcspResponse(::core::mem::transmute(hserverocspresponse))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CertAddRefServerOcspResponseContext(pserverocspresponsecontext: *const CERT_SERVER_OCSP_RESPONSE_CONTEXT) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddRefServerOcspResponseContext(pserverocspresponsecontext: *const CERT_SERVER_OCSP_RESPONSE_CONTEXT); } ::core::mem::transmute(CertAddRefServerOcspResponseContext(::core::mem::transmute(pserverocspresponsecontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddSerializedElementToStore(hcertstore: *const ::core::ffi::c_void, pbelement: *const u8, cbelement: u32, dwadddisposition: u32, dwflags: u32, dwcontexttypeflags: u32, pdwcontexttype: *mut u32, ppvcontext: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddSerializedElementToStore(hcertstore: *const ::core::ffi::c_void, pbelement: *const u8, cbelement: u32, dwadddisposition: u32, dwflags: u32, dwcontexttypeflags: u32, pdwcontexttype: *mut u32, ppvcontext: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddSerializedElementToStore( ::core::mem::transmute(hcertstore), ::core::mem::transmute(pbelement), ::core::mem::transmute(cbelement), ::core::mem::transmute(dwadddisposition), ::core::mem::transmute(dwflags), ::core::mem::transmute(dwcontexttypeflags), ::core::mem::transmute(pdwcontexttype), ::core::mem::transmute(ppvcontext), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAddStoreToCollection(hcollectionstore: *const ::core::ffi::c_void, hsiblingstore: *const ::core::ffi::c_void, dwupdateflags: u32, dwpriority: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAddStoreToCollection(hcollectionstore: *const ::core::ffi::c_void, hsiblingstore: *const ::core::ffi::c_void, dwupdateflags: u32, dwpriority: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertAddStoreToCollection(::core::mem::transmute(hcollectionstore), ::core::mem::transmute(hsiblingstore), ::core::mem::transmute(dwupdateflags), ::core::mem::transmute(dwpriority))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertAlgIdToOID(dwalgid: u32) -> super::super::Foundation::PSTR { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertAlgIdToOID(dwalgid: u32) -> super::super::Foundation::PSTR; } ::core::mem::transmute(CertAlgIdToOID(::core::mem::transmute(dwalgid))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CertCloseServerOcspResponse(hserverocspresponse: *const ::core::ffi::c_void, dwflags: u32) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertCloseServerOcspResponse(hserverocspresponse: *const ::core::ffi::c_void, dwflags: u32); } ::core::mem::transmute(CertCloseServerOcspResponse(::core::mem::transmute(hserverocspresponse), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCloseStore(hcertstore: *const ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertCloseStore(hcertstore: *const ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertCloseStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCompareCertificate(dwcertencodingtype: u32, pcertid1: *const CERT_INFO, pcertid2: *const CERT_INFO) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertCompareCertificate(dwcertencodingtype: u32, pcertid1: *const CERT_INFO, pcertid2: *const CERT_INFO) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertCompareCertificate(::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pcertid1), ::core::mem::transmute(pcertid2))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCompareCertificateName(dwcertencodingtype: u32, pcertname1: *const CRYPTOAPI_BLOB, pcertname2: *const CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertCompareCertificateName(dwcertencodingtype: u32, pcertname1: *const CRYPTOAPI_BLOB, pcertname2: *const CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertCompareCertificateName(::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pcertname1), ::core::mem::transmute(pcertname2))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCompareIntegerBlob(pint1: *const CRYPTOAPI_BLOB, pint2: *const CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertCompareIntegerBlob(pint1: *const CRYPTOAPI_BLOB, pint2: *const CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertCompareIntegerBlob(::core::mem::transmute(pint1), ::core::mem::transmute(pint2))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertComparePublicKeyInfo(dwcertencodingtype: u32, ppublickey1: *const CERT_PUBLIC_KEY_INFO, ppublickey2: *const CERT_PUBLIC_KEY_INFO) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertComparePublicKeyInfo(dwcertencodingtype: u32, ppublickey1: *const CERT_PUBLIC_KEY_INFO, ppublickey2: *const CERT_PUBLIC_KEY_INFO) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertComparePublicKeyInfo(::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(ppublickey1), ::core::mem::transmute(ppublickey2))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertControlStore(hcertstore: *const ::core::ffi::c_void, dwflags: CERT_CONTROL_STORE_FLAGS, dwctrltype: u32, pvctrlpara: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertControlStore(hcertstore: *const ::core::ffi::c_void, dwflags: CERT_CONTROL_STORE_FLAGS, dwctrltype: u32, pvctrlpara: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertControlStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwflags), ::core::mem::transmute(dwctrltype), ::core::mem::transmute(pvctrlpara))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCreateCRLContext(dwcertencodingtype: u32, pbcrlencoded: *const u8, cbcrlencoded: u32) -> *mut CRL_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertCreateCRLContext(dwcertencodingtype: u32, pbcrlencoded: *const u8, cbcrlencoded: u32) -> *mut CRL_CONTEXT; } ::core::mem::transmute(CertCreateCRLContext(::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pbcrlencoded), ::core::mem::transmute(cbcrlencoded))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCreateCTLContext(dwmsgandcertencodingtype: u32, pbctlencoded: *const u8, cbctlencoded: u32) -> *mut CTL_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertCreateCTLContext(dwmsgandcertencodingtype: u32, pbctlencoded: *const u8, cbctlencoded: u32) -> *mut CTL_CONTEXT; } ::core::mem::transmute(CertCreateCTLContext(::core::mem::transmute(dwmsgandcertencodingtype), ::core::mem::transmute(pbctlencoded), ::core::mem::transmute(cbctlencoded))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCreateCTLEntryFromCertificateContextProperties(pcertcontext: *const CERT_CONTEXT, coptattr: u32, rgoptattr: *const CRYPT_ATTRIBUTE, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, pctlentry: *mut CTL_ENTRY, pcbctlentry: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertCreateCTLEntryFromCertificateContextProperties(pcertcontext: *const CERT_CONTEXT, coptattr: u32, rgoptattr: *const CRYPT_ATTRIBUTE, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, pctlentry: *mut CTL_ENTRY, pcbctlentry: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertCreateCTLEntryFromCertificateContextProperties(::core::mem::transmute(pcertcontext), ::core::mem::transmute(coptattr), ::core::mem::transmute(rgoptattr), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved), ::core::mem::transmute(pctlentry), ::core::mem::transmute(pcbctlentry))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCreateCertificateChainEngine(pconfig: *const CERT_CHAIN_ENGINE_CONFIG, phchainengine: *mut HCERTCHAINENGINE) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertCreateCertificateChainEngine(pconfig: *const CERT_CHAIN_ENGINE_CONFIG, phchainengine: *mut HCERTCHAINENGINE) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertCreateCertificateChainEngine(::core::mem::transmute(pconfig), ::core::mem::transmute(phchainengine))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCreateCertificateContext(dwcertencodingtype: u32, pbcertencoded: *const u8, cbcertencoded: u32) -> *mut CERT_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertCreateCertificateContext(dwcertencodingtype: u32, pbcertencoded: *const u8, cbcertencoded: u32) -> *mut CERT_CONTEXT; } ::core::mem::transmute(CertCreateCertificateContext(::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pbcertencoded), ::core::mem::transmute(cbcertencoded))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCreateContext(dwcontexttype: u32, dwencodingtype: u32, pbencoded: *const u8, cbencoded: u32, dwflags: u32, pcreatepara: *const CERT_CREATE_CONTEXT_PARA) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertCreateContext(dwcontexttype: u32, dwencodingtype: u32, pbencoded: *const u8, cbencoded: u32, dwflags: u32, pcreatepara: *const ::core::mem::ManuallyDrop<CERT_CREATE_CONTEXT_PARA>) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CertCreateContext(::core::mem::transmute(dwcontexttype), ::core::mem::transmute(dwencodingtype), ::core::mem::transmute(pbencoded), ::core::mem::transmute(cbencoded), ::core::mem::transmute(dwflags), ::core::mem::transmute(pcreatepara))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCreateSelfSignCertificate(hcryptprovorncryptkey: usize, psubjectissuerblob: *const CRYPTOAPI_BLOB, dwflags: CERT_CREATE_SELFSIGN_FLAGS, pkeyprovinfo: *const CRYPT_KEY_PROV_INFO, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pstarttime: *const super::super::Foundation::SYSTEMTIME, pendtime: *const super::super::Foundation::SYSTEMTIME, pextensions: *const CERT_EXTENSIONS) -> *mut CERT_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertCreateSelfSignCertificate(hcryptprovorncryptkey: usize, psubjectissuerblob: *const CRYPTOAPI_BLOB, dwflags: CERT_CREATE_SELFSIGN_FLAGS, pkeyprovinfo: *const CRYPT_KEY_PROV_INFO, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pstarttime: *const super::super::Foundation::SYSTEMTIME, pendtime: *const super::super::Foundation::SYSTEMTIME, pextensions: *const CERT_EXTENSIONS) -> *mut CERT_CONTEXT; } ::core::mem::transmute(CertCreateSelfSignCertificate( ::core::mem::transmute(hcryptprovorncryptkey), ::core::mem::transmute(psubjectissuerblob), ::core::mem::transmute(dwflags), ::core::mem::transmute(pkeyprovinfo), ::core::mem::transmute(psignaturealgorithm), ::core::mem::transmute(pstarttime), ::core::mem::transmute(pendtime), ::core::mem::transmute(pextensions), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertDeleteCRLFromStore(pcrlcontext: *const CRL_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertDeleteCRLFromStore(pcrlcontext: *const CRL_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertDeleteCRLFromStore(::core::mem::transmute(pcrlcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertDeleteCTLFromStore(pctlcontext: *const CTL_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertDeleteCTLFromStore(pctlcontext: *const CTL_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertDeleteCTLFromStore(::core::mem::transmute(pctlcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertDeleteCertificateFromStore(pcertcontext: *const CERT_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertDeleteCertificateFromStore(pcertcontext: *const CERT_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertDeleteCertificateFromStore(::core::mem::transmute(pcertcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertDuplicateCRLContext(pcrlcontext: *const CRL_CONTEXT) -> *mut CRL_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertDuplicateCRLContext(pcrlcontext: *const CRL_CONTEXT) -> *mut CRL_CONTEXT; } ::core::mem::transmute(CertDuplicateCRLContext(::core::mem::transmute(pcrlcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertDuplicateCTLContext(pctlcontext: *const CTL_CONTEXT) -> *mut CTL_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertDuplicateCTLContext(pctlcontext: *const CTL_CONTEXT) -> *mut CTL_CONTEXT; } ::core::mem::transmute(CertDuplicateCTLContext(::core::mem::transmute(pctlcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertDuplicateCertificateChain(pchaincontext: *const CERT_CHAIN_CONTEXT) -> *mut CERT_CHAIN_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertDuplicateCertificateChain(pchaincontext: *const CERT_CHAIN_CONTEXT) -> *mut CERT_CHAIN_CONTEXT; } ::core::mem::transmute(CertDuplicateCertificateChain(::core::mem::transmute(pchaincontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertDuplicateCertificateContext(pcertcontext: *const CERT_CONTEXT) -> *mut CERT_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertDuplicateCertificateContext(pcertcontext: *const CERT_CONTEXT) -> *mut CERT_CONTEXT; } ::core::mem::transmute(CertDuplicateCertificateContext(::core::mem::transmute(pcertcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CertDuplicateStore(hcertstore: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertDuplicateStore(hcertstore: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CertDuplicateStore(::core::mem::transmute(hcertstore))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertEnumCRLContextProperties(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertEnumCRLContextProperties(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32) -> u32; } ::core::mem::transmute(CertEnumCRLContextProperties(::core::mem::transmute(pcrlcontext), ::core::mem::transmute(dwpropid))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertEnumCRLsInStore(hcertstore: *const ::core::ffi::c_void, pprevcrlcontext: *const CRL_CONTEXT) -> *mut CRL_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertEnumCRLsInStore(hcertstore: *const ::core::ffi::c_void, pprevcrlcontext: *const CRL_CONTEXT) -> *mut CRL_CONTEXT; } ::core::mem::transmute(CertEnumCRLsInStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(pprevcrlcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertEnumCTLContextProperties(pctlcontext: *const CTL_CONTEXT, dwpropid: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertEnumCTLContextProperties(pctlcontext: *const CTL_CONTEXT, dwpropid: u32) -> u32; } ::core::mem::transmute(CertEnumCTLContextProperties(::core::mem::transmute(pctlcontext), ::core::mem::transmute(dwpropid))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertEnumCTLsInStore(hcertstore: *const ::core::ffi::c_void, pprevctlcontext: *const CTL_CONTEXT) -> *mut CTL_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertEnumCTLsInStore(hcertstore: *const ::core::ffi::c_void, pprevctlcontext: *const CTL_CONTEXT) -> *mut CTL_CONTEXT; } ::core::mem::transmute(CertEnumCTLsInStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(pprevctlcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertEnumCertificateContextProperties(pcertcontext: *const CERT_CONTEXT, dwpropid: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertEnumCertificateContextProperties(pcertcontext: *const CERT_CONTEXT, dwpropid: u32) -> u32; } ::core::mem::transmute(CertEnumCertificateContextProperties(::core::mem::transmute(pcertcontext), ::core::mem::transmute(dwpropid))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertEnumCertificatesInStore(hcertstore: *const ::core::ffi::c_void, pprevcertcontext: *const CERT_CONTEXT) -> *mut CERT_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertEnumCertificatesInStore(hcertstore: *const ::core::ffi::c_void, pprevcertcontext: *const CERT_CONTEXT) -> *mut CERT_CONTEXT; } ::core::mem::transmute(CertEnumCertificatesInStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(pprevcertcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertEnumPhysicalStore(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32, pvarg: *mut ::core::ffi::c_void, pfnenum: ::core::option::Option<PFN_CERT_ENUM_PHYSICAL_STORE>) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertEnumPhysicalStore(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32, pvarg: *mut ::core::ffi::c_void, pfnenum: ::windows::core::RawPtr) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertEnumPhysicalStore(::core::mem::transmute(pvsystemstore), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvarg), ::core::mem::transmute(pfnenum))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertEnumSubjectInSortedCTL(pctlcontext: *const CTL_CONTEXT, ppvnextsubject: *mut *mut ::core::ffi::c_void, psubjectidentifier: *mut CRYPTOAPI_BLOB, pencodedattributes: *mut CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertEnumSubjectInSortedCTL(pctlcontext: *const CTL_CONTEXT, ppvnextsubject: *mut *mut ::core::ffi::c_void, psubjectidentifier: *mut CRYPTOAPI_BLOB, pencodedattributes: *mut CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertEnumSubjectInSortedCTL(::core::mem::transmute(pctlcontext), ::core::mem::transmute(ppvnextsubject), ::core::mem::transmute(psubjectidentifier), ::core::mem::transmute(pencodedattributes))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertEnumSystemStore(dwflags: u32, pvsystemstorelocationpara: *const ::core::ffi::c_void, pvarg: *mut ::core::ffi::c_void, pfnenum: ::core::option::Option<PFN_CERT_ENUM_SYSTEM_STORE>) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertEnumSystemStore(dwflags: u32, pvsystemstorelocationpara: *const ::core::ffi::c_void, pvarg: *mut ::core::ffi::c_void, pfnenum: ::windows::core::RawPtr) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertEnumSystemStore(::core::mem::transmute(dwflags), ::core::mem::transmute(pvsystemstorelocationpara), ::core::mem::transmute(pvarg), ::core::mem::transmute(pfnenum))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertEnumSystemStoreLocation(dwflags: u32, pvarg: *mut ::core::ffi::c_void, pfnenum: ::core::option::Option<PFN_CERT_ENUM_SYSTEM_STORE_LOCATION>) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertEnumSystemStoreLocation(dwflags: u32, pvarg: *mut ::core::ffi::c_void, pfnenum: ::windows::core::RawPtr) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertEnumSystemStoreLocation(::core::mem::transmute(dwflags), ::core::mem::transmute(pvarg), ::core::mem::transmute(pfnenum))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFindAttribute<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszobjid: Param0, cattr: u32, rgattr: *const CRYPT_ATTRIBUTE) -> *mut CRYPT_ATTRIBUTE { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFindAttribute(pszobjid: super::super::Foundation::PSTR, cattr: u32, rgattr: *const CRYPT_ATTRIBUTE) -> *mut CRYPT_ATTRIBUTE; } ::core::mem::transmute(CertFindAttribute(pszobjid.into_param().abi(), ::core::mem::transmute(cattr), ::core::mem::transmute(rgattr))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFindCRLInStore(hcertstore: *const ::core::ffi::c_void, dwcertencodingtype: u32, dwfindflags: u32, dwfindtype: u32, pvfindpara: *const ::core::ffi::c_void, pprevcrlcontext: *const CRL_CONTEXT) -> *mut CRL_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFindCRLInStore(hcertstore: *const ::core::ffi::c_void, dwcertencodingtype: u32, dwfindflags: u32, dwfindtype: u32, pvfindpara: *const ::core::ffi::c_void, pprevcrlcontext: *const CRL_CONTEXT) -> *mut CRL_CONTEXT; } ::core::mem::transmute(CertFindCRLInStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(dwfindflags), ::core::mem::transmute(dwfindtype), ::core::mem::transmute(pvfindpara), ::core::mem::transmute(pprevcrlcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFindCTLInStore(hcertstore: *const ::core::ffi::c_void, dwmsgandcertencodingtype: u32, dwfindflags: u32, dwfindtype: CERT_FIND_TYPE, pvfindpara: *const ::core::ffi::c_void, pprevctlcontext: *const CTL_CONTEXT) -> *mut CTL_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFindCTLInStore(hcertstore: *const ::core::ffi::c_void, dwmsgandcertencodingtype: u32, dwfindflags: u32, dwfindtype: CERT_FIND_TYPE, pvfindpara: *const ::core::ffi::c_void, pprevctlcontext: *const CTL_CONTEXT) -> *mut CTL_CONTEXT; } ::core::mem::transmute(CertFindCTLInStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwmsgandcertencodingtype), ::core::mem::transmute(dwfindflags), ::core::mem::transmute(dwfindtype), ::core::mem::transmute(pvfindpara), ::core::mem::transmute(pprevctlcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFindCertificateInCRL(pcert: *const CERT_CONTEXT, pcrlcontext: *const CRL_CONTEXT, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, ppcrlentry: *mut *mut CRL_ENTRY) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFindCertificateInCRL(pcert: *const CERT_CONTEXT, pcrlcontext: *const CRL_CONTEXT, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, ppcrlentry: *mut *mut CRL_ENTRY) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertFindCertificateInCRL(::core::mem::transmute(pcert), ::core::mem::transmute(pcrlcontext), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved), ::core::mem::transmute(ppcrlentry))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFindCertificateInStore(hcertstore: *const ::core::ffi::c_void, dwcertencodingtype: u32, dwfindflags: u32, dwfindtype: CERT_FIND_FLAGS, pvfindpara: *const ::core::ffi::c_void, pprevcertcontext: *const CERT_CONTEXT) -> *mut CERT_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFindCertificateInStore(hcertstore: *const ::core::ffi::c_void, dwcertencodingtype: u32, dwfindflags: u32, dwfindtype: CERT_FIND_FLAGS, pvfindpara: *const ::core::ffi::c_void, pprevcertcontext: *const CERT_CONTEXT) -> *mut CERT_CONTEXT; } ::core::mem::transmute(CertFindCertificateInStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(dwfindflags), ::core::mem::transmute(dwfindtype), ::core::mem::transmute(pvfindpara), ::core::mem::transmute(pprevcertcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFindChainInStore(hcertstore: *const ::core::ffi::c_void, dwcertencodingtype: u32, dwfindflags: CERT_FIND_CHAIN_IN_STORE_FLAGS, dwfindtype: u32, pvfindpara: *const ::core::ffi::c_void, pprevchaincontext: *const CERT_CHAIN_CONTEXT) -> *mut CERT_CHAIN_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFindChainInStore(hcertstore: *const ::core::ffi::c_void, dwcertencodingtype: u32, dwfindflags: CERT_FIND_CHAIN_IN_STORE_FLAGS, dwfindtype: u32, pvfindpara: *const ::core::ffi::c_void, pprevchaincontext: *const CERT_CHAIN_CONTEXT) -> *mut CERT_CHAIN_CONTEXT; } ::core::mem::transmute(CertFindChainInStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(dwfindflags), ::core::mem::transmute(dwfindtype), ::core::mem::transmute(pvfindpara), ::core::mem::transmute(pprevchaincontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFindExtension<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszobjid: Param0, cextensions: u32, rgextensions: *const CERT_EXTENSION) -> *mut CERT_EXTENSION { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFindExtension(pszobjid: super::super::Foundation::PSTR, cextensions: u32, rgextensions: *const CERT_EXTENSION) -> *mut CERT_EXTENSION; } ::core::mem::transmute(CertFindExtension(pszobjid.into_param().abi(), ::core::mem::transmute(cextensions), ::core::mem::transmute(rgextensions))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFindRDNAttr<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszobjid: Param0, pname: *const CERT_NAME_INFO) -> *mut CERT_RDN_ATTR { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFindRDNAttr(pszobjid: super::super::Foundation::PSTR, pname: *const CERT_NAME_INFO) -> *mut CERT_RDN_ATTR; } ::core::mem::transmute(CertFindRDNAttr(pszobjid.into_param().abi(), ::core::mem::transmute(pname))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFindSubjectInCTL(dwencodingtype: u32, dwsubjecttype: u32, pvsubject: *const ::core::ffi::c_void, pctlcontext: *const CTL_CONTEXT, dwflags: u32) -> *mut CTL_ENTRY { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFindSubjectInCTL(dwencodingtype: u32, dwsubjecttype: u32, pvsubject: *const ::core::ffi::c_void, pctlcontext: *const CTL_CONTEXT, dwflags: u32) -> *mut CTL_ENTRY; } ::core::mem::transmute(CertFindSubjectInCTL(::core::mem::transmute(dwencodingtype), ::core::mem::transmute(dwsubjecttype), ::core::mem::transmute(pvsubject), ::core::mem::transmute(pctlcontext), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFindSubjectInSortedCTL(psubjectidentifier: *const CRYPTOAPI_BLOB, pctlcontext: *const CTL_CONTEXT, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, pencodedattributes: *mut CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFindSubjectInSortedCTL(psubjectidentifier: *const CRYPTOAPI_BLOB, pctlcontext: *const CTL_CONTEXT, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, pencodedattributes: *mut CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertFindSubjectInSortedCTL(::core::mem::transmute(psubjectidentifier), ::core::mem::transmute(pctlcontext), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved), ::core::mem::transmute(pencodedattributes))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFreeCRLContext(pcrlcontext: *const CRL_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFreeCRLContext(pcrlcontext: *const CRL_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertFreeCRLContext(::core::mem::transmute(pcrlcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFreeCTLContext(pctlcontext: *const CTL_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFreeCTLContext(pctlcontext: *const CTL_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertFreeCTLContext(::core::mem::transmute(pctlcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFreeCertificateChain(pchaincontext: *const CERT_CHAIN_CONTEXT) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFreeCertificateChain(pchaincontext: *const CERT_CHAIN_CONTEXT); } ::core::mem::transmute(CertFreeCertificateChain(::core::mem::transmute(pchaincontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CertFreeCertificateChainEngine<'a, Param0: ::windows::core::IntoParam<'a, HCERTCHAINENGINE>>(hchainengine: Param0) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFreeCertificateChainEngine(hchainengine: HCERTCHAINENGINE); } ::core::mem::transmute(CertFreeCertificateChainEngine(hchainengine.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFreeCertificateChainList(prgpselection: *const *const CERT_CHAIN_CONTEXT) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFreeCertificateChainList(prgpselection: *const *const CERT_CHAIN_CONTEXT); } ::core::mem::transmute(CertFreeCertificateChainList(::core::mem::transmute(prgpselection))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertFreeCertificateContext(pcertcontext: *const CERT_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFreeCertificateContext(pcertcontext: *const CERT_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertFreeCertificateContext(::core::mem::transmute(pcertcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CertFreeServerOcspResponseContext(pserverocspresponsecontext: *const CERT_SERVER_OCSP_RESPONSE_CONTEXT) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertFreeServerOcspResponseContext(pserverocspresponsecontext: *const CERT_SERVER_OCSP_RESPONSE_CONTEXT); } ::core::mem::transmute(CertFreeServerOcspResponseContext(::core::mem::transmute(pserverocspresponsecontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetCRLContextProperty(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetCRLContextProperty(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertGetCRLContextProperty(::core::mem::transmute(pcrlcontext), ::core::mem::transmute(dwpropid), ::core::mem::transmute(pvdata), ::core::mem::transmute(pcbdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetCRLFromStore(hcertstore: *const ::core::ffi::c_void, pissuercontext: *const CERT_CONTEXT, pprevcrlcontext: *const CRL_CONTEXT, pdwflags: *mut u32) -> *mut CRL_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetCRLFromStore(hcertstore: *const ::core::ffi::c_void, pissuercontext: *const CERT_CONTEXT, pprevcrlcontext: *const CRL_CONTEXT, pdwflags: *mut u32) -> *mut CRL_CONTEXT; } ::core::mem::transmute(CertGetCRLFromStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(pissuercontext), ::core::mem::transmute(pprevcrlcontext), ::core::mem::transmute(pdwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetCTLContextProperty(pctlcontext: *const CTL_CONTEXT, dwpropid: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetCTLContextProperty(pctlcontext: *const CTL_CONTEXT, dwpropid: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertGetCTLContextProperty(::core::mem::transmute(pctlcontext), ::core::mem::transmute(dwpropid), ::core::mem::transmute(pvdata), ::core::mem::transmute(pcbdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetCertificateChain<'a, Param0: ::windows::core::IntoParam<'a, HCERTCHAINENGINE>>(hchainengine: Param0, pcertcontext: *const CERT_CONTEXT, ptime: *const super::super::Foundation::FILETIME, hadditionalstore: *const ::core::ffi::c_void, pchainpara: *const CERT_CHAIN_PARA, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, ppchaincontext: *mut *mut CERT_CHAIN_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetCertificateChain(hchainengine: HCERTCHAINENGINE, pcertcontext: *const CERT_CONTEXT, ptime: *const super::super::Foundation::FILETIME, hadditionalstore: *const ::core::ffi::c_void, pchainpara: *const CERT_CHAIN_PARA, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, ppchaincontext: *mut *mut CERT_CHAIN_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertGetCertificateChain( hchainengine.into_param().abi(), ::core::mem::transmute(pcertcontext), ::core::mem::transmute(ptime), ::core::mem::transmute(hadditionalstore), ::core::mem::transmute(pchainpara), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved), ::core::mem::transmute(ppchaincontext), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetCertificateContextProperty(pcertcontext: *const CERT_CONTEXT, dwpropid: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetCertificateContextProperty(pcertcontext: *const CERT_CONTEXT, dwpropid: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertGetCertificateContextProperty(::core::mem::transmute(pcertcontext), ::core::mem::transmute(dwpropid), ::core::mem::transmute(pvdata), ::core::mem::transmute(pcbdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetEnhancedKeyUsage(pcertcontext: *const CERT_CONTEXT, dwflags: u32, pusage: *mut CTL_USAGE, pcbusage: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetEnhancedKeyUsage(pcertcontext: *const CERT_CONTEXT, dwflags: u32, pusage: *mut CTL_USAGE, pcbusage: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertGetEnhancedKeyUsage(::core::mem::transmute(pcertcontext), ::core::mem::transmute(dwflags), ::core::mem::transmute(pusage), ::core::mem::transmute(pcbusage))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetIntendedKeyUsage(dwcertencodingtype: u32, pcertinfo: *const CERT_INFO, pbkeyusage: *mut u8, cbkeyusage: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetIntendedKeyUsage(dwcertencodingtype: u32, pcertinfo: *const CERT_INFO, pbkeyusage: *mut u8, cbkeyusage: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertGetIntendedKeyUsage(::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pcertinfo), ::core::mem::transmute(pbkeyusage), ::core::mem::transmute(cbkeyusage))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetIssuerCertificateFromStore(hcertstore: *const ::core::ffi::c_void, psubjectcontext: *const CERT_CONTEXT, pprevissuercontext: *const CERT_CONTEXT, pdwflags: *mut u32) -> *mut CERT_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetIssuerCertificateFromStore(hcertstore: *const ::core::ffi::c_void, psubjectcontext: *const CERT_CONTEXT, pprevissuercontext: *const CERT_CONTEXT, pdwflags: *mut u32) -> *mut CERT_CONTEXT; } ::core::mem::transmute(CertGetIssuerCertificateFromStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(psubjectcontext), ::core::mem::transmute(pprevissuercontext), ::core::mem::transmute(pdwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetNameStringA(pcertcontext: *const CERT_CONTEXT, dwtype: u32, dwflags: u32, pvtypepara: *const ::core::ffi::c_void, psznamestring: super::super::Foundation::PSTR, cchnamestring: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetNameStringA(pcertcontext: *const CERT_CONTEXT, dwtype: u32, dwflags: u32, pvtypepara: *const ::core::ffi::c_void, psznamestring: super::super::Foundation::PSTR, cchnamestring: u32) -> u32; } ::core::mem::transmute(CertGetNameStringA(::core::mem::transmute(pcertcontext), ::core::mem::transmute(dwtype), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvtypepara), ::core::mem::transmute(psznamestring), ::core::mem::transmute(cchnamestring))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetNameStringW(pcertcontext: *const CERT_CONTEXT, dwtype: u32, dwflags: u32, pvtypepara: *const ::core::ffi::c_void, psznamestring: super::super::Foundation::PWSTR, cchnamestring: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetNameStringW(pcertcontext: *const CERT_CONTEXT, dwtype: u32, dwflags: u32, pvtypepara: *const ::core::ffi::c_void, psznamestring: super::super::Foundation::PWSTR, cchnamestring: u32) -> u32; } ::core::mem::transmute(CertGetNameStringW(::core::mem::transmute(pcertcontext), ::core::mem::transmute(dwtype), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvtypepara), ::core::mem::transmute(psznamestring), ::core::mem::transmute(cchnamestring))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetPublicKeyLength(dwcertencodingtype: u32, ppublickey: *const CERT_PUBLIC_KEY_INFO) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetPublicKeyLength(dwcertencodingtype: u32, ppublickey: *const CERT_PUBLIC_KEY_INFO) -> u32; } ::core::mem::transmute(CertGetPublicKeyLength(::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(ppublickey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CertGetServerOcspResponseContext(hserverocspresponse: *const ::core::ffi::c_void, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> *mut CERT_SERVER_OCSP_RESPONSE_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetServerOcspResponseContext(hserverocspresponse: *const ::core::ffi::c_void, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> *mut CERT_SERVER_OCSP_RESPONSE_CONTEXT; } ::core::mem::transmute(CertGetServerOcspResponseContext(::core::mem::transmute(hserverocspresponse), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetStoreProperty(hcertstore: *const ::core::ffi::c_void, dwpropid: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetStoreProperty(hcertstore: *const ::core::ffi::c_void, dwpropid: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertGetStoreProperty(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwpropid), ::core::mem::transmute(pvdata), ::core::mem::transmute(pcbdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetSubjectCertificateFromStore(hcertstore: *const ::core::ffi::c_void, dwcertencodingtype: u32, pcertid: *const CERT_INFO) -> *mut CERT_CONTEXT { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetSubjectCertificateFromStore(hcertstore: *const ::core::ffi::c_void, dwcertencodingtype: u32, pcertid: *const CERT_INFO) -> *mut CERT_CONTEXT; } ::core::mem::transmute(CertGetSubjectCertificateFromStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pcertid))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetValidUsages(ccerts: u32, rghcerts: *const *const CERT_CONTEXT, cnumoids: *mut i32, rghoids: *mut super::super::Foundation::PSTR, pcboids: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertGetValidUsages(ccerts: u32, rghcerts: *const *const CERT_CONTEXT, cnumoids: *mut i32, rghoids: *mut super::super::Foundation::PSTR, pcboids: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertGetValidUsages(::core::mem::transmute(ccerts), ::core::mem::transmute(rghcerts), ::core::mem::transmute(cnumoids), ::core::mem::transmute(rghoids), ::core::mem::transmute(pcboids))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertIsRDNAttrsInCertificateName(dwcertencodingtype: u32, dwflags: u32, pcertname: *const CRYPTOAPI_BLOB, prdn: *const CERT_RDN) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertIsRDNAttrsInCertificateName(dwcertencodingtype: u32, dwflags: u32, pcertname: *const CRYPTOAPI_BLOB, prdn: *const CERT_RDN) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertIsRDNAttrsInCertificateName(::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(dwflags), ::core::mem::transmute(pcertname), ::core::mem::transmute(prdn))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertIsStrongHashToSign<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pstrongsignpara: *const CERT_STRONG_SIGN_PARA, pwszcnghashalgid: Param1, psigningcert: *const CERT_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertIsStrongHashToSign(pstrongsignpara: *const CERT_STRONG_SIGN_PARA, pwszcnghashalgid: super::super::Foundation::PWSTR, psigningcert: *const CERT_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertIsStrongHashToSign(::core::mem::transmute(pstrongsignpara), pwszcnghashalgid.into_param().abi(), ::core::mem::transmute(psigningcert))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertIsValidCRLForCertificate(pcert: *const CERT_CONTEXT, pcrl: *const CRL_CONTEXT, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertIsValidCRLForCertificate(pcert: *const CERT_CONTEXT, pcrl: *const CRL_CONTEXT, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertIsValidCRLForCertificate(::core::mem::transmute(pcert), ::core::mem::transmute(pcrl), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertIsWeakHash<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwhashusetype: u32, pwszcnghashalgid: Param1, dwchainflags: u32, psignerchaincontext: *const CERT_CHAIN_CONTEXT, ptimestamp: *const super::super::Foundation::FILETIME, pwszfilename: Param5) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertIsWeakHash(dwhashusetype: u32, pwszcnghashalgid: super::super::Foundation::PWSTR, dwchainflags: u32, psignerchaincontext: *const CERT_CHAIN_CONTEXT, ptimestamp: *const super::super::Foundation::FILETIME, pwszfilename: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertIsWeakHash(::core::mem::transmute(dwhashusetype), pwszcnghashalgid.into_param().abi(), ::core::mem::transmute(dwchainflags), ::core::mem::transmute(psignerchaincontext), ::core::mem::transmute(ptimestamp), pwszfilename.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CertKeyType(pub u32); pub const KeyTypeOther: CertKeyType = CertKeyType(0u32); pub const KeyTypeVirtualSmartCard: CertKeyType = CertKeyType(1u32); pub const KeyTypePhysicalSmartCard: CertKeyType = CertKeyType(2u32); pub const KeyTypePassport: CertKeyType = CertKeyType(3u32); pub const KeyTypePassportRemote: CertKeyType = CertKeyType(4u32); pub const KeyTypePassportSmartCard: CertKeyType = CertKeyType(5u32); pub const KeyTypeHardware: CertKeyType = CertKeyType(6u32); pub const KeyTypeSoftware: CertKeyType = CertKeyType(7u32); pub const KeyTypeSelfSigned: CertKeyType = CertKeyType(8u32); impl ::core::convert::From<u32> for CertKeyType { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CertKeyType { type Abi = Self; } impl ::core::ops::BitOr for CertKeyType { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for CertKeyType { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for CertKeyType { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for CertKeyType { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for CertKeyType { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertNameToStrA(dwcertencodingtype: u32, pname: *const CRYPTOAPI_BLOB, dwstrtype: CERT_STRING_TYPE, psz: super::super::Foundation::PSTR, csz: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertNameToStrA(dwcertencodingtype: u32, pname: *const CRYPTOAPI_BLOB, dwstrtype: CERT_STRING_TYPE, psz: super::super::Foundation::PSTR, csz: u32) -> u32; } ::core::mem::transmute(CertNameToStrA(::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pname), ::core::mem::transmute(dwstrtype), ::core::mem::transmute(psz), ::core::mem::transmute(csz))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertNameToStrW(dwcertencodingtype: u32, pname: *const CRYPTOAPI_BLOB, dwstrtype: CERT_STRING_TYPE, psz: super::super::Foundation::PWSTR, csz: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertNameToStrW(dwcertencodingtype: u32, pname: *const CRYPTOAPI_BLOB, dwstrtype: CERT_STRING_TYPE, psz: super::super::Foundation::PWSTR, csz: u32) -> u32; } ::core::mem::transmute(CertNameToStrW(::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pname), ::core::mem::transmute(dwstrtype), ::core::mem::transmute(psz), ::core::mem::transmute(csz))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertOIDToAlgId<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszobjid: Param0) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertOIDToAlgId(pszobjid: super::super::Foundation::PSTR) -> u32; } ::core::mem::transmute(CertOIDToAlgId(pszobjid.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertOpenServerOcspResponse(pchaincontext: *const CERT_CHAIN_CONTEXT, dwflags: u32, popenpara: *const CERT_SERVER_OCSP_RESPONSE_OPEN_PARA) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertOpenServerOcspResponse(pchaincontext: *const CERT_CHAIN_CONTEXT, dwflags: u32, popenpara: *const ::core::mem::ManuallyDrop<CERT_SERVER_OCSP_RESPONSE_OPEN_PARA>) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CertOpenServerOcspResponse(::core::mem::transmute(pchaincontext), ::core::mem::transmute(dwflags), ::core::mem::transmute(popenpara))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertOpenStore<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(lpszstoreprovider: Param0, dwencodingtype: CERT_QUERY_ENCODING_TYPE, hcryptprov: usize, dwflags: CERT_OPEN_STORE_FLAGS, pvpara: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertOpenStore(lpszstoreprovider: super::super::Foundation::PSTR, dwencodingtype: CERT_QUERY_ENCODING_TYPE, hcryptprov: usize, dwflags: CERT_OPEN_STORE_FLAGS, pvpara: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CertOpenStore(lpszstoreprovider.into_param().abi(), ::core::mem::transmute(dwencodingtype), ::core::mem::transmute(hcryptprov), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvpara))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertOpenSystemStoreA<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hprov: usize, szsubsystemprotocol: Param1) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertOpenSystemStoreA(hprov: usize, szsubsystemprotocol: super::super::Foundation::PSTR) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CertOpenSystemStoreA(::core::mem::transmute(hprov), szsubsystemprotocol.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertOpenSystemStoreW<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hprov: usize, szsubsystemprotocol: Param1) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertOpenSystemStoreW(hprov: usize, szsubsystemprotocol: super::super::Foundation::PWSTR) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CertOpenSystemStoreW(::core::mem::transmute(hprov), szsubsystemprotocol.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertRDNValueToStrA(dwvaluetype: u32, pvalue: *const CRYPTOAPI_BLOB, psz: super::super::Foundation::PSTR, csz: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertRDNValueToStrA(dwvaluetype: u32, pvalue: *const CRYPTOAPI_BLOB, psz: super::super::Foundation::PSTR, csz: u32) -> u32; } ::core::mem::transmute(CertRDNValueToStrA(::core::mem::transmute(dwvaluetype), ::core::mem::transmute(pvalue), ::core::mem::transmute(psz), ::core::mem::transmute(csz))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertRDNValueToStrW(dwvaluetype: u32, pvalue: *const CRYPTOAPI_BLOB, psz: super::super::Foundation::PWSTR, csz: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertRDNValueToStrW(dwvaluetype: u32, pvalue: *const CRYPTOAPI_BLOB, psz: super::super::Foundation::PWSTR, csz: u32) -> u32; } ::core::mem::transmute(CertRDNValueToStrW(::core::mem::transmute(dwvaluetype), ::core::mem::transmute(pvalue), ::core::mem::transmute(psz), ::core::mem::transmute(csz))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertRegisterPhysicalStore<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32, pwszstorename: Param2, pstoreinfo: *const CERT_PHYSICAL_STORE_INFO, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertRegisterPhysicalStore(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32, pwszstorename: super::super::Foundation::PWSTR, pstoreinfo: *const CERT_PHYSICAL_STORE_INFO, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertRegisterPhysicalStore(::core::mem::transmute(pvsystemstore), ::core::mem::transmute(dwflags), pwszstorename.into_param().abi(), ::core::mem::transmute(pstoreinfo), ::core::mem::transmute(pvreserved))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertRegisterSystemStore(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32, pstoreinfo: *const CERT_SYSTEM_STORE_INFO, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertRegisterSystemStore(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32, pstoreinfo: *const CERT_SYSTEM_STORE_INFO, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertRegisterSystemStore(::core::mem::transmute(pvsystemstore), ::core::mem::transmute(dwflags), ::core::mem::transmute(pstoreinfo), ::core::mem::transmute(pvreserved))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertRemoveEnhancedKeyUsageIdentifier<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pcertcontext: *const CERT_CONTEXT, pszusageidentifier: Param1) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertRemoveEnhancedKeyUsageIdentifier(pcertcontext: *const CERT_CONTEXT, pszusageidentifier: super::super::Foundation::PSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertRemoveEnhancedKeyUsageIdentifier(::core::mem::transmute(pcertcontext), pszusageidentifier.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CertRemoveStoreFromCollection(hcollectionstore: *const ::core::ffi::c_void, hsiblingstore: *const ::core::ffi::c_void) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertRemoveStoreFromCollection(hcollectionstore: *const ::core::ffi::c_void, hsiblingstore: *const ::core::ffi::c_void); } ::core::mem::transmute(CertRemoveStoreFromCollection(::core::mem::transmute(hcollectionstore), ::core::mem::transmute(hsiblingstore))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertResyncCertificateChainEngine<'a, Param0: ::windows::core::IntoParam<'a, HCERTCHAINENGINE>>(hchainengine: Param0) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertResyncCertificateChainEngine(hchainengine: HCERTCHAINENGINE) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertResyncCertificateChainEngine(hchainengine.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertRetrieveLogoOrBiometricInfo<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pcertcontext: *const CERT_CONTEXT, lpszlogoorbiometrictype: Param1, dwretrievalflags: u32, dwtimeout: u32, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, ppbdata: *mut *mut u8, pcbdata: *mut u32, ppwszmimetype: *mut super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertRetrieveLogoOrBiometricInfo(pcertcontext: *const CERT_CONTEXT, lpszlogoorbiometrictype: super::super::Foundation::PSTR, dwretrievalflags: u32, dwtimeout: u32, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, ppbdata: *mut *mut u8, pcbdata: *mut u32, ppwszmimetype: *mut super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertRetrieveLogoOrBiometricInfo( ::core::mem::transmute(pcertcontext), lpszlogoorbiometrictype.into_param().abi(), ::core::mem::transmute(dwretrievalflags), ::core::mem::transmute(dwtimeout), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved), ::core::mem::transmute(ppbdata), ::core::mem::transmute(pcbdata), ::core::mem::transmute(ppwszmimetype), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertSaveStore(hcertstore: *const ::core::ffi::c_void, dwencodingtype: CERT_QUERY_ENCODING_TYPE, dwsaveas: CERT_STORE_SAVE_AS, dwsaveto: CERT_STORE_SAVE_TO, pvsavetopara: *mut ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertSaveStore(hcertstore: *const ::core::ffi::c_void, dwencodingtype: CERT_QUERY_ENCODING_TYPE, dwsaveas: CERT_STORE_SAVE_AS, dwsaveto: CERT_STORE_SAVE_TO, pvsavetopara: *mut ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertSaveStore(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwencodingtype), ::core::mem::transmute(dwsaveas), ::core::mem::transmute(dwsaveto), ::core::mem::transmute(pvsavetopara), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertSelectCertificateChains(pselectioncontext: *const ::windows::core::GUID, dwflags: u32, pchainparameters: *const CERT_SELECT_CHAIN_PARA, ccriteria: u32, rgpcriteria: *const CERT_SELECT_CRITERIA, hstore: *const ::core::ffi::c_void, pcselection: *mut u32, pprgpselection: *mut *mut *mut CERT_CHAIN_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertSelectCertificateChains(pselectioncontext: *const ::windows::core::GUID, dwflags: u32, pchainparameters: *const CERT_SELECT_CHAIN_PARA, ccriteria: u32, rgpcriteria: *const CERT_SELECT_CRITERIA, hstore: *const ::core::ffi::c_void, pcselection: *mut u32, pprgpselection: *mut *mut *mut CERT_CHAIN_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertSelectCertificateChains( ::core::mem::transmute(pselectioncontext), ::core::mem::transmute(dwflags), ::core::mem::transmute(pchainparameters), ::core::mem::transmute(ccriteria), ::core::mem::transmute(rgpcriteria), ::core::mem::transmute(hstore), ::core::mem::transmute(pcselection), ::core::mem::transmute(pprgpselection), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertSerializeCRLStoreElement(pcrlcontext: *const CRL_CONTEXT, dwflags: u32, pbelement: *mut u8, pcbelement: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertSerializeCRLStoreElement(pcrlcontext: *const CRL_CONTEXT, dwflags: u32, pbelement: *mut u8, pcbelement: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertSerializeCRLStoreElement(::core::mem::transmute(pcrlcontext), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbelement), ::core::mem::transmute(pcbelement))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertSerializeCTLStoreElement(pctlcontext: *const CTL_CONTEXT, dwflags: u32, pbelement: *mut u8, pcbelement: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertSerializeCTLStoreElement(pctlcontext: *const CTL_CONTEXT, dwflags: u32, pbelement: *mut u8, pcbelement: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertSerializeCTLStoreElement(::core::mem::transmute(pctlcontext), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbelement), ::core::mem::transmute(pcbelement))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertSerializeCertificateStoreElement(pcertcontext: *const CERT_CONTEXT, dwflags: u32, pbelement: *mut u8, pcbelement: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertSerializeCertificateStoreElement(pcertcontext: *const CERT_CONTEXT, dwflags: u32, pbelement: *mut u8, pcbelement: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertSerializeCertificateStoreElement(::core::mem::transmute(pcertcontext), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbelement), ::core::mem::transmute(pcbelement))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertSetCRLContextProperty(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertSetCRLContextProperty(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertSetCRLContextProperty(::core::mem::transmute(pcrlcontext), ::core::mem::transmute(dwpropid), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertSetCTLContextProperty(pctlcontext: *const CTL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertSetCTLContextProperty(pctlcontext: *const CTL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertSetCTLContextProperty(::core::mem::transmute(pctlcontext), ::core::mem::transmute(dwpropid), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertSetCertificateContextPropertiesFromCTLEntry(pcertcontext: *const CERT_CONTEXT, pctlentry: *const CTL_ENTRY, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertSetCertificateContextPropertiesFromCTLEntry(pcertcontext: *const CERT_CONTEXT, pctlentry: *const CTL_ENTRY, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertSetCertificateContextPropertiesFromCTLEntry(::core::mem::transmute(pcertcontext), ::core::mem::transmute(pctlentry), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertSetCertificateContextProperty(pcertcontext: *const CERT_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertSetCertificateContextProperty(pcertcontext: *const CERT_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertSetCertificateContextProperty(::core::mem::transmute(pcertcontext), ::core::mem::transmute(dwpropid), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertSetEnhancedKeyUsage(pcertcontext: *const CERT_CONTEXT, pusage: *const CTL_USAGE) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertSetEnhancedKeyUsage(pcertcontext: *const CERT_CONTEXT, pusage: *const CTL_USAGE) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertSetEnhancedKeyUsage(::core::mem::transmute(pcertcontext), ::core::mem::transmute(pusage))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertSetStoreProperty(hcertstore: *const ::core::ffi::c_void, dwpropid: u32, dwflags: u32, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertSetStoreProperty(hcertstore: *const ::core::ffi::c_void, dwpropid: u32, dwflags: u32, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertSetStoreProperty(::core::mem::transmute(hcertstore), ::core::mem::transmute(dwpropid), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertStrToNameA<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dwcertencodingtype: u32, pszx500: Param1, dwstrtype: CERT_STRING_TYPE, pvreserved: *mut ::core::ffi::c_void, pbencoded: *mut u8, pcbencoded: *mut u32, ppszerror: *mut super::super::Foundation::PSTR) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertStrToNameA(dwcertencodingtype: u32, pszx500: super::super::Foundation::PSTR, dwstrtype: CERT_STRING_TYPE, pvreserved: *mut ::core::ffi::c_void, pbencoded: *mut u8, pcbencoded: *mut u32, ppszerror: *mut super::super::Foundation::PSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertStrToNameA(::core::mem::transmute(dwcertencodingtype), pszx500.into_param().abi(), ::core::mem::transmute(dwstrtype), ::core::mem::transmute(pvreserved), ::core::mem::transmute(pbencoded), ::core::mem::transmute(pcbencoded), ::core::mem::transmute(ppszerror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertStrToNameW<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwcertencodingtype: u32, pszx500: Param1, dwstrtype: CERT_STRING_TYPE, pvreserved: *mut ::core::ffi::c_void, pbencoded: *mut u8, pcbencoded: *mut u32, ppszerror: *mut super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertStrToNameW(dwcertencodingtype: u32, pszx500: super::super::Foundation::PWSTR, dwstrtype: CERT_STRING_TYPE, pvreserved: *mut ::core::ffi::c_void, pbencoded: *mut u8, pcbencoded: *mut u32, ppszerror: *mut super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertStrToNameW(::core::mem::transmute(dwcertencodingtype), pszx500.into_param().abi(), ::core::mem::transmute(dwstrtype), ::core::mem::transmute(pvreserved), ::core::mem::transmute(pbencoded), ::core::mem::transmute(pcbencoded), ::core::mem::transmute(ppszerror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertUnregisterPhysicalStore<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32, pwszstorename: Param2) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertUnregisterPhysicalStore(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32, pwszstorename: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertUnregisterPhysicalStore(::core::mem::transmute(pvsystemstore), ::core::mem::transmute(dwflags), pwszstorename.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertUnregisterSystemStore(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertUnregisterSystemStore(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertUnregisterSystemStore(::core::mem::transmute(pvsystemstore), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertVerifyCRLRevocation(dwcertencodingtype: u32, pcertid: *const CERT_INFO, ccrlinfo: u32, rgpcrlinfo: *const *const CRL_INFO) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertVerifyCRLRevocation(dwcertencodingtype: u32, pcertid: *const CERT_INFO, ccrlinfo: u32, rgpcrlinfo: *const *const CRL_INFO) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertVerifyCRLRevocation(::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pcertid), ::core::mem::transmute(ccrlinfo), ::core::mem::transmute(rgpcrlinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertVerifyCRLTimeValidity(ptimetoverify: *const super::super::Foundation::FILETIME, pcrlinfo: *const CRL_INFO) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertVerifyCRLTimeValidity(ptimetoverify: *const super::super::Foundation::FILETIME, pcrlinfo: *const CRL_INFO) -> i32; } ::core::mem::transmute(CertVerifyCRLTimeValidity(::core::mem::transmute(ptimetoverify), ::core::mem::transmute(pcrlinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertVerifyCTLUsage(dwencodingtype: u32, dwsubjecttype: u32, pvsubject: *const ::core::ffi::c_void, psubjectusage: *const CTL_USAGE, dwflags: u32, pverifyusagepara: *const CTL_VERIFY_USAGE_PARA, pverifyusagestatus: *mut CTL_VERIFY_USAGE_STATUS) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertVerifyCTLUsage(dwencodingtype: u32, dwsubjecttype: u32, pvsubject: *const ::core::ffi::c_void, psubjectusage: *const CTL_USAGE, dwflags: u32, pverifyusagepara: *const CTL_VERIFY_USAGE_PARA, pverifyusagestatus: *mut CTL_VERIFY_USAGE_STATUS) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertVerifyCTLUsage(::core::mem::transmute(dwencodingtype), ::core::mem::transmute(dwsubjecttype), ::core::mem::transmute(pvsubject), ::core::mem::transmute(psubjectusage), ::core::mem::transmute(dwflags), ::core::mem::transmute(pverifyusagepara), ::core::mem::transmute(pverifyusagestatus))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertVerifyCertificateChainPolicy<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszpolicyoid: Param0, pchaincontext: *const CERT_CHAIN_CONTEXT, ppolicypara: *const CERT_CHAIN_POLICY_PARA, ppolicystatus: *mut CERT_CHAIN_POLICY_STATUS) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertVerifyCertificateChainPolicy(pszpolicyoid: super::super::Foundation::PSTR, pchaincontext: *const CERT_CHAIN_CONTEXT, ppolicypara: *const CERT_CHAIN_POLICY_PARA, ppolicystatus: *mut CERT_CHAIN_POLICY_STATUS) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertVerifyCertificateChainPolicy(pszpolicyoid.into_param().abi(), ::core::mem::transmute(pchaincontext), ::core::mem::transmute(ppolicypara), ::core::mem::transmute(ppolicystatus))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertVerifyRevocation(dwencodingtype: u32, dwrevtype: u32, ccontext: u32, rgpvcontext: *const *const ::core::ffi::c_void, dwflags: u32, prevpara: *const CERT_REVOCATION_PARA, prevstatus: *mut CERT_REVOCATION_STATUS) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertVerifyRevocation(dwencodingtype: u32, dwrevtype: u32, ccontext: u32, rgpvcontext: *const *const ::core::ffi::c_void, dwflags: u32, prevpara: *const CERT_REVOCATION_PARA, prevstatus: *mut CERT_REVOCATION_STATUS) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertVerifyRevocation(::core::mem::transmute(dwencodingtype), ::core::mem::transmute(dwrevtype), ::core::mem::transmute(ccontext), ::core::mem::transmute(rgpvcontext), ::core::mem::transmute(dwflags), ::core::mem::transmute(prevpara), ::core::mem::transmute(prevstatus))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertVerifySubjectCertificateContext(psubject: *const CERT_CONTEXT, pissuer: *const CERT_CONTEXT, pdwflags: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertVerifySubjectCertificateContext(psubject: *const CERT_CONTEXT, pissuer: *const CERT_CONTEXT, pdwflags: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertVerifySubjectCertificateContext(::core::mem::transmute(psubject), ::core::mem::transmute(pissuer), ::core::mem::transmute(pdwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertVerifyTimeValidity(ptimetoverify: *const super::super::Foundation::FILETIME, pcertinfo: *const CERT_INFO) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertVerifyTimeValidity(ptimetoverify: *const super::super::Foundation::FILETIME, pcertinfo: *const CERT_INFO) -> i32; } ::core::mem::transmute(CertVerifyTimeValidity(::core::mem::transmute(ptimetoverify), ::core::mem::transmute(pcertinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertVerifyValidityNesting(psubjectinfo: *const CERT_INFO, pissuerinfo: *const CERT_INFO) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CertVerifyValidityNesting(psubjectinfo: *const CERT_INFO, pissuerinfo: *const CERT_INFO) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CertVerifyValidityNesting(::core::mem::transmute(psubjectinfo), ::core::mem::transmute(pissuerinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CloseCryptoHandle(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CloseCryptoHandle(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE) -> ::windows::core::HRESULT; } CloseCryptoHandle(::core::mem::transmute(hcrypto)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptAcquireCertificatePrivateKey(pcert: *const CERT_CONTEXT, dwflags: CRYPT_ACQUIRE_FLAGS, pvparameters: *const ::core::ffi::c_void, phcryptprovorncryptkey: *mut usize, pdwkeyspec: *mut CERT_KEY_SPEC, pfcallerfreeprovorncryptkey: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptAcquireCertificatePrivateKey(pcert: *const CERT_CONTEXT, dwflags: CRYPT_ACQUIRE_FLAGS, pvparameters: *const ::core::ffi::c_void, phcryptprovorncryptkey: *mut usize, pdwkeyspec: *mut CERT_KEY_SPEC, pfcallerfreeprovorncryptkey: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptAcquireCertificatePrivateKey(::core::mem::transmute(pcert), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvparameters), ::core::mem::transmute(phcryptprovorncryptkey), ::core::mem::transmute(pdwkeyspec), ::core::mem::transmute(pfcallerfreeprovorncryptkey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptAcquireContextA<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(phprov: *mut usize, szcontainer: Param1, szprovider: Param2, dwprovtype: u32, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptAcquireContextA(phprov: *mut usize, szcontainer: super::super::Foundation::PSTR, szprovider: super::super::Foundation::PSTR, dwprovtype: u32, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptAcquireContextA(::core::mem::transmute(phprov), szcontainer.into_param().abi(), szprovider.into_param().abi(), ::core::mem::transmute(dwprovtype), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptAcquireContextW<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(phprov: *mut usize, szcontainer: Param1, szprovider: Param2, dwprovtype: u32, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptAcquireContextW(phprov: *mut usize, szcontainer: super::super::Foundation::PWSTR, szprovider: super::super::Foundation::PWSTR, dwprovtype: u32, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptAcquireContextW(::core::mem::transmute(phprov), szcontainer.into_param().abi(), szprovider.into_param().abi(), ::core::mem::transmute(dwprovtype), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptBinaryToStringA(pbbinary: *const u8, cbbinary: u32, dwflags: CRYPT_STRING, pszstring: super::super::Foundation::PSTR, pcchstring: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptBinaryToStringA(pbbinary: *const u8, cbbinary: u32, dwflags: CRYPT_STRING, pszstring: super::super::Foundation::PSTR, pcchstring: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptBinaryToStringA(::core::mem::transmute(pbbinary), ::core::mem::transmute(cbbinary), ::core::mem::transmute(dwflags), ::core::mem::transmute(pszstring), ::core::mem::transmute(pcchstring))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptBinaryToStringW(pbbinary: *const u8, cbbinary: u32, dwflags: CRYPT_STRING, pszstring: super::super::Foundation::PWSTR, pcchstring: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptBinaryToStringW(pbbinary: *const u8, cbbinary: u32, dwflags: CRYPT_STRING, pszstring: super::super::Foundation::PWSTR, pcchstring: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptBinaryToStringW(::core::mem::transmute(pbbinary), ::core::mem::transmute(cbbinary), ::core::mem::transmute(dwflags), ::core::mem::transmute(pszstring), ::core::mem::transmute(pcchstring))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptCloseAsyncHandle<'a, Param0: ::windows::core::IntoParam<'a, HCRYPTASYNC>>(hasync: Param0) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptCloseAsyncHandle(hasync: HCRYPTASYNC) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptCloseAsyncHandle(hasync.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptContextAddRef(hprov: usize, pdwreserved: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptContextAddRef(hprov: usize, pdwreserved: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptContextAddRef(::core::mem::transmute(hprov), ::core::mem::transmute(pdwreserved), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptCreateAsyncHandle(dwflags: u32, phasync: *mut HCRYPTASYNC) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptCreateAsyncHandle(dwflags: u32, phasync: *mut HCRYPTASYNC) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptCreateAsyncHandle(::core::mem::transmute(dwflags), ::core::mem::transmute(phasync))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptCreateHash(hprov: usize, algid: u32, hkey: usize, dwflags: u32, phhash: *mut usize) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptCreateHash(hprov: usize, algid: u32, hkey: usize, dwflags: u32, phhash: *mut usize) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptCreateHash(::core::mem::transmute(hprov), ::core::mem::transmute(algid), ::core::mem::transmute(hkey), ::core::mem::transmute(dwflags), ::core::mem::transmute(phhash))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptCreateKeyIdentifierFromCSP<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dwcertencodingtype: u32, pszpubkeyoid: Param1, ppubkeystruc: *const PUBLICKEYSTRUC, cbpubkeystruc: u32, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, pbhash: *mut u8, pcbhash: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptCreateKeyIdentifierFromCSP(dwcertencodingtype: u32, pszpubkeyoid: super::super::Foundation::PSTR, ppubkeystruc: *const PUBLICKEYSTRUC, cbpubkeystruc: u32, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, pbhash: *mut u8, pcbhash: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptCreateKeyIdentifierFromCSP( ::core::mem::transmute(dwcertencodingtype), pszpubkeyoid.into_param().abi(), ::core::mem::transmute(ppubkeystruc), ::core::mem::transmute(cbpubkeystruc), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved), ::core::mem::transmute(pbhash), ::core::mem::transmute(pcbhash), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptDecodeMessage(dwmsgtypeflags: u32, pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbencodedblob: *const u8, cbencodedblob: u32, dwprevinnercontenttype: u32, pdwmsgtype: *mut u32, pdwinnercontenttype: *mut u32, pbdecoded: *mut u8, pcbdecoded: *mut u32, ppxchgcert: *mut *mut CERT_CONTEXT, ppsignercert: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptDecodeMessage(dwmsgtypeflags: u32, pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pverifypara: *const ::core::mem::ManuallyDrop<CRYPT_VERIFY_MESSAGE_PARA>, dwsignerindex: u32, pbencodedblob: *const u8, cbencodedblob: u32, dwprevinnercontenttype: u32, pdwmsgtype: *mut u32, pdwinnercontenttype: *mut u32, pbdecoded: *mut u8, pcbdecoded: *mut u32, ppxchgcert: *mut *mut CERT_CONTEXT, ppsignercert: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptDecodeMessage( ::core::mem::transmute(dwmsgtypeflags), ::core::mem::transmute(pdecryptpara), ::core::mem::transmute(pverifypara), ::core::mem::transmute(dwsignerindex), ::core::mem::transmute(pbencodedblob), ::core::mem::transmute(cbencodedblob), ::core::mem::transmute(dwprevinnercontenttype), ::core::mem::transmute(pdwmsgtype), ::core::mem::transmute(pdwinnercontenttype), ::core::mem::transmute(pbdecoded), ::core::mem::transmute(pcbdecoded), ::core::mem::transmute(ppxchgcert), ::core::mem::transmute(ppsignercert), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptDecodeObject<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dwcertencodingtype: u32, lpszstructtype: Param1, pbencoded: *const u8, cbencoded: u32, dwflags: u32, pvstructinfo: *mut ::core::ffi::c_void, pcbstructinfo: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptDecodeObject(dwcertencodingtype: u32, lpszstructtype: super::super::Foundation::PSTR, pbencoded: *const u8, cbencoded: u32, dwflags: u32, pvstructinfo: *mut ::core::ffi::c_void, pcbstructinfo: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptDecodeObject(::core::mem::transmute(dwcertencodingtype), lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded), ::core::mem::transmute(cbencoded), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvstructinfo), ::core::mem::transmute(pcbstructinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptDecodeObjectEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dwcertencodingtype: u32, lpszstructtype: Param1, pbencoded: *const u8, cbencoded: u32, dwflags: u32, pdecodepara: *const CRYPT_DECODE_PARA, pvstructinfo: *mut ::core::ffi::c_void, pcbstructinfo: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptDecodeObjectEx(dwcertencodingtype: u32, lpszstructtype: super::super::Foundation::PSTR, pbencoded: *const u8, cbencoded: u32, dwflags: u32, pdecodepara: *const ::core::mem::ManuallyDrop<CRYPT_DECODE_PARA>, pvstructinfo: *mut ::core::ffi::c_void, pcbstructinfo: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptDecodeObjectEx( ::core::mem::transmute(dwcertencodingtype), lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded), ::core::mem::transmute(cbencoded), ::core::mem::transmute(dwflags), ::core::mem::transmute(pdecodepara), ::core::mem::transmute(pvstructinfo), ::core::mem::transmute(pcbstructinfo), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptDecrypt<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(hkey: usize, hhash: usize, r#final: Param2, dwflags: u32, pbdata: *mut u8, pdwdatalen: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptDecrypt(hkey: usize, hhash: usize, r#final: super::super::Foundation::BOOL, dwflags: u32, pbdata: *mut u8, pdwdatalen: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptDecrypt(::core::mem::transmute(hkey), ::core::mem::transmute(hhash), r#final.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbdata), ::core::mem::transmute(pdwdatalen))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptDecryptAndVerifyMessageSignature(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbencryptedblob: *const u8, cbencryptedblob: u32, pbdecrypted: *mut u8, pcbdecrypted: *mut u32, ppxchgcert: *mut *mut CERT_CONTEXT, ppsignercert: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptDecryptAndVerifyMessageSignature(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pverifypara: *const ::core::mem::ManuallyDrop<CRYPT_VERIFY_MESSAGE_PARA>, dwsignerindex: u32, pbencryptedblob: *const u8, cbencryptedblob: u32, pbdecrypted: *mut u8, pcbdecrypted: *mut u32, ppxchgcert: *mut *mut CERT_CONTEXT, ppsignercert: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptDecryptAndVerifyMessageSignature( ::core::mem::transmute(pdecryptpara), ::core::mem::transmute(pverifypara), ::core::mem::transmute(dwsignerindex), ::core::mem::transmute(pbencryptedblob), ::core::mem::transmute(cbencryptedblob), ::core::mem::transmute(pbdecrypted), ::core::mem::transmute(pcbdecrypted), ::core::mem::transmute(ppxchgcert), ::core::mem::transmute(ppsignercert), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptDecryptMessage(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pbencryptedblob: *const u8, cbencryptedblob: u32, pbdecrypted: *mut u8, pcbdecrypted: *mut u32, ppxchgcert: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptDecryptMessage(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pbencryptedblob: *const u8, cbencryptedblob: u32, pbdecrypted: *mut u8, pcbdecrypted: *mut u32, ppxchgcert: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptDecryptMessage(::core::mem::transmute(pdecryptpara), ::core::mem::transmute(pbencryptedblob), ::core::mem::transmute(cbencryptedblob), ::core::mem::transmute(pbdecrypted), ::core::mem::transmute(pcbdecrypted), ::core::mem::transmute(ppxchgcert))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptDeriveKey(hprov: usize, algid: u32, hbasedata: usize, dwflags: u32, phkey: *mut usize) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptDeriveKey(hprov: usize, algid: u32, hbasedata: usize, dwflags: u32, phkey: *mut usize) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptDeriveKey(::core::mem::transmute(hprov), ::core::mem::transmute(algid), ::core::mem::transmute(hbasedata), ::core::mem::transmute(dwflags), ::core::mem::transmute(phkey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptDestroyHash(hhash: usize) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptDestroyHash(hhash: usize) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptDestroyHash(::core::mem::transmute(hhash))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptDestroyKey(hkey: usize) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptDestroyKey(hkey: usize) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptDestroyKey(::core::mem::transmute(hkey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptDuplicateHash(hhash: usize, pdwreserved: *mut u32, dwflags: u32, phhash: *mut usize) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptDuplicateHash(hhash: usize, pdwreserved: *mut u32, dwflags: u32, phhash: *mut usize) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptDuplicateHash(::core::mem::transmute(hhash), ::core::mem::transmute(pdwreserved), ::core::mem::transmute(dwflags), ::core::mem::transmute(phhash))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptDuplicateKey(hkey: usize, pdwreserved: *mut u32, dwflags: u32, phkey: *mut usize) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptDuplicateKey(hkey: usize, pdwreserved: *mut u32, dwflags: u32, phkey: *mut usize) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptDuplicateKey(::core::mem::transmute(hkey), ::core::mem::transmute(pdwreserved), ::core::mem::transmute(dwflags), ::core::mem::transmute(phkey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptEncodeObject<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dwcertencodingtype: u32, lpszstructtype: Param1, pvstructinfo: *const ::core::ffi::c_void, pbencoded: *mut u8, pcbencoded: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptEncodeObject(dwcertencodingtype: u32, lpszstructtype: super::super::Foundation::PSTR, pvstructinfo: *const ::core::ffi::c_void, pbencoded: *mut u8, pcbencoded: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptEncodeObject(::core::mem::transmute(dwcertencodingtype), lpszstructtype.into_param().abi(), ::core::mem::transmute(pvstructinfo), ::core::mem::transmute(pbencoded), ::core::mem::transmute(pcbencoded))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptEncodeObjectEx<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: Param1, pvstructinfo: *const ::core::ffi::c_void, dwflags: CRYPT_ENCODE_OBJECT_FLAGS, pencodepara: *const CRYPT_ENCODE_PARA, pvencoded: *mut ::core::ffi::c_void, pcbencoded: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptEncodeObjectEx(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: super::super::Foundation::PSTR, pvstructinfo: *const ::core::ffi::c_void, dwflags: CRYPT_ENCODE_OBJECT_FLAGS, pencodepara: *const ::core::mem::ManuallyDrop<CRYPT_ENCODE_PARA>, pvencoded: *mut ::core::ffi::c_void, pcbencoded: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptEncodeObjectEx(::core::mem::transmute(dwcertencodingtype), lpszstructtype.into_param().abi(), ::core::mem::transmute(pvstructinfo), ::core::mem::transmute(dwflags), ::core::mem::transmute(pencodepara), ::core::mem::transmute(pvencoded), ::core::mem::transmute(pcbencoded))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptEncrypt<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(hkey: usize, hhash: usize, r#final: Param2, dwflags: u32, pbdata: *mut u8, pdwdatalen: *mut u32, dwbuflen: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptEncrypt(hkey: usize, hhash: usize, r#final: super::super::Foundation::BOOL, dwflags: u32, pbdata: *mut u8, pdwdatalen: *mut u32, dwbuflen: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptEncrypt(::core::mem::transmute(hkey), ::core::mem::transmute(hhash), r#final.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbdata), ::core::mem::transmute(pdwdatalen), ::core::mem::transmute(dwbuflen))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptEncryptMessage(pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, crecipientcert: u32, rgprecipientcert: *const *const CERT_CONTEXT, pbtobeencrypted: *const u8, cbtobeencrypted: u32, pbencryptedblob: *mut u8, pcbencryptedblob: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptEncryptMessage(pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, crecipientcert: u32, rgprecipientcert: *const *const CERT_CONTEXT, pbtobeencrypted: *const u8, cbtobeencrypted: u32, pbencryptedblob: *mut u8, pcbencryptedblob: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptEncryptMessage( ::core::mem::transmute(pencryptpara), ::core::mem::transmute(crecipientcert), ::core::mem::transmute(rgprecipientcert), ::core::mem::transmute(pbtobeencrypted), ::core::mem::transmute(cbtobeencrypted), ::core::mem::transmute(pbencryptedblob), ::core::mem::transmute(pcbencryptedblob), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptEnumKeyIdentifierProperties<'a, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pkeyidentifier: *const CRYPTOAPI_BLOB, dwpropid: u32, dwflags: u32, pwszcomputername: Param3, pvreserved: *mut ::core::ffi::c_void, pvarg: *mut ::core::ffi::c_void, pfnenum: ::core::option::Option<PFN_CRYPT_ENUM_KEYID_PROP>) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptEnumKeyIdentifierProperties(pkeyidentifier: *const CRYPTOAPI_BLOB, dwpropid: u32, dwflags: u32, pwszcomputername: super::super::Foundation::PWSTR, pvreserved: *mut ::core::ffi::c_void, pvarg: *mut ::core::ffi::c_void, pfnenum: ::windows::core::RawPtr) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptEnumKeyIdentifierProperties(::core::mem::transmute(pkeyidentifier), ::core::mem::transmute(dwpropid), ::core::mem::transmute(dwflags), pwszcomputername.into_param().abi(), ::core::mem::transmute(pvreserved), ::core::mem::transmute(pvarg), ::core::mem::transmute(pfnenum))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptEnumOIDFunction<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dwencodingtype: u32, pszfuncname: Param1, pszoid: Param2, dwflags: u32, pvarg: *mut ::core::ffi::c_void, pfnenumoidfunc: ::core::option::Option<PFN_CRYPT_ENUM_OID_FUNC>) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptEnumOIDFunction(dwencodingtype: u32, pszfuncname: super::super::Foundation::PSTR, pszoid: super::super::Foundation::PSTR, dwflags: u32, pvarg: *mut ::core::ffi::c_void, pfnenumoidfunc: ::windows::core::RawPtr) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptEnumOIDFunction(::core::mem::transmute(dwencodingtype), pszfuncname.into_param().abi(), pszoid.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvarg), ::core::mem::transmute(pfnenumoidfunc))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptEnumOIDInfo(dwgroupid: u32, dwflags: u32, pvarg: *mut ::core::ffi::c_void, pfnenumoidinfo: ::core::option::Option<PFN_CRYPT_ENUM_OID_INFO>) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptEnumOIDInfo(dwgroupid: u32, dwflags: u32, pvarg: *mut ::core::ffi::c_void, pfnenumoidinfo: ::windows::core::RawPtr) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptEnumOIDInfo(::core::mem::transmute(dwgroupid), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvarg), ::core::mem::transmute(pfnenumoidinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptEnumProviderTypesA(dwindex: u32, pdwreserved: *mut u32, dwflags: u32, pdwprovtype: *mut u32, sztypename: super::super::Foundation::PSTR, pcbtypename: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptEnumProviderTypesA(dwindex: u32, pdwreserved: *mut u32, dwflags: u32, pdwprovtype: *mut u32, sztypename: super::super::Foundation::PSTR, pcbtypename: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptEnumProviderTypesA(::core::mem::transmute(dwindex), ::core::mem::transmute(pdwreserved), ::core::mem::transmute(dwflags), ::core::mem::transmute(pdwprovtype), ::core::mem::transmute(sztypename), ::core::mem::transmute(pcbtypename))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptEnumProviderTypesW(dwindex: u32, pdwreserved: *mut u32, dwflags: u32, pdwprovtype: *mut u32, sztypename: super::super::Foundation::PWSTR, pcbtypename: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptEnumProviderTypesW(dwindex: u32, pdwreserved: *mut u32, dwflags: u32, pdwprovtype: *mut u32, sztypename: super::super::Foundation::PWSTR, pcbtypename: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptEnumProviderTypesW(::core::mem::transmute(dwindex), ::core::mem::transmute(pdwreserved), ::core::mem::transmute(dwflags), ::core::mem::transmute(pdwprovtype), ::core::mem::transmute(sztypename), ::core::mem::transmute(pcbtypename))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptEnumProvidersA(dwindex: u32, pdwreserved: *mut u32, dwflags: u32, pdwprovtype: *mut u32, szprovname: super::super::Foundation::PSTR, pcbprovname: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptEnumProvidersA(dwindex: u32, pdwreserved: *mut u32, dwflags: u32, pdwprovtype: *mut u32, szprovname: super::super::Foundation::PSTR, pcbprovname: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptEnumProvidersA(::core::mem::transmute(dwindex), ::core::mem::transmute(pdwreserved), ::core::mem::transmute(dwflags), ::core::mem::transmute(pdwprovtype), ::core::mem::transmute(szprovname), ::core::mem::transmute(pcbprovname))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptEnumProvidersW(dwindex: u32, pdwreserved: *mut u32, dwflags: u32, pdwprovtype: *mut u32, szprovname: super::super::Foundation::PWSTR, pcbprovname: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptEnumProvidersW(dwindex: u32, pdwreserved: *mut u32, dwflags: u32, pdwprovtype: *mut u32, szprovname: super::super::Foundation::PWSTR, pcbprovname: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptEnumProvidersW(::core::mem::transmute(dwindex), ::core::mem::transmute(pdwreserved), ::core::mem::transmute(dwflags), ::core::mem::transmute(pdwprovtype), ::core::mem::transmute(szprovname), ::core::mem::transmute(pcbprovname))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptExportKey(hkey: usize, hexpkey: usize, dwblobtype: u32, dwflags: CRYPT_KEY_FLAGS, pbdata: *mut u8, pdwdatalen: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptExportKey(hkey: usize, hexpkey: usize, dwblobtype: u32, dwflags: CRYPT_KEY_FLAGS, pbdata: *mut u8, pdwdatalen: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptExportKey(::core::mem::transmute(hkey), ::core::mem::transmute(hexpkey), ::core::mem::transmute(dwblobtype), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbdata), ::core::mem::transmute(pdwdatalen))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptExportPKCS8<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hcryptprov: usize, dwkeyspec: u32, pszprivatekeyobjid: Param2, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void, pbprivatekeyblob: *mut u8, pcbprivatekeyblob: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptExportPKCS8(hcryptprov: usize, dwkeyspec: u32, pszprivatekeyobjid: super::super::Foundation::PSTR, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void, pbprivatekeyblob: *mut u8, pcbprivatekeyblob: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptExportPKCS8(::core::mem::transmute(hcryptprov), ::core::mem::transmute(dwkeyspec), pszprivatekeyobjid.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvauxinfo), ::core::mem::transmute(pbprivatekeyblob), ::core::mem::transmute(pcbprivatekeyblob))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptExportPublicKeyInfo(hcryptprovorncryptkey: usize, dwkeyspec: u32, dwcertencodingtype: u32, pinfo: *mut CERT_PUBLIC_KEY_INFO, pcbinfo: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptExportPublicKeyInfo(hcryptprovorncryptkey: usize, dwkeyspec: u32, dwcertencodingtype: u32, pinfo: *mut CERT_PUBLIC_KEY_INFO, pcbinfo: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptExportPublicKeyInfo(::core::mem::transmute(hcryptprovorncryptkey), ::core::mem::transmute(dwkeyspec), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pinfo), ::core::mem::transmute(pcbinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptExportPublicKeyInfoEx<'a, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hcryptprovorncryptkey: usize, dwkeyspec: u32, dwcertencodingtype: u32, pszpublickeyobjid: Param3, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void, pinfo: *mut CERT_PUBLIC_KEY_INFO, pcbinfo: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptExportPublicKeyInfoEx(hcryptprovorncryptkey: usize, dwkeyspec: u32, dwcertencodingtype: u32, pszpublickeyobjid: super::super::Foundation::PSTR, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void, pinfo: *mut CERT_PUBLIC_KEY_INFO, pcbinfo: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptExportPublicKeyInfoEx( ::core::mem::transmute(hcryptprovorncryptkey), ::core::mem::transmute(dwkeyspec), ::core::mem::transmute(dwcertencodingtype), pszpublickeyobjid.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvauxinfo), ::core::mem::transmute(pinfo), ::core::mem::transmute(pcbinfo), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptExportPublicKeyInfoFromBCryptKeyHandle<'a, Param0: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hbcryptkey: Param0, dwcertencodingtype: u32, pszpublickeyobjid: Param2, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void, pinfo: *mut CERT_PUBLIC_KEY_INFO, pcbinfo: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptExportPublicKeyInfoFromBCryptKeyHandle(hbcryptkey: BCRYPT_KEY_HANDLE, dwcertencodingtype: u32, pszpublickeyobjid: super::super::Foundation::PSTR, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void, pinfo: *mut CERT_PUBLIC_KEY_INFO, pcbinfo: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptExportPublicKeyInfoFromBCryptKeyHandle(hbcryptkey.into_param().abi(), ::core::mem::transmute(dwcertencodingtype), pszpublickeyobjid.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvauxinfo), ::core::mem::transmute(pinfo), ::core::mem::transmute(pcbinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptFindCertificateKeyProvInfo(pcert: *const CERT_CONTEXT, dwflags: CRYPT_FIND_FLAGS, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptFindCertificateKeyProvInfo(pcert: *const CERT_CONTEXT, dwflags: CRYPT_FIND_FLAGS, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptFindCertificateKeyProvInfo(::core::mem::transmute(pcert), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptFindLocalizedName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pwszcryptname: Param0) -> super::super::Foundation::PWSTR { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptFindLocalizedName(pwszcryptname: super::super::Foundation::PWSTR) -> super::super::Foundation::PWSTR; } ::core::mem::transmute(CryptFindLocalizedName(pwszcryptname.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptFindOIDInfo(dwkeytype: u32, pvkey: *const ::core::ffi::c_void, dwgroupid: u32) -> *mut CRYPT_OID_INFO { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptFindOIDInfo(dwkeytype: u32, pvkey: *const ::core::ffi::c_void, dwgroupid: u32) -> *mut CRYPT_OID_INFO; } ::core::mem::transmute(CryptFindOIDInfo(::core::mem::transmute(dwkeytype), ::core::mem::transmute(pvkey), ::core::mem::transmute(dwgroupid))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptFormatObject<'a, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dwcertencodingtype: u32, dwformattype: u32, dwformatstrtype: u32, pformatstruct: *const ::core::ffi::c_void, lpszstructtype: Param4, pbencoded: *const u8, cbencoded: u32, pbformat: *mut ::core::ffi::c_void, pcbformat: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptFormatObject(dwcertencodingtype: u32, dwformattype: u32, dwformatstrtype: u32, pformatstruct: *const ::core::ffi::c_void, lpszstructtype: super::super::Foundation::PSTR, pbencoded: *const u8, cbencoded: u32, pbformat: *mut ::core::ffi::c_void, pcbformat: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptFormatObject( ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(dwformattype), ::core::mem::transmute(dwformatstrtype), ::core::mem::transmute(pformatstruct), lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded), ::core::mem::transmute(cbencoded), ::core::mem::transmute(pbformat), ::core::mem::transmute(pcbformat), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptFreeOIDFunctionAddress(hfuncaddr: *const ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptFreeOIDFunctionAddress(hfuncaddr: *const ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptFreeOIDFunctionAddress(::core::mem::transmute(hfuncaddr), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGenKey(hprov: usize, algid: u32, dwflags: CRYPT_KEY_FLAGS, phkey: *mut usize) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGenKey(hprov: usize, algid: u32, dwflags: CRYPT_KEY_FLAGS, phkey: *mut usize) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGenKey(::core::mem::transmute(hprov), ::core::mem::transmute(algid), ::core::mem::transmute(dwflags), ::core::mem::transmute(phkey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGenRandom(hprov: usize, dwlen: u32, pbbuffer: *mut u8) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGenRandom(hprov: usize, dwlen: u32, pbbuffer: *mut u8) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGenRandom(::core::mem::transmute(hprov), ::core::mem::transmute(dwlen), ::core::mem::transmute(pbbuffer))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetAsyncParam<'a, Param0: ::windows::core::IntoParam<'a, HCRYPTASYNC>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hasync: Param0, pszparamoid: Param1, ppvparam: *mut *mut ::core::ffi::c_void, ppfnfree: *mut ::core::option::Option<PFN_CRYPT_ASYNC_PARAM_FREE_FUNC>) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetAsyncParam(hasync: HCRYPTASYNC, pszparamoid: super::super::Foundation::PSTR, ppvparam: *mut *mut ::core::ffi::c_void, ppfnfree: *mut ::windows::core::RawPtr) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetAsyncParam(hasync.into_param().abi(), pszparamoid.into_param().abi(), ::core::mem::transmute(ppvparam), ::core::mem::transmute(ppfnfree))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetDefaultOIDDllList(hfuncset: *const ::core::ffi::c_void, dwencodingtype: u32, pwszdlllist: super::super::Foundation::PWSTR, pcchdlllist: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetDefaultOIDDllList(hfuncset: *const ::core::ffi::c_void, dwencodingtype: u32, pwszdlllist: super::super::Foundation::PWSTR, pcchdlllist: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetDefaultOIDDllList(::core::mem::transmute(hfuncset), ::core::mem::transmute(dwencodingtype), ::core::mem::transmute(pwszdlllist), ::core::mem::transmute(pcchdlllist))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetDefaultOIDFunctionAddress<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hfuncset: *const ::core::ffi::c_void, dwencodingtype: u32, pwszdll: Param2, dwflags: u32, ppvfuncaddr: *mut *mut ::core::ffi::c_void, phfuncaddr: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetDefaultOIDFunctionAddress(hfuncset: *const ::core::ffi::c_void, dwencodingtype: u32, pwszdll: super::super::Foundation::PWSTR, dwflags: u32, ppvfuncaddr: *mut *mut ::core::ffi::c_void, phfuncaddr: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetDefaultOIDFunctionAddress(::core::mem::transmute(hfuncset), ::core::mem::transmute(dwencodingtype), pwszdll.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(ppvfuncaddr), ::core::mem::transmute(phfuncaddr))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetDefaultProviderA(dwprovtype: u32, pdwreserved: *mut u32, dwflags: u32, pszprovname: super::super::Foundation::PSTR, pcbprovname: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetDefaultProviderA(dwprovtype: u32, pdwreserved: *mut u32, dwflags: u32, pszprovname: super::super::Foundation::PSTR, pcbprovname: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetDefaultProviderA(::core::mem::transmute(dwprovtype), ::core::mem::transmute(pdwreserved), ::core::mem::transmute(dwflags), ::core::mem::transmute(pszprovname), ::core::mem::transmute(pcbprovname))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetDefaultProviderW(dwprovtype: u32, pdwreserved: *mut u32, dwflags: u32, pszprovname: super::super::Foundation::PWSTR, pcbprovname: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetDefaultProviderW(dwprovtype: u32, pdwreserved: *mut u32, dwflags: u32, pszprovname: super::super::Foundation::PWSTR, pcbprovname: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetDefaultProviderW(::core::mem::transmute(dwprovtype), ::core::mem::transmute(pdwreserved), ::core::mem::transmute(dwflags), ::core::mem::transmute(pszprovname), ::core::mem::transmute(pcbprovname))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetHashParam(hhash: usize, dwparam: u32, pbdata: *mut u8, pdwdatalen: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetHashParam(hhash: usize, dwparam: u32, pbdata: *mut u8, pdwdatalen: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetHashParam(::core::mem::transmute(hhash), ::core::mem::transmute(dwparam), ::core::mem::transmute(pbdata), ::core::mem::transmute(pdwdatalen), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetKeyIdentifierProperty<'a, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pkeyidentifier: *const CRYPTOAPI_BLOB, dwpropid: u32, dwflags: u32, pwszcomputername: Param3, pvreserved: *mut ::core::ffi::c_void, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetKeyIdentifierProperty(pkeyidentifier: *const CRYPTOAPI_BLOB, dwpropid: u32, dwflags: u32, pwszcomputername: super::super::Foundation::PWSTR, pvreserved: *mut ::core::ffi::c_void, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetKeyIdentifierProperty(::core::mem::transmute(pkeyidentifier), ::core::mem::transmute(dwpropid), ::core::mem::transmute(dwflags), pwszcomputername.into_param().abi(), ::core::mem::transmute(pvreserved), ::core::mem::transmute(pvdata), ::core::mem::transmute(pcbdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetKeyParam(hkey: usize, dwparam: CRYPT_KEY_PARAM_ID, pbdata: *mut u8, pdwdatalen: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetKeyParam(hkey: usize, dwparam: CRYPT_KEY_PARAM_ID, pbdata: *mut u8, pdwdatalen: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetKeyParam(::core::mem::transmute(hkey), ::core::mem::transmute(dwparam), ::core::mem::transmute(pbdata), ::core::mem::transmute(pdwdatalen), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CryptGetMessageCertificates(dwmsgandcertencodingtype: u32, hcryptprov: usize, dwflags: u32, pbsignedblob: *const u8, cbsignedblob: u32) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetMessageCertificates(dwmsgandcertencodingtype: u32, hcryptprov: usize, dwflags: u32, pbsignedblob: *const u8, cbsignedblob: u32) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CryptGetMessageCertificates(::core::mem::transmute(dwmsgandcertencodingtype), ::core::mem::transmute(hcryptprov), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbsignedblob), ::core::mem::transmute(cbsignedblob))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CryptGetMessageSignerCount(dwmsgencodingtype: u32, pbsignedblob: *const u8, cbsignedblob: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetMessageSignerCount(dwmsgencodingtype: u32, pbsignedblob: *const u8, cbsignedblob: u32) -> i32; } ::core::mem::transmute(CryptGetMessageSignerCount(::core::mem::transmute(dwmsgencodingtype), ::core::mem::transmute(pbsignedblob), ::core::mem::transmute(cbsignedblob))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetOIDFunctionAddress<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hfuncset: *const ::core::ffi::c_void, dwencodingtype: u32, pszoid: Param2, dwflags: u32, ppvfuncaddr: *mut *mut ::core::ffi::c_void, phfuncaddr: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetOIDFunctionAddress(hfuncset: *const ::core::ffi::c_void, dwencodingtype: u32, pszoid: super::super::Foundation::PSTR, dwflags: u32, ppvfuncaddr: *mut *mut ::core::ffi::c_void, phfuncaddr: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetOIDFunctionAddress(::core::mem::transmute(hfuncset), ::core::mem::transmute(dwencodingtype), pszoid.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(ppvfuncaddr), ::core::mem::transmute(phfuncaddr))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetOIDFunctionValue<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwencodingtype: u32, pszfuncname: Param1, pszoid: Param2, pwszvaluename: Param3, pdwvaluetype: *mut u32, pbvaluedata: *mut u8, pcbvaluedata: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetOIDFunctionValue(dwencodingtype: u32, pszfuncname: super::super::Foundation::PSTR, pszoid: super::super::Foundation::PSTR, pwszvaluename: super::super::Foundation::PWSTR, pdwvaluetype: *mut u32, pbvaluedata: *mut u8, pcbvaluedata: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetOIDFunctionValue(::core::mem::transmute(dwencodingtype), pszfuncname.into_param().abi(), pszoid.into_param().abi(), pwszvaluename.into_param().abi(), ::core::mem::transmute(pdwvaluetype), ::core::mem::transmute(pbvaluedata), ::core::mem::transmute(pcbvaluedata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetObjectUrl<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszurloid: Param0, pvpara: *const ::core::ffi::c_void, dwflags: CRYPT_GET_URL_FLAGS, purlarray: *mut CRYPT_URL_ARRAY, pcburlarray: *mut u32, purlinfo: *mut CRYPT_URL_INFO, pcburlinfo: *mut u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetObjectUrl(pszurloid: super::super::Foundation::PSTR, pvpara: *const ::core::ffi::c_void, dwflags: CRYPT_GET_URL_FLAGS, purlarray: *mut CRYPT_URL_ARRAY, pcburlarray: *mut u32, purlinfo: *mut CRYPT_URL_INFO, pcburlinfo: *mut u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetObjectUrl(pszurloid.into_param().abi(), ::core::mem::transmute(pvpara), ::core::mem::transmute(dwflags), ::core::mem::transmute(purlarray), ::core::mem::transmute(pcburlarray), ::core::mem::transmute(purlinfo), ::core::mem::transmute(pcburlinfo), ::core::mem::transmute(pvreserved))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetProvParam(hprov: usize, dwparam: u32, pbdata: *mut u8, pdwdatalen: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetProvParam(hprov: usize, dwparam: u32, pbdata: *mut u8, pdwdatalen: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetProvParam(::core::mem::transmute(hprov), ::core::mem::transmute(dwparam), ::core::mem::transmute(pbdata), ::core::mem::transmute(pdwdatalen), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptGetUserKey(hprov: usize, dwkeyspec: u32, phuserkey: *mut usize) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptGetUserKey(hprov: usize, dwkeyspec: u32, phuserkey: *mut usize) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptGetUserKey(::core::mem::transmute(hprov), ::core::mem::transmute(dwkeyspec), ::core::mem::transmute(phuserkey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptHashCertificate(hcryptprov: usize, algid: u32, dwflags: u32, pbencoded: *const u8, cbencoded: u32, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptHashCertificate(hcryptprov: usize, algid: u32, dwflags: u32, pbencoded: *const u8, cbencoded: u32, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptHashCertificate(::core::mem::transmute(hcryptprov), ::core::mem::transmute(algid), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbencoded), ::core::mem::transmute(cbencoded), ::core::mem::transmute(pbcomputedhash), ::core::mem::transmute(pcbcomputedhash))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptHashCertificate2<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pwszcnghashalgid: Param0, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, pbencoded: *const u8, cbencoded: u32, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptHashCertificate2(pwszcnghashalgid: super::super::Foundation::PWSTR, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, pbencoded: *const u8, cbencoded: u32, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptHashCertificate2(pwszcnghashalgid.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved), ::core::mem::transmute(pbencoded), ::core::mem::transmute(cbencoded), ::core::mem::transmute(pbcomputedhash), ::core::mem::transmute(pcbcomputedhash))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptHashData(hhash: usize, pbdata: *const u8, dwdatalen: u32, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptHashData(hhash: usize, pbdata: *const u8, dwdatalen: u32, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptHashData(::core::mem::transmute(hhash), ::core::mem::transmute(pbdata), ::core::mem::transmute(dwdatalen), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptHashMessage<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(phashpara: *const CRYPT_HASH_MESSAGE_PARA, fdetachedhash: Param1, ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbhashedblob: *mut u8, pcbhashedblob: *mut u32, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptHashMessage(phashpara: *const CRYPT_HASH_MESSAGE_PARA, fdetachedhash: super::super::Foundation::BOOL, ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbhashedblob: *mut u8, pcbhashedblob: *mut u32, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptHashMessage( ::core::mem::transmute(phashpara), fdetachedhash.into_param().abi(), ::core::mem::transmute(ctobehashed), ::core::mem::transmute(rgpbtobehashed), ::core::mem::transmute(rgcbtobehashed), ::core::mem::transmute(pbhashedblob), ::core::mem::transmute(pcbhashedblob), ::core::mem::transmute(pbcomputedhash), ::core::mem::transmute(pcbcomputedhash), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptHashPublicKeyInfo(hcryptprov: usize, algid: u32, dwflags: u32, dwcertencodingtype: u32, pinfo: *const CERT_PUBLIC_KEY_INFO, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptHashPublicKeyInfo(hcryptprov: usize, algid: u32, dwflags: u32, dwcertencodingtype: u32, pinfo: *const CERT_PUBLIC_KEY_INFO, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptHashPublicKeyInfo(::core::mem::transmute(hcryptprov), ::core::mem::transmute(algid), ::core::mem::transmute(dwflags), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pinfo), ::core::mem::transmute(pbcomputedhash), ::core::mem::transmute(pcbcomputedhash))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptHashSessionKey(hhash: usize, hkey: usize, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptHashSessionKey(hhash: usize, hkey: usize, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptHashSessionKey(::core::mem::transmute(hhash), ::core::mem::transmute(hkey), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptHashToBeSigned(hcryptprov: usize, dwcertencodingtype: u32, pbencoded: *const u8, cbencoded: u32, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptHashToBeSigned(hcryptprov: usize, dwcertencodingtype: u32, pbencoded: *const u8, cbencoded: u32, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptHashToBeSigned(::core::mem::transmute(hcryptprov), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pbencoded), ::core::mem::transmute(cbencoded), ::core::mem::transmute(pbcomputedhash), ::core::mem::transmute(pcbcomputedhash))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptImportKey(hprov: usize, pbdata: *const u8, dwdatalen: u32, hpubkey: usize, dwflags: CRYPT_KEY_FLAGS, phkey: *mut usize) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptImportKey(hprov: usize, pbdata: *const u8, dwdatalen: u32, hpubkey: usize, dwflags: CRYPT_KEY_FLAGS, phkey: *mut usize) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptImportKey(::core::mem::transmute(hprov), ::core::mem::transmute(pbdata), ::core::mem::transmute(dwdatalen), ::core::mem::transmute(hpubkey), ::core::mem::transmute(dwflags), ::core::mem::transmute(phkey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptImportPKCS8<'a, Param0: ::windows::core::IntoParam<'a, CRYPT_PKCS8_IMPORT_PARAMS>>(sprivatekeyandparams: Param0, dwflags: CRYPT_KEY_FLAGS, phcryptprov: *mut usize, pvauxinfo: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptImportPKCS8(sprivatekeyandparams: ::core::mem::ManuallyDrop<CRYPT_PKCS8_IMPORT_PARAMS>, dwflags: CRYPT_KEY_FLAGS, phcryptprov: *mut usize, pvauxinfo: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptImportPKCS8(sprivatekeyandparams.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(phcryptprov), ::core::mem::transmute(pvauxinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptImportPublicKeyInfo(hcryptprov: usize, dwcertencodingtype: u32, pinfo: *const CERT_PUBLIC_KEY_INFO, phkey: *mut usize) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptImportPublicKeyInfo(hcryptprov: usize, dwcertencodingtype: u32, pinfo: *const CERT_PUBLIC_KEY_INFO, phkey: *mut usize) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptImportPublicKeyInfo(::core::mem::transmute(hcryptprov), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pinfo), ::core::mem::transmute(phkey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptImportPublicKeyInfoEx(hcryptprov: usize, dwcertencodingtype: u32, pinfo: *const CERT_PUBLIC_KEY_INFO, aikeyalg: u32, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void, phkey: *mut usize) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptImportPublicKeyInfoEx(hcryptprov: usize, dwcertencodingtype: u32, pinfo: *const CERT_PUBLIC_KEY_INFO, aikeyalg: u32, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void, phkey: *mut usize) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptImportPublicKeyInfoEx(::core::mem::transmute(hcryptprov), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pinfo), ::core::mem::transmute(aikeyalg), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvauxinfo), ::core::mem::transmute(phkey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptImportPublicKeyInfoEx2(dwcertencodingtype: u32, pinfo: *const CERT_PUBLIC_KEY_INFO, dwflags: CRYPT_IMPORT_PUBLIC_KEY_FLAGS, pvauxinfo: *const ::core::ffi::c_void, phkey: *mut BCRYPT_KEY_HANDLE) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptImportPublicKeyInfoEx2(dwcertencodingtype: u32, pinfo: *const CERT_PUBLIC_KEY_INFO, dwflags: CRYPT_IMPORT_PUBLIC_KEY_FLAGS, pvauxinfo: *const ::core::ffi::c_void, phkey: *mut BCRYPT_KEY_HANDLE) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptImportPublicKeyInfoEx2(::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pinfo), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvauxinfo), ::core::mem::transmute(phkey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptInitOIDFunctionSet<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszfuncname: Param0, dwflags: u32) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptInitOIDFunctionSet(pszfuncname: super::super::Foundation::PSTR, dwflags: u32) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CryptInitOIDFunctionSet(pszfuncname.into_param().abi(), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptInstallCancelRetrieval(pfncancel: ::core::option::Option<PFN_CRYPT_CANCEL_RETRIEVAL>, pvarg: *const ::core::ffi::c_void, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptInstallCancelRetrieval(pfncancel: ::windows::core::RawPtr, pvarg: *const ::core::ffi::c_void, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptInstallCancelRetrieval(::core::mem::transmute(pfncancel), ::core::mem::transmute(pvarg), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptInstallDefaultContext(hcryptprov: usize, dwdefaulttype: CRYPT_DEFAULT_CONTEXT_TYPE, pvdefaultpara: *const ::core::ffi::c_void, dwflags: CRYPT_DEFAULT_CONTEXT_FLAGS, pvreserved: *mut ::core::ffi::c_void, phdefaultcontext: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptInstallDefaultContext(hcryptprov: usize, dwdefaulttype: CRYPT_DEFAULT_CONTEXT_TYPE, pvdefaultpara: *const ::core::ffi::c_void, dwflags: CRYPT_DEFAULT_CONTEXT_FLAGS, pvreserved: *mut ::core::ffi::c_void, phdefaultcontext: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptInstallDefaultContext(::core::mem::transmute(hcryptprov), ::core::mem::transmute(dwdefaulttype), ::core::mem::transmute(pvdefaultpara), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved), ::core::mem::transmute(phdefaultcontext))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptInstallOIDFunctionAddress<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HINSTANCE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hmodule: Param0, dwencodingtype: u32, pszfuncname: Param2, cfuncentry: u32, rgfuncentry: *const CRYPT_OID_FUNC_ENTRY, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptInstallOIDFunctionAddress(hmodule: super::super::Foundation::HINSTANCE, dwencodingtype: u32, pszfuncname: super::super::Foundation::PSTR, cfuncentry: u32, rgfuncentry: *const CRYPT_OID_FUNC_ENTRY, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptInstallOIDFunctionAddress(hmodule.into_param().abi(), ::core::mem::transmute(dwencodingtype), pszfuncname.into_param().abi(), ::core::mem::transmute(cfuncentry), ::core::mem::transmute(rgfuncentry), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CryptMemAlloc(cbsize: u32) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMemAlloc(cbsize: u32) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CryptMemAlloc(::core::mem::transmute(cbsize))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CryptMemFree(pv: *const ::core::ffi::c_void) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMemFree(pv: *const ::core::ffi::c_void); } ::core::mem::transmute(CryptMemFree(::core::mem::transmute(pv))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CryptMemRealloc(pv: *const ::core::ffi::c_void, cbsize: u32) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMemRealloc(pv: *const ::core::ffi::c_void, cbsize: u32) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CryptMemRealloc(::core::mem::transmute(pv), ::core::mem::transmute(cbsize))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgCalculateEncodedLength<'a, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: u32, pvmsgencodeinfo: *const ::core::ffi::c_void, pszinnercontentobjid: Param4, cbdata: u32) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgCalculateEncodedLength(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: u32, pvmsgencodeinfo: *const ::core::ffi::c_void, pszinnercontentobjid: super::super::Foundation::PSTR, cbdata: u32) -> u32; } ::core::mem::transmute(CryptMsgCalculateEncodedLength(::core::mem::transmute(dwmsgencodingtype), ::core::mem::transmute(dwflags), ::core::mem::transmute(dwmsgtype), ::core::mem::transmute(pvmsgencodeinfo), pszinnercontentobjid.into_param().abi(), ::core::mem::transmute(cbdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgClose(hcryptmsg: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgClose(hcryptmsg: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptMsgClose(::core::mem::transmute(hcryptmsg))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgControl(hcryptmsg: *const ::core::ffi::c_void, dwflags: u32, dwctrltype: u32, pvctrlpara: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgControl(hcryptmsg: *const ::core::ffi::c_void, dwflags: u32, dwctrltype: u32, pvctrlpara: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptMsgControl(::core::mem::transmute(hcryptmsg), ::core::mem::transmute(dwflags), ::core::mem::transmute(dwctrltype), ::core::mem::transmute(pvctrlpara))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgCountersign(hcryptmsg: *const ::core::ffi::c_void, dwindex: u32, ccountersigners: u32, rgcountersigners: *const CMSG_SIGNER_ENCODE_INFO) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgCountersign(hcryptmsg: *const ::core::ffi::c_void, dwindex: u32, ccountersigners: u32, rgcountersigners: *const CMSG_SIGNER_ENCODE_INFO) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptMsgCountersign(::core::mem::transmute(hcryptmsg), ::core::mem::transmute(dwindex), ::core::mem::transmute(ccountersigners), ::core::mem::transmute(rgcountersigners))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgCountersignEncoded(dwencodingtype: u32, pbsignerinfo: *const u8, cbsignerinfo: u32, ccountersigners: u32, rgcountersigners: *const CMSG_SIGNER_ENCODE_INFO, pbcountersignature: *mut u8, pcbcountersignature: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgCountersignEncoded(dwencodingtype: u32, pbsignerinfo: *const u8, cbsignerinfo: u32, ccountersigners: u32, rgcountersigners: *const CMSG_SIGNER_ENCODE_INFO, pbcountersignature: *mut u8, pcbcountersignature: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptMsgCountersignEncoded( ::core::mem::transmute(dwencodingtype), ::core::mem::transmute(pbsignerinfo), ::core::mem::transmute(cbsignerinfo), ::core::mem::transmute(ccountersigners), ::core::mem::transmute(rgcountersigners), ::core::mem::transmute(pbcountersignature), ::core::mem::transmute(pcbcountersignature), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CryptMsgDuplicate(hcryptmsg: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgDuplicate(hcryptmsg: *const ::core::ffi::c_void) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CryptMsgDuplicate(::core::mem::transmute(hcryptmsg))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgEncodeAndSignCTL(dwmsgencodingtype: u32, pctlinfo: *const CTL_INFO, psigninfo: *const CMSG_SIGNED_ENCODE_INFO, dwflags: u32, pbencoded: *mut u8, pcbencoded: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgEncodeAndSignCTL(dwmsgencodingtype: u32, pctlinfo: *const CTL_INFO, psigninfo: *const CMSG_SIGNED_ENCODE_INFO, dwflags: u32, pbencoded: *mut u8, pcbencoded: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptMsgEncodeAndSignCTL(::core::mem::transmute(dwmsgencodingtype), ::core::mem::transmute(pctlinfo), ::core::mem::transmute(psigninfo), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbencoded), ::core::mem::transmute(pcbencoded))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgGetAndVerifySigner(hcryptmsg: *const ::core::ffi::c_void, csignerstore: u32, rghsignerstore: *const *const ::core::ffi::c_void, dwflags: u32, ppsigner: *mut *mut CERT_CONTEXT, pdwsignerindex: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgGetAndVerifySigner(hcryptmsg: *const ::core::ffi::c_void, csignerstore: u32, rghsignerstore: *const *const ::core::ffi::c_void, dwflags: u32, ppsigner: *mut *mut CERT_CONTEXT, pdwsignerindex: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptMsgGetAndVerifySigner(::core::mem::transmute(hcryptmsg), ::core::mem::transmute(csignerstore), ::core::mem::transmute(rghsignerstore), ::core::mem::transmute(dwflags), ::core::mem::transmute(ppsigner), ::core::mem::transmute(pdwsignerindex))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgGetParam(hcryptmsg: *const ::core::ffi::c_void, dwparamtype: u32, dwindex: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgGetParam(hcryptmsg: *const ::core::ffi::c_void, dwparamtype: u32, dwindex: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptMsgGetParam(::core::mem::transmute(hcryptmsg), ::core::mem::transmute(dwparamtype), ::core::mem::transmute(dwindex), ::core::mem::transmute(pvdata), ::core::mem::transmute(pcbdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgOpenToDecode(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: u32, hcryptprov: usize, precipientinfo: *mut CERT_INFO, pstreaminfo: *const CMSG_STREAM_INFO) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgOpenToDecode(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: u32, hcryptprov: usize, precipientinfo: *mut CERT_INFO, pstreaminfo: *const ::core::mem::ManuallyDrop<CMSG_STREAM_INFO>) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CryptMsgOpenToDecode(::core::mem::transmute(dwmsgencodingtype), ::core::mem::transmute(dwflags), ::core::mem::transmute(dwmsgtype), ::core::mem::transmute(hcryptprov), ::core::mem::transmute(precipientinfo), ::core::mem::transmute(pstreaminfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgOpenToEncode<'a, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: CRYPT_MSG_TYPE, pvmsgencodeinfo: *const ::core::ffi::c_void, pszinnercontentobjid: Param4, pstreaminfo: *const CMSG_STREAM_INFO) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgOpenToEncode(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: CRYPT_MSG_TYPE, pvmsgencodeinfo: *const ::core::ffi::c_void, pszinnercontentobjid: super::super::Foundation::PSTR, pstreaminfo: *const ::core::mem::ManuallyDrop<CMSG_STREAM_INFO>) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(CryptMsgOpenToEncode(::core::mem::transmute(dwmsgencodingtype), ::core::mem::transmute(dwflags), ::core::mem::transmute(dwmsgtype), ::core::mem::transmute(pvmsgencodeinfo), pszinnercontentobjid.into_param().abi(), ::core::mem::transmute(pstreaminfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgSignCTL(dwmsgencodingtype: u32, pbctlcontent: *const u8, cbctlcontent: u32, psigninfo: *const CMSG_SIGNED_ENCODE_INFO, dwflags: u32, pbencoded: *mut u8, pcbencoded: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgSignCTL(dwmsgencodingtype: u32, pbctlcontent: *const u8, cbctlcontent: u32, psigninfo: *const CMSG_SIGNED_ENCODE_INFO, dwflags: u32, pbencoded: *mut u8, pcbencoded: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptMsgSignCTL(::core::mem::transmute(dwmsgencodingtype), ::core::mem::transmute(pbctlcontent), ::core::mem::transmute(cbctlcontent), ::core::mem::transmute(psigninfo), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbencoded), ::core::mem::transmute(pcbencoded))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgUpdate<'a, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(hcryptmsg: *const ::core::ffi::c_void, pbdata: *const u8, cbdata: u32, ffinal: Param3) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgUpdate(hcryptmsg: *const ::core::ffi::c_void, pbdata: *const u8, cbdata: u32, ffinal: super::super::Foundation::BOOL) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptMsgUpdate(::core::mem::transmute(hcryptmsg), ::core::mem::transmute(pbdata), ::core::mem::transmute(cbdata), ffinal.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgVerifyCountersignatureEncoded(hcryptprov: usize, dwencodingtype: u32, pbsignerinfo: *const u8, cbsignerinfo: u32, pbsignerinfocountersignature: *const u8, cbsignerinfocountersignature: u32, pcicountersigner: *const CERT_INFO) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgVerifyCountersignatureEncoded(hcryptprov: usize, dwencodingtype: u32, pbsignerinfo: *const u8, cbsignerinfo: u32, pbsignerinfocountersignature: *const u8, cbsignerinfocountersignature: u32, pcicountersigner: *const CERT_INFO) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptMsgVerifyCountersignatureEncoded( ::core::mem::transmute(hcryptprov), ::core::mem::transmute(dwencodingtype), ::core::mem::transmute(pbsignerinfo), ::core::mem::transmute(cbsignerinfo), ::core::mem::transmute(pbsignerinfocountersignature), ::core::mem::transmute(cbsignerinfocountersignature), ::core::mem::transmute(pcicountersigner), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgVerifyCountersignatureEncodedEx(hcryptprov: usize, dwencodingtype: u32, pbsignerinfo: *const u8, cbsignerinfo: u32, pbsignerinfocountersignature: *const u8, cbsignerinfocountersignature: u32, dwsignertype: u32, pvsigner: *const ::core::ffi::c_void, dwflags: u32, pvextra: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptMsgVerifyCountersignatureEncodedEx(hcryptprov: usize, dwencodingtype: u32, pbsignerinfo: *const u8, cbsignerinfo: u32, pbsignerinfocountersignature: *const u8, cbsignerinfocountersignature: u32, dwsignertype: u32, pvsigner: *const ::core::ffi::c_void, dwflags: u32, pvextra: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptMsgVerifyCountersignatureEncodedEx( ::core::mem::transmute(hcryptprov), ::core::mem::transmute(dwencodingtype), ::core::mem::transmute(pbsignerinfo), ::core::mem::transmute(cbsignerinfo), ::core::mem::transmute(pbsignerinfocountersignature), ::core::mem::transmute(cbsignerinfocountersignature), ::core::mem::transmute(dwsignertype), ::core::mem::transmute(pvsigner), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvextra), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptProtectData<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pdatain: *const CRYPTOAPI_BLOB, szdatadescr: Param1, poptionalentropy: *const CRYPTOAPI_BLOB, pvreserved: *mut ::core::ffi::c_void, ppromptstruct: *const CRYPTPROTECT_PROMPTSTRUCT, dwflags: u32, pdataout: *mut CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptProtectData(pdatain: *const CRYPTOAPI_BLOB, szdatadescr: super::super::Foundation::PWSTR, poptionalentropy: *const CRYPTOAPI_BLOB, pvreserved: *mut ::core::ffi::c_void, ppromptstruct: *const CRYPTPROTECT_PROMPTSTRUCT, dwflags: u32, pdataout: *mut CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptProtectData(::core::mem::transmute(pdatain), szdatadescr.into_param().abi(), ::core::mem::transmute(poptionalentropy), ::core::mem::transmute(pvreserved), ::core::mem::transmute(ppromptstruct), ::core::mem::transmute(dwflags), ::core::mem::transmute(pdataout))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptProtectMemory(pdatain: *mut ::core::ffi::c_void, cbdatain: u32, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptProtectMemory(pdatain: *mut ::core::ffi::c_void, cbdatain: u32, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptProtectMemory(::core::mem::transmute(pdatain), ::core::mem::transmute(cbdatain), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptQueryObject( dwobjecttype: CERT_QUERY_OBJECT_TYPE, pvobject: *const ::core::ffi::c_void, dwexpectedcontenttypeflags: CERT_QUERY_CONTENT_TYPE_FLAGS, dwexpectedformattypeflags: CERT_QUERY_FORMAT_TYPE_FLAGS, dwflags: u32, pdwmsgandcertencodingtype: *mut CERT_QUERY_ENCODING_TYPE, pdwcontenttype: *mut CERT_QUERY_CONTENT_TYPE, pdwformattype: *mut CERT_QUERY_FORMAT_TYPE, phcertstore: *mut *mut ::core::ffi::c_void, phmsg: *mut *mut ::core::ffi::c_void, ppvcontext: *mut *mut ::core::ffi::c_void, ) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptQueryObject( dwobjecttype: CERT_QUERY_OBJECT_TYPE, pvobject: *const ::core::ffi::c_void, dwexpectedcontenttypeflags: CERT_QUERY_CONTENT_TYPE_FLAGS, dwexpectedformattypeflags: CERT_QUERY_FORMAT_TYPE_FLAGS, dwflags: u32, pdwmsgandcertencodingtype: *mut CERT_QUERY_ENCODING_TYPE, pdwcontenttype: *mut CERT_QUERY_CONTENT_TYPE, pdwformattype: *mut CERT_QUERY_FORMAT_TYPE, phcertstore: *mut *mut ::core::ffi::c_void, phmsg: *mut *mut ::core::ffi::c_void, ppvcontext: *mut *mut ::core::ffi::c_void, ) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptQueryObject( ::core::mem::transmute(dwobjecttype), ::core::mem::transmute(pvobject), ::core::mem::transmute(dwexpectedcontenttypeflags), ::core::mem::transmute(dwexpectedformattypeflags), ::core::mem::transmute(dwflags), ::core::mem::transmute(pdwmsgandcertencodingtype), ::core::mem::transmute(pdwcontenttype), ::core::mem::transmute(pdwformattype), ::core::mem::transmute(phcertstore), ::core::mem::transmute(phmsg), ::core::mem::transmute(ppvcontext), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptRegisterDefaultOIDFunction<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwencodingtype: u32, pszfuncname: Param1, dwindex: u32, pwszdll: Param3) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptRegisterDefaultOIDFunction(dwencodingtype: u32, pszfuncname: super::super::Foundation::PSTR, dwindex: u32, pwszdll: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptRegisterDefaultOIDFunction(::core::mem::transmute(dwencodingtype), pszfuncname.into_param().abi(), ::core::mem::transmute(dwindex), pwszdll.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptRegisterOIDFunction<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dwencodingtype: u32, pszfuncname: Param1, pszoid: Param2, pwszdll: Param3, pszoverridefuncname: Param4) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptRegisterOIDFunction(dwencodingtype: u32, pszfuncname: super::super::Foundation::PSTR, pszoid: super::super::Foundation::PSTR, pwszdll: super::super::Foundation::PWSTR, pszoverridefuncname: super::super::Foundation::PSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptRegisterOIDFunction(::core::mem::transmute(dwencodingtype), pszfuncname.into_param().abi(), pszoid.into_param().abi(), pwszdll.into_param().abi(), pszoverridefuncname.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptRegisterOIDInfo(pinfo: *const CRYPT_OID_INFO, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptRegisterOIDInfo(pinfo: *const CRYPT_OID_INFO, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptRegisterOIDInfo(::core::mem::transmute(pinfo), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptReleaseContext(hprov: usize, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptReleaseContext(hprov: usize, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptReleaseContext(::core::mem::transmute(hprov), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptRetrieveObjectByUrlA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param5: ::windows::core::IntoParam<'a, HCRYPTASYNC>>( pszurl: Param0, pszobjectoid: Param1, dwretrievalflags: u32, dwtimeout: u32, ppvobject: *mut *mut ::core::ffi::c_void, hasyncretrieve: Param5, pcredentials: *const CRYPT_CREDENTIALS, pvverify: *const ::core::ffi::c_void, pauxinfo: *mut CRYPT_RETRIEVE_AUX_INFO, ) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptRetrieveObjectByUrlA(pszurl: super::super::Foundation::PSTR, pszobjectoid: super::super::Foundation::PSTR, dwretrievalflags: u32, dwtimeout: u32, ppvobject: *mut *mut ::core::ffi::c_void, hasyncretrieve: HCRYPTASYNC, pcredentials: *const CRYPT_CREDENTIALS, pvverify: *const ::core::ffi::c_void, pauxinfo: *mut CRYPT_RETRIEVE_AUX_INFO) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptRetrieveObjectByUrlA( pszurl.into_param().abi(), pszobjectoid.into_param().abi(), ::core::mem::transmute(dwretrievalflags), ::core::mem::transmute(dwtimeout), ::core::mem::transmute(ppvobject), hasyncretrieve.into_param().abi(), ::core::mem::transmute(pcredentials), ::core::mem::transmute(pvverify), ::core::mem::transmute(pauxinfo), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptRetrieveObjectByUrlW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param5: ::windows::core::IntoParam<'a, HCRYPTASYNC>>( pszurl: Param0, pszobjectoid: Param1, dwretrievalflags: u32, dwtimeout: u32, ppvobject: *mut *mut ::core::ffi::c_void, hasyncretrieve: Param5, pcredentials: *const CRYPT_CREDENTIALS, pvverify: *const ::core::ffi::c_void, pauxinfo: *mut CRYPT_RETRIEVE_AUX_INFO, ) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptRetrieveObjectByUrlW(pszurl: super::super::Foundation::PWSTR, pszobjectoid: super::super::Foundation::PSTR, dwretrievalflags: u32, dwtimeout: u32, ppvobject: *mut *mut ::core::ffi::c_void, hasyncretrieve: HCRYPTASYNC, pcredentials: *const CRYPT_CREDENTIALS, pvverify: *const ::core::ffi::c_void, pauxinfo: *mut CRYPT_RETRIEVE_AUX_INFO) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptRetrieveObjectByUrlW( pszurl.into_param().abi(), pszobjectoid.into_param().abi(), ::core::mem::transmute(dwretrievalflags), ::core::mem::transmute(dwtimeout), ::core::mem::transmute(ppvobject), hasyncretrieve.into_param().abi(), ::core::mem::transmute(pcredentials), ::core::mem::transmute(pvverify), ::core::mem::transmute(pauxinfo), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptRetrieveTimeStamp<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(wszurl: Param0, dwretrievalflags: u32, dwtimeout: u32, pszhashid: Param3, ppara: *const CRYPT_TIMESTAMP_PARA, pbdata: *const u8, cbdata: u32, pptscontext: *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner: *mut *mut CERT_CONTEXT, phstore: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptRetrieveTimeStamp(wszurl: super::super::Foundation::PWSTR, dwretrievalflags: u32, dwtimeout: u32, pszhashid: super::super::Foundation::PSTR, ppara: *const CRYPT_TIMESTAMP_PARA, pbdata: *const u8, cbdata: u32, pptscontext: *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner: *mut *mut CERT_CONTEXT, phstore: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptRetrieveTimeStamp( wszurl.into_param().abi(), ::core::mem::transmute(dwretrievalflags), ::core::mem::transmute(dwtimeout), pszhashid.into_param().abi(), ::core::mem::transmute(ppara), ::core::mem::transmute(pbdata), ::core::mem::transmute(cbdata), ::core::mem::transmute(pptscontext), ::core::mem::transmute(pptssigner), ::core::mem::transmute(phstore), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSetAsyncParam<'a, Param0: ::windows::core::IntoParam<'a, HCRYPTASYNC>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hasync: Param0, pszparamoid: Param1, pvparam: *const ::core::ffi::c_void, pfnfree: ::core::option::Option<PFN_CRYPT_ASYNC_PARAM_FREE_FUNC>) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSetAsyncParam(hasync: HCRYPTASYNC, pszparamoid: super::super::Foundation::PSTR, pvparam: *const ::core::ffi::c_void, pfnfree: ::windows::core::RawPtr) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSetAsyncParam(hasync.into_param().abi(), pszparamoid.into_param().abi(), ::core::mem::transmute(pvparam), ::core::mem::transmute(pfnfree))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSetHashParam(hhash: usize, dwparam: CRYPT_SET_HASH_PARAM, pbdata: *const u8, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSetHashParam(hhash: usize, dwparam: CRYPT_SET_HASH_PARAM, pbdata: *const u8, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSetHashParam(::core::mem::transmute(hhash), ::core::mem::transmute(dwparam), ::core::mem::transmute(pbdata), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSetKeyIdentifierProperty<'a, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pkeyidentifier: *const CRYPTOAPI_BLOB, dwpropid: u32, dwflags: u32, pwszcomputername: Param3, pvreserved: *mut ::core::ffi::c_void, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSetKeyIdentifierProperty(pkeyidentifier: *const CRYPTOAPI_BLOB, dwpropid: u32, dwflags: u32, pwszcomputername: super::super::Foundation::PWSTR, pvreserved: *mut ::core::ffi::c_void, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSetKeyIdentifierProperty(::core::mem::transmute(pkeyidentifier), ::core::mem::transmute(dwpropid), ::core::mem::transmute(dwflags), pwszcomputername.into_param().abi(), ::core::mem::transmute(pvreserved), ::core::mem::transmute(pvdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSetKeyParam(hkey: usize, dwparam: CRYPT_KEY_PARAM_ID, pbdata: *const u8, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSetKeyParam(hkey: usize, dwparam: CRYPT_KEY_PARAM_ID, pbdata: *const u8, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSetKeyParam(::core::mem::transmute(hkey), ::core::mem::transmute(dwparam), ::core::mem::transmute(pbdata), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] pub unsafe fn CryptSetOIDFunctionValue<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwencodingtype: u32, pszfuncname: Param1, pszoid: Param2, pwszvaluename: Param3, dwvaluetype: super::super::System::Registry::REG_VALUE_TYPE, pbvaluedata: *const u8, cbvaluedata: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSetOIDFunctionValue(dwencodingtype: u32, pszfuncname: super::super::Foundation::PSTR, pszoid: super::super::Foundation::PSTR, pwszvaluename: super::super::Foundation::PWSTR, dwvaluetype: super::super::System::Registry::REG_VALUE_TYPE, pbvaluedata: *const u8, cbvaluedata: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSetOIDFunctionValue(::core::mem::transmute(dwencodingtype), pszfuncname.into_param().abi(), pszoid.into_param().abi(), pwszvaluename.into_param().abi(), ::core::mem::transmute(dwvaluetype), ::core::mem::transmute(pbvaluedata), ::core::mem::transmute(cbvaluedata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSetProvParam(hprov: usize, dwparam: CRYPT_SET_PROV_PARAM_ID, pbdata: *const u8, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSetProvParam(hprov: usize, dwparam: CRYPT_SET_PROV_PARAM_ID, pbdata: *const u8, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSetProvParam(::core::mem::transmute(hprov), ::core::mem::transmute(dwparam), ::core::mem::transmute(pbdata), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSetProviderA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszprovname: Param0, dwprovtype: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSetProviderA(pszprovname: super::super::Foundation::PSTR, dwprovtype: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSetProviderA(pszprovname.into_param().abi(), ::core::mem::transmute(dwprovtype))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSetProviderExA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszprovname: Param0, dwprovtype: u32, pdwreserved: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSetProviderExA(pszprovname: super::super::Foundation::PSTR, dwprovtype: u32, pdwreserved: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSetProviderExA(pszprovname.into_param().abi(), ::core::mem::transmute(dwprovtype), ::core::mem::transmute(pdwreserved), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSetProviderExW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszprovname: Param0, dwprovtype: u32, pdwreserved: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSetProviderExW(pszprovname: super::super::Foundation::PWSTR, dwprovtype: u32, pdwreserved: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSetProviderExW(pszprovname.into_param().abi(), ::core::mem::transmute(dwprovtype), ::core::mem::transmute(pdwreserved), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSetProviderW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszprovname: Param0, dwprovtype: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSetProviderW(pszprovname: super::super::Foundation::PWSTR, dwprovtype: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSetProviderW(pszprovname.into_param().abi(), ::core::mem::transmute(dwprovtype))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSignAndEncodeCertificate<'a, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hcryptprovorncryptkey: usize, dwkeyspec: CERT_KEY_SPEC, dwcertencodingtype: u32, lpszstructtype: Param3, pvstructinfo: *const ::core::ffi::c_void, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo: *const ::core::ffi::c_void, pbencoded: *mut u8, pcbencoded: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSignAndEncodeCertificate(hcryptprovorncryptkey: usize, dwkeyspec: CERT_KEY_SPEC, dwcertencodingtype: u32, lpszstructtype: super::super::Foundation::PSTR, pvstructinfo: *const ::core::ffi::c_void, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo: *const ::core::ffi::c_void, pbencoded: *mut u8, pcbencoded: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSignAndEncodeCertificate( ::core::mem::transmute(hcryptprovorncryptkey), ::core::mem::transmute(dwkeyspec), ::core::mem::transmute(dwcertencodingtype), lpszstructtype.into_param().abi(), ::core::mem::transmute(pvstructinfo), ::core::mem::transmute(psignaturealgorithm), ::core::mem::transmute(pvhashauxinfo), ::core::mem::transmute(pbencoded), ::core::mem::transmute(pcbencoded), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSignAndEncryptMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, crecipientcert: u32, rgprecipientcert: *const *const CERT_CONTEXT, pbtobesignedandencrypted: *const u8, cbtobesignedandencrypted: u32, pbsignedandencryptedblob: *mut u8, pcbsignedandencryptedblob: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSignAndEncryptMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, crecipientcert: u32, rgprecipientcert: *const *const CERT_CONTEXT, pbtobesignedandencrypted: *const u8, cbtobesignedandencrypted: u32, pbsignedandencryptedblob: *mut u8, pcbsignedandencryptedblob: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSignAndEncryptMessage( ::core::mem::transmute(psignpara), ::core::mem::transmute(pencryptpara), ::core::mem::transmute(crecipientcert), ::core::mem::transmute(rgprecipientcert), ::core::mem::transmute(pbtobesignedandencrypted), ::core::mem::transmute(cbtobesignedandencrypted), ::core::mem::transmute(pbsignedandencryptedblob), ::core::mem::transmute(pcbsignedandencryptedblob), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSignCertificate(hcryptprovorncryptkey: usize, dwkeyspec: u32, dwcertencodingtype: u32, pbencodedtobesigned: *const u8, cbencodedtobesigned: u32, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo: *const ::core::ffi::c_void, pbsignature: *mut u8, pcbsignature: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSignCertificate(hcryptprovorncryptkey: usize, dwkeyspec: u32, dwcertencodingtype: u32, pbencodedtobesigned: *const u8, cbencodedtobesigned: u32, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo: *const ::core::ffi::c_void, pbsignature: *mut u8, pcbsignature: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSignCertificate( ::core::mem::transmute(hcryptprovorncryptkey), ::core::mem::transmute(dwkeyspec), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pbencodedtobesigned), ::core::mem::transmute(cbencodedtobesigned), ::core::mem::transmute(psignaturealgorithm), ::core::mem::transmute(pvhashauxinfo), ::core::mem::transmute(pbsignature), ::core::mem::transmute(pcbsignature), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSignHashA<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hhash: usize, dwkeyspec: u32, szdescription: Param2, dwflags: u32, pbsignature: *mut u8, pdwsiglen: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSignHashA(hhash: usize, dwkeyspec: u32, szdescription: super::super::Foundation::PSTR, dwflags: u32, pbsignature: *mut u8, pdwsiglen: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSignHashA(::core::mem::transmute(hhash), ::core::mem::transmute(dwkeyspec), szdescription.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbsignature), ::core::mem::transmute(pdwsiglen))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSignHashW<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hhash: usize, dwkeyspec: u32, szdescription: Param2, dwflags: u32, pbsignature: *mut u8, pdwsiglen: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSignHashW(hhash: usize, dwkeyspec: u32, szdescription: super::super::Foundation::PWSTR, dwflags: u32, pbsignature: *mut u8, pdwsiglen: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSignHashW(::core::mem::transmute(hhash), ::core::mem::transmute(dwkeyspec), szdescription.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbsignature), ::core::mem::transmute(pdwsiglen))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSignMessage<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, fdetachedsignature: Param1, ctobesigned: u32, rgpbtobesigned: *const *const u8, rgcbtobesigned: *const u32, pbsignedblob: *mut u8, pcbsignedblob: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSignMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, fdetachedsignature: super::super::Foundation::BOOL, ctobesigned: u32, rgpbtobesigned: *const *const u8, rgcbtobesigned: *const u32, pbsignedblob: *mut u8, pcbsignedblob: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSignMessage(::core::mem::transmute(psignpara), fdetachedsignature.into_param().abi(), ::core::mem::transmute(ctobesigned), ::core::mem::transmute(rgpbtobesigned), ::core::mem::transmute(rgcbtobesigned), ::core::mem::transmute(pbsignedblob), ::core::mem::transmute(pcbsignedblob))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptSignMessageWithKey(psignpara: *const CRYPT_KEY_SIGN_MESSAGE_PARA, pbtobesigned: *const u8, cbtobesigned: u32, pbsignedblob: *mut u8, pcbsignedblob: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptSignMessageWithKey(psignpara: *const CRYPT_KEY_SIGN_MESSAGE_PARA, pbtobesigned: *const u8, cbtobesigned: u32, pbsignedblob: *mut u8, pcbsignedblob: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptSignMessageWithKey(::core::mem::transmute(psignpara), ::core::mem::transmute(pbtobesigned), ::core::mem::transmute(cbtobesigned), ::core::mem::transmute(pbsignedblob), ::core::mem::transmute(pcbsignedblob))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptStringToBinaryA<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(pszstring: Param0, cchstring: u32, dwflags: CRYPT_STRING, pbbinary: *mut u8, pcbbinary: *mut u32, pdwskip: *mut u32, pdwflags: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptStringToBinaryA(pszstring: super::super::Foundation::PSTR, cchstring: u32, dwflags: CRYPT_STRING, pbbinary: *mut u8, pcbbinary: *mut u32, pdwskip: *mut u32, pdwflags: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptStringToBinaryA(pszstring.into_param().abi(), ::core::mem::transmute(cchstring), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbbinary), ::core::mem::transmute(pcbbinary), ::core::mem::transmute(pdwskip), ::core::mem::transmute(pdwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptStringToBinaryW<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pszstring: Param0, cchstring: u32, dwflags: CRYPT_STRING, pbbinary: *mut u8, pcbbinary: *mut u32, pdwskip: *mut u32, pdwflags: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptStringToBinaryW(pszstring: super::super::Foundation::PWSTR, cchstring: u32, dwflags: CRYPT_STRING, pbbinary: *mut u8, pcbbinary: *mut u32, pdwskip: *mut u32, pdwflags: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptStringToBinaryW(pszstring.into_param().abi(), ::core::mem::transmute(cchstring), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbbinary), ::core::mem::transmute(pcbbinary), ::core::mem::transmute(pdwskip), ::core::mem::transmute(pdwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptUninstallCancelRetrieval(dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptUninstallCancelRetrieval(dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptUninstallCancelRetrieval(::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptUninstallDefaultContext(hdefaultcontext: *const ::core::ffi::c_void, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptUninstallDefaultContext(hdefaultcontext: *const ::core::ffi::c_void, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptUninstallDefaultContext(::core::mem::transmute(hdefaultcontext), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvreserved))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptUnprotectData(pdatain: *const CRYPTOAPI_BLOB, ppszdatadescr: *mut super::super::Foundation::PWSTR, poptionalentropy: *const CRYPTOAPI_BLOB, pvreserved: *mut ::core::ffi::c_void, ppromptstruct: *const CRYPTPROTECT_PROMPTSTRUCT, dwflags: u32, pdataout: *mut CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptUnprotectData(pdatain: *const CRYPTOAPI_BLOB, ppszdatadescr: *mut super::super::Foundation::PWSTR, poptionalentropy: *const CRYPTOAPI_BLOB, pvreserved: *mut ::core::ffi::c_void, ppromptstruct: *const CRYPTPROTECT_PROMPTSTRUCT, dwflags: u32, pdataout: *mut CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptUnprotectData(::core::mem::transmute(pdatain), ::core::mem::transmute(ppszdatadescr), ::core::mem::transmute(poptionalentropy), ::core::mem::transmute(pvreserved), ::core::mem::transmute(ppromptstruct), ::core::mem::transmute(dwflags), ::core::mem::transmute(pdataout))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptUnprotectMemory(pdatain: *mut ::core::ffi::c_void, cbdatain: u32, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptUnprotectMemory(pdatain: *mut ::core::ffi::c_void, cbdatain: u32, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptUnprotectMemory(::core::mem::transmute(pdatain), ::core::mem::transmute(cbdatain), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptUnregisterDefaultOIDFunction<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwencodingtype: u32, pszfuncname: Param1, pwszdll: Param2) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptUnregisterDefaultOIDFunction(dwencodingtype: u32, pszfuncname: super::super::Foundation::PSTR, pwszdll: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptUnregisterDefaultOIDFunction(::core::mem::transmute(dwencodingtype), pszfuncname.into_param().abi(), pwszdll.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptUnregisterOIDFunction<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(dwencodingtype: u32, pszfuncname: Param1, pszoid: Param2) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptUnregisterOIDFunction(dwencodingtype: u32, pszfuncname: super::super::Foundation::PSTR, pszoid: super::super::Foundation::PSTR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptUnregisterOIDFunction(::core::mem::transmute(dwencodingtype), pszfuncname.into_param().abi(), pszoid.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptUnregisterOIDInfo(pinfo: *const CRYPT_OID_INFO) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptUnregisterOIDInfo(pinfo: *const CRYPT_OID_INFO) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptUnregisterOIDInfo(::core::mem::transmute(pinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptUpdateProtectedState<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PSID>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(poldsid: Param0, pwszoldpassword: Param1, dwflags: u32, pdwsuccesscount: *mut u32, pdwfailurecount: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptUpdateProtectedState(poldsid: super::super::Foundation::PSID, pwszoldpassword: super::super::Foundation::PWSTR, dwflags: u32, pdwsuccesscount: *mut u32, pdwfailurecount: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptUpdateProtectedState(poldsid.into_param().abi(), pwszoldpassword.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pdwsuccesscount), ::core::mem::transmute(pdwfailurecount))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifyCertificateSignature(hcryptprov: usize, dwcertencodingtype: u32, pbencoded: *const u8, cbencoded: u32, ppublickey: *const CERT_PUBLIC_KEY_INFO) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptVerifyCertificateSignature(hcryptprov: usize, dwcertencodingtype: u32, pbencoded: *const u8, cbencoded: u32, ppublickey: *const CERT_PUBLIC_KEY_INFO) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptVerifyCertificateSignature(::core::mem::transmute(hcryptprov), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(pbencoded), ::core::mem::transmute(cbencoded), ::core::mem::transmute(ppublickey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifyCertificateSignatureEx(hcryptprov: usize, dwcertencodingtype: u32, dwsubjecttype: u32, pvsubject: *const ::core::ffi::c_void, dwissuertype: u32, pvissuer: *const ::core::ffi::c_void, dwflags: CRYPT_VERIFY_CERT_FLAGS, pvextra: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptVerifyCertificateSignatureEx(hcryptprov: usize, dwcertencodingtype: u32, dwsubjecttype: u32, pvsubject: *const ::core::ffi::c_void, dwissuertype: u32, pvissuer: *const ::core::ffi::c_void, dwflags: CRYPT_VERIFY_CERT_FLAGS, pvextra: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptVerifyCertificateSignatureEx( ::core::mem::transmute(hcryptprov), ::core::mem::transmute(dwcertencodingtype), ::core::mem::transmute(dwsubjecttype), ::core::mem::transmute(pvsubject), ::core::mem::transmute(dwissuertype), ::core::mem::transmute(pvissuer), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvextra), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifyDetachedMessageHash(phashpara: *const CRYPT_HASH_MESSAGE_PARA, pbdetachedhashblob: *const u8, cbdetachedhashblob: u32, ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptVerifyDetachedMessageHash(phashpara: *const CRYPT_HASH_MESSAGE_PARA, pbdetachedhashblob: *const u8, cbdetachedhashblob: u32, ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptVerifyDetachedMessageHash( ::core::mem::transmute(phashpara), ::core::mem::transmute(pbdetachedhashblob), ::core::mem::transmute(cbdetachedhashblob), ::core::mem::transmute(ctobehashed), ::core::mem::transmute(rgpbtobehashed), ::core::mem::transmute(rgcbtobehashed), ::core::mem::transmute(pbcomputedhash), ::core::mem::transmute(pcbcomputedhash), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifyDetachedMessageSignature(pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbdetachedsignblob: *const u8, cbdetachedsignblob: u32, ctobesigned: u32, rgpbtobesigned: *const *const u8, rgcbtobesigned: *const u32, ppsignercert: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptVerifyDetachedMessageSignature(pverifypara: *const ::core::mem::ManuallyDrop<CRYPT_VERIFY_MESSAGE_PARA>, dwsignerindex: u32, pbdetachedsignblob: *const u8, cbdetachedsignblob: u32, ctobesigned: u32, rgpbtobesigned: *const *const u8, rgcbtobesigned: *const u32, ppsignercert: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptVerifyDetachedMessageSignature( ::core::mem::transmute(pverifypara), ::core::mem::transmute(dwsignerindex), ::core::mem::transmute(pbdetachedsignblob), ::core::mem::transmute(cbdetachedsignblob), ::core::mem::transmute(ctobesigned), ::core::mem::transmute(rgpbtobesigned), ::core::mem::transmute(rgcbtobesigned), ::core::mem::transmute(ppsignercert), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifyMessageHash(phashpara: *const CRYPT_HASH_MESSAGE_PARA, pbhashedblob: *const u8, cbhashedblob: u32, pbtobehashed: *mut u8, pcbtobehashed: *mut u32, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptVerifyMessageHash(phashpara: *const CRYPT_HASH_MESSAGE_PARA, pbhashedblob: *const u8, cbhashedblob: u32, pbtobehashed: *mut u8, pcbtobehashed: *mut u32, pbcomputedhash: *mut u8, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptVerifyMessageHash(::core::mem::transmute(phashpara), ::core::mem::transmute(pbhashedblob), ::core::mem::transmute(cbhashedblob), ::core::mem::transmute(pbtobehashed), ::core::mem::transmute(pcbtobehashed), ::core::mem::transmute(pbcomputedhash), ::core::mem::transmute(pcbcomputedhash))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifyMessageSignature(pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbsignedblob: *const u8, cbsignedblob: u32, pbdecoded: *mut u8, pcbdecoded: *mut u32, ppsignercert: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptVerifyMessageSignature(pverifypara: *const ::core::mem::ManuallyDrop<CRYPT_VERIFY_MESSAGE_PARA>, dwsignerindex: u32, pbsignedblob: *const u8, cbsignedblob: u32, pbdecoded: *mut u8, pcbdecoded: *mut u32, ppsignercert: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptVerifyMessageSignature(::core::mem::transmute(pverifypara), ::core::mem::transmute(dwsignerindex), ::core::mem::transmute(pbsignedblob), ::core::mem::transmute(cbsignedblob), ::core::mem::transmute(pbdecoded), ::core::mem::transmute(pcbdecoded), ::core::mem::transmute(ppsignercert))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifyMessageSignatureWithKey(pverifypara: *const CRYPT_KEY_VERIFY_MESSAGE_PARA, ppublickeyinfo: *const CERT_PUBLIC_KEY_INFO, pbsignedblob: *const u8, cbsignedblob: u32, pbdecoded: *mut u8, pcbdecoded: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptVerifyMessageSignatureWithKey(pverifypara: *const CRYPT_KEY_VERIFY_MESSAGE_PARA, ppublickeyinfo: *const CERT_PUBLIC_KEY_INFO, pbsignedblob: *const u8, cbsignedblob: u32, pbdecoded: *mut u8, pcbdecoded: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptVerifyMessageSignatureWithKey(::core::mem::transmute(pverifypara), ::core::mem::transmute(ppublickeyinfo), ::core::mem::transmute(pbsignedblob), ::core::mem::transmute(cbsignedblob), ::core::mem::transmute(pbdecoded), ::core::mem::transmute(pcbdecoded))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifySignatureA<'a, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PSTR>>(hhash: usize, pbsignature: *const u8, dwsiglen: u32, hpubkey: usize, szdescription: Param4, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptVerifySignatureA(hhash: usize, pbsignature: *const u8, dwsiglen: u32, hpubkey: usize, szdescription: super::super::Foundation::PSTR, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptVerifySignatureA(::core::mem::transmute(hhash), ::core::mem::transmute(pbsignature), ::core::mem::transmute(dwsiglen), ::core::mem::transmute(hpubkey), szdescription.into_param().abi(), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifySignatureW<'a, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hhash: usize, pbsignature: *const u8, dwsiglen: u32, hpubkey: usize, szdescription: Param4, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptVerifySignatureW(hhash: usize, pbsignature: *const u8, dwsiglen: u32, hpubkey: usize, szdescription: super::super::Foundation::PWSTR, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptVerifySignatureW(::core::mem::transmute(hhash), ::core::mem::transmute(pbsignature), ::core::mem::transmute(dwsiglen), ::core::mem::transmute(hpubkey), szdescription.into_param().abi(), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifyTimeStampSignature(pbtscontentinfo: *const u8, cbtscontentinfo: u32, pbdata: *const u8, cbdata: u32, hadditionalstore: *const ::core::ffi::c_void, pptscontext: *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner: *mut *mut CERT_CONTEXT, phstore: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptVerifyTimeStampSignature(pbtscontentinfo: *const u8, cbtscontentinfo: u32, pbdata: *const u8, cbdata: u32, hadditionalstore: *const ::core::ffi::c_void, pptscontext: *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner: *mut *mut CERT_CONTEXT, phstore: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(CryptVerifyTimeStampSignature( ::core::mem::transmute(pbtscontentinfo), ::core::mem::transmute(cbtscontentinfo), ::core::mem::transmute(pbdata), ::core::mem::transmute(cbdata), ::core::mem::transmute(hadditionalstore), ::core::mem::transmute(pptscontext), ::core::mem::transmute(pptssigner), ::core::mem::transmute(phstore), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlAddObject(hsignatureorobject: *const ::core::ffi::c_void, dwflags: u32, rgproperty: *const CRYPT_XML_PROPERTY, cproperty: u32, pencoded: *const CRYPT_XML_BLOB) -> ::windows::core::Result<*mut CRYPT_XML_OBJECT> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlAddObject(hsignatureorobject: *const ::core::ffi::c_void, dwflags: u32, rgproperty: *const CRYPT_XML_PROPERTY, cproperty: u32, pencoded: *const CRYPT_XML_BLOB, ppobject: *mut *mut CRYPT_XML_OBJECT) -> ::windows::core::HRESULT; } let mut result__: <*mut CRYPT_XML_OBJECT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); CryptXmlAddObject(::core::mem::transmute(hsignatureorobject), ::core::mem::transmute(dwflags), ::core::mem::transmute(rgproperty), ::core::mem::transmute(cproperty), ::core::mem::transmute(pencoded), &mut result__).from_abi::<*mut CRYPT_XML_OBJECT>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CryptXmlClose(hcryptxml: *const ::core::ffi::c_void) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlClose(hcryptxml: *const ::core::ffi::c_void) -> ::windows::core::HRESULT; } CryptXmlClose(::core::mem::transmute(hcryptxml)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlCreateReference<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>( hcryptxml: *const ::core::ffi::c_void, dwflags: u32, wszid: Param2, wszuri: Param3, wsztype: Param4, pdigestmethod: *const CRYPT_XML_ALGORITHM, ctransform: u32, rgtransform: *const CRYPT_XML_ALGORITHM, phreference: *mut *mut ::core::ffi::c_void, ) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlCreateReference(hcryptxml: *const ::core::ffi::c_void, dwflags: u32, wszid: super::super::Foundation::PWSTR, wszuri: super::super::Foundation::PWSTR, wsztype: super::super::Foundation::PWSTR, pdigestmethod: *const CRYPT_XML_ALGORITHM, ctransform: u32, rgtransform: *const CRYPT_XML_ALGORITHM, phreference: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT; } CryptXmlCreateReference(::core::mem::transmute(hcryptxml), ::core::mem::transmute(dwflags), wszid.into_param().abi(), wszuri.into_param().abi(), wsztype.into_param().abi(), ::core::mem::transmute(pdigestmethod), ::core::mem::transmute(ctransform), ::core::mem::transmute(rgtransform), ::core::mem::transmute(phreference)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CryptXmlDigestReference(hreference: *const ::core::ffi::c_void, dwflags: u32, pdataproviderin: *const CRYPT_XML_DATA_PROVIDER) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlDigestReference(hreference: *const ::core::ffi::c_void, dwflags: u32, pdataproviderin: *const ::core::mem::ManuallyDrop<CRYPT_XML_DATA_PROVIDER>) -> ::windows::core::HRESULT; } CryptXmlDigestReference(::core::mem::transmute(hreference), ::core::mem::transmute(dwflags), ::core::mem::transmute(pdataproviderin)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub type CryptXmlDllCloseDigest = unsafe extern "system" fn(hdigest: *const ::core::ffi::c_void) -> ::windows::core::HRESULT; #[cfg(feature = "Win32_Foundation")] pub type CryptXmlDllCreateDigest = unsafe extern "system" fn(pdigestmethod: *const CRYPT_XML_ALGORITHM, pcbsize: *mut u32, phdigest: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT; pub type CryptXmlDllCreateKey = unsafe extern "system" fn(pencoded: *const CRYPT_XML_BLOB, phkey: *mut BCRYPT_KEY_HANDLE) -> ::windows::core::HRESULT; pub type CryptXmlDllDigestData = unsafe extern "system" fn(hdigest: *const ::core::ffi::c_void, pbdata: *const u8, cbdata: u32) -> ::windows::core::HRESULT; #[cfg(feature = "Win32_Foundation")] pub type CryptXmlDllEncodeAlgorithm = unsafe extern "system" fn(palginfo: *const CRYPT_XML_ALGORITHM_INFO, dwcharset: CRYPT_XML_CHARSET, pvcallbackstate: *mut ::core::ffi::c_void, pfnwrite: ::windows::core::RawPtr) -> ::windows::core::HRESULT; pub type CryptXmlDllEncodeKeyValue = unsafe extern "system" fn(hkey: usize, dwcharset: CRYPT_XML_CHARSET, pvcallbackstate: *mut ::core::ffi::c_void, pfnwrite: ::windows::core::RawPtr) -> ::windows::core::HRESULT; pub type CryptXmlDllFinalizeDigest = unsafe extern "system" fn(hdigest: *const ::core::ffi::c_void, pbdigest: *mut u8, cbdigest: u32) -> ::windows::core::HRESULT; #[cfg(feature = "Win32_Foundation")] pub type CryptXmlDllGetAlgorithmInfo = unsafe extern "system" fn(pxmlalgorithm: *const CRYPT_XML_ALGORITHM, ppalginfo: *mut *mut CRYPT_XML_ALGORITHM_INFO) -> ::windows::core::HRESULT; #[cfg(feature = "Win32_Foundation")] pub type CryptXmlDllGetInterface = unsafe extern "system" fn(dwflags: u32, pmethod: *const CRYPT_XML_ALGORITHM_INFO, pinterface: *mut ::core::mem::ManuallyDrop<CRYPT_XML_CRYPTOGRAPHIC_INTERFACE>) -> ::windows::core::HRESULT; #[cfg(feature = "Win32_Foundation")] pub type CryptXmlDllSignData = unsafe extern "system" fn(psignaturemethod: *const CRYPT_XML_ALGORITHM, hcryptprovorncryptkey: usize, dwkeyspec: u32, pbinput: *const u8, cbinput: u32, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32) -> ::windows::core::HRESULT; #[cfg(feature = "Win32_Foundation")] pub type CryptXmlDllVerifySignature = unsafe extern "system" fn(psignaturemethod: *const CRYPT_XML_ALGORITHM, hkey: BCRYPT_KEY_HANDLE, pbinput: *const u8, cbinput: u32, pbsignature: *const u8, cbsignature: u32) -> ::windows::core::HRESULT; #[inline] pub unsafe fn CryptXmlEncode(hcryptxml: *const ::core::ffi::c_void, dwcharset: CRYPT_XML_CHARSET, rgproperty: *const CRYPT_XML_PROPERTY, cproperty: u32, pvcallbackstate: *mut ::core::ffi::c_void, pfnwrite: ::core::option::Option<PFN_CRYPT_XML_WRITE_CALLBACK>) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlEncode(hcryptxml: *const ::core::ffi::c_void, dwcharset: CRYPT_XML_CHARSET, rgproperty: *const CRYPT_XML_PROPERTY, cproperty: u32, pvcallbackstate: *mut ::core::ffi::c_void, pfnwrite: ::windows::core::RawPtr) -> ::windows::core::HRESULT; } CryptXmlEncode(::core::mem::transmute(hcryptxml), ::core::mem::transmute(dwcharset), ::core::mem::transmute(rgproperty), ::core::mem::transmute(cproperty), ::core::mem::transmute(pvcallbackstate), ::core::mem::transmute(pfnwrite)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlEnumAlgorithmInfo(dwgroupid: u32, dwflags: u32, pvarg: *mut ::core::ffi::c_void, pfnenumalginfo: ::core::option::Option<PFN_CRYPT_XML_ENUM_ALG_INFO>) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlEnumAlgorithmInfo(dwgroupid: u32, dwflags: u32, pvarg: *mut ::core::ffi::c_void, pfnenumalginfo: ::windows::core::RawPtr) -> ::windows::core::HRESULT; } CryptXmlEnumAlgorithmInfo(::core::mem::transmute(dwgroupid), ::core::mem::transmute(dwflags), ::core::mem::transmute(pvarg), ::core::mem::transmute(pfnenumalginfo)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlFindAlgorithmInfo(dwfindbytype: u32, pvfindby: *const ::core::ffi::c_void, dwgroupid: u32, dwflags: u32) -> *mut CRYPT_XML_ALGORITHM_INFO { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlFindAlgorithmInfo(dwfindbytype: u32, pvfindby: *const ::core::ffi::c_void, dwgroupid: u32, dwflags: u32) -> *mut CRYPT_XML_ALGORITHM_INFO; } ::core::mem::transmute(CryptXmlFindAlgorithmInfo(::core::mem::transmute(dwfindbytype), ::core::mem::transmute(pvfindby), ::core::mem::transmute(dwgroupid), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlGetAlgorithmInfo(pxmlalgorithm: *const CRYPT_XML_ALGORITHM, dwflags: CRYPT_XML_FLAGS) -> ::windows::core::Result<*mut CRYPT_XML_ALGORITHM_INFO> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlGetAlgorithmInfo(pxmlalgorithm: *const CRYPT_XML_ALGORITHM, dwflags: CRYPT_XML_FLAGS, ppalginfo: *mut *mut CRYPT_XML_ALGORITHM_INFO) -> ::windows::core::HRESULT; } let mut result__: <*mut CRYPT_XML_ALGORITHM_INFO as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); CryptXmlGetAlgorithmInfo(::core::mem::transmute(pxmlalgorithm), ::core::mem::transmute(dwflags), &mut result__).from_abi::<*mut CRYPT_XML_ALGORITHM_INFO>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlGetDocContext(hcryptxml: *const ::core::ffi::c_void) -> ::windows::core::Result<*mut CRYPT_XML_DOC_CTXT> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlGetDocContext(hcryptxml: *const ::core::ffi::c_void, ppstruct: *mut *mut CRYPT_XML_DOC_CTXT) -> ::windows::core::HRESULT; } let mut result__: <*mut CRYPT_XML_DOC_CTXT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); CryptXmlGetDocContext(::core::mem::transmute(hcryptxml), &mut result__).from_abi::<*mut CRYPT_XML_DOC_CTXT>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlGetReference(hcryptxml: *const ::core::ffi::c_void) -> ::windows::core::Result<*mut CRYPT_XML_REFERENCE> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlGetReference(hcryptxml: *const ::core::ffi::c_void, ppstruct: *mut *mut CRYPT_XML_REFERENCE) -> ::windows::core::HRESULT; } let mut result__: <*mut CRYPT_XML_REFERENCE as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); CryptXmlGetReference(::core::mem::transmute(hcryptxml), &mut result__).from_abi::<*mut CRYPT_XML_REFERENCE>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlGetSignature(hcryptxml: *const ::core::ffi::c_void) -> ::windows::core::Result<*mut CRYPT_XML_SIGNATURE> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlGetSignature(hcryptxml: *const ::core::ffi::c_void, ppstruct: *mut *mut CRYPT_XML_SIGNATURE) -> ::windows::core::HRESULT; } let mut result__: <*mut CRYPT_XML_SIGNATURE as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); CryptXmlGetSignature(::core::mem::transmute(hcryptxml), &mut result__).from_abi::<*mut CRYPT_XML_SIGNATURE>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CryptXmlGetStatus(hcryptxml: *const ::core::ffi::c_void) -> ::windows::core::Result<CRYPT_XML_STATUS> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlGetStatus(hcryptxml: *const ::core::ffi::c_void, pstatus: *mut CRYPT_XML_STATUS) -> ::windows::core::HRESULT; } let mut result__: <CRYPT_XML_STATUS as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); CryptXmlGetStatus(::core::mem::transmute(hcryptxml), &mut result__).from_abi::<CRYPT_XML_STATUS>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlGetTransforms() -> ::windows::core::Result<*mut CRYPT_XML_TRANSFORM_CHAIN_CONFIG> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlGetTransforms(ppconfig: *mut *mut CRYPT_XML_TRANSFORM_CHAIN_CONFIG) -> ::windows::core::HRESULT; } let mut result__: <*mut CRYPT_XML_TRANSFORM_CHAIN_CONFIG as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); CryptXmlGetTransforms(&mut result__).from_abi::<*mut CRYPT_XML_TRANSFORM_CHAIN_CONFIG>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlImportPublicKey(dwflags: CRYPT_XML_FLAGS, pkeyvalue: *const CRYPT_XML_KEY_VALUE) -> ::windows::core::Result<BCRYPT_KEY_HANDLE> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlImportPublicKey(dwflags: CRYPT_XML_FLAGS, pkeyvalue: *const CRYPT_XML_KEY_VALUE, phkey: *mut BCRYPT_KEY_HANDLE) -> ::windows::core::HRESULT; } let mut result__: <BCRYPT_KEY_HANDLE as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); CryptXmlImportPublicKey(::core::mem::transmute(dwflags), ::core::mem::transmute(pkeyvalue), &mut result__).from_abi::<BCRYPT_KEY_HANDLE>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlOpenToDecode(pconfig: *const CRYPT_XML_TRANSFORM_CHAIN_CONFIG, dwflags: CRYPT_XML_FLAGS, rgproperty: *const CRYPT_XML_PROPERTY, cproperty: u32, pencoded: *const CRYPT_XML_BLOB, phcryptxml: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlOpenToDecode(pconfig: *const CRYPT_XML_TRANSFORM_CHAIN_CONFIG, dwflags: CRYPT_XML_FLAGS, rgproperty: *const CRYPT_XML_PROPERTY, cproperty: u32, pencoded: *const CRYPT_XML_BLOB, phcryptxml: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT; } CryptXmlOpenToDecode(::core::mem::transmute(pconfig), ::core::mem::transmute(dwflags), ::core::mem::transmute(rgproperty), ::core::mem::transmute(cproperty), ::core::mem::transmute(pencoded), ::core::mem::transmute(phcryptxml)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlOpenToEncode<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pconfig: *const CRYPT_XML_TRANSFORM_CHAIN_CONFIG, dwflags: CRYPT_XML_FLAGS, wszid: Param2, rgproperty: *const CRYPT_XML_PROPERTY, cproperty: u32, pencoded: *const CRYPT_XML_BLOB, phsignature: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlOpenToEncode(pconfig: *const CRYPT_XML_TRANSFORM_CHAIN_CONFIG, dwflags: CRYPT_XML_FLAGS, wszid: super::super::Foundation::PWSTR, rgproperty: *const CRYPT_XML_PROPERTY, cproperty: u32, pencoded: *const CRYPT_XML_BLOB, phsignature: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT; } CryptXmlOpenToEncode(::core::mem::transmute(pconfig), ::core::mem::transmute(dwflags), wszid.into_param().abi(), ::core::mem::transmute(rgproperty), ::core::mem::transmute(cproperty), ::core::mem::transmute(pencoded), ::core::mem::transmute(phsignature)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CryptXmlSetHMACSecret(hsignature: *const ::core::ffi::c_void, pbsecret: *const u8, cbsecret: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlSetHMACSecret(hsignature: *const ::core::ffi::c_void, pbsecret: *const u8, cbsecret: u32) -> ::windows::core::HRESULT; } CryptXmlSetHMACSecret(::core::mem::transmute(hsignature), ::core::mem::transmute(pbsecret), ::core::mem::transmute(cbsecret)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptXmlSign(hsignature: *const ::core::ffi::c_void, hkey: usize, dwkeyspec: CERT_KEY_SPEC, dwflags: CRYPT_XML_FLAGS, dwkeyinfospec: CRYPT_XML_KEYINFO_SPEC, pvkeyinfospec: *const ::core::ffi::c_void, psignaturemethod: *const CRYPT_XML_ALGORITHM, pcanonicalization: *const CRYPT_XML_ALGORITHM) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlSign(hsignature: *const ::core::ffi::c_void, hkey: usize, dwkeyspec: CERT_KEY_SPEC, dwflags: CRYPT_XML_FLAGS, dwkeyinfospec: CRYPT_XML_KEYINFO_SPEC, pvkeyinfospec: *const ::core::ffi::c_void, psignaturemethod: *const CRYPT_XML_ALGORITHM, pcanonicalization: *const CRYPT_XML_ALGORITHM) -> ::windows::core::HRESULT; } CryptXmlSign(::core::mem::transmute(hsignature), ::core::mem::transmute(hkey), ::core::mem::transmute(dwkeyspec), ::core::mem::transmute(dwflags), ::core::mem::transmute(dwkeyinfospec), ::core::mem::transmute(pvkeyinfospec), ::core::mem::transmute(psignaturemethod), ::core::mem::transmute(pcanonicalization)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn CryptXmlVerifySignature<'a, Param1: ::windows::core::IntoParam<'a, BCRYPT_KEY_HANDLE>>(hsignature: *const ::core::ffi::c_void, hkey: Param1, dwflags: CRYPT_XML_FLAGS) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn CryptXmlVerifySignature(hsignature: *const ::core::ffi::c_void, hkey: BCRYPT_KEY_HANDLE, dwflags: CRYPT_XML_FLAGS) -> ::windows::core::HRESULT; } CryptXmlVerifySignature(::core::mem::transmute(hsignature), hkey.into_param().abi(), ::core::mem::transmute(dwflags)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct DSAFIPSVERSION_ENUM(pub i32); pub const DSA_FIPS186_2: DSAFIPSVERSION_ENUM = DSAFIPSVERSION_ENUM(0i32); pub const DSA_FIPS186_3: DSAFIPSVERSION_ENUM = DSAFIPSVERSION_ENUM(1i32); impl ::core::convert::From<i32> for DSAFIPSVERSION_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for DSAFIPSVERSION_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DSSSEED { pub counter: u32, pub seed: [u8; 20], } impl DSSSEED {} impl ::core::default::Default for DSSSEED { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DSSSEED { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DSSSEED").field("counter", &self.counter).field("seed", &self.seed).finish() } } impl ::core::cmp::PartialEq for DSSSEED { fn eq(&self, other: &Self) -> bool { self.counter == other.counter && self.seed == other.seed } } impl ::core::cmp::Eq for DSSSEED {} unsafe impl ::windows::core::Abi for DSSSEED { type Abi = Self; } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn Decrypt<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, foaep: Param1, cbindata: u32, pindata: *const u8, pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn Decrypt(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, foaep: super::super::Foundation::BOOL, cbindata: u32, pindata: *const u8, pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> ::windows::core::HRESULT; } Decrypt(::core::mem::transmute(hcrypto), foaep.into_param().abi(), ::core::mem::transmute(cbindata), ::core::mem::transmute(pindata), ::core::mem::transmute(pcboutdata), ::core::mem::transmute(ppoutdata)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct Direction(pub i32); pub const DirectionEncrypt: Direction = Direction(1i32); pub const DirectionDecrypt: Direction = Direction(2i32); impl ::core::convert::From<i32> for Direction { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for Direction { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ECC_CURVE_ALG_ID_ENUM(pub i32); pub const BCRYPT_NO_CURVE_GENERATION_ALG_ID: ECC_CURVE_ALG_ID_ENUM = ECC_CURVE_ALG_ID_ENUM(0i32); impl ::core::convert::From<i32> for ECC_CURVE_ALG_ID_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ECC_CURVE_ALG_ID_ENUM { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ECC_CURVE_TYPE_ENUM(pub i32); pub const BCRYPT_ECC_PRIME_SHORT_WEIERSTRASS_CURVE: ECC_CURVE_TYPE_ENUM = ECC_CURVE_TYPE_ENUM(1i32); pub const BCRYPT_ECC_PRIME_TWISTED_EDWARDS_CURVE: ECC_CURVE_TYPE_ENUM = ECC_CURVE_TYPE_ENUM(2i32); pub const BCRYPT_ECC_PRIME_MONTGOMERY_CURVE: ECC_CURVE_TYPE_ENUM = ECC_CURVE_TYPE_ENUM(3i32); impl ::core::convert::From<i32> for ECC_CURVE_TYPE_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ECC_CURVE_TYPE_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ENDPOINTADDRESS { pub serviceUrl: super::super::Foundation::PWSTR, pub policyUrl: super::super::Foundation::PWSTR, pub rawCertificate: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl ENDPOINTADDRESS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ENDPOINTADDRESS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ENDPOINTADDRESS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ENDPOINTADDRESS").field("serviceUrl", &self.serviceUrl).field("policyUrl", &self.policyUrl).field("rawCertificate", &self.rawCertificate).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ENDPOINTADDRESS { fn eq(&self, other: &Self) -> bool { self.serviceUrl == other.serviceUrl && self.policyUrl == other.policyUrl && self.rawCertificate == other.rawCertificate } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ENDPOINTADDRESS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ENDPOINTADDRESS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct ENDPOINTADDRESS2 { pub serviceUrl: super::super::Foundation::PWSTR, pub policyUrl: super::super::Foundation::PWSTR, pub identityType: u32, pub identityBytes: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl ENDPOINTADDRESS2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for ENDPOINTADDRESS2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for ENDPOINTADDRESS2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ENDPOINTADDRESS2").field("serviceUrl", &self.serviceUrl).field("policyUrl", &self.policyUrl).field("identityType", &self.identityType).field("identityBytes", &self.identityBytes).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for ENDPOINTADDRESS2 { fn eq(&self, other: &Self) -> bool { self.serviceUrl == other.serviceUrl && self.policyUrl == other.policyUrl && self.identityType == other.identityType && self.identityBytes == other.identityBytes } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for ENDPOINTADDRESS2 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for ENDPOINTADDRESS2 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EV_EXTRA_CERT_CHAIN_POLICY_PARA { pub cbSize: u32, pub dwRootProgramQualifierFlags: CERT_ROOT_PROGRAM_FLAGS, } impl EV_EXTRA_CERT_CHAIN_POLICY_PARA {} impl ::core::default::Default for EV_EXTRA_CERT_CHAIN_POLICY_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EV_EXTRA_CERT_CHAIN_POLICY_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EV_EXTRA_CERT_CHAIN_POLICY_PARA").field("cbSize", &self.cbSize).field("dwRootProgramQualifierFlags", &self.dwRootProgramQualifierFlags).finish() } } impl ::core::cmp::PartialEq for EV_EXTRA_CERT_CHAIN_POLICY_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwRootProgramQualifierFlags == other.dwRootProgramQualifierFlags } } impl ::core::cmp::Eq for EV_EXTRA_CERT_CHAIN_POLICY_PARA {} unsafe impl ::windows::core::Abi for EV_EXTRA_CERT_CHAIN_POLICY_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EV_EXTRA_CERT_CHAIN_POLICY_STATUS { pub cbSize: u32, pub dwQualifiers: u32, pub dwIssuanceUsageIndex: u32, } impl EV_EXTRA_CERT_CHAIN_POLICY_STATUS {} impl ::core::default::Default for EV_EXTRA_CERT_CHAIN_POLICY_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EV_EXTRA_CERT_CHAIN_POLICY_STATUS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EV_EXTRA_CERT_CHAIN_POLICY_STATUS").field("cbSize", &self.cbSize).field("dwQualifiers", &self.dwQualifiers).field("dwIssuanceUsageIndex", &self.dwIssuanceUsageIndex).finish() } } impl ::core::cmp::PartialEq for EV_EXTRA_CERT_CHAIN_POLICY_STATUS { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwQualifiers == other.dwQualifiers && self.dwIssuanceUsageIndex == other.dwIssuanceUsageIndex } } impl ::core::cmp::Eq for EV_EXTRA_CERT_CHAIN_POLICY_STATUS {} unsafe impl ::windows::core::Abi for EV_EXTRA_CERT_CHAIN_POLICY_STATUS { type Abi = Self; } pub const EXPORT_PRIVATE_KEYS: u32 = 4u32; pub const E_ICARD_ARGUMENT: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413883i32 as _); pub const E_ICARD_COMMUNICATION: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413888i32 as _); pub const E_ICARD_DATA_ACCESS: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413887i32 as _); pub const E_ICARD_EXPORT: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413886i32 as _); pub const E_ICARD_FAIL: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413867i32 as _); pub const E_ICARD_FAILED_REQUIRED_CLAIMS: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413756i32 as _); pub const E_ICARD_IDENTITY: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413885i32 as _); pub const E_ICARD_IMPORT: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413884i32 as _); pub const E_ICARD_INFORMATIONCARD: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413881i32 as _); pub const E_ICARD_INVALID_PROOF_KEY: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413758i32 as _); pub const E_ICARD_LOGOVALIDATION: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413879i32 as _); pub const E_ICARD_MISSING_APPLIESTO: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413759i32 as _); pub const E_ICARD_PASSWORDVALIDATION: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413878i32 as _); pub const E_ICARD_POLICY: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413877i32 as _); pub const E_ICARD_PROCESSDIED: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413876i32 as _); pub const E_ICARD_REFRESH_REQUIRED: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413760i32 as _); pub const E_ICARD_REQUEST: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413882i32 as _); pub const E_ICARD_SERVICE: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413874i32 as _); pub const E_ICARD_SERVICEBUSY: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413875i32 as _); pub const E_ICARD_SHUTTINGDOWN: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413873i32 as _); pub const E_ICARD_STOREKEY: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413880i32 as _); pub const E_ICARD_STORE_IMPORT: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413868i32 as _); pub const E_ICARD_TOKENCREATION: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413872i32 as _); pub const E_ICARD_TRUSTEXCHANGE: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413871i32 as _); pub const E_ICARD_UI_INITIALIZATION: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413862i32 as _); pub const E_ICARD_UNKNOWN_REFERENCE: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413757i32 as _); pub const E_ICARD_UNTRUSTED: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413870i32 as _); pub const E_ICARD_USERCANCELLED: ::windows::core::HRESULT = ::windows::core::HRESULT(-1073413869i32 as _); #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn Encrypt<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, foaep: Param1, cbindata: u32, pindata: *const u8, pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn Encrypt(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, foaep: super::super::Foundation::BOOL, cbindata: u32, pindata: *const u8, pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> ::windows::core::HRESULT; } Encrypt(::core::mem::transmute(hcrypto), foaep.into_param().abi(), ::core::mem::transmute(cbindata), ::core::mem::transmute(pindata), ::core::mem::transmute(pcboutdata), ::core::mem::transmute(ppoutdata)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn FindCertsByIssuer<'a, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pcertchains: *mut CERT_CHAIN, pcbcertchains: *mut u32, pccertchains: *mut u32, pbencodedissuername: *const u8, cbencodedissuername: u32, pwszpurpose: Param5, dwkeyspec: u32) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn FindCertsByIssuer(pcertchains: *mut CERT_CHAIN, pcbcertchains: *mut u32, pccertchains: *mut u32, pbencodedissuername: *const u8, cbencodedissuername: u32, pwszpurpose: super::super::Foundation::PWSTR, dwkeyspec: u32) -> ::windows::core::HRESULT; } FindCertsByIssuer(::core::mem::transmute(pcertchains), ::core::mem::transmute(pcbcertchains), ::core::mem::transmute(pccertchains), ::core::mem::transmute(pbencodedissuername), ::core::mem::transmute(cbencodedissuername), pwszpurpose.into_param().abi(), ::core::mem::transmute(dwkeyspec)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn FreeToken(pallocmemory: *const GENERIC_XML_TOKEN) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn FreeToken(pallocmemory: *const GENERIC_XML_TOKEN) -> super::super::Foundation::BOOL; } ::core::mem::transmute(FreeToken(::core::mem::transmute(pallocmemory))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] #[cfg(feature = "Win32_Foundation")] pub struct GENERIC_XML_TOKEN { pub createDate: super::super::Foundation::FILETIME, pub expiryDate: super::super::Foundation::FILETIME, pub xmlToken: super::super::Foundation::PWSTR, pub internalTokenReference: super::super::Foundation::PWSTR, pub externalTokenReference: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl GENERIC_XML_TOKEN {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for GENERIC_XML_TOKEN { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for GENERIC_XML_TOKEN { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for GENERIC_XML_TOKEN {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for GENERIC_XML_TOKEN { type Abi = Self; } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn GenerateDerivedKey<'a, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cblabel: u32, plabel: *const u8, cbnonce: u32, pnonce: *const u8, derivedkeylength: u32, offset: u32, algid: Param7, pcbkey: *mut u32, ppkey: *mut *mut u8) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn GenerateDerivedKey(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cblabel: u32, plabel: *const u8, cbnonce: u32, pnonce: *const u8, derivedkeylength: u32, offset: u32, algid: super::super::Foundation::PWSTR, pcbkey: *mut u32, ppkey: *mut *mut u8) -> ::windows::core::HRESULT; } GenerateDerivedKey( ::core::mem::transmute(hcrypto), ::core::mem::transmute(cblabel), ::core::mem::transmute(plabel), ::core::mem::transmute(cbnonce), ::core::mem::transmute(pnonce), ::core::mem::transmute(derivedkeylength), ::core::mem::transmute(offset), algid.into_param().abi(), ::core::mem::transmute(pcbkey), ::core::mem::transmute(ppkey), ) .ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn GetBrowserToken(dwparamtype: u32, pparam: *const ::core::ffi::c_void, pcbtoken: *mut u32, pptoken: *mut *mut u8) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn GetBrowserToken(dwparamtype: u32, pparam: *const ::core::ffi::c_void, pcbtoken: *mut u32, pptoken: *mut *mut u8) -> ::windows::core::HRESULT; } GetBrowserToken(::core::mem::transmute(dwparamtype), ::core::mem::transmute(pparam), ::core::mem::transmute(pcbtoken), ::core::mem::transmute(pptoken)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn GetCryptoTransform(hsymmetriccrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, mode: u32, padding: PaddingMode, feedbacksize: u32, direction: Direction, cbiv: u32, piv: *const u8) -> ::windows::core::Result<*mut INFORMATIONCARD_CRYPTO_HANDLE> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn GetCryptoTransform(hsymmetriccrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, mode: u32, padding: PaddingMode, feedbacksize: u32, direction: Direction, cbiv: u32, piv: *const u8, pphtransform: *mut *mut INFORMATIONCARD_CRYPTO_HANDLE) -> ::windows::core::HRESULT; } let mut result__: <*mut INFORMATIONCARD_CRYPTO_HANDLE as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); GetCryptoTransform(::core::mem::transmute(hsymmetriccrypto), ::core::mem::transmute(mode), ::core::mem::transmute(padding), ::core::mem::transmute(feedbacksize), ::core::mem::transmute(direction), ::core::mem::transmute(cbiv), ::core::mem::transmute(piv), &mut result__).from_abi::<*mut INFORMATIONCARD_CRYPTO_HANDLE>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn GetKeyedHash(hsymmetriccrypto: *const INFORMATIONCARD_CRYPTO_HANDLE) -> ::windows::core::Result<*mut INFORMATIONCARD_CRYPTO_HANDLE> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn GetKeyedHash(hsymmetriccrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, pphhash: *mut *mut INFORMATIONCARD_CRYPTO_HANDLE) -> ::windows::core::HRESULT; } let mut result__: <*mut INFORMATIONCARD_CRYPTO_HANDLE as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); GetKeyedHash(::core::mem::transmute(hsymmetriccrypto), &mut result__).from_abi::<*mut INFORMATIONCARD_CRYPTO_HANDLE>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn GetToken(cpolicychain: u32, ppolicychain: *const POLICY_ELEMENT, securitytoken: *mut *mut GENERIC_XML_TOKEN, phprooftokencrypto: *mut *mut INFORMATIONCARD_CRYPTO_HANDLE) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn GetToken(cpolicychain: u32, ppolicychain: *const POLICY_ELEMENT, securitytoken: *mut *mut GENERIC_XML_TOKEN, phprooftokencrypto: *mut *mut INFORMATIONCARD_CRYPTO_HANDLE) -> ::windows::core::HRESULT; } GetToken(::core::mem::transmute(cpolicychain), ::core::mem::transmute(ppolicychain), ::core::mem::transmute(securitytoken), ::core::mem::transmute(phprooftokencrypto)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct HASHALGORITHM_ENUM(pub i32); pub const DSA_HASH_ALGORITHM_SHA1: HASHALGORITHM_ENUM = HASHALGORITHM_ENUM(0i32); pub const DSA_HASH_ALGORITHM_SHA256: HASHALGORITHM_ENUM = HASHALGORITHM_ENUM(1i32); pub const DSA_HASH_ALGORITHM_SHA512: HASHALGORITHM_ENUM = HASHALGORITHM_ENUM(2i32); impl ::core::convert::From<i32> for HASHALGORITHM_ENUM { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for HASHALGORITHM_ENUM { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy, :: core :: fmt :: Debug, :: core :: cmp :: PartialEq, :: core :: cmp :: Eq)] #[repr(transparent)] pub struct HCERTCHAINENGINE(pub isize); impl ::core::default::Default for HCERTCHAINENGINE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } unsafe impl ::windows::core::Handle for HCERTCHAINENGINE {} unsafe impl ::windows::core::Abi for HCERTCHAINENGINE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy, :: core :: fmt :: Debug, :: core :: cmp :: PartialEq, :: core :: cmp :: Eq)] #[repr(transparent)] pub struct HCRYPTASYNC(pub isize); impl ::core::default::Default for HCRYPTASYNC { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } unsafe impl ::windows::core::Handle for HCRYPTASYNC {} unsafe impl ::windows::core::Abi for HCRYPTASYNC { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct HMAC_Info { pub HashAlgid: u32, pub pbInnerString: *mut u8, pub cbInnerString: u32, pub pbOuterString: *mut u8, pub cbOuterString: u32, } impl HMAC_Info {} impl ::core::default::Default for HMAC_Info { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for HMAC_Info { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("HMAC_Info").field("HashAlgid", &self.HashAlgid).field("pbInnerString", &self.pbInnerString).field("cbInnerString", &self.cbInnerString).field("pbOuterString", &self.pbOuterString).field("cbOuterString", &self.cbOuterString).finish() } } impl ::core::cmp::PartialEq for HMAC_Info { fn eq(&self, other: &Self) -> bool { self.HashAlgid == other.HashAlgid && self.pbInnerString == other.pbInnerString && self.cbInnerString == other.cbInnerString && self.pbOuterString == other.pbOuterString && self.cbOuterString == other.cbOuterString } } impl ::core::cmp::Eq for HMAC_Info {} unsafe impl ::windows::core::Abi for HMAC_Info { type Abi = Self; } pub const HP_ALGID: u32 = 1u32; pub const HP_HASHSIZE: u32 = 4u32; pub const HP_TLS1PRF_LABEL: u32 = 6u32; pub const HP_TLS1PRF_SEED: u32 = 7u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE(pub u32); pub const AUTHTYPE_CLIENT: HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE = HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE(1u32); pub const AUTHTYPE_SERVER: HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE = HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE(2u32); impl ::core::convert::From<u32> for HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE { type Abi = Self; } impl ::core::ops::BitOr for HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct HTTPSPolicyCallbackData { pub Anonymous: HTTPSPolicyCallbackData_0, pub dwAuthType: HTTPSPOLICY_CALLBACK_DATA_AUTH_TYPE, pub fdwChecks: u32, pub pwszServerName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl HTTPSPolicyCallbackData {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for HTTPSPolicyCallbackData { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for HTTPSPolicyCallbackData { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for HTTPSPolicyCallbackData {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for HTTPSPolicyCallbackData { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union HTTPSPolicyCallbackData_0 { pub cbStruct: u32, pub cbSize: u32, } #[cfg(feature = "Win32_Foundation")] impl HTTPSPolicyCallbackData_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for HTTPSPolicyCallbackData_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for HTTPSPolicyCallbackData_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for HTTPSPolicyCallbackData_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for HTTPSPolicyCallbackData_0 { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct HandleType(pub i32); impl HandleType { pub const Asymmetric: HandleType = HandleType(1i32); pub const Symmetric: HandleType = HandleType(2i32); pub const Transform: HandleType = HandleType(3i32); pub const Hash: HandleType = HandleType(4i32); } impl ::core::convert::From<i32> for HandleType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for HandleType { type Abi = Self; } #[inline] pub unsafe fn HashCore(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cbindata: u32, pindata: *const u8) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn HashCore(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cbindata: u32, pindata: *const u8) -> ::windows::core::HRESULT; } HashCore(::core::mem::transmute(hcrypto), ::core::mem::transmute(cbindata), ::core::mem::transmute(pindata)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn HashFinal(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cbindata: u32, pindata: *const u8, pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn HashFinal(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cbindata: u32, pindata: *const u8, pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> ::windows::core::HRESULT; } HashFinal(::core::mem::transmute(hcrypto), ::core::mem::transmute(cbindata), ::core::mem::transmute(pindata), ::core::mem::transmute(pcboutdata), ::core::mem::transmute(ppoutdata)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICertSrvSetup(pub ::windows::core::IUnknown); impl ICertSrvSetup { pub unsafe fn CAErrorId(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CAErrorString(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn InitializeDefaults(&self, bserver: i16, bclient: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(bserver), ::core::mem::transmute(bclient)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetCASetupProperty(&self, propertyid: CASetupProperty) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(propertyid), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetCASetupProperty(&self, propertyid: CASetupProperty, ppropertyvalue: *const super::super::System::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(propertyid), ::core::mem::transmute(ppropertyvalue)).ok() } pub unsafe fn IsPropertyEditable(&self, propertyid: CASetupProperty) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(propertyid), &mut result__).from_abi::<i16>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetSupportedCATypes(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetProviderNameList(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetKeyLengthList<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrprovidername: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrprovidername.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetHashAlgorithmList<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrprovidername: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrprovidername.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetPrivateKeyContainerList<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrprovidername: Param0) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrprovidername.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } pub unsafe fn GetExistingCACertificates(&self) -> ::windows::core::Result<ICertSrvSetupKeyInformationCollection> { let mut result__: <ICertSrvSetupKeyInformationCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ICertSrvSetupKeyInformationCollection>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CAImportPFX<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrfilename: Param0, bstrpasswd: Param1, boverwriteexistingkey: i16) -> ::windows::core::Result<ICertSrvSetupKeyInformation> { let mut result__: <ICertSrvSetupKeyInformation as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), bstrfilename.into_param().abi(), bstrpasswd.into_param().abi(), ::core::mem::transmute(boverwriteexistingkey), &mut result__).from_abi::<ICertSrvSetupKeyInformation>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetCADistinguishedName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrcadn: Param0, bignoreunicode: i16, boverwriteexistingkey: i16, boverwriteexistingcainds: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), bstrcadn.into_param().abi(), ::core::mem::transmute(bignoreunicode), ::core::mem::transmute(boverwriteexistingkey), ::core::mem::transmute(boverwriteexistingcainds)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDatabaseInformation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrdbdirectory: Param0, bstrlogdirectory: Param1, bstrsharedfolder: Param2, bforceoverwrite: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), bstrdbdirectory.into_param().abi(), bstrlogdirectory.into_param().abi(), bstrsharedfolder.into_param().abi(), ::core::mem::transmute(bforceoverwrite)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetParentCAInformation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrcaconfiguration: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), bstrcaconfiguration.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetWebCAInformation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrcaconfiguration: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), bstrcaconfiguration.into_param().abi()).ok() } pub unsafe fn Install(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn PreUnInstall(&self, bclientonly: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), ::core::mem::transmute(bclientonly)).ok() } pub unsafe fn PostUnInstall(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for ICertSrvSetup { type Vtable = ICertSrvSetup_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb760a1bb_4784_44c0_8f12_555f0780ff25); } impl ::core::convert::From<ICertSrvSetup> for ::windows::core::IUnknown { fn from(value: ICertSrvSetup) -> Self { value.0 } } impl ::core::convert::From<&ICertSrvSetup> for ::windows::core::IUnknown { fn from(value: &ICertSrvSetup) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICertSrvSetup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ICertSrvSetup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<ICertSrvSetup> for super::super::System::Com::IDispatch { fn from(value: ICertSrvSetup) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ICertSrvSetup> for super::super::System::Com::IDispatch { fn from(value: &ICertSrvSetup) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for ICertSrvSetup { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &ICertSrvSetup { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ICertSrvSetup_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bserver: i16, bclient: i16) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyid: CASetupProperty, ppropertyvalue: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyid: CASetupProperty, ppropertyvalue: *const ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyid: CASetupProperty, pbeditable: *mut i16) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcatypes: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrprovidername: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrprovidername: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrprovidername: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppval: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrfilename: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bstrpasswd: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, boverwriteexistingkey: i16, ppval: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrcadn: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bignoreunicode: i16, boverwriteexistingkey: i16, boverwriteexistingcainds: i16) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrdbdirectory: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bstrlogdirectory: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bstrsharedfolder: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bforceoverwrite: i16) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrcaconfiguration: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrcaconfiguration: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bclientonly: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICertSrvSetupKeyInformation(pub ::windows::core::IUnknown); impl ICertSrvSetupKeyInformation { #[cfg(feature = "Win32_Foundation")] pub unsafe fn ProviderName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetProviderName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrval: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), bstrval.into_param().abi()).ok() } pub unsafe fn Length(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetLength(&self, lval: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(lval)).ok() } pub unsafe fn Existing(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetExisting(&self, bval: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(bval)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ContainerName(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetContainerName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrval: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), bstrval.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn HashAlgorithm(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetHashAlgorithm<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrval: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), bstrval.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ExistingCACertificate(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetExistingCACertificate<'a, Param0: ::windows::core::IntoParam<'a, super::super::System::Com::VARIANT>>(&self, varval: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), varval.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for ICertSrvSetupKeyInformation { type Vtable = ICertSrvSetupKeyInformation_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6ba73778_36da_4c39_8a85_bcfa7d000793); } impl ::core::convert::From<ICertSrvSetupKeyInformation> for ::windows::core::IUnknown { fn from(value: ICertSrvSetupKeyInformation) -> Self { value.0 } } impl ::core::convert::From<&ICertSrvSetupKeyInformation> for ::windows::core::IUnknown { fn from(value: &ICertSrvSetupKeyInformation) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICertSrvSetupKeyInformation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ICertSrvSetupKeyInformation { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<ICertSrvSetupKeyInformation> for super::super::System::Com::IDispatch { fn from(value: ICertSrvSetupKeyInformation) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ICertSrvSetupKeyInformation> for super::super::System::Com::IDispatch { fn from(value: &ICertSrvSetupKeyInformation) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for ICertSrvSetupKeyInformation { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &ICertSrvSetupKeyInformation { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ICertSrvSetupKeyInformation_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrval: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lval: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bval: i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrval: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrval: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, varval: ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICertSrvSetupKeyInformationCollection(pub ::windows::core::IUnknown); impl ICertSrvSetupKeyInformationCollection { pub unsafe fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown> { let mut result__: <::windows::core::IUnknown as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<::windows::core::IUnknown>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Item(&self, index: i32) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(index), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } pub unsafe fn Count(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn Add<'a, Param0: ::windows::core::IntoParam<'a, ICertSrvSetupKeyInformation>>(&self, pikeyinformation: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), pikeyinformation.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for ICertSrvSetupKeyInformationCollection { type Vtable = ICertSrvSetupKeyInformationCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe65c8b00_e58f_41f9_a9ec_a28d7427c844); } impl ::core::convert::From<ICertSrvSetupKeyInformationCollection> for ::windows::core::IUnknown { fn from(value: ICertSrvSetupKeyInformationCollection) -> Self { value.0 } } impl ::core::convert::From<&ICertSrvSetupKeyInformationCollection> for ::windows::core::IUnknown { fn from(value: &ICertSrvSetupKeyInformationCollection) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICertSrvSetupKeyInformationCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ICertSrvSetupKeyInformationCollection { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<ICertSrvSetupKeyInformationCollection> for super::super::System::Com::IDispatch { fn from(value: ICertSrvSetupKeyInformationCollection) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ICertSrvSetupKeyInformationCollection> for super::super::System::Com::IDispatch { fn from(value: &ICertSrvSetupKeyInformationCollection) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for ICertSrvSetupKeyInformationCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &ICertSrvSetupKeyInformationCollection { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ICertSrvSetupKeyInformationCollection_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppval: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, index: i32, pval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pikeyinformation: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICertificateEnrollmentPolicyServerSetup(pub ::windows::core::IUnknown); impl ICertificateEnrollmentPolicyServerSetup { #[cfg(feature = "Win32_Foundation")] pub unsafe fn ErrorString(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn InitializeInstallDefaults(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetProperty(&self, propertyid: CEPSetupProperty) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(propertyid), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetProperty(&self, propertyid: CEPSetupProperty, ppropertyvalue: *const super::super::System::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(propertyid), ::core::mem::transmute(ppropertyvalue)).ok() } pub unsafe fn Install(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn UnInstall(&self, pauthkeybasedrenewal: *const super::super::System::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(pauthkeybasedrenewal)).ok() } } unsafe impl ::windows::core::Interface for ICertificateEnrollmentPolicyServerSetup { type Vtable = ICertificateEnrollmentPolicyServerSetup_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x859252cc_238c_4a88_b8fd_a37e7d04e68b); } impl ::core::convert::From<ICertificateEnrollmentPolicyServerSetup> for ::windows::core::IUnknown { fn from(value: ICertificateEnrollmentPolicyServerSetup) -> Self { value.0 } } impl ::core::convert::From<&ICertificateEnrollmentPolicyServerSetup> for ::windows::core::IUnknown { fn from(value: &ICertificateEnrollmentPolicyServerSetup) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICertificateEnrollmentPolicyServerSetup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ICertificateEnrollmentPolicyServerSetup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<ICertificateEnrollmentPolicyServerSetup> for super::super::System::Com::IDispatch { fn from(value: ICertificateEnrollmentPolicyServerSetup) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ICertificateEnrollmentPolicyServerSetup> for super::super::System::Com::IDispatch { fn from(value: &ICertificateEnrollmentPolicyServerSetup) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for ICertificateEnrollmentPolicyServerSetup { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &ICertificateEnrollmentPolicyServerSetup { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ICertificateEnrollmentPolicyServerSetup_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyid: CEPSetupProperty, ppropertyvalue: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyid: CEPSetupProperty, ppropertyvalue: *const ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pauthkeybasedrenewal: *const ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ICertificateEnrollmentServerSetup(pub ::windows::core::IUnknown); impl ICertificateEnrollmentServerSetup { #[cfg(feature = "Win32_Foundation")] pub unsafe fn ErrorString(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn InitializeInstallDefaults(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetProperty(&self, propertyid: CESSetupProperty) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(propertyid), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetProperty(&self, propertyid: CESSetupProperty, ppropertyvalue: *const super::super::System::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(propertyid), ::core::mem::transmute(ppropertyvalue)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetApplicationPoolCredentials<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrusername: Param0, bstrpassword: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), bstrusername.into_param().abi(), bstrpassword.into_param().abi()).ok() } pub unsafe fn Install(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn UnInstall(&self, pcaconfig: *const super::super::System::Com::VARIANT, pauthentication: *const super::super::System::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(pcaconfig), ::core::mem::transmute(pauthentication)).ok() } } unsafe impl ::windows::core::Interface for ICertificateEnrollmentServerSetup { type Vtable = ICertificateEnrollmentServerSetup_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x70027fdb_9dd9_4921_8944_b35cb31bd2ec); } impl ::core::convert::From<ICertificateEnrollmentServerSetup> for ::windows::core::IUnknown { fn from(value: ICertificateEnrollmentServerSetup) -> Self { value.0 } } impl ::core::convert::From<&ICertificateEnrollmentServerSetup> for ::windows::core::IUnknown { fn from(value: &ICertificateEnrollmentServerSetup) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ICertificateEnrollmentServerSetup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ICertificateEnrollmentServerSetup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<ICertificateEnrollmentServerSetup> for super::super::System::Com::IDispatch { fn from(value: ICertificateEnrollmentServerSetup) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ICertificateEnrollmentServerSetup> for super::super::System::Com::IDispatch { fn from(value: &ICertificateEnrollmentServerSetup) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for ICertificateEnrollmentServerSetup { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &ICertificateEnrollmentServerSetup { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ICertificateEnrollmentServerSetup_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyid: CESSetupProperty, ppropertyvalue: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyid: CESSetupProperty, ppropertyvalue: *const ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrusername: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bstrpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pcaconfig: *const ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pauthentication: *const ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, ); pub const IFX_RSA_KEYGEN_VUL_AFFECTED_LEVEL_1: u32 = 1u32; pub const IFX_RSA_KEYGEN_VUL_AFFECTED_LEVEL_2: u32 = 2u32; pub const IFX_RSA_KEYGEN_VUL_NOT_AFFECTED: u32 = 0u32; #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSCEPSetup(pub ::windows::core::IUnknown); impl IMSCEPSetup { pub unsafe fn MSCEPErrorId(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MSCEPErrorString(&self) -> ::windows::core::Result<super::super::Foundation::BSTR> { let mut result__: <super::super::Foundation::BSTR as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn InitializeDefaults(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetMSCEPSetupProperty(&self, propertyid: MSCEPSetupProperty) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(propertyid), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetMSCEPSetupProperty(&self, propertyid: MSCEPSetupProperty, ppropertyvalue: *const super::super::System::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(propertyid), ::core::mem::transmute(ppropertyvalue)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetAccountInformation<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrusername: Param0, bstrpassword: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), bstrusername.into_param().abi(), bstrpassword.into_param().abi()).ok() } pub unsafe fn IsMSCEPStoreEmpty(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetProviderNameList(&self, bexchange: i16) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(bexchange), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetKeyLengthList<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bexchange: i16, bstrprovidername: Param1) -> ::windows::core::Result<super::super::System::Com::VARIANT> { let mut result__: <super::super::System::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(bexchange), bstrprovidername.into_param().abi(), &mut result__).from_abi::<super::super::System::Com::VARIANT>(result__) } pub unsafe fn Install(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn PreUnInstall(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn PostUnInstall(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IMSCEPSetup { type Vtable = IMSCEPSetup_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4f7761bb_9f3b_4592_9ee0_9a73259c313e); } impl ::core::convert::From<IMSCEPSetup> for ::windows::core::IUnknown { fn from(value: IMSCEPSetup) -> Self { value.0 } } impl ::core::convert::From<&IMSCEPSetup> for ::windows::core::IUnknown { fn from(value: &IMSCEPSetup) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSCEPSetup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a IMSCEPSetup { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IMSCEPSetup> for super::super::System::Com::IDispatch { fn from(value: IMSCEPSetup) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSCEPSetup> for super::super::System::Com::IDispatch { fn from(value: &IMSCEPSetup) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for IMSCEPSetup { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::super::System::Com::IDispatch> for &IMSCEPSetup { fn into_param(self) -> ::windows::core::Param<'a, super::super::System::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IMSCEPSetup_abi( pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> u32, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pctinfo: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::System::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::super::System::Com::EXCEPINFO>, puargerr: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pval: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyid: MSCEPSetupProperty, pval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, propertyid: MSCEPSetupProperty, ppropertyvalue: *const ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstrusername: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bstrpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbempty: *mut i16) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bexchange: i16, pval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bexchange: i16, bstrprovidername: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pval: *mut ::core::mem::ManuallyDrop<super::super::System::Com::VARIANT>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct INFORMATIONCARD_ASYMMETRIC_CRYPTO_PARAMETERS { pub keySize: i32, pub keyExchangeAlgorithm: super::super::Foundation::PWSTR, pub signatureAlgorithm: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl INFORMATIONCARD_ASYMMETRIC_CRYPTO_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for INFORMATIONCARD_ASYMMETRIC_CRYPTO_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for INFORMATIONCARD_ASYMMETRIC_CRYPTO_PARAMETERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("INFORMATIONCARD_ASYMMETRIC_CRYPTO_PARAMETERS").field("keySize", &self.keySize).field("keyExchangeAlgorithm", &self.keyExchangeAlgorithm).field("signatureAlgorithm", &self.signatureAlgorithm).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for INFORMATIONCARD_ASYMMETRIC_CRYPTO_PARAMETERS { fn eq(&self, other: &Self) -> bool { self.keySize == other.keySize && self.keyExchangeAlgorithm == other.keyExchangeAlgorithm && self.signatureAlgorithm == other.signatureAlgorithm } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for INFORMATIONCARD_ASYMMETRIC_CRYPTO_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for INFORMATIONCARD_ASYMMETRIC_CRYPTO_PARAMETERS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct INFORMATIONCARD_CRYPTO_HANDLE { pub r#type: HandleType, pub expiration: i64, pub cryptoParameters: *mut ::core::ffi::c_void, } impl INFORMATIONCARD_CRYPTO_HANDLE {} impl ::core::default::Default for INFORMATIONCARD_CRYPTO_HANDLE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for INFORMATIONCARD_CRYPTO_HANDLE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("INFORMATIONCARD_CRYPTO_HANDLE").field("r#type", &self.r#type).field("expiration", &self.expiration).field("cryptoParameters", &self.cryptoParameters).finish() } } impl ::core::cmp::PartialEq for INFORMATIONCARD_CRYPTO_HANDLE { fn eq(&self, other: &Self) -> bool { self.r#type == other.r#type && self.expiration == other.expiration && self.cryptoParameters == other.cryptoParameters } } impl ::core::cmp::Eq for INFORMATIONCARD_CRYPTO_HANDLE {} unsafe impl ::windows::core::Abi for INFORMATIONCARD_CRYPTO_HANDLE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct INFORMATIONCARD_HASH_CRYPTO_PARAMETERS { pub hashSize: i32, pub transform: INFORMATIONCARD_TRANSFORM_CRYPTO_PARAMETERS, } #[cfg(feature = "Win32_Foundation")] impl INFORMATIONCARD_HASH_CRYPTO_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for INFORMATIONCARD_HASH_CRYPTO_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for INFORMATIONCARD_HASH_CRYPTO_PARAMETERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("INFORMATIONCARD_HASH_CRYPTO_PARAMETERS").field("hashSize", &self.hashSize).field("transform", &self.transform).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for INFORMATIONCARD_HASH_CRYPTO_PARAMETERS { fn eq(&self, other: &Self) -> bool { self.hashSize == other.hashSize && self.transform == other.transform } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for INFORMATIONCARD_HASH_CRYPTO_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for INFORMATIONCARD_HASH_CRYPTO_PARAMETERS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct INFORMATIONCARD_SYMMETRIC_CRYPTO_PARAMETERS { pub keySize: i32, pub blockSize: i32, pub feedbackSize: i32, } impl INFORMATIONCARD_SYMMETRIC_CRYPTO_PARAMETERS {} impl ::core::default::Default for INFORMATIONCARD_SYMMETRIC_CRYPTO_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for INFORMATIONCARD_SYMMETRIC_CRYPTO_PARAMETERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("INFORMATIONCARD_SYMMETRIC_CRYPTO_PARAMETERS").field("keySize", &self.keySize).field("blockSize", &self.blockSize).field("feedbackSize", &self.feedbackSize).finish() } } impl ::core::cmp::PartialEq for INFORMATIONCARD_SYMMETRIC_CRYPTO_PARAMETERS { fn eq(&self, other: &Self) -> bool { self.keySize == other.keySize && self.blockSize == other.blockSize && self.feedbackSize == other.feedbackSize } } impl ::core::cmp::Eq for INFORMATIONCARD_SYMMETRIC_CRYPTO_PARAMETERS {} unsafe impl ::windows::core::Abi for INFORMATIONCARD_SYMMETRIC_CRYPTO_PARAMETERS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct INFORMATIONCARD_TRANSFORM_CRYPTO_PARAMETERS { pub inputBlockSize: i32, pub outputBlockSize: i32, pub canTransformMultipleBlocks: super::super::Foundation::BOOL, pub canReuseTransform: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl INFORMATIONCARD_TRANSFORM_CRYPTO_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for INFORMATIONCARD_TRANSFORM_CRYPTO_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for INFORMATIONCARD_TRANSFORM_CRYPTO_PARAMETERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("INFORMATIONCARD_TRANSFORM_CRYPTO_PARAMETERS").field("inputBlockSize", &self.inputBlockSize).field("outputBlockSize", &self.outputBlockSize).field("canTransformMultipleBlocks", &self.canTransformMultipleBlocks).field("canReuseTransform", &self.canReuseTransform).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for INFORMATIONCARD_TRANSFORM_CRYPTO_PARAMETERS { fn eq(&self, other: &Self) -> bool { self.inputBlockSize == other.inputBlockSize && self.outputBlockSize == other.outputBlockSize && self.canTransformMultipleBlocks == other.canTransformMultipleBlocks && self.canReuseTransform == other.canReuseTransform } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for INFORMATIONCARD_TRANSFORM_CRYPTO_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for INFORMATIONCARD_TRANSFORM_CRYPTO_PARAMETERS { type Abi = Self; } pub const INTERNATIONAL_USAGE: u32 = 1u32; #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ImportInformationCard<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(filename: Param0) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ImportInformationCard(filename: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT; } ImportInformationCard(filename.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const KDF_ALGORITHMID: u32 = 8u32; pub const KDF_CONTEXT: u32 = 14u32; pub const KDF_GENERIC_PARAMETER: u32 = 17u32; pub const KDF_HASH_ALGORITHM: u32 = 0u32; pub const KDF_HKDF_INFO: u32 = 20u32; pub const KDF_HKDF_SALT: u32 = 19u32; pub const KDF_HMAC_KEY: u32 = 3u32; pub const KDF_ITERATION_COUNT: u32 = 16u32; pub const KDF_KEYBITLENGTH: u32 = 18u32; pub const KDF_LABEL: u32 = 13u32; pub const KDF_PARTYUINFO: u32 = 9u32; pub const KDF_PARTYVINFO: u32 = 10u32; pub const KDF_SALT: u32 = 15u32; pub const KDF_SECRET_APPEND: u32 = 2u32; pub const KDF_SECRET_HANDLE: u32 = 6u32; pub const KDF_SECRET_PREPEND: u32 = 1u32; pub const KDF_SUPPPRIVINFO: u32 = 12u32; pub const KDF_SUPPPUBINFO: u32 = 11u32; pub const KDF_TLS_PRF_LABEL: u32 = 4u32; pub const KDF_TLS_PRF_PROTOCOL: u32 = 7u32; pub const KDF_TLS_PRF_SEED: u32 = 5u32; pub const KDF_USE_SECRET_AS_HMAC_KEY_FLAG: u32 = 1u32; pub const KEYSTATEBLOB: u32 = 12u32; pub const KEY_LENGTH_MASK: u32 = 4294901760u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct KEY_TYPE_SUBTYPE { pub dwKeySpec: u32, pub Type: ::windows::core::GUID, pub Subtype: ::windows::core::GUID, } impl KEY_TYPE_SUBTYPE {} impl ::core::default::Default for KEY_TYPE_SUBTYPE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for KEY_TYPE_SUBTYPE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("KEY_TYPE_SUBTYPE").field("dwKeySpec", &self.dwKeySpec).field("Type", &self.Type).field("Subtype", &self.Subtype).finish() } } impl ::core::cmp::PartialEq for KEY_TYPE_SUBTYPE { fn eq(&self, other: &Self) -> bool { self.dwKeySpec == other.dwKeySpec && self.Type == other.Type && self.Subtype == other.Subtype } } impl ::core::cmp::Eq for KEY_TYPE_SUBTYPE {} unsafe impl ::windows::core::Abi for KEY_TYPE_SUBTYPE { type Abi = Self; } pub const KP_ADMIN_PIN: u32 = 31u32; pub const KP_CLEAR_KEY: u32 = 27u32; pub const KP_CLIENT_RANDOM: u32 = 21u32; pub const KP_CMS_DH_KEY_INFO: u32 = 38u32; pub const KP_CMS_KEY_INFO: u32 = 37u32; pub const KP_EFFECTIVE_KEYLEN: u32 = 19u32; pub const KP_G: u32 = 12u32; pub const KP_HIGHEST_VERSION: u32 = 41u32; pub const KP_INFO: u32 = 18u32; pub const KP_IV: u32 = 1u32; pub const KP_KEYEXCHANGE_PIN: u32 = 32u32; pub const KP_KEYVAL: u32 = 30u32; pub const KP_MODE: u32 = 4u32; pub const KP_MODE_BITS: u32 = 5u32; pub const KP_OAEP_PARAMS: u32 = 36u32; pub const KP_P: u32 = 11u32; pub const KP_PADDING: u32 = 3u32; pub const KP_PIN_ID: u32 = 43u32; pub const KP_PIN_INFO: u32 = 44u32; pub const KP_PRECOMP_MD5: u32 = 24u32; pub const KP_PRECOMP_SHA: u32 = 25u32; pub const KP_PREHASH: u32 = 34u32; pub const KP_PUB_EX_LEN: u32 = 28u32; pub const KP_PUB_EX_VAL: u32 = 29u32; pub const KP_PUB_PARAMS: u32 = 39u32; pub const KP_Q: u32 = 13u32; pub const KP_RA: u32 = 16u32; pub const KP_RB: u32 = 17u32; pub const KP_ROUNDS: u32 = 35u32; pub const KP_RP: u32 = 23u32; pub const KP_SCHANNEL_ALG: u32 = 20u32; pub const KP_SERVER_RANDOM: u32 = 22u32; pub const KP_SIGNATURE_PIN: u32 = 33u32; pub const KP_VERIFY_PARAMS: u32 = 40u32; pub const KP_X: u32 = 14u32; pub const KP_Y: u32 = 15u32; pub const MAXUIDLEN: u32 = 64u32; pub const MICROSOFT_ROOT_CERT_CHAIN_POLICY_CHECK_APPLICATION_ROOT_FLAG: u32 = 131072u32; pub const MICROSOFT_ROOT_CERT_CHAIN_POLICY_DISABLE_FLIGHT_ROOT_FLAG: u32 = 262144u32; pub const MICROSOFT_ROOT_CERT_CHAIN_POLICY_ENABLE_TEST_ROOT_FLAG: u32 = 65536u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MSCEPSetupProperty(pub i32); pub const ENUM_CEPSETUPPROP_USELOCALSYSTEM: MSCEPSetupProperty = MSCEPSetupProperty(0i32); pub const ENUM_CEPSETUPPROP_USECHALLENGE: MSCEPSetupProperty = MSCEPSetupProperty(1i32); pub const ENUM_CEPSETUPPROP_RANAME_CN: MSCEPSetupProperty = MSCEPSetupProperty(2i32); pub const ENUM_CEPSETUPPROP_RANAME_EMAIL: MSCEPSetupProperty = MSCEPSetupProperty(3i32); pub const ENUM_CEPSETUPPROP_RANAME_COMPANY: MSCEPSetupProperty = MSCEPSetupProperty(4i32); pub const ENUM_CEPSETUPPROP_RANAME_DEPT: MSCEPSetupProperty = MSCEPSetupProperty(5i32); pub const ENUM_CEPSETUPPROP_RANAME_CITY: MSCEPSetupProperty = MSCEPSetupProperty(6i32); pub const ENUM_CEPSETUPPROP_RANAME_STATE: MSCEPSetupProperty = MSCEPSetupProperty(7i32); pub const ENUM_CEPSETUPPROP_RANAME_COUNTRY: MSCEPSetupProperty = MSCEPSetupProperty(8i32); pub const ENUM_CEPSETUPPROP_SIGNINGKEYINFORMATION: MSCEPSetupProperty = MSCEPSetupProperty(9i32); pub const ENUM_CEPSETUPPROP_EXCHANGEKEYINFORMATION: MSCEPSetupProperty = MSCEPSetupProperty(10i32); pub const ENUM_CEPSETUPPROP_CAINFORMATION: MSCEPSetupProperty = MSCEPSetupProperty(11i32); pub const ENUM_CEPSETUPPROP_MSCEPURL: MSCEPSetupProperty = MSCEPSetupProperty(12i32); pub const ENUM_CEPSETUPPROP_CHALLENGEURL: MSCEPSetupProperty = MSCEPSetupProperty(13i32); impl ::core::convert::From<i32> for MSCEPSetupProperty { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MSCEPSetupProperty { type Abi = Self; } #[inline] pub unsafe fn ManageCardSpace() -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn ManageCardSpace() -> ::windows::core::HRESULT; } ManageCardSpace().ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const NCRYPTBUFFER_ATTESTATIONSTATEMENT_BLOB: u32 = 51u32; pub const NCRYPTBUFFER_ATTESTATION_CLAIM_CHALLENGE_REQUIRED: u32 = 53u32; pub const NCRYPTBUFFER_ATTESTATION_CLAIM_TYPE: u32 = 52u32; pub const NCRYPTBUFFER_CERT_BLOB: u32 = 47u32; pub const NCRYPTBUFFER_CLAIM_IDBINDING_NONCE: u32 = 48u32; pub const NCRYPTBUFFER_CLAIM_KEYATTESTATION_NONCE: u32 = 49u32; pub const NCRYPTBUFFER_DATA: u32 = 1u32; pub const NCRYPTBUFFER_ECC_CURVE_NAME: u32 = 60u32; pub const NCRYPTBUFFER_ECC_PARAMETERS: u32 = 61u32; pub const NCRYPTBUFFER_EMPTY: u32 = 0u32; pub const NCRYPTBUFFER_KEY_PROPERTY_FLAGS: u32 = 50u32; pub const NCRYPTBUFFER_PKCS_ALG_ID: u32 = 43u32; pub const NCRYPTBUFFER_PKCS_ALG_OID: u32 = 41u32; pub const NCRYPTBUFFER_PKCS_ALG_PARAM: u32 = 42u32; pub const NCRYPTBUFFER_PKCS_ATTRS: u32 = 44u32; pub const NCRYPTBUFFER_PKCS_KEY_NAME: u32 = 45u32; pub const NCRYPTBUFFER_PKCS_OID: u32 = 40u32; pub const NCRYPTBUFFER_PKCS_SECRET: u32 = 46u32; pub const NCRYPTBUFFER_PROTECTION_DESCRIPTOR_STRING: u32 = 3u32; pub const NCRYPTBUFFER_PROTECTION_FLAGS: u32 = 4u32; pub const NCRYPTBUFFER_SSL_CLEAR_KEY: u32 = 23u32; pub const NCRYPTBUFFER_SSL_CLIENT_RANDOM: u32 = 20u32; pub const NCRYPTBUFFER_SSL_HIGHEST_VERSION: u32 = 22u32; pub const NCRYPTBUFFER_SSL_KEY_ARG_DATA: u32 = 24u32; pub const NCRYPTBUFFER_SSL_SERVER_RANDOM: u32 = 21u32; pub const NCRYPTBUFFER_SSL_SESSION_HASH: u32 = 25u32; pub const NCRYPTBUFFER_TPM_PLATFORM_CLAIM_NONCE: u32 = 81u32; pub const NCRYPTBUFFER_TPM_PLATFORM_CLAIM_PCR_MASK: u32 = 80u32; pub const NCRYPTBUFFER_TPM_PLATFORM_CLAIM_STATIC_CREATE: u32 = 82u32; pub const NCRYPTBUFFER_TPM_SEAL_NO_DA_PROTECTION: u32 = 73u32; pub const NCRYPTBUFFER_TPM_SEAL_PASSWORD: u32 = 70u32; pub const NCRYPTBUFFER_TPM_SEAL_POLICYINFO: u32 = 71u32; pub const NCRYPTBUFFER_TPM_SEAL_TICKET: u32 = 72u32; pub const NCRYPTBUFFER_VERSION: u32 = 0u32; pub const NCRYPTBUFFER_VSM_KEY_ATTESTATION_CLAIM_RESTRICTIONS: u32 = 54u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct NCRYPT_ALGORITHM_NAME_CLASS(pub u32); pub const NCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE: NCRYPT_ALGORITHM_NAME_CLASS = NCRYPT_ALGORITHM_NAME_CLASS(3u32); pub const NCRYPT_SECRET_AGREEMENT_INTERFACE: NCRYPT_ALGORITHM_NAME_CLASS = NCRYPT_ALGORITHM_NAME_CLASS(4u32); pub const NCRYPT_SIGNATURE_INTERFACE: NCRYPT_ALGORITHM_NAME_CLASS = NCRYPT_ALGORITHM_NAME_CLASS(5u32); impl ::core::convert::From<u32> for NCRYPT_ALGORITHM_NAME_CLASS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for NCRYPT_ALGORITHM_NAME_CLASS { type Abi = Self; } impl ::core::ops::BitOr for NCRYPT_ALGORITHM_NAME_CLASS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for NCRYPT_ALGORITHM_NAME_CLASS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for NCRYPT_ALGORITHM_NAME_CLASS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for NCRYPT_ALGORITHM_NAME_CLASS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for NCRYPT_ALGORITHM_NAME_CLASS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } #[derive(:: core :: clone :: Clone)] #[repr(C)] pub struct NCRYPT_ALLOC_PARA { pub cbSize: u32, pub pfnAlloc: ::core::option::Option<PFN_NCRYPT_ALLOC>, pub pfnFree: ::core::option::Option<PFN_NCRYPT_FREE>, } impl NCRYPT_ALLOC_PARA {} impl ::core::default::Default for NCRYPT_ALLOC_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_ALLOC_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_ALLOC_PARA").field("cbSize", &self.cbSize).finish() } } impl ::core::cmp::PartialEq for NCRYPT_ALLOC_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.pfnAlloc.map(|f| f as usize) == other.pfnAlloc.map(|f| f as usize) && self.pfnFree.map(|f| f as usize) == other.pfnFree.map(|f| f as usize) } } impl ::core::cmp::Eq for NCRYPT_ALLOC_PARA {} unsafe impl ::windows::core::Abi for NCRYPT_ALLOC_PARA { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const NCRYPT_ALLOW_ALL_USAGES: u32 = 16777215u32; pub const NCRYPT_ALLOW_ARCHIVING_FLAG: u32 = 4u32; pub const NCRYPT_ALLOW_DECRYPT_FLAG: u32 = 1u32; pub const NCRYPT_ALLOW_EXPORT_FLAG: u32 = 1u32; pub const NCRYPT_ALLOW_KEY_AGREEMENT_FLAG: u32 = 4u32; pub const NCRYPT_ALLOW_KEY_IMPORT_FLAG: u32 = 8u32; pub const NCRYPT_ALLOW_PLAINTEXT_ARCHIVING_FLAG: u32 = 8u32; pub const NCRYPT_ALLOW_PLAINTEXT_EXPORT_FLAG: u32 = 2u32; pub const NCRYPT_ALLOW_SIGNING_FLAG: u32 = 2u32; pub const NCRYPT_ALLOW_SILENT_KEY_ACCESS: u32 = 1u32; pub const NCRYPT_ATTESTATION_FLAG: u32 = 32u32; pub const NCRYPT_AUTHORITY_KEY_FLAG: u32 = 256u32; pub const NCRYPT_CIPHER_BLOCK_PADDING_FLAG: u32 = 1u32; pub const NCRYPT_CIPHER_KEY_BLOB_MAGIC: u32 = 1380470851u32; pub const NCRYPT_CIPHER_NO_PADDING_FLAG: u32 = 0u32; pub const NCRYPT_CIPHER_OTHER_PADDING_FLAG: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_CIPHER_PADDING_INFO { pub cbSize: u32, pub dwFlags: u32, pub pbIV: *mut u8, pub cbIV: u32, pub pbOtherInfo: *mut u8, pub cbOtherInfo: u32, } impl NCRYPT_CIPHER_PADDING_INFO {} impl ::core::default::Default for NCRYPT_CIPHER_PADDING_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_CIPHER_PADDING_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_CIPHER_PADDING_INFO").field("cbSize", &self.cbSize).field("dwFlags", &self.dwFlags).field("pbIV", &self.pbIV).field("cbIV", &self.cbIV).field("pbOtherInfo", &self.pbOtherInfo).field("cbOtherInfo", &self.cbOtherInfo).finish() } } impl ::core::cmp::PartialEq for NCRYPT_CIPHER_PADDING_INFO { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwFlags == other.dwFlags && self.pbIV == other.pbIV && self.cbIV == other.cbIV && self.pbOtherInfo == other.pbOtherInfo && self.cbOtherInfo == other.cbOtherInfo } } impl ::core::cmp::Eq for NCRYPT_CIPHER_PADDING_INFO {} unsafe impl ::windows::core::Abi for NCRYPT_CIPHER_PADDING_INFO { type Abi = Self; } pub const NCRYPT_CLAIM_AUTHORITY_AND_SUBJECT: u32 = 3u32; pub const NCRYPT_CLAIM_AUTHORITY_ONLY: u32 = 1u32; pub const NCRYPT_CLAIM_PLATFORM: u32 = 65536u32; pub const NCRYPT_CLAIM_SUBJECT_ONLY: u32 = 2u32; pub const NCRYPT_CLAIM_UNKNOWN: u32 = 4096u32; pub const NCRYPT_CLAIM_VSM_KEY_ATTESTATION_STATEMENT: u32 = 4u32; pub const NCRYPT_CLAIM_WEB_AUTH_SUBJECT_ONLY: u32 = 258u32; pub const NCRYPT_DO_NOT_FINALIZE_FLAG: u32 = 1024u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_EXPORTED_ISOLATED_KEY_ENVELOPE { pub Header: NCRYPT_EXPORTED_ISOLATED_KEY_HEADER, } impl NCRYPT_EXPORTED_ISOLATED_KEY_ENVELOPE {} impl ::core::default::Default for NCRYPT_EXPORTED_ISOLATED_KEY_ENVELOPE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_EXPORTED_ISOLATED_KEY_ENVELOPE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_EXPORTED_ISOLATED_KEY_ENVELOPE").field("Header", &self.Header).finish() } } impl ::core::cmp::PartialEq for NCRYPT_EXPORTED_ISOLATED_KEY_ENVELOPE { fn eq(&self, other: &Self) -> bool { self.Header == other.Header } } impl ::core::cmp::Eq for NCRYPT_EXPORTED_ISOLATED_KEY_ENVELOPE {} unsafe impl ::windows::core::Abi for NCRYPT_EXPORTED_ISOLATED_KEY_ENVELOPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_EXPORTED_ISOLATED_KEY_HEADER { pub Version: u32, pub KeyUsage: u32, pub _bitfield: u32, pub cbAlgName: u32, pub cbNonce: u32, pub cbAuthTag: u32, pub cbWrappingKey: u32, pub cbIsolatedKey: u32, } impl NCRYPT_EXPORTED_ISOLATED_KEY_HEADER {} impl ::core::default::Default for NCRYPT_EXPORTED_ISOLATED_KEY_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_EXPORTED_ISOLATED_KEY_HEADER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_EXPORTED_ISOLATED_KEY_HEADER") .field("Version", &self.Version) .field("KeyUsage", &self.KeyUsage) .field("_bitfield", &self._bitfield) .field("cbAlgName", &self.cbAlgName) .field("cbNonce", &self.cbNonce) .field("cbAuthTag", &self.cbAuthTag) .field("cbWrappingKey", &self.cbWrappingKey) .field("cbIsolatedKey", &self.cbIsolatedKey) .finish() } } impl ::core::cmp::PartialEq for NCRYPT_EXPORTED_ISOLATED_KEY_HEADER { fn eq(&self, other: &Self) -> bool { self.Version == other.Version && self.KeyUsage == other.KeyUsage && self._bitfield == other._bitfield && self.cbAlgName == other.cbAlgName && self.cbNonce == other.cbNonce && self.cbAuthTag == other.cbAuthTag && self.cbWrappingKey == other.cbWrappingKey && self.cbIsolatedKey == other.cbIsolatedKey } } impl ::core::cmp::Eq for NCRYPT_EXPORTED_ISOLATED_KEY_HEADER {} unsafe impl ::windows::core::Abi for NCRYPT_EXPORTED_ISOLATED_KEY_HEADER { type Abi = Self; } pub const NCRYPT_EXPORTED_ISOLATED_KEY_HEADER_CURRENT_VERSION: u32 = 0u32; pub const NCRYPT_EXPORTED_ISOLATED_KEY_HEADER_V0: u32 = 0u32; pub const NCRYPT_EXPORT_LEGACY_FLAG: u32 = 2048u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct NCRYPT_FLAGS(pub u32); pub const BCRYPT_PAD_NONE: NCRYPT_FLAGS = NCRYPT_FLAGS(1u32); pub const BCRYPT_PAD_OAEP: NCRYPT_FLAGS = NCRYPT_FLAGS(4u32); pub const BCRYPT_PAD_PKCS1: NCRYPT_FLAGS = NCRYPT_FLAGS(2u32); pub const BCRYPT_PAD_PSS: NCRYPT_FLAGS = NCRYPT_FLAGS(8u32); pub const NCRYPT_SILENT_FLAG: NCRYPT_FLAGS = NCRYPT_FLAGS(64u32); pub const NCRYPT_NO_PADDING_FLAG: NCRYPT_FLAGS = NCRYPT_FLAGS(1u32); pub const NCRYPT_PAD_OAEP_FLAG: NCRYPT_FLAGS = NCRYPT_FLAGS(4u32); pub const NCRYPT_PAD_PKCS1_FLAG: NCRYPT_FLAGS = NCRYPT_FLAGS(2u32); pub const NCRYPT_REGISTER_NOTIFY_FLAG: NCRYPT_FLAGS = NCRYPT_FLAGS(1u32); pub const NCRYPT_UNREGISTER_NOTIFY_FLAG: NCRYPT_FLAGS = NCRYPT_FLAGS(2u32); pub const NCRYPT_MACHINE_KEY_FLAG: NCRYPT_FLAGS = NCRYPT_FLAGS(32u32); pub const NCRYPT_UNPROTECT_NO_DECRYPT: NCRYPT_FLAGS = NCRYPT_FLAGS(1u32); pub const NCRYPT_OVERWRITE_KEY_FLAG: NCRYPT_FLAGS = NCRYPT_FLAGS(128u32); pub const NCRYPT_NO_KEY_VALIDATION: NCRYPT_FLAGS = NCRYPT_FLAGS(8u32); pub const NCRYPT_WRITE_KEY_TO_LEGACY_STORE_FLAG: NCRYPT_FLAGS = NCRYPT_FLAGS(512u32); pub const NCRYPT_PAD_PSS_FLAG: NCRYPT_FLAGS = NCRYPT_FLAGS(8u32); pub const NCRYPT_PERSIST_FLAG: NCRYPT_FLAGS = NCRYPT_FLAGS(2147483648u32); pub const NCRYPT_PERSIST_ONLY_FLAG: NCRYPT_FLAGS = NCRYPT_FLAGS(1073741824u32); impl ::core::convert::From<u32> for NCRYPT_FLAGS { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for NCRYPT_FLAGS { type Abi = Self; } impl ::core::ops::BitOr for NCRYPT_FLAGS { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for NCRYPT_FLAGS { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for NCRYPT_FLAGS { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for NCRYPT_FLAGS { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for NCRYPT_FLAGS { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const NCRYPT_IGNORE_DEVICE_STATE_FLAG: u32 = 4096u32; pub const NCRYPT_IMPL_HARDWARE_FLAG: u32 = 1u32; pub const NCRYPT_IMPL_HARDWARE_RNG_FLAG: u32 = 16u32; pub const NCRYPT_IMPL_REMOVABLE_FLAG: u32 = 8u32; pub const NCRYPT_IMPL_SOFTWARE_FLAG: u32 = 2u32; pub const NCRYPT_IMPL_VIRTUAL_ISOLATION_FLAG: u32 = 32u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_ISOLATED_KEY_ATTESTED_ATTRIBUTES { pub Version: u32, pub Flags: u32, pub cbPublicKeyBlob: u32, } impl NCRYPT_ISOLATED_KEY_ATTESTED_ATTRIBUTES {} impl ::core::default::Default for NCRYPT_ISOLATED_KEY_ATTESTED_ATTRIBUTES { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_ISOLATED_KEY_ATTESTED_ATTRIBUTES { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_ISOLATED_KEY_ATTESTED_ATTRIBUTES").field("Version", &self.Version).field("Flags", &self.Flags).field("cbPublicKeyBlob", &self.cbPublicKeyBlob).finish() } } impl ::core::cmp::PartialEq for NCRYPT_ISOLATED_KEY_ATTESTED_ATTRIBUTES { fn eq(&self, other: &Self) -> bool { self.Version == other.Version && self.Flags == other.Flags && self.cbPublicKeyBlob == other.cbPublicKeyBlob } } impl ::core::cmp::Eq for NCRYPT_ISOLATED_KEY_ATTESTED_ATTRIBUTES {} unsafe impl ::windows::core::Abi for NCRYPT_ISOLATED_KEY_ATTESTED_ATTRIBUTES { type Abi = Self; } pub const NCRYPT_ISOLATED_KEY_ATTESTED_ATTRIBUTES_CURRENT_VERSION: u32 = 0u32; pub const NCRYPT_ISOLATED_KEY_ATTESTED_ATTRIBUTES_V0: u32 = 0u32; pub const NCRYPT_ISOLATED_KEY_FLAG_CREATED_IN_ISOLATION: u32 = 1u32; pub const NCRYPT_ISOLATED_KEY_FLAG_IMPORT_ONLY: u32 = 2u32; pub const NCRYPT_KDF_KEY_BLOB_MAGIC: u32 = 826688587u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_KEY_ACCESS_POLICY_BLOB { pub dwVersion: u32, pub dwPolicyFlags: u32, pub cbUserSid: u32, pub cbApplicationSid: u32, } impl NCRYPT_KEY_ACCESS_POLICY_BLOB {} impl ::core::default::Default for NCRYPT_KEY_ACCESS_POLICY_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_KEY_ACCESS_POLICY_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_KEY_ACCESS_POLICY_BLOB").field("dwVersion", &self.dwVersion).field("dwPolicyFlags", &self.dwPolicyFlags).field("cbUserSid", &self.cbUserSid).field("cbApplicationSid", &self.cbApplicationSid).finish() } } impl ::core::cmp::PartialEq for NCRYPT_KEY_ACCESS_POLICY_BLOB { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.dwPolicyFlags == other.dwPolicyFlags && self.cbUserSid == other.cbUserSid && self.cbApplicationSid == other.cbApplicationSid } } impl ::core::cmp::Eq for NCRYPT_KEY_ACCESS_POLICY_BLOB {} unsafe impl ::windows::core::Abi for NCRYPT_KEY_ACCESS_POLICY_BLOB { type Abi = Self; } pub const NCRYPT_KEY_ACCESS_POLICY_VERSION: u32 = 1u32; pub const NCRYPT_KEY_ATTEST_MAGIC: u32 = 1146110283u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_KEY_ATTEST_PADDING_INFO { pub magic: u32, pub pbKeyBlob: *mut u8, pub cbKeyBlob: u32, pub pbKeyAuth: *mut u8, pub cbKeyAuth: u32, } impl NCRYPT_KEY_ATTEST_PADDING_INFO {} impl ::core::default::Default for NCRYPT_KEY_ATTEST_PADDING_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_KEY_ATTEST_PADDING_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_KEY_ATTEST_PADDING_INFO").field("magic", &self.magic).field("pbKeyBlob", &self.pbKeyBlob).field("cbKeyBlob", &self.cbKeyBlob).field("pbKeyAuth", &self.pbKeyAuth).field("cbKeyAuth", &self.cbKeyAuth).finish() } } impl ::core::cmp::PartialEq for NCRYPT_KEY_ATTEST_PADDING_INFO { fn eq(&self, other: &Self) -> bool { self.magic == other.magic && self.pbKeyBlob == other.pbKeyBlob && self.cbKeyBlob == other.cbKeyBlob && self.pbKeyAuth == other.pbKeyAuth && self.cbKeyAuth == other.cbKeyAuth } } impl ::core::cmp::Eq for NCRYPT_KEY_ATTEST_PADDING_INFO {} unsafe impl ::windows::core::Abi for NCRYPT_KEY_ATTEST_PADDING_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_KEY_BLOB_HEADER { pub cbSize: u32, pub dwMagic: u32, pub cbAlgName: u32, pub cbKeyData: u32, } impl NCRYPT_KEY_BLOB_HEADER {} impl ::core::default::Default for NCRYPT_KEY_BLOB_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_KEY_BLOB_HEADER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_KEY_BLOB_HEADER").field("cbSize", &self.cbSize).field("dwMagic", &self.dwMagic).field("cbAlgName", &self.cbAlgName).field("cbKeyData", &self.cbKeyData).finish() } } impl ::core::cmp::PartialEq for NCRYPT_KEY_BLOB_HEADER { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwMagic == other.dwMagic && self.cbAlgName == other.cbAlgName && self.cbKeyData == other.cbKeyData } } impl ::core::cmp::Eq for NCRYPT_KEY_BLOB_HEADER {} unsafe impl ::windows::core::Abi for NCRYPT_KEY_BLOB_HEADER { type Abi = Self; } pub const NCRYPT_KEY_DERIVATION_INTERFACE: u32 = 7u32; pub const NCRYPT_KEY_DERIVATION_OPERATION: u32 = 64u32; pub const NCRYPT_KEY_PROTECTION_INTERFACE: u32 = 65540u32; pub const NCRYPT_MAX_ALG_ID_LENGTH: u32 = 512u32; pub const NCRYPT_MAX_KEY_NAME_LENGTH: u32 = 512u32; pub const NCRYPT_MAX_PROPERTY_DATA: u32 = 1048576u32; pub const NCRYPT_MAX_PROPERTY_NAME: u32 = 64u32; pub const NCRYPT_NAMED_DESCRIPTOR_FLAG: u32 = 1u32; pub const NCRYPT_NO_CACHED_PASSWORD: u32 = 16384u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct NCRYPT_OPERATION(pub u32); pub const NCRYPT_CIPHER_OPERATION: NCRYPT_OPERATION = NCRYPT_OPERATION(1u32); pub const NCRYPT_HASH_OPERATION: NCRYPT_OPERATION = NCRYPT_OPERATION(2u32); pub const NCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION: NCRYPT_OPERATION = NCRYPT_OPERATION(4u32); pub const NCRYPT_SECRET_AGREEMENT_OPERATION: NCRYPT_OPERATION = NCRYPT_OPERATION(8u32); pub const NCRYPT_SIGNATURE_OPERATION: NCRYPT_OPERATION = NCRYPT_OPERATION(16u32); impl ::core::convert::From<u32> for NCRYPT_OPERATION { fn from(value: u32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for NCRYPT_OPERATION { type Abi = Self; } impl ::core::ops::BitOr for NCRYPT_OPERATION { type Output = Self; fn bitor(self, rhs: Self) -> Self { Self(self.0 | rhs.0) } } impl ::core::ops::BitAnd for NCRYPT_OPERATION { type Output = Self; fn bitand(self, rhs: Self) -> Self { Self(self.0 & rhs.0) } } impl ::core::ops::BitOrAssign for NCRYPT_OPERATION { fn bitor_assign(&mut self, rhs: Self) { self.0.bitor_assign(rhs.0) } } impl ::core::ops::BitAndAssign for NCRYPT_OPERATION { fn bitand_assign(&mut self, rhs: Self) { self.0.bitand_assign(rhs.0) } } impl ::core::ops::Not for NCRYPT_OPERATION { type Output = Self; fn not(self) -> Self { Self(self.0.not()) } } pub const NCRYPT_PAD_CIPHER_FLAG: u32 = 16u32; pub const NCRYPT_PCP_ENCRYPTION_KEY: u32 = 2u32; pub const NCRYPT_PCP_HMACVERIFICATION_KEY: u32 = 16u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_PCP_HMAC_AUTH_SIGNATURE_INFO { pub dwVersion: u32, pub iExpiration: i32, pub pabNonce: [u8; 32], pub pabPolicyRef: [u8; 32], pub pabHMAC: [u8; 32], } impl NCRYPT_PCP_HMAC_AUTH_SIGNATURE_INFO {} impl ::core::default::Default for NCRYPT_PCP_HMAC_AUTH_SIGNATURE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_PCP_HMAC_AUTH_SIGNATURE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_PCP_HMAC_AUTH_SIGNATURE_INFO").field("dwVersion", &self.dwVersion).field("iExpiration", &self.iExpiration).field("pabNonce", &self.pabNonce).field("pabPolicyRef", &self.pabPolicyRef).field("pabHMAC", &self.pabHMAC).finish() } } impl ::core::cmp::PartialEq for NCRYPT_PCP_HMAC_AUTH_SIGNATURE_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.iExpiration == other.iExpiration && self.pabNonce == other.pabNonce && self.pabPolicyRef == other.pabPolicyRef && self.pabHMAC == other.pabHMAC } } impl ::core::cmp::Eq for NCRYPT_PCP_HMAC_AUTH_SIGNATURE_INFO {} unsafe impl ::windows::core::Abi for NCRYPT_PCP_HMAC_AUTH_SIGNATURE_INFO { type Abi = Self; } pub const NCRYPT_PCP_IDENTITY_KEY: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_PCP_RAW_POLICYDIGEST { pub dwVersion: u32, pub cbDigest: u32, } impl NCRYPT_PCP_RAW_POLICYDIGEST {} impl ::core::default::Default for NCRYPT_PCP_RAW_POLICYDIGEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_PCP_RAW_POLICYDIGEST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_PCP_RAW_POLICYDIGEST").field("dwVersion", &self.dwVersion).field("cbDigest", &self.cbDigest).finish() } } impl ::core::cmp::PartialEq for NCRYPT_PCP_RAW_POLICYDIGEST { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.cbDigest == other.cbDigest } } impl ::core::cmp::Eq for NCRYPT_PCP_RAW_POLICYDIGEST {} unsafe impl ::windows::core::Abi for NCRYPT_PCP_RAW_POLICYDIGEST { type Abi = Self; } pub const NCRYPT_PCP_SIGNATURE_KEY: u32 = 1u32; pub const NCRYPT_PCP_STORAGE_KEY: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_PCP_TPM_FW_VERSION_INFO { pub major1: u16, pub major2: u16, pub minor1: u16, pub minor2: u16, } impl NCRYPT_PCP_TPM_FW_VERSION_INFO {} impl ::core::default::Default for NCRYPT_PCP_TPM_FW_VERSION_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_PCP_TPM_FW_VERSION_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_PCP_TPM_FW_VERSION_INFO").field("major1", &self.major1).field("major2", &self.major2).field("minor1", &self.minor1).field("minor2", &self.minor2).finish() } } impl ::core::cmp::PartialEq for NCRYPT_PCP_TPM_FW_VERSION_INFO { fn eq(&self, other: &Self) -> bool { self.major1 == other.major1 && self.major2 == other.major2 && self.minor1 == other.minor1 && self.minor2 == other.minor2 } } impl ::core::cmp::Eq for NCRYPT_PCP_TPM_FW_VERSION_INFO {} unsafe impl ::windows::core::Abi for NCRYPT_PCP_TPM_FW_VERSION_INFO { type Abi = Self; } pub const NCRYPT_PIN_CACHE_APPLICATION_TICKET_BYTE_LENGTH: u32 = 90u32; pub const NCRYPT_PIN_CACHE_CLEAR_FOR_CALLING_PROCESS_OPTION: u32 = 1u32; pub const NCRYPT_PIN_CACHE_DISABLE_DPL_FLAG: u32 = 1u32; pub const NCRYPT_PIN_CACHE_REQUIRE_GESTURE_FLAG: u32 = 1u32; pub const NCRYPT_PLATFORM_ATTEST_MAGIC: u32 = 1146110288u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_PLATFORM_ATTEST_PADDING_INFO { pub magic: u32, pub pcrMask: u32, } impl NCRYPT_PLATFORM_ATTEST_PADDING_INFO {} impl ::core::default::Default for NCRYPT_PLATFORM_ATTEST_PADDING_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_PLATFORM_ATTEST_PADDING_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_PLATFORM_ATTEST_PADDING_INFO").field("magic", &self.magic).field("pcrMask", &self.pcrMask).finish() } } impl ::core::cmp::PartialEq for NCRYPT_PLATFORM_ATTEST_PADDING_INFO { fn eq(&self, other: &Self) -> bool { self.magic == other.magic && self.pcrMask == other.pcrMask } } impl ::core::cmp::Eq for NCRYPT_PLATFORM_ATTEST_PADDING_INFO {} unsafe impl ::windows::core::Abi for NCRYPT_PLATFORM_ATTEST_PADDING_INFO { type Abi = Self; } pub const NCRYPT_PREFER_VIRTUAL_ISOLATION_FLAG: u32 = 65536u32; pub const NCRYPT_PROTECTED_KEY_BLOB_MAGIC: u32 = 1263817296u32; pub const NCRYPT_PROTECTION_INFO_TYPE_DESCRIPTOR_STRING: u32 = 1u32; #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct NCRYPT_PROTECT_STREAM_INFO { pub pfnStreamOutput: ::core::option::Option<PFNCryptStreamOutputCallback>, pub pvCallbackCtxt: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl NCRYPT_PROTECT_STREAM_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for NCRYPT_PROTECT_STREAM_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for NCRYPT_PROTECT_STREAM_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_PROTECT_STREAM_INFO").field("pvCallbackCtxt", &self.pvCallbackCtxt).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for NCRYPT_PROTECT_STREAM_INFO { fn eq(&self, other: &Self) -> bool { self.pfnStreamOutput.map(|f| f as usize) == other.pfnStreamOutput.map(|f| f as usize) && self.pvCallbackCtxt == other.pvCallbackCtxt } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for NCRYPT_PROTECT_STREAM_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for NCRYPT_PROTECT_STREAM_INFO { type Abi = ::core::mem::ManuallyDrop<Self>; } #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct NCRYPT_PROTECT_STREAM_INFO_EX { pub pfnStreamOutput: ::core::option::Option<PFNCryptStreamOutputCallbackEx>, pub pvCallbackCtxt: *mut ::core::ffi::c_void, } #[cfg(feature = "Win32_Foundation")] impl NCRYPT_PROTECT_STREAM_INFO_EX {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for NCRYPT_PROTECT_STREAM_INFO_EX { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for NCRYPT_PROTECT_STREAM_INFO_EX { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_PROTECT_STREAM_INFO_EX").field("pvCallbackCtxt", &self.pvCallbackCtxt).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for NCRYPT_PROTECT_STREAM_INFO_EX { fn eq(&self, other: &Self) -> bool { self.pfnStreamOutput.map(|f| f as usize) == other.pfnStreamOutput.map(|f| f as usize) && self.pvCallbackCtxt == other.pvCallbackCtxt } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for NCRYPT_PROTECT_STREAM_INFO_EX {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for NCRYPT_PROTECT_STREAM_INFO_EX { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const NCRYPT_PROTECT_TO_LOCAL_SYSTEM: u32 = 32768u32; pub const NCRYPT_SEALING_FLAG: u32 = 256u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_SUPPORTED_LENGTHS { pub dwMinLength: u32, pub dwMaxLength: u32, pub dwIncrement: u32, pub dwDefaultLength: u32, } impl NCRYPT_SUPPORTED_LENGTHS {} impl ::core::default::Default for NCRYPT_SUPPORTED_LENGTHS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_SUPPORTED_LENGTHS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_SUPPORTED_LENGTHS").field("dwMinLength", &self.dwMinLength).field("dwMaxLength", &self.dwMaxLength).field("dwIncrement", &self.dwIncrement).field("dwDefaultLength", &self.dwDefaultLength).finish() } } impl ::core::cmp::PartialEq for NCRYPT_SUPPORTED_LENGTHS { fn eq(&self, other: &Self) -> bool { self.dwMinLength == other.dwMinLength && self.dwMaxLength == other.dwMaxLength && self.dwIncrement == other.dwIncrement && self.dwDefaultLength == other.dwDefaultLength } } impl ::core::cmp::Eq for NCRYPT_SUPPORTED_LENGTHS {} unsafe impl ::windows::core::Abi for NCRYPT_SUPPORTED_LENGTHS { type Abi = Self; } pub const NCRYPT_TPM12_PROVIDER: u32 = 65536u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_TPM_LOADABLE_KEY_BLOB_HEADER { pub magic: u32, pub cbHeader: u32, pub cbPublic: u32, pub cbPrivate: u32, pub cbName: u32, } impl NCRYPT_TPM_LOADABLE_KEY_BLOB_HEADER {} impl ::core::default::Default for NCRYPT_TPM_LOADABLE_KEY_BLOB_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_TPM_LOADABLE_KEY_BLOB_HEADER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_TPM_LOADABLE_KEY_BLOB_HEADER").field("magic", &self.magic).field("cbHeader", &self.cbHeader).field("cbPublic", &self.cbPublic).field("cbPrivate", &self.cbPrivate).field("cbName", &self.cbName).finish() } } impl ::core::cmp::PartialEq for NCRYPT_TPM_LOADABLE_KEY_BLOB_HEADER { fn eq(&self, other: &Self) -> bool { self.magic == other.magic && self.cbHeader == other.cbHeader && self.cbPublic == other.cbPublic && self.cbPrivate == other.cbPrivate && self.cbName == other.cbName } } impl ::core::cmp::Eq for NCRYPT_TPM_LOADABLE_KEY_BLOB_HEADER {} unsafe impl ::windows::core::Abi for NCRYPT_TPM_LOADABLE_KEY_BLOB_HEADER { type Abi = Self; } pub const NCRYPT_TPM_LOADABLE_KEY_BLOB_MAGIC: u32 = 1297371211u32; pub const NCRYPT_TPM_PAD_PSS_IGNORE_SALT: u32 = 32u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_TPM_PLATFORM_ATTESTATION_STATEMENT { pub Magic: u32, pub Version: u32, pub pcrAlg: u32, pub cbSignature: u32, pub cbQuote: u32, pub cbPcrs: u32, } impl NCRYPT_TPM_PLATFORM_ATTESTATION_STATEMENT {} impl ::core::default::Default for NCRYPT_TPM_PLATFORM_ATTESTATION_STATEMENT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_TPM_PLATFORM_ATTESTATION_STATEMENT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_TPM_PLATFORM_ATTESTATION_STATEMENT").field("Magic", &self.Magic).field("Version", &self.Version).field("pcrAlg", &self.pcrAlg).field("cbSignature", &self.cbSignature).field("cbQuote", &self.cbQuote).field("cbPcrs", &self.cbPcrs).finish() } } impl ::core::cmp::PartialEq for NCRYPT_TPM_PLATFORM_ATTESTATION_STATEMENT { fn eq(&self, other: &Self) -> bool { self.Magic == other.Magic && self.Version == other.Version && self.pcrAlg == other.pcrAlg && self.cbSignature == other.cbSignature && self.cbQuote == other.cbQuote && self.cbPcrs == other.cbPcrs } } impl ::core::cmp::Eq for NCRYPT_TPM_PLATFORM_ATTESTATION_STATEMENT {} unsafe impl ::windows::core::Abi for NCRYPT_TPM_PLATFORM_ATTESTATION_STATEMENT { type Abi = Self; } pub const NCRYPT_TPM_PLATFORM_ATTESTATION_STATEMENT_CURRENT_VERSION: u32 = 0u32; pub const NCRYPT_TPM_PLATFORM_ATTESTATION_STATEMENT_V0: u32 = 0u32; pub const NCRYPT_TPM_PSS_SALT_SIZE_HASHSIZE: u32 = 2u32; pub const NCRYPT_TPM_PSS_SALT_SIZE_MAXIMUM: u32 = 1u32; pub const NCRYPT_TPM_PSS_SALT_SIZE_UNKNOWN: u32 = 0u32; pub const NCRYPT_TREAT_NIST_AS_GENERIC_ECC_FLAG: u32 = 8192u32; pub const NCRYPT_UI_APPCONTAINER_ACCESS_MEDIUM_FLAG: u32 = 8u32; pub const NCRYPT_UI_FINGERPRINT_PROTECTION_FLAG: u32 = 4u32; pub const NCRYPT_UI_FORCE_HIGH_PROTECTION_FLAG: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct NCRYPT_UI_POLICY { pub dwVersion: u32, pub dwFlags: u32, pub pszCreationTitle: super::super::Foundation::PWSTR, pub pszFriendlyName: super::super::Foundation::PWSTR, pub pszDescription: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl NCRYPT_UI_POLICY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for NCRYPT_UI_POLICY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for NCRYPT_UI_POLICY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_UI_POLICY").field("dwVersion", &self.dwVersion).field("dwFlags", &self.dwFlags).field("pszCreationTitle", &self.pszCreationTitle).field("pszFriendlyName", &self.pszFriendlyName).field("pszDescription", &self.pszDescription).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for NCRYPT_UI_POLICY { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.dwFlags == other.dwFlags && self.pszCreationTitle == other.pszCreationTitle && self.pszFriendlyName == other.pszFriendlyName && self.pszDescription == other.pszDescription } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for NCRYPT_UI_POLICY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for NCRYPT_UI_POLICY { type Abi = Self; } pub const NCRYPT_UI_PROTECT_KEY_FLAG: u32 = 1u32; pub const NCRYPT_USE_PER_BOOT_KEY_FLAG: u32 = 262144u32; pub const NCRYPT_USE_VIRTUAL_ISOLATION_FLAG: u32 = 131072u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_VSM_KEY_ATTESTATION_CLAIM_RESTRICTIONS { pub Version: u32, pub TrustletId: u64, pub MinSvn: u32, pub FlagsMask: u32, pub FlagsExpected: u32, pub _bitfield: u32, } impl NCRYPT_VSM_KEY_ATTESTATION_CLAIM_RESTRICTIONS {} impl ::core::default::Default for NCRYPT_VSM_KEY_ATTESTATION_CLAIM_RESTRICTIONS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_VSM_KEY_ATTESTATION_CLAIM_RESTRICTIONS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_VSM_KEY_ATTESTATION_CLAIM_RESTRICTIONS").field("Version", &self.Version).field("TrustletId", &self.TrustletId).field("MinSvn", &self.MinSvn).field("FlagsMask", &self.FlagsMask).field("FlagsExpected", &self.FlagsExpected).field("_bitfield", &self._bitfield).finish() } } impl ::core::cmp::PartialEq for NCRYPT_VSM_KEY_ATTESTATION_CLAIM_RESTRICTIONS { fn eq(&self, other: &Self) -> bool { self.Version == other.Version && self.TrustletId == other.TrustletId && self.MinSvn == other.MinSvn && self.FlagsMask == other.FlagsMask && self.FlagsExpected == other.FlagsExpected && self._bitfield == other._bitfield } } impl ::core::cmp::Eq for NCRYPT_VSM_KEY_ATTESTATION_CLAIM_RESTRICTIONS {} unsafe impl ::windows::core::Abi for NCRYPT_VSM_KEY_ATTESTATION_CLAIM_RESTRICTIONS { type Abi = Self; } pub const NCRYPT_VSM_KEY_ATTESTATION_CLAIM_RESTRICTIONS_CURRENT_VERSION: u32 = 0u32; pub const NCRYPT_VSM_KEY_ATTESTATION_CLAIM_RESTRICTIONS_V0: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct NCRYPT_VSM_KEY_ATTESTATION_STATEMENT { pub Magic: u32, pub Version: u32, pub cbSignature: u32, pub cbReport: u32, pub cbAttributes: u32, } impl NCRYPT_VSM_KEY_ATTESTATION_STATEMENT {} impl ::core::default::Default for NCRYPT_VSM_KEY_ATTESTATION_STATEMENT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for NCRYPT_VSM_KEY_ATTESTATION_STATEMENT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCRYPT_VSM_KEY_ATTESTATION_STATEMENT").field("Magic", &self.Magic).field("Version", &self.Version).field("cbSignature", &self.cbSignature).field("cbReport", &self.cbReport).field("cbAttributes", &self.cbAttributes).finish() } } impl ::core::cmp::PartialEq for NCRYPT_VSM_KEY_ATTESTATION_STATEMENT { fn eq(&self, other: &Self) -> bool { self.Magic == other.Magic && self.Version == other.Version && self.cbSignature == other.cbSignature && self.cbReport == other.cbReport && self.cbAttributes == other.cbAttributes } } impl ::core::cmp::Eq for NCRYPT_VSM_KEY_ATTESTATION_STATEMENT {} unsafe impl ::windows::core::Abi for NCRYPT_VSM_KEY_ATTESTATION_STATEMENT { type Abi = Self; } pub const NCRYPT_VSM_KEY_ATTESTATION_STATEMENT_CURRENT_VERSION: u32 = 0u32; pub const NCRYPT_VSM_KEY_ATTESTATION_STATEMENT_V0: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct NCryptAlgorithmName { pub pszName: super::super::Foundation::PWSTR, pub dwClass: NCRYPT_ALGORITHM_NAME_CLASS, pub dwAlgOperations: NCRYPT_OPERATION, pub dwFlags: u32, } #[cfg(feature = "Win32_Foundation")] impl NCryptAlgorithmName {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for NCryptAlgorithmName { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for NCryptAlgorithmName { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCryptAlgorithmName").field("pszName", &self.pszName).field("dwClass", &self.dwClass).field("dwAlgOperations", &self.dwAlgOperations).field("dwFlags", &self.dwFlags).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for NCryptAlgorithmName { fn eq(&self, other: &Self) -> bool { self.pszName == other.pszName && self.dwClass == other.dwClass && self.dwAlgOperations == other.dwAlgOperations && self.dwFlags == other.dwFlags } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for NCryptAlgorithmName {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for NCryptAlgorithmName { type Abi = Self; } #[inline] pub unsafe fn NCryptCloseProtectionDescriptor<'a, Param0: ::windows::core::IntoParam<'a, super::NCRYPT_DESCRIPTOR_HANDLE>>(hdescriptor: Param0) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptCloseProtectionDescriptor(hdescriptor: super::NCRYPT_DESCRIPTOR_HANDLE) -> i32; } ::core::mem::transmute(NCryptCloseProtectionDescriptor(hdescriptor.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptCreateClaim(hsubjectkey: usize, hauthoritykey: usize, dwclaimtype: u32, pparameterlist: *const BCryptBufferDesc, pbclaimblob: *mut u8, cbclaimblob: u32, pcbresult: *mut u32, dwflags: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptCreateClaim(hsubjectkey: usize, hauthoritykey: usize, dwclaimtype: u32, pparameterlist: *const BCryptBufferDesc, pbclaimblob: *mut u8, cbclaimblob: u32, pcbresult: *mut u32, dwflags: u32) -> i32; } ::core::mem::transmute(NCryptCreateClaim( ::core::mem::transmute(hsubjectkey), ::core::mem::transmute(hauthoritykey), ::core::mem::transmute(dwclaimtype), ::core::mem::transmute(pparameterlist), ::core::mem::transmute(pbclaimblob), ::core::mem::transmute(cbclaimblob), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptCreatePersistedKey<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hprovider: usize, phkey: *mut usize, pszalgid: Param2, pszkeyname: Param3, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptCreatePersistedKey(hprovider: usize, phkey: *mut usize, pszalgid: super::super::Foundation::PWSTR, pszkeyname: super::super::Foundation::PWSTR, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptCreatePersistedKey(::core::mem::transmute(hprovider), ::core::mem::transmute(phkey), pszalgid.into_param().abi(), pszkeyname.into_param().abi(), ::core::mem::transmute(dwlegacykeyspec), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptCreateProtectionDescriptor<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pwszdescriptorstring: Param0, dwflags: u32, phdescriptor: *mut super::NCRYPT_DESCRIPTOR_HANDLE) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptCreateProtectionDescriptor(pwszdescriptorstring: super::super::Foundation::PWSTR, dwflags: u32, phdescriptor: *mut super::NCRYPT_DESCRIPTOR_HANDLE) -> i32; } ::core::mem::transmute(NCryptCreateProtectionDescriptor(pwszdescriptorstring.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(phdescriptor))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptDecrypt(hkey: usize, pbinput: *const u8, cbinput: u32, ppaddinginfo: *const ::core::ffi::c_void, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptDecrypt(hkey: usize, pbinput: *const u8, cbinput: u32, ppaddinginfo: *const ::core::ffi::c_void, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptDecrypt(::core::mem::transmute(hkey), ::core::mem::transmute(pbinput), ::core::mem::transmute(cbinput), ::core::mem::transmute(ppaddinginfo), ::core::mem::transmute(pboutput), ::core::mem::transmute(cboutput), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptDeleteKey(hkey: usize, dwflags: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptDeleteKey(hkey: usize, dwflags: u32) -> i32; } ::core::mem::transmute(NCryptDeleteKey(::core::mem::transmute(hkey), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptDeriveKey<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hsharedsecret: usize, pwszkdf: Param1, pparameterlist: *const BCryptBufferDesc, pbderivedkey: *mut u8, cbderivedkey: u32, pcbresult: *mut u32, dwflags: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptDeriveKey(hsharedsecret: usize, pwszkdf: super::super::Foundation::PWSTR, pparameterlist: *const BCryptBufferDesc, pbderivedkey: *mut u8, cbderivedkey: u32, pcbresult: *mut u32, dwflags: u32) -> i32; } ::core::mem::transmute(NCryptDeriveKey(::core::mem::transmute(hsharedsecret), pwszkdf.into_param().abi(), ::core::mem::transmute(pparameterlist), ::core::mem::transmute(pbderivedkey), ::core::mem::transmute(cbderivedkey), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptEncrypt(hkey: usize, pbinput: *const u8, cbinput: u32, ppaddinginfo: *const ::core::ffi::c_void, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptEncrypt(hkey: usize, pbinput: *const u8, cbinput: u32, ppaddinginfo: *const ::core::ffi::c_void, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptEncrypt(::core::mem::transmute(hkey), ::core::mem::transmute(pbinput), ::core::mem::transmute(cbinput), ::core::mem::transmute(ppaddinginfo), ::core::mem::transmute(pboutput), ::core::mem::transmute(cboutput), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptEnumAlgorithms(hprovider: usize, dwalgoperations: NCRYPT_OPERATION, pdwalgcount: *mut u32, ppalglist: *mut *mut NCryptAlgorithmName, dwflags: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptEnumAlgorithms(hprovider: usize, dwalgoperations: NCRYPT_OPERATION, pdwalgcount: *mut u32, ppalglist: *mut *mut NCryptAlgorithmName, dwflags: u32) -> i32; } ::core::mem::transmute(NCryptEnumAlgorithms(::core::mem::transmute(hprovider), ::core::mem::transmute(dwalgoperations), ::core::mem::transmute(pdwalgcount), ::core::mem::transmute(ppalglist), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptEnumKeys<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hprovider: usize, pszscope: Param1, ppkeyname: *mut *mut NCryptKeyName, ppenumstate: *mut *mut ::core::ffi::c_void, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptEnumKeys(hprovider: usize, pszscope: super::super::Foundation::PWSTR, ppkeyname: *mut *mut NCryptKeyName, ppenumstate: *mut *mut ::core::ffi::c_void, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptEnumKeys(::core::mem::transmute(hprovider), pszscope.into_param().abi(), ::core::mem::transmute(ppkeyname), ::core::mem::transmute(ppenumstate), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptEnumStorageProviders(pdwprovidercount: *mut u32, ppproviderlist: *mut *mut NCryptProviderName, dwflags: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptEnumStorageProviders(pdwprovidercount: *mut u32, ppproviderlist: *mut *mut NCryptProviderName, dwflags: u32) -> i32; } ::core::mem::transmute(NCryptEnumStorageProviders(::core::mem::transmute(pdwprovidercount), ::core::mem::transmute(ppproviderlist), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptExportKey<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hkey: usize, hexportkey: usize, pszblobtype: Param2, pparameterlist: *const BCryptBufferDesc, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptExportKey(hkey: usize, hexportkey: usize, pszblobtype: super::super::Foundation::PWSTR, pparameterlist: *const BCryptBufferDesc, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptExportKey(::core::mem::transmute(hkey), ::core::mem::transmute(hexportkey), pszblobtype.into_param().abi(), ::core::mem::transmute(pparameterlist), ::core::mem::transmute(pboutput), ::core::mem::transmute(cboutput), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptFinalizeKey(hkey: usize, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptFinalizeKey(hkey: usize, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptFinalizeKey(::core::mem::transmute(hkey), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptFreeBuffer(pvinput: *mut ::core::ffi::c_void) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptFreeBuffer(pvinput: *mut ::core::ffi::c_void) -> i32; } ::core::mem::transmute(NCryptFreeBuffer(::core::mem::transmute(pvinput))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptFreeObject(hobject: usize) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptFreeObject(hobject: usize) -> i32; } ::core::mem::transmute(NCryptFreeObject(::core::mem::transmute(hobject))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptGetProperty<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hobject: usize, pszproperty: Param1, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: super::OBJECT_SECURITY_INFORMATION) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptGetProperty(hobject: usize, pszproperty: super::super::Foundation::PWSTR, pboutput: *mut u8, cboutput: u32, pcbresult: *mut u32, dwflags: super::OBJECT_SECURITY_INFORMATION) -> i32; } ::core::mem::transmute(NCryptGetProperty(::core::mem::transmute(hobject), pszproperty.into_param().abi(), ::core::mem::transmute(pboutput), ::core::mem::transmute(cboutput), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptGetProtectionDescriptorInfo<'a, Param0: ::windows::core::IntoParam<'a, super::NCRYPT_DESCRIPTOR_HANDLE>>(hdescriptor: Param0, pmempara: *const NCRYPT_ALLOC_PARA, dwinfotype: u32, ppvinfo: *mut *mut ::core::ffi::c_void) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptGetProtectionDescriptorInfo(hdescriptor: super::NCRYPT_DESCRIPTOR_HANDLE, pmempara: *const ::core::mem::ManuallyDrop<NCRYPT_ALLOC_PARA>, dwinfotype: u32, ppvinfo: *mut *mut ::core::ffi::c_void) -> i32; } ::core::mem::transmute(NCryptGetProtectionDescriptorInfo(hdescriptor.into_param().abi(), ::core::mem::transmute(pmempara), ::core::mem::transmute(dwinfotype), ::core::mem::transmute(ppvinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptImportKey<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hprovider: usize, himportkey: usize, pszblobtype: Param2, pparameterlist: *const BCryptBufferDesc, phkey: *mut usize, pbdata: *const u8, cbdata: u32, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptImportKey(hprovider: usize, himportkey: usize, pszblobtype: super::super::Foundation::PWSTR, pparameterlist: *const BCryptBufferDesc, phkey: *mut usize, pbdata: *const u8, cbdata: u32, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptImportKey(::core::mem::transmute(hprovider), ::core::mem::transmute(himportkey), pszblobtype.into_param().abi(), ::core::mem::transmute(pparameterlist), ::core::mem::transmute(phkey), ::core::mem::transmute(pbdata), ::core::mem::transmute(cbdata), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptIsAlgSupported<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hprovider: usize, pszalgid: Param1, dwflags: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptIsAlgSupported(hprovider: usize, pszalgid: super::super::Foundation::PWSTR, dwflags: u32) -> i32; } ::core::mem::transmute(NCryptIsAlgSupported(::core::mem::transmute(hprovider), pszalgid.into_param().abi(), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptIsKeyHandle(hkey: usize) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptIsKeyHandle(hkey: usize) -> super::super::Foundation::BOOL; } ::core::mem::transmute(NCryptIsKeyHandle(::core::mem::transmute(hkey))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptKeyDerivation(hkey: usize, pparameterlist: *const BCryptBufferDesc, pbderivedkey: *mut u8, cbderivedkey: u32, pcbresult: *mut u32, dwflags: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptKeyDerivation(hkey: usize, pparameterlist: *const BCryptBufferDesc, pbderivedkey: *mut u8, cbderivedkey: u32, pcbresult: *mut u32, dwflags: u32) -> i32; } ::core::mem::transmute(NCryptKeyDerivation(::core::mem::transmute(hkey), ::core::mem::transmute(pparameterlist), ::core::mem::transmute(pbderivedkey), ::core::mem::transmute(cbderivedkey), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct NCryptKeyName { pub pszName: super::super::Foundation::PWSTR, pub pszAlgid: super::super::Foundation::PWSTR, pub dwLegacyKeySpec: CERT_KEY_SPEC, pub dwFlags: u32, } #[cfg(feature = "Win32_Foundation")] impl NCryptKeyName {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for NCryptKeyName { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for NCryptKeyName { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCryptKeyName").field("pszName", &self.pszName).field("pszAlgid", &self.pszAlgid).field("dwLegacyKeySpec", &self.dwLegacyKeySpec).field("dwFlags", &self.dwFlags).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for NCryptKeyName { fn eq(&self, other: &Self) -> bool { self.pszName == other.pszName && self.pszAlgid == other.pszAlgid && self.dwLegacyKeySpec == other.dwLegacyKeySpec && self.dwFlags == other.dwFlags } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for NCryptKeyName {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for NCryptKeyName { type Abi = Self; } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptNotifyChangeKey(hprovider: usize, phevent: *mut super::super::Foundation::HANDLE, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptNotifyChangeKey(hprovider: usize, phevent: *mut super::super::Foundation::HANDLE, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptNotifyChangeKey(::core::mem::transmute(hprovider), ::core::mem::transmute(phevent), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptOpenKey<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hprovider: usize, phkey: *mut usize, pszkeyname: Param2, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptOpenKey(hprovider: usize, phkey: *mut usize, pszkeyname: super::super::Foundation::PWSTR, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptOpenKey(::core::mem::transmute(hprovider), ::core::mem::transmute(phkey), pszkeyname.into_param().abi(), ::core::mem::transmute(dwlegacykeyspec), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptOpenStorageProvider<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(phprovider: *mut usize, pszprovidername: Param1, dwflags: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptOpenStorageProvider(phprovider: *mut usize, pszprovidername: super::super::Foundation::PWSTR, dwflags: u32) -> i32; } ::core::mem::transmute(NCryptOpenStorageProvider(::core::mem::transmute(phprovider), pszprovidername.into_param().abi(), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptProtectSecret<'a, Param0: ::windows::core::IntoParam<'a, super::NCRYPT_DESCRIPTOR_HANDLE>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hdescriptor: Param0, dwflags: u32, pbdata: *const u8, cbdata: u32, pmempara: *const NCRYPT_ALLOC_PARA, hwnd: Param5, ppbprotectedblob: *mut *mut u8, pcbprotectedblob: *mut u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptProtectSecret(hdescriptor: super::NCRYPT_DESCRIPTOR_HANDLE, dwflags: u32, pbdata: *const u8, cbdata: u32, pmempara: *const ::core::mem::ManuallyDrop<NCRYPT_ALLOC_PARA>, hwnd: super::super::Foundation::HWND, ppbprotectedblob: *mut *mut u8, pcbprotectedblob: *mut u32) -> i32; } ::core::mem::transmute(NCryptProtectSecret(hdescriptor.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbdata), ::core::mem::transmute(cbdata), ::core::mem::transmute(pmempara), hwnd.into_param().abi(), ::core::mem::transmute(ppbprotectedblob), ::core::mem::transmute(pcbprotectedblob))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct NCryptProviderName { pub pszName: super::super::Foundation::PWSTR, pub pszComment: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl NCryptProviderName {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for NCryptProviderName { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for NCryptProviderName { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NCryptProviderName").field("pszName", &self.pszName).field("pszComment", &self.pszComment).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for NCryptProviderName { fn eq(&self, other: &Self) -> bool { self.pszName == other.pszName && self.pszComment == other.pszComment } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for NCryptProviderName {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for NCryptProviderName { type Abi = Self; } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptQueryProtectionDescriptorName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pwszname: Param0, pwszdescriptorstring: super::super::Foundation::PWSTR, pcdescriptorstring: *mut usize, dwflags: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptQueryProtectionDescriptorName(pwszname: super::super::Foundation::PWSTR, pwszdescriptorstring: super::super::Foundation::PWSTR, pcdescriptorstring: *mut usize, dwflags: u32) -> i32; } ::core::mem::transmute(NCryptQueryProtectionDescriptorName(pwszname.into_param().abi(), ::core::mem::transmute(pwszdescriptorstring), ::core::mem::transmute(pcdescriptorstring), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptRegisterProtectionDescriptorName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(pwszname: Param0, pwszdescriptorstring: Param1, dwflags: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptRegisterProtectionDescriptorName(pwszname: super::super::Foundation::PWSTR, pwszdescriptorstring: super::super::Foundation::PWSTR, dwflags: u32) -> i32; } ::core::mem::transmute(NCryptRegisterProtectionDescriptorName(pwszname.into_param().abi(), pwszdescriptorstring.into_param().abi(), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptSecretAgreement(hprivkey: usize, hpubkey: usize, phagreedsecret: *mut usize, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptSecretAgreement(hprivkey: usize, hpubkey: usize, phagreedsecret: *mut usize, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptSecretAgreement(::core::mem::transmute(hprivkey), ::core::mem::transmute(hpubkey), ::core::mem::transmute(phagreedsecret), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptSetProperty<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hobject: usize, pszproperty: Param1, pbinput: *const u8, cbinput: u32, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptSetProperty(hobject: usize, pszproperty: super::super::Foundation::PWSTR, pbinput: *const u8, cbinput: u32, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptSetProperty(::core::mem::transmute(hobject), pszproperty.into_param().abi(), ::core::mem::transmute(pbinput), ::core::mem::transmute(cbinput), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptSignHash(hkey: usize, ppaddinginfo: *const ::core::ffi::c_void, pbhashvalue: *const u8, cbhashvalue: u32, pbsignature: *mut u8, cbsignature: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptSignHash(hkey: usize, ppaddinginfo: *const ::core::ffi::c_void, pbhashvalue: *const u8, cbhashvalue: u32, pbsignature: *mut u8, cbsignature: u32, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptSignHash(::core::mem::transmute(hkey), ::core::mem::transmute(ppaddinginfo), ::core::mem::transmute(pbhashvalue), ::core::mem::transmute(cbhashvalue), ::core::mem::transmute(pbsignature), ::core::mem::transmute(cbsignature), ::core::mem::transmute(pcbresult), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptStreamClose<'a, Param0: ::windows::core::IntoParam<'a, super::NCRYPT_STREAM_HANDLE>>(hstream: Param0) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptStreamClose(hstream: super::NCRYPT_STREAM_HANDLE) -> i32; } ::core::mem::transmute(NCryptStreamClose(hstream.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptStreamOpenToProtect<'a, Param0: ::windows::core::IntoParam<'a, super::NCRYPT_DESCRIPTOR_HANDLE>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hdescriptor: Param0, dwflags: u32, hwnd: Param2, pstreaminfo: *const NCRYPT_PROTECT_STREAM_INFO, phstream: *mut super::NCRYPT_STREAM_HANDLE) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptStreamOpenToProtect(hdescriptor: super::NCRYPT_DESCRIPTOR_HANDLE, dwflags: u32, hwnd: super::super::Foundation::HWND, pstreaminfo: *const ::core::mem::ManuallyDrop<NCRYPT_PROTECT_STREAM_INFO>, phstream: *mut super::NCRYPT_STREAM_HANDLE) -> i32; } ::core::mem::transmute(NCryptStreamOpenToProtect(hdescriptor.into_param().abi(), ::core::mem::transmute(dwflags), hwnd.into_param().abi(), ::core::mem::transmute(pstreaminfo), ::core::mem::transmute(phstream))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptStreamOpenToUnprotect<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(pstreaminfo: *const NCRYPT_PROTECT_STREAM_INFO, dwflags: u32, hwnd: Param2, phstream: *mut super::NCRYPT_STREAM_HANDLE) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptStreamOpenToUnprotect(pstreaminfo: *const ::core::mem::ManuallyDrop<NCRYPT_PROTECT_STREAM_INFO>, dwflags: u32, hwnd: super::super::Foundation::HWND, phstream: *mut super::NCRYPT_STREAM_HANDLE) -> i32; } ::core::mem::transmute(NCryptStreamOpenToUnprotect(::core::mem::transmute(pstreaminfo), ::core::mem::transmute(dwflags), hwnd.into_param().abi(), ::core::mem::transmute(phstream))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptStreamOpenToUnprotectEx<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(pstreaminfo: *const NCRYPT_PROTECT_STREAM_INFO_EX, dwflags: u32, hwnd: Param2, phstream: *mut super::NCRYPT_STREAM_HANDLE) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptStreamOpenToUnprotectEx(pstreaminfo: *const ::core::mem::ManuallyDrop<NCRYPT_PROTECT_STREAM_INFO_EX>, dwflags: u32, hwnd: super::super::Foundation::HWND, phstream: *mut super::NCRYPT_STREAM_HANDLE) -> i32; } ::core::mem::transmute(NCryptStreamOpenToUnprotectEx(::core::mem::transmute(pstreaminfo), ::core::mem::transmute(dwflags), hwnd.into_param().abi(), ::core::mem::transmute(phstream))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptStreamUpdate<'a, Param0: ::windows::core::IntoParam<'a, super::NCRYPT_STREAM_HANDLE>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(hstream: Param0, pbdata: *const u8, cbdata: usize, ffinal: Param3) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptStreamUpdate(hstream: super::NCRYPT_STREAM_HANDLE, pbdata: *const u8, cbdata: usize, ffinal: super::super::Foundation::BOOL) -> i32; } ::core::mem::transmute(NCryptStreamUpdate(hstream.into_param().abi(), ::core::mem::transmute(pbdata), ::core::mem::transmute(cbdata), ffinal.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptTranslateHandle(phprovider: *mut usize, phkey: *mut usize, hlegacyprov: usize, hlegacykey: usize, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptTranslateHandle(phprovider: *mut usize, phkey: *mut usize, hlegacyprov: usize, hlegacykey: usize, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: u32) -> i32; } ::core::mem::transmute(NCryptTranslateHandle(::core::mem::transmute(phprovider), ::core::mem::transmute(phkey), ::core::mem::transmute(hlegacyprov), ::core::mem::transmute(hlegacykey), ::core::mem::transmute(dwlegacykeyspec), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn NCryptUnprotectSecret<'a, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(phdescriptor: *mut super::NCRYPT_DESCRIPTOR_HANDLE, dwflags: NCRYPT_FLAGS, pbprotectedblob: *const u8, cbprotectedblob: u32, pmempara: *const NCRYPT_ALLOC_PARA, hwnd: Param5, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptUnprotectSecret(phdescriptor: *mut super::NCRYPT_DESCRIPTOR_HANDLE, dwflags: NCRYPT_FLAGS, pbprotectedblob: *const u8, cbprotectedblob: u32, pmempara: *const ::core::mem::ManuallyDrop<NCRYPT_ALLOC_PARA>, hwnd: super::super::Foundation::HWND, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> i32; } ::core::mem::transmute(NCryptUnprotectSecret(::core::mem::transmute(phdescriptor), ::core::mem::transmute(dwflags), ::core::mem::transmute(pbprotectedblob), ::core::mem::transmute(cbprotectedblob), ::core::mem::transmute(pmempara), hwnd.into_param().abi(), ::core::mem::transmute(ppbdata), ::core::mem::transmute(pcbdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptVerifyClaim(hsubjectkey: usize, hauthoritykey: usize, dwclaimtype: u32, pparameterlist: *const BCryptBufferDesc, pbclaimblob: *const u8, cbclaimblob: u32, poutput: *mut BCryptBufferDesc, dwflags: u32) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptVerifyClaim(hsubjectkey: usize, hauthoritykey: usize, dwclaimtype: u32, pparameterlist: *const BCryptBufferDesc, pbclaimblob: *const u8, cbclaimblob: u32, poutput: *mut BCryptBufferDesc, dwflags: u32) -> i32; } ::core::mem::transmute(NCryptVerifyClaim( ::core::mem::transmute(hsubjectkey), ::core::mem::transmute(hauthoritykey), ::core::mem::transmute(dwclaimtype), ::core::mem::transmute(pparameterlist), ::core::mem::transmute(pbclaimblob), ::core::mem::transmute(cbclaimblob), ::core::mem::transmute(poutput), ::core::mem::transmute(dwflags), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn NCryptVerifySignature(hkey: usize, ppaddinginfo: *const ::core::ffi::c_void, pbhashvalue: *const u8, cbhashvalue: u32, pbsignature: *const u8, cbsignature: u32, dwflags: NCRYPT_FLAGS) -> i32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn NCryptVerifySignature(hkey: usize, ppaddinginfo: *const ::core::ffi::c_void, pbhashvalue: *const u8, cbhashvalue: u32, pbsignature: *const u8, cbsignature: u32, dwflags: NCRYPT_FLAGS) -> i32; } ::core::mem::transmute(NCryptVerifySignature(::core::mem::transmute(hkey), ::core::mem::transmute(ppaddinginfo), ::core::mem::transmute(pbhashvalue), ::core::mem::transmute(cbhashvalue), ::core::mem::transmute(pbsignature), ::core::mem::transmute(cbsignature), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const NETSCAPE_SIGN_CA_CERT_TYPE: u32 = 1u32; pub const NETSCAPE_SIGN_CERT_TYPE: u32 = 16u32; pub const NETSCAPE_SMIME_CA_CERT_TYPE: u32 = 2u32; pub const NETSCAPE_SMIME_CERT_TYPE: u32 = 32u32; pub const NETSCAPE_SSL_CA_CERT_TYPE: u32 = 4u32; pub const NETSCAPE_SSL_CLIENT_AUTH_CERT_TYPE: u32 = 128u32; pub const NETSCAPE_SSL_SERVER_AUTH_CERT_TYPE: u32 = 64u32; pub const OCSP_BASIC_BY_KEY_RESPONDER_ID: u32 = 2u32; pub const OCSP_BASIC_BY_NAME_RESPONDER_ID: u32 = 1u32; pub const OCSP_BASIC_GOOD_CERT_STATUS: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct OCSP_BASIC_RESPONSE_ENTRY { pub CertId: OCSP_CERT_ID, pub dwCertStatus: u32, pub Anonymous: OCSP_BASIC_RESPONSE_ENTRY_0, pub ThisUpdate: super::super::Foundation::FILETIME, pub NextUpdate: super::super::Foundation::FILETIME, pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl OCSP_BASIC_RESPONSE_ENTRY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for OCSP_BASIC_RESPONSE_ENTRY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for OCSP_BASIC_RESPONSE_ENTRY { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for OCSP_BASIC_RESPONSE_ENTRY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for OCSP_BASIC_RESPONSE_ENTRY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union OCSP_BASIC_RESPONSE_ENTRY_0 { pub pRevokedInfo: *mut OCSP_BASIC_REVOKED_INFO, } #[cfg(feature = "Win32_Foundation")] impl OCSP_BASIC_RESPONSE_ENTRY_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for OCSP_BASIC_RESPONSE_ENTRY_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for OCSP_BASIC_RESPONSE_ENTRY_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for OCSP_BASIC_RESPONSE_ENTRY_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for OCSP_BASIC_RESPONSE_ENTRY_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct OCSP_BASIC_RESPONSE_INFO { pub dwVersion: u32, pub dwResponderIdChoice: u32, pub Anonymous: OCSP_BASIC_RESPONSE_INFO_0, pub ProducedAt: super::super::Foundation::FILETIME, pub cResponseEntry: u32, pub rgResponseEntry: *mut OCSP_BASIC_RESPONSE_ENTRY, pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl OCSP_BASIC_RESPONSE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for OCSP_BASIC_RESPONSE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for OCSP_BASIC_RESPONSE_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for OCSP_BASIC_RESPONSE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for OCSP_BASIC_RESPONSE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union OCSP_BASIC_RESPONSE_INFO_0 { pub ByNameResponderId: CRYPTOAPI_BLOB, pub ByKeyResponderId: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl OCSP_BASIC_RESPONSE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for OCSP_BASIC_RESPONSE_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for OCSP_BASIC_RESPONSE_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for OCSP_BASIC_RESPONSE_INFO_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for OCSP_BASIC_RESPONSE_INFO_0 { type Abi = Self; } pub const OCSP_BASIC_RESPONSE_V1: u32 = 0u32; pub const OCSP_BASIC_REVOKED_CERT_STATUS: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct OCSP_BASIC_REVOKED_INFO { pub RevocationDate: super::super::Foundation::FILETIME, pub dwCrlReasonCode: CERT_REVOCATION_STATUS_REASON, } #[cfg(feature = "Win32_Foundation")] impl OCSP_BASIC_REVOKED_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for OCSP_BASIC_REVOKED_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for OCSP_BASIC_REVOKED_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("OCSP_BASIC_REVOKED_INFO").field("RevocationDate", &self.RevocationDate).field("dwCrlReasonCode", &self.dwCrlReasonCode).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for OCSP_BASIC_REVOKED_INFO { fn eq(&self, other: &Self) -> bool { self.RevocationDate == other.RevocationDate && self.dwCrlReasonCode == other.dwCrlReasonCode } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for OCSP_BASIC_REVOKED_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for OCSP_BASIC_REVOKED_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct OCSP_BASIC_SIGNED_RESPONSE_INFO { pub ToBeSigned: CRYPTOAPI_BLOB, pub SignatureInfo: OCSP_SIGNATURE_INFO, } #[cfg(feature = "Win32_Foundation")] impl OCSP_BASIC_SIGNED_RESPONSE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for OCSP_BASIC_SIGNED_RESPONSE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for OCSP_BASIC_SIGNED_RESPONSE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("OCSP_BASIC_SIGNED_RESPONSE_INFO").field("ToBeSigned", &self.ToBeSigned).field("SignatureInfo", &self.SignatureInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for OCSP_BASIC_SIGNED_RESPONSE_INFO { fn eq(&self, other: &Self) -> bool { self.ToBeSigned == other.ToBeSigned && self.SignatureInfo == other.SignatureInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for OCSP_BASIC_SIGNED_RESPONSE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for OCSP_BASIC_SIGNED_RESPONSE_INFO { type Abi = Self; } pub const OCSP_BASIC_UNKNOWN_CERT_STATUS: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct OCSP_CERT_ID { pub HashAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub IssuerNameHash: CRYPTOAPI_BLOB, pub IssuerKeyHash: CRYPTOAPI_BLOB, pub SerialNumber: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl OCSP_CERT_ID {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for OCSP_CERT_ID { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for OCSP_CERT_ID { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("OCSP_CERT_ID").field("HashAlgorithm", &self.HashAlgorithm).field("IssuerNameHash", &self.IssuerNameHash).field("IssuerKeyHash", &self.IssuerKeyHash).field("SerialNumber", &self.SerialNumber).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for OCSP_CERT_ID { fn eq(&self, other: &Self) -> bool { self.HashAlgorithm == other.HashAlgorithm && self.IssuerNameHash == other.IssuerNameHash && self.IssuerKeyHash == other.IssuerKeyHash && self.SerialNumber == other.SerialNumber } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for OCSP_CERT_ID {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for OCSP_CERT_ID { type Abi = Self; } pub const OCSP_INTERNAL_ERROR_RESPONSE: u32 = 2u32; pub const OCSP_MALFORMED_REQUEST_RESPONSE: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct OCSP_REQUEST_ENTRY { pub CertId: OCSP_CERT_ID, pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl OCSP_REQUEST_ENTRY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for OCSP_REQUEST_ENTRY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for OCSP_REQUEST_ENTRY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("OCSP_REQUEST_ENTRY").field("CertId", &self.CertId).field("cExtension", &self.cExtension).field("rgExtension", &self.rgExtension).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for OCSP_REQUEST_ENTRY { fn eq(&self, other: &Self) -> bool { self.CertId == other.CertId && self.cExtension == other.cExtension && self.rgExtension == other.rgExtension } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for OCSP_REQUEST_ENTRY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for OCSP_REQUEST_ENTRY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct OCSP_REQUEST_INFO { pub dwVersion: u32, pub pRequestorName: *mut CERT_ALT_NAME_ENTRY, pub cRequestEntry: u32, pub rgRequestEntry: *mut OCSP_REQUEST_ENTRY, pub cExtension: u32, pub rgExtension: *mut CERT_EXTENSION, } #[cfg(feature = "Win32_Foundation")] impl OCSP_REQUEST_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for OCSP_REQUEST_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for OCSP_REQUEST_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("OCSP_REQUEST_INFO").field("dwVersion", &self.dwVersion).field("pRequestorName", &self.pRequestorName).field("cRequestEntry", &self.cRequestEntry).field("rgRequestEntry", &self.rgRequestEntry).field("cExtension", &self.cExtension).field("rgExtension", &self.rgExtension).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for OCSP_REQUEST_INFO { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.pRequestorName == other.pRequestorName && self.cRequestEntry == other.cRequestEntry && self.rgRequestEntry == other.rgRequestEntry && self.cExtension == other.cExtension && self.rgExtension == other.rgExtension } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for OCSP_REQUEST_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for OCSP_REQUEST_INFO { type Abi = Self; } pub const OCSP_REQUEST_V1: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct OCSP_RESPONSE_INFO { pub dwStatus: u32, pub pszObjId: super::super::Foundation::PSTR, pub Value: CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl OCSP_RESPONSE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for OCSP_RESPONSE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for OCSP_RESPONSE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("OCSP_RESPONSE_INFO").field("dwStatus", &self.dwStatus).field("pszObjId", &self.pszObjId).field("Value", &self.Value).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for OCSP_RESPONSE_INFO { fn eq(&self, other: &Self) -> bool { self.dwStatus == other.dwStatus && self.pszObjId == other.pszObjId && self.Value == other.Value } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for OCSP_RESPONSE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for OCSP_RESPONSE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct OCSP_SIGNATURE_INFO { pub SignatureAlgorithm: CRYPT_ALGORITHM_IDENTIFIER, pub Signature: CRYPT_BIT_BLOB, pub cCertEncoded: u32, pub rgCertEncoded: *mut CRYPTOAPI_BLOB, } #[cfg(feature = "Win32_Foundation")] impl OCSP_SIGNATURE_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for OCSP_SIGNATURE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for OCSP_SIGNATURE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("OCSP_SIGNATURE_INFO").field("SignatureAlgorithm", &self.SignatureAlgorithm).field("Signature", &self.Signature).field("cCertEncoded", &self.cCertEncoded).field("rgCertEncoded", &self.rgCertEncoded).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for OCSP_SIGNATURE_INFO { fn eq(&self, other: &Self) -> bool { self.SignatureAlgorithm == other.SignatureAlgorithm && self.Signature == other.Signature && self.cCertEncoded == other.cCertEncoded && self.rgCertEncoded == other.rgCertEncoded } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for OCSP_SIGNATURE_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for OCSP_SIGNATURE_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct OCSP_SIGNED_REQUEST_INFO { pub ToBeSigned: CRYPTOAPI_BLOB, pub pOptionalSignatureInfo: *mut OCSP_SIGNATURE_INFO, } #[cfg(feature = "Win32_Foundation")] impl OCSP_SIGNED_REQUEST_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for OCSP_SIGNED_REQUEST_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for OCSP_SIGNED_REQUEST_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("OCSP_SIGNED_REQUEST_INFO").field("ToBeSigned", &self.ToBeSigned).field("pOptionalSignatureInfo", &self.pOptionalSignatureInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for OCSP_SIGNED_REQUEST_INFO { fn eq(&self, other: &Self) -> bool { self.ToBeSigned == other.ToBeSigned && self.pOptionalSignatureInfo == other.pOptionalSignatureInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for OCSP_SIGNED_REQUEST_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for OCSP_SIGNED_REQUEST_INFO { type Abi = Self; } pub const OCSP_SIG_REQUIRED_RESPONSE: u32 = 5u32; pub const OCSP_SUCCESSFUL_RESPONSE: u32 = 0u32; pub const OCSP_TRY_LATER_RESPONSE: u32 = 3u32; pub const OCSP_UNAUTHORIZED_RESPONSE: u32 = 6u32; pub const OPAQUEKEYBLOB: u32 = 9u32; #[cfg(feature = "Win32_Foundation")] pub type PCRYPT_DECRYPT_PRIVATE_KEY_FUNC = unsafe extern "system" fn(algorithm: CRYPT_ALGORITHM_IDENTIFIER, encryptedprivatekey: CRYPTOAPI_BLOB, pbcleartextkey: *mut u8, pcbcleartextkey: *mut u32, pvoiddecryptfunc: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PCRYPT_ENCRYPT_PRIVATE_KEY_FUNC = unsafe extern "system" fn(palgorithm: *mut CRYPT_ALGORITHM_IDENTIFIER, pcleartextprivatekey: *const CRYPTOAPI_BLOB, pbencryptedkey: *mut u8, pcbencryptedkey: *mut u32, pvoidencryptfunc: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PCRYPT_RESOLVE_HCRYPTPROV_FUNC = unsafe extern "system" fn(pprivatekeyinfo: *mut CRYPT_PRIVATE_KEY_INFO, phcryptprov: *mut usize, pvoidresolvefunc: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFNCryptStreamOutputCallback = unsafe extern "system" fn(pvcallbackctxt: *const ::core::ffi::c_void, pbdata: *const u8, cbdata: usize, ffinal: super::super::Foundation::BOOL) -> i32; #[cfg(feature = "Win32_Foundation")] pub type PFNCryptStreamOutputCallbackEx = unsafe extern "system" fn(pvcallbackctxt: *const ::core::ffi::c_void, pbdata: *const u8, cbdata: usize, hdescriptor: super::NCRYPT_DESCRIPTOR_HANDLE, ffinal: super::super::Foundation::BOOL) -> i32; #[cfg(feature = "Win32_Foundation")] pub type PFN_CANCEL_ASYNC_RETRIEVAL_FUNC = unsafe extern "system" fn(hasyncretrieve: HCRYPTASYNC) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_CHAIN_FIND_BY_ISSUER_CALLBACK = unsafe extern "system" fn(pcert: *const CERT_CONTEXT, pvfindarg: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_CREATE_CONTEXT_SORT_FUNC = unsafe extern "system" fn(cbtotalencoded: u32, cbremainencoded: u32, centry: u32, pvsort: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_DLL_OPEN_STORE_PROV_FUNC = unsafe extern "system" fn(lpszstoreprovider: super::super::Foundation::PSTR, dwencodingtype: CERT_QUERY_ENCODING_TYPE, hcryptprov: usize, dwflags: CERT_OPEN_STORE_FLAGS, pvpara: *const ::core::ffi::c_void, hcertstore: *const ::core::ffi::c_void, pstoreprovinfo: *mut CERT_STORE_PROV_INFO) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_ENUM_PHYSICAL_STORE = unsafe extern "system" fn(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32, pwszstorename: super::super::Foundation::PWSTR, pstoreinfo: *const CERT_PHYSICAL_STORE_INFO, pvreserved: *mut ::core::ffi::c_void, pvarg: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_ENUM_SYSTEM_STORE = unsafe extern "system" fn(pvsystemstore: *const ::core::ffi::c_void, dwflags: CERT_SYSTEM_STORE_FLAGS, pstoreinfo: *const CERT_SYSTEM_STORE_INFO, pvreserved: *mut ::core::ffi::c_void, pvarg: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_ENUM_SYSTEM_STORE_LOCATION = unsafe extern "system" fn(pwszstorelocation: super::super::Foundation::PWSTR, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, pvarg: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_IS_WEAK_HASH = unsafe extern "system" fn(dwhashusetype: u32, pwszcnghashalgid: super::super::Foundation::PWSTR, dwchainflags: u32, psignerchaincontext: *const CERT_CHAIN_CONTEXT, ptimestamp: *const super::super::Foundation::FILETIME, pwszfilename: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_SERVER_OCSP_RESPONSE_UPDATE_CALLBACK = unsafe extern "system" fn(pchaincontext: *const CERT_CHAIN_CONTEXT, pserverocspresponsecontext: *const CERT_SERVER_OCSP_RESPONSE_CONTEXT, pnewcrlcontext: *const CRL_CONTEXT, pprevcrlcontext: *const CRL_CONTEXT, pvarg: *mut ::core::ffi::c_void, dwwriteocspfileerror: u32); pub type PFN_CERT_STORE_PROV_CLOSE = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, dwflags: u32); #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_CONTROL = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, dwflags: u32, dwctrltype: u32, pvctrlpara: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_DELETE_CERT = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pcertcontext: *const CERT_CONTEXT, dwflags: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_DELETE_CRL = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pcrlcontext: *const CRL_CONTEXT, dwflags: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_DELETE_CTL = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pctlcontext: *const CTL_CONTEXT, dwflags: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_FIND_CERT = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pfindinfo: *const CERT_STORE_PROV_FIND_INFO, pprevcertcontext: *const CERT_CONTEXT, dwflags: u32, ppvstoreprovfindinfo: *mut *mut ::core::ffi::c_void, ppprovcertcontext: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_FIND_CRL = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pfindinfo: *const CERT_STORE_PROV_FIND_INFO, pprevcrlcontext: *const CRL_CONTEXT, dwflags: u32, ppvstoreprovfindinfo: *mut *mut ::core::ffi::c_void, ppprovcrlcontext: *mut *mut CRL_CONTEXT) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_FIND_CTL = unsafe extern "system" fn(hstoreprov: *const ::core::ffi::c_void, pfindinfo: *const CERT_STORE_PROV_FIND_INFO, pprevctlcontext: *const CTL_CONTEXT, dwflags: u32, ppvstoreprovfindinfo: *mut *mut ::core::ffi::c_void, ppprovctlcontext: *mut *mut CTL_CONTEXT) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_FREE_FIND_CERT = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pcertcontext: *const CERT_CONTEXT, pvstoreprovfindinfo: *const ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_FREE_FIND_CRL = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pcrlcontext: *const CRL_CONTEXT, pvstoreprovfindinfo: *const ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_FREE_FIND_CTL = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pctlcontext: *const CTL_CONTEXT, pvstoreprovfindinfo: *const ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_GET_CERT_PROPERTY = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pcertcontext: *const CERT_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_GET_CRL_PROPERTY = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pcrlcontext: *const CRL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_GET_CTL_PROPERTY = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pctlcontext: *const CTL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: *mut ::core::ffi::c_void, pcbdata: *mut u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_READ_CERT = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pstorecertcontext: *const CERT_CONTEXT, dwflags: u32, ppprovcertcontext: *mut *mut CERT_CONTEXT) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_READ_CRL = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pstorecrlcontext: *const CRL_CONTEXT, dwflags: u32, ppprovcrlcontext: *mut *mut CRL_CONTEXT) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_READ_CTL = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pstorectlcontext: *const CTL_CONTEXT, dwflags: u32, ppprovctlcontext: *mut *mut CTL_CONTEXT) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_SET_CERT_PROPERTY = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pcertcontext: *const CERT_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_SET_CRL_PROPERTY = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pcrlcontext: *const CRL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_SET_CTL_PROPERTY = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pctlcontext: *const CTL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_WRITE_CERT = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pcertcontext: *const CERT_CONTEXT, dwflags: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_WRITE_CRL = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pcrlcontext: *const CRL_CONTEXT, dwflags: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CERT_STORE_PROV_WRITE_CTL = unsafe extern "system" fn(hstoreprov: *mut ::core::ffi::c_void, pctlcontext: *const CTL_CONTEXT, dwflags: u32) -> super::super::Foundation::BOOL; pub type PFN_CMSG_ALLOC = unsafe extern "system" fn(cb: usize) -> *mut ::core::ffi::c_void; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_CNG_IMPORT_CONTENT_ENCRYPT_KEY = unsafe extern "system" fn(pcngcontentdecryptinfo: *mut ::core::mem::ManuallyDrop<CMSG_CNG_CONTENT_DECRYPT_INFO>, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_CNG_IMPORT_KEY_AGREE = unsafe extern "system" fn(pcngcontentdecryptinfo: *mut ::core::mem::ManuallyDrop<CMSG_CNG_CONTENT_DECRYPT_INFO>, pkeyagreedecryptpara: *const CMSG_CTRL_KEY_AGREE_DECRYPT_PARA, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_CNG_IMPORT_KEY_TRANS = unsafe extern "system" fn(pcngcontentdecryptinfo: *mut ::core::mem::ManuallyDrop<CMSG_CNG_CONTENT_DECRYPT_INFO>, pkeytransdecryptpara: *const CMSG_CTRL_KEY_TRANS_DECRYPT_PARA, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_EXPORT_ENCRYPT_KEY = unsafe extern "system" fn(hcryptprov: usize, hencryptkey: usize, ppublickeyinfo: *const CERT_PUBLIC_KEY_INFO, pbdata: *mut u8, pcbdata: *mut u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_EXPORT_KEY_AGREE = unsafe extern "system" fn(pcontentencryptinfo: *const ::core::mem::ManuallyDrop<CMSG_CONTENT_ENCRYPT_INFO>, pkeyagreeencodeinfo: *const CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO, pkeyagreeencryptinfo: *mut CMSG_KEY_AGREE_ENCRYPT_INFO, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_EXPORT_KEY_TRANS = unsafe extern "system" fn(pcontentencryptinfo: *const ::core::mem::ManuallyDrop<CMSG_CONTENT_ENCRYPT_INFO>, pkeytransencodeinfo: *const CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO, pkeytransencryptinfo: *mut CMSG_KEY_TRANS_ENCRYPT_INFO, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_EXPORT_MAIL_LIST = unsafe extern "system" fn(pcontentencryptinfo: *const ::core::mem::ManuallyDrop<CMSG_CONTENT_ENCRYPT_INFO>, pmaillistencodeinfo: *const CMSG_MAIL_LIST_RECIPIENT_ENCODE_INFO, pmaillistencryptinfo: *mut CMSG_MAIL_LIST_ENCRYPT_INFO, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; pub type PFN_CMSG_FREE = unsafe extern "system" fn(pv: *mut ::core::ffi::c_void); #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_GEN_CONTENT_ENCRYPT_KEY = unsafe extern "system" fn(pcontentencryptinfo: *mut ::core::mem::ManuallyDrop<CMSG_CONTENT_ENCRYPT_INFO>, dwflags: u32, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_GEN_ENCRYPT_KEY = unsafe extern "system" fn(phcryptprov: *mut usize, paiencrypt: *const CRYPT_ALGORITHM_IDENTIFIER, pvencryptauxinfo: *const ::core::ffi::c_void, ppublickeyinfo: *const CERT_PUBLIC_KEY_INFO, pfnalloc: ::windows::core::RawPtr, phencryptkey: *mut usize, ppbencryptparameters: *mut *mut u8, pcbencryptparameters: *mut u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_IMPORT_ENCRYPT_KEY = unsafe extern "system" fn(hcryptprov: usize, dwkeyspec: u32, paiencrypt: *const CRYPT_ALGORITHM_IDENTIFIER, paipubkey: *const CRYPT_ALGORITHM_IDENTIFIER, pbencodedkey: *const u8, cbencodedkey: u32, phencryptkey: *mut usize) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_IMPORT_KEY_AGREE = unsafe extern "system" fn(pcontentencryptionalgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pkeyagreedecryptpara: *const CMSG_CTRL_KEY_AGREE_DECRYPT_PARA, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, phcontentencryptkey: *mut usize) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_IMPORT_KEY_TRANS = unsafe extern "system" fn(pcontentencryptionalgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pkeytransdecryptpara: *const CMSG_CTRL_KEY_TRANS_DECRYPT_PARA, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, phcontentencryptkey: *mut usize) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_IMPORT_MAIL_LIST = unsafe extern "system" fn(pcontentencryptionalgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pmaillistdecryptpara: *const CMSG_CTRL_MAIL_LIST_DECRYPT_PARA, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, phcontentencryptkey: *mut usize) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CMSG_STREAM_OUTPUT = unsafe extern "system" fn(pvarg: *const ::core::ffi::c_void, pbdata: *const u8, cbdata: u32, ffinal: super::super::Foundation::BOOL) -> super::super::Foundation::BOOL; pub type PFN_CRYPT_ALLOC = unsafe extern "system" fn(cbsize: usize) -> *mut ::core::ffi::c_void; #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_ASYNC_PARAM_FREE_FUNC = unsafe extern "system" fn(pszparamoid: super::super::Foundation::PSTR, pvparam: *const ::core::ffi::c_void); #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_ASYNC_RETRIEVAL_COMPLETION_FUNC = unsafe extern "system" fn(pvcompletion: *mut ::core::ffi::c_void, dwcompletioncode: u32, pszurl: super::super::Foundation::PSTR, pszobjectoid: super::super::Foundation::PSTR, pvobject: *const ::core::ffi::c_void); #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_CANCEL_RETRIEVAL = unsafe extern "system" fn(dwflags: u32, pvarg: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_ENUM_KEYID_PROP = unsafe extern "system" fn(pkeyidentifier: *const CRYPTOAPI_BLOB, dwflags: u32, pvreserved: *mut ::core::ffi::c_void, pvarg: *mut ::core::ffi::c_void, cprop: u32, rgdwpropid: *const u32, rgpvdata: *const *const ::core::ffi::c_void, rgcbdata: *const u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_ENUM_OID_FUNC = unsafe extern "system" fn(dwencodingtype: u32, pszfuncname: super::super::Foundation::PSTR, pszoid: super::super::Foundation::PSTR, cvalue: u32, rgdwvaluetype: *const u32, rgpwszvaluename: *const super::super::Foundation::PWSTR, rgpbvaluedata: *const *const u8, rgcbvaluedata: *const u32, pvarg: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_ENUM_OID_INFO = unsafe extern "system" fn(pinfo: *const CRYPT_OID_INFO, pvarg: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_EXPORT_PUBLIC_KEY_INFO_EX2_FUNC = unsafe extern "system" fn(hncryptkey: usize, dwcertencodingtype: u32, pszpublickeyobjid: super::super::Foundation::PSTR, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void, pinfo: *mut CERT_PUBLIC_KEY_INFO, pcbinfo: *mut u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_EXPORT_PUBLIC_KEY_INFO_FROM_BCRYPT_HANDLE_FUNC = unsafe extern "system" fn(hbcryptkey: BCRYPT_KEY_HANDLE, dwcertencodingtype: u32, pszpublickeyobjid: super::super::Foundation::PSTR, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void, pinfo: *mut CERT_PUBLIC_KEY_INFO, pcbinfo: *mut u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_EXTRACT_ENCODED_SIGNATURE_PARAMETERS_FUNC = unsafe extern "system" fn(dwcertencodingtype: u32, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, ppvdecodedsignpara: *mut *mut ::core::ffi::c_void, ppwszcnghashalgid: *mut super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL; pub type PFN_CRYPT_FREE = unsafe extern "system" fn(pv: *const ::core::ffi::c_void); #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_GET_SIGNER_CERTIFICATE = unsafe extern "system" fn(pvgetarg: *mut ::core::ffi::c_void, dwcertencodingtype: u32, psignerid: *const CERT_INFO, hmsgcertstore: *const ::core::ffi::c_void) -> *mut CERT_CONTEXT; #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_FLUSH = unsafe extern "system" fn(pcontext: *const ::core::ffi::c_void, rgidentifierornamelist: *const *const CRYPTOAPI_BLOB, dwidentifierornamelistcount: u32) -> super::super::Foundation::BOOL; pub type PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_FREE = unsafe extern "system" fn(pplugincontext: *const ::core::ffi::c_void, pbdata: *const u8); pub type PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_FREE_IDENTIFIER = unsafe extern "system" fn(pplugincontext: *const ::core::ffi::c_void, pidentifier: *const CRYPTOAPI_BLOB); #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_FREE_PASSWORD = unsafe extern "system" fn(pplugincontext: *const ::core::ffi::c_void, pwszpassword: super::super::Foundation::PWSTR); #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_GET = unsafe extern "system" fn(pplugincontext: *const ::core::ffi::c_void, pidentifier: *const CRYPTOAPI_BLOB, dwnametype: u32, pnameblob: *const CRYPTOAPI_BLOB, ppbcontent: *mut *mut u8, pcbcontent: *mut u32, ppwszpassword: *mut super::super::Foundation::PWSTR, ppidentifier: *mut *mut CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_INITIALIZE = unsafe extern "system" fn(pfnflush: ::windows::core::RawPtr, pcontext: *const ::core::ffi::c_void, pdwexpectedobjectcount: *mut u32, ppfunctable: *mut *mut CRYPT_OBJECT_LOCATOR_PROVIDER_TABLE, ppplugincontext: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; pub type PFN_CRYPT_OBJECT_LOCATOR_PROVIDER_RELEASE = unsafe extern "system" fn(dwreason: CRYPT_OBJECT_LOCATOR_RELEASE_REASON, pplugincontext: *const ::core::ffi::c_void); #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_SIGN_AND_ENCODE_HASH_FUNC = unsafe extern "system" fn(hkey: usize, dwcertencodingtype: u32, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvdecodedsignpara: *const ::core::ffi::c_void, pwszcngpubkeyalgid: super::super::Foundation::PWSTR, pwszcnghashalgid: super::super::Foundation::PWSTR, pbcomputedhash: *const u8, cbcomputedhash: u32, pbsignature: *mut u8, pcbsignature: *mut u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_VERIFY_ENCODED_SIGNATURE_FUNC = unsafe extern "system" fn(dwcertencodingtype: u32, ppubkeyinfo: *const CERT_PUBLIC_KEY_INFO, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvdecodedsignpara: *const ::core::ffi::c_void, pwszcngpubkeyalgid: super::super::Foundation::PWSTR, pwszcnghashalgid: super::super::Foundation::PWSTR, pbcomputedhash: *const u8, cbcomputedhash: u32, pbsignature: *const u8, cbsignature: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_XML_CREATE_TRANSFORM = unsafe extern "system" fn(ptransform: *const CRYPT_XML_ALGORITHM, pproviderin: *const ::core::mem::ManuallyDrop<CRYPT_XML_DATA_PROVIDER>, pproviderout: *mut ::core::mem::ManuallyDrop<CRYPT_XML_DATA_PROVIDER>) -> ::windows::core::HRESULT; pub type PFN_CRYPT_XML_DATA_PROVIDER_CLOSE = unsafe extern "system" fn(pvcallbackstate: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT; pub type PFN_CRYPT_XML_DATA_PROVIDER_READ = unsafe extern "system" fn(pvcallbackstate: *mut ::core::ffi::c_void, pbdata: *mut u8, cbdata: u32, pcbread: *mut u32) -> ::windows::core::HRESULT; #[cfg(feature = "Win32_Foundation")] pub type PFN_CRYPT_XML_ENUM_ALG_INFO = unsafe extern "system" fn(pinfo: *const CRYPT_XML_ALGORITHM_INFO, pvarg: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; pub type PFN_CRYPT_XML_WRITE_CALLBACK = unsafe extern "system" fn(pvcallbackstate: *mut ::core::ffi::c_void, pbdata: *const u8, cbdata: u32) -> ::windows::core::HRESULT; #[cfg(feature = "Win32_Foundation")] pub type PFN_EXPORT_PRIV_KEY_FUNC = unsafe extern "system" fn(hcryptprov: usize, dwkeyspec: u32, pszprivatekeyobjid: super::super::Foundation::PSTR, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void, pprivatekeyinfo: *mut CRYPT_PRIVATE_KEY_INFO, pcbprivatekeyinfo: *mut u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_FREE_ENCODED_OBJECT_FUNC = unsafe extern "system" fn(pszobjectoid: super::super::Foundation::PSTR, pobject: *mut CRYPT_BLOB_ARRAY, pvfreecontext: *mut ::core::ffi::c_void); #[cfg(feature = "Win32_Foundation")] pub type PFN_IMPORT_PRIV_KEY_FUNC = unsafe extern "system" fn(hcryptprov: usize, pprivatekeyinfo: *const CRYPT_PRIVATE_KEY_INFO, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub type PFN_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC = unsafe extern "system" fn(dwcertencodingtype: u32, pinfo: *const CERT_PUBLIC_KEY_INFO, dwflags: u32, pvauxinfo: *const ::core::ffi::c_void, phkey: *mut BCRYPT_KEY_HANDLE) -> super::super::Foundation::BOOL; pub type PFN_NCRYPT_ALLOC = unsafe extern "system" fn(cbsize: usize) -> *mut ::core::ffi::c_void; pub type PFN_NCRYPT_FREE = unsafe extern "system" fn(pv: *const ::core::ffi::c_void); #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn PFXExportCertStore<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hstore: *const ::core::ffi::c_void, ppfx: *mut CRYPTOAPI_BLOB, szpassword: Param2, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn PFXExportCertStore(hstore: *const ::core::ffi::c_void, ppfx: *mut CRYPTOAPI_BLOB, szpassword: super::super::Foundation::PWSTR, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(PFXExportCertStore(::core::mem::transmute(hstore), ::core::mem::transmute(ppfx), szpassword.into_param().abi(), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn PFXExportCertStoreEx<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hstore: *const ::core::ffi::c_void, ppfx: *mut CRYPTOAPI_BLOB, szpassword: Param2, pvpara: *const ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn PFXExportCertStoreEx(hstore: *const ::core::ffi::c_void, ppfx: *mut CRYPTOAPI_BLOB, szpassword: super::super::Foundation::PWSTR, pvpara: *const ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(PFXExportCertStoreEx(::core::mem::transmute(hstore), ::core::mem::transmute(ppfx), szpassword.into_param().abi(), ::core::mem::transmute(pvpara), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn PFXImportCertStore<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(ppfx: *const CRYPTOAPI_BLOB, szpassword: Param1, dwflags: CRYPT_KEY_FLAGS) -> *mut ::core::ffi::c_void { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn PFXImportCertStore(ppfx: *const CRYPTOAPI_BLOB, szpassword: super::super::Foundation::PWSTR, dwflags: CRYPT_KEY_FLAGS) -> *mut ::core::ffi::c_void; } ::core::mem::transmute(PFXImportCertStore(::core::mem::transmute(ppfx), szpassword.into_param().abi(), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn PFXIsPFXBlob(ppfx: *const CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn PFXIsPFXBlob(ppfx: *const CRYPTOAPI_BLOB) -> super::super::Foundation::BOOL; } ::core::mem::transmute(PFXIsPFXBlob(::core::mem::transmute(ppfx))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn PFXVerifyPassword<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(ppfx: *const CRYPTOAPI_BLOB, szpassword: Param1, dwflags: u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn PFXVerifyPassword(ppfx: *const CRYPTOAPI_BLOB, szpassword: super::super::Foundation::PWSTR, dwflags: u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(PFXVerifyPassword(::core::mem::transmute(ppfx), szpassword.into_param().abi(), ::core::mem::transmute(dwflags))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const PKCS12_DISABLE_ENCRYPT_CERTIFICATES: u32 = 256u32; pub const PKCS12_ENCRYPT_CERTIFICATES: u32 = 512u32; pub const PKCS12_EXPORT_ECC_CURVE_OID: u32 = 8192u32; pub const PKCS12_EXPORT_ECC_CURVE_PARAMETERS: u32 = 4096u32; pub const PKCS12_EXPORT_PBES2_PARAMS: u32 = 128u32; pub const PKCS12_EXPORT_RESERVED_MASK: u32 = 4294901760u32; pub const PKCS12_EXPORT_SILENT: u32 = 64u32; pub const PKCS12_IMPORT_RESERVED_MASK: u32 = 4294901760u32; pub const PKCS12_IMPORT_SILENT: u32 = 64u32; pub const PKCS12_ONLY_CERTIFICATES: u32 = 1024u32; pub const PKCS12_ONLY_CERTIFICATES_PROVIDER_TYPE: u32 = 0u32; pub const PKCS12_ONLY_NOT_ENCRYPTED_CERTIFICATES: u32 = 2048u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct PKCS12_PBES2_EXPORT_PARAMS { pub dwSize: u32, pub hNcryptDescriptor: *mut ::core::ffi::c_void, pub pwszPbes2Alg: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl PKCS12_PBES2_EXPORT_PARAMS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PKCS12_PBES2_EXPORT_PARAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for PKCS12_PBES2_EXPORT_PARAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PKCS12_PBES2_EXPORT_PARAMS").field("dwSize", &self.dwSize).field("hNcryptDescriptor", &self.hNcryptDescriptor).field("pwszPbes2Alg", &self.pwszPbes2Alg).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PKCS12_PBES2_EXPORT_PARAMS { fn eq(&self, other: &Self) -> bool { self.dwSize == other.dwSize && self.hNcryptDescriptor == other.hNcryptDescriptor && self.pwszPbes2Alg == other.pwszPbes2Alg } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PKCS12_PBES2_EXPORT_PARAMS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PKCS12_PBES2_EXPORT_PARAMS { type Abi = Self; } pub const PKCS12_PROTECT_TO_DOMAIN_SIDS: u32 = 32u32; pub const PKCS12_VIRTUAL_ISOLATION_KEY: u32 = 65536u32; pub const PKCS5_PADDING: u32 = 1u32; pub const PKCS_7_NDR_ENCODING: u32 = 131072u32; pub const PKCS_RSA_SSA_PSS_TRAILER_FIELD_BC: u32 = 1u32; pub const PLAINTEXTKEYBLOB: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct POLICY_ELEMENT { pub targetEndpointAddress: super::super::Foundation::PWSTR, pub issuerEndpointAddress: super::super::Foundation::PWSTR, pub issuedTokenParameters: super::super::Foundation::PWSTR, pub privacyNoticeLink: super::super::Foundation::PWSTR, pub privacyNoticeVersion: u32, pub useManagedPresentation: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl POLICY_ELEMENT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for POLICY_ELEMENT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for POLICY_ELEMENT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("POLICY_ELEMENT") .field("targetEndpointAddress", &self.targetEndpointAddress) .field("issuerEndpointAddress", &self.issuerEndpointAddress) .field("issuedTokenParameters", &self.issuedTokenParameters) .field("privacyNoticeLink", &self.privacyNoticeLink) .field("privacyNoticeVersion", &self.privacyNoticeVersion) .field("useManagedPresentation", &self.useManagedPresentation) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for POLICY_ELEMENT { fn eq(&self, other: &Self) -> bool { self.targetEndpointAddress == other.targetEndpointAddress && self.issuerEndpointAddress == other.issuerEndpointAddress && self.issuedTokenParameters == other.issuedTokenParameters && self.privacyNoticeLink == other.privacyNoticeLink && self.privacyNoticeVersion == other.privacyNoticeVersion && self.useManagedPresentation == other.useManagedPresentation } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for POLICY_ELEMENT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for POLICY_ELEMENT { type Abi = Self; } pub const PP_ADMIN_PIN: u32 = 31u32; pub const PP_APPLI_CERT: u32 = 18u32; pub const PP_CERTCHAIN: u32 = 9u32; pub const PP_CHANGE_PASSWORD: u32 = 7u32; pub const PP_CONTAINER: u32 = 6u32; pub const PP_CONTEXT_INFO: u32 = 11u32; pub const PP_CRYPT_COUNT_KEY_USE: u32 = 41u32; pub const PP_DISMISS_PIN_UI_SEC: u32 = 49u32; pub const PP_ENUMALGS: u32 = 1u32; pub const PP_ENUMALGS_EX: u32 = 22u32; pub const PP_ENUMCONTAINERS: u32 = 2u32; pub const PP_ENUMELECTROOTS: u32 = 26u32; pub const PP_ENUMEX_SIGNING_PROT: u32 = 40u32; pub const PP_ENUMMANDROOTS: u32 = 25u32; pub const PP_IMPTYPE: u32 = 3u32; pub const PP_KEYSET_TYPE: u32 = 27u32; pub const PP_KEYSPEC: u32 = 39u32; pub const PP_KEYSTORAGE: u32 = 17u32; pub const PP_KEYX_KEYSIZE_INC: u32 = 35u32; pub const PP_KEY_TYPE_SUBTYPE: u32 = 10u32; pub const PP_NAME: u32 = 4u32; pub const PP_PROVTYPE: u32 = 16u32; pub const PP_SESSION_KEYSIZE: u32 = 20u32; pub const PP_SGC_INFO: u32 = 37u32; pub const PP_SIG_KEYSIZE_INC: u32 = 34u32; pub const PP_SMARTCARD_GUID: u32 = 45u32; pub const PP_SMARTCARD_READER_ICON: u32 = 47u32; pub const PP_SYM_KEYSIZE: u32 = 19u32; pub const PP_UNIQUE_CONTAINER: u32 = 36u32; pub const PP_VERSION: u32 = 5u32; pub const PRIVATEKEYBLOB: u32 = 7u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PRIVKEYVER3 { pub magic: u32, pub bitlenP: u32, pub bitlenQ: u32, pub bitlenJ: u32, pub bitlenX: u32, pub DSSSeed: DSSSEED, } impl PRIVKEYVER3 {} impl ::core::default::Default for PRIVKEYVER3 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for PRIVKEYVER3 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PRIVKEYVER3").field("magic", &self.magic).field("bitlenP", &self.bitlenP).field("bitlenQ", &self.bitlenQ).field("bitlenJ", &self.bitlenJ).field("bitlenX", &self.bitlenX).field("DSSSeed", &self.DSSSeed).finish() } } impl ::core::cmp::PartialEq for PRIVKEYVER3 { fn eq(&self, other: &Self) -> bool { self.magic == other.magic && self.bitlenP == other.bitlenP && self.bitlenQ == other.bitlenQ && self.bitlenJ == other.bitlenJ && self.bitlenX == other.bitlenX && self.DSSSeed == other.DSSSeed } } impl ::core::cmp::Eq for PRIVKEYVER3 {} unsafe impl ::windows::core::Abi for PRIVKEYVER3 { type Abi = Self; } pub const PROV_DH_SCHANNEL: u32 = 18u32; pub const PROV_DSS: u32 = 3u32; pub const PROV_DSS_DH: u32 = 13u32; pub const PROV_EC_ECDSA_FULL: u32 = 16u32; pub const PROV_EC_ECDSA_SIG: u32 = 14u32; pub const PROV_EC_ECNRA_FULL: u32 = 17u32; pub const PROV_EC_ECNRA_SIG: u32 = 15u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct PROV_ENUMALGS { pub aiAlgid: u32, pub dwBitLen: u32, pub dwNameLen: u32, pub szName: [super::super::Foundation::CHAR; 20], } #[cfg(feature = "Win32_Foundation")] impl PROV_ENUMALGS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PROV_ENUMALGS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for PROV_ENUMALGS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PROV_ENUMALGS").field("aiAlgid", &self.aiAlgid).field("dwBitLen", &self.dwBitLen).field("dwNameLen", &self.dwNameLen).field("szName", &self.szName).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PROV_ENUMALGS { fn eq(&self, other: &Self) -> bool { self.aiAlgid == other.aiAlgid && self.dwBitLen == other.dwBitLen && self.dwNameLen == other.dwNameLen && self.szName == other.szName } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PROV_ENUMALGS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PROV_ENUMALGS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct PROV_ENUMALGS_EX { pub aiAlgid: u32, pub dwDefaultLen: u32, pub dwMinLen: u32, pub dwMaxLen: u32, pub dwProtocols: u32, pub dwNameLen: u32, pub szName: [super::super::Foundation::CHAR; 20], pub dwLongNameLen: u32, pub szLongName: [super::super::Foundation::CHAR; 40], } #[cfg(feature = "Win32_Foundation")] impl PROV_ENUMALGS_EX {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PROV_ENUMALGS_EX { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for PROV_ENUMALGS_EX { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PROV_ENUMALGS_EX") .field("aiAlgid", &self.aiAlgid) .field("dwDefaultLen", &self.dwDefaultLen) .field("dwMinLen", &self.dwMinLen) .field("dwMaxLen", &self.dwMaxLen) .field("dwProtocols", &self.dwProtocols) .field("dwNameLen", &self.dwNameLen) .field("szName", &self.szName) .field("dwLongNameLen", &self.dwLongNameLen) .field("szLongName", &self.szLongName) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PROV_ENUMALGS_EX { fn eq(&self, other: &Self) -> bool { self.aiAlgid == other.aiAlgid && self.dwDefaultLen == other.dwDefaultLen && self.dwMinLen == other.dwMinLen && self.dwMaxLen == other.dwMaxLen && self.dwProtocols == other.dwProtocols && self.dwNameLen == other.dwNameLen && self.szName == other.szName && self.dwLongNameLen == other.dwLongNameLen && self.szLongName == other.szLongName } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PROV_ENUMALGS_EX {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PROV_ENUMALGS_EX { type Abi = Self; } pub const PROV_FORTEZZA: u32 = 4u32; pub const PROV_INTEL_SEC: u32 = 22u32; pub const PROV_MS_EXCHANGE: u32 = 5u32; pub const PROV_REPLACE_OWF: u32 = 23u32; pub const PROV_RNG: u32 = 21u32; pub const PROV_RSA_AES: u32 = 24u32; pub const PROV_RSA_FULL: u32 = 1u32; pub const PROV_RSA_SCHANNEL: u32 = 12u32; pub const PROV_RSA_SIG: u32 = 2u32; pub const PROV_SPYRUS_LYNKS: u32 = 20u32; pub const PROV_SSL: u32 = 6u32; pub const PROV_STT_ACQ: u32 = 8u32; pub const PROV_STT_BRND: u32 = 9u32; pub const PROV_STT_ISS: u32 = 11u32; pub const PROV_STT_MER: u32 = 7u32; pub const PROV_STT_ROOT: u32 = 10u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PUBKEY { pub magic: u32, pub bitlen: u32, } impl PUBKEY {} impl ::core::default::Default for PUBKEY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for PUBKEY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PUBKEY").field("magic", &self.magic).field("bitlen", &self.bitlen).finish() } } impl ::core::cmp::PartialEq for PUBKEY { fn eq(&self, other: &Self) -> bool { self.magic == other.magic && self.bitlen == other.bitlen } } impl ::core::cmp::Eq for PUBKEY {} unsafe impl ::windows::core::Abi for PUBKEY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PUBKEYVER3 { pub magic: u32, pub bitlenP: u32, pub bitlenQ: u32, pub bitlenJ: u32, pub DSSSeed: DSSSEED, } impl PUBKEYVER3 {} impl ::core::default::Default for PUBKEYVER3 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for PUBKEYVER3 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PUBKEYVER3").field("magic", &self.magic).field("bitlenP", &self.bitlenP).field("bitlenQ", &self.bitlenQ).field("bitlenJ", &self.bitlenJ).field("DSSSeed", &self.DSSSeed).finish() } } impl ::core::cmp::PartialEq for PUBKEYVER3 { fn eq(&self, other: &Self) -> bool { self.magic == other.magic && self.bitlenP == other.bitlenP && self.bitlenQ == other.bitlenQ && self.bitlenJ == other.bitlenJ && self.DSSSeed == other.DSSSeed } } impl ::core::cmp::Eq for PUBKEYVER3 {} unsafe impl ::windows::core::Abi for PUBKEYVER3 { type Abi = Self; } pub const PUBLICKEYBLOB: u32 = 6u32; pub const PUBLICKEYBLOBEX: u32 = 10u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PUBLICKEYSTRUC { pub bType: u8, pub bVersion: u8, pub reserved: u16, pub aiKeyAlg: u32, } impl PUBLICKEYSTRUC {} impl ::core::default::Default for PUBLICKEYSTRUC { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for PUBLICKEYSTRUC { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PUBLICKEYSTRUC").field("bType", &self.bType).field("bVersion", &self.bVersion).field("reserved", &self.reserved).field("aiKeyAlg", &self.aiKeyAlg).finish() } } impl ::core::cmp::PartialEq for PUBLICKEYSTRUC { fn eq(&self, other: &Self) -> bool { self.bType == other.bType && self.bVersion == other.bVersion && self.reserved == other.reserved && self.aiKeyAlg == other.aiKeyAlg } } impl ::core::cmp::Eq for PUBLICKEYSTRUC {} unsafe impl ::windows::core::Abi for PUBLICKEYSTRUC { type Abi = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct PaddingMode(pub i32); impl PaddingMode { pub const None: PaddingMode = PaddingMode(1i32); pub const PKCS7: PaddingMode = PaddingMode(2i32); pub const Zeros: PaddingMode = PaddingMode(3i32); pub const ANSIX923: PaddingMode = PaddingMode(4i32); pub const ISO10126: PaddingMode = PaddingMode(5i32); } impl ::core::convert::From<i32> for PaddingMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PaddingMode { type Abi = Self; } pub const RANDOM_PADDING: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct RECIPIENTPOLICY { pub recipient: ENDPOINTADDRESS, pub issuer: ENDPOINTADDRESS, pub tokenType: super::super::Foundation::PWSTR, pub requiredClaims: CLAIMLIST, pub optionalClaims: CLAIMLIST, pub privacyUrl: super::super::Foundation::PWSTR, pub privacyVersion: u32, } #[cfg(feature = "Win32_Foundation")] impl RECIPIENTPOLICY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for RECIPIENTPOLICY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for RECIPIENTPOLICY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("RECIPIENTPOLICY") .field("recipient", &self.recipient) .field("issuer", &self.issuer) .field("tokenType", &self.tokenType) .field("requiredClaims", &self.requiredClaims) .field("optionalClaims", &self.optionalClaims) .field("privacyUrl", &self.privacyUrl) .field("privacyVersion", &self.privacyVersion) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for RECIPIENTPOLICY { fn eq(&self, other: &Self) -> bool { self.recipient == other.recipient && self.issuer == other.issuer && self.tokenType == other.tokenType && self.requiredClaims == other.requiredClaims && self.optionalClaims == other.optionalClaims && self.privacyUrl == other.privacyUrl && self.privacyVersion == other.privacyVersion } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for RECIPIENTPOLICY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for RECIPIENTPOLICY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct RECIPIENTPOLICY2 { pub recipient: ENDPOINTADDRESS2, pub issuer: ENDPOINTADDRESS2, pub tokenType: super::super::Foundation::PWSTR, pub requiredClaims: CLAIMLIST, pub optionalClaims: CLAIMLIST, pub privacyUrl: super::super::Foundation::PWSTR, pub privacyVersion: u32, } #[cfg(feature = "Win32_Foundation")] impl RECIPIENTPOLICY2 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for RECIPIENTPOLICY2 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for RECIPIENTPOLICY2 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("RECIPIENTPOLICY2") .field("recipient", &self.recipient) .field("issuer", &self.issuer) .field("tokenType", &self.tokenType) .field("requiredClaims", &self.requiredClaims) .field("optionalClaims", &self.optionalClaims) .field("privacyUrl", &self.privacyUrl) .field("privacyVersion", &self.privacyVersion) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for RECIPIENTPOLICY2 { fn eq(&self, other: &Self) -> bool { self.recipient == other.recipient && self.issuer == other.issuer && self.tokenType == other.tokenType && self.requiredClaims == other.requiredClaims && self.optionalClaims == other.optionalClaims && self.privacyUrl == other.privacyUrl && self.privacyVersion == other.privacyVersion } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for RECIPIENTPOLICY2 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for RECIPIENTPOLICY2 { type Abi = Self; } pub const RECIPIENTPOLICYV1: u32 = 1u32; pub const RECIPIENTPOLICYV2: u32 = 2u32; pub const REPORT_NOT_ABLE_TO_EXPORT_PRIVATE_KEY: u32 = 2u32; pub const REPORT_NO_PRIVATE_KEY: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ROOT_INFO_LUID { pub LowPart: u32, pub HighPart: i32, } impl ROOT_INFO_LUID {} impl ::core::default::Default for ROOT_INFO_LUID { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ROOT_INFO_LUID { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ROOT_INFO_LUID").field("LowPart", &self.LowPart).field("HighPart", &self.HighPart).finish() } } impl ::core::cmp::PartialEq for ROOT_INFO_LUID { fn eq(&self, other: &Self) -> bool { self.LowPart == other.LowPart && self.HighPart == other.HighPart } } impl ::core::cmp::Eq for ROOT_INFO_LUID {} unsafe impl ::windows::core::Abi for ROOT_INFO_LUID { type Abi = Self; } pub const RSA1024BIT_KEY: u32 = 67108864u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct RSAPUBKEY { pub magic: u32, pub bitlen: u32, pub pubexp: u32, } impl RSAPUBKEY {} impl ::core::default::Default for RSAPUBKEY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for RSAPUBKEY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("RSAPUBKEY").field("magic", &self.magic).field("bitlen", &self.bitlen).field("pubexp", &self.pubexp).finish() } } impl ::core::cmp::PartialEq for RSAPUBKEY { fn eq(&self, other: &Self) -> bool { self.magic == other.magic && self.bitlen == other.bitlen && self.pubexp == other.pubexp } } impl ::core::cmp::Eq for RSAPUBKEY {} unsafe impl ::windows::core::Abi for RSAPUBKEY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct SCHANNEL_ALG { pub dwUse: u32, pub Algid: u32, pub cBits: u32, pub dwFlags: u32, pub dwReserved: u32, } impl SCHANNEL_ALG {} impl ::core::default::Default for SCHANNEL_ALG { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for SCHANNEL_ALG { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SCHANNEL_ALG").field("dwUse", &self.dwUse).field("Algid", &self.Algid).field("cBits", &self.cBits).field("dwFlags", &self.dwFlags).field("dwReserved", &self.dwReserved).finish() } } impl ::core::cmp::PartialEq for SCHANNEL_ALG { fn eq(&self, other: &Self) -> bool { self.dwUse == other.dwUse && self.Algid == other.Algid && self.cBits == other.cBits && self.dwFlags == other.dwFlags && self.dwReserved == other.dwReserved } } impl ::core::cmp::Eq for SCHANNEL_ALG {} unsafe impl ::windows::core::Abi for SCHANNEL_ALG { type Abi = Self; } pub const SCHANNEL_ENC_KEY: u32 = 1u32; pub const SCHANNEL_MAC_KEY: u32 = 0u32; pub const SIGNATURE_RESOURCE_NUMBER: u32 = 666u32; pub const SIMPLEBLOB: u32 = 1u32; pub const SITE_PIN_RULES_ALL_SUBDOMAINS_FLAG: u32 = 1u32; pub const SORTED_CTL_EXT_HASHED_SUBJECT_IDENTIFIER_FLAG: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct SSL_ECCKEY_BLOB { pub dwCurveType: u32, pub cbKey: u32, } impl SSL_ECCKEY_BLOB {} impl ::core::default::Default for SSL_ECCKEY_BLOB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for SSL_ECCKEY_BLOB { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SSL_ECCKEY_BLOB").field("dwCurveType", &self.dwCurveType).field("cbKey", &self.cbKey).finish() } } impl ::core::cmp::PartialEq for SSL_ECCKEY_BLOB { fn eq(&self, other: &Self) -> bool { self.dwCurveType == other.dwCurveType && self.cbKey == other.cbKey } } impl ::core::cmp::Eq for SSL_ECCKEY_BLOB {} unsafe impl ::windows::core::Abi for SSL_ECCKEY_BLOB { type Abi = Self; } pub const SSL_F12_ERROR_TEXT_LENGTH: u32 = 256u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS { pub cbSize: u32, pub dwErrorLevel: u32, pub dwErrorCategory: u32, pub dwReserved: u32, pub wszErrorText: [u16; 256], } impl SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS {} impl ::core::default::Default for SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS").field("cbSize", &self.cbSize).field("dwErrorLevel", &self.dwErrorLevel).field("dwErrorCategory", &self.dwErrorCategory).field("dwReserved", &self.dwReserved).field("wszErrorText", &self.wszErrorText).finish() } } impl ::core::cmp::PartialEq for SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwErrorLevel == other.dwErrorLevel && self.dwErrorCategory == other.dwErrorCategory && self.dwReserved == other.dwReserved && self.wszErrorText == other.wszErrorText } } impl ::core::cmp::Eq for SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS {} unsafe impl ::windows::core::Abi for SSL_F12_EXTRA_CERT_CHAIN_POLICY_STATUS { type Abi = Self; } pub const SSL_HPKP_HEADER_COUNT: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA { pub cbSize: u32, pub dwReserved: u32, pub pwszServerName: super::super::Foundation::PWSTR, pub rgpszHpkpValue: [super::super::Foundation::PSTR; 2], } #[cfg(feature = "Win32_Foundation")] impl SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA").field("cbSize", &self.cbSize).field("dwReserved", &self.dwReserved).field("pwszServerName", &self.pwszServerName).field("rgpszHpkpValue", &self.rgpszHpkpValue).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwReserved == other.dwReserved && self.pwszServerName == other.pwszServerName && self.rgpszHpkpValue == other.rgpszHpkpValue } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for SSL_HPKP_HEADER_EXTRA_CERT_CHAIN_POLICY_PARA { type Abi = Self; } pub const SSL_HPKP_PKP_HEADER_INDEX: u32 = 0u32; pub const SSL_HPKP_PKP_RO_HEADER_INDEX: u32 = 1u32; pub const SSL_KEY_PIN_ERROR_TEXT_LENGTH: u32 = 512u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA { pub cbSize: u32, pub dwReserved: u32, pub pwszServerName: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA").field("cbSize", &self.cbSize).field("dwReserved", &self.dwReserved).field("pwszServerName", &self.pwszServerName).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.dwReserved == other.dwReserved && self.pwszServerName == other.pwszServerName } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_PARA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS { pub cbSize: u32, pub lError: i32, pub wszErrorText: [u16; 512], } impl SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS {} impl ::core::default::Default for SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS").field("cbSize", &self.cbSize).field("lError", &self.lError).field("wszErrorText", &self.wszErrorText).finish() } } impl ::core::cmp::PartialEq for SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS { fn eq(&self, other: &Self) -> bool { self.cbSize == other.cbSize && self.lError == other.lError && self.wszErrorText == other.wszErrorText } } impl ::core::cmp::Eq for SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS {} unsafe impl ::windows::core::Abi for SSL_KEY_PIN_EXTRA_CERT_CHAIN_POLICY_STATUS { type Abi = Self; } pub const SYMMETRICWRAPKEYBLOB: u32 = 11u32; #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SignHash<'a, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cbhash: u32, phash: *const u8, hashalgoid: Param3, pcbsig: *mut u32, ppsig: *mut *mut u8) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn SignHash(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cbhash: u32, phash: *const u8, hashalgoid: super::super::Foundation::PWSTR, pcbsig: *mut u32, ppsig: *mut *mut u8) -> ::windows::core::HRESULT; } SignHash(::core::mem::transmute(hcrypto), ::core::mem::transmute(cbhash), ::core::mem::transmute(phash), hashalgoid.into_param().abi(), ::core::mem::transmute(pcbsig), ::core::mem::transmute(ppsig)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const TIMESTAMP_DONT_HASH_DATA: u32 = 1u32; pub const TIMESTAMP_FAILURE_BAD_ALG: u32 = 0u32; pub const TIMESTAMP_FAILURE_BAD_FORMAT: u32 = 5u32; pub const TIMESTAMP_FAILURE_BAD_REQUEST: u32 = 2u32; pub const TIMESTAMP_FAILURE_EXTENSION_NOT_SUPPORTED: u32 = 16u32; pub const TIMESTAMP_FAILURE_INFO_NOT_AVAILABLE: u32 = 17u32; pub const TIMESTAMP_FAILURE_POLICY_NOT_SUPPORTED: u32 = 15u32; pub const TIMESTAMP_FAILURE_SYSTEM_FAILURE: u32 = 25u32; pub const TIMESTAMP_FAILURE_TIME_NOT_AVAILABLE: u32 = 14u32; pub const TIMESTAMP_NO_AUTH_RETRIEVAL: u32 = 131072u32; pub const TIMESTAMP_VERIFY_CONTEXT_SIGNATURE: u32 = 32u32; #[inline] pub unsafe fn TransformBlock(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cbindata: u32, pindata: *const u8, pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TransformBlock(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cbindata: u32, pindata: *const u8, pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> ::windows::core::HRESULT; } TransformBlock(::core::mem::transmute(hcrypto), ::core::mem::transmute(cbindata), ::core::mem::transmute(pindata), ::core::mem::transmute(pcboutdata), ::core::mem::transmute(ppoutdata)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn TransformFinalBlock(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cbindata: u32, pindata: *const u8, pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn TransformFinalBlock(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cbindata: u32, pindata: *const u8, pcboutdata: *mut u32, ppoutdata: *mut *mut u8) -> ::windows::core::HRESULT; } TransformFinalBlock(::core::mem::transmute(hcrypto), ::core::mem::transmute(cbindata), ::core::mem::transmute(pindata), ::core::mem::transmute(pcboutdata), ::core::mem::transmute(ppoutdata)).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const USAGE_MATCH_TYPE_AND: u32 = 0u32; pub const USAGE_MATCH_TYPE_OR: u32 = 1u32; #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn VerifyHash<'a, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cbhash: u32, phash: *const u8, hashalgoid: Param3, cbsig: u32, psig: *const u8) -> ::windows::core::Result<super::super::Foundation::BOOL> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn VerifyHash(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, cbhash: u32, phash: *const u8, hashalgoid: super::super::Foundation::PWSTR, cbsig: u32, psig: *const u8, pfverified: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT; } let mut result__: <super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); VerifyHash(::core::mem::transmute(hcrypto), ::core::mem::transmute(cbhash), ::core::mem::transmute(phash), hashalgoid.into_param().abi(), ::core::mem::transmute(cbsig), ::core::mem::transmute(psig), &mut result__).from_abi::<super::super::Foundation::BOOL>(result__) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const X509_NDR_ENCODING: u32 = 2u32; pub const ZERO_PADDING: u32 = 3u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct __NCRYPT_PCP_TPM_WEB_AUTHN_ATTESTATION_STATEMENT { pub Magic: u32, pub Version: u32, pub HeaderSize: u32, pub cbCertifyInfo: u32, pub cbSignature: u32, pub cbTpmPublic: u32, } impl __NCRYPT_PCP_TPM_WEB_AUTHN_ATTESTATION_STATEMENT {} impl ::core::default::Default for __NCRYPT_PCP_TPM_WEB_AUTHN_ATTESTATION_STATEMENT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for __NCRYPT_PCP_TPM_WEB_AUTHN_ATTESTATION_STATEMENT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("__NCRYPT_PCP_TPM_WEB_AUTHN_ATTESTATION_STATEMENT").field("Magic", &self.Magic).field("Version", &self.Version).field("HeaderSize", &self.HeaderSize).field("cbCertifyInfo", &self.cbCertifyInfo).field("cbSignature", &self.cbSignature).field("cbTpmPublic", &self.cbTpmPublic).finish() } } impl ::core::cmp::PartialEq for __NCRYPT_PCP_TPM_WEB_AUTHN_ATTESTATION_STATEMENT { fn eq(&self, other: &Self) -> bool { self.Magic == other.Magic && self.Version == other.Version && self.HeaderSize == other.HeaderSize && self.cbCertifyInfo == other.cbCertifyInfo && self.cbSignature == other.cbSignature && self.cbTpmPublic == other.cbTpmPublic } } impl ::core::cmp::Eq for __NCRYPT_PCP_TPM_WEB_AUTHN_ATTESTATION_STATEMENT {} unsafe impl ::windows::core::Abi for __NCRYPT_PCP_TPM_WEB_AUTHN_ATTESTATION_STATEMENT { type Abi = Self; }
use specs::join::JoinIter; use specs::prelude::*; use specs::world::Index; use std::cmp::min; use std::collections::BTreeMap; use std::marker::PhantomData; use std::ops::{Add, Sub}; use std::sync::{Arc, Weak}; pub use std::time::Duration; const ZERO_DURATION: Duration = Duration::from_secs(0); #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Ord, PartialOrd)] pub struct Instant(Duration); impl Instant { pub fn compare_to(&self, other: Instant) -> DirectedTime { if self.0 < other.0 { DirectedTime::Future(other.0 - self.0) } else if self.0 == other.0 { DirectedTime::Still } else { DirectedTime::Past(self.0 - other.0) } } } impl Add<Duration> for Instant { type Output = Instant; fn add(self, rhs: Duration) -> Instant { Instant(self.0 + rhs) } } impl Sub<Duration> for Instant { type Output = Instant; fn sub(self, rhs: Duration) -> Instant { Instant(self.0 - rhs) } } #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] pub enum DirectedTime { Future(Duration), Still, Past(Duration), } pub struct Timekeeper { real_time_delta: Duration, remaining_sim_time: Duration, sim_delta: DirectedTime, sim_time_factor: f32, sim_elapsed_time: Duration, sim_closest_future: Duration, sim_closest_past: Duration, } impl Default for Timekeeper { fn default() -> Self { Self::new() } } impl Timekeeper { pub fn new() -> Timekeeper { Timekeeper { real_time_delta: ZERO_DURATION, remaining_sim_time: ZERO_DURATION, sim_delta: DirectedTime::Still, sim_time_factor: 1.0, sim_elapsed_time: ZERO_DURATION, sim_closest_future: ZERO_DURATION, sim_closest_past: ZERO_DURATION, } } pub fn update_real_time(&mut self, d_time: Duration) { self.real_time_delta = d_time; if self.remaining_sim_time > ZERO_DURATION { let adjusted = mul_dur_by_factor(self.real_time_delta, self.sim_time_factor.abs()); let signum = self.sim_time_factor.signum(); if signum > 0.0 { let time_chunk = min( adjusted, if self.sim_closest_future != ZERO_DURATION { min( self.remaining_sim_time, self.sim_closest_future - self.sim_elapsed_time, ) } else { self.remaining_sim_time }, ); self.remaining_sim_time -= time_chunk; self.sim_elapsed_time += time_chunk; self.sim_delta = DirectedTime::Future(time_chunk); } else if signum < 0.0 { let time_chunk = min( adjusted, if self.sim_closest_past != ZERO_DURATION { min( self.remaining_sim_time, self.sim_elapsed_time - self.sim_closest_past, ) } else { self.remaining_sim_time }, ); self.remaining_sim_time -= time_chunk; self.sim_elapsed_time -= time_chunk; self.sim_delta = DirectedTime::Past(time_chunk); } else { self.sim_delta = DirectedTime::Still; } } else { self.sim_delta = DirectedTime::Still; } } pub fn add_simulation_time(&mut self, d_time: Duration) { self.remaining_sim_time += d_time; } pub fn real_time_delta(&self) -> Duration { self.real_time_delta } pub fn delta(&self) -> DirectedTime { self.sim_delta } pub fn set_time_factor(&mut self, factor: f32) { self.sim_time_factor = factor; } pub fn time_factor(&self) -> f32 { self.sim_time_factor } pub fn now(&self) -> Instant { Instant(self.sim_elapsed_time) } } pub trait Timed: Component { fn schedule( &self, entity: &Entity, time: &Timekeeper, timing_data: &mut TimingData<Self>, duration: Duration, ) { timing_data.schedule(entity, time, duration); } } pub struct TimingData<T> { phantom_data: PhantomData<T>, should_update: BitSet, starts: BTreeMap<Instant, Vec<Index>>, ends: BTreeMap<Instant, Vec<Index>>, } impl<T> Default for TimingData<T> { fn default() -> Self { Self::new() } } impl<T> TimingData<T> { fn new() -> TimingData<T> { TimingData { phantom_data: PhantomData, should_update: BitSet::new(), ends: BTreeMap::new(), starts: BTreeMap::new(), } } fn clear_update_flags(&mut self) { self.should_update.clear(); } fn set_update_flag(&mut self, entity: &Entity) { self.should_update.add(entity.id()); } fn schedule(&mut self, entity: &Entity, time: &Timekeeper, duration: Duration) { let (start, end) = match time.delta() { DirectedTime::Past(_) => (time.now() - duration, time.now()), _ => (time.now(), time.now() + duration), }; self.starts .entry(start) .or_insert_with(Vec::new) .push(entity.id()); self.ends .entry(end) .or_insert_with(Vec::new) .push(entity.id()); info!("scheduled {:?} for {:?}-{:?}", entity, start, end); } /*fn populate_schedule<C>(&mut self, join: JoinIter<(Entities, ReadStorage<C>)>, time: Timekeeper) where C: Component + Timed, { }*/ pub fn scheduled(&self) -> &BitSet { &self.should_update } } pub struct TimingSystem<T> { phantom_data: PhantomData<T>, } impl<T> TimingSystem<T> { pub fn new() -> TimingSystem<T> { TimingSystem { phantom_data: PhantomData, } } } impl<'a, T> System<'a> for TimingSystem<T> where T: Timed + Component + Send + Sync, { type SystemData = ( Write<'a, Timekeeper>, Entities<'a>, ReadStorage<'a, T>, Write<'a, TimingData<T>>, ); fn run(&mut self, (time, entity_s, timed_s, mut timing_data): Self::SystemData) { timing_data.clear_update_flags(); match time.delta() { DirectedTime::Still => (), _ => { for (entity, _) in (&*entity_s, &timed_s).join() { timing_data.set_update_flag(&entity); } } } // TODO: Timekeeper::sim_closest_future, Timekeeper::sim_closest_past /*match time.delta() { DirectedTime::Still => (), other => { let (start, end) = match other { DirectedTime::Future(delta) => (time.now() - delta, time.now()), DirectedTime::Past(delta) => (time.now(), time.now() + delta), _ => unreachable!("Literally impossible."), }; for (entity, _) in (&*entity_s, &timed_s).join() { timing_data.set_update_flag(&entity); } } };*/ } fn setup(&mut self, resources: &mut Resources) { Self::SystemData::setup(resources); resources.insert(TimingData::<T>::new()); } } fn mul_dur_by_factor<T: Copy + Into<f64>>(duration: Duration, factor: T) -> Duration { let adjusted_s: f64 = duration.as_secs() as f64 * factor.into(); let mut adjusted_n: f64 = duration.subsec_nanos() as f64 * factor.into(); let trunc_s = adjusted_s.trunc(); let subsec = adjusted_s - trunc_s; let mut adjusted_s = trunc_s as u64; adjusted_n += subsec * 1_000_000_000.0; let rem_n = adjusted_n % 1_000_000_000.0; adjusted_s += (adjusted_n / 1_000_000_000.0).trunc() as u64; let adjusted_n = rem_n as u32; Duration::new(adjusted_s, adjusted_n) } #[cfg(test)] mod tests { use super::*; #[test] fn sim_delta() { let mut timekeeper = Timekeeper::new(); assert_eq!(timekeeper.delta(), DirectedTime::Still); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!(timekeeper.delta(), DirectedTime::Still); timekeeper.add_simulation_time(Duration::from_secs(8)); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!( timekeeper.delta(), DirectedTime::Future(Duration::from_secs(2)) ); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!( timekeeper.delta(), DirectedTime::Future(Duration::from_secs(2)) ); timekeeper.update_real_time(Duration::from_secs(3)); assert_eq!( timekeeper.delta(), DirectedTime::Future(Duration::from_secs(3)) ); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!( timekeeper.delta(), DirectedTime::Future(Duration::from_secs(1)) ); timekeeper.update_real_time(Duration::from_secs(1)); assert_eq!(timekeeper.delta(), DirectedTime::Still); } #[test] fn sim_now() { let mut timekeeper = Timekeeper::new(); let start = timekeeper.now(); timekeeper.update_real_time(Duration::from_secs(1)); assert_eq!(timekeeper.now(), start); timekeeper.add_simulation_time(Duration::from_secs(8)); assert_eq!(timekeeper.now(), start); timekeeper.update_real_time(Duration::from_secs(1)); assert_ne!(timekeeper.now(), start); assert_eq!( timekeeper.now().compare_to(start), DirectedTime::Past(Duration::from_secs(1)) ); timekeeper.update_real_time(Duration::from_secs(1)); assert_eq!( timekeeper.now().compare_to(start), DirectedTime::Past(Duration::from_secs(2)) ); } #[test] fn sim_now_backwards() { let mut timekeeper = Timekeeper::new(); timekeeper.add_simulation_time(Duration::from_secs(8)); timekeeper.update_real_time(Duration::from_secs(8)); let start = timekeeper.now(); timekeeper.set_time_factor(-1.0); timekeeper.update_real_time(Duration::from_secs(1)); assert_eq!(timekeeper.now(), start); timekeeper.add_simulation_time(Duration::from_secs(8)); assert_eq!(timekeeper.now(), start); timekeeper.update_real_time(Duration::from_secs(1)); assert_ne!(timekeeper.now(), start); assert_eq!( timekeeper.now().compare_to(start), DirectedTime::Future(Duration::from_secs(1)) ); timekeeper.update_real_time(Duration::from_secs(1)); assert_eq!( timekeeper.now().compare_to(start), DirectedTime::Future(Duration::from_secs(2)) ); } #[test] fn time_factor() { let mut timekeeper = Timekeeper::new(); timekeeper.add_simulation_time(Duration::from_secs(8)); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!( timekeeper.delta(), DirectedTime::Future(Duration::from_secs(2)) ); timekeeper.set_time_factor(2.0); assert_eq!( timekeeper.delta(), DirectedTime::Future(Duration::from_secs(2)) ); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!( timekeeper.delta(), DirectedTime::Future(Duration::from_secs(4)) ); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!( timekeeper.delta(), DirectedTime::Future(Duration::from_secs(2)) ); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!(timekeeper.delta(), DirectedTime::Still); timekeeper.set_time_factor(0.5); timekeeper.add_simulation_time(Duration::from_secs(8)); assert_eq!(timekeeper.delta(), DirectedTime::Still); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!( timekeeper.delta(), DirectedTime::Future(Duration::from_secs(1)) ); timekeeper.update_real_time(Duration::from_secs(4)); assert_eq!( timekeeper.delta(), DirectedTime::Future(Duration::from_secs(2)) ); timekeeper.set_time_factor(1.0); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!( timekeeper.delta(), DirectedTime::Future(Duration::from_secs(2)) ); timekeeper.update_real_time(Duration::from_secs(8)); assert_eq!( timekeeper.delta(), DirectedTime::Future(Duration::from_secs(3)) ); timekeeper.set_time_factor(-1.0); timekeeper.add_simulation_time(Duration::from_secs(8)); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!( timekeeper.delta(), DirectedTime::Past(Duration::from_secs(2)) ); timekeeper.set_time_factor(-0.5); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!( timekeeper.delta(), DirectedTime::Past(Duration::from_secs(1)) ); timekeeper.set_time_factor(-5.0); timekeeper.update_real_time(Duration::from_secs(2)); assert_eq!( timekeeper.delta(), DirectedTime::Past(Duration::from_secs(5)) ); } #[test] fn duration_multiplication() { assert_eq!( mul_dur_by_factor(Duration::new(4, 600_000_000), 0.5), Duration::new(2, 300_000_000) ); assert_eq!( mul_dur_by_factor(Duration::new(4, 600_000_000), 2.0), Duration::new(9, 200_000_000) ); assert_eq!( mul_dur_by_factor(Duration::new(5, 600_000_000), 0.5), Duration::new(2, 800_000_000) ); } }
#[allow(unused_imports)] use proconio::{marker::*, *}; #[allow(unused_imports)] use std::{cmp::Ordering, collections::HashMap, convert::TryInto}; #[allow(unused_imports)] use lib::*; #[fastout] fn main() { input! { s: Chars, t: Chars, } let mut s_chars: HashMap<&char, i32> = HashMap::new(); let mut t_chars: HashMap<&char, i32> = HashMap::new(); for c in &s { if let Some(count) = s_chars.get_mut(c) { *count += 1; } else { s_chars.insert(c, 1); } } for c in &t { if let Some(count) = t_chars.get_mut(c) { *count += 1; } else { t_chars.insert(c, 1); } } let atcoder = ['a', 't', 'c', 'o', 'd', 'e', 'r']; for c in &atcoder { let c_s = s_chars.get(c).copied().unwrap_or(0); let c_t = t_chars.get(c).copied().unwrap_or(0); if c_s == c_t { continue; } if c_s < c_t { let rem = c_t - c_s; if let Some(at) = s_chars.get_mut(&'@') { if *at < rem { println!("No"); return; } *at -= rem; } else { println!("No"); return; } } else { let rem = c_s - c_t; if let Some(at) = t_chars.get_mut(&'@') { if *at < rem { println!("No"); return; } *at -= rem; } else { println!("No"); return; } } } for (c, v) in s_chars.iter() { if atcoder.contains(&c) { continue; } if v != t_chars.get(c).unwrap_or(&0) { println!("No"); return; } } for (c, v) in t_chars.iter() { if atcoder.contains(&c) { continue; } if v != s_chars.get(c).unwrap_or(&0) { println!("No"); return; } } println!("Yes"); } mod lib { pub trait CumlativeSum { // 累積和 fn cumlative_sum(&self) -> Self; } impl CumlativeSum for Vec<Vec<i32>> { fn cumlative_sum(&self) -> Self { let h = self.len() as usize; let w = self.get(0).unwrap().len() as usize; let mut s = vec![vec![0; w + 1]; h + 1]; // 横方向合計 for (r, xs) in self.iter().enumerate() { let r = r as usize + 1; for (c, x) in xs.iter().enumerate() { let c = c as usize + 1; s[r][c] = s[r][c - 1] + x; } } // 縦方向合計 for c in 1..=w { for r in 1..=h { s[r][c] += s[r - 1][c]; } } s } } }
// Copyright 2016 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 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // *Implementation adapted from `/sys/redox/condvar.rs` use cell::UnsafeCell; use intrinsics::atomic_cxchg; use ptr; use time::Duration; use sys::mutex::{self, Mutex}; use mem; #[cfg(target_arch = "aarch64")] pub struct Condvar { lock: UnsafeCell<libnx::CondVar>, } unsafe impl Send for Condvar {} unsafe impl Sync for Condvar {} #[cfg(target_arch = "aarch64")] impl Condvar { pub const fn new() -> Condvar { Condvar { lock: UnsafeCell::new(0), } } #[inline] pub unsafe fn init(&mut self) { self.lock = UnsafeCell::new(mem::zeroed()); } #[inline] pub fn notify_one(&self) { unsafe { libnx::svcSignalProcessWideKey(self.lock.get(), 1); } } #[inline] pub fn notify_all(&self) { unsafe { libnx::svcSignalProcessWideKey(self.lock.get(), -1); } } #[inline] pub fn wait(&self, mutex: &Mutex) { self.wait_timeout(mutex, Duration::from_millis(u64::max_value())); } #[inline] pub fn wait_timeout(&self, mutex: &Mutex, dur: Duration) -> bool { let dur_millis = (dur.as_secs() * 1000) + (dur.subsec_millis() as u64); unsafe { libnx::condvarWaitTimeout(self.lock.get(), mutex::raw(&mutex), dur_millis); } true } #[inline] pub unsafe fn destroy(&self) { } }
use std::error; use std::rc::Rc; use std::cell::RefCell; use std::ops::Deref; use std::sync::Mutex; use gl_bindings::gl; use cgmath::{Matrix4, SquareMatrix, vec3, Point3, Rad}; use crate::demo; use crate::utils::lazy_option::Lazy; use crate::render::{Framebuffer, FramebufferAttachment, AttachmentPoint, ImageFormat, RenderSubsystem}; use crate::render::separable_sss::SeparableSSSSubsystem; use crate::render::shader::managed::ManagedProgram; use crate::asset::AssetPathBuf; pub struct RenderGlobal { current_configuration: Rc<RefCell<GraphicsConfiguration>>, current_resolution: (u32, u32), separable_sss_system: SeparableSSSSubsystem, framebuffer_scene_hdr_ehaa: Option<Rc<RefCell<Framebuffer>>>, program_ehaa_scene: ManagedProgram, program_post_composite: ManagedProgram, frametime_query_object_gl: gl::uint, queued_shader_reload: bool, } impl RenderGlobal { pub fn new() -> RenderGlobal { RenderGlobal { current_configuration: Rc::new(RefCell::new(GraphicsConfiguration::new())), current_resolution: (0, 0), separable_sss_system: SeparableSSSSubsystem::new(), framebuffer_scene_hdr_ehaa: None, program_ehaa_scene: ManagedProgram::new(Some(AssetPathBuf::from("/shaders/legacy/main_scene_forward.program"))), program_post_composite: ManagedProgram::new(Some(AssetPathBuf::from("/shaders/post_composite.program"))), frametime_query_object_gl: 0, queued_shader_reload: false, } } pub fn initialize(&mut self, resolution: (u32, u32)) -> Result<(), Box<dyn error::Error>> { // Set initial resolution self.current_resolution = resolution; // Init subsystems self.separable_sss_system.initialize(); // Do initial reconfiguration self.do_reconfigure_pipeline(self.current_resolution, false)?; Ok(()) } pub fn do_reconfigure_pipeline(&mut self, new_resolution: (u32, u32), only_resize: bool) -> Result<(), Box<dyn error::Error>> { // Update state self.current_resolution = new_resolution; let config = RefCell::borrow(&self.current_configuration); let event = ReconfigureEvent { configuration: config.deref(), resolution: new_resolution, only_resize, }; // Configure main fbo if let Some(t) = &mut self.framebuffer_scene_hdr_ehaa { let mut fbo = RefCell::borrow_mut(t); fbo.resize(event.resolution.0, event.resolution.1); } else { // Create fbo self.framebuffer_scene_hdr_ehaa = Some(Rc::new(RefCell::new({ let mut fbo = Framebuffer::new(event.resolution.0, event.resolution.1); fbo.add_attachment(FramebufferAttachment::from_new_texture(AttachmentPoint::Depth, ImageFormat::get(gl::DEPTH_COMPONENT32F))); fbo.add_attachment(FramebufferAttachment::from_new_texture(AttachmentPoint::Color(0), ImageFormat::get(gl::R11F_G11F_B10F))); fbo.add_attachment(FramebufferAttachment::from_new_texture(AttachmentPoint::Color(1), ImageFormat::get(gl::RGB8))); fbo.add_attachment(FramebufferAttachment::from_new_texture(AttachmentPoint::Color(2), ImageFormat::get(gl::RGB8))); // fbo.add_attachment(FramebufferAttachment::from_new_texture(AttachmentPoint::Color(1), ImageFormat::get(gl::RGBA8))); // fbo.add_attachment(FramebufferAttachment::from_new_texture(AttachmentPoint::Color(1), ImageFormat::get(gl::RG16_SNORM))); fbo.allocate(); fbo }))); } // Reconfigure subsystems self.separable_sss_system.reconfigure(event); // Drop config for now drop(config); // Create query object if self.frametime_query_object_gl == 0 { self.frametime_query_object_gl = unsafe { let mut query: gl::uint = 0; gl::CreateQueries(gl::TIME_ELAPSED, 1, &mut query); query }; } // Load shaders self.reload_shaders(); Ok(()) } fn reload_shaders(&mut self) { // let asset_folder = demo::demo_instance().asset_folder.as_mut().unwrap(); // Log println!("Reloading shaders!"); // Reload shaders from asset self.program_ehaa_scene.reload_from_asset().expect("Failed to reload scene shader from asset"); self.program_post_composite.reload_from_asset().expect("Failed to reload post composite shader from asset"); // // Delete old shaders // if let Some(program) = self.program_ehaa_scene.take() { // let mut program = RefCell::borrow_mut(&program); // program.delete(); // } // if let Some(program) = self.program_post_resolve.take() { // let mut program = RefCell::borrow_mut(&program); // program.delete(); // } // Reload shader from assets // // Load shaders // self.program_ehaa_scene = Some({ // let mut s = ShaderProgram::new_from_file( // &asset_folder.join("shaders/scene_ehaa.vert.glsl"), // &asset_folder.join("shaders/scene_ehaa.frag.glsl"), // Some(&asset_folder.join("shaders/scene_ehaa.tesseval.glsl")) //// None // ); // s.compile(); // Rc::new(RefCell::new(s)) // }); // self.program_post_resolve = Some({ // let mut s = ShaderProgram::new_from_file( // &asset_folder.join("shaders/post_resolve.vert.glsl"), // &asset_folder.join("shaders/post_resolve.frag.glsl"), // None // ); // s.compile(); // Rc::new(RefCell::new(s)) // }); // Reload subsystem shaders self.separable_sss_system.reload_shaders(); } pub fn do_render_frame(&mut self) { // Reload shaders if needed if self.queued_shader_reload { self.queued_shader_reload = false; self.reload_shaders(); } // Update cam state // LATER: Do this when rendering a scene: Get active camera from scene, make CameraState, calc proj matrix, pass state along in functions let active_camera = demo::demo_instance().get_test_camera(); let active_camera = if let Some(cam) = active_camera.upgrade() { cam } else { // No active camera, so don't render anything for now return; }; let camera_fovy: Rad<f32>; let camera_near_z: f32; let camera_far_z: f32; let cam_state = { let cam = Mutex::lock(&active_camera).unwrap(); let mut state = RenderCameraState::new(); // Get camera fovy // let projection: &dyn Any = cam.projection.as_ref(); // let projection: &PerspectiveProjection = projection.downcast_ref::<PerspectiveProjection>().unwrap(); camera_fovy = cam.projection.camera_fovy(); let (near_z, far_z) = cam.projection.test_depth_planes(); camera_near_z = near_z; camera_far_z = far_z; // Base matrix for our coordinate system ( let base_matrix = Matrix4::look_at_dir(Point3 {x: 0.0, y: 0.0, z: 0.0}, vec3(0.0, 0.0, 1.0), vec3(0.0, 1.0, 0.0)); // For some reason look_at_dir inverts the dir vector state.view_matrix = base_matrix * Matrix4::from(cam.rotation) * Matrix4::from_translation(-cam.translation); state.projection_matrix = cam.projection.projection_matrix(cam.viewport_size); state }; let viewprojection_matrix = cam_state.projection_matrix * cam_state.view_matrix; // Recompile shaders if self.program_ehaa_scene.needs_recompile() { self.program_ehaa_scene.do_recompile(); } if self.program_post_composite.needs_recompile() { self.program_post_composite.do_recompile(); } unsafe { gl::Disable(gl::FRAMEBUFFER_SRGB); gl::Disable(gl::BLEND); gl::Enable(gl::CULL_FACE); gl::FrontFace(gl::CCW); gl::CullFace(gl::FRONT); // For some reason we need to cull FRONT. This might be due to reverse-z flipping the winding order? gl::Enable(gl::DEPTH_TEST); // Setup NDC z axis for reverse float depth gl::DepthFunc(gl::GREATER); gl::ClearDepth(0.0); // 0.0 is far with reverse z gl::ClipControl(gl::LOWER_LEFT, gl::ZERO_TO_ONE); gl::DepthRange(0.0, 1.0); // Standard (non-inversed) depth range, we use a reverse-z projection matrix instead // Use scene shader let scene_shader = self.program_ehaa_scene.program().unwrap(); let scene_shader_gl = scene_shader.program_gl().unwrap(); gl::UseProgram(scene_shader_gl); // Bind scene framebuffer let scene_fbo = RefCell::borrow(self.framebuffer_scene_hdr_ehaa.need()); gl::BindFramebuffer(gl::FRAMEBUFFER, scene_fbo.handle_gl()); // Set the viewport gl::Viewport(0, 0, self.current_resolution.0 as gl::sizei, self.current_resolution.1 as gl::sizei); gl::ClearColor(0.0, 0.0, 0.0, 0.0); gl::Clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT); {// Upload matrices let model_matrix = Matrix4::from_scale(1.0); let model_matrix_arr: [[f32; 4]; 4] = model_matrix.into(); gl::UniformMatrix4fv(gl::GetUniformLocation(scene_shader_gl, "uMatrixModel\0".as_ptr() as *const gl::char), 1, gl::FALSE, model_matrix_arr.as_ptr() as *const gl::float); let view_matrix_arr: [[f32; 4]; 4] = cam_state.view_matrix.into(); gl::UniformMatrix4fv(gl::GetUniformLocation(scene_shader_gl, "uMatrixView\0".as_ptr() as *const gl::char), 1, gl::FALSE, view_matrix_arr.as_ptr() as *const gl::float); let viewprojection_matrix_arr: [[f32; 4]; 4] = viewprojection_matrix.into(); gl::UniformMatrix4fv(gl::GetUniformLocation(scene_shader_gl, "uMatrixViewProjection\0".as_ptr() as *const gl::char), 1, gl::FALSE, viewprojection_matrix_arr.as_ptr() as *const gl::float); } let start_frametimer = {// Start frametime timer let mut elapsed_frametime: u64 = std::u64::MAX; gl::GetQueryObjectui64v(self.frametime_query_object_gl, gl::QUERY_RESULT_NO_WAIT, &mut elapsed_frametime); if elapsed_frametime != std::u64::MAX { let _float_frametime = (elapsed_frametime as f64) / 1e6; // let title = format!("EHAA Demo ~ Frametime {} ms", float_frametime); // self.window.need_mut().set_title(title.as_str()); // Restart query gl::BeginQuery(gl::TIME_ELAPSED, self.frametime_query_object_gl); true } else { false } }; // Set tessellation state gl::PatchParameteri(gl::PATCH_VERTICES, 3); gl::PatchParameterfv(gl::PATCH_DEFAULT_OUTER_LEVEL, [1.0f32, 1.0f32, 1.0f32, 1.0f32].as_ptr()); gl::PatchParameterfv(gl::PATCH_DEFAULT_INNER_LEVEL, [1.0f32, 1.0f32].as_ptr()); gl::EnableVertexAttribArray(0); // gl::EnableVertexAttribArray(1); // gl::EnableVertexAttribArray(2); /* {// Draw teapot let test_teapot_vbo = demo::demo_instance().test_teapot_vbo.need(); gl::BindBuffer(gl::ARRAY_BUFFER, test_teapot_vbo.vbo_gl); gl::VertexAttribPointer(0, 3, gl::FLOAT, gl::FALSE, 0, 0 as *const gl::void); gl::DrawArrays(gl::PATCHES, 0, (crate::render::teapot::TEAPOT_VERTEX_DATA.len() / 3) as gl::sizei); } */ // /* {// Draw head model let test_head_model = demo::demo_instance().test_head_model.need(); // Bind textures gl::BindTextureUnit(1, test_head_model.tex_albedo.texture_gl()); gl::BindTextureUnit(2, test_head_model.tex_normal.texture_gl()); gl::BindTextureUnit(4, test_head_model.tex_transmission.texture_gl()); gl::BindBuffer(gl::ARRAY_BUFFER, test_head_model.vertex_buffer_gl); // let stride = 8*4; let stride = 12*4; gl::EnableVertexAttribArray(0); gl::EnableVertexAttribArray(1); gl::EnableVertexAttribArray(2); gl::EnableVertexAttribArray(3); gl::VertexAttribPointer(0, 3, gl::FLOAT, gl::FALSE, stride, 0 as *const gl::void); // vertex gl::VertexAttribPointer(1, 2, gl::FLOAT, gl::FALSE, stride, (3*4 + 3*4) as *const gl::void); // texcoord gl::VertexAttribPointer(2, 3, gl::FLOAT, gl::FALSE, stride, (3*4) as *const gl::void); // normal gl::VertexAttribPointer(3, 4, gl::FLOAT, gl::FALSE, stride, (3*4 + 3*4 + 2*4) as *const gl::void); // tangent gl::BindBuffer(gl::ELEMENT_ARRAY_BUFFER, test_head_model.index_buffer_gl); gl::DrawElements(gl::PATCHES, test_head_model.num_indices as gl::sizei, gl::UNSIGNED_INT, 0 as *const gl::void); // gl::DrawElements(gl::TRIANGLES, self.test_head_model.need().num_indices as gl::GLsizei, gl::UNSIGNED_INT, 0 as *const std::ffi::c_void); gl::DisableVertexAttribArray(0); gl::DisableVertexAttribArray(1); gl::DisableVertexAttribArray(2); gl::DisableVertexAttribArray(3); } // */ /* {// Draw debug triangles gl::Begin(gl::PATCHES); // gl::VertexAttrib3f(2, 1.0, 0.616, 0.984); // gl::VertexAttribI1ui(1, 0); gl::VertexAttrib3f(0, 0.0, 0.1, 0.0); // gl::VertexAttribI1ui(1, 1); gl::VertexAttrib3f(0, 0.5, 0.2, 0.0); let (mouse_x, mouse_y) = demo::demo_instance().window.need().get_cursor_pos(); // gl::VertexAttribI1ui(1, 2); gl::VertexAttrib3f(0, (mouse_x / 1280.0) as f32 * 2.0 - 1.0, 1.0 - (mouse_y / 720.0) as f32 * 2.0, 0.0); // gl::Vertex3f(0.1, 0.6 + 0.2*(std::time::UNIX_EPOCH.elapsed().unwrap().as_secs_f32()).sin(), 0.0); // gl::Vertex3f(0.1, 0.6, 0.0); // gl::VertexAttrib3f(2, 0.153, 0.0, 1.0); // gl::VertexAttribI1ui(1, 0); gl::VertexAttrib3f(0, 0.0, 0.1, 0.0); // gl::VertexAttribI1ui(1, 1); gl::VertexAttrib3f(0, 0.2, 0.6, 0.0); // gl::VertexAttribI1ui(1, 2); // gl::VertexAttrib3f(0, (mouse_x / 1280.0) as f32 * 2.0 - 1.0, 1.0 - (mouse_y / 720.0) as f32 * 2.0, 0.0); gl::End(); } */ {// Resolve separable sss let main_fbo = RefCell::borrow(self.framebuffer_scene_hdr_ehaa.need()); let scene_hdr_rt = RefCell::borrow(&main_fbo.get_attachment(AttachmentPoint::Color(0)).unwrap().texture); let scene_depth_rt = RefCell::borrow(&main_fbo.get_attachment(AttachmentPoint::Depth).unwrap().texture); // Render ssss self.separable_sss_system.do_resolve_sss(&scene_hdr_rt, &scene_depth_rt, camera_fovy, (camera_near_z, camera_far_z)); } {// Do ehaa resolve pass let post_resolve_shader = self.program_post_composite.program().unwrap(); // // DEBUG: Blit framebuffer // gl::BlitNamedFramebuffer(self.framebuffer_scene_hdr_ehaa.need().handle_gl(), 0, 0, 0, 1280, 720, 0, 0, 1280, 720, gl::COLOR_BUFFER_BIT, gl::NEAREST); gl::Disable(gl::DEPTH_TEST); // Bind resolve shader gl::UseProgram(post_resolve_shader.program_gl().unwrap()); // Bind shaders let main_fbo = RefCell::borrow(self.framebuffer_scene_hdr_ehaa.need()); // gl::BindTextureUnit(0, RefCell::borrow(&main_fbo.get_attachment(AttachmentPoint::Color(0)).unwrap().texture).texture_gl()); gl::BindTextureUnit(0, RefCell::borrow(&self.separable_sss_system.fbo_resolve_final.get_attachment(AttachmentPoint::Color(0)).unwrap().texture).texture_gl()); gl::BindTextureUnit(1, RefCell::borrow(&main_fbo.get_attachment(AttachmentPoint::Color(1)).unwrap().texture).texture_gl()); gl::BindTextureUnit(2, RefCell::borrow(&main_fbo.get_attachment(AttachmentPoint::Color(2)).unwrap().texture).texture_gl()); // Bind back buffer gl::BindFramebuffer(gl::FRAMEBUFFER, 0); // Draw oversized fullscreen triangles gl::DisableVertexAttribArray(0); gl::DisableVertexAttribArray(1); gl::DisableVertexAttribArray(2); gl::DrawArrays(gl::TRIANGLES, 0, 3); } // End frametimer query if start_frametimer { gl::EndQuery(gl::TIME_ELAPSED); } } } pub fn queue_shader_reload(&mut self) { self.queued_shader_reload = true; } } pub struct GraphicsConfiguration { } impl GraphicsConfiguration { pub fn new() -> GraphicsConfiguration { GraphicsConfiguration {} } } pub struct ReconfigureEvent<'a> { pub configuration: &'a GraphicsConfiguration, pub resolution: (u32, u32), pub only_resize: bool, } pub struct RenderCameraState { pub projection_matrix: Matrix4<f32>, pub view_matrix: Matrix4<f32>, } impl RenderCameraState { pub fn new() -> RenderCameraState { RenderCameraState { projection_matrix: Matrix4::identity(), view_matrix: Matrix4::identity(), } } }
// maps mob names to their IDs and vice versa use bimap::BiBTreeMap; use lazy_static::lazy_static; lazy_static! { pub static ref MOBS: BiBTreeMap<i64, &'static str> = { let mut map = BiBTreeMap::new(); map.insert(3, "Bat"); map.insert(4, "Bee"); map.insert(5, "Blaze"); map.insert(7, "Cat"); map.insert(8, "Cave Spider"); map.insert(9, "Chicken"); map.insert(10, "Cod"); map.insert(11, "Cow"); map.insert(12, "Creeper"); map.insert(13, "Dolphin"); map.insert(14, "Donkey"); map.insert(16, "Drowned"); map.insert(17, "Elder Guardian"); map.insert(19, "Ender Dragon"); map.insert(20, "Enderman"); map.insert(21, "Endermite"); map.insert(23, "Evoker Fangs"); map.insert(28, "Fox"); map.insert(29, "Ghast"); map.insert(30, "Giant"); map.insert(31, "Guardian"); map.insert(32, "Hoglin"); map.insert(33, "Horse"); map.insert(34, "Husk"); map.insert(35, "Illusioner"); map.insert(42, "Llama"); map.insert(44, "Magma Cube"); map.insert(52, "Mule"); map.insert(53, "Mushroom"); map.insert(54, "Ocelot"); map.insert(56, "Panda"); map.insert(57, "Parrot"); map.insert(58, "Phantom"); map.insert(59, "Pig"); map.insert(60, "Piglin"); map.insert(61, "Piglin Brute"); map.insert(62, "Pillager"); map.insert(63, "Polar Bear"); map.insert(65, "Pufferfish"); map.insert(66, "Rabbit"); map.insert(67, "Ravager"); map.insert(68, "Salmon"); map.insert(69, "Sheep"); map.insert(70, "Shulker"); map.insert(72, "Silverfish"); map.insert(73, "Skeleton"); map.insert(74, "Skeleton Horse"); map.insert(75, "Slime"); map.insert(77, "Snow Golem"); map.insert(80, "Spider"); map.insert(81, "Squid"); map.insert(82, "Stray"); map.insert(83, "Strider"); map.insert(89, "Trader Llama"); map.insert(90, "Tropical Fish"); map.insert(91, "Turtle"); map.insert(92, "Vex"); map.insert(93, "Villager"); map.insert(94, "Vindicator"); map.insert(95, "Wandering Trader"); map.insert(96, "Witch"); map.insert(97, "Wither"); map.insert(98, "Wither Skeleton"); map.insert(100, "Wolf"); map.insert(101, "Zoglin"); map.insert(102, "Zombie"); map.insert(103, "Zombie Horse"); map.insert(104, "Zombie Villager"); map.insert(105, "Zombified Piglin"); map }; }
fn sentido() -> String { "HAcerla chillar".to_string() } fn senectud() -> i32 { let edad = 90; edad } fn main() { println!("El sentido de la vida: {}", sentido()); println!("Cuando empieza la senectud: {}", senectud()); }
use crate::Data; use crate::ExtensionValue; use chrono::prelude::{DateTime, FixedOffset}; use serde_derive::{Deserialize, Serialize}; use std::collections::HashMap; /// CloudEvent according to spec version 0.2 #[derive(Debug, Serialize, Deserialize, PartialEq, Clone)] pub struct CloudEventV0_2 { #[serde(rename = "type")] event_type: String, specversion: String, source: String, id: String, #[serde(default)] #[serde(skip_serializing_if = "Option::is_none")] time: Option<DateTime<FixedOffset>>, #[serde(default)] #[serde(skip_serializing_if = "Option::is_none")] schemaurl: Option<String>, #[serde(default)] #[serde(skip_serializing_if = "Option::is_none")] contenttype: Option<String>, #[serde(default)] #[serde(skip_serializing_if = "Option::is_none")] data: Option<Data>, #[serde(default)] #[serde(skip_serializing_if = "Option::is_none")] extensions: Option<HashMap<String, ExtensionValue>>, } impl CloudEventV0_2 { pub fn new( event_type: String, source: String, id: String, time: Option<DateTime<FixedOffset>>, schemaurl: Option<String>, contenttype: Option<String>, data: Option<Data>, extensions: Option<HashMap<String, ExtensionValue>>, ) -> Self { CloudEventV0_2 { event_type, specversion: String::from("0.2"), source, id, time, schemaurl, contenttype, data, extensions, } } /// Get the event type pub fn event_type(&self) -> &str { self.event_type.as_ref() } /// Get the source pub fn source(&self) -> &str { self.source.as_ref() } /// Get the event id pub fn event_id(&self) -> &str { self.id.as_ref() } /// Get the event time pub fn event_time(&self) -> Option<&DateTime<FixedOffset>> { self.time.as_ref() } /// Get the schemaurl pub fn schema_url(&self) -> Option<&str> { self.schemaurl.as_ref().map(|x| x.as_ref()) } /// Get the data pub fn data(&self) -> Option<&Data> { self.data.as_ref() } /// Get the datacontenttype pub fn contenttype(&self) -> Option<&str> { self.contenttype.as_ref().map(|x| x.as_ref()) } /// Get the extensions pub fn extensions(&self) -> Option<&HashMap<String, ExtensionValue>> { self.extensions.as_ref() } }
// api.rs // ====== // // Primary Python module and Rust-lib public API. use futures_util::FutureExt; use pyo3::{prelude::*, wrap_pyfunction}; use tokio_tungstenite::tungstenite::Message as WsMessage; use crate::server::{self, consumer_state::{self}}; use consumer_state as cs; /// Starts the websocket server. #[pyfunction] pub fn start_server(port: u32) -> bool { // For now, start_server can only be called if the server is not already running. if is_server_running() { consumer_state::weakly_record_error("Server is already running, can't invoke start_server().".to_string()); return false; } let server_started = server::start(port).is_ok(); if !server_started { return false; } println!("Server started."); return true; } /// Gets whether the server is running. #[pyfunction] pub fn is_server_running() -> bool { cs::read(&cs::CS_SER_ALIVE_RX, |rx| { println!("Returning server alive: {}", *rx.borrow()); *rx.borrow() }).unwrap_or_else(|| { println!("Failed to get server alive!"); false }) } /// Requests that the websocket server shut down. The server will not shut down immediately but will stop serving as soon as e.g. it processes the shutdown request and any existing network requests are resolved. #[pyfunction] pub fn shutdown_server() { let res = cs::mutate(&cs::CS_SER_REQ_SHUTDOWN_TX, |tx| tx.send(true)); if res.is_none() { println!("[api.rs] Warning! Failed to send shutdown request."); } } /// Returns a string describing the nature of the last error the server encountered. No error has been detected if this function returns None. #[pyfunction] pub fn get_last_error_string() -> Option<String> { consumer_state::try_get_last_error() } /// Retrieves a List (Rust: Vec<String>) of all new client connection events that have occurred since this function was last called. #[pyfunction] pub fn drain_new_client_events(py: Python) -> Vec<String> { py.allow_threads(|| { let drained_new_cli_evts = cs::mutate(&cs::CS_CLI_CONN_RX, |rx| { let mut new_cli_evts = vec![]; while let Some(Some(new_cli)) = rx.recv().now_or_never() { new_cli_evts.push(new_cli); } new_cli_evts }); if drained_new_cli_evts.is_none() { return vec![] } let drained_new_cli_evts = drained_new_cli_evts.unwrap(); drained_new_cli_evts }) } /// Valid message payloads in the list of messages to provide to try_send_message consist of strings (text messages) and bytes (binary messages). /// /// Passing any other type within the list of objects will raise an exception. #[derive(FromPyObject)] pub enum MessagePayload { #[pyo3(transparent, annotation = "str")] Text(String), #[pyo3(transparent, annotation = "bytes")] Binary(Vec<u8>) } impl IntoPy<PyObject> for MessagePayload { fn into_py(self, py: Python) -> PyObject { match self { MessagePayload::Text(text) => { pyo3::types::PyUnicode::new(py, text.as_str()).into() } MessagePayload::Binary(bytes) => { pyo3::types::PyBytes::new(py, &bytes).into() } } } } /// Send messages to all connected clients. The socket stream is flushed after buffering each message in the argument List, so it's better to call this once per 'update,' rather than calling this method multiple times if multiple messages are all available to be sent. /// /// The List may contain strings or bytes. /// /// Will return false if there are not currently any active subscribers (websocket clients), indicating no data was sent. False may also be returned if there was an error trying to access the broadcast channel in the first place (i.e. thread contention to access it). /// /// A return value of true does not guarantee all websocket clients received the message, as the tokio tasks for forwarding the messages to the clients must be able to receive the broadcast messages to forward them, which is subject to thread/task contention. #[pyfunction] pub fn try_send_messages(py: Python, messages: Vec<MessagePayload>) -> PyResult<()> { py.allow_threads(|| { // Create a Vec<WsMessage> out of the Vec<MessagePayload> so the backend is just working with the tungstenite WebSocket lib types. let messages: Vec<WsMessage> = messages.into_iter().map(|msg| { match msg { MessagePayload::Text(text) => { WsMessage::Text(text) } MessagePayload::Binary(bytes) => { WsMessage::Binary(bytes) } }}).collect(); let send_res = cs::read(&cs::CS_SER_MSG_TX, |tx| { // Send! tx.send(messages) }); // Check whether, and precisely how, we failed to send. if send_res.is_none() || send_res.as_ref().unwrap().is_err() { let details = "Error reading server state for transmitter".to_string(); // if send_res.is_some() { // details = format!("{:?}", send_res.unwrap().err());return Err(pyo3::exceptions::PyBaseException::new_err(format!("Failed to send message. Details: {}", details))); // } // For now, only return an error if the send fails unrelated to the number of receivers, because we simply expect the message to go nowhere if there are no connected clients. if send_res.is_none() { return Err(pyo3::exceptions::PyBaseException::new_err(format!("Failed to send message. Details: {}", details))); } // weakly_record_error(format!("Failed to send message. Details: {}", details)); // return Err(pyo3::exceptions::PyBaseException::new_err(format!("Failed to send message. Details: {}", details))); } Ok(()) }) } /// Drains all messages pending from all clients and returns them as a list[bytes]. Note that clients are not distinguished, so clients will have to self-identify in their messages, or the library will need to change to return messages per-client or bundled with client connection info. #[pyfunction] pub fn drain_client_messages(py: Python) -> Vec<MessagePayload> { py.allow_threads(|| { let drained_messages = cs::mutate(&cs::CS_CLI_MSG_RX, |rx| { let mut messages = vec![]; // Apparently there's an issue with try_recv() where messages may not be immediately available once submitted to the channel (they may be subject to a slight delay). // Details: https://github.com/tokio-rs/tokio/issues/3350 // TODO: May look into using flume, with some tokio-based sync primitive on the tokio task side. while let Some(Some(cli_msg)) = rx.recv().now_or_never() { // Convert the message into the python-convertible MessagePayload type. // For now, we ignore the ping/pong and Close websocket messages. let converted_msg = match cli_msg { WsMessage::Text(text) => { Some(MessagePayload::Text(text)) } WsMessage::Binary(bytes) => { Some(MessagePayload::Binary(bytes)) } WsMessage::Ping(_) => { None } WsMessage::Pong(_) => { None } WsMessage::Close(_) => { None } }; if converted_msg.is_some() { messages.push(converted_msg.unwrap()); } } messages }); if drained_messages.is_none() { return vec![]; } let drained_messages = drained_messages.unwrap(); drained_messages }) } /// Defines the actual python module for pyo3 to generate. #[pymodule] fn quicksocket(_py: Python, m: &PyModule) -> PyResult<()> { m.add_function(wrap_pyfunction!(start_server, m)?)?; m.add_function(wrap_pyfunction!(is_server_running, m)?)?; m.add_function(wrap_pyfunction!(shutdown_server, m)?)?; m.add_function(wrap_pyfunction!(get_last_error_string, m)?)?; m.add_function(wrap_pyfunction!(drain_new_client_events, m)?)?; m.add_function(wrap_pyfunction!(try_send_messages, m)?)?; m.add_function(wrap_pyfunction!(drain_client_messages, m)?)?; Ok(()) }
use crate::source_code::SourceLocation; // pub(crate) fn new_location_error( // index: usize, // field: &str, // vm: &VirtualMachine, // ) -> PyRef<PyBaseException> { // vm.new_value_error(format!("value {index} is too large for location {field}")) // } pub(crate) struct AtLocation<'a>(pub Option<&'a SourceLocation>); impl std::fmt::Display for AtLocation<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let (row, column) = self .0 .map_or((0, 0), |l| (l.row.to_usize(), l.column.to_usize())); write!(f, " at line {row} column {column}",) } }
use std::path::PathBuf; use crate::sensors_and_pools::stats::EmptyStats; use crate::traits::{CorpusDelta, Pool, SaveToStatsFolder}; use crate::{CompatibleWithObservations, PoolStorageIndex}; /// A pool that stores only one given test case. /// /// Currently, it can only be used by fuzzcheck itself /// because it requires a `PoolStorageIndex`, which only /// fuzzcheck can create. This will change at some point. pub struct UnitPool { input_index: PoolStorageIndex, } impl UnitPool { #[no_coverage] pub(crate) fn new(input_index: PoolStorageIndex) -> Self { Self { input_index } } } impl Pool for UnitPool { type Stats = EmptyStats; #[no_coverage] fn stats(&self) -> Self::Stats { EmptyStats } #[no_coverage] fn get_random_index(&mut self) -> Option<PoolStorageIndex> { Some(self.input_index) } } impl SaveToStatsFolder for UnitPool { #[no_coverage] fn save_to_stats_folder(&self) -> Vec<(PathBuf, Vec<u8>)> { vec![] } } impl<O> CompatibleWithObservations<O> for UnitPool { #[no_coverage] fn process<'a>(&'a mut self, _input_id: PoolStorageIndex, _observations: &O, _complexity: f64) -> Vec<CorpusDelta> { vec![] } }
// Copyright 2022 Datafuse Labs. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. use std::fmt::Display; use std::sync::Arc; use common_ast::ast::ExplainKind; use common_expression::types::DataType; use common_expression::DataField; use common_expression::DataSchema; use common_expression::DataSchemaRef; use common_expression::DataSchemaRefExt; use crate::optimizer::SExpr; use crate::plans::copy::CopyPlan; use crate::plans::insert::Insert; use crate::plans::presign::PresignPlan; use crate::plans::recluster_table::ReclusterTablePlan; use crate::plans::share::AlterShareTenantsPlan; use crate::plans::share::CreateSharePlan; use crate::plans::share::DescSharePlan; use crate::plans::share::DropSharePlan; use crate::plans::share::GrantShareObjectPlan; use crate::plans::share::RevokeShareObjectPlan; use crate::plans::share::ShowGrantTenantsOfSharePlan; use crate::plans::share::ShowObjectGrantPrivilegesPlan; use crate::plans::share::ShowSharesPlan; use crate::plans::AddTableColumnPlan; use crate::plans::AlterTableClusterKeyPlan; use crate::plans::AlterUDFPlan; use crate::plans::AlterUserPlan; use crate::plans::AlterViewPlan; use crate::plans::AnalyzeTablePlan; use crate::plans::CallPlan; use crate::plans::CreateCatalogPlan; use crate::plans::CreateDatabasePlan; use crate::plans::CreateFileFormatPlan; use crate::plans::CreateRolePlan; use crate::plans::CreateStagePlan; use crate::plans::CreateTablePlan; use crate::plans::CreateUDFPlan; use crate::plans::CreateUserPlan; use crate::plans::CreateViewPlan; use crate::plans::DeletePlan; use crate::plans::DescribeTablePlan; use crate::plans::DropCatalogPlan; use crate::plans::DropDatabasePlan; use crate::plans::DropFileFormatPlan; use crate::plans::DropRolePlan; use crate::plans::DropStagePlan; use crate::plans::DropTableClusterKeyPlan; use crate::plans::DropTableColumnPlan; use crate::plans::DropTablePlan; use crate::plans::DropUDFPlan; use crate::plans::DropUserPlan; use crate::plans::DropViewPlan; use crate::plans::ExistsTablePlan; use crate::plans::GrantPrivilegePlan; use crate::plans::GrantRolePlan; use crate::plans::KillPlan; use crate::plans::OptimizeTablePlan; use crate::plans::RemoveStagePlan; use crate::plans::RenameDatabasePlan; use crate::plans::RenameTablePlan; use crate::plans::Replace; use crate::plans::RevertTablePlan; use crate::plans::RevokePrivilegePlan; use crate::plans::RevokeRolePlan; use crate::plans::SetRolePlan; use crate::plans::SettingPlan; use crate::plans::ShowCreateCatalogPlan; use crate::plans::ShowCreateDatabasePlan; use crate::plans::ShowCreateTablePlan; use crate::plans::ShowFileFormatsPlan; use crate::plans::ShowGrantsPlan; use crate::plans::ShowRolesPlan; use crate::plans::TruncateTablePlan; use crate::plans::UnSettingPlan; use crate::plans::UndropDatabasePlan; use crate::plans::UndropTablePlan; use crate::plans::UpdatePlan; use crate::plans::UseDatabasePlan; use crate::BindContext; use crate::MetadataRef; #[derive(Clone, Debug)] pub enum Plan { // `SELECT` statement Query { s_expr: Box<SExpr>, metadata: MetadataRef, bind_context: Box<BindContext>, rewrite_kind: Option<RewriteKind>, // Use for generate query result cache key. formatted_ast: Option<String>, ignore_result: bool, }, Explain { kind: ExplainKind, plan: Box<Plan>, }, ExplainAst { formatted_string: String, }, ExplainSyntax { formatted_sql: String, }, ExplainAnalyze { plan: Box<Plan>, }, // Copy Copy(Box<CopyPlan>), // Call Call(Box<CallPlan>), // Catalogs ShowCreateCatalog(Box<ShowCreateCatalogPlan>), CreateCatalog(Box<CreateCatalogPlan>), DropCatalog(Box<DropCatalogPlan>), // Databases ShowCreateDatabase(Box<ShowCreateDatabasePlan>), CreateDatabase(Box<CreateDatabasePlan>), DropDatabase(Box<DropDatabasePlan>), UndropDatabase(Box<UndropDatabasePlan>), RenameDatabase(Box<RenameDatabasePlan>), UseDatabase(Box<UseDatabasePlan>), // Tables ShowCreateTable(Box<ShowCreateTablePlan>), DescribeTable(Box<DescribeTablePlan>), CreateTable(Box<CreateTablePlan>), DropTable(Box<DropTablePlan>), UndropTable(Box<UndropTablePlan>), RenameTable(Box<RenameTablePlan>), AddTableColumn(Box<AddTableColumnPlan>), DropTableColumn(Box<DropTableColumnPlan>), AlterTableClusterKey(Box<AlterTableClusterKeyPlan>), DropTableClusterKey(Box<DropTableClusterKeyPlan>), ReclusterTable(Box<ReclusterTablePlan>), RevertTable(Box<RevertTablePlan>), TruncateTable(Box<TruncateTablePlan>), OptimizeTable(Box<OptimizeTablePlan>), AnalyzeTable(Box<AnalyzeTablePlan>), ExistsTable(Box<ExistsTablePlan>), // Insert Insert(Box<Insert>), Replace(Box<Replace>), Delete(Box<DeletePlan>), Update(Box<UpdatePlan>), // Views CreateView(Box<CreateViewPlan>), AlterView(Box<AlterViewPlan>), DropView(Box<DropViewPlan>), // Account AlterUser(Box<AlterUserPlan>), CreateUser(Box<CreateUserPlan>), DropUser(Box<DropUserPlan>), // UDF CreateUDF(Box<CreateUDFPlan>), AlterUDF(Box<AlterUDFPlan>), DropUDF(Box<DropUDFPlan>), // Role ShowRoles(Box<ShowRolesPlan>), CreateRole(Box<CreateRolePlan>), DropRole(Box<DropRolePlan>), GrantRole(Box<GrantRolePlan>), GrantPriv(Box<GrantPrivilegePlan>), ShowGrants(Box<ShowGrantsPlan>), RevokePriv(Box<RevokePrivilegePlan>), RevokeRole(Box<RevokeRolePlan>), SetRole(Box<SetRolePlan>), // FileFormat CreateFileFormat(Box<CreateFileFormatPlan>), DropFileFormat(Box<DropFileFormatPlan>), ShowFileFormats(Box<ShowFileFormatsPlan>), // Stages CreateStage(Box<CreateStagePlan>), DropStage(Box<DropStagePlan>), RemoveStage(Box<RemoveStagePlan>), // Presign Presign(Box<PresignPlan>), // Set SetVariable(Box<SettingPlan>), UnSetVariable(Box<UnSettingPlan>), Kill(Box<KillPlan>), // Share CreateShare(Box<CreateSharePlan>), DropShare(Box<DropSharePlan>), GrantShareObject(Box<GrantShareObjectPlan>), RevokeShareObject(Box<RevokeShareObjectPlan>), AlterShareTenants(Box<AlterShareTenantsPlan>), DescShare(Box<DescSharePlan>), ShowShares(Box<ShowSharesPlan>), ShowObjectGrantPrivileges(Box<ShowObjectGrantPrivilegesPlan>), ShowGrantTenantsOfShare(Box<ShowGrantTenantsOfSharePlan>), } #[derive(Clone, Debug)] pub enum RewriteKind { ShowSettings, ShowMetrics, ShowProcessList, ShowEngines, ShowCatalogs, ShowDatabases, ShowTables, ShowColumns, ShowTablesStatus, ShowFunctions, ShowTableFunctions, ShowUsers, ShowStages, DescribeStage, ListStage, ShowRoles, } impl Display for Plan { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Plan::Query { .. } => write!(f, "Query"), Plan::Copy(_) => write!(f, "Copy"), Plan::Explain { .. } => write!(f, "Explain"), Plan::ExplainAnalyze { .. } => write!(f, "ExplainAnalyze"), Plan::ShowCreateCatalog(_) => write!(f, "ShowCreateCatalog"), Plan::CreateCatalog(_) => write!(f, "CreateCatalog"), Plan::DropCatalog(_) => write!(f, "DropCatalog"), Plan::ShowCreateDatabase(_) => write!(f, "ShowCreateDatabase"), Plan::CreateDatabase(_) => write!(f, "CreateDatabase"), Plan::DropDatabase(_) => write!(f, "DropDatabase"), Plan::UndropDatabase(_) => write!(f, "UndropDatabase"), Plan::UseDatabase(_) => write!(f, "UseDatabase"), Plan::RenameDatabase(_) => write!(f, "RenameDatabase"), Plan::ShowCreateTable(_) => write!(f, "ShowCreateTable"), Plan::DescribeTable(_) => write!(f, "DescribeTable"), Plan::CreateTable(_) => write!(f, "CreateTable"), Plan::DropTable(_) => write!(f, "DropTable"), Plan::UndropTable(_) => write!(f, "UndropTable"), Plan::RenameTable(_) => write!(f, "RenameTable"), Plan::AddTableColumn(_) => write!(f, "AddTableColumn"), Plan::DropTableColumn(_) => write!(f, "DropTableColumn"), Plan::AlterTableClusterKey(_) => write!(f, "AlterTableClusterKey"), Plan::DropTableClusterKey(_) => write!(f, "DropTableClusterKey"), Plan::ReclusterTable(_) => write!(f, "ReclusterTable"), Plan::TruncateTable(_) => write!(f, "TruncateTable"), Plan::OptimizeTable(_) => write!(f, "OptimizeTable"), Plan::AnalyzeTable(_) => write!(f, "AnalyzeTable"), Plan::ExistsTable(_) => write!(f, "ExistsTable"), Plan::CreateView(_) => write!(f, "CreateView"), Plan::AlterView(_) => write!(f, "AlterView"), Plan::DropView(_) => write!(f, "DropView"), Plan::AlterUser(_) => write!(f, "AlterUser"), Plan::CreateUser(_) => write!(f, "CreateUser"), Plan::DropUser(_) => write!(f, "DropUser"), Plan::CreateRole(_) => write!(f, "CreateRole"), Plan::DropRole(_) => write!(f, "DropRole"), Plan::CreateStage(_) => write!(f, "CreateStage"), Plan::DropStage(_) => write!(f, "DropStage"), Plan::CreateFileFormat(_) => write!(f, "CreateFileFormat"), Plan::DropFileFormat(_) => write!(f, "DropFileFormat"), Plan::ShowFileFormats(_) => write!(f, "ShowFileFormats"), Plan::RemoveStage(_) => write!(f, "RemoveStage"), Plan::GrantRole(_) => write!(f, "GrantRole"), Plan::GrantPriv(_) => write!(f, "GrantPriv"), Plan::ShowGrants(_) => write!(f, "ShowGrants"), Plan::ShowRoles(_) => write!(f, "ShowRoles"), Plan::RevokePriv(_) => write!(f, "RevokePriv"), Plan::RevokeRole(_) => write!(f, "RevokeRole"), Plan::CreateUDF(_) => write!(f, "CreateUDF"), Plan::AlterUDF(_) => write!(f, "AlterUDF"), Plan::DropUDF(_) => write!(f, "DropUDF"), Plan::Insert(_) => write!(f, "Insert"), Plan::Replace(_) => write!(f, "Replace"), Plan::Delete(_) => write!(f, "Delete"), Plan::Update(_) => write!(f, "Update"), Plan::Call(_) => write!(f, "Call"), Plan::Presign(_) => write!(f, "Presign"), Plan::SetVariable(_) => write!(f, "SetVariable"), Plan::UnSetVariable(_) => write!(f, "UnSetVariable"), Plan::SetRole(_) => write!(f, "SetRole"), Plan::Kill(_) => write!(f, "Kill"), Plan::CreateShare(_) => write!(f, "CreateShare"), Plan::DropShare(_) => write!(f, "DropShare"), Plan::GrantShareObject(_) => write!(f, "GrantShareObject"), Plan::RevokeShareObject(_) => write!(f, "RevokeShareObject"), Plan::AlterShareTenants(_) => write!(f, "AlterShareTenants"), Plan::DescShare(_) => write!(f, "DescShare"), Plan::ShowShares(_) => write!(f, "ShowShares"), Plan::ShowObjectGrantPrivileges(_) => write!(f, "ShowObjectGrantPrivileges"), Plan::ShowGrantTenantsOfShare(_) => write!(f, "ShowGrantTenantsOfShare"), Plan::ExplainAst { .. } => write!(f, "ExplainAst"), Plan::ExplainSyntax { .. } => write!(f, "ExplainSyntax"), Plan::RevertTable(..) => write!(f, "RevertTable"), } } } impl Plan { /// Notice: This is incomplete and should be only used when you know it must has schema (Plan::Query | Plan::Insert ...). /// If you want to get the real schema from plan use `InterpreterFactory::get_schema()` instead pub fn schema(&self) -> DataSchemaRef { match self { Plan::Query { s_expr: _, metadata: _, bind_context, .. } => bind_context.output_schema(), Plan::Explain { .. } | Plan::ExplainAst { .. } | Plan::ExplainSyntax { .. } => { DataSchemaRefExt::create(vec![DataField::new("explain", DataType::String)]) } Plan::ExplainAnalyze { .. } => { DataSchemaRefExt::create(vec![DataField::new("explain", DataType::String)]) } Plan::Copy(_) => Arc::new(DataSchema::empty()), Plan::ShowCreateCatalog(plan) => plan.schema(), Plan::CreateCatalog(plan) => plan.schema(), Plan::DropCatalog(plan) => plan.schema(), Plan::ShowCreateDatabase(plan) => plan.schema(), Plan::CreateDatabase(plan) => plan.schema(), Plan::UseDatabase(_) => Arc::new(DataSchema::empty()), Plan::DropDatabase(plan) => plan.schema(), Plan::UndropDatabase(plan) => plan.schema(), Plan::RenameDatabase(plan) => plan.schema(), Plan::ShowCreateTable(plan) => plan.schema(), Plan::DescribeTable(plan) => plan.schema(), Plan::CreateTable(plan) => plan.schema(), Plan::DropTable(plan) => plan.schema(), Plan::UndropTable(plan) => plan.schema(), Plan::RenameTable(plan) => plan.schema(), Plan::AddTableColumn(plan) => plan.schema(), Plan::DropTableColumn(plan) => plan.schema(), Plan::AlterTableClusterKey(plan) => plan.schema(), Plan::DropTableClusterKey(plan) => plan.schema(), Plan::ReclusterTable(plan) => plan.schema(), Plan::TruncateTable(plan) => plan.schema(), Plan::OptimizeTable(plan) => plan.schema(), Plan::AnalyzeTable(plan) => plan.schema(), Plan::ExistsTable(plan) => plan.schema(), Plan::CreateView(plan) => plan.schema(), Plan::AlterView(plan) => plan.schema(), Plan::DropView(plan) => plan.schema(), Plan::AlterUser(plan) => plan.schema(), Plan::CreateUser(plan) => plan.schema(), Plan::DropUser(plan) => plan.schema(), Plan::CreateRole(plan) => plan.schema(), Plan::DropRole(plan) => plan.schema(), Plan::ShowRoles(plan) => plan.schema(), Plan::GrantRole(plan) => plan.schema(), Plan::GrantPriv(plan) => plan.schema(), Plan::ShowGrants(plan) => plan.schema(), Plan::CreateStage(plan) => plan.schema(), Plan::DropStage(plan) => plan.schema(), Plan::RemoveStage(plan) => plan.schema(), Plan::CreateFileFormat(plan) => plan.schema(), Plan::DropFileFormat(plan) => plan.schema(), Plan::ShowFileFormats(plan) => plan.schema(), Plan::RevokePriv(_) => Arc::new(DataSchema::empty()), Plan::RevokeRole(_) => Arc::new(DataSchema::empty()), Plan::CreateUDF(_) => Arc::new(DataSchema::empty()), Plan::AlterUDF(_) => Arc::new(DataSchema::empty()), Plan::DropUDF(_) => Arc::new(DataSchema::empty()), Plan::Insert(plan) => plan.schema(), Plan::Replace(plan) => plan.schema(), Plan::Delete(_) => Arc::new(DataSchema::empty()), Plan::Update(_) => Arc::new(DataSchema::empty()), Plan::Call(_) => Arc::new(DataSchema::empty()), Plan::Presign(plan) => plan.schema(), Plan::SetVariable(plan) => plan.schema(), Plan::UnSetVariable(plan) => plan.schema(), Plan::SetRole(plan) => plan.schema(), Plan::Kill(_) => Arc::new(DataSchema::empty()), Plan::CreateShare(plan) => plan.schema(), Plan::DropShare(plan) => plan.schema(), Plan::GrantShareObject(plan) => plan.schema(), Plan::RevokeShareObject(plan) => plan.schema(), Plan::AlterShareTenants(plan) => plan.schema(), Plan::DescShare(plan) => plan.schema(), Plan::ShowShares(plan) => plan.schema(), Plan::ShowObjectGrantPrivileges(plan) => plan.schema(), Plan::ShowGrantTenantsOfShare(plan) => plan.schema(), Plan::RevertTable(plan) => plan.schema(), } } }
#[macro_use] pub mod core; pub mod graphics; pub mod device; pub mod debug; #[macro_use] pub mod numeric; pub mod sound;
// Copyright 2017 rust-ipfs-api Developers // // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // http://opensource.org/licenses/MIT>, at your option. This file may not be // copied, modified, or distributed except according to those terms. // use crate::request::ApiRequest; use serde::Serialize; #[cfg_attr(feature = "with-builder", derive(TypedBuilder))] #[derive(Serialize, Default)] #[serde(rename_all = "kebab-case")] pub struct Ls<'a> { #[serde(rename = "arg")] pub path: &'a str, /// Resolve linked objects to find out their types. Default: `true` #[cfg_attr(feature = "with-builder", builder(default, setter(strip_option)))] pub resolve_type: Option<bool>, /// Resolve linked objects to find out their file size. Default: `true` #[cfg_attr(feature = "with-builder", builder(default, setter(strip_option)))] pub size: Option<bool>, /// Enable experimental streaming of directory entries as they are traversed. #[cfg_attr(feature = "with-builder", builder(default, setter(strip_option)))] pub stream: Option<bool>, } impl<'a> ApiRequest for Ls<'a> { const PATH: &'static str = "/ls"; } #[cfg(test)] mod tests { use super::Ls; serialize_url_test!( test_serializes_0, Ls { path: "test", ..Default::default() }, "arg=test" ); serialize_url_test!( test_serializes_1, Ls { path: "asdf", resolve_type: Some(true), size: Some(true), stream: Some(false) }, "arg=asdf&resolve-type=true&size=true&stream=false" ); }