text
stringlengths
8
4.13M
use std::f64::consts::PI; use std::sync::{Arc, Mutex}; use std::thread; use std::time::{Duration, SystemTime}; const TARGET: u32 = 10; const GUESS: u32 = 100; struct Leibniz { x: f64, d: f64, ticks: u32, tocks: u32, } fn computer(state: Arc<Mutex<Leibniz>>) { loop { let mut s = state.lock().unwrap(); for _ in 1..s.ticks { s.x += 1.0 / s.d; s.d += 2.0; s.x -= 1.0 / s.d; s.d += 2.0; } s.tocks += 1; } } fn inspector(state: Arc<Mutex<Leibniz>>) { let mut old_d = 1.0; let now = SystemTime::now(); loop { thread::sleep(Duration::from_secs(1)); let mut s = state.lock().unwrap(); if s.tocks <= TARGET { s.ticks /= 2; } else if s.tocks > TARGET { s.ticks = s.ticks + s.ticks / 10; } println!("{:?} {} {} {} {}", now.elapsed().unwrap(), s.ticks, s.tocks, s.d - old_d, PI - 4.0 * s.x); old_d = s.d; s.tocks = 0; } } fn main() { println!("ARC std version"); let state = Arc::new(Mutex::new(Leibniz { x: 0.0, d: 1.0, ticks: GUESS, tocks: 0, })); let state_i = state.clone(); thread::spawn(move || computer(state)); inspector(state_i); }
#[doc = "Reader of register EM23PERNORETAINCTRL"] pub type R = crate::R<u32, super::EM23PERNORETAINCTRL>; #[doc = "Writer for register EM23PERNORETAINCTRL"] pub type W = crate::W<u32, super::EM23PERNORETAINCTRL>; #[doc = "Register EM23PERNORETAINCTRL `reset()`'s with value 0"] impl crate::ResetValue for super::EM23PERNORETAINCTRL { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `ACMP0DIS`"] pub type ACMP0DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `ACMP0DIS`"] pub struct ACMP0DIS_W<'a> { w: &'a mut W, } impl<'a> ACMP0DIS_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 `ACMP1DIS`"] pub type ACMP1DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `ACMP1DIS`"] pub struct ACMP1DIS_W<'a> { w: &'a mut W, } impl<'a> ACMP1DIS_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 `PCNT0DIS`"] pub type PCNT0DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `PCNT0DIS`"] pub struct PCNT0DIS_W<'a> { w: &'a mut W, } impl<'a> PCNT0DIS_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 `PCNT1DIS`"] pub type PCNT1DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `PCNT1DIS`"] pub struct PCNT1DIS_W<'a> { w: &'a mut W, } impl<'a> PCNT1DIS_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 `PCNT2DIS`"] pub type PCNT2DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `PCNT2DIS`"] pub struct PCNT2DIS_W<'a> { w: &'a mut W, } impl<'a> PCNT2DIS_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 `I2C0DIS`"] pub type I2C0DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `I2C0DIS`"] pub struct I2C0DIS_W<'a> { w: &'a mut W, } impl<'a> I2C0DIS_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 `I2C1DIS`"] pub type I2C1DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `I2C1DIS`"] pub struct I2C1DIS_W<'a> { w: &'a mut W, } impl<'a> I2C1DIS_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 `VDAC0DIS`"] pub type VDAC0DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `VDAC0DIS`"] pub struct VDAC0DIS_W<'a> { w: &'a mut W, } impl<'a> VDAC0DIS_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 << 7)) | (((value as u32) & 0x01) << 7); self.w } } #[doc = "Reader of field `IDAC0DIS`"] pub type IDAC0DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `IDAC0DIS`"] pub struct IDAC0DIS_W<'a> { w: &'a mut W, } impl<'a> IDAC0DIS_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 << 8)) | (((value as u32) & 0x01) << 8); self.w } } #[doc = "Reader of field `ADC0DIS`"] pub type ADC0DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `ADC0DIS`"] pub struct ADC0DIS_W<'a> { w: &'a mut W, } impl<'a> ADC0DIS_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 `LETIMER0DIS`"] pub type LETIMER0DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `LETIMER0DIS`"] pub struct LETIMER0DIS_W<'a> { w: &'a mut W, } impl<'a> LETIMER0DIS_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 << 10)) | (((value as u32) & 0x01) << 10); self.w } } #[doc = "Reader of field `WDOG0DIS`"] pub type WDOG0DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `WDOG0DIS`"] pub struct WDOG0DIS_W<'a> { w: &'a mut W, } impl<'a> WDOG0DIS_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 << 11)) | (((value as u32) & 0x01) << 11); self.w } } #[doc = "Reader of field `WDOG1DIS`"] pub type WDOG1DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `WDOG1DIS`"] pub struct WDOG1DIS_W<'a> { w: &'a mut W, } impl<'a> WDOG1DIS_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 << 12)) | (((value as u32) & 0x01) << 12); self.w } } #[doc = "Reader of field `LESENSE0DIS`"] pub type LESENSE0DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `LESENSE0DIS`"] pub struct LESENSE0DIS_W<'a> { w: &'a mut W, } impl<'a> LESENSE0DIS_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 << 13)) | (((value as u32) & 0x01) << 13); self.w } } #[doc = "Reader of field `CSENDIS`"] pub type CSENDIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `CSENDIS`"] pub struct CSENDIS_W<'a> { w: &'a mut W, } impl<'a> CSENDIS_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 << 14)) | (((value as u32) & 0x01) << 14); self.w } } #[doc = "Reader of field `LEUART0DIS`"] pub type LEUART0DIS_R = crate::R<bool, bool>; #[doc = "Write proxy for field `LEUART0DIS`"] pub struct LEUART0DIS_W<'a> { w: &'a mut W, } impl<'a> LEUART0DIS_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 << 15)) | (((value as u32) & 0x01) << 15); self.w } } impl R { #[doc = "Bit 0 - Allow Power Down of ACMP0 During EM23"] #[inline(always)] pub fn acmp0dis(&self) -> ACMP0DIS_R { ACMP0DIS_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Allow Power Down of ACMP1 During EM23"] #[inline(always)] pub fn acmp1dis(&self) -> ACMP1DIS_R { ACMP1DIS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Allow Power Down of PCNT0 During EM23"] #[inline(always)] pub fn pcnt0dis(&self) -> PCNT0DIS_R { PCNT0DIS_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Allow Power Down of PCNT1 During EM23"] #[inline(always)] pub fn pcnt1dis(&self) -> PCNT1DIS_R { PCNT1DIS_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Allow Power Down of PCNT2 During EM23"] #[inline(always)] pub fn pcnt2dis(&self) -> PCNT2DIS_R { PCNT2DIS_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Allow Power Down of I2C0 During EM23"] #[inline(always)] pub fn i2c0dis(&self) -> I2C0DIS_R { I2C0DIS_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Allow Power Down of I2C1 During EM23"] #[inline(always)] pub fn i2c1dis(&self) -> I2C1DIS_R { I2C1DIS_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Allow Power Down of DAC0 During EM23"] #[inline(always)] pub fn vdac0dis(&self) -> VDAC0DIS_R { VDAC0DIS_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Allow Power Down of IDAC0 During EM23"] #[inline(always)] pub fn idac0dis(&self) -> IDAC0DIS_R { IDAC0DIS_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Allow Power Down of ADC0 During EM23"] #[inline(always)] pub fn adc0dis(&self) -> ADC0DIS_R { ADC0DIS_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Allow Power Down of LETIMER0 During EM23"] #[inline(always)] pub fn letimer0dis(&self) -> LETIMER0DIS_R { LETIMER0DIS_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Allow Power Down of WDOG0 During EM23"] #[inline(always)] pub fn wdog0dis(&self) -> WDOG0DIS_R { WDOG0DIS_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Allow Power Down of WDOG1 During EM23"] #[inline(always)] pub fn wdog1dis(&self) -> WDOG1DIS_R { WDOG1DIS_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Allow Power Down of LESENSE0 During EM23"] #[inline(always)] pub fn lesense0dis(&self) -> LESENSE0DIS_R { LESENSE0DIS_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Allow Power Down of CSEN During EM23"] #[inline(always)] pub fn csendis(&self) -> CSENDIS_R { CSENDIS_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Allow Power Down of LEUART0 During EM23"] #[inline(always)] pub fn leuart0dis(&self) -> LEUART0DIS_R { LEUART0DIS_R::new(((self.bits >> 15) & 0x01) != 0) } } impl W { #[doc = "Bit 0 - Allow Power Down of ACMP0 During EM23"] #[inline(always)] pub fn acmp0dis(&mut self) -> ACMP0DIS_W { ACMP0DIS_W { w: self } } #[doc = "Bit 1 - Allow Power Down of ACMP1 During EM23"] #[inline(always)] pub fn acmp1dis(&mut self) -> ACMP1DIS_W { ACMP1DIS_W { w: self } } #[doc = "Bit 2 - Allow Power Down of PCNT0 During EM23"] #[inline(always)] pub fn pcnt0dis(&mut self) -> PCNT0DIS_W { PCNT0DIS_W { w: self } } #[doc = "Bit 3 - Allow Power Down of PCNT1 During EM23"] #[inline(always)] pub fn pcnt1dis(&mut self) -> PCNT1DIS_W { PCNT1DIS_W { w: self } } #[doc = "Bit 4 - Allow Power Down of PCNT2 During EM23"] #[inline(always)] pub fn pcnt2dis(&mut self) -> PCNT2DIS_W { PCNT2DIS_W { w: self } } #[doc = "Bit 5 - Allow Power Down of I2C0 During EM23"] #[inline(always)] pub fn i2c0dis(&mut self) -> I2C0DIS_W { I2C0DIS_W { w: self } } #[doc = "Bit 6 - Allow Power Down of I2C1 During EM23"] #[inline(always)] pub fn i2c1dis(&mut self) -> I2C1DIS_W { I2C1DIS_W { w: self } } #[doc = "Bit 7 - Allow Power Down of DAC0 During EM23"] #[inline(always)] pub fn vdac0dis(&mut self) -> VDAC0DIS_W { VDAC0DIS_W { w: self } } #[doc = "Bit 8 - Allow Power Down of IDAC0 During EM23"] #[inline(always)] pub fn idac0dis(&mut self) -> IDAC0DIS_W { IDAC0DIS_W { w: self } } #[doc = "Bit 9 - Allow Power Down of ADC0 During EM23"] #[inline(always)] pub fn adc0dis(&mut self) -> ADC0DIS_W { ADC0DIS_W { w: self } } #[doc = "Bit 10 - Allow Power Down of LETIMER0 During EM23"] #[inline(always)] pub fn letimer0dis(&mut self) -> LETIMER0DIS_W { LETIMER0DIS_W { w: self } } #[doc = "Bit 11 - Allow Power Down of WDOG0 During EM23"] #[inline(always)] pub fn wdog0dis(&mut self) -> WDOG0DIS_W { WDOG0DIS_W { w: self } } #[doc = "Bit 12 - Allow Power Down of WDOG1 During EM23"] #[inline(always)] pub fn wdog1dis(&mut self) -> WDOG1DIS_W { WDOG1DIS_W { w: self } } #[doc = "Bit 13 - Allow Power Down of LESENSE0 During EM23"] #[inline(always)] pub fn lesense0dis(&mut self) -> LESENSE0DIS_W { LESENSE0DIS_W { w: self } } #[doc = "Bit 14 - Allow Power Down of CSEN During EM23"] #[inline(always)] pub fn csendis(&mut self) -> CSENDIS_W { CSENDIS_W { w: self } } #[doc = "Bit 15 - Allow Power Down of LEUART0 During EM23"] #[inline(always)] pub fn leuart0dis(&mut self) -> LEUART0DIS_W { LEUART0DIS_W { w: self } } }
pub struct Solution; impl Solution { pub fn reverse_words(s: String) -> String { let mut res = String::new(); for word in s.split_whitespace().rev() { res.push_str(word); res.push(' '); } res.pop(); res } } #[test] fn test0151() { struct Case { s: String, want: String, } fn create_case(s: &str, want: &str) -> Case { Case { s: s.to_string(), want: want.to_string(), } } let cases = vec![ create_case("the sky is blue", "blue is sky the"), create_case(" hello world! ", "world! hello"), create_case("a good example", "example good a"), ]; for case in cases { assert_eq!( Solution::reverse_words(case.s.to_string()), case.want.to_string() ); } }
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <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. // run-pass // Check that a trait is still object-safe (and usable) if it has // generic methods so long as they require `Self : Sized`. trait Counter { fn tick(&mut self) -> u32; fn with<F:FnOnce(u32)>(&self, f: F) where Self : Sized; } struct CCounter { c: u32 } impl Counter for CCounter { fn tick(&mut self) -> u32 { self.c += 1; self.c } fn with<F:FnOnce(u32)>(&self, f: F) { f(self.c); } } fn tick1<C:Counter>(c: &mut C) { tick2(c); c.with(|i| ()); } fn tick2(c: &mut Counter) { tick3(c); } fn tick3<C:?Sized+Counter>(c: &mut C) { c.tick(); c.tick(); } fn main() { let mut c = CCounter { c: 0 }; tick1(&mut c); assert_eq!(c.tick(), 3); }
use super::super::request::*; #[derive(Debug, Clone)] pub struct Request { } impl KafkaSerializable for Request { fn serialize<W: Write>(&self, _: &mut W)-> Result<()> { Ok(()) } } impl KafkaRequest for Request { type Response = Response; fn api_key() -> i16 { 16 } fn api_version() -> i16 { 2 } } #[derive(Debug, Clone)] pub struct Response { pub throttle_time_ms: i32, pub error_code: i16, pub groups: Vec<Group> } impl KafkaDeserializable for Response { fn deserialize<R: Read>(stream: &mut R) -> Result<Self> { let throttle_time_ms = i32::deserialize(stream)?; let error_code = i16::deserialize(stream)?; let groups = Vec::<Group>::deserialize(stream)?; Ok(Response { throttle_time_ms, error_code, groups }) } } #[derive(Debug, Clone)] pub struct Group { pub name: String, pub protocol_type: String } impl KafkaDeserializable for Group { fn deserialize<R: Read>(stream: &mut R) -> Result<Self> { let name = String::deserialize(stream)?; let protocol_type = String::deserialize(stream)?; Ok(Group { name, protocol_type }) } }
/// /// /// pub struct Str16([u16]); impl Str16 { /// Converts a UCS-2 (no need to be valid UTF-16) slice into a string #[inline] pub fn from_slice(s: &[u16]) -> &Str16 { // SAFE: Same represenaton as &[u16] unsafe { ::core::mem::transmute(s) } } /// UNSAFE: Indexes input until NUL, lifetime inferred #[inline] pub unsafe fn from_nul_terminated<'a>(p: *const u16) -> &'a Str16 { let len = { let mut len = 0; while *p.offset(len) != 0 { len += 1; } len as usize }; let s = ::core::slice::from_raw_parts(p, len); Self::from_slice(s) } /// Obtain an iterator of characters over this string /// /// NOTE: Unpaired UTF-16 surrogates are returned as \uFFFD #[inline] pub fn chars(&self) -> Chars { Chars(&self.0) } } impl ::core::fmt::Display for Str16 { fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { for c in self.chars() { try!(write!(f, "{}", c)); } Ok( () ) } } pub struct Chars<'a>(&'a [u16]); impl<'a> Chars<'a> { fn next_codeunit(&mut self) -> Option<u16> { if self.0.len() == 0 { None } else { let w = self.0[0]; self.0 = &self.0[1..]; Some(w) } } } impl<'a> Iterator for Chars<'a> { type Item = char; fn next(&mut self) -> Option<char> { if let Some(w) = self.next_codeunit() { if 0xD800 <= w && w < 0xDC00 { let hi = w - 0xD800; if self.0.len() == 0 { Some( '\u{fffd}' ) } else if self.0[0] < 0xDC00 { Some( '\u{fffd}' ) } else if self.0[0] >= 0xE000 { Some( '\u{fffd}' ) } else { let w2 = self.next_codeunit().unwrap(); assert!(0xDC00 <= w2 && w2 < 0xE000); let lo = w2 - 0xDC00; let cp32 = 0x10000 + (hi as u32) << 10 + lo as u32; Some( ::core::char::from_u32(cp32).unwrap() ) } } else { Some( ::core::char::from_u32(w as u32).unwrap() ) } } else { None } } } /// Pointer to a UCS-2 NUL-terminated string pub type CStr16Ptr = *const u16; /// Safe unsized UCS-2 NUL-terminated string type pub struct CStr16([u16]); impl CStr16 { pub fn as_ptr(&self) -> CStr16Ptr { self.0.as_ptr() } pub fn from_slice(s: &[u16]) -> &CStr16 { let l = s.iter().position(|&x| x == 0).expect("No NUL in slice passed to CStr16::from_slice"); let ss = &s[..l+1]; // SAFE: Same internal representation, string is NUL terminated unsafe { &*(ss as *const [u16] as *const CStr16) } } } impl<'a> From<&'a [u16]> for &'a CStr16 { fn from(v: &'a [u16]) -> Self { CStr16::from_slice(v) } } impl ::core::fmt::Display for CStr16 { fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { Str16::from_slice(&self.0[.. self.0.len() - 1]).fmt(f) } } pub struct CString16<'h>(::boot_services::PoolVec<'h, u16>); impl<'h> ::borrow::ToOwned<'h> for CStr16 { type Owned = CString16<'h>; fn to_owned(&self, _bs: &'h ::boot_services::BootServices) -> CString16<'h> { panic!("CStr16::to_owned"); } } impl<'h> ::borrow::Borrow<CStr16> for CString16<'h> { fn borrow(&self) -> &CStr16 { // SAFE: Same internal representation, string is NUL terminated unsafe { &*(&*self.0 as *const [u16] as *const CStr16) } } }
extern crate math; use math::round; use std::cmp::Ordering; use std::mem; // courtesy of https://stackoverflow.com/a/28294764 fn swap<T>(x: &mut Vec<T>, i: usize, j: usize) { let (lo, hi) = match i.cmp(&j) { // no swapping necessary Ordering::Equal => return, // get the smallest and largest of the two indices Ordering::Less => (i, j), Ordering::Greater => (j ,i), }; let (init, tail) = x.split_at_mut(hi); mem::swap(&mut init[lo], &mut tail[0]); } // Constructs a heap from elements of a given array by the bottom-up algorithm // Input: An array h[1..n] of orderable items // Output: A heap h[1..n] fn heap_bottom_up(h: &mut Vec<u8>) { let n = h.len(); let nh = round::floor(n as f64 / 2.0, 0) as usize; for i in 1..(nh + 1) { let mut k = nh - i + 1; let v = h[k - 1]; let mut heap = false; while !heap && (2 * k) <= n { let mut j = 2 * k; if j < n { // there are two children if h[j - 1] < h[j] { j = j + 1; } } if v >= h[j - 1] { heap = true; } else { h[k - 1] = h[j - 1]; k = j; } } h[k - 1] = v; } } fn heapsort(h: &mut Vec<u8>) { // construct a heap for a given array heap_bottom_up(h); // apply the root-deletion operation n-1 times to the remaining heap let n = h.len(); for i in 0..(n-1) { // exchange the root's key with the last key k of the heap swap::<u8>(h, 0, n - 1 - i); // verify the parental dominance for k let mut hn = Vec::<u8>::from(&h[0..(n - 1 - i)]); heap_bottom_up(&mut hn); for j in 0..(n-1-i) { h[j] = hn[j]; } } } // Solves the element uniqueness problem by sorting the array first // Input: An array a[0..n-1] of orderable elements // Output: Returns "true" if a has no equal elements, "false" otherwise fn presort_element_uniqueness(a: &mut Vec<u8>) -> bool { heapsort(a); let n = a.len(); for i in 0..(n - 1) { if a[i] == a[i + 1] { return false } } true } fn main() { let mut a = vec![2, 9, 7, 6, 5, 8]; println!("Array to check element uniqueness: {:?}", a); println!("Array contains all unique elements: {}", presort_element_uniqueness(&mut a)); }
use itertools::Itertools; use regex::Regex; use std::fs; use std::str; #[test] fn validate_6_2() { assert_eq!(algorithm("src/day_6/input_test.txt"), 6); } fn algorithm(file_location: &str) -> usize { let content = fs::read_to_string(file_location).unwrap(); let delimiter = Regex::new("\n\\s+\n").unwrap(); let forms: Vec<&str> = delimiter.split(&content).collect(); let mut result = 0; for group in forms { let chars: Vec<char> = group .chars() .filter(|c| c.is_alphabetic()) .into_iter() .unique() .collect(); let lines_count = group.lines().count(); for chr in chars { if group.matches(chr).count() == lines_count { result += 1; } } } result } pub fn run() { println!("The result is: {}.", algorithm("src/day_6/input.txt")); }
use super::*; #[derive(PartialEq)] pub enum PlayerPose { Normal, Crouching, Sliding, Hurt, } pub struct Player { p_meter: i32, p_speed: bool, slide_timer: i32, idle_timer: i32, pose: PlayerPose, invuln_timer: i32, } impl Player { pub fn init(&mut self) { self.p_meter = 0; self.p_speed = false; self.pose = PlayerPose::Normal; self.invuln_timer = 0; } pub fn hurt(&mut self, data: &mut EntityData) { let l = crate::state().as_level(); l.health -= 1; if l.health == 0 { l.init_flag = true; } self.pose = PlayerPose::Hurt; data.vel = if data.flip.x { vec2(0x100, -0x500) } else { vec2(-0x100, -0x500) }; data.on_ground = false; } pub fn invincible(&self) -> bool { self.pose == PlayerPose::Sliding } pub fn can_interact(&self) -> bool { self.pose != PlayerPose::Hurt } pub fn invulnerable(&self) -> bool { self.pose == PlayerPose::Hurt || self.invuln_timer > 0 } pub fn run(&mut self, data: &mut EntityData) { let buttons = crate::state().buttons; if self.slide_timer > 0 { self.slide_timer -= 1; } if !data.on_ground { if buttons.a() && self.pose != PlayerPose::Hurt { data.vel.y += 0x30; } else { data.vel.y += 0x60; } data.vel.y = data.vel.y.min(1024); } else { if self.pose == PlayerPose::Hurt { self.invuln_timer = 60; } if buttons.down() { if data.vel.x.abs() > 0 { if self.pose != PlayerPose::Sliding { self.slide_timer = 30; } self.pose = PlayerPose::Sliding; } else { self.slide_timer = 0; self.pose = PlayerPose::Crouching; } } else { self.slide_timer = 0; self.pose = PlayerPose::Normal; } if buttons.a_edge() { let lift = 0x500 + data.vel.x.abs() * 5 / 16; data.vel.y = -lift + 0x30; data.on_ground = false; if matches!(self.pose, PlayerPose::Sliding) { self.pose = PlayerPose::Normal; } } else { if data.vel.y >= 0 { data.vel.y = 0; } else { data.on_ground = false; } } } let max_speed = if self.p_meter == 0x70 { 0x300 } else { 0x240 }; let mut neutral = true; let can_move = match self.pose { PlayerPose::Normal => true, PlayerPose::Hurt => false, _ => !data.on_ground, //PlayerPose::Sliding => !data.on_ground, //PlayerPose::Crouching => !data.on_ground }; if can_move { neutral = !buttons.left() && !buttons.right(); let mut button = buttons.left() && !buttons.right(); for i in 0..2 { data.vel.x = -data.vel.x; if button { data.flip.x = i == 0; if data.vel.x > 0 { if data.vel.x < max_speed { data.vel.x += 0x18; } if data.vel.x >= 0x240 && (data.on_ground || self.p_speed) { self.p_meter += 3; } } else { data.vel.x += 0x50; } } button = buttons.right(); } } if neutral && data.on_ground && self.slide_timer == 0 { self.p_speed = false; if data.vel.x > 0 { data.vel.x -= 0x10; if data.vel.x < 0 { data.vel.x = 0; } } else { data.vel.x += 0x10; if data.vel.x > 0 { data.vel.x = 0; } } } self.p_meter -= 1; if self.p_meter > 0x70 { self.p_speed = true; self.p_meter = 0x70; } if self.p_meter < 0 { self.p_meter = 0; } match self.pose { PlayerPose::Normal => { if data.on_ground { if data.vel.x == 0 { self.idle_timer += 1; let b = self.idle_timer / 4 % 0x40; data.sprites[1].frame = match b { 0x3F => 1, 0x3E => 2, 0x3D => 1, _ => 0 }; } else { self.idle_timer = 0; data.anim_timer += data.vel.x.abs(); if data.anim_timer > 0xA00 { data.anim_timer -= 0xA00; data.sprites[1].frame += 1; } if data.vel.x.abs() > 0x260 { if data.sprites[1].frame >= 16 || data.sprites[1].frame < 12 { data.sprites[1].frame = 12; } } else { if data.sprites[1].frame >= 12 || data.sprites[1].frame < 8 { data.sprites[1].frame = 8; } } } } else { if data.vel.y > 0 { } else { data.sprites[1].frame = 3; } } } PlayerPose::Sliding => { //data.sprites[1].frame = 7; } PlayerPose::Crouching => { //data.sprites[1].frame = 7; } PlayerPose::Hurt => { //data.sprites[1].frame = 7; } } if self.invuln_timer > 0 { //data.sprites[1].len = (self.invuln_timer / 2 & 1) as _; self.invuln_timer -= 1; } else { //data.sprites[1].len = 1; } for i in crate::state().as_level().entities.inner.iter_mut() { // do not interact with self if &mut i.data as *mut _ == data as *mut _ { continue; } if data.intersects(&i.data) { if !matches!(i.data.state, EntityState::Alive) { continue; } if matches!(i.kind, EntityKind::Tomato) { if data.intersects(&i.data) { if data.vel.y > 0 && i.data.pos.y - data.pos.y > 0x400 && self.can_interact() { data.vel.y = -0x500; i.data.state = EntityState::Squished; i.data.anim_timer = 30; i.data.sprites[0].frame = 3; } else if self.invincible() { /*crate::state().as_level().particles.slot() .init_kick(i.data.pos);*/ i.data.state = EntityState::Dead; i.data.vel = vec2(-0x40, -0x200); } else if !self.invulnerable() { self.hurt(data); } } } } } let old_x = data.vel.x; data.physics(); unsafe { if self.pose == PlayerPose::Sliding && old_x.abs() > 0x180 { for i in 0..3 { if *data.sensors[i] == 3 { *data.sensors[i] = 0; data.vel.x = old_x; for v in 0..4 { //crate::state().as_level().particles.slot() // .init_crumble(v, data.sensor_pos[i]); } } } } if !self.invulnerable() { for i in 3..6 { if *data.sensors[i] == 6 { self.hurt(data); } } } for (idx,i) in data.sensors.iter_mut().enumerate() { match **i { 0x10 => { **i = 0; crate::state().as_level().coins += 1; //crate::state().as_level().particles.slot() // .init_sparkle(data.sensor_pos[idx]); }, 0x11 => { **i = 0; } 0x12 => { **i = 0; crate::state().as_level().health += 1; } _ => {} } } } let fg = &mut crate::state().as_level().fg; if unsafe { *fg.mut_ptr_at(data.pos / 256 / 16) == 0x0F } && buttons.up_edge() && data.on_ground { crate::state().as_level().room += 1; crate::state().as_level().init_flag = true; } let level_w = fg.width() as i32 * 16 * 256 - 0x1000; let level_h = fg.height() as i32 * 16 * 256; if data.pos.x < 0x1000 { data.pos.x = 0x1000; data.vel.x = 0; } if data.pos.x > level_w { data.pos.x = level_w; data.vel.x = 0; } if data.pos.y > level_h { crate::state().as_level().init_flag = true; } } /* if data.blocked[1] || data.blocked[2] { self.p_speed = false; self.p_meter = 0; }*/ }
use std::fmt; /// The error used when managing connections with `deadpool`. #[derive(Debug)] pub enum Error { /// An error occurred establishing the connection ConnectionError(diesel::ConnectionError), /// An error occurred pinging the database QueryError(diesel::result::Error), } impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { Error::ConnectionError(ref e) => e.fmt(f), Error::QueryError(ref e) => e.fmt(f), } } } impl From<diesel::ConnectionError> for Error { fn from(e: diesel::ConnectionError) -> Self { Self::ConnectionError(e) } } impl From<diesel::result::Error> for Error { fn from(e: diesel::result::Error) -> Self { Self::QueryError(e) } } impl ::std::error::Error for Error {}
pub mod str { use std::io::{Write, Result}; pub trait SliceChars { fn slice_chars_alt(&self, begin: usize, end: usize) -> &str; } impl SliceChars for str { fn slice_chars_alt(&self, begin: usize, end: usize) -> &str { assert!(begin <= end); let mut count = 0; let mut begin_byte = None; let mut end_byte = None; // This could be even more efficient by not decoding, // only finding the char boundaries for (idx, _) in self.char_indices() { if count == begin { begin_byte = Some(idx); } if count == end { end_byte = Some(idx); break; } count += 1; } if begin_byte.is_none() && count == begin { begin_byte = Some(self.len()) } if end_byte.is_none() && count == end { end_byte = Some(self.len()) } match (begin_byte, end_byte) { (None, _) => panic!("slice_chars: `begin` is beyond end of string"), (_, None) => panic!("slice_chars: `end` is beyond end of string"), (Some(a), Some(b)) => unsafe { self.slice_unchecked(a, b) } } } } pub struct StringWriter { buf: Vec<u8> } impl StringWriter { pub fn new() -> StringWriter { StringWriter { buf: Vec::new() } } pub fn to_string(self) -> String { if let Ok(s) = String::from_utf8(self.buf) { s } else { String::new() } } } impl Write for StringWriter { fn write(&mut self, buf: &[u8]) -> Result<usize> { for b in buf { self.buf.push(*b); } Ok(buf.len()) } fn flush(&mut self) -> Result<()> { Ok(()) } } #[cfg(test)] mod test { use support::str::StringWriter; use std::io::Write; #[test] fn test_string_writer() { let mut sw = StringWriter::new(); let _ = sw.write("hello".to_owned().into_bytes().as_ref()); let _ = sw.write("world".to_owned().into_bytes().as_ref()); let s = sw.to_string(); assert_eq!(s, "helloworld".to_string()); } } }
use std::collections::{HashMap, HashSet}; fn main() { let operations: Result<Vec<Operation>,_> = include_str!("input").lines().filter(|x| !x.starts_with("inp")).map(str::parse).collect(); let operations = operations.unwrap(); let chunks: Vec<_> = operations.chunks(17).collect(); let mut input_states: Vec<_> = vec![State { inputs: [0,0,0,0,0,0,0,0,0,0,0,0,0,0], z: 0 }]; for i in 0..14 { let mut current_zs = HashSet::new(); println!("{}", i); input_states = input_states.into_iter() .filter(|x| { x.z < 26_i64.pow(14-i as u32) }) .flat_map(|st| { (1..=9).map(move |w| { let mut inp = st.inputs; inp[i] = w; State { inputs: inp, z: st.z } }) }) .filter_map(|st| { let z = apply_operation_chunk(st.inputs[i], st.z, chunks[i]); if !current_zs.insert(z) {return None} Some(State { inputs: st.inputs, z }) }).collect(); } println!("{}", input_states.into_iter().find(|x| x.z == 0).map(|x| x.inputs.into_iter().map(|x| x.to_string()).collect::<String>()).unwrap()); } fn apply_operation_chunk(w: i64, z: i64, operation_chunk: &[Operation]) -> i64 { let mut vals = HashMap::new(); vals.insert("w", w); vals.insert("x", 0); vals.insert("y", 0); vals.insert("z", z); for op in operation_chunk { let Operation { par_1, par_2, action } = op; let par_1 = par_1.as_str(); let val_2 = match par_2 { Param::Value(x) => *x, Param::Variable(x) => vals[x.as_str()] }; match action { Action::Add => *vals.get_mut(par_1).unwrap() += val_2, Action::Mul => *vals.get_mut(par_1).unwrap() *= val_2, Action::Div => *vals.get_mut(par_1).unwrap() /= val_2, Action::Mod => *vals.get_mut(par_1).unwrap() %= val_2, Action::Eql => *vals.get_mut(par_1).unwrap() = if vals[par_1] == val_2 {1} else {0}, _ => panic!("") }; }; return vals["z"]; } struct Operation { par_1: String, par_2: Param, action: Action } impl std::str::FromStr for Operation { type Err = &'static str; fn from_str(s: &str) -> Result<Self, Self::Err> { let mut spl = s.split(" "); let action: Action = spl.next().unwrap().parse().unwrap(); let par_1 = spl.next().unwrap().to_string(); let par_2 = spl.next().unwrap(); let par_2 = if let Ok(i) = par_2.parse() { Param::Value(i) } else { Param::Variable(par_2.to_string()) }; Ok(Operation { par_1, par_2, action }) } } enum Action { Add, Mul, Div, Mod, Eql } impl std::str::FromStr for Action { type Err = &'static str; fn from_str(s: &str) -> Result<Self, Self::Err> { use Action::*; match s { "add" => Ok(Add), "mul" => Ok(Mul), "div" => Ok(Div), "mod" => Ok(Mod), "eql" => Ok(Eql), _ => Err("Invalid string") } } } enum Param { Value(i64), Variable(String) } #[derive(Debug)] struct State { inputs: [i64; 14], z: i64 }
use client; use maps; use key::MultiKey; use key::parse::parse; use state_machine::StateMachine; pub struct Vixi { machine: StateMachine<MultiKey>, } impl Vixi { pub fn new(client: Box<client::Client>) -> Self { Vixi { machine: StateMachine::new( client, maps::normal_mode_map(), maps::pending_mode_map(), maps::insert_mode_map(), ), } } pub fn process(&mut self, keys: &str) { for key in parse(keys) { self.machine.process(key); } } pub fn mode(&self) -> &'static str { self.machine.mode() } } #[cfg(test)] mod test { use super::*; #[test] fn start_in_normal() { let vixi = Vixi::new(Box::new(client::DummyClient::new())); assert_eq!("Normal", vixi.mode()); } #[test] fn to_insert() { let mut vixi = Vixi::new(Box::new(client::DummyClient::new())); vixi.process("i"); assert_eq!("Insert", vixi.mode()); } #[test] fn insert_text() { let mut vixi = Vixi::new(Box::new(client::DummyClient::new())); vixi.process("iasdf"); assert_eq!("Insert", vixi.mode()); } #[test] fn insert_to_normal() { let mut vixi = Vixi::new(Box::new(client::DummyClient::new())); vixi.process("i<esc>"); assert_eq!("Normal", vixi.mode()); } #[test] fn insert_text_then_normal() { let mut vixi = Vixi::new(Box::new(client::DummyClient::new())); vixi.process("ir<esc>"); assert_eq!("Normal", vixi.mode()); } #[test] fn to_op_pending() { let mut vixi = Vixi::new(Box::new(client::DummyClient::new())); vixi.process("d"); assert_eq!("Pending", vixi.mode()); } #[test] fn to_op_pending_with_count() { let mut vixi = Vixi::new(Box::new(client::DummyClient::new())); vixi.process("123d"); assert_eq!("Pending", vixi.mode()); } #[test] fn op_pending_to_normal() { let mut vixi = Vixi::new(Box::new(client::DummyClient::new())); vixi.process("d<esc>"); assert_eq!("Normal", vixi.mode()); } }
use std::fmt::{Display, Formatter, Result as FmtResult}; use std::path::{Path, PathBuf}; use std::str::FromStr; use serde::de::{self, Deserialize, Deserializer}; use serde::ser::{Serialize, Serializer}; use super::FilesystemId; use crate::hash::Hash; #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct SourceId { name: String, hash: Hash, } impl SourceId { pub fn new(name: String, hash: Hash) -> Result<Self, ()> { if name.is_empty() { return Err(()); } Ok(SourceId { name, hash }) } #[inline] pub fn name(&self) -> &str { self.name.as_str() } #[inline] pub const fn hash(&self) -> &Hash { &self.hash } } impl Display for SourceId { fn fmt(&self, fmt: &mut Formatter) -> FmtResult { write!(fmt, "{}-{}", self.name, self.hash) } } impl FilesystemId for SourceId { fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, ()> { let raw_name = path.as_ref().file_name().ok_or(())?; let name = raw_name.to_str().ok_or(())?; SourceId::from_str(name) } fn to_path(&self) -> PathBuf { PathBuf::from(self.to_string()) } } impl FromStr for SourceId { type Err = (); fn from_str(s: &str) -> Result<Self, Self::Err> { let mut tokens = s.rsplitn(2, '-'); let hash = tokens.next().ok_or(()).and_then(|s| s.parse())?; let name = tokens.next().map(|s| s.to_string()).ok_or(())?; if tokens.count() != 0 { return Err(()); } SourceId::new(name, hash) } } impl<'de> Deserialize<'de> for SourceId { fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de>, { let s: &str = Deserialize::deserialize(deserializer)?; SourceId::from_str(&s).map_err(|_err| de::Error::custom("failed to deserialize")) } } impl Serialize for SourceId { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer, { self.to_string().serialize(serializer) } } #[cfg(test)] mod tests { use super::*; const HASH: &'static str = "fc3j3vub6kodu4jtfoakfs5xhumqi62m"; const EXAMPLE_ID: &'static str = "foobar.json-fc3j3vub6kodu4jtfoakfs5xhumqi62m"; #[test] fn is_send_and_sync() { fn assert_send_sync<T: Send + Sync>() {} assert_send_sync::<SourceId>(); } #[test] fn parse_from_string() { let hash = HASH.parse().expect("Failed to parse hash from constant"); let expected = SourceId::new("foobar.json".to_string(), hash).expect("Failed to init ID"); let actual: SourceId = EXAMPLE_ID.parse().expect("Failed to parse ID!"); assert_eq!(expected, actual); assert_eq!(expected.name(), actual.name()); assert_eq!(expected.hash(), actual.hash()); } #[test] fn parse_roundtrip() { let original: SourceId = EXAMPLE_ID.parse().expect("Failed to parse ID"); let text_form = original.to_string(); let parsed: SourceId = text_form.parse().expect("Failed to parse ID from text"); assert_eq!(original, parsed); } #[test] fn reject_empty_name() { let hash = HASH.parse().expect("Failed to parse hash from constant"); SourceId::new("".to_string(), hash).expect_err("Failed to reject empty name"); } }
//! Control streams //! //! This module exposes a `controlstream(AsyncRead)` method //! which //! 1. frames the TNC control port socket; and //! 2. splits the output into events and command responses, //! and accepts Commands for transmission to the socket use std::collections::vec_deque::VecDeque; use std::io; use std::marker::Unpin; use std::pin::Pin; use std::sync::Arc; use futures::channel::mpsc; use futures::lock::Mutex; use futures::prelude::*; use futures::task::Context; use futures::task::Poll; use futures_codec::Framed; use crate::framing::control::TncControlFraming; use crate::protocol::response::{CommandResult, Event, Response}; /// Bind input streams to a TNC control socket /// /// This method takes ownership of a TNC control socket's /// read half and returns two futures `Stream`s: one for /// `Event`s and one for `CommandResult`s. /// /// # Parameters /// - `control`: TNC control port (io type) /// /// # Returns /// 0. A `Stream` of asynchronous `Event`s from the TNC /// 1. A `Stream` of good/bad responses to `Command`s sent /// 2. A `Sink` which will accept stringified `Command`s for /// transmission pub fn controlstream<I>( control: I, ) -> ( ControlStreamEvents<I>, ControlStreamResults<I>, ControlSink<I>, ) where I: AsyncRead + AsyncWrite + Unpin, { let (evt_tx, evt_rx) = mpsc::unbounded(); let (res_tx, res_rx) = mpsc::unbounded(); let state = ControlState { io: Framed::new(control, TncControlFraming::new()), dest_events: evt_tx, dest_results: res_tx, fused: false, }; let stateref = Arc::new(Mutex::new(state)); let ctrl = ControlStreamEvents { state: stateref.clone(), events: evt_rx, }; let results = ControlStreamResults { state: stateref.clone(), results: res_rx, }; let sink = ControlSink { state: stateref, outqueue: VecDeque::with_capacity(32), }; (ctrl, results, sink) } // Holds state for the control streams struct ControlState<I> where I: AsyncRead + AsyncWrite + Unpin, { io: Framed<I, TncControlFraming>, dest_events: mpsc::UnboundedSender<Event>, dest_results: mpsc::UnboundedSender<CommandResult>, fused: bool, } /// Stream of TNC Connection Events pub struct ControlStreamEvents<I> where I: AsyncRead + AsyncWrite + Unpin, { state: Arc<Mutex<ControlState<I>>>, events: mpsc::UnboundedReceiver<Event>, } /// Stream of TNC Command Results pub struct ControlStreamResults<I> where I: AsyncRead + AsyncWrite + Unpin, { state: Arc<Mutex<ControlState<I>>>, results: mpsc::UnboundedReceiver<CommandResult>, } /// Sink for outgoing TNC commands pub struct ControlSink<I> where I: AsyncRead + AsyncWrite + Unpin, { state: Arc<Mutex<ControlState<I>>>, outqueue: VecDeque<String>, } impl<I> Unpin for ControlStreamEvents<I> where I: AsyncRead + AsyncWrite + Unpin {} impl<I> Unpin for ControlStreamResults<I> where I: AsyncRead + AsyncWrite + Unpin {} impl<I> Unpin for ControlSink<I> where I: AsyncRead + AsyncWrite + Unpin {} impl<I> Stream for ControlStreamEvents<I> where I: AsyncRead + AsyncWrite + Unpin, { type Item = Event; fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> { let this = &mut (*self); loop { // anything in the Event queue? if let Ok(Some(out)) = this.events.try_next() { return Poll::Ready(Some(out)); } // none, so read from the stream let mut state = ready!(Pin::new(&mut this.state.lock()).poll(cx)); match ready!(Pin::new(&mut *state).poll_next(cx)) { // EOF None => return Poll::Ready(None), // found something; the next loop will get it Some(()) => continue, } } } } impl<I> Stream for ControlStreamResults<I> where I: AsyncRead + AsyncWrite + Unpin, { type Item = CommandResult; fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> { let this = &mut (*self); loop { // anything in the Result queue? if let Ok(Some(out)) = this.results.try_next() { return Poll::Ready(Some(out)); } // none, so read from the stream let mut state = ready!(Pin::new(&mut this.state.lock()).poll(cx)); match ready!(Pin::new(&mut *state).poll_next(cx)) { // EOF None => return Poll::Ready(None), // found something; the next loop will get it Some(()) => continue, } } } } impl<I> Stream for ControlState<I> where I: AsyncRead + AsyncWrite + Unpin, { type Item = (); fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> { if (*self).fused { return Poll::Ready(None); } match ready!(Pin::new(&mut (*self).io).poll_next(cx)) { Some(Ok(Response::CommandResult(res))) => { match (*self).dest_results.unbounded_send(res) { Ok(_ok) => Poll::Ready(Some(())), Err(_e) => { (*self).fused = true; Poll::Ready(None) } } } Some(Ok(Response::Event(evt))) => match (*self).dest_events.unbounded_send(evt) { Ok(_ok) => Poll::Ready(Some(())), Err(_e) => { (*self).fused = true; Poll::Ready(None) } }, _ => { (*self).fused = true; Poll::Ready(None) } } } } impl<I> Sink<String> for ControlSink<I> where I: AsyncRead + AsyncWrite + Unpin, { type Error = io::Error; fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { // we are ready if the outgoing I/O is ready let mut state = ready!(Pin::new(&mut (*self).state.lock()).poll(cx)); Pin::new(&mut state.io).poll_ready(cx) } fn start_send(mut self: Pin<&mut Self>, item: String) -> Result<(), Self::Error> { // accept into internal buffer Ok((*self).outqueue.push_back(item)) } fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Result<(), Self::Error>> { let this = &mut (*self); let state_mutex = &mut this.state; let outqueue = &mut this.outqueue; let mut state = ready!(Pin::new(&mut state_mutex.lock()).poll(cx)); // foreach item in the queue, try to submit it to the stream // every call to start_send() needs a call to poll_ready() while !outqueue.is_empty() { ready!(Pin::new(&mut state.io).poll_ready(cx))?; Pin::new(&mut state.io).start_send(outqueue.pop_front().unwrap())?; } Pin::new(&mut state.io).poll_flush(cx) } fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Result<(), Self::Error>> { let mut state = ready!(Pin::new(&mut (*self).state.lock()).poll(cx)); Pin::new(&mut state.io).poll_close(cx) } } #[cfg(test)] mod test { use super::*; use futures::executor; use futures::io::Cursor; use crate::protocol::constants::CommandID; #[test] fn test_streams() { let curs = Cursor::new(b"MYCALL\rBUSY TRUE\rARQBW\r".to_vec()); let (mut evt, mut res, _out) = controlstream(curs); executor::block_on(async { let e1 = evt.next().await.unwrap(); assert_eq!(Event::BUSY(true), e1); let r1 = res.next().await.unwrap(); assert_eq!(Ok((CommandID::MYCALL, None)), r1); let r2 = res.next().await.unwrap(); assert_eq!(Ok((CommandID::ARQBW, None)), r2); assert!(res.next().await.is_none()); assert!(evt.next().await.is_none()); }); } #[test] fn test_sink() { // since there's no way to get the io back, this test // mostly just ensures that a send can complete let curs = Cursor::new(vec![0u8; 24]); let (_evt, _res, mut sink) = controlstream(curs); let _ = executor::block_on(sink.send("ABORT\r".to_owned())); } }
use proptest::strategy::{Just, Strategy}; use liblumen_alloc::atom; use liblumen_alloc::erts::term::prelude::*; use crate::erlang::unique_integer_1::result; use crate::test::strategy; use crate::test::with_process; #[test] fn without_proper_list_of_options_errors_badargs() { run!( |arc_process| { ( Just(arc_process.clone()), strategy::term(arc_process.clone()).prop_filter( "Cannot be a proper list of valid options", |term| match term.decode().unwrap() { TypedTerm::Nil => false, TypedTerm::List(cons) => { let mut filter = true; for result in cons.into_iter() { match result { Ok(element) => match element.decode().unwrap() { TypedTerm::Atom(atom) => match atom.name() { "monotonic" | "positive" => { filter = false; break; } _ => break, }, _ => continue, }, Err(_) => break, } } filter } _ => true, }, ), ) }, |(arc_process, options)| { prop_assert_badarg!(result(&arc_process, options), "improper list"); Ok(()) }, ); } #[test] fn without_options_returns_non_monotonic_negative_and_positive_integer() { const OPTIONS: Term = Term::NIL; with_process(|process| { let result_first_unique_integer = result(process, OPTIONS); assert!(result_first_unique_integer.is_ok()); let first_unique_integer = result_first_unique_integer.unwrap(); let zero = process.integer(0); assert!(first_unique_integer.is_integer()); assert!(first_unique_integer <= zero); let result_second_unique_integer = result(process, OPTIONS); assert!(result_second_unique_integer.is_ok()); let second_unique_integer = result_second_unique_integer.unwrap(); assert!(second_unique_integer.is_integer()); assert!(second_unique_integer <= zero); assert_ne!(first_unique_integer, second_unique_integer); }); } #[test] fn with_monotonic_returns_monotonic_negative_and_positiver_integer() { with_process(|process| { let options = process.list_from_slice(&[atom!("monotonic")]); let result_first_unique_integer = result(process, options); assert!(result_first_unique_integer.is_ok()); let first_unique_integer = result_first_unique_integer.unwrap(); let zero = process.integer(0); assert!(first_unique_integer.is_integer()); assert!(first_unique_integer <= zero); let result_second_unique_integer = result(process, options); assert!(result_second_unique_integer.is_ok()); let second_unique_integer = result_second_unique_integer.unwrap(); assert!(second_unique_integer.is_integer()); assert!(second_unique_integer <= zero); assert!(first_unique_integer < second_unique_integer); }); } #[test] fn with_monotonic_and_positive_returns_monotonic_positiver_integer() { with_process(|process| { let options = process.list_from_slice(&[atom!("monotonic"), atom!("positive")]); let result_first_unique_integer = result(process, options); assert!(result_first_unique_integer.is_ok()); let first_unique_integer = result_first_unique_integer.unwrap(); let zero = process.integer(0); assert!(first_unique_integer.is_integer()); assert!(zero <= first_unique_integer); let result_second_unique_integer = result(process, options); assert!(result_second_unique_integer.is_ok()); let second_unique_integer = result_second_unique_integer.unwrap(); assert!(second_unique_integer.is_integer()); assert!(zero <= second_unique_integer); assert!(first_unique_integer < second_unique_integer); }); } #[test] fn with_positive_returns_non_monotonic_and_positive_integer() { with_process(|process| { let options = process.list_from_slice(&[atom!("positive")]); let result_first_unique_integer = result(process, options); assert!(result_first_unique_integer.is_ok()); let first_unique_integer = result_first_unique_integer.unwrap(); let zero = process.integer(0); assert!(first_unique_integer.is_integer()); assert!(zero <= first_unique_integer); let result_second_unique_integer = result(process, options); assert!(result_second_unique_integer.is_ok()); let second_unique_integer = result_second_unique_integer.unwrap(); assert!(second_unique_integer.is_integer()); assert!(zero <= second_unique_integer); assert_ne!(first_unique_integer, second_unique_integer); }); }
//! A simple language. #![allow(clippy::drop_copy)] #![allow(clippy::drop_ref)] #![allow(clippy::new_without_default)] #![allow(clippy::while_let_on_iterator)] pub mod lang; pub mod pass; mod literal; pub mod reporting;
use crate::structures::basic::ValType; pub struct Value { pub value: ValType, } pub struct Labels { pub arity: usize, pub continuation: usize, } pub struct ModuleInstance; pub struct Frames { pub arity: usize, pub locals: Vec<ValType>, pub module: ModuleInstance, } /// The stack contains three kinds of entries: /// Values: the operands of instructions. /// Labels: active structured control instructions that can be targeted by branches. /// Activations: the call frames of active function calls. pub struct Stack { pub data: Vec<Value>, // FIXME: add Labels, Frames } impl Stack { pub fn new(data: Vec<Value>) -> Self { Stack { data } } pub fn add(&mut self, v: Value) { self.data.append(v); } pub fn pop(&mut self) -> Value { self.data.pop() } pub fn top(&self) -> Value { self.data[-1] } pub fn len(&self) -> i32 { self.data.len() } }
use libloading::Library; use std::sync::Arc; use std::{ffi::OsStr, fmt}; use std; use crate::PluginRegistrar; use crate::PsistatsPlugin; pub struct PluginLoader { plugin_dir: String } #[derive(Debug, Clone)] pub enum Error { DeclError(String), LibError(String), Other(String) } impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Error::DeclError(msg) => write!(f, "{}", msg), Error::LibError(msg) => write!(f, "{}", msg), Error::Other(msg) => write!(f, "{}", msg) } } } impl std::error::Error for Error { fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { None } } impl PluginLoader { pub fn new(plugin_dir: String) -> Self { PluginLoader { plugin_dir } } pub unsafe fn load_plugin<P: AsRef<OsStr>>(&self, plugin_name: P, registrar: &mut Box<dyn PluginRegistrar + Send>) -> Result<(), Error> { let plugin_file: String; if cfg!(target_os = "windows") { plugin_file = format!("{}\\plugin_{}.dll", self.plugin_dir, plugin_name.as_ref().to_str().unwrap()); } else if cfg!(target_os = "linux") { plugin_file = format!("{}/libplugin_{}.so", self.plugin_dir, plugin_name.as_ref().to_str().unwrap()); } else { return Err(Error::Other("Plugin loader does not support host OS".to_string())); } return self.load_plugin_file(plugin_file, registrar); } unsafe fn load_plugin_file<P: AsRef<OsStr>>( &self, plugin_file: P, registrar: &mut Box<dyn PluginRegistrar + Send>, ) -> Result<(), Error> { let lib = Library::new(&plugin_file); let lib_rc: Arc<Library>; match lib { Ok(l) => { lib_rc = Arc::new(l); }, Err(err) => { return Err(Error::LibError(format!("Error loading library: {}", err))); } } let decl_ref = lib_rc.get::<*mut PsistatsPlugin>(b"PSISTATS_PLUGIN\0"); let decl: PsistatsPlugin; match decl_ref { Ok(dref) => { decl = dref.read(); } Err(err) => { return Err(Error::DeclError(format!("Plugin declaration error: {}", err))); } } (decl.register)(registrar); registrar.register_lib(lib_rc); Ok(()) } }
use digest::{generic_array::typenum::consts::U32 as TU32, Digest, Output}; use ethers_core::types::U256; use std::collections::BTreeMap; use crate::*; #[derive(Default, Clone, Debug)] pub struct SimpleAccumulator<D> where D: Digest<OutputSize = TU32> + Clone + Default, { k: U256, s: BTreeMap<usize, Output<D>>, } impl<D> std::iter::FromIterator<Output<D>> for SimpleAccumulator<D> where D: Digest<OutputSize = TU32> + Clone + Default, { fn from_iter<T>(iter: T) -> Self where T: IntoIterator<Item = Element<Self>>, { let mut acc = Self::default(); for e in iter { acc.insert(&e); } acc } } impl<D> Accumulator for SimpleAccumulator<D> where D: Digest<OutputSize = TU32> + Clone + Default, { type Digest = D; fn len(&self) -> U256 { self.k } fn state(&self) -> &BTreeMap<usize, Element<Self>> { &self.s } fn state_mut(&mut self) -> &mut BTreeMap<usize, Element<Self>> { &mut self.s } fn insert(&mut self, element: &Element<Self>) -> Element<Self> { self.k = self.k + 1; let prev = self.get_state(self.k - 1).unwrap(); let pred = self .get_state(self.k - utils::highest_divisor_power_of_2(self.k)) .unwrap(); let d = Self::get_digest().chain(element).chain(prev).chain(pred); let result = d.finalize(); self.set_state(self.k, &result); result } } #[derive(Clone, Debug)] pub struct SimpleProver<D> where D: Digest<OutputSize = TU32> + Clone + Default, { accumulator: SimpleAccumulator<D>, elements: BTreeMap<U256, Element<SimpleAccumulator<D>>>, r: BTreeMap<U256, Element<SimpleAccumulator<D>>>, } impl<D> Default for SimpleProver<D> where D: Digest<OutputSize = TU32> + Clone + Default, { fn default() -> Self { let mut p = Self { accumulator: Default::default(), elements: BTreeMap::new(), r: BTreeMap::new(), }; p.elements.insert(U256::zero(), Default::default()); p.r.insert(U256::zero(), Default::default()); p } } impl<D> std::iter::FromIterator<Output<D>> for SimpleProver<D> where D: Digest<OutputSize = TU32> + Clone + Default, { fn from_iter<T>(iter: T) -> Self where T: IntoIterator<Item = Element<Self>>, { let mut acc = Self::default(); for e in iter { acc.insert(&e); } acc } } impl<D> From<SimpleAccumulator<D>> for SimpleProver<D> where D: Digest<OutputSize = TU32> + Clone + Default, { fn from(accumulator: SimpleAccumulator<D>) -> Self { Self { accumulator, ..Default::default() } } } impl<D> Accumulator for SimpleProver<D> where D: Digest<OutputSize = TU32> + Clone + Default, { type Digest = D; fn len(&self) -> U256 { self.accumulator.len() } fn state(&self) -> &BTreeMap<usize, Element<Self>> { &self.accumulator.s } fn state_mut(&mut self) -> &mut BTreeMap<usize, Element<Self>> { self.accumulator.state_mut() } fn insert(&mut self, element: &Element<Self>) -> Element<Self> { let r = self.accumulator.insert(element); self.elements.insert(self.len(), *element); self.r.insert(self.len(), r); r } } impl<D> Prover for SimpleProver<D> where D: Digest<OutputSize = TU32> + Clone + Default, { fn elements(&self) -> &BTreeMap<U256, Element<Self>> { &self.elements } fn r(&self) -> &BTreeMap<U256, Element<Self>> { &self.r } fn prove_from( &self, i: impl Into<U256>, j: impl Into<U256>, ) -> Result<Vec<Element<Self>>, ProverError> { let (i, j) = (i.into(), j.into()); if j > i { return Err(ProverError::OutOfBounds); }; let pred_i = utils::pred(i); let elements_i = self.get_element(&i).ok_or(ProverError::MissingHistory(i))?; let prev = self .get_r(&(i - 1)) .ok_or_else(|| ProverError::MissingHistory(i - 1))?; let pred = self .get_r(&pred_i) .ok_or(ProverError::MissingHistory(pred_i))?; let mut witness = vec![*elements_i, *prev, *pred]; if i > j { if pred_i >= j { witness.extend(self.prove_from(pred_i, j)?); } else { witness.extend(self.prove_from(i - 1, j)?); } } Ok(witness) } fn verify( r_i: &Element<Self>, i: U256, j: U256, witness: &[Element<Self>], element: &Element<Self>, ) -> Result<(), ProverError> { assert!(j <= i); if witness.len() < 3 { return Err(ProverError::WitnessTooShort); } let (x_i, r_prev, r_pred) = (&witness[0], &witness[1], &witness[2]); let d = Self::get_digest().chain(x_i).chain(r_prev).chain(r_pred); let d = d.finalize(); if d != *r_i { return Err(ProverError::RiMismatch); } if i == j { if x_i == element { return Ok(()); } else { return Err(ProverError::XiMismatch); } } if utils::pred(i) >= j { return Self::verify(r_pred, utils::pred(i), j, &witness[3..], element); } Self::verify(r_prev, i - 1, j, &witness[3..], element) } } #[cfg(test)] mod tests { use super::*; use sha2; #[test] fn it_works() { let mut prover = SimpleProver::<sha2::Sha256>::default(); let plain_elements = ["some", "small", "list", "of", "distinct", "elements"]; let elements: Vec<_> = plain_elements .iter() .map(|e| sha2::Sha256::digest(e.as_ref())) .collect(); prover.insert_data(plain_elements[0]); prover.insert_data(plain_elements[1]); prover.insert_data(plain_elements[2]); prover.insert_data(plain_elements[3]); let root_4 = prover.get_root(); prover.insert_data(plain_elements[4]); prover.insert_data(plain_elements[5]); let witness = prover.prove_from(4, 4).unwrap(); SimpleProver::<sha2::Sha256>::verify(&root_4, 4.into(), 4.into(), &witness, &elements[3]) .unwrap(); } }
use crate::demo_camera_plugin::Page; use bevy::prelude::*; /// Tags the main text. struct TitleText; /// Tags the subtitle text. struct SubtitleText; /// Text visible only on a certain page. struct BodyText(isize); pub struct DemoUiPlugin; impl Plugin for DemoUiPlugin { fn build(&self, app: &mut AppBuilder) { app.add_startup_system(setup_ui.system()) .add_system(update_title_text.system()) .add_system(update_subtitle_text.system()) .add_system(body_text_visibility.system()); } } #[allow(clippy::too_many_lines)] // Too homogeneous to split fn setup_ui(commands: &mut Commands, asset_server: Res<AssetServer>) { let font: Handle<Font> = asset_server.load("fonts/FiraSans-Bold.ttf"); // UI camera commands.spawn(CameraUiBundle::default()); // Title text commands .spawn(TextBundle { style: Style { align_self: AlignSelf::FlexEnd, margin: Rect { left: Val::Px(30.0), top: Val::Px(30.0), ..Rect::default() }, ..Style::default() }, text: Text { font: font.clone(), style: TextStyle { font_size: 60.0, color: Color::WHITE, ..TextStyle::default() }, ..Text::default() }, ..TextBundle::default() }) .with(TitleText); // Subtitle text commands .spawn(TextBundle { style: Style { align_self: AlignSelf::FlexEnd, position_type: PositionType::Absolute, position: Rect { left: Val::Px(30.0), top: Val::Px(100.0), ..Rect::default() }, ..Style::default() }, text: Text { font: font.clone(), style: TextStyle { font_size: 20.0, color: Color::WHITE, ..TextStyle::default() }, ..Text::default() }, ..TextBundle::default() }) .with(SubtitleText); // Welcome text commands .spawn(TextBundle { style: Style { align_self: AlignSelf::FlexEnd, position_type: PositionType::Absolute, position: Rect { top: Val::Px(150.0), left: Val::Px(250.0), ..Rect::default() }, ..Style::default() }, text: Text { font: font.clone(), style: TextStyle { font_size: 90.0, color: Color::WHITE, ..TextStyle::default() }, value: "Welcome to the\nbevy_prototype_lyon\ndemo!".to_string(), }, ..TextBundle::default() }) .with(BodyText(0)); // Welcome text description commands .spawn(TextBundle { style: Style { align_self: AlignSelf::FlexEnd, position_type: PositionType::Absolute, position: Rect { top: Val::Px(500.0), left: Val::Px(350.0), ..Rect::default() }, ..Style::default() }, text: Text { font: font.clone(), style: TextStyle { font_size: 30.0, color: Color::WHITE, ..TextStyle::default() }, value: "Use the AD keys to move across pages".to_string(), }, ..TextBundle::default() }) .with(BodyText(0)); // Closing text commands .spawn(TextBundle { style: Style { align_self: AlignSelf::FlexEnd, position_type: PositionType::Absolute, position: Rect { top: Val::Px(150.0), left: Val::Px(250.0), ..Rect::default() }, ..Style::default() }, text: Text { font, style: TextStyle { font_size: 90.0, color: Color::WHITE, ..TextStyle::default() }, value: "Thanks for using\nbevy_prototype_lyon!".to_string(), }, ..TextBundle::default() }) .with(BodyText(5)); } fn update_title_text(mut query: Query<&mut Text, With<TitleText>>, page: ChangedRes<Page>) { for mut text in query.iter_mut() { text.value = match page.0 { 1 => "Easy physics integration", 2 => "Draw paths like you do in <canvas>", 3 => "Draw perfect regular polygons", 4 => "This is a single entity", _ => "", } .to_owned(); } } fn update_subtitle_text(mut query: Query<&mut Text, With<SubtitleText>>, page: ChangedRes<Page>) { for mut text in query.iter_mut() { text.value = match page.0 { 1 => "Also look at the transparency effect :3", 2 => "Has still room for improvement", 3 => "Use the inspector to tweak the properties!", 4 => "Try to move it", _ => "", } .to_owned(); } } fn body_text_visibility(mut query: Query<(&mut Visible, &BodyText)>, slide: ChangedRes<Page>) { for (mut visible, body_text) in query.iter_mut() { visible.is_visible = body_text.0 == slide.0; } }
use actix_web::{HttpResponse, ResponseError}; use thiserror::Error; #[derive(Error, Debug)] pub enum ServerError { #[error("read config filed error ")] ConfigReadFile(String), #[error("io: {0}")] Io(#[from] std::io::Error), #[error("sqlx error: {0}")] SqlxError(#[from] sqlx::Error), } pub type ServerResult<T> = std::result::Result<T, ServerError>; #[derive(Debug, serde::Serialize)] pub struct Msg { code: u32, msg: &'static str, } #[derive(Error, Debug)] pub enum ApiError { #[error("sqlx error: {0}")] SqlxError(#[from] sqlx::Error), //#[error("duplicated field for {0}({1})")] //DuplicatedField(&'static str, &'static str), #[error("bcrypt error: {0}")] BcryptError(#[from] bcrypt::BcryptError), #[error("customer error")] CustomerError(Msg), #[error("unknon error")] UnknowError, } #[inline] pub fn customer_error(code: u32, msg: &'static str) -> ApiError { ApiError::CustomerError(Msg { code, msg }) } impl ResponseError for ApiError { fn error_response(&self) -> HttpResponse { match self { Self::UnknowError => HttpResponse::InternalServerError() .content_type(actix_web::http::header::ContentType::json()) .body(r#"{"code":50001, "msg": "unknown error"}"#), Self::CustomerError(msg) => HttpResponse::BadRequest().json(msg), _ => { println!("{:?}", self); HttpResponse::InternalServerError().finish() } } } }
mod plugin; mod resources; mod systems; pub use plugin::*; pub use resources::*; pub use systems::*;
#[macro_use] extern crate criterion; extern crate eosio_numstr; use criterion::{black_box, Criterion}; fn name_from_bytes(c: &mut Criterion) { c.bench_function_over_inputs( "name_from_bytes", |b, input| { b.iter(|| eosio_numstr::name_from_bytes(black_box(input.bytes()))) }, vec![ "", "aaaaaa", "111111", "......", "aaaaaaaaaaaa", "111111111111", "............", "AAAAAAAAAAAA", "666666666666", "aaaaaaaaaaaaa", ], ); } fn name_to_bytes(c: &mut Criterion) { c.bench_function_over_inputs( "name_to_bytes", |b, input| b.iter(|| eosio_numstr::name_to_bytes(black_box(*input))), vec![0, 3_458_764_513_820_540_928, 614_251_535_012_020_768], ); } fn symbol_code_from_bytes(c: &mut Criterion) { c.bench_function_over_inputs( "symbol_code_from_bytes", |b, input| { b.iter(|| { eosio_numstr::symbol_code_from_bytes(black_box(input.bytes())) }) }, vec!["", "A", "AB", "ABC", "a", "ab", "abc"], ); } fn symbol_code_to_bytes(c: &mut Criterion) { c.bench_function_over_inputs( "symbol_code_to_bytes", |b, input| { b.iter(|| eosio_numstr::symbol_code_to_bytes(black_box(*input))) }, vec![0, 1_397_703_940, 5_138_124_851_399_447_552], ); } criterion_group!( benches, name_from_bytes, name_to_bytes, symbol_code_from_bytes, symbol_code_to_bytes ); criterion_main!(benches);
use crate::{ Future, Result, error::QuicksilverError, }; use futures::Async; /// A structure to manage the loading and use of a future pub struct Asset<T>(AssetData<T>); enum AssetData<T> { Loading(Box<dyn Future<Item = T, Error = QuicksilverError>>), Loaded(T) } impl<T> Asset<T> { /// Create a new asset from a future pub fn new(future: impl Future<Item = T, Error = QuicksilverError> + 'static) -> Asset<T> { Asset(AssetData::Loading(Box::new(future))) } /// Run a function if the loading is complete pub fn execute(&mut self, loaded: impl FnOnce(&mut T) -> Result<()>) -> Result<()> { self.execute_or(loaded, || Ok(())) } /// Run a function if the loading is complete, or a different function if it isn't pub fn execute_or(&mut self, loaded: impl FnOnce(&mut T) -> Result<()>, loading: impl FnOnce() -> Result<()>) -> Result<()> { let result = match self.0 { AssetData::Loading(ref mut asset) => asset.poll()?, _ => Async::NotReady }; if let Async::Ready(asset) = result { self.0 = AssetData::Loaded(asset); } match self.0 { AssetData::Loading(_) => loading(), AssetData::Loaded(ref mut data) => loaded(data) } } }
#![cfg(target_arch = "wasm32")] use proxy_wasm as wasm; use proxy_wasm::traits::{Context, HttpContext}; use proxy_wasm::types::{Action, LogLevel}; #[no_mangle] pub fn _start() { wasm::set_log_level(LogLevel::Trace); // Note: there are also RootContext and StreamContext that provide different callbacks wasm::set_http_context( |context_id, root_context_id| -> Box<HttpContext> { Box::new(MyContext { context_id: context_id, root_context_id: root_context_id, }) } ); } struct MyContext { context_id: u32, root_context_id: u32 } impl MyContext { } impl Context for MyContext { fn on_done(&mut self) -> bool { true } } impl HttpContext for MyContext { fn on_http_request_headers(&mut self, num_headers: usize) -> Action { self.add_http_request_header("X-my-custom-header", "hello world"); Action::Continue } fn on_http_request_trailers(&mut self, num_trailers: usize) -> Action { Action::Continue } fn on_http_request_body(&mut self, body_size: usize, stream_end: bool) -> Action { Action::Continue } fn on_http_response_headers(&mut self, num_headers: usize) -> Action { Action::Continue } fn on_http_response_trailers(&mut self, num_trailers: usize) -> Action { Action::Continue } fn on_http_response_body(&mut self, body_size: usize, stream_end: bool) -> Action { Action::Continue } }
pub const HEADER_PARTS_SEPARATOR: &[u8] = b":"; pub const LINE_SEPARATOR: &[u8] = b"\n"; pub const TERMINATOR: &[u8] = b"\x00"; pub const EMPTY: [u8; 0] = [];
#![deny(warnings)] mod argparser; mod commands; mod compiler; mod diagnostics; mod interner; mod output; mod parser; pub(crate) mod task; use std::ffi::OsString; use std::path::PathBuf; use std::sync::Arc; use anyhow::anyhow; use clap::crate_version; use firefly_session::{CodegenOptions, DebuggingOptions, OptionGroup, ShowOptionGroupHelp}; use firefly_util::diagnostics::Emitter; use firefly_util::error::HelpRequested; pub const FIREFLY_RELEASE: &'static str = crate_version!(); pub const FIREFLY_COMMIT_HASH: &'static str = env!("FIREFLY_COMMIT_HASH"); pub const FIREFLY_COMMIT_DATE: &'static str = env!("FIREFLY_COMMIT_DATE"); /// Runs the compiler using the provided working directory, args iterator, and default emitter /// /// Returns the exit code for the compiler if successful (in some cases it is non-zero), otherwise an error pub fn run_compiler(cwd: PathBuf, args: impl Iterator<Item = OsString>) -> anyhow::Result<i32> { run_compiler_with_emitter(cwd, args, None) } /// Runs the compiler using the provided working directory, args iterator, and emittter /// /// Returns the exit code for the compiler if successful (in some cases it is non-zero), otherwise an error pub fn run_compiler_with_emitter( cwd: PathBuf, args: impl Iterator<Item = OsString>, emitter: Option<Arc<dyn Emitter>>, ) -> anyhow::Result<i32> { // Parse arguments let matches = argparser::parse(args)?; // Parse option groups first, as they can produce usage let c_opts = match parse_option_group::<CodegenOptions>(&matches)? { Ok(opts) => opts, Err(code) => return Ok(code), }; let z_opts = match parse_option_group::<DebuggingOptions>(&matches)? { Ok(opts) => opts, Err(code) => return Ok(code), }; // Dispatch to the command implementation match matches.subcommand() { ("print", subcommand_matches) => { commands::print::handle_command(c_opts, z_opts, subcommand_matches.unwrap(), cwd) .map(|_| 0) } ("compile", subcommand_matches) => commands::compile::handle_command( c_opts, z_opts, subcommand_matches.unwrap(), cwd, emitter, ) .map(|_| 0), (subcommand, _) => Err(anyhow!(format!("Unrecognized subcommand '{}'", subcommand))), } } fn parse_option_group<'a, G: OptionGroup + Default>( matches: &clap::ArgMatches<'a>, ) -> anyhow::Result<Result<G, i32>> { match G::parse_option_group(matches) { Ok(None) => Ok(Ok(Default::default())), Ok(Some(opts)) => Ok(Ok(opts)), Err(err) => { if let Some(err) = err.downcast_ref::<HelpRequested>() { argparser::command_help(err.primary()); return Ok(Err(2)); } if let Some(err) = err.downcast_ref::<ShowOptionGroupHelp>() { err.print_help(); return Ok(Err(2)); } Err(err) } } }
#[cfg(feature = "datetime")] fn run() -> gdal::errors::Result<()> { use chrono::Duration; use gdal::vector::{Defn, Feature, FieldDefn, FieldValue}; use gdal::{Dataset, Driver}; use std::ops::Add; use std::path::Path; println!("gdal crate was build with datetime support"); let dataset_a = Dataset::open(Path::new("fixtures/points_with_datetime.json"))?; let mut layer_a = dataset_a.layer(0)?; // Create a new dataset: let path = std::env::temp_dir().join("later.geojson"); let _ = std::fs::remove_file(&path); let drv = Driver::get("GeoJSON")?; let mut ds = drv.create_vector_only(path.to_str().unwrap())?; let lyr = ds.create_layer(Default::default())?; // Copy the origin layer shema to the destination layer: for field in layer_a.defn().fields() { let field_defn = FieldDefn::new(&field.name(), field.field_type())?; field_defn.set_width(field.width()); field_defn.add_to_layer(&lyr)?; } // Get the definition to use on each feature: let defn = Defn::from_layer(&lyr); for feature_a in layer_a.features() { let mut ft = Feature::new(&defn)?; ft.set_geometry(feature_a.geometry().clone())?; // copy each field value of the feature: for field in defn.fields() { ft.set_field( &field.name(), &match feature_a.field(&field.name())?.unwrap() { // add one day to dates FieldValue::DateValue(value) => { println!("{} = {}", field.name(), value); FieldValue::DateValue(value.add(Duration::days(1))) } // add 6 hours to datetimes FieldValue::DateTimeValue(value) => { println!("{} = {}", field.name(), value); FieldValue::DateTimeValue(value.add(Duration::hours(6))) } v => v, }, )?; } // Add the feature to the layer: ft.create(&lyr)?; } Ok(()) } #[cfg(not(feature = "datetime"))] fn run() { println!("gdal crate was build without datetime support"); } fn main() { #[cfg(feature = "datetime")] run().unwrap(); #[cfg(not(feature = "datetime"))] run(); }
use std::path::Path; fn main() { let dir = Path::new("/tmp/passwd"); assert!(dir.ends_with("passwd")); }
mod app_env; mod auth; mod config; mod datastore; mod graphql; mod mail; mod projects; mod scalars; mod stories; mod users; use actix_cors::Cors; use actix_web::{middleware, web, App, HttpServer}; use app_env::get_env; use std::{env, io, sync::Mutex}; pub struct AppData { graphql_schema: graphql::Schema, datastore_client: datastore::client::Client, } #[actix_web::main] async fn main() -> io::Result<()> { println!("Starting..."); let app_start_time = chrono::prelude::Utc::now().timestamp_millis(); app_env::check_env(); env::set_var("RUST_LOG", "actix_web=info"); env_logger::init(); let datastore_client = crate::datastore::client::create_service() .await .map_err(|err| println!("{:?}", err)) .unwrap(); let port = get_env::port(); let addr = format!("0.0.0.0:{}", port); let data = web::Data::new(Mutex::new(AppData { graphql_schema: graphql::create_schema(), datastore_client, })); let app_connection_time = chrono::prelude::Utc::now().timestamp_millis(); println!("App is ready in {}ms", app_connection_time - app_start_time); HttpServer::new(move || { App::new() .app_data(data.clone()) .wrap( Cors::default() .allow_any_header() .allow_any_method() .allow_any_origin() .max_age(3600), ) .wrap(middleware::Logger::default()) .configure(config::config) }) .bind(addr)? .run() .await }
use crate::query_tests::setups::SETUPS; use data_types::ColumnType; use futures::FutureExt; use observability_deps::tracing::*; use std::{collections::HashMap, sync::Arc}; use test_helpers_end_to_end::{maybe_skip_integration, MiniCluster, Step, StepTest, StepTestState}; #[tokio::test] async fn list_all() { Arc::new(SchemaTest { setup_name: "TwoMeasurements", table_name: "cpu", expected_columns: HashMap::from([ ("user".into(), ColumnType::F64), ("region".into(), ColumnType::Tag), ("time".into(), ColumnType::Time), ]), }) .run() .await; } struct SchemaTest { setup_name: &'static str, table_name: &'static str, expected_columns: HashMap<String, ColumnType>, } impl SchemaTest { async fn run(self: Arc<Self>) { test_helpers::maybe_start_logging(); let database_url = maybe_skip_integration!(); let setup_name = self.setup_name; info!("Using setup {setup_name}"); // Set up the cluster ==================================== let mut cluster = MiniCluster::create_shared_never_persist(database_url.clone()).await; let setup_steps = SETUPS .get(setup_name) .unwrap_or_else(|| panic!("Could not find setup with key `{setup_name}`")) .iter(); let cloned_self = Arc::clone(&self); let test_step = Step::Custom(Box::new(move |state: &mut StepTestState| { let cloned_self = Arc::clone(&cloned_self); async move { let mut client = influxdb_iox_client::schema::Client::new( state.cluster().querier().querier_grpc_connection(), ); let response = client .get_schema(state.cluster().namespace()) .await .expect("successful response"); let table = response .tables .get(cloned_self.table_name) .expect("table not found"); let columns: HashMap<_, _> = table .columns .iter() .map(|(k, v)| (k.clone(), v.column_type().try_into().unwrap())) .collect(); assert_eq!(cloned_self.expected_columns, columns); } .boxed() })); StepTest::new(&mut cluster, setup_steps.chain(std::iter::once(&test_step))) .run() .await; } }
pub mod esp826601s; pub mod tcp; use crate::io::Result; use heapless::String; pub enum Status { Cnnected, Disconnect, } pub struct IfInfo { pub inet4: String<15>, pub netmask: String<15>, pub gateway: String<15>, pub ether: String<17>, } pub trait TcpStream: Sized { fn connect(addr: (&str, u16)) -> Result<Self>; fn read(&mut self, buf: &mut [u8]) -> Result<usize>; fn write(&mut self, buf: &[u8]) -> Result<usize>; fn set_write_buffer(&mut self, size: usize) -> Result<()>; fn set_read_buffer(&mut self, size: usize) -> Result<()>; } pub trait Net { fn connect() -> Self; fn disconnect(&mut self) -> Result<()>; fn hello(&mut self) -> Result<()>; fn state(&mut self) -> Result<Status>; fn reset(&mut self) -> Result<()>; fn recover(&mut self) -> Result<()>; fn ifinfo(&mut self) -> Result<IfInfo>; fn mac(&mut self) -> Result<String<17>>; fn ip(&mut self) -> Result<String<15>>; fn resolve(&mut self) -> Result<String<15>>; fn ping(&mut self, host: &str) -> Result<()>; fn open_tcp<T: TcpStream>(&mut self, addr: (&str, u16)) -> Result<T>; fn close_tcp<T: TcpStream>(&mut self, addr: (&str, u16)) -> Result<T>; }
use bytes::{Buf, Bytes}; use crate::error::Error; use crate::mssql::io::MssqlBufExt; use crate::mssql::protocol::pre_login::Version; #[allow(dead_code)] #[derive(Debug)] pub(crate) struct LoginAck { pub(crate) interface: u8, pub(crate) tds_version: u32, pub(crate) program_name: String, pub(crate) program_version: Version, } impl LoginAck { pub(crate) fn get(buf: &mut Bytes) -> Result<Self, Error> { let len = buf.get_u16_le(); let mut data = buf.split_to(len as usize); let interface = data.get_u8(); let tds_version = data.get_u32_le(); let program_name = data.get_b_varchar()?; let program_version_major = data.get_u8(); let program_version_minor = data.get_u8(); let program_version_build = data.get_u16(); Ok(Self { interface, tds_version, program_name, program_version: Version { major: program_version_major, minor: program_version_minor, build: program_version_build, sub_build: 0, }, }) } } #[test] fn test_get() { #[rustfmt::skip] let mut buf = Bytes::from_static(&[ 0x36, 0, 1, 0x74, 0, 0, 4, 0x16, 0x4d, 0, 0x69, 0, 0x63, 0, 0x72, 0, 0x6f, 0, 0x73, 0, 0x6f, 0, 0x66, 0, 0x74, 0, 0x20, 0, 0x53, 0, 51, 0, 0x4c, 0, 0x20, 0, 0x53, 0, 0x65, 0, 0x72, 0, 0x76, 0, 0x65, 0, 0x72, 0, 0, 0, 0, 0, 0xf, 0, 0x10, 0x7f, 0xe3, 0x13, 0, 4, 4, 0x34, 0, 0x30, 0, 0x39, 0, 0x36, 0, 4, 0x34, 0, 0x30, 0, 0x39, 0, 0x36, 0, 0xfd, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]); let login_ack = LoginAck::get(&mut buf).unwrap(); assert_eq!(login_ack.interface, 1); assert_eq!(login_ack.tds_version, 67108980); assert_eq!(login_ack.program_version.major, 15); assert_eq!(login_ack.program_version.minor, 0); assert_eq!(login_ack.program_version.build, 4223); assert_eq!(login_ack.program_version.sub_build, 0); assert_eq!(login_ack.program_name, "Microsoft S3L Server\0\0"); }
use eosio::{AccountName, Asset}; use structopt::StructOpt; /// Transfer tokens from account to account #[derive(StructOpt, Debug)] pub struct Transfer { /// The account sending tokens pub sender: AccountName, /// The account receiving tokens pub recipient: AccountName, /// The amount of tokens to send pub amount: Asset, /// The memo for the transfer pub memo: Option<String>, /// The contract which controls the token #[structopt(short, long, default_value = "eosio.token")] pub contract: AccountName, /// Pay ram to open recipient's token balance row #[structopt(long)] pub pay_ram_to_open: bool, #[structopt(flatten)] pub transaction_opts: super::TransactionOpts, }
extern crate maat_graphics; extern crate maat_input_handler; extern crate rand; extern crate parking_lot; extern crate rand_pcg; pub use maat_graphics::winit; pub use maat_graphics::cgmath; mod modules; use crate::modules::scenes::Scene; use crate::modules::scenes::LoadScreen; use maat_graphics::graphics::CoreRender; use maat_graphics::CoreMaat; use maat_graphics::DrawCall; use cgmath::{Vector2, Vector4}; use std::time; const MAJOR: u32 = 0; const MINOR: u32 = 0; const PATCH: u32 = 1; const DELTA_STEP: f64 = 0.001; fn benchmark(draw_calls: &mut Vec<DrawCall>, dimensions: Vector2<f32>) { draw_calls.push(DrawCall::draw_text_basic(Vector2::new(dimensions.x - 80.0, 15.0), Vector2::new(64.0, 64.0), Vector4::new(1.0, 1.0, 1.0, 1.0), "v".to_string() + &MAJOR.to_string() + "." + &MINOR.to_string() + "." + &PATCH.to_string(), "Arial".to_string())); } fn fps_overlay(draw_calls: &mut Vec<DrawCall>, dimensions: Vector2<f32>, fps: f64) { let mut fps = fps.to_string(); fps.truncate(6); draw_calls.push(DrawCall::draw_text_basic(Vector2::new(32.0, dimensions.y-48.0), Vector2::new(64.0, 64.0), Vector4::new(1.0, 1.0, 1.0, 1.0), "fps: ".to_string() + &fps, "Arial".to_string())); } fn main() { let (mut graphics, event_loop) = CoreMaat::new("TheTower".to_string(), (MAJOR) << 22 | (MINOR) << 12 | (PATCH), 1280.0, 1080.0, false); //graphics.set_icon("./resources/textures/entities/Sun_glasses.png".to_string()); graphics.preload_font(String::from("Arial"), String::from("./resources/fonts/TimesNewRoman.png"), include_bytes!("../resources/fonts/TimesNewRoman.fnt")); graphics.preload_texture(String::from("Logo"), String::from("./resources/textures/Logo.png")); // let floor = generate_terrain::generate_terrain_from_image("floor".to_string(), "./resources/models/terrain/heightmap.png".to_string()); //let floor = generate_terrain::generate_flat_terrain(); // background graphics.add_texture("background".to_string(), "./resources/textures/background.png".to_string()); //graphics.add_terrain(floor); graphics.add_model("house_one".to_string(), "./resources/models/house_one.glb".to_string()); graphics.add_model("house_two".to_string(), "./resources/models/house_two.glb".to_string()); graphics.add_model("house_double".to_string(), "./resources/models/house_double.glb".to_string()); graphics.add_model("playerone".to_string(), "./resources/models/playerone.glb".to_string()); graphics.add_model("hexagon".to_string(), "./resources/models/hexagon.glb".to_string()); graphics.add_model("fridge".to_string(), "./resources/models/fridge.glb".to_string()); graphics.add_model("model_floor".to_string(), "./resources/models/floor.glb".to_string()); graphics.add_model("unit_floor".to_string(), "./resources/models/unit_floor.glb".to_string()); graphics.add_model("hug_cube".to_string(), "./resources/models/hug_cube.glb".to_string()); graphics.add_model("debug_cube".to_string(), "./resources/models/debug_cube.glb".to_string()); graphics.add_model("flat_ramp".to_string(), "./resources/models/45DeFlat.glb".to_string()); graphics.add_model("flat_wall".to_string(), "./resources/models/45DeUpAndDown.glb".to_string()); graphics.add_model("static_collision_test".to_string(), "./resources/models/45DeToia.glb".to_string()); graphics.add_model("floor_wall".to_string(), "./resources/models/45DeDeux.glb".to_string()); graphics.add_model("house_l".to_string(), "./resources/models/HouseL.glb".to_string()); graphics.add_model("unit_cube".to_string(), "./resources/models/unit_cube.glb".to_string()); graphics.add_model("unit_cube1".to_string(), "./resources/models/unit_cube1.glb".to_string()); graphics.add_model("main_char".to_string(), "./resources/models/main_character.glb".to_string()); graphics.add_model("bullet".to_string(), "./resources/models/bullet.glb".to_string()); graphics.add_model("sight".to_string(), "./resources/models/sight.glb".to_string()); graphics.add_model("enemy".to_string(), "./resources/models/enemy.glb".to_string()); graphics.load_shaders(); graphics.create_model_instance_buffer("house_two".to_string()); graphics.set_clear_colour(0.2, 0.2, 0.2, 1.0); let mut game: Box<dyn Scene> = Box::new(LoadScreen::new()); let mut draw_calls: Vec<DrawCall> = Vec::with_capacity(100); //let mut delta_time = 0.0; let mut last_time = time::Instant::now(); let mut dimensions = Vector2::new(1.0, 1.0); let mut frame_counter = 0; let mut fps_timer = 0.0; let mut last_fps = 0.0; let mut total_delta_time: f64 = 0.0; let mut is_first_loop = true; let mut focused = true; event_loop.run(move |event, _, control_flow| { match event { winit::event::Event::Resumed => { focused = true; }, winit::event::Event::Suspended => { focused = false; }, winit::event::Event::WindowEvent { event: winit::event::WindowEvent::Focused(is_focused), .. } => { focused = is_focused; }, winit::event::Event::WindowEvent { event: winit::event::WindowEvent::CloseRequested, .. } => { *control_flow = winit::event_loop::ControlFlow::Exit; }, winit::event::Event::WindowEvent { event: winit::event::WindowEvent::Resized(_), .. } => { graphics.force_swapchain_recreate(); }, winit::event::Event::RedrawEventsCleared => { // Update function / draw area / do everything here plz let mut delta_time = last_time.elapsed().subsec_nanos() as f64 / 1000000000.0 as f64; last_time = time::Instant::now(); total_delta_time += delta_time;//last_time.elapsed().subsec_nanos() as f64 / 1000000000.0 as f64; if is_first_loop /*|| !focused*/ { delta_time = 0.0; total_delta_time = 0.0; is_first_loop = false; } frame_counter += 1; fps_timer += delta_time; if fps_timer > 1.0 { last_fps = frame_counter as f64 * (1.0/fps_timer); fps_timer = 0.0; frame_counter = 0; game.set_fps_last_frame(last_fps); } dimensions = graphics.get_virtual_dimensions(); if game.scene_finished() { if graphics.is_ready() { game = game.future_scene(dimensions); } } game.set_window_dimensions(dimensions); if total_delta_time > 0.05 { total_delta_time = 0.0; } game.handle_input(); let delta_steps = (total_delta_time / DELTA_STEP).floor() as usize; for _ in 0..delta_steps { game.update(DELTA_STEP as f32); total_delta_time -= DELTA_STEP; } //if total_delta_time > FPS_60 { // game.update(FPS_60 as f32); // total_delta_time -= FPS_60; //} /* let delta_steps = (total_delta_time / FPS_60).floor() as usize; for _ in 0..delta_steps { game.update(FPS_60 as f32); total_delta_time -= FPS_60; }*/ game.draw(&mut draw_calls); benchmark(&mut draw_calls, dimensions); fps_overlay(&mut draw_calls, dimensions, last_fps); let model_details = graphics.retrieve_models(); graphics.pre_draw(); graphics.draw(&draw_calls, delta_time as f32); graphics.post_draw(); draw_calls.clear(); for model_data in model_details { game.add_model_data(model_data); } if let Some((new_size, fullscreen)) = game.should_force_window_resize() { graphics.force_window_resize(new_size, fullscreen); } game.end_frame(); }, random_event => { if focused { game.handle_event(random_event); } }, } }); }
use bigneon_db::dev::TestProject; use bigneon_db::models::{EventInterest, User}; use bigneon_db::utils::clamp; use rand::prelude::*; use uuid::Uuid; #[test] fn create() { let project = TestProject::new(); let user = project.create_user().finish(); let event = project.create_event().finish(); let event_interest = EventInterest::create(event.id, user.id) .commit(project.get_connection()) .unwrap(); assert_eq!(event_interest.user_id, user.id); assert_eq!(event_interest.event_id, event.id); } #[test] fn total_interest() { let project = TestProject::new(); let user1 = project.create_user().finish(); let user2 = project.create_user().finish(); let event = project.create_event().finish(); let _event_interest1 = EventInterest::create(event.id, user1.id) .commit(project.get_connection()) .unwrap(); let _event_interest2 = EventInterest::create(event.id, user2.id) .commit(project.get_connection()) .unwrap(); assert_eq!( EventInterest::total_interest(event.id, project.get_connection()).unwrap(), 2 ); } #[test] fn user_interest() { let project = TestProject::new(); let user = project.create_user().finish(); let event = project.create_event().finish(); let _event_interest1 = EventInterest::create(event.id, user.id) .commit(project.get_connection()) .unwrap(); assert_eq!( EventInterest::user_interest(event.id, user.id, project.get_connection()).unwrap(), true ); } #[test] fn list_interested_users() { let project = TestProject::new(); let primary_event = project.create_event().finish(); let secondary_event = project.create_event().finish(); let primary_user = project.create_user().finish(); //Create set of secondary users with interest in the primary and secondary event let n_secondary_users = 15; let mut rng = thread_rng(); let p_event_interest_flag_list: Vec<u8> = (0..n_secondary_users) .map(|_| rng.gen_range(0, 2)) .collect(); //[0,1] let s_event_interest_flag_list: Vec<u8> = (0..n_secondary_users) .map(|_| rng.gen_range(0, 2)) .collect(); //[0,1] let mut secondary_user_list: Vec<User> = Vec::new(); secondary_user_list.reserve(n_secondary_users); for _u_id in 0..n_secondary_users { secondary_user_list.push(project.create_user().finish()); } //Let primary user show interest in primary event let _primary_event_interest = EventInterest::create(primary_event.id, primary_user.id) .commit(project.get_connection()) .unwrap(); //Let secondary users show interest in primary or/and secondary event let mut desired_user_id_completelist: Vec<Uuid> = Vec::new(); for u_id in 0..n_secondary_users { if p_event_interest_flag_list[u_id] == 1 { //Set interest for primary event desired_user_id_completelist.push(secondary_user_list[u_id].id); let _secondary_event_interest = EventInterest::create(primary_event.id, secondary_user_list[u_id].id) .commit(project.get_connection()) .unwrap(); } if s_event_interest_flag_list[u_id] == 1 { //Set interest for secondary event let _secondary_event_interest = EventInterest::create(secondary_event.id, secondary_user_list[u_id].id) .commit(project.get_connection()) .unwrap(); } } desired_user_id_completelist.sort(); //Sort results for testing purposes if desired_user_id_completelist.len() > 0 { let min_index: usize = 0; let max_index: usize = desired_user_id_completelist.len() - 1; //Test1 - Normal Query of list of interested users for event, excluding primary user let request_from_page: usize = 0; let request_limit: usize = request_from_page + 9; let result = EventInterest::list_interested_users( primary_event.id, primary_user.id, request_from_page as u64, request_limit as u64, project.get_connection(), ).unwrap(); //Comparison to ground truth let mut true_from_index = clamp(request_from_page, min_index, max_index); let mut true_to_index = clamp(request_limit, min_index, max_index); if true_from_index > true_to_index { //swap if needed let temp = true_from_index; true_from_index = true_to_index; true_to_index = temp; } let desired_user_id_sublist = &desired_user_id_completelist[true_from_index..=true_to_index]; let n_sublist_entries = desired_user_id_sublist.len(); for u_id in 0..n_sublist_entries { assert_eq!(desired_user_id_sublist[u_id], result.users[u_id].user_id); } //Test2 - Partial out-of-bounds and switched "from" and "to" query of list of interested users for event, excluding primary user let n_primary_interests = desired_user_id_completelist.len(); let request_from_index: usize = n_primary_interests + 5; let request_to_index: usize = n_primary_interests; let result = EventInterest::list_interested_users( primary_event.id, primary_user.id, request_from_index as u64, request_to_index as u64, project.get_connection(), ).unwrap(); //Comparison to ground truth let mut true_from_index = clamp(request_from_index, min_index, max_index); let mut true_to_index = clamp(request_to_index, min_index, max_index); if true_from_index > true_to_index { //swap if needed let temp = true_from_index; true_from_index = true_to_index; true_to_index = temp; } let desired_user_id_sublist = &desired_user_id_completelist[true_from_index..=true_to_index]; let n_sublist_entries = desired_user_id_sublist.len(); for u_id in 0..n_sublist_entries { assert_eq!(desired_user_id_sublist[u_id], result.users[u_id].user_id); } } }
#[path = "float_to_list_2/with_float.rs"] pub mod with_float; // `without_float_errors_badarg` in unit tests
#[doc = "Reader of register D3CR"] pub type R = crate::R<u32, super::D3CR>; #[doc = "Writer for register D3CR"] pub type W = crate::W<u32, super::D3CR>; #[doc = "Register D3CR `reset()`'s with value 0x4000"] impl crate::ResetValue for super::D3CR { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0x4000 } } #[doc = "Reader of field `VOSRDY`"] pub type VOSRDY_R = crate::R<bool, bool>; #[doc = "Reader of field `VOS`"] pub type VOS_R = crate::R<u8, u8>; #[doc = "Write proxy for field `VOS`"] pub struct VOS_W<'a> { w: &'a mut W, } impl<'a> VOS_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 << 14)) | (((value as u32) & 0x03) << 14); self.w } } impl R { #[doc = "Bit 13 - VOS Ready bit for VCORE voltage scaling output selection. This bit is set to 1 by hardware when Bypass mode is selected in PWR control register 3 (PWR_CR3)."] #[inline(always)] pub fn vosrdy(&self) -> VOSRDY_R { VOSRDY_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bits 14:15 - Voltage scaling selection according to performance These bits control the VCORE voltage level and allow to obtains the best trade-off between power consumption and performance: When increasing the performance, the voltage scaling shall be changed before increasing the system frequency. When decreasing performance, the system frequency shall first be decreased before changing the voltage scaling."] #[inline(always)] pub fn vos(&self) -> VOS_R { VOS_R::new(((self.bits >> 14) & 0x03) as u8) } } impl W { #[doc = "Bits 14:15 - Voltage scaling selection according to performance These bits control the VCORE voltage level and allow to obtains the best trade-off between power consumption and performance: When increasing the performance, the voltage scaling shall be changed before increasing the system frequency. When decreasing performance, the system frequency shall first be decreased before changing the voltage scaling."] #[inline(always)] pub fn vos(&mut self) -> VOS_W { VOS_W { w: self } } }
// See LICENSE file for copyright and license details. use serialize::{Decodable, json}; use error_context; use core::misc::read_file; pub struct Config { json: json::JsonObject, } fn decode<A: Decodable<json::Decoder, json::DecoderError>>(json_obj: json::Json) -> A { let mut decoder = json::Decoder::new(json_obj); let decoded: A = Decodable::decode(&mut decoder).unwrap(); decoded } impl Config { pub fn new(path: &Path) -> Config { set_error_context!("parsing config", path.as_str().unwrap()); let json = match json::from_str(read_file(path).as_slice()) { Ok(json::Object(obj)) => obj, Err(msg) => panic!("Config parsing error: {}", msg), some_error => panic!("Unknown config parsing error: {}", some_error), }; Config { json: json, } } pub fn get<A: Decodable<json::Decoder, json::DecoderError>>(&self, name: &str) -> A { let owned_name_str = name.into_string(); decode(match self.json.find(&owned_name_str) { Some(val) => val.clone(), None => panic!("No field '{}", name), }) } } // vim: set tabstop=4 shiftwidth=4 softtabstop=4 expandtab:
use std::io::prelude::*; use std::fs::File; use std::collections::BTreeMap; use std::iter::FromIterator; pub fn handler(filename: &String) -> String{ let mut f: File = File::open(filename).expect("file not found"); let mut contents = String::new(); f.read_to_string(&mut contents).expect("file cannot be read"); println!("{}", contents); contents } //hashmap to find how many times a word is re pub fn most_used(contents: &String){ let mut map: BTreeMap<&str, i32> = BTreeMap::new(); for word in contents.split_whitespace() { let count = map.entry(word).or_insert(0); *count += 1; } let mut v = Vec::from_iter(map); v.sort_by(|&(_, a), &(_, b)| b.cmp(&a)); println!("{:?}",v) }
mod chip8; use crate::chip8::Chip8; use std::fs::read; use std::{thread, time}; use sdl2::audio::{AudioCallback, AudioSpecDesired, AudioStatus}; use sdl2::event::Event; use sdl2::keyboard::Keycode; use sdl2::pixels::Color; use sdl2::rect::Rect; use clap::{crate_authors, crate_name, crate_version, App, Arg}; struct SquareWave { phase_inc: f32, phase: f32, volume: f32, } impl AudioCallback for SquareWave { type Channel = f32; fn callback(&mut self, out: &mut [f32]) { for x in out.iter_mut() { *x = if self.phase >= 0.0 && self.phase < 0.5 { self.volume } else { -self.volume }; self.phase = (self.phase + self.phase_inc) % 1.0; } } } fn set_key(chip8: &mut Chip8, keycode: Keycode, keydown: bool) { match keycode { Keycode::Num1 => chip8.set_key(0, keydown), Keycode::Num2 => chip8.set_key(1, keydown), Keycode::Num3 => chip8.set_key(2, keydown), Keycode::Num4 => chip8.set_key(3, keydown), Keycode::Q => chip8.set_key(4, keydown), Keycode::W => chip8.set_key(5, keydown), Keycode::E => chip8.set_key(6, keydown), Keycode::R => chip8.set_key(7, keydown), Keycode::A => chip8.set_key(8, keydown), Keycode::S => chip8.set_key(9, keydown), Keycode::D => chip8.set_key(10, keydown), Keycode::F => chip8.set_key(11, keydown), Keycode::Z => chip8.set_key(12, keydown), Keycode::X => chip8.set_key(13, keydown), Keycode::C => chip8.set_key(14, keydown), Keycode::V => chip8.set_key(15, keydown), _ => (), } } fn run(file: Vec<u8>) { let size = 10; let sdl_context = sdl2::init().unwrap(); let mut event_pump = sdl_context.event_pump().unwrap(); let video_subsystem = sdl_context.video().unwrap(); let window = video_subsystem .window("Chip8", 64 * size, 32 * size) .position_centered() .build() .unwrap(); let mut canvas = window.into_canvas().build().unwrap(); canvas.set_draw_color(Color::RGB(0, 0, 0)); canvas.clear(); let audio_subsystem = sdl_context.audio().unwrap(); let desired_spec = AudioSpecDesired { freq: Some(44100), channels: Some(1), samples: None, }; let device = audio_subsystem .open_playback(None, &desired_spec, |spec| SquareWave { phase_inc: 440.0 / spec.freq as f32, phase: 0.0, volume: 0.25, }) .unwrap(); let mut chip8 = Chip8::new(); chip8.load_font(); canvas.set_draw_color(Color::RGB(0, 0, 0)); canvas.clear(); chip8.load_game(file); 'running: loop { for event in event_pump.poll_iter() { match event { Event::Quit { .. } | Event::KeyDown { keycode: Some(Keycode::Escape), .. } => break 'running, Event::KeyDown { keycode: Some(keycode), .. } => { set_key(&mut chip8, keycode, true); } Event::KeyUp { keycode: Some(keycode), .. } => { set_key(&mut chip8, keycode, false); } _ => {} } } chip8.run_cycle(); match device.status() { AudioStatus::Stopped | AudioStatus::Paused => { if chip8.sound_timer() > 0 { device.resume(); } } AudioStatus::Playing => { if chip8.sound_timer() == 0 { device.pause(); } } } let display = chip8.display(); for (h, row) in display.iter().enumerate() { for (w, pixel) in row.iter().enumerate() { if *pixel { canvas.set_draw_color(Color::RGB(255, 255, 255)); } else { canvas.set_draw_color(Color::RGB(0, 0, 0)); } canvas .fill_rect(Rect::new( w as i32 * size as i32, h as i32 * size as i32, size, size, )) .unwrap(); } } canvas.present(); thread::sleep(time::Duration::from_millis(2)); } } fn main() { let matches = App::new(crate_name!()) .version(crate_version!()) .author(crate_authors!()) .about("An implementation of a Chip 8 emulator") .arg( Arg::with_name("file") .short("f") .long("file") .value_name("FILE") .help("Sets a file to process") .takes_value(true), ) .get_matches(); match matches.value_of("file") { Some(filename) => match read(filename) { Ok(file) => { run(file); } Err(_) => eprintln!("Cannot open file"), }, None => eprintln!("Please set the -f flag with a file"), } }
pub(crate) mod node { tonic::include_proto!("node"); } mod vm_handler; pub mod vmm_service;
#![feature(io)] use std::error::FromError; use std::str::Utf8Error; use std::string::FromUtf8Error; use std::old_io::{Reader, BufReader, IoError}; use std::old_io::net::ip::IpAddr; #[derive(Debug)] pub enum Error { Io(IoError), FormatError(FormatError) } #[derive(Debug, Copy)] pub enum FormatError { UnknownBlock(u32), UnknownOption(u16), Utf8Error(Utf8Error) } impl FromError<IoError> for Error { fn from_error(err: IoError) -> Error { Error::Io(err) } } impl FromError<FromUtf8Error> for Error { fn from_error(err: FromUtf8Error) -> Error { Error::FormatError(FormatError::Utf8Error(err.utf8_error())) } } impl FromError<FormatError> for Error { fn from_error(err: FormatError) -> Error { Error::FormatError(err) } } #[derive(Debug)] pub enum Block { SectionHeader(SectionHeaderBlock), InterfaceDescription(InterfaceDescriptionBlock), InterfaceStatistics(InterfaceStatisticsBlock), EnhancedPacket(EnhancedPacketBlock) } #[derive(Debug)] pub struct SectionHeaderBlock { /// Magic number equal to 0x1A2B3C4D. This field can be used to detect /// sections saved on systems with different endianness. pub magic: u32, pub major_version: u16, pub minor_version: u16, /// Length in bytes of the following section excluding this block. /// /// This block can be used to skip the section for faster navigation in /// large files. Length of -1u64 means that the length is unspecified. pub section_length: u64, pub options: Vec<SectionHeaderOption> } #[derive(Debug)] pub enum SectionHeaderOption { /// Comment associated with the current block Comment(String), /// Description of the hardware used to create this section Hardware(String), /// Name of the operating system used to create this section OS(String), /// Name of the application used to create this section UserApplication(String) } /// Block type 1 #[derive(Debug)] pub struct InterfaceDescriptionBlock { /// Link layer type of the interface pub link_type: u16, /// Maximum number of bytes stored from each packet pub snap_len: u32, pub options: Vec<InterfaceDescriptionOption> } #[derive(Debug)] pub enum InterfaceDescriptionOption { /// Comment associated with the current block Comment(String), /// Name of the device used to capture data Name(String), /// Description of the device used to capture data Description(String), /// IPv4 interface address and netmask Ipv4Addr(u32, u32), /// IPv6 interface address and prefix length Ipv6Addr(IpAddr, u8), /// Hardware MAC address (48 bits) MacAddr(u64), /// Hardware EUI address EuiAddr(u64), /// Interface speed in bps Speed(u64), /// Resolution of timestamps. /// /// If the MSB is equal to zero, the remaining bits indicate the resolution /// as a negative power of 10 (e.g. 6 means microsecond resolution, /// timestamps are teh number of microseconds since 1/1/1970). /// /// If the MSB is equal to one, the remaining bits indicate the resolution /// as a negative power of 2 (e.g. 10 means 1/1024 of a second). /// /// If this options is not present, microsecond resolution is assumed. TsResolution(u8), /// Timezone for GMT support (?) Timezone(u32), /// The filter used to capture traffic. The first byte specifies the type /// of filter used (e.g. libpcap string, BPF bytecode, etc) Filter(u8, Vec<u8>), /// Operating system of the machine in which this interface is installed. /// This can be different from the Section Header Block if the capture /// was done remotely. OS(String), /// Length of Frame Check Sequence in bits for this interface. For link /// layers whose FCS length can change during time, the Packet Block /// flags be used. FcsLen(u8), /// Offset pf the timestamp in seconds TsOffset(u64) } /// Block type 5 #[derive(Debug)] pub struct InterfaceStatisticsBlock { pub interface_id: u32, pub timestamp: u64, pub options: Vec<InterfaceStatisticsOption> } #[derive(Debug)] pub enum InterfaceStatisticsOption { /// Comment associated with the current block Comment(String), /// Time when capture started StartTime(u64), /// Time when capture ended EndTime(u64), /// Number of packets received from the physical interface Received(u64), /// Number of packets dropped by the interface due to the lack of resources Dropped(u64), /// Number of packets accepted by the filter FilterAccepted(u64), /// Number of packets dropped by the operating system OSDropped(u64), /// Number of packets delivered to the user starting. The value in this /// field can be different from 'Accepted - Dropped' because some packets /// could still be in the OS buffers when the capture ended. Delivered(u64) } #[derive(Debug)] pub struct EnhancedPacketBlock { pub interface_id: u32, pub timestamp: u64, /// Actual length of the packet when it was transmitted on the network pub len: u32, pub data: Vec<u8>, pub options: Vec<EnhancedPacketBlockOption> } #[derive(Debug)] pub enum EnhancedPacketBlockOption { Comment(String), Flags(u32), Hash, /// Number of packets lost between the last packet DropCount(u64) } #[inline(always)] fn dword_aligned(n: usize) -> usize { (n + 3) & !3 } pub fn read_raw_block(r: &mut Reader) -> Result<(u32, Vec<u8>), IoError> { let block_type = try!(r.read_le_u32()); let total_len = try!(r.read_le_u32()) as usize; let data_len = total_len - 12; // 12 = type + 2*length let mut data = try!(r.read_exact(dword_aligned(data_len))); data.truncate(data_len); assert!(total_len == try!(r.read_le_u32()) as usize); Ok((block_type, data)) } fn read_option(r: &mut Reader) -> Result<(u16, Vec<u8>), IoError> { let code = try!(r.read_le_u16()); let len = try!(r.read_le_u16()) as usize; let mut data = try!(r.read_exact(dword_aligned(len))); data.truncate(len); Ok((code, data)) } pub fn read_block(r: &mut Reader) -> Result<Block, Error> { use Block::*; let (block_type, data) = try!(read_raw_block(r)); let mut r = BufReader::new(&*data); let r = match block_type { 0x0A0D0D0A => SectionHeader(try!(SectionHeaderBlock::read(&mut r))), 1 => InterfaceDescription(try!(InterfaceDescriptionBlock::read(&mut r))), 5 => InterfaceStatistics(try!(InterfaceStatisticsBlock::read(&mut r))), 6 => EnhancedPacket(try!(EnhancedPacketBlock::read(&mut r))), _ => return Err(FromError::from_error(FormatError::UnknownBlock(block_type))) }; Ok(r) } pub struct BlockIter<'a> { r: &'a mut (Reader + 'a) } pub struct PacketIter<'a> { r: &'a mut SimpleReader<'a> } pub struct SimpleReader<'a> { r: &'a mut (Reader + 'a), interfaces: Vec<InterfaceDescriptionBlock>, if_offset: usize } impl<'a> Iterator for BlockIter<'a> { type Item = Block; fn next(&mut self) -> Option<Block> { match read_block(self.r) { Ok(block) => Some(block), Err(_) => None } } } type IterPacket<'a> = (&'a InterfaceDescriptionBlock, EnhancedPacketBlock); impl<'a> Iterator for PacketIter<'a> { type Item = IterPacket<'a>; fn next(&mut self) -> Option<IterPacket<'a>> { while let Ok(block) = read_block(self.r.r) { match block { Block::SectionHeader(_) => { // Each section is independent from another, // however we might still have live references // to the old interface descriptions so we // can't just clear the vector self.r.if_offset = self.r.interfaces.len() }, Block::InterfaceDescription(id) => self.r.interfaces.push(id), Block::EnhancedPacket(ep) => { let iface = &self.r.interfaces[self.r.if_offset + ep.interface_id as usize]; unsafe { // The interface description should live as long as // SimpleReader, so this should be safe. let iface = std::mem::transmute(iface); return Some((iface, ep)) } }, _ => {} } } None } } impl<'a> SimpleReader<'a> { pub fn new(r: &mut Reader) -> SimpleReader { SimpleReader { r: r, interfaces: Vec::new(), if_offset: 0} } pub fn blocks(&mut self) -> BlockIter { BlockIter { r: self.r } } pub fn packets(&'a mut self) -> PacketIter<'a> { PacketIter { r: self } } } impl SectionHeaderBlock { pub fn read(r: &mut BufReader) -> Result<SectionHeaderBlock, Error> { let magic = try!(r.read_le_u32()); assert!(magic == 0x1A2B3C4D, "unsupported endianness"); let major_version = try!(r.read_le_u16()); let minor_version = try!(r.read_le_u16()); let section_length = try!(r.read_le_u64()); let mut options = Vec::new(); if !r.eof() { loop { use SectionHeaderOption::*; let (code, data) = try!(read_option(r)); let opt = match code { 0 => break, 1...4 => { let s = try!(String::from_utf8(data)); match code { 1 => Comment(s), 2 => Hardware(s), 3 => OS(s), 4 => UserApplication(s), _ => unreachable!() } } _ => return Err(FromError::from_error(FormatError::UnknownOption(code))) }; options.push(opt); } } Ok(SectionHeaderBlock { magic: magic, major_version: major_version, minor_version: minor_version, section_length: section_length, options: options }) } } impl InterfaceDescriptionBlock { pub fn read(r: &mut BufReader) -> Result<InterfaceDescriptionBlock, Error> { let link_type = try!(r.read_le_u16()); try!(r.read_le_u16()); // reserved let snap_len = try!(r.read_le_u32()); let mut options = Vec::new(); if !r.eof() { loop { use InterfaceDescriptionOption::*; let (code, data) = try!(read_option(r)); let mut d = &*data; let opt = match code { 0 => break, 1...3 | 12 => { let s = try!(String::from_utf8(data.clone())); match code { 1 => Comment(s), 2 => Name(s), 3 => Description(s), 12 => OS(s), _ => unreachable!() } } 4 => { let ip = try!(d.read_le_u32()); let mask = try!(d.read_le_u32()); Ipv4Addr(ip, mask) } 6 => MacAddr(try!(d.read_le_uint_n(6))), 9 => TsResolution(try!(d.read_byte())), _ => return Err(FromError::from_error(FormatError::UnknownOption(code))) }; options.push(opt); } } Ok(InterfaceDescriptionBlock { link_type: link_type, snap_len: snap_len, options: options }) } } impl EnhancedPacketBlock { pub fn read(r: &mut BufReader) -> Result<EnhancedPacketBlock, Error> { let interface_id = try!(r.read_le_u32()); let ts = try!(r.read_le_u64()); let cap_len = try!(r.read_le_u32()) as usize; let len = try!(r.read_le_u32()); let aligned_len = dword_aligned(cap_len); let mut packet_data = try!(r.read_exact(aligned_len)); packet_data.truncate(cap_len); let mut options = Vec::new(); if !r.eof() { loop { use EnhancedPacketBlockOption::*; let (code, data) = try!(read_option(r)); let opt = match code { 0 => break, 1 => { match String::from_utf8(data.clone()) { Ok(r) => Comment(r), Err(err) => return Err(FromError::from_error(err)) } } // TODO: rest of the options _ => return Err(FromError::from_error(FormatError::UnknownOption(code))) }; options.push(opt); } } Ok(EnhancedPacketBlock { interface_id: interface_id, timestamp: ts, len: len, data: packet_data, options: options }) } } impl InterfaceStatisticsBlock { pub fn read(r: &mut BufReader) -> Result<InterfaceStatisticsBlock, Error> { let interface_id = try!(r.read_le_u32()); let ts = try!(r.read_le_u64()); let mut options = Vec::new(); if !r.eof() { loop { use InterfaceStatisticsOption::*; let (code, data) = try!(read_option(r)); let opt = match code { 0 => break, 1 => { match String::from_utf8(data.clone()) { Ok(r) => Comment(r), Err(err) => return Err(FromError::from_error(err)) } } 2...8 => { let data = try!((&*data).read_le_u64()); match code { 2 => StartTime(data), 3 => EndTime(data), 4 => Received(data), 5 => Dropped(data), 6 => FilterAccepted(data), 7 => OSDropped(data), 8 => Delivered(data), _ => unreachable!() } } _ => return Err(FromError::from_error(FormatError::UnknownOption(code))) }; options.push(opt); } } Ok(InterfaceStatisticsBlock { interface_id: interface_id, timestamp: ts, options: options }) } }
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] pub const ALLOW_PARTIAL_READS: u32 = 5u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct ALTERNATE_INTERFACE { pub InterfaceNumber: u16, pub AlternateInterfaceNumber: u16, } impl ALTERNATE_INTERFACE {} impl ::core::default::Default for ALTERNATE_INTERFACE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for ALTERNATE_INTERFACE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("ALTERNATE_INTERFACE").field("InterfaceNumber", &self.InterfaceNumber).field("AlternateInterfaceNumber", &self.AlternateInterfaceNumber).finish() } } impl ::core::cmp::PartialEq for ALTERNATE_INTERFACE { fn eq(&self, other: &Self) -> bool { self.InterfaceNumber == other.InterfaceNumber && self.AlternateInterfaceNumber == other.AlternateInterfaceNumber } } impl ::core::cmp::Eq for ALTERNATE_INTERFACE {} unsafe impl ::windows::core::Abi for ALTERNATE_INTERFACE { type Abi = Self; } pub const AUTO_CLEAR_STALL: u32 = 2u32; pub const AUTO_FLUSH: u32 = 6u32; pub const AUTO_SUSPEND: u32 = 129u32; pub const BMREQUEST_CLASS: u32 = 1u32; pub const BMREQUEST_DEVICE_TO_HOST: u32 = 1u32; pub const BMREQUEST_HOST_TO_DEVICE: u32 = 0u32; pub const BMREQUEST_STANDARD: u32 = 0u32; pub const BMREQUEST_TO_DEVICE: u32 = 0u32; pub const BMREQUEST_TO_ENDPOINT: u32 = 2u32; pub const BMREQUEST_TO_INTERFACE: u32 = 1u32; pub const BMREQUEST_TO_OTHER: u32 = 3u32; pub const BMREQUEST_VENDOR: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union BM_REQUEST_TYPE { pub s: BM_REQUEST_TYPE_0, pub B: u8, } impl BM_REQUEST_TYPE {} impl ::core::default::Default for BM_REQUEST_TYPE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for BM_REQUEST_TYPE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for BM_REQUEST_TYPE {} unsafe impl ::windows::core::Abi for BM_REQUEST_TYPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct BM_REQUEST_TYPE_0 { pub _bitfield: u8, } impl BM_REQUEST_TYPE_0 {} impl ::core::default::Default for BM_REQUEST_TYPE_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for BM_REQUEST_TYPE_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_BM").field("_bitfield", &self._bitfield).finish() } } impl ::core::cmp::PartialEq for BM_REQUEST_TYPE_0 { fn eq(&self, other: &Self) -> bool { self._bitfield == other._bitfield } } impl ::core::cmp::Eq for BM_REQUEST_TYPE_0 {} unsafe impl ::windows::core::Abi for BM_REQUEST_TYPE_0 { type Abi = Self; } pub const BULKIN_FLAG: u32 = 128u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct CHANNEL_INFO { pub EventChannelSize: u32, pub uReadDataAlignment: u32, pub uWriteDataAlignment: u32, } impl CHANNEL_INFO {} impl ::core::default::Default for CHANNEL_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for CHANNEL_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("CHANNEL_INFO").field("EventChannelSize", &self.EventChannelSize).field("uReadDataAlignment", &self.uReadDataAlignment).field("uWriteDataAlignment", &self.uWriteDataAlignment).finish() } } impl ::core::cmp::PartialEq for CHANNEL_INFO { fn eq(&self, other: &Self) -> bool { self.EventChannelSize == other.EventChannelSize && self.uReadDataAlignment == other.uReadDataAlignment && self.uWriteDataAlignment == other.uWriteDataAlignment } } impl ::core::cmp::Eq for CHANNEL_INFO {} unsafe impl ::windows::core::Abi for CHANNEL_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DEVICE_DESCRIPTOR { pub usVendorId: u16, pub usProductId: u16, pub usBcdDevice: u16, pub usLanguageId: u16, } impl DEVICE_DESCRIPTOR {} impl ::core::default::Default for DEVICE_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DEVICE_DESCRIPTOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DEVICE_DESCRIPTOR").field("usVendorId", &self.usVendorId).field("usProductId", &self.usProductId).field("usBcdDevice", &self.usBcdDevice).field("usLanguageId", &self.usLanguageId).finish() } } impl ::core::cmp::PartialEq for DEVICE_DESCRIPTOR { fn eq(&self, other: &Self) -> bool { self.usVendorId == other.usVendorId && self.usProductId == other.usProductId && self.usBcdDevice == other.usBcdDevice && self.usLanguageId == other.usLanguageId } } impl ::core::cmp::Eq for DEVICE_DESCRIPTOR {} unsafe impl ::windows::core::Abi for DEVICE_DESCRIPTOR { type Abi = Self; } pub const DEVICE_SPEED: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct DRV_VERSION { pub major: u32, pub minor: u32, pub internal: u32, } impl DRV_VERSION {} impl ::core::default::Default for DRV_VERSION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for DRV_VERSION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("DRV_VERSION").field("major", &self.major).field("minor", &self.minor).field("internal", &self.internal).finish() } } impl ::core::cmp::PartialEq for DRV_VERSION { fn eq(&self, other: &Self) -> bool { self.major == other.major && self.minor == other.minor && self.internal == other.internal } } impl ::core::cmp::Eq for DRV_VERSION {} unsafe impl ::windows::core::Abi for DRV_VERSION { type Abi = Self; } pub const FILE_DEVICE_USB: u32 = 34u32; pub const FILE_DEVICE_USB_SCAN: u32 = 32768u32; pub const FullSpeed: u32 = 2u32; pub const GUID_DEVINTERFACE_USB_BILLBOARD: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5e9adaef_f879_473f_b807_4e5ea77d1b1c); pub const GUID_DEVINTERFACE_USB_DEVICE: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa5dcbf10_6530_11d2_901f_00c04fb951ed); pub const GUID_DEVINTERFACE_USB_HOST_CONTROLLER: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3abf6f2d_71c4_462a_8a92_1e6861e6af27); pub const GUID_DEVINTERFACE_USB_HUB: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf18a0e88_c30c_11d0_8815_00a0c906bed8); pub const GUID_USB_MSOS20_PLATFORM_CAPABILITY_ID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd8dd60df_4589_4cc7_9cd2_659d9e648a9f); pub const GUID_USB_PERFORMANCE_TRACING: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd5de77a6_6ae9_425c_b1e2_f5615fd348a9); pub const GUID_USB_TRANSFER_TRACING: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x681eb8aa_403d_452c_9f8a_f0616fac9540); pub const GUID_USB_WMI_DEVICE_PERF_INFO: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66c1aa3c_499f_49a0_a9a5_61e2359f6407); pub const GUID_USB_WMI_NODE_INFO: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9c179357_dc7a_4f41_b66b_323b9ddcb5b1); pub const GUID_USB_WMI_STD_DATA: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4e623b20_cb14_11d1_b331_00a0c959bbd2); pub const GUID_USB_WMI_STD_NOTIFICATION: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4e623b20_cb14_11d1_b331_00a0c959bbd2); pub const GUID_USB_WMI_SURPRISE_REMOVAL_NOTIFICATION: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9bbbf831_a2f2_43b4_96d1_86944b5914b3); pub const GUID_USB_WMI_TRACING: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3a61881b_b4e6_4bf9_ae0f_3cd8f394e52f); pub const HCD_DIAGNOSTIC_MODE_OFF: u32 = 257u32; pub const HCD_DIAGNOSTIC_MODE_ON: u32 = 256u32; pub const HCD_DISABLE_PORT: u32 = 268u32; pub const HCD_ENABLE_PORT: u32 = 269u32; pub const HCD_GET_DRIVERKEY_NAME: u32 = 265u32; pub const HCD_GET_ROOT_HUB_NAME: u32 = 258u32; pub const HCD_GET_STATS_1: u32 = 255u32; pub const HCD_GET_STATS_2: u32 = 266u32; pub const HCD_TRACE_READ_REQUEST: u32 = 275u32; pub const HCD_USER_REQUEST: u32 = 270u32; pub const HighSpeed: u32 = 3u32; pub const IGNORE_SHORT_PACKETS: u32 = 4u32; pub const IOCTL_ABORT_PIPE: u32 = 2147491844u32; pub const IOCTL_CANCEL_IO: u32 = 2147491844u32; pub const IOCTL_GENERICUSBFN_ACTIVATE_USB_BUS: u32 = 2277420u32; pub const IOCTL_GENERICUSBFN_BUS_EVENT_NOTIFICATION: u32 = 2277430u32; pub const IOCTL_GENERICUSBFN_CONTROL_STATUS_HANDSHAKE_IN: u32 = 2277400u32; pub const IOCTL_GENERICUSBFN_CONTROL_STATUS_HANDSHAKE_OUT: u32 = 2277404u32; pub const IOCTL_GENERICUSBFN_DEACTIVATE_USB_BUS: u32 = 2277424u32; pub const IOCTL_GENERICUSBFN_GET_CLASS_INFO: u32 = 2277410u32; pub const IOCTL_GENERICUSBFN_GET_CLASS_INFO_EX: u32 = 2277434u32; pub const IOCTL_GENERICUSBFN_GET_INTERFACE_DESCRIPTOR_SET: u32 = 2277438u32; pub const IOCTL_GENERICUSBFN_GET_PIPE_STATE: u32 = 2277414u32; pub const IOCTL_GENERICUSBFN_REGISTER_USB_STRING: u32 = 2277441u32; pub const IOCTL_GENERICUSBFN_SET_PIPE_STATE: u32 = 2277417u32; pub const IOCTL_GENERICUSBFN_TRANSFER_IN: u32 = 2277389u32; pub const IOCTL_GENERICUSBFN_TRANSFER_IN_APPEND_ZERO_PKT: u32 = 2277393u32; pub const IOCTL_GENERICUSBFN_TRANSFER_OUT: u32 = 2277398u32; pub const IOCTL_GET_CHANNEL_ALIGN_RQST: u32 = 2147491860u32; pub const IOCTL_GET_DEVICE_DESCRIPTOR: u32 = 2147491864u32; pub const IOCTL_GET_HCD_DRIVERKEY_NAME: u32 = 2229284u32; pub const IOCTL_GET_PIPE_CONFIGURATION: u32 = 2147491880u32; pub const IOCTL_GET_USB_DESCRIPTOR: u32 = 2147491872u32; pub const IOCTL_GET_VERSION: u32 = 2147491840u32; pub const IOCTL_INDEX: u32 = 2048u32; pub const IOCTL_INTERNAL_USB_CYCLE_PORT: u32 = 2228255u32; pub const IOCTL_INTERNAL_USB_ENABLE_PORT: u32 = 2228247u32; pub const IOCTL_INTERNAL_USB_FAIL_GET_STATUS_FROM_DEVICE: u32 = 2229347u32; pub const IOCTL_INTERNAL_USB_GET_BUSGUID_INFO: u32 = 2229288u32; pub const IOCTL_INTERNAL_USB_GET_BUS_INFO: u32 = 2229280u32; pub const IOCTL_INTERNAL_USB_GET_CONTROLLER_NAME: u32 = 2229284u32; pub const IOCTL_INTERNAL_USB_GET_DEVICE_CONFIG_INFO: u32 = 2229327u32; pub const IOCTL_INTERNAL_USB_GET_DEVICE_HANDLE: u32 = 2229299u32; pub const IOCTL_INTERNAL_USB_GET_DEVICE_HANDLE_EX: u32 = 2229303u32; pub const IOCTL_INTERNAL_USB_GET_HUB_COUNT: u32 = 2228251u32; pub const IOCTL_INTERNAL_USB_GET_HUB_NAME: u32 = 2228256u32; pub const IOCTL_INTERNAL_USB_GET_PARENT_HUB_INFO: u32 = 2229292u32; pub const IOCTL_INTERNAL_USB_GET_PORT_STATUS: u32 = 2228243u32; pub const IOCTL_INTERNAL_USB_GET_ROOTHUB_PDO: u32 = 2228239u32; pub const IOCTL_INTERNAL_USB_GET_TOPOLOGY_ADDRESS: u32 = 2229311u32; pub const IOCTL_INTERNAL_USB_GET_TT_DEVICE_HANDLE: u32 = 2229307u32; pub const IOCTL_INTERNAL_USB_NOTIFY_IDLE_READY: u32 = 2229315u32; pub const IOCTL_INTERNAL_USB_RECORD_FAILURE: u32 = 2228267u32; pub const IOCTL_INTERNAL_USB_REGISTER_COMPOSITE_DEVICE: u32 = 4784131u32; pub const IOCTL_INTERNAL_USB_REQUEST_REMOTE_WAKE_NOTIFICATION: u32 = 4784139u32; pub const IOCTL_INTERNAL_USB_REQ_GLOBAL_RESUME: u32 = 2229323u32; pub const IOCTL_INTERNAL_USB_REQ_GLOBAL_SUSPEND: u32 = 2229319u32; pub const IOCTL_INTERNAL_USB_RESET_PORT: u32 = 2228231u32; pub const IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION: u32 = 2228263u32; pub const IOCTL_INTERNAL_USB_SUBMIT_URB: u32 = 2228227u32; pub const IOCTL_INTERNAL_USB_UNREGISTER_COMPOSITE_DEVICE: u32 = 4784135u32; pub const IOCTL_READ_REGISTERS: u32 = 2147491852u32; pub const IOCTL_RESET_PIPE: u32 = 2147491868u32; pub const IOCTL_SEND_USB_REQUEST: u32 = 2147491876u32; pub const IOCTL_SET_TIMEOUT: u32 = 2147491884u32; pub const IOCTL_USB_DIAGNOSTIC_MODE_OFF: u32 = 2229252u32; pub const IOCTL_USB_DIAGNOSTIC_MODE_ON: u32 = 2229248u32; pub const IOCTL_USB_DIAG_IGNORE_HUBS_OFF: u32 = 2229276u32; pub const IOCTL_USB_DIAG_IGNORE_HUBS_ON: u32 = 2229272u32; pub const IOCTL_USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION: u32 = 2229264u32; pub const IOCTL_USB_GET_DEVICE_CHARACTERISTICS: u32 = 2229376u32; pub const IOCTL_USB_GET_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC: u32 = 2229368u32; pub const IOCTL_USB_GET_HUB_CAPABILITIES: u32 = 2229308u32; pub const IOCTL_USB_GET_HUB_CAPABILITIES_EX: u32 = 2229328u32; pub const IOCTL_USB_GET_HUB_INFORMATION_EX: u32 = 2229332u32; pub const IOCTL_USB_GET_NODE_CONNECTION_ATTRIBUTES: u32 = 2229312u32; pub const IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME: u32 = 2229280u32; pub const IOCTL_USB_GET_NODE_CONNECTION_INFORMATION: u32 = 2229260u32; pub const IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX: u32 = 2229320u32; pub const IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2: u32 = 2229340u32; pub const IOCTL_USB_GET_NODE_CONNECTION_NAME: u32 = 2229268u32; pub const IOCTL_USB_GET_NODE_INFORMATION: u32 = 2229256u32; pub const IOCTL_USB_GET_PORT_CONNECTOR_PROPERTIES: u32 = 2229336u32; pub const IOCTL_USB_GET_ROOT_HUB_NAME: u32 = 2229256u32; pub const IOCTL_USB_GET_TRANSPORT_CHARACTERISTICS: u32 = 2229348u32; pub const IOCTL_USB_HCD_DISABLE_PORT: u32 = 2229296u32; pub const IOCTL_USB_HCD_ENABLE_PORT: u32 = 2229300u32; pub const IOCTL_USB_HCD_GET_STATS_1: u32 = 2229244u32; pub const IOCTL_USB_HCD_GET_STATS_2: u32 = 2229288u32; pub const IOCTL_USB_HUB_CYCLE_PORT: u32 = 2229316u32; pub const IOCTL_USB_NOTIFY_ON_TRANSPORT_CHARACTERISTICS_CHANGE: u32 = 2229356u32; pub const IOCTL_USB_REGISTER_FOR_TRANSPORT_CHARACTERISTICS_CHANGE: u32 = 2229352u32; pub const IOCTL_USB_RESET_HUB: u32 = 2229324u32; pub const IOCTL_USB_START_TRACKING_FOR_TIME_SYNC: u32 = 2229364u32; pub const IOCTL_USB_STOP_TRACKING_FOR_TIME_SYNC: u32 = 2229372u32; pub const IOCTL_USB_UNREGISTER_FOR_TRANSPORT_CHARACTERISTICS_CHANGE: u32 = 2229360u32; pub const IOCTL_WAIT_ON_DEVICE_EVENT: u32 = 2147491848u32; pub const IOCTL_WRITE_REGISTERS: u32 = 2147491856u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct IO_BLOCK { pub uOffset: u32, pub uLength: u32, pub pbyData: *mut u8, pub uIndex: u32, } impl IO_BLOCK {} impl ::core::default::Default for IO_BLOCK { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for IO_BLOCK { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("IO_BLOCK").field("uOffset", &self.uOffset).field("uLength", &self.uLength).field("pbyData", &self.pbyData).field("uIndex", &self.uIndex).finish() } } impl ::core::cmp::PartialEq for IO_BLOCK { fn eq(&self, other: &Self) -> bool { self.uOffset == other.uOffset && self.uLength == other.uLength && self.pbyData == other.pbyData && self.uIndex == other.uIndex } } impl ::core::cmp::Eq for IO_BLOCK {} unsafe impl ::windows::core::Abi for IO_BLOCK { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct IO_BLOCK_EX { pub uOffset: u32, pub uLength: u32, pub pbyData: *mut u8, pub uIndex: u32, pub bRequest: u8, pub bmRequestType: u8, pub fTransferDirectionIn: u8, } impl IO_BLOCK_EX {} impl ::core::default::Default for IO_BLOCK_EX { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for IO_BLOCK_EX { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("IO_BLOCK_EX") .field("uOffset", &self.uOffset) .field("uLength", &self.uLength) .field("pbyData", &self.pbyData) .field("uIndex", &self.uIndex) .field("bRequest", &self.bRequest) .field("bmRequestType", &self.bmRequestType) .field("fTransferDirectionIn", &self.fTransferDirectionIn) .finish() } } impl ::core::cmp::PartialEq for IO_BLOCK_EX { fn eq(&self, other: &Self) -> bool { self.uOffset == other.uOffset && self.uLength == other.uLength && self.pbyData == other.pbyData && self.uIndex == other.uIndex && self.bRequest == other.bRequest && self.bmRequestType == other.bmRequestType && self.fTransferDirectionIn == other.fTransferDirectionIn } } impl ::core::cmp::Eq for IO_BLOCK_EX {} unsafe impl ::windows::core::Abi for IO_BLOCK_EX { type Abi = Self; } pub const LowSpeed: u32 = 1u32; pub const MAXIMUM_TRANSFER_SIZE: u32 = 8u32; pub const MAXIMUM_USB_STRING_LENGTH: u32 = 255u32; pub const MAX_ALTERNATE_NAME_LENGTH: u32 = 40u32; pub const MAX_ASSOCIATION_NAME_LENGTH: u32 = 40u32; pub const MAX_CONFIGURATION_NAME_LENGTH: u32 = 40u32; pub const MAX_INTERFACE_NAME_LENGTH: u32 = 40u32; pub const MAX_NUM_PIPES: u32 = 8u32; pub const MAX_NUM_USBFN_ENDPOINTS: u32 = 15u32; pub const MAX_SUPPORTED_CONFIGURATIONS: u32 = 12u32; pub const MAX_USB_STRING_LENGTH: u32 = 255u32; pub const MS_GENRE_DESCRIPTOR_INDEX: u32 = 1u32; pub const MS_OS_FLAGS_CONTAINERID: u32 = 2u32; pub const MS_POWER_DESCRIPTOR_INDEX: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct OS_STRING { pub bLength: u8, pub bDescriptorType: u8, pub MicrosoftString: [u16; 7], pub bVendorCode: u8, pub Anonymous: OS_STRING_0, } impl OS_STRING {} impl ::core::default::Default for OS_STRING { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for OS_STRING { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for OS_STRING {} unsafe impl ::windows::core::Abi for OS_STRING { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union OS_STRING_0 { pub bPad: u8, pub bFlags: u8, } impl OS_STRING_0 {} impl ::core::default::Default for OS_STRING_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for OS_STRING_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for OS_STRING_0 {} unsafe impl ::windows::core::Abi for OS_STRING_0 { type Abi = Self; } pub const OS_STRING_DESCRIPTOR_INDEX: u32 = 238u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct PACKET_PARAMETERS { pub DeviceAddress: u8, pub EndpointAddress: u8, pub MaximumPacketSize: u16, pub Timeout: u32, pub Flags: u32, pub DataLength: u32, pub HubDeviceAddress: u16, pub PortTTNumber: u16, pub ErrorCount: u8, pub Pad: [u8; 3], pub UsbdStatusCode: i32, pub Data: [u8; 4], } impl PACKET_PARAMETERS {} impl ::core::default::Default for PACKET_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for PACKET_PARAMETERS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for PACKET_PARAMETERS {} unsafe impl ::windows::core::Abi for PACKET_PARAMETERS { type Abi = Self; } pub const PIPE_TRANSFER_TIMEOUT: 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 PIPE_TYPE(pub i32); pub const EVENT_PIPE: PIPE_TYPE = PIPE_TYPE(0i32); pub const READ_DATA_PIPE: PIPE_TYPE = PIPE_TYPE(1i32); pub const WRITE_DATA_PIPE: PIPE_TYPE = PIPE_TYPE(2i32); pub const ALL_PIPE: PIPE_TYPE = PIPE_TYPE(3i32); impl ::core::convert::From<i32> for PIPE_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PIPE_TYPE { type Abi = Self; } pub const PORT_LINK_STATE_COMPLIANCE_MODE: u32 = 10u32; pub const PORT_LINK_STATE_DISABLED: u32 = 4u32; pub const PORT_LINK_STATE_HOT_RESET: u32 = 9u32; pub const PORT_LINK_STATE_INACTIVE: u32 = 6u32; pub const PORT_LINK_STATE_LOOPBACK: u32 = 11u32; pub const PORT_LINK_STATE_POLLING: u32 = 7u32; pub const PORT_LINK_STATE_RECOVERY: u32 = 8u32; pub const PORT_LINK_STATE_RX_DETECT: u32 = 5u32; pub const PORT_LINK_STATE_TEST_MODE: u32 = 11u32; pub const PORT_LINK_STATE_U0: u32 = 0u32; pub const PORT_LINK_STATE_U1: u32 = 1u32; pub const PORT_LINK_STATE_U2: u32 = 2u32; pub const PORT_LINK_STATE_U3: u32 = 3u32; pub const RAW_IO: 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 RAW_PIPE_TYPE(pub i32); pub const USBSCAN_PIPE_CONTROL: RAW_PIPE_TYPE = RAW_PIPE_TYPE(0i32); pub const USBSCAN_PIPE_ISOCHRONOUS: RAW_PIPE_TYPE = RAW_PIPE_TYPE(1i32); pub const USBSCAN_PIPE_BULK: RAW_PIPE_TYPE = RAW_PIPE_TYPE(2i32); pub const USBSCAN_PIPE_INTERRUPT: RAW_PIPE_TYPE = RAW_PIPE_TYPE(3i32); impl ::core::convert::From<i32> for RAW_PIPE_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for RAW_PIPE_TYPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct RAW_RESET_PORT_PARAMETERS { pub PortNumber: u16, pub PortStatus: u16, } impl RAW_RESET_PORT_PARAMETERS {} impl ::core::default::Default for RAW_RESET_PORT_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for RAW_RESET_PORT_PARAMETERS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for RAW_RESET_PORT_PARAMETERS {} unsafe impl ::windows::core::Abi for RAW_RESET_PORT_PARAMETERS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct RAW_ROOTPORT_FEATURE { pub PortNumber: u16, pub PortFeature: u16, pub PortStatus: u16, } impl RAW_ROOTPORT_FEATURE {} impl ::core::default::Default for RAW_ROOTPORT_FEATURE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for RAW_ROOTPORT_FEATURE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for RAW_ROOTPORT_FEATURE {} unsafe impl ::windows::core::Abi for RAW_ROOTPORT_FEATURE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct RAW_ROOTPORT_PARAMETERS { pub PortNumber: u16, pub PortStatus: u16, } impl RAW_ROOTPORT_PARAMETERS {} impl ::core::default::Default for RAW_ROOTPORT_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for RAW_ROOTPORT_PARAMETERS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for RAW_ROOTPORT_PARAMETERS {} unsafe impl ::windows::core::Abi for RAW_ROOTPORT_PARAMETERS { type Abi = Self; } pub const RESET_PIPE_ON_RESUME: u32 = 9u32; pub const SHORT_PACKET_TERMINATE: u32 = 1u32; pub const SUSPEND_DELAY: u32 = 131u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct URB { pub Anonymous: URB_0, } impl URB {} impl ::core::default::Default for URB { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for URB { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for URB {} unsafe impl ::windows::core::Abi for URB { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union URB_0 { pub UrbHeader: _URB_HEADER, pub UrbSelectInterface: _URB_SELECT_INTERFACE, pub UrbSelectConfiguration: _URB_SELECT_CONFIGURATION, pub UrbPipeRequest: _URB_PIPE_REQUEST, pub UrbFrameLengthControl: _URB_FRAME_LENGTH_CONTROL, pub UrbGetFrameLength: _URB_GET_FRAME_LENGTH, pub UrbSetFrameLength: _URB_SET_FRAME_LENGTH, pub UrbGetCurrentFrameNumber: _URB_GET_CURRENT_FRAME_NUMBER, pub UrbControlTransfer: _URB_CONTROL_TRANSFER, pub UrbControlTransferEx: _URB_CONTROL_TRANSFER_EX, pub UrbBulkOrInterruptTransfer: _URB_BULK_OR_INTERRUPT_TRANSFER, pub UrbIsochronousTransfer: _URB_ISOCH_TRANSFER, pub UrbControlDescriptorRequest: _URB_CONTROL_DESCRIPTOR_REQUEST, pub UrbControlGetStatusRequest: _URB_CONTROL_GET_STATUS_REQUEST, pub UrbControlFeatureRequest: _URB_CONTROL_FEATURE_REQUEST, pub UrbControlVendorClassRequest: _URB_CONTROL_VENDOR_OR_CLASS_REQUEST, pub UrbControlGetInterfaceRequest: _URB_CONTROL_GET_INTERFACE_REQUEST, pub UrbControlGetConfigurationRequest: _URB_CONTROL_GET_CONFIGURATION_REQUEST, pub UrbOSFeatureDescriptorRequest: _URB_OS_FEATURE_DESCRIPTOR_REQUEST, pub UrbOpenStaticStreams: _URB_OPEN_STATIC_STREAMS, pub UrbGetIsochPipeTransferPathDelays: _URB_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS, } impl URB_0 {} impl ::core::default::Default for URB_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for URB_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for URB_0 {} unsafe impl ::windows::core::Abi for URB_0 { type Abi = Self; } pub const URB_FUNCTION_ABORT_PIPE: u32 = 2u32; pub const URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER: u32 = 9u32; pub const URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER_USING_CHAINED_MDL: u32 = 55u32; pub const URB_FUNCTION_CLASS_DEVICE: u32 = 26u32; pub const URB_FUNCTION_CLASS_ENDPOINT: u32 = 28u32; pub const URB_FUNCTION_CLASS_INTERFACE: u32 = 27u32; pub const URB_FUNCTION_CLASS_OTHER: u32 = 31u32; pub const URB_FUNCTION_CLEAR_FEATURE_TO_DEVICE: u32 = 16u32; pub const URB_FUNCTION_CLEAR_FEATURE_TO_ENDPOINT: u32 = 18u32; pub const URB_FUNCTION_CLEAR_FEATURE_TO_INTERFACE: u32 = 17u32; pub const URB_FUNCTION_CLEAR_FEATURE_TO_OTHER: u32 = 34u32; pub const URB_FUNCTION_CLOSE_STATIC_STREAMS: u32 = 54u32; pub const URB_FUNCTION_CONTROL_TRANSFER: u32 = 8u32; pub const URB_FUNCTION_CONTROL_TRANSFER_EX: u32 = 50u32; pub const URB_FUNCTION_GET_CONFIGURATION: u32 = 38u32; pub const URB_FUNCTION_GET_CURRENT_FRAME_NUMBER: u32 = 7u32; pub const URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE: u32 = 11u32; pub const URB_FUNCTION_GET_DESCRIPTOR_FROM_ENDPOINT: u32 = 36u32; pub const URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE: u32 = 40u32; pub const URB_FUNCTION_GET_FRAME_LENGTH: u32 = 5u32; pub const URB_FUNCTION_GET_INTERFACE: u32 = 39u32; pub const URB_FUNCTION_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS: u32 = 61u32; pub const URB_FUNCTION_GET_MS_FEATURE_DESCRIPTOR: u32 = 42u32; pub const URB_FUNCTION_GET_STATUS_FROM_DEVICE: u32 = 19u32; pub const URB_FUNCTION_GET_STATUS_FROM_ENDPOINT: u32 = 21u32; pub const URB_FUNCTION_GET_STATUS_FROM_INTERFACE: u32 = 20u32; pub const URB_FUNCTION_GET_STATUS_FROM_OTHER: u32 = 33u32; pub const URB_FUNCTION_ISOCH_TRANSFER: u32 = 10u32; pub const URB_FUNCTION_ISOCH_TRANSFER_USING_CHAINED_MDL: u32 = 56u32; pub const URB_FUNCTION_OPEN_STATIC_STREAMS: u32 = 53u32; pub const URB_FUNCTION_RELEASE_FRAME_LENGTH_CONTROL: u32 = 4u32; pub const URB_FUNCTION_RESERVED_0X0016: u32 = 22u32; pub const URB_FUNCTION_RESERVE_0X001D: u32 = 29u32; pub const URB_FUNCTION_RESERVE_0X002B: u32 = 43u32; pub const URB_FUNCTION_RESERVE_0X002C: u32 = 44u32; pub const URB_FUNCTION_RESERVE_0X002D: u32 = 45u32; pub const URB_FUNCTION_RESERVE_0X002E: u32 = 46u32; pub const URB_FUNCTION_RESERVE_0X002F: u32 = 47u32; pub const URB_FUNCTION_RESERVE_0X0033: u32 = 51u32; pub const URB_FUNCTION_RESERVE_0X0034: u32 = 52u32; pub const URB_FUNCTION_RESET_PIPE: u32 = 30u32; pub const URB_FUNCTION_SELECT_CONFIGURATION: u32 = 0u32; pub const URB_FUNCTION_SELECT_INTERFACE: u32 = 1u32; pub const URB_FUNCTION_SET_DESCRIPTOR_TO_DEVICE: u32 = 12u32; pub const URB_FUNCTION_SET_DESCRIPTOR_TO_ENDPOINT: u32 = 37u32; pub const URB_FUNCTION_SET_DESCRIPTOR_TO_INTERFACE: u32 = 41u32; pub const URB_FUNCTION_SET_FEATURE_TO_DEVICE: u32 = 13u32; pub const URB_FUNCTION_SET_FEATURE_TO_ENDPOINT: u32 = 15u32; pub const URB_FUNCTION_SET_FEATURE_TO_INTERFACE: u32 = 14u32; pub const URB_FUNCTION_SET_FEATURE_TO_OTHER: u32 = 35u32; pub const URB_FUNCTION_SET_FRAME_LENGTH: u32 = 6u32; pub const URB_FUNCTION_SYNC_CLEAR_STALL: u32 = 49u32; pub const URB_FUNCTION_SYNC_RESET_PIPE: u32 = 48u32; pub const URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL: u32 = 30u32; pub const URB_FUNCTION_TAKE_FRAME_LENGTH_CONTROL: u32 = 3u32; pub const URB_FUNCTION_VENDOR_DEVICE: u32 = 23u32; pub const URB_FUNCTION_VENDOR_ENDPOINT: u32 = 25u32; pub const URB_FUNCTION_VENDOR_INTERFACE: u32 = 24u32; pub const URB_FUNCTION_VENDOR_OTHER: u32 = 32u32; pub const URB_OPEN_STATIC_STREAMS_VERSION_100: u32 = 256u32; pub const USBDI_VERSION: u32 = 1536u32; pub const USBD_DEFAULT_MAXIMUM_TRANSFER_SIZE: u32 = 4294967295u32; pub const USBD_DEFAULT_PIPE_TRANSFER: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBD_DEVICE_INFORMATION { pub OffsetNext: u32, pub UsbdDeviceHandle: *mut ::core::ffi::c_void, pub DeviceDescriptor: USB_DEVICE_DESCRIPTOR, } impl USBD_DEVICE_INFORMATION {} impl ::core::default::Default for USBD_DEVICE_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBD_DEVICE_INFORMATION { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBD_DEVICE_INFORMATION {} unsafe impl ::windows::core::Abi for USBD_DEVICE_INFORMATION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USBD_ENDPOINT_OFFLOAD_INFORMATION { pub Size: u32, pub EndpointAddress: u16, pub ResourceId: u32, pub Mode: USBD_ENDPOINT_OFFLOAD_MODE, pub _bitfield1: u32, pub _bitfield2: u32, pub TransferSegmentLA: i64, pub TransferSegmentVA: *mut ::core::ffi::c_void, pub TransferRingSize: usize, pub TransferRingInitialCycleBit: u32, pub MessageNumber: u32, pub EventRingSegmentLA: i64, pub EventRingSegmentVA: *mut ::core::ffi::c_void, pub EventRingSize: usize, pub EventRingInitialCycleBit: u32, } impl USBD_ENDPOINT_OFFLOAD_INFORMATION {} impl ::core::default::Default for USBD_ENDPOINT_OFFLOAD_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBD_ENDPOINT_OFFLOAD_INFORMATION { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBD_ENDPOINT_OFFLOAD_INFORMATION {} unsafe impl ::windows::core::Abi for USBD_ENDPOINT_OFFLOAD_INFORMATION { 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 USBD_ENDPOINT_OFFLOAD_MODE(pub i32); pub const UsbdEndpointOffloadModeNotSupported: USBD_ENDPOINT_OFFLOAD_MODE = USBD_ENDPOINT_OFFLOAD_MODE(0i32); pub const UsbdEndpointOffloadSoftwareAssisted: USBD_ENDPOINT_OFFLOAD_MODE = USBD_ENDPOINT_OFFLOAD_MODE(1i32); pub const UsbdEndpointOffloadHardwareAssisted: USBD_ENDPOINT_OFFLOAD_MODE = USBD_ENDPOINT_OFFLOAD_MODE(2i32); impl ::core::convert::From<i32> for USBD_ENDPOINT_OFFLOAD_MODE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for USBD_ENDPOINT_OFFLOAD_MODE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBD_INTERFACE_INFORMATION { pub Length: u16, pub InterfaceNumber: u8, pub AlternateSetting: u8, pub Class: u8, pub SubClass: u8, pub Protocol: u8, pub Reserved: u8, pub InterfaceHandle: *mut ::core::ffi::c_void, pub NumberOfPipes: u32, pub Pipes: [USBD_PIPE_INFORMATION; 1], } impl USBD_INTERFACE_INFORMATION {} impl ::core::default::Default for USBD_INTERFACE_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USBD_INTERFACE_INFORMATION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USBD_INTERFACE_INFORMATION") .field("Length", &self.Length) .field("InterfaceNumber", &self.InterfaceNumber) .field("AlternateSetting", &self.AlternateSetting) .field("Class", &self.Class) .field("SubClass", &self.SubClass) .field("Protocol", &self.Protocol) .field("Reserved", &self.Reserved) .field("InterfaceHandle", &self.InterfaceHandle) .field("NumberOfPipes", &self.NumberOfPipes) .field("Pipes", &self.Pipes) .finish() } } impl ::core::cmp::PartialEq for USBD_INTERFACE_INFORMATION { fn eq(&self, other: &Self) -> bool { self.Length == other.Length && self.InterfaceNumber == other.InterfaceNumber && self.AlternateSetting == other.AlternateSetting && self.Class == other.Class && self.SubClass == other.SubClass && self.Protocol == other.Protocol && self.Reserved == other.Reserved && self.InterfaceHandle == other.InterfaceHandle && self.NumberOfPipes == other.NumberOfPipes && self.Pipes == other.Pipes } } impl ::core::cmp::Eq for USBD_INTERFACE_INFORMATION {} unsafe impl ::windows::core::Abi for USBD_INTERFACE_INFORMATION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBD_ISO_PACKET_DESCRIPTOR { pub Offset: u32, pub Length: u32, pub Status: i32, } impl USBD_ISO_PACKET_DESCRIPTOR {} impl ::core::default::Default for USBD_ISO_PACKET_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USBD_ISO_PACKET_DESCRIPTOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USBD_ISO_PACKET_DESCRIPTOR").field("Offset", &self.Offset).field("Length", &self.Length).field("Status", &self.Status).finish() } } impl ::core::cmp::PartialEq for USBD_ISO_PACKET_DESCRIPTOR { fn eq(&self, other: &Self) -> bool { self.Offset == other.Offset && self.Length == other.Length && self.Status == other.Status } } impl ::core::cmp::Eq for USBD_ISO_PACKET_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USBD_ISO_PACKET_DESCRIPTOR { type Abi = Self; } pub const USBD_ISO_START_FRAME_RANGE: u32 = 1024u32; pub const USBD_PF_CHANGE_MAX_PACKET: u32 = 1u32; pub const USBD_PF_ENABLE_RT_THREAD_ACCESS: u32 = 4u32; pub const USBD_PF_HANDLES_SSP_HIGH_BANDWIDTH_ISOCH: u32 = 256u32; pub const USBD_PF_INTERACTIVE_PRIORITY: u32 = 48u32; pub const USBD_PF_MAP_ADD_TRANSFERS: u32 = 8u32; pub const USBD_PF_PRIORITY_MASK: u32 = 240u32; pub const USBD_PF_SHORT_PACKET_OPT: u32 = 2u32; pub const USBD_PF_SSP_HIGH_BANDWIDTH_ISOCH: u32 = 65536u32; pub const USBD_PF_VIDEO_PRIORITY: u32 = 16u32; pub const USBD_PF_VOICE_PRIORITY: u32 = 32u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBD_PIPE_INFORMATION { pub MaximumPacketSize: u16, pub EndpointAddress: u8, pub Interval: u8, pub PipeType: USBD_PIPE_TYPE, pub PipeHandle: *mut ::core::ffi::c_void, pub MaximumTransferSize: u32, pub PipeFlags: u32, } impl USBD_PIPE_INFORMATION {} impl ::core::default::Default for USBD_PIPE_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USBD_PIPE_INFORMATION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USBD_PIPE_INFORMATION") .field("MaximumPacketSize", &self.MaximumPacketSize) .field("EndpointAddress", &self.EndpointAddress) .field("Interval", &self.Interval) .field("PipeType", &self.PipeType) .field("PipeHandle", &self.PipeHandle) .field("MaximumTransferSize", &self.MaximumTransferSize) .field("PipeFlags", &self.PipeFlags) .finish() } } impl ::core::cmp::PartialEq for USBD_PIPE_INFORMATION { fn eq(&self, other: &Self) -> bool { self.MaximumPacketSize == other.MaximumPacketSize && self.EndpointAddress == other.EndpointAddress && self.Interval == other.Interval && self.PipeType == other.PipeType && self.PipeHandle == other.PipeHandle && self.MaximumTransferSize == other.MaximumTransferSize && self.PipeFlags == other.PipeFlags } } impl ::core::cmp::Eq for USBD_PIPE_INFORMATION {} unsafe impl ::windows::core::Abi for USBD_PIPE_INFORMATION { 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 USBD_PIPE_TYPE(pub i32); pub const UsbdPipeTypeControl: USBD_PIPE_TYPE = USBD_PIPE_TYPE(0i32); pub const UsbdPipeTypeIsochronous: USBD_PIPE_TYPE = USBD_PIPE_TYPE(1i32); pub const UsbdPipeTypeBulk: USBD_PIPE_TYPE = USBD_PIPE_TYPE(2i32); pub const UsbdPipeTypeInterrupt: USBD_PIPE_TYPE = USBD_PIPE_TYPE(3i32); impl ::core::convert::From<i32> for USBD_PIPE_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for USBD_PIPE_TYPE { type Abi = Self; } pub const USBD_PORT_CONNECTED: u32 = 2u32; pub const USBD_PORT_ENABLED: u32 = 1u32; pub const USBD_SHORT_TRANSFER_OK: u32 = 2u32; pub const USBD_START_ISO_TRANSFER_ASAP: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBD_STREAM_INFORMATION { pub PipeHandle: *mut ::core::ffi::c_void, pub StreamID: u32, pub MaximumTransferSize: u32, pub PipeFlags: u32, } impl USBD_STREAM_INFORMATION {} impl ::core::default::Default for USBD_STREAM_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USBD_STREAM_INFORMATION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USBD_STREAM_INFORMATION").field("PipeHandle", &self.PipeHandle).field("StreamID", &self.StreamID).field("MaximumTransferSize", &self.MaximumTransferSize).field("PipeFlags", &self.PipeFlags).finish() } } impl ::core::cmp::PartialEq for USBD_STREAM_INFORMATION { fn eq(&self, other: &Self) -> bool { self.PipeHandle == other.PipeHandle && self.StreamID == other.StreamID && self.MaximumTransferSize == other.MaximumTransferSize && self.PipeFlags == other.PipeFlags } } impl ::core::cmp::Eq for USBD_STREAM_INFORMATION {} unsafe impl ::windows::core::Abi for USBD_STREAM_INFORMATION { type Abi = Self; } pub const USBD_TRANSFER_DIRECTION: u32 = 1u32; pub const USBD_TRANSFER_DIRECTION_IN: u32 = 1u32; pub const USBD_TRANSFER_DIRECTION_OUT: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBD_VERSION_INFORMATION { pub USBDI_Version: u32, pub Supported_USB_Version: u32, } impl USBD_VERSION_INFORMATION {} impl ::core::default::Default for USBD_VERSION_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USBD_VERSION_INFORMATION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USBD_VERSION_INFORMATION").field("USBDI_Version", &self.USBDI_Version).field("Supported_USB_Version", &self.Supported_USB_Version).finish() } } impl ::core::cmp::PartialEq for USBD_VERSION_INFORMATION { fn eq(&self, other: &Self) -> bool { self.USBDI_Version == other.USBDI_Version && self.Supported_USB_Version == other.Supported_USB_Version } } impl ::core::cmp::Eq for USBD_VERSION_INFORMATION {} unsafe impl ::windows::core::Abi for USBD_VERSION_INFORMATION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct USBFN_BUS_CONFIGURATION_INFO { pub ConfigurationName: [u16; 40], pub IsCurrent: super::super::Foundation::BOOLEAN, pub IsActive: super::super::Foundation::BOOLEAN, } #[cfg(feature = "Win32_Foundation")] impl USBFN_BUS_CONFIGURATION_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for USBFN_BUS_CONFIGURATION_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for USBFN_BUS_CONFIGURATION_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USBFN_BUS_CONFIGURATION_INFO").field("ConfigurationName", &self.ConfigurationName).field("IsCurrent", &self.IsCurrent).field("IsActive", &self.IsActive).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for USBFN_BUS_CONFIGURATION_INFO { fn eq(&self, other: &Self) -> bool { self.ConfigurationName == other.ConfigurationName && self.IsCurrent == other.IsCurrent && self.IsActive == other.IsActive } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for USBFN_BUS_CONFIGURATION_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for USBFN_BUS_CONFIGURATION_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 USBFN_BUS_SPEED(pub i32); pub const UsbfnBusSpeedLow: USBFN_BUS_SPEED = USBFN_BUS_SPEED(0i32); pub const UsbfnBusSpeedFull: USBFN_BUS_SPEED = USBFN_BUS_SPEED(1i32); pub const UsbfnBusSpeedHigh: USBFN_BUS_SPEED = USBFN_BUS_SPEED(2i32); pub const UsbfnBusSpeedSuper: USBFN_BUS_SPEED = USBFN_BUS_SPEED(3i32); pub const UsbfnBusSpeedMaximum: USBFN_BUS_SPEED = USBFN_BUS_SPEED(4i32); impl ::core::convert::From<i32> for USBFN_BUS_SPEED { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for USBFN_BUS_SPEED { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct USBFN_CLASS_INFORMATION_PACKET { pub FullSpeedClassInterface: USBFN_CLASS_INTERFACE, pub HighSpeedClassInterface: USBFN_CLASS_INTERFACE, pub InterfaceName: [u16; 40], pub InterfaceGuid: [u16; 39], pub HasInterfaceGuid: super::super::Foundation::BOOLEAN, pub SuperSpeedClassInterface: USBFN_CLASS_INTERFACE, } #[cfg(feature = "Win32_Foundation")] impl USBFN_CLASS_INFORMATION_PACKET {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for USBFN_CLASS_INFORMATION_PACKET { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for USBFN_CLASS_INFORMATION_PACKET { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for USBFN_CLASS_INFORMATION_PACKET {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for USBFN_CLASS_INFORMATION_PACKET { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct USBFN_CLASS_INFORMATION_PACKET_EX { pub FullSpeedClassInterfaceEx: USBFN_CLASS_INTERFACE_EX, pub HighSpeedClassInterfaceEx: USBFN_CLASS_INTERFACE_EX, pub SuperSpeedClassInterfaceEx: USBFN_CLASS_INTERFACE_EX, pub InterfaceName: [u16; 40], pub InterfaceGuid: [u16; 39], pub HasInterfaceGuid: super::super::Foundation::BOOLEAN, } #[cfg(feature = "Win32_Foundation")] impl USBFN_CLASS_INFORMATION_PACKET_EX {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for USBFN_CLASS_INFORMATION_PACKET_EX { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for USBFN_CLASS_INFORMATION_PACKET_EX { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for USBFN_CLASS_INFORMATION_PACKET_EX {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for USBFN_CLASS_INFORMATION_PACKET_EX { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBFN_CLASS_INTERFACE { pub InterfaceNumber: u8, pub PipeCount: u8, pub PipeArr: [USBFN_PIPE_INFORMATION; 16], } impl USBFN_CLASS_INTERFACE {} impl ::core::default::Default for USBFN_CLASS_INTERFACE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBFN_CLASS_INTERFACE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBFN_CLASS_INTERFACE {} unsafe impl ::windows::core::Abi for USBFN_CLASS_INTERFACE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBFN_CLASS_INTERFACE_EX { pub BaseInterfaceNumber: u8, pub InterfaceCount: u8, pub PipeCount: u8, pub PipeArr: [USBFN_PIPE_INFORMATION; 16], } impl USBFN_CLASS_INTERFACE_EX {} impl ::core::default::Default for USBFN_CLASS_INTERFACE_EX { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBFN_CLASS_INTERFACE_EX { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBFN_CLASS_INTERFACE_EX {} unsafe impl ::windows::core::Abi for USBFN_CLASS_INTERFACE_EX { 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 USBFN_DEVICE_STATE(pub i32); pub const UsbfnDeviceStateMinimum: USBFN_DEVICE_STATE = USBFN_DEVICE_STATE(0i32); pub const UsbfnDeviceStateAttached: USBFN_DEVICE_STATE = USBFN_DEVICE_STATE(1i32); pub const UsbfnDeviceStateDefault: USBFN_DEVICE_STATE = USBFN_DEVICE_STATE(2i32); pub const UsbfnDeviceStateDetached: USBFN_DEVICE_STATE = USBFN_DEVICE_STATE(3i32); pub const UsbfnDeviceStateAddressed: USBFN_DEVICE_STATE = USBFN_DEVICE_STATE(4i32); pub const UsbfnDeviceStateConfigured: USBFN_DEVICE_STATE = USBFN_DEVICE_STATE(5i32); pub const UsbfnDeviceStateSuspended: USBFN_DEVICE_STATE = USBFN_DEVICE_STATE(6i32); pub const UsbfnDeviceStateStateMaximum: USBFN_DEVICE_STATE = USBFN_DEVICE_STATE(7i32); impl ::core::convert::From<i32> for USBFN_DEVICE_STATE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for USBFN_DEVICE_STATE { 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 USBFN_DIRECTION(pub i32); pub const UsbfnDirectionMinimum: USBFN_DIRECTION = USBFN_DIRECTION(0i32); pub const UsbfnDirectionIn: USBFN_DIRECTION = USBFN_DIRECTION(1i32); pub const UsbfnDirectionOut: USBFN_DIRECTION = USBFN_DIRECTION(2i32); pub const UsbfnDirectionTx: USBFN_DIRECTION = USBFN_DIRECTION(1i32); pub const UsbfnDirectionRx: USBFN_DIRECTION = USBFN_DIRECTION(2i32); pub const UsbfnDirectionMaximum: USBFN_DIRECTION = USBFN_DIRECTION(3i32); impl ::core::convert::From<i32> for USBFN_DIRECTION { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for USBFN_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 USBFN_EVENT(pub i32); pub const UsbfnEventMinimum: USBFN_EVENT = USBFN_EVENT(0i32); pub const UsbfnEventAttach: USBFN_EVENT = USBFN_EVENT(1i32); pub const UsbfnEventReset: USBFN_EVENT = USBFN_EVENT(2i32); pub const UsbfnEventDetach: USBFN_EVENT = USBFN_EVENT(3i32); pub const UsbfnEventSuspend: USBFN_EVENT = USBFN_EVENT(4i32); pub const UsbfnEventResume: USBFN_EVENT = USBFN_EVENT(5i32); pub const UsbfnEventSetupPacket: USBFN_EVENT = USBFN_EVENT(6i32); pub const UsbfnEventConfigured: USBFN_EVENT = USBFN_EVENT(7i32); pub const UsbfnEventUnConfigured: USBFN_EVENT = USBFN_EVENT(8i32); pub const UsbfnEventPortType: USBFN_EVENT = USBFN_EVENT(9i32); pub const UsbfnEventBusTearDown: USBFN_EVENT = USBFN_EVENT(10i32); pub const UsbfnEventSetInterface: USBFN_EVENT = USBFN_EVENT(11i32); pub const UsbfnEventMaximum: USBFN_EVENT = USBFN_EVENT(12i32); impl ::core::convert::From<i32> for USBFN_EVENT { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for USBFN_EVENT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBFN_INTERFACE_INFO { pub InterfaceNumber: u8, pub Speed: USBFN_BUS_SPEED, pub Size: u16, pub InterfaceDescriptorSet: [u8; 1], } impl USBFN_INTERFACE_INFO {} impl ::core::default::Default for USBFN_INTERFACE_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USBFN_INTERFACE_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USBFN_INTERFACE_INFO").field("InterfaceNumber", &self.InterfaceNumber).field("Speed", &self.Speed).field("Size", &self.Size).field("InterfaceDescriptorSet", &self.InterfaceDescriptorSet).finish() } } impl ::core::cmp::PartialEq for USBFN_INTERFACE_INFO { fn eq(&self, other: &Self) -> bool { self.InterfaceNumber == other.InterfaceNumber && self.Speed == other.Speed && self.Size == other.Size && self.InterfaceDescriptorSet == other.InterfaceDescriptorSet } } impl ::core::cmp::Eq for USBFN_INTERFACE_INFO {} unsafe impl ::windows::core::Abi for USBFN_INTERFACE_INFO { type Abi = Self; } pub const USBFN_INTERRUPT_ENDPOINT_SIZE_NOT_UPDATEABLE_MASK: u32 = 128u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBFN_NOTIFICATION { pub Event: USBFN_EVENT, pub u: USBFN_NOTIFICATION_0, } impl USBFN_NOTIFICATION {} impl ::core::default::Default for USBFN_NOTIFICATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBFN_NOTIFICATION { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBFN_NOTIFICATION {} unsafe impl ::windows::core::Abi for USBFN_NOTIFICATION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union USBFN_NOTIFICATION_0 { pub BusSpeed: USBFN_BUS_SPEED, pub SetupPacket: USB_DEFAULT_PIPE_SETUP_PACKET, pub ConfigurationValue: u16, pub PortType: USBFN_PORT_TYPE, pub AlternateInterface: ALTERNATE_INTERFACE, } impl USBFN_NOTIFICATION_0 {} impl ::core::default::Default for USBFN_NOTIFICATION_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBFN_NOTIFICATION_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBFN_NOTIFICATION_0 {} unsafe impl ::windows::core::Abi for USBFN_NOTIFICATION_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBFN_PIPE_INFORMATION { pub EpDesc: USB_ENDPOINT_DESCRIPTOR, pub PipeId: u32, } impl USBFN_PIPE_INFORMATION {} impl ::core::default::Default for USBFN_PIPE_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBFN_PIPE_INFORMATION { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBFN_PIPE_INFORMATION {} unsafe impl ::windows::core::Abi for USBFN_PIPE_INFORMATION { 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 USBFN_PORT_TYPE(pub i32); pub const UsbfnUnknownPort: USBFN_PORT_TYPE = USBFN_PORT_TYPE(0i32); pub const UsbfnStandardDownstreamPort: USBFN_PORT_TYPE = USBFN_PORT_TYPE(1i32); pub const UsbfnChargingDownstreamPort: USBFN_PORT_TYPE = USBFN_PORT_TYPE(2i32); pub const UsbfnDedicatedChargingPort: USBFN_PORT_TYPE = USBFN_PORT_TYPE(3i32); pub const UsbfnInvalidDedicatedChargingPort: USBFN_PORT_TYPE = USBFN_PORT_TYPE(4i32); pub const UsbfnProprietaryDedicatedChargingPort: USBFN_PORT_TYPE = USBFN_PORT_TYPE(5i32); pub const UsbfnPortTypeMaximum: USBFN_PORT_TYPE = USBFN_PORT_TYPE(6i32); impl ::core::convert::From<i32> for USBFN_PORT_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for USBFN_PORT_TYPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBFN_USB_STRING { pub StringIndex: u8, pub UsbString: [u16; 255], } impl USBFN_USB_STRING {} impl ::core::default::Default for USBFN_USB_STRING { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USBFN_USB_STRING { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USBFN_USB_STRING").field("StringIndex", &self.StringIndex).field("UsbString", &self.UsbString).finish() } } impl ::core::cmp::PartialEq for USBFN_USB_STRING { fn eq(&self, other: &Self) -> bool { self.StringIndex == other.StringIndex && self.UsbString == other.UsbString } } impl ::core::cmp::Eq for USBFN_USB_STRING {} unsafe impl ::windows::core::Abi for USBFN_USB_STRING { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBSCAN_GET_DESCRIPTOR { pub DescriptorType: u8, pub Index: u8, pub LanguageId: u16, } impl USBSCAN_GET_DESCRIPTOR {} impl ::core::default::Default for USBSCAN_GET_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USBSCAN_GET_DESCRIPTOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USBSCAN_GET_DESCRIPTOR").field("DescriptorType", &self.DescriptorType).field("Index", &self.Index).field("LanguageId", &self.LanguageId).finish() } } impl ::core::cmp::PartialEq for USBSCAN_GET_DESCRIPTOR { fn eq(&self, other: &Self) -> bool { self.DescriptorType == other.DescriptorType && self.Index == other.Index && self.LanguageId == other.LanguageId } } impl ::core::cmp::Eq for USBSCAN_GET_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USBSCAN_GET_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBSCAN_PIPE_CONFIGURATION { pub NumberOfPipes: u32, pub PipeInfo: [USBSCAN_PIPE_INFORMATION; 8], } impl USBSCAN_PIPE_CONFIGURATION {} impl ::core::default::Default for USBSCAN_PIPE_CONFIGURATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USBSCAN_PIPE_CONFIGURATION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USBSCAN_PIPE_CONFIGURATION").field("NumberOfPipes", &self.NumberOfPipes).field("PipeInfo", &self.PipeInfo).finish() } } impl ::core::cmp::PartialEq for USBSCAN_PIPE_CONFIGURATION { fn eq(&self, other: &Self) -> bool { self.NumberOfPipes == other.NumberOfPipes && self.PipeInfo == other.PipeInfo } } impl ::core::cmp::Eq for USBSCAN_PIPE_CONFIGURATION {} unsafe impl ::windows::core::Abi for USBSCAN_PIPE_CONFIGURATION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBSCAN_PIPE_INFORMATION { pub MaximumPacketSize: u16, pub EndpointAddress: u8, pub Interval: u8, pub PipeType: RAW_PIPE_TYPE, } impl USBSCAN_PIPE_INFORMATION {} impl ::core::default::Default for USBSCAN_PIPE_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USBSCAN_PIPE_INFORMATION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USBSCAN_PIPE_INFORMATION").field("MaximumPacketSize", &self.MaximumPacketSize).field("EndpointAddress", &self.EndpointAddress).field("Interval", &self.Interval).field("PipeType", &self.PipeType).finish() } } impl ::core::cmp::PartialEq for USBSCAN_PIPE_INFORMATION { fn eq(&self, other: &Self) -> bool { self.MaximumPacketSize == other.MaximumPacketSize && self.EndpointAddress == other.EndpointAddress && self.Interval == other.Interval && self.PipeType == other.PipeType } } impl ::core::cmp::Eq for USBSCAN_PIPE_INFORMATION {} unsafe impl ::windows::core::Abi for USBSCAN_PIPE_INFORMATION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBSCAN_TIMEOUT { pub TimeoutRead: u32, pub TimeoutWrite: u32, pub TimeoutEvent: u32, } impl USBSCAN_TIMEOUT {} impl ::core::default::Default for USBSCAN_TIMEOUT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USBSCAN_TIMEOUT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USBSCAN_TIMEOUT").field("TimeoutRead", &self.TimeoutRead).field("TimeoutWrite", &self.TimeoutWrite).field("TimeoutEvent", &self.TimeoutEvent).finish() } } impl ::core::cmp::PartialEq for USBSCAN_TIMEOUT { fn eq(&self, other: &Self) -> bool { self.TimeoutRead == other.TimeoutRead && self.TimeoutWrite == other.TimeoutWrite && self.TimeoutEvent == other.TimeoutEvent } } impl ::core::cmp::Eq for USBSCAN_TIMEOUT {} unsafe impl ::windows::core::Abi for USBSCAN_TIMEOUT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBUSER_BANDWIDTH_INFO_REQUEST { pub Header: USBUSER_REQUEST_HEADER, pub BandwidthInformation: USB_BANDWIDTH_INFO, } impl USBUSER_BANDWIDTH_INFO_REQUEST {} impl ::core::default::Default for USBUSER_BANDWIDTH_INFO_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_BANDWIDTH_INFO_REQUEST { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_BANDWIDTH_INFO_REQUEST {} unsafe impl ::windows::core::Abi for USBUSER_BANDWIDTH_INFO_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct USBUSER_BUS_STATISTICS_0_REQUEST { pub Header: USBUSER_REQUEST_HEADER, pub BusStatistics0: USB_BUS_STATISTICS_0, } #[cfg(feature = "Win32_Foundation")] impl USBUSER_BUS_STATISTICS_0_REQUEST {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for USBUSER_BUS_STATISTICS_0_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for USBUSER_BUS_STATISTICS_0_REQUEST { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for USBUSER_BUS_STATISTICS_0_REQUEST {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for USBUSER_BUS_STATISTICS_0_REQUEST { type Abi = Self; } pub const USBUSER_CLEAR_ROOTPORT_FEATURE: u32 = 536870918u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBUSER_CLOSE_RAW_DEVICE { pub Header: USBUSER_REQUEST_HEADER, pub Parameters: USB_CLOSE_RAW_DEVICE_PARAMETERS, } impl USBUSER_CLOSE_RAW_DEVICE {} impl ::core::default::Default for USBUSER_CLOSE_RAW_DEVICE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_CLOSE_RAW_DEVICE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_CLOSE_RAW_DEVICE {} unsafe impl ::windows::core::Abi for USBUSER_CLOSE_RAW_DEVICE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBUSER_CONTROLLER_INFO_0 { pub Header: USBUSER_REQUEST_HEADER, pub Info0: USB_CONTROLLER_INFO_0, } impl USBUSER_CONTROLLER_INFO_0 {} impl ::core::default::Default for USBUSER_CONTROLLER_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_CONTROLLER_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_CONTROLLER_INFO_0 {} unsafe impl ::windows::core::Abi for USBUSER_CONTROLLER_INFO_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBUSER_CONTROLLER_UNICODE_NAME { pub Header: USBUSER_REQUEST_HEADER, pub UnicodeName: USB_UNICODE_NAME, } impl USBUSER_CONTROLLER_UNICODE_NAME {} impl ::core::default::Default for USBUSER_CONTROLLER_UNICODE_NAME { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_CONTROLLER_UNICODE_NAME { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_CONTROLLER_UNICODE_NAME {} unsafe impl ::windows::core::Abi for USBUSER_CONTROLLER_UNICODE_NAME { type Abi = Self; } pub const USBUSER_GET_BANDWIDTH_INFORMATION: u32 = 5u32; pub const USBUSER_GET_BUS_STATISTICS_0: u32 = 6u32; pub const USBUSER_GET_CONTROLLER_DRIVER_KEY: u32 = 2u32; pub const USBUSER_GET_CONTROLLER_INFO_0: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct USBUSER_GET_DRIVER_VERSION { pub Header: USBUSER_REQUEST_HEADER, pub Parameters: USB_DRIVER_VERSION_PARAMETERS, } #[cfg(feature = "Win32_Foundation")] impl USBUSER_GET_DRIVER_VERSION {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for USBUSER_GET_DRIVER_VERSION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for USBUSER_GET_DRIVER_VERSION { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for USBUSER_GET_DRIVER_VERSION {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for USBUSER_GET_DRIVER_VERSION { type Abi = Self; } pub const USBUSER_GET_POWER_STATE_MAP: u32 = 4u32; pub const USBUSER_GET_ROOTHUB_SYMBOLIC_NAME: u32 = 7u32; pub const USBUSER_GET_ROOTPORT_STATUS: u32 = 536870919u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBUSER_GET_USB2HW_VERSION { pub Header: USBUSER_REQUEST_HEADER, pub Parameters: USB_USB2HW_VERSION_PARAMETERS, } impl USBUSER_GET_USB2HW_VERSION {} impl ::core::default::Default for USBUSER_GET_USB2HW_VERSION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_GET_USB2HW_VERSION { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_GET_USB2HW_VERSION {} unsafe impl ::windows::core::Abi for USBUSER_GET_USB2HW_VERSION { type Abi = Self; } pub const USBUSER_GET_USB2_HW_VERSION: u32 = 9u32; pub const USBUSER_GET_USB_DRIVER_VERSION: u32 = 8u32; pub const USBUSER_INVALID_REQUEST: u32 = 4294967280u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBUSER_OPEN_RAW_DEVICE { pub Header: USBUSER_REQUEST_HEADER, pub Parameters: USB_OPEN_RAW_DEVICE_PARAMETERS, } impl USBUSER_OPEN_RAW_DEVICE {} impl ::core::default::Default for USBUSER_OPEN_RAW_DEVICE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_OPEN_RAW_DEVICE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_OPEN_RAW_DEVICE {} unsafe impl ::windows::core::Abi for USBUSER_OPEN_RAW_DEVICE { type Abi = Self; } pub const USBUSER_OP_CLOSE_RAW_DEVICE: u32 = 536870915u32; pub const USBUSER_OP_MASK_DEVONLY_API: u32 = 268435456u32; pub const USBUSER_OP_MASK_HCTEST_API: u32 = 536870912u32; pub const USBUSER_OP_OPEN_RAW_DEVICE: u32 = 536870914u32; pub const USBUSER_OP_RAW_RESET_PORT: u32 = 536870913u32; pub const USBUSER_OP_SEND_ONE_PACKET: u32 = 268435457u32; pub const USBUSER_OP_SEND_RAW_COMMAND: u32 = 536870916u32; pub const USBUSER_PASS_THRU: u32 = 3u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBUSER_PASS_THRU_REQUEST { pub Header: USBUSER_REQUEST_HEADER, pub PassThru: USB_PASS_THRU_PARAMETERS, } impl USBUSER_PASS_THRU_REQUEST {} impl ::core::default::Default for USBUSER_PASS_THRU_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_PASS_THRU_REQUEST { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_PASS_THRU_REQUEST {} unsafe impl ::windows::core::Abi for USBUSER_PASS_THRU_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct USBUSER_POWER_INFO_REQUEST { pub Header: USBUSER_REQUEST_HEADER, pub PowerInformation: USB_POWER_INFO, } #[cfg(feature = "Win32_Foundation")] impl USBUSER_POWER_INFO_REQUEST {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for USBUSER_POWER_INFO_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for USBUSER_POWER_INFO_REQUEST { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for USBUSER_POWER_INFO_REQUEST {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for USBUSER_POWER_INFO_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBUSER_RAW_RESET_ROOT_PORT { pub Header: USBUSER_REQUEST_HEADER, pub Parameters: RAW_RESET_PORT_PARAMETERS, } impl USBUSER_RAW_RESET_ROOT_PORT {} impl ::core::default::Default for USBUSER_RAW_RESET_ROOT_PORT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_RAW_RESET_ROOT_PORT { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_RAW_RESET_ROOT_PORT {} unsafe impl ::windows::core::Abi for USBUSER_RAW_RESET_ROOT_PORT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USBUSER_REFRESH_HCT_REG { pub Header: USBUSER_REQUEST_HEADER, pub Flags: u32, } impl USBUSER_REFRESH_HCT_REG {} impl ::core::default::Default for USBUSER_REFRESH_HCT_REG { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_REFRESH_HCT_REG { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_REFRESH_HCT_REG {} unsafe impl ::windows::core::Abi for USBUSER_REFRESH_HCT_REG { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USBUSER_REQUEST_HEADER { pub UsbUserRequest: u32, pub UsbUserStatusCode: USB_USER_ERROR_CODE, pub RequestBufferLength: u32, pub ActualBufferLength: u32, } impl USBUSER_REQUEST_HEADER {} impl ::core::default::Default for USBUSER_REQUEST_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_REQUEST_HEADER { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_REQUEST_HEADER {} unsafe impl ::windows::core::Abi for USBUSER_REQUEST_HEADER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBUSER_ROOTPORT_FEATURE_REQUEST { pub Header: USBUSER_REQUEST_HEADER, pub Parameters: RAW_ROOTPORT_FEATURE, } impl USBUSER_ROOTPORT_FEATURE_REQUEST {} impl ::core::default::Default for USBUSER_ROOTPORT_FEATURE_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_ROOTPORT_FEATURE_REQUEST { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_ROOTPORT_FEATURE_REQUEST {} unsafe impl ::windows::core::Abi for USBUSER_ROOTPORT_FEATURE_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBUSER_ROOTPORT_PARAMETERS { pub Header: USBUSER_REQUEST_HEADER, pub Parameters: RAW_ROOTPORT_PARAMETERS, } impl USBUSER_ROOTPORT_PARAMETERS {} impl ::core::default::Default for USBUSER_ROOTPORT_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_ROOTPORT_PARAMETERS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_ROOTPORT_PARAMETERS {} unsafe impl ::windows::core::Abi for USBUSER_ROOTPORT_PARAMETERS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBUSER_SEND_ONE_PACKET { pub Header: USBUSER_REQUEST_HEADER, pub PacketParameters: PACKET_PARAMETERS, } impl USBUSER_SEND_ONE_PACKET {} impl ::core::default::Default for USBUSER_SEND_ONE_PACKET { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_SEND_ONE_PACKET { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_SEND_ONE_PACKET {} unsafe impl ::windows::core::Abi for USBUSER_SEND_ONE_PACKET { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USBUSER_SEND_RAW_COMMAND { pub Header: USBUSER_REQUEST_HEADER, pub Parameters: USB_SEND_RAW_COMMAND_PARAMETERS, } impl USBUSER_SEND_RAW_COMMAND {} impl ::core::default::Default for USBUSER_SEND_RAW_COMMAND { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USBUSER_SEND_RAW_COMMAND { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USBUSER_SEND_RAW_COMMAND {} unsafe impl ::windows::core::Abi for USBUSER_SEND_RAW_COMMAND { type Abi = Self; } pub const USBUSER_SET_ROOTPORT_FEATURE: u32 = 536870917u32; pub const USBUSER_USB_REFRESH_HCT_REG: u32 = 10u32; pub const USBUSER_VERSION: u32 = 4u32; pub const USB_20_ENDPOINT_TYPE_INTERRUPT_RESERVED_MASK: u32 = 252u32; pub const USB_20_HUB_DESCRIPTOR_TYPE: u32 = 41u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_20_PORT_CHANGE { pub AsUshort16: u16, pub Anonymous: USB_20_PORT_CHANGE_0, } impl USB_20_PORT_CHANGE {} impl ::core::default::Default for USB_20_PORT_CHANGE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_20_PORT_CHANGE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_20_PORT_CHANGE {} unsafe impl ::windows::core::Abi for USB_20_PORT_CHANGE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_20_PORT_CHANGE_0 { pub _bitfield: u16, } impl USB_20_PORT_CHANGE_0 {} impl ::core::default::Default for USB_20_PORT_CHANGE_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_20_PORT_CHANGE_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_20_PORT_CHANGE_0 {} unsafe impl ::windows::core::Abi for USB_20_PORT_CHANGE_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_20_PORT_STATUS { pub AsUshort16: u16, pub Anonymous: USB_20_PORT_STATUS_0, } impl USB_20_PORT_STATUS {} impl ::core::default::Default for USB_20_PORT_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_20_PORT_STATUS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_20_PORT_STATUS {} unsafe impl ::windows::core::Abi for USB_20_PORT_STATUS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_20_PORT_STATUS_0 { pub _bitfield: u16, } impl USB_20_PORT_STATUS_0 {} impl ::core::default::Default for USB_20_PORT_STATUS_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_20_PORT_STATUS_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_20_PORT_STATUS_0 {} unsafe impl ::windows::core::Abi for USB_20_PORT_STATUS_0 { type Abi = Self; } pub const USB_30_ENDPOINT_TYPE_INTERRUPT_RESERVED_MASK: u32 = 204u32; pub const USB_30_ENDPOINT_TYPE_INTERRUPT_USAGE_MASK: u32 = 48u32; pub const USB_30_ENDPOINT_TYPE_INTERRUPT_USAGE_NOTIFICATION: u32 = 16u32; pub const USB_30_ENDPOINT_TYPE_INTERRUPT_USAGE_PERIODIC: u32 = 0u32; pub const USB_30_ENDPOINT_TYPE_INTERRUPT_USAGE_RESERVED10: u32 = 32u32; pub const USB_30_ENDPOINT_TYPE_INTERRUPT_USAGE_RESERVED11: u32 = 48u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_30_HUB_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bNumberOfPorts: u8, pub wHubCharacteristics: u16, pub bPowerOnToPowerGood: u8, pub bHubControlCurrent: u8, pub bHubHdrDecLat: u8, pub wHubDelay: u16, pub DeviceRemovable: u16, } impl USB_30_HUB_DESCRIPTOR {} impl ::core::default::Default for USB_30_HUB_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_30_HUB_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_30_HUB_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_30_HUB_DESCRIPTOR { type Abi = Self; } pub const USB_30_HUB_DESCRIPTOR_TYPE: u32 = 42u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_30_PORT_CHANGE { pub AsUshort16: u16, pub Anonymous: USB_30_PORT_CHANGE_0, } impl USB_30_PORT_CHANGE {} impl ::core::default::Default for USB_30_PORT_CHANGE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_30_PORT_CHANGE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_30_PORT_CHANGE {} unsafe impl ::windows::core::Abi for USB_30_PORT_CHANGE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_30_PORT_CHANGE_0 { pub _bitfield: u16, } impl USB_30_PORT_CHANGE_0 {} impl ::core::default::Default for USB_30_PORT_CHANGE_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_30_PORT_CHANGE_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_30_PORT_CHANGE_0 {} unsafe impl ::windows::core::Abi for USB_30_PORT_CHANGE_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_30_PORT_STATUS { pub AsUshort16: u16, pub Anonymous: USB_30_PORT_STATUS_0, } impl USB_30_PORT_STATUS {} impl ::core::default::Default for USB_30_PORT_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_30_PORT_STATUS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_30_PORT_STATUS {} unsafe impl ::windows::core::Abi for USB_30_PORT_STATUS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_30_PORT_STATUS_0 { pub _bitfield: u16, } impl USB_30_PORT_STATUS_0 {} impl ::core::default::Default for USB_30_PORT_STATUS_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_30_PORT_STATUS_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_30_PORT_STATUS_0 {} unsafe impl ::windows::core::Abi for USB_30_PORT_STATUS_0 { type Abi = Self; } pub const USB_ALLOW_FIRMWARE_UPDATE: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_BANDWIDTH_INFO { pub DeviceCount: u32, pub TotalBusBandwidth: u32, pub Total32secBandwidth: u32, pub AllocedBulkAndControl: u32, pub AllocedIso: u32, pub AllocedInterrupt_1ms: u32, pub AllocedInterrupt_2ms: u32, pub AllocedInterrupt_4ms: u32, pub AllocedInterrupt_8ms: u32, pub AllocedInterrupt_16ms: u32, pub AllocedInterrupt_32ms: u32, } impl USB_BANDWIDTH_INFO {} impl ::core::default::Default for USB_BANDWIDTH_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_BANDWIDTH_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_BANDWIDTH_INFO {} unsafe impl ::windows::core::Abi for USB_BANDWIDTH_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_BOS_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub wTotalLength: u16, pub bNumDeviceCaps: u8, } impl USB_BOS_DESCRIPTOR {} impl ::core::default::Default for USB_BOS_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_BOS_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_BOS_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_BOS_DESCRIPTOR { type Abi = Self; } pub const USB_BOS_DESCRIPTOR_TYPE: u32 = 15u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] #[cfg(feature = "Win32_Foundation")] pub struct USB_BUS_STATISTICS_0 { pub DeviceCount: u32, pub CurrentSystemTime: i64, pub CurrentUsbFrame: u32, pub BulkBytes: u32, pub IsoBytes: u32, pub InterruptBytes: u32, pub ControlDataBytes: u32, pub PciInterruptCount: u32, pub HardResetCount: u32, pub WorkerSignalCount: u32, pub CommonBufferBytes: u32, pub WorkerIdleTimeMs: u32, pub RootHubEnabled: super::super::Foundation::BOOLEAN, pub RootHubDevicePowerState: u8, pub Unused: u8, pub NameIndex: u8, } #[cfg(feature = "Win32_Foundation")] impl USB_BUS_STATISTICS_0 {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for USB_BUS_STATISTICS_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for USB_BUS_STATISTICS_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for USB_BUS_STATISTICS_0 {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for USB_BUS_STATISTICS_0 { type Abi = Self; } pub const USB_CHARGING_POLICY_DEFAULT: u32 = 0u32; pub const USB_CHARGING_POLICY_ICCHPF: u32 = 1u32; pub const USB_CHARGING_POLICY_ICCLPF: u32 = 2u32; pub const USB_CHARGING_POLICY_NO_POWER: u32 = 3u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_CLOSE_RAW_DEVICE_PARAMETERS { pub xxx: u32, } impl USB_CLOSE_RAW_DEVICE_PARAMETERS {} impl ::core::default::Default for USB_CLOSE_RAW_DEVICE_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_CLOSE_RAW_DEVICE_PARAMETERS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_CLOSE_RAW_DEVICE_PARAMETERS {} unsafe impl ::windows::core::Abi for USB_CLOSE_RAW_DEVICE_PARAMETERS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_COMMON_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, } impl USB_COMMON_DESCRIPTOR {} impl ::core::default::Default for USB_COMMON_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_COMMON_DESCRIPTOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USB_COMMON_DESCRIPTOR").field("bLength", &self.bLength).field("bDescriptorType", &self.bDescriptorType).finish() } } impl ::core::cmp::PartialEq for USB_COMMON_DESCRIPTOR { fn eq(&self, other: &Self) -> bool { self.bLength == other.bLength && self.bDescriptorType == other.bDescriptorType } } impl ::core::cmp::Eq for USB_COMMON_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_COMMON_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_CONFIGURATION_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub wTotalLength: u16, pub bNumInterfaces: u8, pub bConfigurationValue: u8, pub iConfiguration: u8, pub bmAttributes: u8, pub MaxPower: u8, } impl USB_CONFIGURATION_DESCRIPTOR {} impl ::core::default::Default for USB_CONFIGURATION_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_CONFIGURATION_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_CONFIGURATION_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_CONFIGURATION_DESCRIPTOR { type Abi = Self; } pub const USB_CONFIGURATION_DESCRIPTOR_TYPE: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_CONFIGURATION_POWER_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub SelfPowerConsumedD0: [u8; 3], pub bPowerSummaryId: u8, pub bBusPowerSavingD1: u8, pub bSelfPowerSavingD1: u8, pub bBusPowerSavingD2: u8, pub bSelfPowerSavingD2: u8, pub bBusPowerSavingD3: u8, pub bSelfPowerSavingD3: u8, pub TransitionTimeFromD1: u16, pub TransitionTimeFromD2: u16, pub TransitionTimeFromD3: u16, } impl USB_CONFIGURATION_POWER_DESCRIPTOR {} impl ::core::default::Default for USB_CONFIGURATION_POWER_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_CONFIGURATION_POWER_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_CONFIGURATION_POWER_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_CONFIGURATION_POWER_DESCRIPTOR { type Abi = Self; } pub const USB_CONFIG_BUS_POWERED: u32 = 128u32; pub const USB_CONFIG_POWERED_MASK: u32 = 192u32; pub const USB_CONFIG_POWER_DESCRIPTOR_TYPE: u32 = 7u32; pub const USB_CONFIG_REMOTE_WAKEUP: u32 = 32u32; pub const USB_CONFIG_RESERVED: u32 = 31u32; pub const USB_CONFIG_SELF_POWERED: u32 = 64u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct USB_CONTROLLER_FLAVOR(pub i32); pub const USB_HcGeneric: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(0i32); pub const OHCI_Generic: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(100i32); pub const OHCI_Hydra: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(101i32); pub const OHCI_NEC: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(102i32); pub const UHCI_Generic: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(200i32); pub const UHCI_Piix4: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(201i32); pub const UHCI_Piix3: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(202i32); pub const UHCI_Ich2: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(203i32); pub const UHCI_Reserved204: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(204i32); pub const UHCI_Ich1: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(205i32); pub const UHCI_Ich3m: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(206i32); pub const UHCI_Ich4: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(207i32); pub const UHCI_Ich5: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(208i32); pub const UHCI_Ich6: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(209i32); pub const UHCI_Intel: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(249i32); pub const UHCI_VIA: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(250i32); pub const UHCI_VIA_x01: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(251i32); pub const UHCI_VIA_x02: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(252i32); pub const UHCI_VIA_x03: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(253i32); pub const UHCI_VIA_x04: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(254i32); pub const UHCI_VIA_x0E_FIFO: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(264i32); pub const EHCI_Generic: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(1000i32); pub const EHCI_NEC: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(2000i32); pub const EHCI_Lucent: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(3000i32); pub const EHCI_NVIDIA_Tegra2: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(4000i32); pub const EHCI_NVIDIA_Tegra3: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(4001i32); pub const EHCI_Intel_Medfield: USB_CONTROLLER_FLAVOR = USB_CONTROLLER_FLAVOR(5001i32); impl ::core::convert::From<i32> for USB_CONTROLLER_FLAVOR { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for USB_CONTROLLER_FLAVOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_CONTROLLER_INFO_0 { pub PciVendorId: u32, pub PciDeviceId: u32, pub PciRevision: u32, pub NumberOfRootPorts: u32, pub ControllerFlavor: USB_CONTROLLER_FLAVOR, pub HcFeatureFlags: u32, } impl USB_CONTROLLER_INFO_0 {} impl ::core::default::Default for USB_CONTROLLER_INFO_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_CONTROLLER_INFO_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_CONTROLLER_INFO_0 {} unsafe impl ::windows::core::Abi for USB_CONTROLLER_INFO_0 { type Abi = Self; } pub const USB_CYCLE_PORT: u32 = 7u32; pub const USB_DEBUG_DESCRIPTOR_TYPE: u32 = 10u32; pub const USB_DEFAULT_DEVICE_ADDRESS: u32 = 0u32; pub const USB_DEFAULT_ENDPOINT_ADDRESS: u32 = 0u32; pub const USB_DEFAULT_MAX_PACKET: u32 = 64u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEFAULT_PIPE_SETUP_PACKET { pub bmRequestType: BM_REQUEST_TYPE, pub bRequest: u8, pub wValue: USB_DEFAULT_PIPE_SETUP_PACKET_1, pub wIndex: USB_DEFAULT_PIPE_SETUP_PACKET_0, pub wLength: u16, } impl USB_DEFAULT_PIPE_SETUP_PACKET {} impl ::core::default::Default for USB_DEFAULT_PIPE_SETUP_PACKET { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEFAULT_PIPE_SETUP_PACKET { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEFAULT_PIPE_SETUP_PACKET {} unsafe impl ::windows::core::Abi for USB_DEFAULT_PIPE_SETUP_PACKET { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_DEFAULT_PIPE_SETUP_PACKET_0 { pub Anonymous: USB_DEFAULT_PIPE_SETUP_PACKET_0_0, pub W: u16, } impl USB_DEFAULT_PIPE_SETUP_PACKET_0 {} impl ::core::default::Default for USB_DEFAULT_PIPE_SETUP_PACKET_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEFAULT_PIPE_SETUP_PACKET_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEFAULT_PIPE_SETUP_PACKET_0 {} unsafe impl ::windows::core::Abi for USB_DEFAULT_PIPE_SETUP_PACKET_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_DEFAULT_PIPE_SETUP_PACKET_0_0 { pub LowByte: u8, pub HiByte: u8, } impl USB_DEFAULT_PIPE_SETUP_PACKET_0_0 {} impl ::core::default::Default for USB_DEFAULT_PIPE_SETUP_PACKET_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_DEFAULT_PIPE_SETUP_PACKET_0_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("LowByte", &self.LowByte).field("HiByte", &self.HiByte).finish() } } impl ::core::cmp::PartialEq for USB_DEFAULT_PIPE_SETUP_PACKET_0_0 { fn eq(&self, other: &Self) -> bool { self.LowByte == other.LowByte && self.HiByte == other.HiByte } } impl ::core::cmp::Eq for USB_DEFAULT_PIPE_SETUP_PACKET_0_0 {} unsafe impl ::windows::core::Abi for USB_DEFAULT_PIPE_SETUP_PACKET_0_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_DEFAULT_PIPE_SETUP_PACKET_1 { pub Anonymous: USB_DEFAULT_PIPE_SETUP_PACKET_1_0, pub W: u16, } impl USB_DEFAULT_PIPE_SETUP_PACKET_1 {} impl ::core::default::Default for USB_DEFAULT_PIPE_SETUP_PACKET_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEFAULT_PIPE_SETUP_PACKET_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEFAULT_PIPE_SETUP_PACKET_1 {} unsafe impl ::windows::core::Abi for USB_DEFAULT_PIPE_SETUP_PACKET_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_DEFAULT_PIPE_SETUP_PACKET_1_0 { pub LowByte: u8, pub HiByte: u8, } impl USB_DEFAULT_PIPE_SETUP_PACKET_1_0 {} impl ::core::default::Default for USB_DEFAULT_PIPE_SETUP_PACKET_1_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_DEFAULT_PIPE_SETUP_PACKET_1_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Anonymous_e__Struct").field("LowByte", &self.LowByte).field("HiByte", &self.HiByte).finish() } } impl ::core::cmp::PartialEq for USB_DEFAULT_PIPE_SETUP_PACKET_1_0 { fn eq(&self, other: &Self) -> bool { self.LowByte == other.LowByte && self.HiByte == other.HiByte } } impl ::core::cmp::Eq for USB_DEFAULT_PIPE_SETUP_PACKET_1_0 {} unsafe impl ::windows::core::Abi for USB_DEFAULT_PIPE_SETUP_PACKET_1_0 { type Abi = Self; } pub const USB_DEVICE_CAPABILITY_BATTERY_INFO: u32 = 7u32; pub const USB_DEVICE_CAPABILITY_BILLBOARD: u32 = 13u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bDevCapabilityType: u8, pub iAddtionalInfoURL: u8, pub bNumberOfAlternateModes: u8, pub bPreferredAlternateMode: u8, pub VconnPower: USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1, pub bmConfigured: [u8; 32], pub bReserved: u32, pub AlternateMode: [USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_0; 1], } impl USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_0 { pub wSVID: u16, pub bAlternateMode: u8, pub iAlternateModeSetting: u8, } impl USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1 { pub AsUshort: u16, pub Anonymous: USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1_0, } impl USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1_0 { pub _bitfield: u16, } impl USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_BILLBOARD_DESCRIPTOR_1_0 { type Abi = Self; } pub const USB_DEVICE_CAPABILITY_CONTAINER_ID: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_DEVICE_CAPABILITY_CONTAINER_ID_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bDevCapabilityType: u8, pub bReserved: u8, pub ContainerID: [u8; 16], } impl USB_DEVICE_CAPABILITY_CONTAINER_ID_DESCRIPTOR {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_CONTAINER_ID_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_DEVICE_CAPABILITY_CONTAINER_ID_DESCRIPTOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USB_DEVICE_CAPABILITY_CONTAINER_ID_DESCRIPTOR").field("bLength", &self.bLength).field("bDescriptorType", &self.bDescriptorType).field("bDevCapabilityType", &self.bDevCapabilityType).field("bReserved", &self.bReserved).field("ContainerID", &self.ContainerID).finish() } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_CONTAINER_ID_DESCRIPTOR { fn eq(&self, other: &Self) -> bool { self.bLength == other.bLength && self.bDescriptorType == other.bDescriptorType && self.bDevCapabilityType == other.bDevCapabilityType && self.bReserved == other.bReserved && self.ContainerID == other.ContainerID } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_CONTAINER_ID_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_CONTAINER_ID_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_DEVICE_CAPABILITY_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bDevCapabilityType: u8, } impl USB_DEVICE_CAPABILITY_DESCRIPTOR {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_DEVICE_CAPABILITY_DESCRIPTOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USB_DEVICE_CAPABILITY_DESCRIPTOR").field("bLength", &self.bLength).field("bDescriptorType", &self.bDescriptorType).field("bDevCapabilityType", &self.bDevCapabilityType).finish() } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_DESCRIPTOR { fn eq(&self, other: &Self) -> bool { self.bLength == other.bLength && self.bDescriptorType == other.bDescriptorType && self.bDevCapabilityType == other.bDevCapabilityType } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_DESCRIPTOR { type Abi = Self; } pub const USB_DEVICE_CAPABILITY_DESCRIPTOR_TYPE: u32 = 16u32; pub const USB_DEVICE_CAPABILITY_FIRMWARE_STATUS: u32 = 17u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bDevCapabilityType: u8, pub bcdDescriptorVersion: u8, pub bmAttributes: USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0, } impl USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0 { pub AsUlong: u32, pub Anonymous: USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0_0, } impl USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0_0 { pub _bitfield: u32, } impl USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_FIRMWARE_STATUS_DESCRIPTOR_0_0 { type Abi = Self; } pub const USB_DEVICE_CAPABILITY_MAX_U1_LATENCY: u32 = 10u32; pub const USB_DEVICE_CAPABILITY_MAX_U2_LATENCY: u32 = 2047u32; pub const USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bDevCapabilityType: u8, pub bReserved: u8, pub bmCapabilities: USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0, pub wMinVoltage: u16, pub wMaxVoltage: u16, pub wReserved: u16, pub dwMaxOperatingPower: u32, pub dwMaxPeakPower: u32, pub dwMaxPeakPowerTime: u32, } impl USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0 { pub AsUshort: u16, pub Anonymous: USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0_0, } impl USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0_0 { pub _bitfield: u16, } impl USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_PD_CONSUMER_PORT_DESCRIPTOR_0_0 { type Abi = Self; } pub const USB_DEVICE_CAPABILITY_PD_PROVIDER_PORT: u32 = 9u32; pub const USB_DEVICE_CAPABILITY_PLATFORM: u32 = 5u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_PLATFORM_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bDevCapabilityType: u8, pub bReserved: u8, pub PlatformCapabilityUuid: ::windows::core::GUID, pub CapabililityData: [u8; 1], } impl USB_DEVICE_CAPABILITY_PLATFORM_DESCRIPTOR {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_PLATFORM_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_PLATFORM_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_PLATFORM_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_PLATFORM_DESCRIPTOR { type Abi = Self; } pub const USB_DEVICE_CAPABILITY_POWER_DELIVERY: u32 = 6u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bDevCapabilityType: u8, pub bReserved: u8, pub bmAttributes: USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0, pub bmProviderPorts: u16, pub bmConsumerPorts: u16, pub bcdBCVersion: u16, pub bcdPDVersion: u16, pub bcdUSBTypeCVersion: u16, } impl USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0 { pub AsUlong: u32, pub Anonymous: USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0_0, } impl USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0_0 { pub _bitfield: u32, } impl USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_POWER_DELIVERY_DESCRIPTOR_0_0 { type Abi = Self; } pub const USB_DEVICE_CAPABILITY_PRECISION_TIME_MEASUREMENT: u32 = 11u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED { pub AsUlong32: u32, pub Anonymous: USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_0, } impl USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_0 { pub _bitfield: u32, } impl USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_0 { type Abi = Self; } pub const USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_DIR_RX: u32 = 0u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_DIR_TX: u32 = 1u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_LSE_BPS: u32 = 0u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_LSE_GBPS: u32 = 3u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_LSE_KBPS: u32 = 1u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_LSE_MBPS: u32 = 2u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_MODE_ASYMMETRIC: u32 = 1u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_MODE_SYMMETRIC: u32 = 0u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_PROTOCOL_SS: u32 = 0u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED_PROTOCOL_SSP: u32 = 1u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB: u32 = 10u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bDevCapabilityType: u8, pub bReserved: u8, pub bmAttributes: USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0, pub wFunctionalitySupport: USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1, pub wReserved: u16, pub bmSublinkSpeedAttr: [USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_SPEED; 1], } impl USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0 { pub AsUlong: u32, pub Anonymous: USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0_0, } impl USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0_0 { pub _bitfield: u32, } impl USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_0_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1 { pub AsUshort: u16, pub Anonymous: USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1_0, } impl USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1_0 { pub _bitfield: u16, } impl USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_SUPERSPEEDPLUS_USB_DESCRIPTOR_1_0 { type Abi = Self; } pub const USB_DEVICE_CAPABILITY_SUPERSPEED_BMATTRIBUTES_LTM_CAPABLE: u32 = 2u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEED_BMATTRIBUTES_RESERVED_MASK: u32 = 253u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEED_SPEEDS_SUPPORTED_FULL: u32 = 2u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEED_SPEEDS_SUPPORTED_HIGH: u32 = 4u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEED_SPEEDS_SUPPORTED_LOW: u32 = 1u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEED_SPEEDS_SUPPORTED_RESERVED_MASK: u32 = 65520u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEED_SPEEDS_SUPPORTED_SUPER: u32 = 8u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEED_U1_DEVICE_EXIT_MAX_VALUE: u32 = 10u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEED_U2_DEVICE_EXIT_MAX_VALUE: u32 = 2047u32; pub const USB_DEVICE_CAPABILITY_SUPERSPEED_USB: u32 = 3u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_SUPERSPEED_USB_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bDevCapabilityType: u8, pub bmAttributes: u8, pub wSpeedsSupported: u16, pub bFunctionalitySupport: u8, pub bU1DevExitLat: u8, pub wU2DevExitLat: u16, } impl USB_DEVICE_CAPABILITY_SUPERSPEED_USB_DESCRIPTOR {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_SUPERSPEED_USB_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_SUPERSPEED_USB_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_SUPERSPEED_USB_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_SUPERSPEED_USB_DESCRIPTOR { type Abi = Self; } pub const USB_DEVICE_CAPABILITY_USB20_EXTENSION: u32 = 2u32; pub const USB_DEVICE_CAPABILITY_USB20_EXTENSION_BMATTRIBUTES_RESERVED_MASK: u32 = 4294901985u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bDevCapabilityType: u8, pub bmAttributes: USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0, } impl USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0 { pub AsUlong: u32, pub Anonymous: USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0_0, } impl USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0_0 { pub _bitfield: u32, } impl USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0_0 {} impl ::core::default::Default for USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_CAPABILITY_USB20_EXTENSION_DESCRIPTOR_0_0 { type Abi = Self; } pub const USB_DEVICE_CAPABILITY_WIRELESS_USB: u32 = 1u32; pub const USB_DEVICE_CHARACTERISTICS_MAXIMUM_PATH_DELAYS_AVAILABLE: u32 = 1u32; pub const USB_DEVICE_CHARACTERISTICS_VERSION_1: u32 = 1u32; pub const USB_DEVICE_CLASS_APPLICATION_SPECIFIC: u32 = 254u32; pub const USB_DEVICE_CLASS_AUDIO: u32 = 1u32; pub const USB_DEVICE_CLASS_AUDIO_VIDEO: u32 = 16u32; pub const USB_DEVICE_CLASS_BILLBOARD: u32 = 17u32; pub const USB_DEVICE_CLASS_CDC_DATA: u32 = 10u32; pub const USB_DEVICE_CLASS_COMMUNICATIONS: u32 = 2u32; pub const USB_DEVICE_CLASS_CONTENT_SECURITY: u32 = 13u32; pub const USB_DEVICE_CLASS_DIAGNOSTIC_DEVICE: u32 = 220u32; pub const USB_DEVICE_CLASS_HUB: u32 = 9u32; pub const USB_DEVICE_CLASS_HUMAN_INTERFACE: u32 = 3u32; pub const USB_DEVICE_CLASS_IMAGE: u32 = 6u32; pub const USB_DEVICE_CLASS_MISCELLANEOUS: u32 = 239u32; pub const USB_DEVICE_CLASS_MONITOR: u32 = 4u32; pub const USB_DEVICE_CLASS_PERSONAL_HEALTHCARE: u32 = 15u32; pub const USB_DEVICE_CLASS_PHYSICAL_INTERFACE: u32 = 5u32; pub const USB_DEVICE_CLASS_POWER: u32 = 6u32; pub const USB_DEVICE_CLASS_PRINTER: u32 = 7u32; pub const USB_DEVICE_CLASS_RESERVED: u32 = 0u32; pub const USB_DEVICE_CLASS_SMART_CARD: u32 = 11u32; pub const USB_DEVICE_CLASS_STORAGE: u32 = 8u32; pub const USB_DEVICE_CLASS_VENDOR_SPECIFIC: u32 = 255u32; pub const USB_DEVICE_CLASS_VIDEO: u32 = 14u32; pub const USB_DEVICE_CLASS_WIRELESS_CONTROLLER: u32 = 224u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bcdUSB: u16, pub bDeviceClass: u8, pub bDeviceSubClass: u8, pub bDeviceProtocol: u8, pub bMaxPacketSize0: u8, pub idVendor: u16, pub idProduct: u16, pub bcdDevice: u16, pub iManufacturer: u8, pub iProduct: u8, pub iSerialNumber: u8, pub bNumConfigurations: u8, } impl USB_DEVICE_DESCRIPTOR {} impl ::core::default::Default for USB_DEVICE_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_DEVICE_DESCRIPTOR { type Abi = Self; } pub const USB_DEVICE_DESCRIPTOR_TYPE: u32 = 1u32; pub const USB_DEVICE_FIRMWARE_HASH_LENGTH: u32 = 32u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_QUALIFIER_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bcdUSB: u16, pub bDeviceClass: u8, pub bDeviceSubClass: u8, pub bDeviceProtocol: u8, pub bMaxPacketSize0: u8, pub bNumConfigurations: u8, pub bReserved: u8, } impl USB_DEVICE_QUALIFIER_DESCRIPTOR {} impl ::core::default::Default for USB_DEVICE_QUALIFIER_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_QUALIFIER_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_QUALIFIER_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_DEVICE_QUALIFIER_DESCRIPTOR { type Abi = Self; } pub const USB_DEVICE_QUALIFIER_DESCRIPTOR_TYPE: u32 = 6u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct USB_DEVICE_SPEED(pub i32); pub const UsbLowSpeed: USB_DEVICE_SPEED = USB_DEVICE_SPEED(0i32); pub const UsbFullSpeed: USB_DEVICE_SPEED = USB_DEVICE_SPEED(1i32); pub const UsbHighSpeed: USB_DEVICE_SPEED = USB_DEVICE_SPEED(2i32); pub const UsbSuperSpeed: USB_DEVICE_SPEED = USB_DEVICE_SPEED(3i32); impl ::core::convert::From<i32> for USB_DEVICE_SPEED { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for USB_DEVICE_SPEED { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_DEVICE_STATUS { pub AsUshort16: u16, pub Anonymous: USB_DEVICE_STATUS_0, } impl USB_DEVICE_STATUS {} impl ::core::default::Default for USB_DEVICE_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_STATUS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_STATUS {} unsafe impl ::windows::core::Abi for USB_DEVICE_STATUS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_DEVICE_STATUS_0 { pub _bitfield: u16, } impl USB_DEVICE_STATUS_0 {} impl ::core::default::Default for USB_DEVICE_STATUS_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_DEVICE_STATUS_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_DEVICE_STATUS_0 {} unsafe impl ::windows::core::Abi for USB_DEVICE_STATUS_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 USB_DEVICE_TYPE(pub i32); pub const Usb11Device: USB_DEVICE_TYPE = USB_DEVICE_TYPE(0i32); pub const Usb20Device: USB_DEVICE_TYPE = USB_DEVICE_TYPE(1i32); impl ::core::convert::From<i32> for USB_DEVICE_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for USB_DEVICE_TYPE { type Abi = Self; } pub const USB_DIAG_IGNORE_HUBS_OFF: u32 = 263u32; pub const USB_DIAG_IGNORE_HUBS_ON: u32 = 262u32; pub const USB_DISALLOW_FIRMWARE_UPDATE: u32 = 0u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] #[cfg(feature = "Win32_Foundation")] pub struct USB_DRIVER_VERSION_PARAMETERS { pub DriverTrackingCode: u32, pub USBDI_Version: u32, pub USBUSER_Version: u32, pub CheckedPortDriver: super::super::Foundation::BOOLEAN, pub CheckedMiniportDriver: super::super::Foundation::BOOLEAN, pub USB_Version: u16, } #[cfg(feature = "Win32_Foundation")] impl USB_DRIVER_VERSION_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for USB_DRIVER_VERSION_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for USB_DRIVER_VERSION_PARAMETERS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for USB_DRIVER_VERSION_PARAMETERS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for USB_DRIVER_VERSION_PARAMETERS { type Abi = Self; } pub const USB_ENABLE_PORT: u32 = 5u32; pub const USB_ENDPOINT_ADDRESS_MASK: u32 = 15u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_ENDPOINT_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bEndpointAddress: u8, pub bmAttributes: u8, pub wMaxPacketSize: u16, pub bInterval: u8, } impl USB_ENDPOINT_DESCRIPTOR {} impl ::core::default::Default for USB_ENDPOINT_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_ENDPOINT_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_ENDPOINT_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_ENDPOINT_DESCRIPTOR { type Abi = Self; } pub const USB_ENDPOINT_DESCRIPTOR_TYPE: u32 = 5u32; pub const USB_ENDPOINT_DIRECTION_MASK: u32 = 128u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_ENDPOINT_STATUS { pub AsUshort16: u16, pub Anonymous: USB_ENDPOINT_STATUS_0, } impl USB_ENDPOINT_STATUS {} impl ::core::default::Default for USB_ENDPOINT_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_ENDPOINT_STATUS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_ENDPOINT_STATUS {} unsafe impl ::windows::core::Abi for USB_ENDPOINT_STATUS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_ENDPOINT_STATUS_0 { pub _bitfield: u16, } impl USB_ENDPOINT_STATUS_0 {} impl ::core::default::Default for USB_ENDPOINT_STATUS_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_ENDPOINT_STATUS_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_ENDPOINT_STATUS_0 {} unsafe impl ::windows::core::Abi for USB_ENDPOINT_STATUS_0 { type Abi = Self; } pub const USB_ENDPOINT_SUPERSPEED_BULK_MAX_PACKET_SIZE: u32 = 1024u32; pub const USB_ENDPOINT_SUPERSPEED_CONTROL_MAX_PACKET_SIZE: u32 = 512u32; pub const USB_ENDPOINT_SUPERSPEED_INTERRUPT_MAX_PACKET_SIZE: u32 = 1024u32; pub const USB_ENDPOINT_SUPERSPEED_ISO_MAX_PACKET_SIZE: u32 = 1024u32; pub const USB_ENDPOINT_TYPE_BULK: u32 = 2u32; pub const USB_ENDPOINT_TYPE_BULK_RESERVED_MASK: u32 = 252u32; pub const USB_ENDPOINT_TYPE_CONTROL: u32 = 0u32; pub const USB_ENDPOINT_TYPE_CONTROL_RESERVED_MASK: u32 = 252u32; pub const USB_ENDPOINT_TYPE_INTERRUPT: u32 = 3u32; pub const USB_ENDPOINT_TYPE_ISOCHRONOUS: u32 = 1u32; pub const USB_ENDPOINT_TYPE_ISOCHRONOUS_RESERVED_MASK: u32 = 192u32; pub const USB_ENDPOINT_TYPE_ISOCHRONOUS_SYNCHRONIZATION_ADAPTIVE: u32 = 8u32; pub const USB_ENDPOINT_TYPE_ISOCHRONOUS_SYNCHRONIZATION_ASYNCHRONOUS: u32 = 4u32; pub const USB_ENDPOINT_TYPE_ISOCHRONOUS_SYNCHRONIZATION_MASK: u32 = 12u32; pub const USB_ENDPOINT_TYPE_ISOCHRONOUS_SYNCHRONIZATION_NO_SYNCHRONIZATION: u32 = 0u32; pub const USB_ENDPOINT_TYPE_ISOCHRONOUS_SYNCHRONIZATION_SYNCHRONOUS: u32 = 12u32; pub const USB_ENDPOINT_TYPE_ISOCHRONOUS_USAGE_DATA_ENDOINT: u32 = 0u32; pub const USB_ENDPOINT_TYPE_ISOCHRONOUS_USAGE_FEEDBACK_ENDPOINT: u32 = 16u32; pub const USB_ENDPOINT_TYPE_ISOCHRONOUS_USAGE_IMPLICIT_FEEDBACK_DATA_ENDPOINT: u32 = 32u32; pub const USB_ENDPOINT_TYPE_ISOCHRONOUS_USAGE_MASK: u32 = 48u32; pub const USB_ENDPOINT_TYPE_ISOCHRONOUS_USAGE_RESERVED: u32 = 48u32; pub const USB_ENDPOINT_TYPE_MASK: u32 = 3u32; pub const USB_FAIL_GET_STATUS: u32 = 280u32; pub const USB_FEATURE_BATTERY_WAKE_MASK: u32 = 40u32; pub const USB_FEATURE_CHARGING_POLICY: u32 = 54u32; pub const USB_FEATURE_ENDPOINT_STALL: u32 = 0u32; pub const USB_FEATURE_FUNCTION_SUSPEND: u32 = 0u32; pub const USB_FEATURE_INTERFACE_POWER_D0: u32 = 2u32; pub const USB_FEATURE_INTERFACE_POWER_D1: u32 = 3u32; pub const USB_FEATURE_INTERFACE_POWER_D2: u32 = 4u32; pub const USB_FEATURE_INTERFACE_POWER_D3: u32 = 5u32; pub const USB_FEATURE_LDM_ENABLE: u32 = 53u32; pub const USB_FEATURE_LTM_ENABLE: u32 = 50u32; pub const USB_FEATURE_OS_IS_PD_AWARE: u32 = 41u32; pub const USB_FEATURE_POLICY_MODE: u32 = 42u32; pub const USB_FEATURE_REMOTE_WAKEUP: u32 = 1u32; pub const USB_FEATURE_TEST_MODE: u32 = 2u32; pub const USB_FEATURE_U1_ENABLE: u32 = 48u32; pub const USB_FEATURE_U2_ENABLE: u32 = 49u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] #[cfg(feature = "Win32_Foundation")] pub struct USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION { pub TimeTrackingHandle: super::super::Foundation::HANDLE, pub InputFrameNumber: u32, pub InputMicroFrameNumber: u32, pub QueryPerformanceCounterAtInputFrameOrMicroFrame: i64, pub QueryPerformanceCounterFrequency: i64, pub PredictedAccuracyInMicroSeconds: u32, pub CurrentGenerationID: u32, pub CurrentQueryPerformanceCounter: i64, pub CurrentHardwareFrameNumber: u32, pub CurrentHardwareMicroFrameNumber: u32, pub CurrentUSBFrameNumber: u32, } #[cfg(feature = "Win32_Foundation")] impl USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union USB_FUNCTION_SUSPEND_OPTIONS { pub AsUchar: u8, pub Anonymous: USB_FUNCTION_SUSPEND_OPTIONS_0, } impl USB_FUNCTION_SUSPEND_OPTIONS {} impl ::core::default::Default for USB_FUNCTION_SUSPEND_OPTIONS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_FUNCTION_SUSPEND_OPTIONS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_FUNCTION_SUSPEND_OPTIONS {} unsafe impl ::windows::core::Abi for USB_FUNCTION_SUSPEND_OPTIONS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_FUNCTION_SUSPEND_OPTIONS_0 { pub _bitfield: u8, } impl USB_FUNCTION_SUSPEND_OPTIONS_0 {} impl ::core::default::Default for USB_FUNCTION_SUSPEND_OPTIONS_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_FUNCTION_SUSPEND_OPTIONS_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 USB_FUNCTION_SUSPEND_OPTIONS_0 { fn eq(&self, other: &Self) -> bool { self._bitfield == other._bitfield } } impl ::core::cmp::Eq for USB_FUNCTION_SUSPEND_OPTIONS_0 {} unsafe impl ::windows::core::Abi for USB_FUNCTION_SUSPEND_OPTIONS_0 { type Abi = Self; } pub const USB_GETSTATUS_LTM_ENABLE: u32 = 16u32; pub const USB_GETSTATUS_REMOTE_WAKEUP_ENABLED: u32 = 2u32; pub const USB_GETSTATUS_SELF_POWERED: u32 = 1u32; pub const USB_GETSTATUS_U1_ENABLE: u32 = 4u32; pub const USB_GETSTATUS_U2_ENABLE: u32 = 8u32; pub const USB_GET_BUSGUID_INFO: u32 = 266u32; pub const USB_GET_BUS_INFO: u32 = 264u32; pub const USB_GET_CONTROLLER_NAME: u32 = 265u32; pub const USB_GET_DESCRIPTOR_FROM_NODE_CONNECTION: u32 = 260u32; pub const USB_GET_DEVICE_CHARACTERISTICS: u32 = 288u32; pub const USB_GET_DEVICE_HANDLE: u32 = 268u32; pub const USB_GET_DEVICE_HANDLE_EX: u32 = 269u32; pub const USB_GET_FIRMWARE_ALLOWED_OR_DISALLOWED_STATE: u32 = 0u32; pub const USB_GET_FIRMWARE_HASH: u32 = 1u32; pub const USB_GET_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC: u32 = 286u32; pub const USB_GET_HUB_CAPABILITIES: u32 = 271u32; pub const USB_GET_HUB_CAPABILITIES_EX: u32 = 276u32; pub const USB_GET_HUB_CONFIG_INFO: u32 = 275u32; pub const USB_GET_HUB_COUNT: u32 = 6u32; pub const USB_GET_HUB_INFORMATION_EX: u32 = 277u32; pub const USB_GET_HUB_NAME: u32 = 8u32; pub const USB_GET_NODE_CONNECTION_ATTRIBUTES: u32 = 272u32; pub const USB_GET_NODE_CONNECTION_DRIVERKEY_NAME: u32 = 264u32; pub const USB_GET_NODE_CONNECTION_INFORMATION: u32 = 259u32; pub const USB_GET_NODE_CONNECTION_INFORMATION_EX: u32 = 274u32; pub const USB_GET_NODE_CONNECTION_INFORMATION_EX_V2: u32 = 279u32; pub const USB_GET_NODE_CONNECTION_NAME: u32 = 261u32; pub const USB_GET_NODE_INFORMATION: u32 = 258u32; pub const USB_GET_PARENT_HUB_INFO: u32 = 267u32; pub const USB_GET_PORT_CONNECTOR_PROPERTIES: u32 = 278u32; pub const USB_GET_PORT_STATUS: u32 = 4u32; pub const USB_GET_ROOTHUB_PDO: u32 = 3u32; pub const USB_GET_TOPOLOGY_ADDRESS: u32 = 271u32; pub const USB_GET_TRANSPORT_CHARACTERISTICS: u32 = 281u32; pub const USB_GET_TT_DEVICE_HANDLE: u32 = 270u32; pub const USB_HC_FEATURE_FLAG_PORT_POWER_SWITCHING: u32 = 1u32; pub const USB_HC_FEATURE_FLAG_SEL_SUSPEND: u32 = 2u32; pub const USB_HC_FEATURE_LEGACY_BIOS: u32 = 4u32; pub const USB_HC_FEATURE_TIME_SYNC_API: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_HIGH_SPEED_MAXPACKET { pub us: u16, } impl USB_HIGH_SPEED_MAXPACKET {} impl ::core::default::Default for USB_HIGH_SPEED_MAXPACKET { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_HIGH_SPEED_MAXPACKET { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_HIGH_SPEED_MAXPACKET {} unsafe impl ::windows::core::Abi for USB_HIGH_SPEED_MAXPACKET { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_HIGH_SPEED_MAXPACKET_0 { pub _bitfield: u16, } impl USB_HIGH_SPEED_MAXPACKET_0 {} impl ::core::default::Default for USB_HIGH_SPEED_MAXPACKET_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_HIGH_SPEED_MAXPACKET_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_HIGH_SPEED_MAXPACKET_0 {} unsafe impl ::windows::core::Abi for USB_HIGH_SPEED_MAXPACKET_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union USB_HUB_30_PORT_REMOTE_WAKE_MASK { pub AsUchar8: u8, pub Anonymous: USB_HUB_30_PORT_REMOTE_WAKE_MASK_0, } impl USB_HUB_30_PORT_REMOTE_WAKE_MASK {} impl ::core::default::Default for USB_HUB_30_PORT_REMOTE_WAKE_MASK { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_HUB_30_PORT_REMOTE_WAKE_MASK { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_HUB_30_PORT_REMOTE_WAKE_MASK {} unsafe impl ::windows::core::Abi for USB_HUB_30_PORT_REMOTE_WAKE_MASK { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_HUB_30_PORT_REMOTE_WAKE_MASK_0 { pub _bitfield: u8, } impl USB_HUB_30_PORT_REMOTE_WAKE_MASK_0 {} impl ::core::default::Default for USB_HUB_30_PORT_REMOTE_WAKE_MASK_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_HUB_30_PORT_REMOTE_WAKE_MASK_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 USB_HUB_30_PORT_REMOTE_WAKE_MASK_0 { fn eq(&self, other: &Self) -> bool { self._bitfield == other._bitfield } } impl ::core::cmp::Eq for USB_HUB_30_PORT_REMOTE_WAKE_MASK_0 {} unsafe impl ::windows::core::Abi for USB_HUB_30_PORT_REMOTE_WAKE_MASK_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_HUB_CHANGE { pub AsUshort16: u16, pub Anonymous: USB_HUB_CHANGE_0, } impl USB_HUB_CHANGE {} impl ::core::default::Default for USB_HUB_CHANGE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_HUB_CHANGE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_HUB_CHANGE {} unsafe impl ::windows::core::Abi for USB_HUB_CHANGE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_HUB_CHANGE_0 { pub _bitfield: u16, } impl USB_HUB_CHANGE_0 {} impl ::core::default::Default for USB_HUB_CHANGE_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_HUB_CHANGE_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_HUB_CHANGE_0 {} unsafe impl ::windows::core::Abi for USB_HUB_CHANGE_0 { type Abi = Self; } pub const USB_HUB_CYCLE_PORT: u32 = 273u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_HUB_DESCRIPTOR { pub bDescriptorLength: u8, pub bDescriptorType: u8, pub bNumberOfPorts: u8, pub wHubCharacteristics: u16, pub bPowerOnToPowerGood: u8, pub bHubControlCurrent: u8, pub bRemoveAndPowerMask: [u8; 64], } impl USB_HUB_DESCRIPTOR {} impl ::core::default::Default for USB_HUB_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_HUB_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_HUB_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_HUB_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_HUB_STATUS { pub AsUshort16: u16, pub Anonymous: USB_HUB_STATUS_0, } impl USB_HUB_STATUS {} impl ::core::default::Default for USB_HUB_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_HUB_STATUS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_HUB_STATUS {} unsafe impl ::windows::core::Abi for USB_HUB_STATUS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_HUB_STATUS_0 { pub _bitfield: u16, } impl USB_HUB_STATUS_0 {} impl ::core::default::Default for USB_HUB_STATUS_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_HUB_STATUS_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_HUB_STATUS_0 {} unsafe impl ::windows::core::Abi for USB_HUB_STATUS_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_HUB_STATUS_AND_CHANGE { pub AsUlong32: u32, pub Anonymous: USB_HUB_STATUS_AND_CHANGE_0, } impl USB_HUB_STATUS_AND_CHANGE {} impl ::core::default::Default for USB_HUB_STATUS_AND_CHANGE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_HUB_STATUS_AND_CHANGE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_HUB_STATUS_AND_CHANGE {} unsafe impl ::windows::core::Abi for USB_HUB_STATUS_AND_CHANGE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_HUB_STATUS_AND_CHANGE_0 { pub HubStatus: USB_HUB_STATUS, pub HubChange: USB_HUB_CHANGE, } impl USB_HUB_STATUS_AND_CHANGE_0 {} impl ::core::default::Default for USB_HUB_STATUS_AND_CHANGE_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_HUB_STATUS_AND_CHANGE_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_HUB_STATUS_AND_CHANGE_0 {} unsafe impl ::windows::core::Abi for USB_HUB_STATUS_AND_CHANGE_0 { type Abi = Self; } pub type USB_IDLE_CALLBACK = unsafe extern "system" fn(context: *const ::core::ffi::c_void); #[derive(:: core :: clone :: Clone)] #[repr(C)] pub struct USB_IDLE_CALLBACK_INFO { pub IdleCallback: ::core::option::Option<USB_IDLE_CALLBACK>, pub IdleContext: *mut ::core::ffi::c_void, } impl USB_IDLE_CALLBACK_INFO {} impl ::core::default::Default for USB_IDLE_CALLBACK_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_IDLE_CALLBACK_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USB_IDLE_CALLBACK_INFO").field("IdleContext", &self.IdleContext).finish() } } impl ::core::cmp::PartialEq for USB_IDLE_CALLBACK_INFO { fn eq(&self, other: &Self) -> bool { self.IdleCallback.map(|f| f as usize) == other.IdleCallback.map(|f| f as usize) && self.IdleContext == other.IdleContext } } impl ::core::cmp::Eq for USB_IDLE_CALLBACK_INFO {} unsafe impl ::windows::core::Abi for USB_IDLE_CALLBACK_INFO { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const USB_IDLE_NOTIFICATION: u32 = 9u32; pub const USB_IDLE_NOTIFICATION_EX: u32 = 272u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_INTERFACE_ASSOCIATION_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bFirstInterface: u8, pub bInterfaceCount: u8, pub bFunctionClass: u8, pub bFunctionSubClass: u8, pub bFunctionProtocol: u8, pub iFunction: u8, } impl USB_INTERFACE_ASSOCIATION_DESCRIPTOR {} impl ::core::default::Default for USB_INTERFACE_ASSOCIATION_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_INTERFACE_ASSOCIATION_DESCRIPTOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USB_INTERFACE_ASSOCIATION_DESCRIPTOR") .field("bLength", &self.bLength) .field("bDescriptorType", &self.bDescriptorType) .field("bFirstInterface", &self.bFirstInterface) .field("bInterfaceCount", &self.bInterfaceCount) .field("bFunctionClass", &self.bFunctionClass) .field("bFunctionSubClass", &self.bFunctionSubClass) .field("bFunctionProtocol", &self.bFunctionProtocol) .field("iFunction", &self.iFunction) .finish() } } impl ::core::cmp::PartialEq for USB_INTERFACE_ASSOCIATION_DESCRIPTOR { fn eq(&self, other: &Self) -> bool { self.bLength == other.bLength && self.bDescriptorType == other.bDescriptorType && self.bFirstInterface == other.bFirstInterface && self.bInterfaceCount == other.bInterfaceCount && self.bFunctionClass == other.bFunctionClass && self.bFunctionSubClass == other.bFunctionSubClass && self.bFunctionProtocol == other.bFunctionProtocol && self.iFunction == other.iFunction } } impl ::core::cmp::Eq for USB_INTERFACE_ASSOCIATION_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_INTERFACE_ASSOCIATION_DESCRIPTOR { type Abi = Self; } pub const USB_INTERFACE_ASSOCIATION_DESCRIPTOR_TYPE: u32 = 11u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_INTERFACE_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bInterfaceNumber: u8, pub bAlternateSetting: u8, pub bNumEndpoints: u8, pub bInterfaceClass: u8, pub bInterfaceSubClass: u8, pub bInterfaceProtocol: u8, pub iInterface: u8, } impl USB_INTERFACE_DESCRIPTOR {} impl ::core::default::Default for USB_INTERFACE_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_INTERFACE_DESCRIPTOR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USB_INTERFACE_DESCRIPTOR") .field("bLength", &self.bLength) .field("bDescriptorType", &self.bDescriptorType) .field("bInterfaceNumber", &self.bInterfaceNumber) .field("bAlternateSetting", &self.bAlternateSetting) .field("bNumEndpoints", &self.bNumEndpoints) .field("bInterfaceClass", &self.bInterfaceClass) .field("bInterfaceSubClass", &self.bInterfaceSubClass) .field("bInterfaceProtocol", &self.bInterfaceProtocol) .field("iInterface", &self.iInterface) .finish() } } impl ::core::cmp::PartialEq for USB_INTERFACE_DESCRIPTOR { fn eq(&self, other: &Self) -> bool { self.bLength == other.bLength && self.bDescriptorType == other.bDescriptorType && self.bInterfaceNumber == other.bInterfaceNumber && self.bAlternateSetting == other.bAlternateSetting && self.bNumEndpoints == other.bNumEndpoints && self.bInterfaceClass == other.bInterfaceClass && self.bInterfaceSubClass == other.bInterfaceSubClass && self.bInterfaceProtocol == other.bInterfaceProtocol && self.iInterface == other.iInterface } } impl ::core::cmp::Eq for USB_INTERFACE_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_INTERFACE_DESCRIPTOR { type Abi = Self; } pub const USB_INTERFACE_DESCRIPTOR_TYPE: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_INTERFACE_POWER_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bmCapabilitiesFlags: u8, pub bBusPowerSavingD1: u8, pub bSelfPowerSavingD1: u8, pub bBusPowerSavingD2: u8, pub bSelfPowerSavingD2: u8, pub bBusPowerSavingD3: u8, pub bSelfPowerSavingD3: u8, pub TransitionTimeFromD1: u16, pub TransitionTimeFromD2: u16, pub TransitionTimeFromD3: u16, } impl USB_INTERFACE_POWER_DESCRIPTOR {} impl ::core::default::Default for USB_INTERFACE_POWER_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_INTERFACE_POWER_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_INTERFACE_POWER_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_INTERFACE_POWER_DESCRIPTOR { type Abi = Self; } pub const USB_INTERFACE_POWER_DESCRIPTOR_TYPE: u32 = 8u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_INTERFACE_STATUS { pub AsUshort16: u16, pub Anonymous: USB_INTERFACE_STATUS_0, } impl USB_INTERFACE_STATUS {} impl ::core::default::Default for USB_INTERFACE_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_INTERFACE_STATUS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_INTERFACE_STATUS {} unsafe impl ::windows::core::Abi for USB_INTERFACE_STATUS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_INTERFACE_STATUS_0 { pub _bitfield: u16, } impl USB_INTERFACE_STATUS_0 {} impl ::core::default::Default for USB_INTERFACE_STATUS_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_INTERFACE_STATUS_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_INTERFACE_STATUS_0 {} unsafe impl ::windows::core::Abi for USB_INTERFACE_STATUS_0 { type Abi = Self; } pub const USB_NOTIFY_ON_TRANSPORT_CHARACTERISTICS_CHANGE: u32 = 283u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_OPEN_RAW_DEVICE_PARAMETERS { pub PortStatus: u16, pub MaxPacketEp0: u16, } impl USB_OPEN_RAW_DEVICE_PARAMETERS {} impl ::core::default::Default for USB_OPEN_RAW_DEVICE_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_OPEN_RAW_DEVICE_PARAMETERS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_OPEN_RAW_DEVICE_PARAMETERS {} unsafe impl ::windows::core::Abi for USB_OPEN_RAW_DEVICE_PARAMETERS { type Abi = Self; } pub const USB_OTG_DESCRIPTOR_TYPE: u32 = 9u32; pub const USB_OTHER_SPEED_CONFIGURATION_DESCRIPTOR_TYPE: u32 = 7u32; pub const USB_PACKETFLAG_ASYNC_IN: u32 = 8u32; pub const USB_PACKETFLAG_ASYNC_OUT: u32 = 16u32; pub const USB_PACKETFLAG_FULL_SPEED: u32 = 2u32; pub const USB_PACKETFLAG_HIGH_SPEED: u32 = 4u32; pub const USB_PACKETFLAG_ISO_IN: u32 = 32u32; pub const USB_PACKETFLAG_ISO_OUT: u32 = 64u32; pub const USB_PACKETFLAG_LOW_SPEED: u32 = 1u32; pub const USB_PACKETFLAG_SETUP: u32 = 128u32; pub const USB_PACKETFLAG_TOGGLE0: u32 = 256u32; pub const USB_PACKETFLAG_TOGGLE1: u32 = 512u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_PASS_THRU_PARAMETERS { pub FunctionGUID: ::windows::core::GUID, pub ParameterLength: u32, pub Parameters: [u8; 4], } impl USB_PASS_THRU_PARAMETERS {} impl ::core::default::Default for USB_PASS_THRU_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_PASS_THRU_PARAMETERS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_PASS_THRU_PARAMETERS {} unsafe impl ::windows::core::Abi for USB_PASS_THRU_PARAMETERS { type Abi = Self; } pub const USB_PORTATTR_MINI_CONNECTOR: u32 = 4u32; pub const USB_PORTATTR_NO_CONNECTOR: u32 = 1u32; pub const USB_PORTATTR_NO_OVERCURRENT_UI: u32 = 33554432u32; pub const USB_PORTATTR_OEM_CONNECTOR: u32 = 8u32; pub const USB_PORTATTR_OWNED_BY_CC: u32 = 16777216u32; pub const USB_PORTATTR_SHARED_USB2: u32 = 2u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_PORT_CHANGE { pub AsUshort16: u16, pub Usb20PortChange: USB_20_PORT_CHANGE, pub Usb30PortChange: USB_30_PORT_CHANGE, } impl USB_PORT_CHANGE {} impl ::core::default::Default for USB_PORT_CHANGE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_PORT_CHANGE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_PORT_CHANGE {} unsafe impl ::windows::core::Abi for USB_PORT_CHANGE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_PORT_EXT_STATUS { pub AsUlong32: u32, pub Anonymous: USB_PORT_EXT_STATUS_0, } impl USB_PORT_EXT_STATUS {} impl ::core::default::Default for USB_PORT_EXT_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_PORT_EXT_STATUS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_PORT_EXT_STATUS {} unsafe impl ::windows::core::Abi for USB_PORT_EXT_STATUS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_PORT_EXT_STATUS_0 { pub _bitfield: u32, } impl USB_PORT_EXT_STATUS_0 {} impl ::core::default::Default for USB_PORT_EXT_STATUS_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_PORT_EXT_STATUS_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_PORT_EXT_STATUS_0 {} unsafe impl ::windows::core::Abi for USB_PORT_EXT_STATUS_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_PORT_EXT_STATUS_AND_CHANGE { pub AsUlong64: u64, pub Anonymous: USB_PORT_EXT_STATUS_AND_CHANGE_0, } impl USB_PORT_EXT_STATUS_AND_CHANGE {} impl ::core::default::Default for USB_PORT_EXT_STATUS_AND_CHANGE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_PORT_EXT_STATUS_AND_CHANGE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_PORT_EXT_STATUS_AND_CHANGE {} unsafe impl ::windows::core::Abi for USB_PORT_EXT_STATUS_AND_CHANGE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_PORT_EXT_STATUS_AND_CHANGE_0 { pub PortStatusChange: USB_PORT_STATUS_AND_CHANGE, pub PortExtStatus: USB_PORT_EXT_STATUS, } impl USB_PORT_EXT_STATUS_AND_CHANGE_0 {} impl ::core::default::Default for USB_PORT_EXT_STATUS_AND_CHANGE_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_PORT_EXT_STATUS_AND_CHANGE_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_PORT_EXT_STATUS_AND_CHANGE_0 {} unsafe impl ::windows::core::Abi for USB_PORT_EXT_STATUS_AND_CHANGE_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_PORT_STATUS { pub AsUshort16: u16, pub Usb20PortStatus: USB_20_PORT_STATUS, pub Usb30PortStatus: USB_30_PORT_STATUS, } impl USB_PORT_STATUS {} impl ::core::default::Default for USB_PORT_STATUS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_PORT_STATUS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_PORT_STATUS {} unsafe impl ::windows::core::Abi for USB_PORT_STATUS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub union USB_PORT_STATUS_AND_CHANGE { pub AsUlong32: u32, pub Anonymous: USB_PORT_STATUS_AND_CHANGE_0, } impl USB_PORT_STATUS_AND_CHANGE {} impl ::core::default::Default for USB_PORT_STATUS_AND_CHANGE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_PORT_STATUS_AND_CHANGE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_PORT_STATUS_AND_CHANGE {} unsafe impl ::windows::core::Abi for USB_PORT_STATUS_AND_CHANGE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_PORT_STATUS_AND_CHANGE_0 { pub PortStatus: USB_PORT_STATUS, pub PortChange: USB_PORT_CHANGE, } impl USB_PORT_STATUS_AND_CHANGE_0 {} impl ::core::default::Default for USB_PORT_STATUS_AND_CHANGE_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_PORT_STATUS_AND_CHANGE_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_PORT_STATUS_AND_CHANGE_0 {} unsafe impl ::windows::core::Abi for USB_PORT_STATUS_AND_CHANGE_0 { type Abi = Self; } pub const USB_PORT_STATUS_CONNECT: u32 = 1u32; pub const USB_PORT_STATUS_ENABLE: u32 = 2u32; pub const USB_PORT_STATUS_HIGH_SPEED: u32 = 1024u32; pub const USB_PORT_STATUS_LOW_SPEED: u32 = 512u32; pub const USB_PORT_STATUS_OVER_CURRENT: u32 = 8u32; pub const USB_PORT_STATUS_POWER: u32 = 256u32; pub const USB_PORT_STATUS_RESET: u32 = 16u32; pub const USB_PORT_STATUS_SUSPEND: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] #[cfg(feature = "Win32_Foundation")] pub struct USB_POWER_INFO { pub SystemState: WDMUSB_POWER_STATE, pub HcDevicePowerState: WDMUSB_POWER_STATE, pub HcDeviceWake: WDMUSB_POWER_STATE, pub HcSystemWake: WDMUSB_POWER_STATE, pub RhDevicePowerState: WDMUSB_POWER_STATE, pub RhDeviceWake: WDMUSB_POWER_STATE, pub RhSystemWake: WDMUSB_POWER_STATE, pub LastSystemSleepState: WDMUSB_POWER_STATE, pub CanWakeup: super::super::Foundation::BOOLEAN, pub IsPowered: super::super::Foundation::BOOLEAN, } #[cfg(feature = "Win32_Foundation")] impl USB_POWER_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for USB_POWER_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for USB_POWER_INFO { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for USB_POWER_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for USB_POWER_INFO { type Abi = Self; } pub const USB_RECORD_FAILURE: u32 = 10u32; pub const USB_REGISTER_COMPOSITE_DEVICE: u32 = 0u32; pub const USB_REGISTER_FOR_TRANSPORT_BANDWIDTH_CHANGE: u32 = 2u32; pub const USB_REGISTER_FOR_TRANSPORT_CHARACTERISTICS_CHANGE: u32 = 282u32; pub const USB_REGISTER_FOR_TRANSPORT_LATENCY_CHANGE: u32 = 1u32; pub const USB_REQUEST_CLEAR_FEATURE: u32 = 1u32; pub const USB_REQUEST_CLEAR_TT_BUFFER: u32 = 8u32; pub const USB_REQUEST_GET_CONFIGURATION: u32 = 8u32; pub const USB_REQUEST_GET_DESCRIPTOR: u32 = 6u32; pub const USB_REQUEST_GET_FIRMWARE_STATUS: u32 = 26u32; pub const USB_REQUEST_GET_INTERFACE: u32 = 10u32; pub const USB_REQUEST_GET_PORT_ERR_COUNT: u32 = 13u32; pub const USB_REQUEST_GET_STATE: u32 = 2u32; pub const USB_REQUEST_GET_STATUS: u32 = 0u32; pub const USB_REQUEST_GET_TT_STATE: u32 = 10u32; pub const USB_REQUEST_ISOCH_DELAY: u32 = 49u32; pub const USB_REQUEST_REMOTE_WAKE_NOTIFICATION: u32 = 2u32; pub const USB_REQUEST_RESET_TT: u32 = 9u32; pub const USB_REQUEST_SET_ADDRESS: u32 = 5u32; pub const USB_REQUEST_SET_CONFIGURATION: u32 = 9u32; pub const USB_REQUEST_SET_DESCRIPTOR: u32 = 7u32; pub const USB_REQUEST_SET_FEATURE: u32 = 3u32; pub const USB_REQUEST_SET_FIRMWARE_STATUS: u32 = 27u32; pub const USB_REQUEST_SET_HUB_DEPTH: u32 = 12u32; pub const USB_REQUEST_SET_INTERFACE: u32 = 11u32; pub const USB_REQUEST_SET_SEL: u32 = 48u32; pub const USB_REQUEST_STOP_TT: u32 = 11u32; pub const USB_REQUEST_SYNC_FRAME: u32 = 12u32; pub const USB_REQ_GLOBAL_RESUME: u32 = 274u32; pub const USB_REQ_GLOBAL_SUSPEND: u32 = 273u32; pub const USB_RESERVED_DESCRIPTOR_TYPE: u32 = 6u32; pub const USB_RESET_HUB: u32 = 275u32; pub const USB_RESET_PORT: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_SEND_RAW_COMMAND_PARAMETERS { pub Usb_bmRequest: u8, pub Usb_bRequest: u8, pub Usb_wVlaue: u16, pub Usb_wIndex: u16, pub Usb_wLength: u16, pub DeviceAddress: u16, pub MaximumPacketSize: u16, pub Timeout: u32, pub DataLength: u32, pub UsbdStatusCode: i32, pub Data: [u8; 4], } impl USB_SEND_RAW_COMMAND_PARAMETERS {} impl ::core::default::Default for USB_SEND_RAW_COMMAND_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_SEND_RAW_COMMAND_PARAMETERS { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_SEND_RAW_COMMAND_PARAMETERS {} unsafe impl ::windows::core::Abi for USB_SEND_RAW_COMMAND_PARAMETERS { type Abi = Self; } pub const USB_START_TRACKING_FOR_TIME_SYNC: u32 = 285u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] #[cfg(feature = "Win32_Foundation")] pub struct USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION { pub TimeTrackingHandle: super::super::Foundation::HANDLE, pub IsStartupDelayTolerable: super::super::Foundation::BOOLEAN, } #[cfg(feature = "Win32_Foundation")] impl USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION { type Abi = Self; } pub const USB_STATUS_EXT_PORT_STATUS: u32 = 2u32; pub const USB_STATUS_PD_STATUS: u32 = 1u32; pub const USB_STATUS_PORT_STATUS: u32 = 0u32; pub const USB_STOP_TRACKING_FOR_TIME_SYNC: u32 = 287u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] #[cfg(feature = "Win32_Foundation")] pub struct USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION { pub TimeTrackingHandle: super::super::Foundation::HANDLE, } #[cfg(feature = "Win32_Foundation")] impl USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_STRING_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bString: [u16; 1], } impl USB_STRING_DESCRIPTOR {} impl ::core::default::Default for USB_STRING_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_STRING_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_STRING_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_STRING_DESCRIPTOR { type Abi = Self; } pub const USB_STRING_DESCRIPTOR_TYPE: u32 = 3u32; pub const USB_SUBMIT_URB: u32 = 0u32; pub const USB_SUPERSPEEDPLUS_ISOCHRONOUS_MAX_BYTESPERINTERVAL: u32 = 16777215u32; pub const USB_SUPERSPEEDPLUS_ISOCHRONOUS_MIN_BYTESPERINTERVAL: u32 = 49153u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub wReserved: u16, pub dwBytesPerInterval: u32, } impl USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR {} impl ::core::default::Default for USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR { type Abi = Self; } pub const USB_SUPERSPEEDPLUS_ISOCH_ENDPOINT_COMPANION_DESCRIPTOR_TYPE: u32 = 49u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR { pub bLength: u8, pub bDescriptorType: u8, pub bMaxBurst: u8, pub bmAttributes: USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0, pub wBytesPerInterval: u16, } impl USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR {} impl ::core::default::Default for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR {} unsafe impl ::windows::core::Abi for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0 { pub AsUchar: u8, pub Bulk: USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_0, pub Isochronous: USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_1, } impl USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0 {} impl ::core::default::Default for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0 {} unsafe impl ::windows::core::Abi for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_0 { pub _bitfield: u8, } impl USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_0 {} impl ::core::default::Default for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_0 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Bulk_e__Struct").field("_bitfield", &self._bitfield).finish() } } impl ::core::cmp::PartialEq for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_0 { fn eq(&self, other: &Self) -> bool { self._bitfield == other._bitfield } } impl ::core::cmp::Eq for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_0 {} unsafe impl ::windows::core::Abi for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_1 { pub _bitfield: u8, } impl USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_1 {} impl ::core::default::Default for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_1 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_Isochronous_e__Struct").field("_bitfield", &self._bitfield).finish() } } impl ::core::cmp::PartialEq for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_1 { fn eq(&self, other: &Self) -> bool { self._bitfield == other._bitfield } } impl ::core::cmp::Eq for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_1 {} unsafe impl ::windows::core::Abi for USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_0_1 { type Abi = Self; } pub const USB_SUPERSPEED_ENDPOINT_COMPANION_DESCRIPTOR_TYPE: u32 = 48u32; pub const USB_SUPERSPEED_ISOCHRONOUS_MAX_MULTIPLIER: u32 = 2u32; pub const USB_SUPPORT_D0_COMMAND: u32 = 1u32; pub const USB_SUPPORT_D1_COMMAND: u32 = 2u32; pub const USB_SUPPORT_D1_WAKEUP: u32 = 16u32; pub const USB_SUPPORT_D2_COMMAND: u32 = 4u32; pub const USB_SUPPORT_D2_WAKEUP: u32 = 32u32; pub const USB_SUPPORT_D3_COMMAND: u32 = 8u32; pub const USB_TEST_MODE_TEST_FORCE_ENABLE: u32 = 5u32; pub const USB_TEST_MODE_TEST_J: u32 = 1u32; pub const USB_TEST_MODE_TEST_K: u32 = 2u32; pub const USB_TEST_MODE_TEST_PACKET: u32 = 4u32; pub const USB_TEST_MODE_TEST_SE0_NAK: u32 = 3u32; pub const USB_TRANSPORT_CHARACTERISTICS_BANDWIDTH_AVAILABLE: u32 = 2u32; pub const USB_TRANSPORT_CHARACTERISTICS_LATENCY_AVAILABLE: u32 = 1u32; pub const USB_TRANSPORT_CHARACTERISTICS_VERSION_1: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct USB_UNICODE_NAME { pub Length: u32, pub String: [u16; 1], } impl USB_UNICODE_NAME {} impl ::core::default::Default for USB_UNICODE_NAME { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for USB_UNICODE_NAME { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for USB_UNICODE_NAME {} unsafe impl ::windows::core::Abi for USB_UNICODE_NAME { type Abi = Self; } pub const USB_UNREGISTER_COMPOSITE_DEVICE: u32 = 1u32; pub const USB_UNREGISTER_FOR_TRANSPORT_CHARACTERISTICS_CHANGE: u32 = 284u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct USB_USB2HW_VERSION_PARAMETERS { pub Usb2HwRevision: u8, } impl USB_USB2HW_VERSION_PARAMETERS {} impl ::core::default::Default for USB_USB2HW_VERSION_PARAMETERS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for USB_USB2HW_VERSION_PARAMETERS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("USB_USB2HW_VERSION_PARAMETERS").field("Usb2HwRevision", &self.Usb2HwRevision).finish() } } impl ::core::cmp::PartialEq for USB_USB2HW_VERSION_PARAMETERS { fn eq(&self, other: &Self) -> bool { self.Usb2HwRevision == other.Usb2HwRevision } } impl ::core::cmp::Eq for USB_USB2HW_VERSION_PARAMETERS {} unsafe impl ::windows::core::Abi for USB_USB2HW_VERSION_PARAMETERS { 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 USB_USER_ERROR_CODE(pub i32); pub const UsbUserSuccess: USB_USER_ERROR_CODE = USB_USER_ERROR_CODE(0i32); pub const UsbUserNotSupported: USB_USER_ERROR_CODE = USB_USER_ERROR_CODE(1i32); pub const UsbUserInvalidRequestCode: USB_USER_ERROR_CODE = USB_USER_ERROR_CODE(2i32); pub const UsbUserFeatureDisabled: USB_USER_ERROR_CODE = USB_USER_ERROR_CODE(3i32); pub const UsbUserInvalidHeaderParameter: USB_USER_ERROR_CODE = USB_USER_ERROR_CODE(4i32); pub const UsbUserInvalidParameter: USB_USER_ERROR_CODE = USB_USER_ERROR_CODE(5i32); pub const UsbUserMiniportError: USB_USER_ERROR_CODE = USB_USER_ERROR_CODE(6i32); pub const UsbUserBufferTooSmall: USB_USER_ERROR_CODE = USB_USER_ERROR_CODE(7i32); pub const UsbUserErrorNotMapped: USB_USER_ERROR_CODE = USB_USER_ERROR_CODE(8i32); pub const UsbUserDeviceNotStarted: USB_USER_ERROR_CODE = USB_USER_ERROR_CODE(9i32); pub const UsbUserNoDeviceConnected: USB_USER_ERROR_CODE = USB_USER_ERROR_CODE(10i32); impl ::core::convert::From<i32> for USB_USER_ERROR_CODE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for USB_USER_ERROR_CODE { 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 WDMUSB_POWER_STATE(pub i32); pub const WdmUsbPowerNotMapped: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(0i32); pub const WdmUsbPowerSystemUnspecified: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(100i32); pub const WdmUsbPowerSystemWorking: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(101i32); pub const WdmUsbPowerSystemSleeping1: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(102i32); pub const WdmUsbPowerSystemSleeping2: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(103i32); pub const WdmUsbPowerSystemSleeping3: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(104i32); pub const WdmUsbPowerSystemHibernate: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(105i32); pub const WdmUsbPowerSystemShutdown: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(106i32); pub const WdmUsbPowerDeviceUnspecified: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(200i32); pub const WdmUsbPowerDeviceD0: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(201i32); pub const WdmUsbPowerDeviceD1: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(202i32); pub const WdmUsbPowerDeviceD2: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(203i32); pub const WdmUsbPowerDeviceD3: WDMUSB_POWER_STATE = WDMUSB_POWER_STATE(204i32); impl ::core::convert::From<i32> for WDMUSB_POWER_STATE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WDMUSB_POWER_STATE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct WINUSB_PIPE_INFORMATION { pub PipeType: USBD_PIPE_TYPE, pub PipeId: u8, pub MaximumPacketSize: u16, pub Interval: u8, } impl WINUSB_PIPE_INFORMATION {} impl ::core::default::Default for WINUSB_PIPE_INFORMATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for WINUSB_PIPE_INFORMATION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("WINUSB_PIPE_INFORMATION").field("PipeType", &self.PipeType).field("PipeId", &self.PipeId).field("MaximumPacketSize", &self.MaximumPacketSize).field("Interval", &self.Interval).finish() } } impl ::core::cmp::PartialEq for WINUSB_PIPE_INFORMATION { fn eq(&self, other: &Self) -> bool { self.PipeType == other.PipeType && self.PipeId == other.PipeId && self.MaximumPacketSize == other.MaximumPacketSize && self.Interval == other.Interval } } impl ::core::cmp::Eq for WINUSB_PIPE_INFORMATION {} unsafe impl ::windows::core::Abi for WINUSB_PIPE_INFORMATION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct WINUSB_PIPE_INFORMATION_EX { pub PipeType: USBD_PIPE_TYPE, pub PipeId: u8, pub MaximumPacketSize: u16, pub Interval: u8, pub MaximumBytesPerInterval: u32, } impl WINUSB_PIPE_INFORMATION_EX {} impl ::core::default::Default for WINUSB_PIPE_INFORMATION_EX { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for WINUSB_PIPE_INFORMATION_EX { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("WINUSB_PIPE_INFORMATION_EX").field("PipeType", &self.PipeType).field("PipeId", &self.PipeId).field("MaximumPacketSize", &self.MaximumPacketSize).field("Interval", &self.Interval).field("MaximumBytesPerInterval", &self.MaximumBytesPerInterval).finish() } } impl ::core::cmp::PartialEq for WINUSB_PIPE_INFORMATION_EX { fn eq(&self, other: &Self) -> bool { self.PipeType == other.PipeType && self.PipeId == other.PipeId && self.MaximumPacketSize == other.MaximumPacketSize && self.Interval == other.Interval && self.MaximumBytesPerInterval == other.MaximumBytesPerInterval } } impl ::core::cmp::Eq for WINUSB_PIPE_INFORMATION_EX {} unsafe impl ::windows::core::Abi for WINUSB_PIPE_INFORMATION_EX { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C, packed(1))] pub struct WINUSB_SETUP_PACKET { pub RequestType: u8, pub Request: u8, pub Value: u16, pub Index: u16, pub Length: u16, } impl WINUSB_SETUP_PACKET {} impl ::core::default::Default for WINUSB_SETUP_PACKET { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for WINUSB_SETUP_PACKET { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for WINUSB_SETUP_PACKET {} unsafe impl ::windows::core::Abi for WINUSB_SETUP_PACKET { type Abi = Self; } pub const WMI_USB_DEVICE_NODE_INFORMATION: u32 = 2u32; pub const WMI_USB_DRIVER_INFORMATION: u32 = 0u32; pub const WMI_USB_DRIVER_NOTIFICATION: u32 = 1u32; pub const WMI_USB_HUB_NODE_INFORMATION: u32 = 4u32; pub const WMI_USB_PERFORMANCE_INFORMATION: u32 = 1u32; pub const WMI_USB_POWER_DEVICE_ENABLE: u32 = 2u32; pub const WinUSB_TestGuid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xda812bff_12c3_46a2_8e2b_dbd3b7834c43); #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_AbortPipe(interfacehandle: *const ::core::ffi::c_void, pipeid: u8) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_AbortPipe(interfacehandle: *const ::core::ffi::c_void, pipeid: u8) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_AbortPipe(::core::mem::transmute(interfacehandle), ::core::mem::transmute(pipeid))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn WinUsb_ControlTransfer<'a, Param1: ::windows::core::IntoParam<'a, WINUSB_SETUP_PACKET>>(interfacehandle: *const ::core::ffi::c_void, setuppacket: Param1, buffer: *mut u8, bufferlength: u32, lengthtransferred: *mut u32, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_ControlTransfer(interfacehandle: *const ::core::ffi::c_void, setuppacket: WINUSB_SETUP_PACKET, buffer: *mut u8, bufferlength: u32, lengthtransferred: *mut u32, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_ControlTransfer(::core::mem::transmute(interfacehandle), setuppacket.into_param().abi(), ::core::mem::transmute(buffer), ::core::mem::transmute(bufferlength), ::core::mem::transmute(lengthtransferred), ::core::mem::transmute(overlapped))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_FlushPipe(interfacehandle: *const ::core::ffi::c_void, pipeid: u8) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_FlushPipe(interfacehandle: *const ::core::ffi::c_void, pipeid: u8) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_FlushPipe(::core::mem::transmute(interfacehandle), ::core::mem::transmute(pipeid))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_Free(interfacehandle: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_Free(interfacehandle: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_Free(::core::mem::transmute(interfacehandle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_GetAdjustedFrameNumber(currentframenumber: *mut u32, timestamp: i64) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_GetAdjustedFrameNumber(currentframenumber: *mut u32, timestamp: i64) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_GetAdjustedFrameNumber(::core::mem::transmute(currentframenumber), ::core::mem::transmute(timestamp))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_GetAssociatedInterface(interfacehandle: *const ::core::ffi::c_void, associatedinterfaceindex: u8, associatedinterfacehandle: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_GetAssociatedInterface(interfacehandle: *const ::core::ffi::c_void, associatedinterfaceindex: u8, associatedinterfacehandle: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_GetAssociatedInterface(::core::mem::transmute(interfacehandle), ::core::mem::transmute(associatedinterfaceindex), ::core::mem::transmute(associatedinterfacehandle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_GetCurrentAlternateSetting(interfacehandle: *const ::core::ffi::c_void, settingnumber: *mut u8) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_GetCurrentAlternateSetting(interfacehandle: *const ::core::ffi::c_void, settingnumber: *mut u8) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_GetCurrentAlternateSetting(::core::mem::transmute(interfacehandle), ::core::mem::transmute(settingnumber))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_GetCurrentFrameNumber(interfacehandle: *const ::core::ffi::c_void, currentframenumber: *mut u32, timestamp: *mut i64) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_GetCurrentFrameNumber(interfacehandle: *const ::core::ffi::c_void, currentframenumber: *mut u32, timestamp: *mut i64) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_GetCurrentFrameNumber(::core::mem::transmute(interfacehandle), ::core::mem::transmute(currentframenumber), ::core::mem::transmute(timestamp))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle: *const ::core::ffi::c_void, frameqpcinfo: *const USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle: *const ::core::ffi::c_void, frameqpcinfo: *const USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_GetCurrentFrameNumberAndQpc(::core::mem::transmute(interfacehandle), ::core::mem::transmute(frameqpcinfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_GetDescriptor(interfacehandle: *const ::core::ffi::c_void, descriptortype: u8, index: u8, languageid: u16, buffer: *mut u8, bufferlength: u32, lengthtransferred: *mut u32) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_GetDescriptor(interfacehandle: *const ::core::ffi::c_void, descriptortype: u8, index: u8, languageid: u16, buffer: *mut u8, bufferlength: u32, lengthtransferred: *mut u32) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_GetDescriptor(::core::mem::transmute(interfacehandle), ::core::mem::transmute(descriptortype), ::core::mem::transmute(index), ::core::mem::transmute(languageid), ::core::mem::transmute(buffer), ::core::mem::transmute(bufferlength), ::core::mem::transmute(lengthtransferred))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn WinUsb_GetOverlappedResult<'a, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(interfacehandle: *const ::core::ffi::c_void, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: Param3) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_GetOverlappedResult(interfacehandle: *const ::core::ffi::c_void, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: super::super::Foundation::BOOL) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_GetOverlappedResult(::core::mem::transmute(interfacehandle), ::core::mem::transmute(lpoverlapped), ::core::mem::transmute(lpnumberofbytestransferred), bwait.into_param().abi())) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_GetPipePolicy(interfacehandle: *const ::core::ffi::c_void, pipeid: u8, policytype: u32, valuelength: *mut u32, value: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_GetPipePolicy(interfacehandle: *const ::core::ffi::c_void, pipeid: u8, policytype: u32, valuelength: *mut u32, value: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_GetPipePolicy(::core::mem::transmute(interfacehandle), ::core::mem::transmute(pipeid), ::core::mem::transmute(policytype), ::core::mem::transmute(valuelength), ::core::mem::transmute(value))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_GetPowerPolicy(interfacehandle: *const ::core::ffi::c_void, policytype: u32, valuelength: *mut u32, value: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_GetPowerPolicy(interfacehandle: *const ::core::ffi::c_void, policytype: u32, valuelength: *mut u32, value: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_GetPowerPolicy(::core::mem::transmute(interfacehandle), ::core::mem::transmute(policytype), ::core::mem::transmute(valuelength), ::core::mem::transmute(value))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_Initialize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(devicehandle: Param0, interfacehandle: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_Initialize(devicehandle: super::super::Foundation::HANDLE, interfacehandle: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_Initialize(devicehandle.into_param().abi(), ::core::mem::transmute(interfacehandle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn WinUsb_ParseConfigurationDescriptor(configurationdescriptor: *const USB_CONFIGURATION_DESCRIPTOR, startposition: *const ::core::ffi::c_void, interfacenumber: i32, alternatesetting: i32, interfaceclass: i32, interfacesubclass: i32, interfaceprotocol: i32) -> *mut USB_INTERFACE_DESCRIPTOR { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_ParseConfigurationDescriptor(configurationdescriptor: *const USB_CONFIGURATION_DESCRIPTOR, startposition: *const ::core::ffi::c_void, interfacenumber: i32, alternatesetting: i32, interfaceclass: i32, interfacesubclass: i32, interfaceprotocol: i32) -> *mut USB_INTERFACE_DESCRIPTOR; } ::core::mem::transmute(WinUsb_ParseConfigurationDescriptor( ::core::mem::transmute(configurationdescriptor), ::core::mem::transmute(startposition), ::core::mem::transmute(interfacenumber), ::core::mem::transmute(alternatesetting), ::core::mem::transmute(interfaceclass), ::core::mem::transmute(interfacesubclass), ::core::mem::transmute(interfaceprotocol), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn WinUsb_ParseDescriptors(descriptorbuffer: *const ::core::ffi::c_void, totallength: u32, startposition: *const ::core::ffi::c_void, descriptortype: i32) -> *mut USB_COMMON_DESCRIPTOR { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_ParseDescriptors(descriptorbuffer: *const ::core::ffi::c_void, totallength: u32, startposition: *const ::core::ffi::c_void, descriptortype: i32) -> *mut USB_COMMON_DESCRIPTOR; } ::core::mem::transmute(WinUsb_ParseDescriptors(::core::mem::transmute(descriptorbuffer), ::core::mem::transmute(totallength), ::core::mem::transmute(startposition), ::core::mem::transmute(descriptortype))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_QueryDeviceInformation(interfacehandle: *const ::core::ffi::c_void, informationtype: u32, bufferlength: *mut u32, buffer: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_QueryDeviceInformation(interfacehandle: *const ::core::ffi::c_void, informationtype: u32, bufferlength: *mut u32, buffer: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_QueryDeviceInformation(::core::mem::transmute(interfacehandle), ::core::mem::transmute(informationtype), ::core::mem::transmute(bufferlength), ::core::mem::transmute(buffer))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_QueryInterfaceSettings(interfacehandle: *const ::core::ffi::c_void, alternateinterfacenumber: u8, usbaltinterfacedescriptor: *mut USB_INTERFACE_DESCRIPTOR) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_QueryInterfaceSettings(interfacehandle: *const ::core::ffi::c_void, alternateinterfacenumber: u8, usbaltinterfacedescriptor: *mut USB_INTERFACE_DESCRIPTOR) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_QueryInterfaceSettings(::core::mem::transmute(interfacehandle), ::core::mem::transmute(alternateinterfacenumber), ::core::mem::transmute(usbaltinterfacedescriptor))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_QueryPipe(interfacehandle: *const ::core::ffi::c_void, alternateinterfacenumber: u8, pipeindex: u8, pipeinformation: *mut WINUSB_PIPE_INFORMATION) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_QueryPipe(interfacehandle: *const ::core::ffi::c_void, alternateinterfacenumber: u8, pipeindex: u8, pipeinformation: *mut WINUSB_PIPE_INFORMATION) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_QueryPipe(::core::mem::transmute(interfacehandle), ::core::mem::transmute(alternateinterfacenumber), ::core::mem::transmute(pipeindex), ::core::mem::transmute(pipeinformation))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_QueryPipeEx(interfacehandle: *const ::core::ffi::c_void, alternatesettingnumber: u8, pipeindex: u8, pipeinformationex: *mut WINUSB_PIPE_INFORMATION_EX) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_QueryPipeEx(interfacehandle: *const ::core::ffi::c_void, alternatesettingnumber: u8, pipeindex: u8, pipeinformationex: *mut WINUSB_PIPE_INFORMATION_EX) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_QueryPipeEx(::core::mem::transmute(interfacehandle), ::core::mem::transmute(alternatesettingnumber), ::core::mem::transmute(pipeindex), ::core::mem::transmute(pipeinformationex))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn WinUsb_ReadIsochPipe(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, framenumber: *mut u32, numberofpackets: u32, isopacketdescriptors: *mut USBD_ISO_PACKET_DESCRIPTOR, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_ReadIsochPipe(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, framenumber: *mut u32, numberofpackets: u32, isopacketdescriptors: *mut USBD_ISO_PACKET_DESCRIPTOR, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_ReadIsochPipe(::core::mem::transmute(bufferhandle), ::core::mem::transmute(offset), ::core::mem::transmute(length), ::core::mem::transmute(framenumber), ::core::mem::transmute(numberofpackets), ::core::mem::transmute(isopacketdescriptors), ::core::mem::transmute(overlapped))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn WinUsb_ReadIsochPipeAsap<'a, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, continuestream: Param3, numberofpackets: u32, isopacketdescriptors: *mut USBD_ISO_PACKET_DESCRIPTOR, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_ReadIsochPipeAsap(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, continuestream: super::super::Foundation::BOOL, numberofpackets: u32, isopacketdescriptors: *mut USBD_ISO_PACKET_DESCRIPTOR, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_ReadIsochPipeAsap(::core::mem::transmute(bufferhandle), ::core::mem::transmute(offset), ::core::mem::transmute(length), continuestream.into_param().abi(), ::core::mem::transmute(numberofpackets), ::core::mem::transmute(isopacketdescriptors), ::core::mem::transmute(overlapped))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn WinUsb_ReadPipe(interfacehandle: *const ::core::ffi::c_void, pipeid: u8, buffer: *mut u8, bufferlength: u32, lengthtransferred: *mut u32, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_ReadPipe(interfacehandle: *const ::core::ffi::c_void, pipeid: u8, buffer: *mut u8, bufferlength: u32, lengthtransferred: *mut u32, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_ReadPipe(::core::mem::transmute(interfacehandle), ::core::mem::transmute(pipeid), ::core::mem::transmute(buffer), ::core::mem::transmute(bufferlength), ::core::mem::transmute(lengthtransferred), ::core::mem::transmute(overlapped))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_RegisterIsochBuffer(interfacehandle: *const ::core::ffi::c_void, pipeid: u8, buffer: *mut u8, bufferlength: u32, isochbufferhandle: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_RegisterIsochBuffer(interfacehandle: *const ::core::ffi::c_void, pipeid: u8, buffer: *mut u8, bufferlength: u32, isochbufferhandle: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_RegisterIsochBuffer(::core::mem::transmute(interfacehandle), ::core::mem::transmute(pipeid), ::core::mem::transmute(buffer), ::core::mem::transmute(bufferlength), ::core::mem::transmute(isochbufferhandle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_ResetPipe(interfacehandle: *const ::core::ffi::c_void, pipeid: u8) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_ResetPipe(interfacehandle: *const ::core::ffi::c_void, pipeid: u8) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_ResetPipe(::core::mem::transmute(interfacehandle), ::core::mem::transmute(pipeid))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_SetCurrentAlternateSetting(interfacehandle: *const ::core::ffi::c_void, settingnumber: u8) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_SetCurrentAlternateSetting(interfacehandle: *const ::core::ffi::c_void, settingnumber: u8) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_SetCurrentAlternateSetting(::core::mem::transmute(interfacehandle), ::core::mem::transmute(settingnumber))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_SetPipePolicy(interfacehandle: *const ::core::ffi::c_void, pipeid: u8, policytype: u32, valuelength: u32, value: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_SetPipePolicy(interfacehandle: *const ::core::ffi::c_void, pipeid: u8, policytype: u32, valuelength: u32, value: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_SetPipePolicy(::core::mem::transmute(interfacehandle), ::core::mem::transmute(pipeid), ::core::mem::transmute(policytype), ::core::mem::transmute(valuelength), ::core::mem::transmute(value))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_SetPowerPolicy(interfacehandle: *const ::core::ffi::c_void, policytype: u32, valuelength: u32, value: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_SetPowerPolicy(interfacehandle: *const ::core::ffi::c_void, policytype: u32, valuelength: u32, value: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_SetPowerPolicy(::core::mem::transmute(interfacehandle), ::core::mem::transmute(policytype), ::core::mem::transmute(valuelength), ::core::mem::transmute(value))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_StartTrackingForTimeSync(interfacehandle: *const ::core::ffi::c_void, starttrackinginfo: *const USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_StartTrackingForTimeSync(interfacehandle: *const ::core::ffi::c_void, starttrackinginfo: *const USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_StartTrackingForTimeSync(::core::mem::transmute(interfacehandle), ::core::mem::transmute(starttrackinginfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_StopTrackingForTimeSync(interfacehandle: *const ::core::ffi::c_void, stoptrackinginfo: *const USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_StopTrackingForTimeSync(interfacehandle: *const ::core::ffi::c_void, stoptrackinginfo: *const USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_StopTrackingForTimeSync(::core::mem::transmute(interfacehandle), ::core::mem::transmute(stoptrackinginfo))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WinUsb_UnregisterIsochBuffer(isochbufferhandle: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_UnregisterIsochBuffer(isochbufferhandle: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_UnregisterIsochBuffer(::core::mem::transmute(isochbufferhandle))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn WinUsb_WriteIsochPipe(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, framenumber: *mut u32, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_WriteIsochPipe(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, framenumber: *mut u32, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_WriteIsochPipe(::core::mem::transmute(bufferhandle), ::core::mem::transmute(offset), ::core::mem::transmute(length), ::core::mem::transmute(framenumber), ::core::mem::transmute(overlapped))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn WinUsb_WriteIsochPipeAsap<'a, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, continuestream: Param3, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_WriteIsochPipeAsap(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, continuestream: super::super::Foundation::BOOL, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_WriteIsochPipeAsap(::core::mem::transmute(bufferhandle), ::core::mem::transmute(offset), ::core::mem::transmute(length), continuestream.into_param().abi(), ::core::mem::transmute(overlapped))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn WinUsb_WritePipe(interfacehandle: *const ::core::ffi::c_void, pipeid: u8, buffer: *const u8, bufferlength: u32, lengthtransferred: *mut u32, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn WinUsb_WritePipe(interfacehandle: *const ::core::ffi::c_void, pipeid: u8, buffer: *const u8, bufferlength: u32, lengthtransferred: *mut u32, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL; } ::core::mem::transmute(WinUsb_WritePipe(::core::mem::transmute(interfacehandle), ::core::mem::transmute(pipeid), ::core::mem::transmute(buffer), ::core::mem::transmute(bufferlength), ::core::mem::transmute(lengthtransferred), ::core::mem::transmute(overlapped))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_BULK_OR_INTERRUPT_TRANSFER { pub Hdr: _URB_HEADER, pub PipeHandle: *mut ::core::ffi::c_void, pub TransferFlags: u32, pub TransferBufferLength: u32, pub TransferBuffer: *mut ::core::ffi::c_void, pub TransferBufferMDL: *mut ::core::ffi::c_void, pub UrbLink: *mut URB, pub hca: _URB_HCD_AREA, } impl _URB_BULK_OR_INTERRUPT_TRANSFER {} impl ::core::default::Default for _URB_BULK_OR_INTERRUPT_TRANSFER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_BULK_OR_INTERRUPT_TRANSFER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_BULK_OR_INTERRUPT_TRANSFER") .field("Hdr", &self.Hdr) .field("PipeHandle", &self.PipeHandle) .field("TransferFlags", &self.TransferFlags) .field("TransferBufferLength", &self.TransferBufferLength) .field("TransferBuffer", &self.TransferBuffer) .field("TransferBufferMDL", &self.TransferBufferMDL) .field("UrbLink", &self.UrbLink) .field("hca", &self.hca) .finish() } } impl ::core::cmp::PartialEq for _URB_BULK_OR_INTERRUPT_TRANSFER { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.PipeHandle == other.PipeHandle && self.TransferFlags == other.TransferFlags && self.TransferBufferLength == other.TransferBufferLength && self.TransferBuffer == other.TransferBuffer && self.TransferBufferMDL == other.TransferBufferMDL && self.UrbLink == other.UrbLink && self.hca == other.hca } } impl ::core::cmp::Eq for _URB_BULK_OR_INTERRUPT_TRANSFER {} unsafe impl ::windows::core::Abi for _URB_BULK_OR_INTERRUPT_TRANSFER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_CONTROL_DESCRIPTOR_REQUEST { pub Hdr: _URB_HEADER, pub Reserved: *mut ::core::ffi::c_void, pub Reserved0: u32, pub TransferBufferLength: u32, pub TransferBuffer: *mut ::core::ffi::c_void, pub TransferBufferMDL: *mut ::core::ffi::c_void, pub UrbLink: *mut URB, pub hca: _URB_HCD_AREA, pub Reserved1: u16, pub Index: u8, pub DescriptorType: u8, pub LanguageId: u16, pub Reserved2: u16, } impl _URB_CONTROL_DESCRIPTOR_REQUEST {} impl ::core::default::Default for _URB_CONTROL_DESCRIPTOR_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_CONTROL_DESCRIPTOR_REQUEST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_CONTROL_DESCRIPTOR_REQUEST") .field("Hdr", &self.Hdr) .field("Reserved", &self.Reserved) .field("Reserved0", &self.Reserved0) .field("TransferBufferLength", &self.TransferBufferLength) .field("TransferBuffer", &self.TransferBuffer) .field("TransferBufferMDL", &self.TransferBufferMDL) .field("UrbLink", &self.UrbLink) .field("hca", &self.hca) .field("Reserved1", &self.Reserved1) .field("Index", &self.Index) .field("DescriptorType", &self.DescriptorType) .field("LanguageId", &self.LanguageId) .field("Reserved2", &self.Reserved2) .finish() } } impl ::core::cmp::PartialEq for _URB_CONTROL_DESCRIPTOR_REQUEST { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.Reserved == other.Reserved && self.Reserved0 == other.Reserved0 && self.TransferBufferLength == other.TransferBufferLength && self.TransferBuffer == other.TransferBuffer && self.TransferBufferMDL == other.TransferBufferMDL && self.UrbLink == other.UrbLink && self.hca == other.hca && self.Reserved1 == other.Reserved1 && self.Index == other.Index && self.DescriptorType == other.DescriptorType && self.LanguageId == other.LanguageId && self.Reserved2 == other.Reserved2 } } impl ::core::cmp::Eq for _URB_CONTROL_DESCRIPTOR_REQUEST {} unsafe impl ::windows::core::Abi for _URB_CONTROL_DESCRIPTOR_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_CONTROL_FEATURE_REQUEST { pub Hdr: _URB_HEADER, pub Reserved: *mut ::core::ffi::c_void, pub Reserved2: u32, pub Reserved3: u32, pub Reserved4: *mut ::core::ffi::c_void, pub Reserved5: *mut ::core::ffi::c_void, pub UrbLink: *mut URB, pub hca: _URB_HCD_AREA, pub Reserved0: u16, pub FeatureSelector: u16, pub Index: u16, pub Reserved1: u16, } impl _URB_CONTROL_FEATURE_REQUEST {} impl ::core::default::Default for _URB_CONTROL_FEATURE_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_CONTROL_FEATURE_REQUEST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_CONTROL_FEATURE_REQUEST") .field("Hdr", &self.Hdr) .field("Reserved", &self.Reserved) .field("Reserved2", &self.Reserved2) .field("Reserved3", &self.Reserved3) .field("Reserved4", &self.Reserved4) .field("Reserved5", &self.Reserved5) .field("UrbLink", &self.UrbLink) .field("hca", &self.hca) .field("Reserved0", &self.Reserved0) .field("FeatureSelector", &self.FeatureSelector) .field("Index", &self.Index) .field("Reserved1", &self.Reserved1) .finish() } } impl ::core::cmp::PartialEq for _URB_CONTROL_FEATURE_REQUEST { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.Reserved == other.Reserved && self.Reserved2 == other.Reserved2 && self.Reserved3 == other.Reserved3 && self.Reserved4 == other.Reserved4 && self.Reserved5 == other.Reserved5 && self.UrbLink == other.UrbLink && self.hca == other.hca && self.Reserved0 == other.Reserved0 && self.FeatureSelector == other.FeatureSelector && self.Index == other.Index && self.Reserved1 == other.Reserved1 } } impl ::core::cmp::Eq for _URB_CONTROL_FEATURE_REQUEST {} unsafe impl ::windows::core::Abi for _URB_CONTROL_FEATURE_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_CONTROL_GET_CONFIGURATION_REQUEST { pub Hdr: _URB_HEADER, pub Reserved: *mut ::core::ffi::c_void, pub Reserved0: u32, pub TransferBufferLength: u32, pub TransferBuffer: *mut ::core::ffi::c_void, pub TransferBufferMDL: *mut ::core::ffi::c_void, pub UrbLink: *mut URB, pub hca: _URB_HCD_AREA, pub Reserved1: [u8; 8], } impl _URB_CONTROL_GET_CONFIGURATION_REQUEST {} impl ::core::default::Default for _URB_CONTROL_GET_CONFIGURATION_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_CONTROL_GET_CONFIGURATION_REQUEST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_CONTROL_GET_CONFIGURATION_REQUEST") .field("Hdr", &self.Hdr) .field("Reserved", &self.Reserved) .field("Reserved0", &self.Reserved0) .field("TransferBufferLength", &self.TransferBufferLength) .field("TransferBuffer", &self.TransferBuffer) .field("TransferBufferMDL", &self.TransferBufferMDL) .field("UrbLink", &self.UrbLink) .field("hca", &self.hca) .field("Reserved1", &self.Reserved1) .finish() } } impl ::core::cmp::PartialEq for _URB_CONTROL_GET_CONFIGURATION_REQUEST { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.Reserved == other.Reserved && self.Reserved0 == other.Reserved0 && self.TransferBufferLength == other.TransferBufferLength && self.TransferBuffer == other.TransferBuffer && self.TransferBufferMDL == other.TransferBufferMDL && self.UrbLink == other.UrbLink && self.hca == other.hca && self.Reserved1 == other.Reserved1 } } impl ::core::cmp::Eq for _URB_CONTROL_GET_CONFIGURATION_REQUEST {} unsafe impl ::windows::core::Abi for _URB_CONTROL_GET_CONFIGURATION_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_CONTROL_GET_INTERFACE_REQUEST { pub Hdr: _URB_HEADER, pub Reserved: *mut ::core::ffi::c_void, pub Reserved0: u32, pub TransferBufferLength: u32, pub TransferBuffer: *mut ::core::ffi::c_void, pub TransferBufferMDL: *mut ::core::ffi::c_void, pub UrbLink: *mut URB, pub hca: _URB_HCD_AREA, pub Reserved1: [u8; 4], pub Interface: u16, pub Reserved2: u16, } impl _URB_CONTROL_GET_INTERFACE_REQUEST {} impl ::core::default::Default for _URB_CONTROL_GET_INTERFACE_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_CONTROL_GET_INTERFACE_REQUEST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_CONTROL_GET_INTERFACE_REQUEST") .field("Hdr", &self.Hdr) .field("Reserved", &self.Reserved) .field("Reserved0", &self.Reserved0) .field("TransferBufferLength", &self.TransferBufferLength) .field("TransferBuffer", &self.TransferBuffer) .field("TransferBufferMDL", &self.TransferBufferMDL) .field("UrbLink", &self.UrbLink) .field("hca", &self.hca) .field("Reserved1", &self.Reserved1) .field("Interface", &self.Interface) .field("Reserved2", &self.Reserved2) .finish() } } impl ::core::cmp::PartialEq for _URB_CONTROL_GET_INTERFACE_REQUEST { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.Reserved == other.Reserved && self.Reserved0 == other.Reserved0 && self.TransferBufferLength == other.TransferBufferLength && self.TransferBuffer == other.TransferBuffer && self.TransferBufferMDL == other.TransferBufferMDL && self.UrbLink == other.UrbLink && self.hca == other.hca && self.Reserved1 == other.Reserved1 && self.Interface == other.Interface && self.Reserved2 == other.Reserved2 } } impl ::core::cmp::Eq for _URB_CONTROL_GET_INTERFACE_REQUEST {} unsafe impl ::windows::core::Abi for _URB_CONTROL_GET_INTERFACE_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_CONTROL_GET_STATUS_REQUEST { pub Hdr: _URB_HEADER, pub Reserved: *mut ::core::ffi::c_void, pub Reserved0: u32, pub TransferBufferLength: u32, pub TransferBuffer: *mut ::core::ffi::c_void, pub TransferBufferMDL: *mut ::core::ffi::c_void, pub UrbLink: *mut URB, pub hca: _URB_HCD_AREA, pub Reserved1: [u8; 4], pub Index: u16, pub Reserved2: u16, } impl _URB_CONTROL_GET_STATUS_REQUEST {} impl ::core::default::Default for _URB_CONTROL_GET_STATUS_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_CONTROL_GET_STATUS_REQUEST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_CONTROL_GET_STATUS_REQUEST") .field("Hdr", &self.Hdr) .field("Reserved", &self.Reserved) .field("Reserved0", &self.Reserved0) .field("TransferBufferLength", &self.TransferBufferLength) .field("TransferBuffer", &self.TransferBuffer) .field("TransferBufferMDL", &self.TransferBufferMDL) .field("UrbLink", &self.UrbLink) .field("hca", &self.hca) .field("Reserved1", &self.Reserved1) .field("Index", &self.Index) .field("Reserved2", &self.Reserved2) .finish() } } impl ::core::cmp::PartialEq for _URB_CONTROL_GET_STATUS_REQUEST { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.Reserved == other.Reserved && self.Reserved0 == other.Reserved0 && self.TransferBufferLength == other.TransferBufferLength && self.TransferBuffer == other.TransferBuffer && self.TransferBufferMDL == other.TransferBufferMDL && self.UrbLink == other.UrbLink && self.hca == other.hca && self.Reserved1 == other.Reserved1 && self.Index == other.Index && self.Reserved2 == other.Reserved2 } } impl ::core::cmp::Eq for _URB_CONTROL_GET_STATUS_REQUEST {} unsafe impl ::windows::core::Abi for _URB_CONTROL_GET_STATUS_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_CONTROL_TRANSFER { pub Hdr: _URB_HEADER, pub PipeHandle: *mut ::core::ffi::c_void, pub TransferFlags: u32, pub TransferBufferLength: u32, pub TransferBuffer: *mut ::core::ffi::c_void, pub TransferBufferMDL: *mut ::core::ffi::c_void, pub UrbLink: *mut URB, pub hca: _URB_HCD_AREA, pub SetupPacket: [u8; 8], } impl _URB_CONTROL_TRANSFER {} impl ::core::default::Default for _URB_CONTROL_TRANSFER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_CONTROL_TRANSFER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_CONTROL_TRANSFER") .field("Hdr", &self.Hdr) .field("PipeHandle", &self.PipeHandle) .field("TransferFlags", &self.TransferFlags) .field("TransferBufferLength", &self.TransferBufferLength) .field("TransferBuffer", &self.TransferBuffer) .field("TransferBufferMDL", &self.TransferBufferMDL) .field("UrbLink", &self.UrbLink) .field("hca", &self.hca) .field("SetupPacket", &self.SetupPacket) .finish() } } impl ::core::cmp::PartialEq for _URB_CONTROL_TRANSFER { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.PipeHandle == other.PipeHandle && self.TransferFlags == other.TransferFlags && self.TransferBufferLength == other.TransferBufferLength && self.TransferBuffer == other.TransferBuffer && self.TransferBufferMDL == other.TransferBufferMDL && self.UrbLink == other.UrbLink && self.hca == other.hca && self.SetupPacket == other.SetupPacket } } impl ::core::cmp::Eq for _URB_CONTROL_TRANSFER {} unsafe impl ::windows::core::Abi for _URB_CONTROL_TRANSFER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_CONTROL_TRANSFER_EX { pub Hdr: _URB_HEADER, pub PipeHandle: *mut ::core::ffi::c_void, pub TransferFlags: u32, pub TransferBufferLength: u32, pub TransferBuffer: *mut ::core::ffi::c_void, pub TransferBufferMDL: *mut ::core::ffi::c_void, pub Timeout: u32, pub hca: _URB_HCD_AREA, pub SetupPacket: [u8; 8], } impl _URB_CONTROL_TRANSFER_EX {} impl ::core::default::Default for _URB_CONTROL_TRANSFER_EX { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_CONTROL_TRANSFER_EX { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_CONTROL_TRANSFER_EX") .field("Hdr", &self.Hdr) .field("PipeHandle", &self.PipeHandle) .field("TransferFlags", &self.TransferFlags) .field("TransferBufferLength", &self.TransferBufferLength) .field("TransferBuffer", &self.TransferBuffer) .field("TransferBufferMDL", &self.TransferBufferMDL) .field("Timeout", &self.Timeout) .field("hca", &self.hca) .field("SetupPacket", &self.SetupPacket) .finish() } } impl ::core::cmp::PartialEq for _URB_CONTROL_TRANSFER_EX { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.PipeHandle == other.PipeHandle && self.TransferFlags == other.TransferFlags && self.TransferBufferLength == other.TransferBufferLength && self.TransferBuffer == other.TransferBuffer && self.TransferBufferMDL == other.TransferBufferMDL && self.Timeout == other.Timeout && self.hca == other.hca && self.SetupPacket == other.SetupPacket } } impl ::core::cmp::Eq for _URB_CONTROL_TRANSFER_EX {} unsafe impl ::windows::core::Abi for _URB_CONTROL_TRANSFER_EX { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST { pub Hdr: _URB_HEADER, pub Reserved: *mut ::core::ffi::c_void, pub TransferFlags: u32, pub TransferBufferLength: u32, pub TransferBuffer: *mut ::core::ffi::c_void, pub TransferBufferMDL: *mut ::core::ffi::c_void, pub UrbLink: *mut URB, pub hca: _URB_HCD_AREA, pub RequestTypeReservedBits: u8, pub Request: u8, pub Value: u16, pub Index: u16, pub Reserved1: u16, } impl _URB_CONTROL_VENDOR_OR_CLASS_REQUEST {} impl ::core::default::Default for _URB_CONTROL_VENDOR_OR_CLASS_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_CONTROL_VENDOR_OR_CLASS_REQUEST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_CONTROL_VENDOR_OR_CLASS_REQUEST") .field("Hdr", &self.Hdr) .field("Reserved", &self.Reserved) .field("TransferFlags", &self.TransferFlags) .field("TransferBufferLength", &self.TransferBufferLength) .field("TransferBuffer", &self.TransferBuffer) .field("TransferBufferMDL", &self.TransferBufferMDL) .field("UrbLink", &self.UrbLink) .field("hca", &self.hca) .field("RequestTypeReservedBits", &self.RequestTypeReservedBits) .field("Request", &self.Request) .field("Value", &self.Value) .field("Index", &self.Index) .field("Reserved1", &self.Reserved1) .finish() } } impl ::core::cmp::PartialEq for _URB_CONTROL_VENDOR_OR_CLASS_REQUEST { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.Reserved == other.Reserved && self.TransferFlags == other.TransferFlags && self.TransferBufferLength == other.TransferBufferLength && self.TransferBuffer == other.TransferBuffer && self.TransferBufferMDL == other.TransferBufferMDL && self.UrbLink == other.UrbLink && self.hca == other.hca && self.RequestTypeReservedBits == other.RequestTypeReservedBits && self.Request == other.Request && self.Value == other.Value && self.Index == other.Index && self.Reserved1 == other.Reserved1 } } impl ::core::cmp::Eq for _URB_CONTROL_VENDOR_OR_CLASS_REQUEST {} unsafe impl ::windows::core::Abi for _URB_CONTROL_VENDOR_OR_CLASS_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_FRAME_LENGTH_CONTROL { pub Hdr: _URB_HEADER, } impl _URB_FRAME_LENGTH_CONTROL {} impl ::core::default::Default for _URB_FRAME_LENGTH_CONTROL { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_FRAME_LENGTH_CONTROL { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_FRAME_LENGTH_CONTROL").field("Hdr", &self.Hdr).finish() } } impl ::core::cmp::PartialEq for _URB_FRAME_LENGTH_CONTROL { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr } } impl ::core::cmp::Eq for _URB_FRAME_LENGTH_CONTROL {} unsafe impl ::windows::core::Abi for _URB_FRAME_LENGTH_CONTROL { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_GET_CURRENT_FRAME_NUMBER { pub Hdr: _URB_HEADER, pub FrameNumber: u32, } impl _URB_GET_CURRENT_FRAME_NUMBER {} impl ::core::default::Default for _URB_GET_CURRENT_FRAME_NUMBER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_GET_CURRENT_FRAME_NUMBER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_GET_CURRENT_FRAME_NUMBER").field("Hdr", &self.Hdr).field("FrameNumber", &self.FrameNumber).finish() } } impl ::core::cmp::PartialEq for _URB_GET_CURRENT_FRAME_NUMBER { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.FrameNumber == other.FrameNumber } } impl ::core::cmp::Eq for _URB_GET_CURRENT_FRAME_NUMBER {} unsafe impl ::windows::core::Abi for _URB_GET_CURRENT_FRAME_NUMBER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_GET_FRAME_LENGTH { pub Hdr: _URB_HEADER, pub FrameLength: u32, pub FrameNumber: u32, } impl _URB_GET_FRAME_LENGTH {} impl ::core::default::Default for _URB_GET_FRAME_LENGTH { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_GET_FRAME_LENGTH { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_GET_FRAME_LENGTH").field("Hdr", &self.Hdr).field("FrameLength", &self.FrameLength).field("FrameNumber", &self.FrameNumber).finish() } } impl ::core::cmp::PartialEq for _URB_GET_FRAME_LENGTH { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.FrameLength == other.FrameLength && self.FrameNumber == other.FrameNumber } } impl ::core::cmp::Eq for _URB_GET_FRAME_LENGTH {} unsafe impl ::windows::core::Abi for _URB_GET_FRAME_LENGTH { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS { pub Hdr: _URB_HEADER, pub PipeHandle: *mut ::core::ffi::c_void, pub MaximumSendPathDelayInMilliSeconds: u32, pub MaximumCompletionPathDelayInMilliSeconds: u32, } impl _URB_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS {} impl ::core::default::Default for _URB_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS") .field("Hdr", &self.Hdr) .field("PipeHandle", &self.PipeHandle) .field("MaximumSendPathDelayInMilliSeconds", &self.MaximumSendPathDelayInMilliSeconds) .field("MaximumCompletionPathDelayInMilliSeconds", &self.MaximumCompletionPathDelayInMilliSeconds) .finish() } } impl ::core::cmp::PartialEq for _URB_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.PipeHandle == other.PipeHandle && self.MaximumSendPathDelayInMilliSeconds == other.MaximumSendPathDelayInMilliSeconds && self.MaximumCompletionPathDelayInMilliSeconds == other.MaximumCompletionPathDelayInMilliSeconds } } impl ::core::cmp::Eq for _URB_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS {} unsafe impl ::windows::core::Abi for _URB_GET_ISOCH_PIPE_TRANSFER_PATH_DELAYS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_HCD_AREA { pub Reserved8: [*mut ::core::ffi::c_void; 8], } impl _URB_HCD_AREA {} impl ::core::default::Default for _URB_HCD_AREA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_HCD_AREA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_HCD_AREA").field("Reserved8", &self.Reserved8).finish() } } impl ::core::cmp::PartialEq for _URB_HCD_AREA { fn eq(&self, other: &Self) -> bool { self.Reserved8 == other.Reserved8 } } impl ::core::cmp::Eq for _URB_HCD_AREA {} unsafe impl ::windows::core::Abi for _URB_HCD_AREA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_HEADER { pub Length: u16, pub Function: u16, pub Status: i32, pub UsbdDeviceHandle: *mut ::core::ffi::c_void, pub UsbdFlags: u32, } impl _URB_HEADER {} impl ::core::default::Default for _URB_HEADER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_HEADER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_HEADER").field("Length", &self.Length).field("Function", &self.Function).field("Status", &self.Status).field("UsbdDeviceHandle", &self.UsbdDeviceHandle).field("UsbdFlags", &self.UsbdFlags).finish() } } impl ::core::cmp::PartialEq for _URB_HEADER { fn eq(&self, other: &Self) -> bool { self.Length == other.Length && self.Function == other.Function && self.Status == other.Status && self.UsbdDeviceHandle == other.UsbdDeviceHandle && self.UsbdFlags == other.UsbdFlags } } impl ::core::cmp::Eq for _URB_HEADER {} unsafe impl ::windows::core::Abi for _URB_HEADER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_ISOCH_TRANSFER { pub Hdr: _URB_HEADER, pub PipeHandle: *mut ::core::ffi::c_void, pub TransferFlags: u32, pub TransferBufferLength: u32, pub TransferBuffer: *mut ::core::ffi::c_void, pub TransferBufferMDL: *mut ::core::ffi::c_void, pub UrbLink: *mut URB, pub hca: _URB_HCD_AREA, pub StartFrame: u32, pub NumberOfPackets: u32, pub ErrorCount: u32, pub IsoPacket: [USBD_ISO_PACKET_DESCRIPTOR; 1], } impl _URB_ISOCH_TRANSFER {} impl ::core::default::Default for _URB_ISOCH_TRANSFER { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_ISOCH_TRANSFER { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_ISOCH_TRANSFER") .field("Hdr", &self.Hdr) .field("PipeHandle", &self.PipeHandle) .field("TransferFlags", &self.TransferFlags) .field("TransferBufferLength", &self.TransferBufferLength) .field("TransferBuffer", &self.TransferBuffer) .field("TransferBufferMDL", &self.TransferBufferMDL) .field("UrbLink", &self.UrbLink) .field("hca", &self.hca) .field("StartFrame", &self.StartFrame) .field("NumberOfPackets", &self.NumberOfPackets) .field("ErrorCount", &self.ErrorCount) .field("IsoPacket", &self.IsoPacket) .finish() } } impl ::core::cmp::PartialEq for _URB_ISOCH_TRANSFER { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.PipeHandle == other.PipeHandle && self.TransferFlags == other.TransferFlags && self.TransferBufferLength == other.TransferBufferLength && self.TransferBuffer == other.TransferBuffer && self.TransferBufferMDL == other.TransferBufferMDL && self.UrbLink == other.UrbLink && self.hca == other.hca && self.StartFrame == other.StartFrame && self.NumberOfPackets == other.NumberOfPackets && self.ErrorCount == other.ErrorCount && self.IsoPacket == other.IsoPacket } } impl ::core::cmp::Eq for _URB_ISOCH_TRANSFER {} unsafe impl ::windows::core::Abi for _URB_ISOCH_TRANSFER { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_OPEN_STATIC_STREAMS { pub Hdr: _URB_HEADER, pub PipeHandle: *mut ::core::ffi::c_void, pub NumberOfStreams: u32, pub StreamInfoVersion: u16, pub StreamInfoSize: u16, pub Streams: *mut USBD_STREAM_INFORMATION, } impl _URB_OPEN_STATIC_STREAMS {} impl ::core::default::Default for _URB_OPEN_STATIC_STREAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_OPEN_STATIC_STREAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_OPEN_STATIC_STREAMS").field("Hdr", &self.Hdr).field("PipeHandle", &self.PipeHandle).field("NumberOfStreams", &self.NumberOfStreams).field("StreamInfoVersion", &self.StreamInfoVersion).field("StreamInfoSize", &self.StreamInfoSize).field("Streams", &self.Streams).finish() } } impl ::core::cmp::PartialEq for _URB_OPEN_STATIC_STREAMS { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.PipeHandle == other.PipeHandle && self.NumberOfStreams == other.NumberOfStreams && self.StreamInfoVersion == other.StreamInfoVersion && self.StreamInfoSize == other.StreamInfoSize && self.Streams == other.Streams } } impl ::core::cmp::Eq for _URB_OPEN_STATIC_STREAMS {} unsafe impl ::windows::core::Abi for _URB_OPEN_STATIC_STREAMS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_OS_FEATURE_DESCRIPTOR_REQUEST { pub Hdr: _URB_HEADER, pub Reserved: *mut ::core::ffi::c_void, pub Reserved0: u32, pub TransferBufferLength: u32, pub TransferBuffer: *mut ::core::ffi::c_void, pub TransferBufferMDL: *mut ::core::ffi::c_void, pub UrbLink: *mut URB, pub hca: _URB_HCD_AREA, pub _bitfield: u8, pub Reserved2: u8, pub InterfaceNumber: u8, pub MS_PageIndex: u8, pub MS_FeatureDescriptorIndex: u16, pub Reserved3: u16, } impl _URB_OS_FEATURE_DESCRIPTOR_REQUEST {} impl ::core::default::Default for _URB_OS_FEATURE_DESCRIPTOR_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_OS_FEATURE_DESCRIPTOR_REQUEST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_OS_FEATURE_DESCRIPTOR_REQUEST") .field("Hdr", &self.Hdr) .field("Reserved", &self.Reserved) .field("Reserved0", &self.Reserved0) .field("TransferBufferLength", &self.TransferBufferLength) .field("TransferBuffer", &self.TransferBuffer) .field("TransferBufferMDL", &self.TransferBufferMDL) .field("UrbLink", &self.UrbLink) .field("hca", &self.hca) .field("_bitfield", &self._bitfield) .field("Reserved2", &self.Reserved2) .field("InterfaceNumber", &self.InterfaceNumber) .field("MS_PageIndex", &self.MS_PageIndex) .field("MS_FeatureDescriptorIndex", &self.MS_FeatureDescriptorIndex) .field("Reserved3", &self.Reserved3) .finish() } } impl ::core::cmp::PartialEq for _URB_OS_FEATURE_DESCRIPTOR_REQUEST { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.Reserved == other.Reserved && self.Reserved0 == other.Reserved0 && self.TransferBufferLength == other.TransferBufferLength && self.TransferBuffer == other.TransferBuffer && self.TransferBufferMDL == other.TransferBufferMDL && self.UrbLink == other.UrbLink && self.hca == other.hca && self._bitfield == other._bitfield && self.Reserved2 == other.Reserved2 && self.InterfaceNumber == other.InterfaceNumber && self.MS_PageIndex == other.MS_PageIndex && self.MS_FeatureDescriptorIndex == other.MS_FeatureDescriptorIndex && self.Reserved3 == other.Reserved3 } } impl ::core::cmp::Eq for _URB_OS_FEATURE_DESCRIPTOR_REQUEST {} unsafe impl ::windows::core::Abi for _URB_OS_FEATURE_DESCRIPTOR_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_PIPE_REQUEST { pub Hdr: _URB_HEADER, pub PipeHandle: *mut ::core::ffi::c_void, pub Reserved: u32, } impl _URB_PIPE_REQUEST {} impl ::core::default::Default for _URB_PIPE_REQUEST { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_PIPE_REQUEST { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_PIPE_REQUEST").field("Hdr", &self.Hdr).field("PipeHandle", &self.PipeHandle).field("Reserved", &self.Reserved).finish() } } impl ::core::cmp::PartialEq for _URB_PIPE_REQUEST { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.PipeHandle == other.PipeHandle && self.Reserved == other.Reserved } } impl ::core::cmp::Eq for _URB_PIPE_REQUEST {} unsafe impl ::windows::core::Abi for _URB_PIPE_REQUEST { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_SELECT_CONFIGURATION { pub Hdr: _URB_HEADER, pub ConfigurationDescriptor: *mut USB_CONFIGURATION_DESCRIPTOR, pub ConfigurationHandle: *mut ::core::ffi::c_void, pub Interface: USBD_INTERFACE_INFORMATION, } impl _URB_SELECT_CONFIGURATION {} impl ::core::default::Default for _URB_SELECT_CONFIGURATION { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_SELECT_CONFIGURATION { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_SELECT_CONFIGURATION").field("Hdr", &self.Hdr).field("ConfigurationDescriptor", &self.ConfigurationDescriptor).field("ConfigurationHandle", &self.ConfigurationHandle).field("Interface", &self.Interface).finish() } } impl ::core::cmp::PartialEq for _URB_SELECT_CONFIGURATION { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.ConfigurationDescriptor == other.ConfigurationDescriptor && self.ConfigurationHandle == other.ConfigurationHandle && self.Interface == other.Interface } } impl ::core::cmp::Eq for _URB_SELECT_CONFIGURATION {} unsafe impl ::windows::core::Abi for _URB_SELECT_CONFIGURATION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_SELECT_INTERFACE { pub Hdr: _URB_HEADER, pub ConfigurationHandle: *mut ::core::ffi::c_void, pub Interface: USBD_INTERFACE_INFORMATION, } impl _URB_SELECT_INTERFACE {} impl ::core::default::Default for _URB_SELECT_INTERFACE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_SELECT_INTERFACE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_SELECT_INTERFACE").field("Hdr", &self.Hdr).field("ConfigurationHandle", &self.ConfigurationHandle).field("Interface", &self.Interface).finish() } } impl ::core::cmp::PartialEq for _URB_SELECT_INTERFACE { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.ConfigurationHandle == other.ConfigurationHandle && self.Interface == other.Interface } } impl ::core::cmp::Eq for _URB_SELECT_INTERFACE {} unsafe impl ::windows::core::Abi for _URB_SELECT_INTERFACE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct _URB_SET_FRAME_LENGTH { pub Hdr: _URB_HEADER, pub FrameLengthDelta: i32, } impl _URB_SET_FRAME_LENGTH {} impl ::core::default::Default for _URB_SET_FRAME_LENGTH { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for _URB_SET_FRAME_LENGTH { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("_URB_SET_FRAME_LENGTH").field("Hdr", &self.Hdr).field("FrameLengthDelta", &self.FrameLengthDelta).finish() } } impl ::core::cmp::PartialEq for _URB_SET_FRAME_LENGTH { fn eq(&self, other: &Self) -> bool { self.Hdr == other.Hdr && self.FrameLengthDelta == other.FrameLengthDelta } } impl ::core::cmp::Eq for _URB_SET_FRAME_LENGTH {} unsafe impl ::windows::core::Abi for _URB_SET_FRAME_LENGTH { type Abi = Self; }
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct CIMTYPE_ENUMERATION(pub i32); pub const CIM_ILLEGAL: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(4095i32); pub const CIM_EMPTY: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(0i32); pub const CIM_SINT8: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(16i32); pub const CIM_UINT8: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(17i32); pub const CIM_SINT16: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(2i32); pub const CIM_UINT16: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(18i32); pub const CIM_SINT32: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(3i32); pub const CIM_UINT32: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(19i32); pub const CIM_SINT64: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(20i32); pub const CIM_UINT64: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(21i32); pub const CIM_REAL32: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(4i32); pub const CIM_REAL64: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(5i32); pub const CIM_BOOLEAN: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(11i32); pub const CIM_STRING: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(8i32); pub const CIM_DATETIME: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(101i32); pub const CIM_REFERENCE: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(102i32); pub const CIM_CHAR16: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(103i32); pub const CIM_OBJECT: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(13i32); pub const CIM_FLAG_ARRAY: CIMTYPE_ENUMERATION = CIMTYPE_ENUMERATION(8192i32); impl ::core::convert::From<i32> for CIMTYPE_ENUMERATION { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for CIMTYPE_ENUMERATION { type Abi = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IEnumWbemClassObject(pub ::windows::core::IUnknown); impl IEnumWbemClassObject { pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Next(&self, ltimeout: i32, ucount: u32, apobjects: *mut ::core::option::Option<IWbemClassObject>, pureturned: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(ltimeout), ::core::mem::transmute(ucount), ::core::mem::transmute(apobjects), ::core::mem::transmute(pureturned)).ok() } pub unsafe fn NextAsync<'a, Param1: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, ucount: u32, psink: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(ucount), psink.into_param().abi()).ok() } pub unsafe fn Clone(&self) -> ::windows::core::Result<IEnumWbemClassObject> { let mut result__: <IEnumWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IEnumWbemClassObject>(result__) } pub unsafe fn Skip(&self, ltimeout: i32, ncount: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(ltimeout), ::core::mem::transmute(ncount)).ok() } } unsafe impl ::windows::core::Interface for IEnumWbemClassObject { type Vtable = IEnumWbemClassObject_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x027947e1_d731_11ce_a357_000000000001); } impl ::core::convert::From<IEnumWbemClassObject> for ::windows::core::IUnknown { fn from(value: IEnumWbemClassObject) -> Self { value.0 } } impl ::core::convert::From<&IEnumWbemClassObject> for ::windows::core::IUnknown { fn from(value: &IEnumWbemClassObject) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IEnumWbemClassObject { 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 IEnumWbemClassObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IEnumWbemClassObject_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) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ltimeout: i32, ucount: u32, apobjects: *mut ::windows::core::RawPtr, pureturned: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ucount: u32, psink: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppenum: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ltimeout: i32, ncount: u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMofCompiler(pub ::windows::core::IUnknown); impl IMofCompiler { #[cfg(feature = "Win32_Foundation")] pub unsafe fn CompileFile<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::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>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>( &self, filename: Param0, serverandnamespace: Param1, user: Param2, authority: Param3, password: Param4, loptionflags: i32, lclassflags: i32, linstanceflags: i32, pinfo: *mut WBEM_COMPILE_STATUS_INFO, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)( ::core::mem::transmute_copy(self), filename.into_param().abi(), serverandnamespace.into_param().abi(), user.into_param().abi(), authority.into_param().abi(), password.into_param().abi(), ::core::mem::transmute(loptionflags), ::core::mem::transmute(lclassflags), ::core::mem::transmute(linstanceflags), ::core::mem::transmute(pinfo), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CompileBuffer<'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>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>( &self, buffsize: i32, pbuffer: *const u8, serverandnamespace: Param2, user: Param3, authority: Param4, password: Param5, loptionflags: i32, lclassflags: i32, linstanceflags: i32, pinfo: *mut WBEM_COMPILE_STATUS_INFO, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)( ::core::mem::transmute_copy(self), ::core::mem::transmute(buffsize), ::core::mem::transmute(pbuffer), serverandnamespace.into_param().abi(), user.into_param().abi(), authority.into_param().abi(), password.into_param().abi(), ::core::mem::transmute(loptionflags), ::core::mem::transmute(lclassflags), ::core::mem::transmute(linstanceflags), ::core::mem::transmute(pinfo), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateBMOF<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, textfilename: Param0, bmoffilename: Param1, serverandnamespace: Param2, loptionflags: i32, lclassflags: i32, linstanceflags: i32, pinfo: *mut WBEM_COMPILE_STATUS_INFO) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), textfilename.into_param().abi(), bmoffilename.into_param().abi(), serverandnamespace.into_param().abi(), ::core::mem::transmute(loptionflags), ::core::mem::transmute(lclassflags), ::core::mem::transmute(linstanceflags), ::core::mem::transmute(pinfo)).ok() } } unsafe impl ::windows::core::Interface for IMofCompiler { type Vtable = IMofCompiler_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6daf974e_2e37_11d2_aec9_00c04fb68820); } impl ::core::convert::From<IMofCompiler> for ::windows::core::IUnknown { fn from(value: IMofCompiler) -> Self { value.0 } } impl ::core::convert::From<&IMofCompiler> for ::windows::core::IUnknown { fn from(value: &IMofCompiler) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMofCompiler { 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 IMofCompiler { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IMofCompiler_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, filename: super::super::Foundation::PWSTR, serverandnamespace: super::super::Foundation::PWSTR, user: super::super::Foundation::PWSTR, authority: super::super::Foundation::PWSTR, password: super::super::Foundation::PWSTR, loptionflags: i32, lclassflags: i32, linstanceflags: i32, pinfo: *mut WBEM_COMPILE_STATUS_INFO) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, buffsize: i32, pbuffer: *const u8, serverandnamespace: super::super::Foundation::PWSTR, user: super::super::Foundation::PWSTR, authority: super::super::Foundation::PWSTR, password: super::super::Foundation::PWSTR, loptionflags: i32, lclassflags: i32, linstanceflags: i32, pinfo: *mut WBEM_COMPILE_STATUS_INFO) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, textfilename: super::super::Foundation::PWSTR, bmoffilename: super::super::Foundation::PWSTR, serverandnamespace: super::super::Foundation::PWSTR, loptionflags: i32, lclassflags: i32, linstanceflags: i32, pinfo: *mut WBEM_COMPILE_STATUS_INFO) -> ::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 ISWbemDateTime(pub ::windows::core::IUnknown); impl ISWbemDateTime { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Value(&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 SetValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strvalue: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), strvalue.into_param().abi()).ok() } pub unsafe fn Year(&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 SetYear(&self, iyear: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(iyear)).ok() } pub unsafe fn YearSpecified(&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 SetYearSpecified(&self, byearspecified: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(byearspecified)).ok() } pub unsafe fn Month(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMonth(&self, imonth: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(imonth)).ok() } pub unsafe fn MonthSpecified(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetMonthSpecified(&self, bmonthspecified: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), ::core::mem::transmute(bmonthspecified)).ok() } pub unsafe fn Day(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetDay(&self, iday: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(iday)).ok() } pub unsafe fn DaySpecified(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetDaySpecified(&self, bdayspecified: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(bdayspecified)).ok() } pub unsafe fn Hours(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetHours(&self, ihours: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(ihours)).ok() } pub unsafe fn HoursSpecified(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetHoursSpecified(&self, bhoursspecified: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(bhoursspecified)).ok() } pub unsafe fn Minutes(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMinutes(&self, iminutes: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), ::core::mem::transmute(iminutes)).ok() } pub unsafe fn MinutesSpecified(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetMinutesSpecified(&self, bminutesspecified: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), ::core::mem::transmute(bminutesspecified)).ok() } pub unsafe fn Seconds(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetSeconds(&self, iseconds: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), ::core::mem::transmute(iseconds)).ok() } pub unsafe fn SecondsSpecified(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetSecondsSpecified(&self, bsecondsspecified: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), ::core::mem::transmute(bsecondsspecified)).ok() } pub unsafe fn Microseconds(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMicroseconds(&self, imicroseconds: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), ::core::mem::transmute(imicroseconds)).ok() } pub unsafe fn MicrosecondsSpecified(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetMicrosecondsSpecified(&self, bmicrosecondsspecified: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), ::core::mem::transmute(bmicrosecondsspecified)).ok() } pub unsafe fn UTC(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetUTC(&self, iutc: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), ::core::mem::transmute(iutc)).ok() } pub unsafe fn UTCSpecified(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetUTCSpecified(&self, butcspecified: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), ::core::mem::transmute(butcspecified)).ok() } pub unsafe fn IsInterval(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).41)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetIsInterval(&self, bisinterval: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), ::core::mem::transmute(bisinterval)).ok() } pub unsafe fn GetVarDate(&self, bislocal: i16) -> ::windows::core::Result<f64> { let mut result__: <f64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).43)(::core::mem::transmute_copy(self), ::core::mem::transmute(bislocal), &mut result__).from_abi::<f64>(result__) } pub unsafe fn SetVarDate(&self, dvardate: f64, bislocal: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).44)(::core::mem::transmute_copy(self), ::core::mem::transmute(dvardate), ::core::mem::transmute(bislocal)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetFileTime(&self, bislocal: i16) -> ::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).45)(::core::mem::transmute_copy(self), ::core::mem::transmute(bislocal), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetFileTime<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strfiletime: Param0, bislocal: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).46)(::core::mem::transmute_copy(self), strfiletime.into_param().abi(), ::core::mem::transmute(bislocal)).ok() } } unsafe impl ::windows::core::Interface for ISWbemDateTime { type Vtable = ISWbemDateTime_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5e97458a_cf77_11d3_b38f_00105a1f473a); } impl ::core::convert::From<ISWbemDateTime> for ::windows::core::IUnknown { fn from(value: ISWbemDateTime) -> Self { value.0 } } impl ::core::convert::From<&ISWbemDateTime> for ::windows::core::IUnknown { fn from(value: &ISWbemDateTime) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemDateTime { 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 ISWbemDateTime { 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<ISWbemDateTime> for super::Com::IDispatch { fn from(value: ISWbemDateTime) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemDateTime> for super::Com::IDispatch { fn from(value: &ISWbemDateTime) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemDateTime { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemDateTime { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemDateTime_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, strvalue: *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, strvalue: ::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, iyear: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iyear: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, byearspecified: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, byearspecified: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, imonth: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, imonth: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bmonthspecified: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bmonthspecified: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iday: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iday: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bdayspecified: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bdayspecified: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ihours: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ihours: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bhoursspecified: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bhoursspecified: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iminutes: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iminutes: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bminutesspecified: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bminutesspecified: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iseconds: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iseconds: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bsecondsspecified: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bsecondsspecified: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, imicroseconds: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, imicroseconds: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bmicrosecondsspecified: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bmicrosecondsspecified: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iutc: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iutc: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, butcspecified: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, butcspecified: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bisinterval: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bisinterval: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bislocal: i16, dvardate: *mut f64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dvardate: f64, bislocal: i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bislocal: i16, strfiletime: *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, strfiletime: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bislocal: i16) -> ::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 ISWbemEventSource(pub ::windows::core::IUnknown); impl ISWbemEventSource { pub unsafe fn NextEvent(&self, itimeoutms: i32) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(itimeoutms), &mut result__).from_abi::<ISWbemObject>(result__) } pub unsafe fn Security_(&self) -> ::windows::core::Result<ISWbemSecurity> { let mut result__: <ISWbemSecurity as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemSecurity>(result__) } } unsafe impl ::windows::core::Interface for ISWbemEventSource { type Vtable = ISWbemEventSource_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x27d54d92_0ebe_11d2_8b22_00600806d9b6); } impl ::core::convert::From<ISWbemEventSource> for ::windows::core::IUnknown { fn from(value: ISWbemEventSource) -> Self { value.0 } } impl ::core::convert::From<&ISWbemEventSource> for ::windows::core::IUnknown { fn from(value: &ISWbemEventSource) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemEventSource { 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 ISWbemEventSource { 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<ISWbemEventSource> for super::Com::IDispatch { fn from(value: ISWbemEventSource) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemEventSource> for super::Com::IDispatch { fn from(value: &ISWbemEventSource) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemEventSource { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemEventSource { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemEventSource_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, itimeoutms: i32, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsecurity: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemLastError(pub ::windows::core::IUnknown); impl ISWbemLastError { pub unsafe fn GetTypeInfoCount(&self) -> ::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), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::Com::ITypeInfo> { let mut result__: <super::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::Com::DISPPARAMS, pvarresult: *mut super::Com::VARIANT, pexcepinfo: *mut super::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Put_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<ISWbemObjectPath> { let mut result__: <ISWbemObjectPath as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectPath>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn PutAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, iflags: i32, objwbemnamedvalueset: Param2, objwbemasynccontext: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Delete_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn DeleteAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, iflags: i32, objwbemnamedvalueset: Param2, objwbemasynccontext: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Instances_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn InstancesAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, iflags: i32, objwbemnamedvalueset: Param2, objwbemasynccontext: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Subclasses_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SubclassesAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, iflags: i32, objwbemnamedvalueset: Param2, objwbemasynccontext: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn Associators_< '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>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param9: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, strassocclass: Param0, strresultclass: Param1, strresultrole: Param2, strrole: Param3, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: Param6, strrequiredqualifier: Param7, iflags: i32, objwbemnamedvalueset: Param9, ) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)( ::core::mem::transmute_copy(self), strassocclass.into_param().abi(), strresultclass.into_param().abi(), strresultrole.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredassocqualifier.into_param().abi(), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__, ) .from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn AssociatorsAsync_< 'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param8: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param10: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param11: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, objwbemsink: Param0, strassocclass: Param1, strresultclass: Param2, strresultrole: Param3, strrole: Param4, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: Param7, strrequiredqualifier: Param8, iflags: i32, objwbemnamedvalueset: Param10, objwbemasynccontext: Param11, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)( ::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strassocclass.into_param().abi(), strresultclass.into_param().abi(), strresultrole.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredassocqualifier.into_param().abi(), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi(), ) .ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn References_<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param6: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, strresultclass: Param0, strrole: Param1, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: Param4, iflags: i32, objwbemnamedvalueset: Param6, ) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), strresultclass.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ReferencesAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param8: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, objwbemsink: Param0, strresultclass: Param1, strrole: Param2, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: Param5, iflags: i32, objwbemnamedvalueset: Param7, objwbemasynccontext: Param8, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)( ::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strresultclass.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi(), ) .ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecMethod_<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strmethodname: Param0, objwbeminparameters: Param1, iflags: i32, objwbemnamedvalueset: Param3) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), strmethodname.into_param().abi(), objwbeminparameters.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecMethodAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param5: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, objwbemsink: Param0, strmethodname: Param1, objwbeminparameters: Param2, iflags: i32, objwbemnamedvalueset: Param4, objwbemasynccontext: Param5, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strmethodname.into_param().abi(), objwbeminparameters.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } pub unsafe fn Clone_(&self) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetObjectText_(&self, iflags: i32) -> ::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).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn SpawnDerivedClass_(&self, iflags: i32) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemObject>(result__) } pub unsafe fn SpawnInstance_(&self, iflags: i32) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CompareTo_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemobject: Param0, iflags: i32) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), objwbemobject.into_param().abi(), ::core::mem::transmute(iflags), &mut result__).from_abi::<i16>(result__) } pub unsafe fn Qualifiers_(&self) -> ::windows::core::Result<ISWbemQualifierSet> { let mut result__: <ISWbemQualifierSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemQualifierSet>(result__) } pub unsafe fn Properties_(&self) -> ::windows::core::Result<ISWbemPropertySet> { let mut result__: <ISWbemPropertySet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemPropertySet>(result__) } pub unsafe fn Methods_(&self) -> ::windows::core::Result<ISWbemMethodSet> { let mut result__: <ISWbemMethodSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemMethodSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Derivation_(&self) -> ::windows::core::Result<super::Com::VARIANT> { let mut result__: <super::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn Path_(&self) -> ::windows::core::Result<ISWbemObjectPath> { let mut result__: <ISWbemObjectPath as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemObjectPath>(result__) } pub unsafe fn Security_(&self) -> ::windows::core::Result<ISWbemSecurity> { let mut result__: <ISWbemSecurity as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemSecurity>(result__) } } unsafe impl ::windows::core::Interface for ISWbemLastError { type Vtable = ISWbemLastError_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd962db84_d4bb_11d1_8b09_00600806d9b6); } impl ::core::convert::From<ISWbemLastError> for ::windows::core::IUnknown { fn from(value: ISWbemLastError) -> Self { value.0 } } impl ::core::convert::From<&ISWbemLastError> for ::windows::core::IUnknown { fn from(value: &ISWbemLastError) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemLastError { 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 ISWbemLastError { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ISWbemLastError> for ISWbemObject { fn from(value: ISWbemLastError) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&ISWbemLastError> for ISWbemObject { fn from(value: &ISWbemLastError) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, ISWbemObject> for ISWbemLastError { fn into_param(self) -> ::windows::core::Param<'a, ISWbemObject> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, ISWbemObject> for &ISWbemLastError { fn into_param(self) -> ::windows::core::Param<'a, ISWbemObject> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<ISWbemLastError> for super::Com::IDispatch { fn from(value: ISWbemLastError) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemLastError> for super::Com::IDispatch { fn from(value: &ISWbemLastError) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemLastError { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemLastError { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemLastError_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectpath: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, strassocclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strassocclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strmethodname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, objwbeminparameters: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemoutparameters: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strmethodname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, objwbeminparameters: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, strobjecttext: *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, iflags: i32, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemobject: ::windows::core::RawPtr, iflags: i32, bresult: *mut i16) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemqualifierset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbempropertyset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemmethodset: *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, strclassnamearray: *mut ::core::mem::ManuallyDrop<super::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, objwbemobjectpath: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsecurity: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemLocator(pub ::windows::core::IUnknown); impl ISWbemLocator { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ConnectServer< '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>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, strserver: Param0, strnamespace: Param1, struser: Param2, strpassword: Param3, strlocale: Param4, strauthority: Param5, isecurityflags: i32, objwbemnamedvalueset: Param7, ) -> ::windows::core::Result<ISWbemServices> { let mut result__: <ISWbemServices as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)( ::core::mem::transmute_copy(self), strserver.into_param().abi(), strnamespace.into_param().abi(), struser.into_param().abi(), strpassword.into_param().abi(), strlocale.into_param().abi(), strauthority.into_param().abi(), ::core::mem::transmute(isecurityflags), objwbemnamedvalueset.into_param().abi(), &mut result__, ) .from_abi::<ISWbemServices>(result__) } pub unsafe fn Security_(&self) -> ::windows::core::Result<ISWbemSecurity> { let mut result__: <ISWbemSecurity as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemSecurity>(result__) } } unsafe impl ::windows::core::Interface for ISWbemLocator { type Vtable = ISWbemLocator_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x76a6415b_cb41_11d1_8b02_00600806d9b6); } impl ::core::convert::From<ISWbemLocator> for ::windows::core::IUnknown { fn from(value: ISWbemLocator) -> Self { value.0 } } impl ::core::convert::From<&ISWbemLocator> for ::windows::core::IUnknown { fn from(value: &ISWbemLocator) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemLocator { 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 ISWbemLocator { 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<ISWbemLocator> for super::Com::IDispatch { fn from(value: ISWbemLocator) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemLocator> for super::Com::IDispatch { fn from(value: &ISWbemLocator) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemLocator { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemLocator { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemLocator_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::Com::EXCEPINFO>, puargerr: *mut u32) -> ::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"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, strserver: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strnamespace: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, struser: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strlocale: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strauthority: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, isecurityflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemservices: *mut ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsecurity: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemMethod(pub ::windows::core::IUnknown); impl ISWbemMethod { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&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 Origin(&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 InParameters(&self) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemObject>(result__) } pub unsafe fn OutParameters(&self) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemObject>(result__) } pub unsafe fn Qualifiers_(&self) -> ::windows::core::Result<ISWbemQualifierSet> { let mut result__: <ISWbemQualifierSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemQualifierSet>(result__) } } unsafe impl ::windows::core::Interface for ISWbemMethod { type Vtable = ISWbemMethod_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x422e8e90_d955_11d1_8b09_00600806d9b6); } impl ::core::convert::From<ISWbemMethod> for ::windows::core::IUnknown { fn from(value: ISWbemMethod) -> Self { value.0 } } impl ::core::convert::From<&ISWbemMethod> for ::windows::core::IUnknown { fn from(value: &ISWbemMethod) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemMethod { 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 ISWbemMethod { 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<ISWbemMethod> for super::Com::IDispatch { fn from(value: ISWbemMethod) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemMethod> for super::Com::IDispatch { fn from(value: &ISWbemMethod) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemMethod { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemMethod { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemMethod_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, strname: *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, strorigin: *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, objwbeminparameters: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemoutparameters: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemqualifierset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemMethodSet(pub ::windows::core::IUnknown); impl ISWbemMethodSet { 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(feature = "Win32_Foundation")] pub unsafe fn Item<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strname: Param0, iflags: i32) -> ::windows::core::Result<ISWbemMethod> { let mut result__: <ISWbemMethod as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), strname.into_param().abi(), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemMethod>(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__) } } unsafe impl ::windows::core::Interface for ISWbemMethodSet { type Vtable = ISWbemMethodSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc93ba292_d955_11d1_8b09_00600806d9b6); } impl ::core::convert::From<ISWbemMethodSet> for ::windows::core::IUnknown { fn from(value: ISWbemMethodSet) -> Self { value.0 } } impl ::core::convert::From<&ISWbemMethodSet> for ::windows::core::IUnknown { fn from(value: &ISWbemMethodSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemMethodSet { 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 ISWbemMethodSet { 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<ISWbemMethodSet> for super::Com::IDispatch { fn from(value: ISWbemMethodSet) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemMethodSet> for super::Com::IDispatch { fn from(value: &ISWbemMethodSet) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemMethodSet { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemMethodSet { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemMethodSet_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, punk: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemmethod: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, icount: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemNamedValue(pub ::windows::core::IUnknown); impl ISWbemNamedValue { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Value(&self) -> ::windows::core::Result<super::Com::VARIANT> { let mut result__: <super::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetValue(&self, varvalue: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(varvalue)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&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).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } } unsafe impl ::windows::core::Interface for ISWbemNamedValue { type Vtable = ISWbemNamedValue_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x76a64164_cb41_11d1_8b02_00600806d9b6); } impl ::core::convert::From<ISWbemNamedValue> for ::windows::core::IUnknown { fn from(value: ISWbemNamedValue) -> Self { value.0 } } impl ::core::convert::From<&ISWbemNamedValue> for ::windows::core::IUnknown { fn from(value: &ISWbemNamedValue) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemNamedValue { 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 ISWbemNamedValue { 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<ISWbemNamedValue> for super::Com::IDispatch { fn from(value: ISWbemNamedValue) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemNamedValue> for super::Com::IDispatch { fn from(value: &ISWbemNamedValue) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemNamedValue { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemNamedValue { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemNamedValue_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::Com::EXCEPINFO>, puargerr: *mut u32) -> ::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, varvalue: *mut ::core::mem::ManuallyDrop<super::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, varvalue: *const ::core::mem::ManuallyDrop<super::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, strname: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::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 ISWbemNamedValueSet(pub ::windows::core::IUnknown); impl ISWbemNamedValueSet { 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(feature = "Win32_Foundation")] pub unsafe fn Item<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strname: Param0, iflags: i32) -> ::windows::core::Result<ISWbemNamedValue> { let mut result__: <ISWbemNamedValue as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), strname.into_param().abi(), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemNamedValue>(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__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Add<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strname: Param0, varvalue: *const super::Com::VARIANT, iflags: i32) -> ::windows::core::Result<ISWbemNamedValue> { let mut result__: <ISWbemNamedValue as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), strname.into_param().abi(), ::core::mem::transmute(varvalue), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemNamedValue>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Remove<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strname: Param0, iflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), strname.into_param().abi(), ::core::mem::transmute(iflags)).ok() } pub unsafe fn Clone(&self) -> ::windows::core::Result<ISWbemNamedValueSet> { let mut result__: <ISWbemNamedValueSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemNamedValueSet>(result__) } pub unsafe fn DeleteAll(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for ISWbemNamedValueSet { type Vtable = ISWbemNamedValueSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcf2376ea_ce8c_11d1_8b05_00600806d9b6); } impl ::core::convert::From<ISWbemNamedValueSet> for ::windows::core::IUnknown { fn from(value: ISWbemNamedValueSet) -> Self { value.0 } } impl ::core::convert::From<&ISWbemNamedValueSet> for ::windows::core::IUnknown { fn from(value: &ISWbemNamedValueSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemNamedValueSet { 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 ISWbemNamedValueSet { 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<ISWbemNamedValueSet> for super::Com::IDispatch { fn from(value: ISWbemNamedValueSet) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemNamedValueSet> for super::Com::IDispatch { fn from(value: &ISWbemNamedValueSet) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemNamedValueSet { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemNamedValueSet { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemNamedValueSet_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, punk: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalue: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, icount: *mut i32) -> ::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, strname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, varvalue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, iflags: i32, objwbemnamedvalue: *mut ::windows::core::RawPtr) -> ::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, strname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemnamedvalueset: *mut ::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 ISWbemObject(pub ::windows::core::IUnknown); impl ISWbemObject { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Put_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<ISWbemObjectPath> { let mut result__: <ISWbemObjectPath as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectPath>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn PutAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, iflags: i32, objwbemnamedvalueset: Param2, objwbemasynccontext: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Delete_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn DeleteAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, iflags: i32, objwbemnamedvalueset: Param2, objwbemasynccontext: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Instances_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn InstancesAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, iflags: i32, objwbemnamedvalueset: Param2, objwbemasynccontext: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Subclasses_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SubclassesAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, iflags: i32, objwbemnamedvalueset: Param2, objwbemasynccontext: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn Associators_< '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>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param9: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, strassocclass: Param0, strresultclass: Param1, strresultrole: Param2, strrole: Param3, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: Param6, strrequiredqualifier: Param7, iflags: i32, objwbemnamedvalueset: Param9, ) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)( ::core::mem::transmute_copy(self), strassocclass.into_param().abi(), strresultclass.into_param().abi(), strresultrole.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredassocqualifier.into_param().abi(), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__, ) .from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn AssociatorsAsync_< 'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param8: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param10: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param11: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, objwbemsink: Param0, strassocclass: Param1, strresultclass: Param2, strresultrole: Param3, strrole: Param4, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: Param7, strrequiredqualifier: Param8, iflags: i32, objwbemnamedvalueset: Param10, objwbemasynccontext: Param11, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)( ::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strassocclass.into_param().abi(), strresultclass.into_param().abi(), strresultrole.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredassocqualifier.into_param().abi(), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi(), ) .ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn References_<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param6: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, strresultclass: Param0, strrole: Param1, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: Param4, iflags: i32, objwbemnamedvalueset: Param6, ) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), strresultclass.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ReferencesAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param8: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, objwbemsink: Param0, strresultclass: Param1, strrole: Param2, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: Param5, iflags: i32, objwbemnamedvalueset: Param7, objwbemasynccontext: Param8, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)( ::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strresultclass.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi(), ) .ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecMethod_<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strmethodname: Param0, objwbeminparameters: Param1, iflags: i32, objwbemnamedvalueset: Param3) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), strmethodname.into_param().abi(), objwbeminparameters.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecMethodAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param5: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, objwbemsink: Param0, strmethodname: Param1, objwbeminparameters: Param2, iflags: i32, objwbemnamedvalueset: Param4, objwbemasynccontext: Param5, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strmethodname.into_param().abi(), objwbeminparameters.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } pub unsafe fn Clone_(&self) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetObjectText_(&self, iflags: i32) -> ::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).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn SpawnDerivedClass_(&self, iflags: i32) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemObject>(result__) } pub unsafe fn SpawnInstance_(&self, iflags: i32) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CompareTo_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemobject: Param0, iflags: i32) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), objwbemobject.into_param().abi(), ::core::mem::transmute(iflags), &mut result__).from_abi::<i16>(result__) } pub unsafe fn Qualifiers_(&self) -> ::windows::core::Result<ISWbemQualifierSet> { let mut result__: <ISWbemQualifierSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemQualifierSet>(result__) } pub unsafe fn Properties_(&self) -> ::windows::core::Result<ISWbemPropertySet> { let mut result__: <ISWbemPropertySet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemPropertySet>(result__) } pub unsafe fn Methods_(&self) -> ::windows::core::Result<ISWbemMethodSet> { let mut result__: <ISWbemMethodSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemMethodSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Derivation_(&self) -> ::windows::core::Result<super::Com::VARIANT> { let mut result__: <super::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn Path_(&self) -> ::windows::core::Result<ISWbemObjectPath> { let mut result__: <ISWbemObjectPath as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemObjectPath>(result__) } pub unsafe fn Security_(&self) -> ::windows::core::Result<ISWbemSecurity> { let mut result__: <ISWbemSecurity as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemSecurity>(result__) } } unsafe impl ::windows::core::Interface for ISWbemObject { type Vtable = ISWbemObject_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x76a6415a_cb41_11d1_8b02_00600806d9b6); } impl ::core::convert::From<ISWbemObject> for ::windows::core::IUnknown { fn from(value: ISWbemObject) -> Self { value.0 } } impl ::core::convert::From<&ISWbemObject> for ::windows::core::IUnknown { fn from(value: &ISWbemObject) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemObject { 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 ISWbemObject { 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<ISWbemObject> for super::Com::IDispatch { fn from(value: ISWbemObject) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemObject> for super::Com::IDispatch { fn from(value: &ISWbemObject) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemObject { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemObject { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemObject_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectpath: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, strassocclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strassocclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strmethodname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, objwbeminparameters: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemoutparameters: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strmethodname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, objwbeminparameters: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, strobjecttext: *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, iflags: i32, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemobject: ::windows::core::RawPtr, iflags: i32, bresult: *mut i16) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemqualifierset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbempropertyset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemmethodset: *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, strclassnamearray: *mut ::core::mem::ManuallyDrop<super::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, objwbemobjectpath: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsecurity: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemObjectEx(pub ::windows::core::IUnknown); impl ISWbemObjectEx { pub unsafe fn GetTypeInfoCount(&self) -> ::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), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::Com::ITypeInfo> { let mut result__: <super::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::Com::DISPPARAMS, pvarresult: *mut super::Com::VARIANT, pexcepinfo: *mut super::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Put_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<ISWbemObjectPath> { let mut result__: <ISWbemObjectPath as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectPath>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn PutAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, iflags: i32, objwbemnamedvalueset: Param2, objwbemasynccontext: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Delete_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn DeleteAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, iflags: i32, objwbemnamedvalueset: Param2, objwbemasynccontext: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Instances_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn InstancesAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, iflags: i32, objwbemnamedvalueset: Param2, objwbemasynccontext: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Subclasses_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SubclassesAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, iflags: i32, objwbemnamedvalueset: Param2, objwbemasynccontext: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn Associators_< '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>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param9: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, strassocclass: Param0, strresultclass: Param1, strresultrole: Param2, strrole: Param3, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: Param6, strrequiredqualifier: Param7, iflags: i32, objwbemnamedvalueset: Param9, ) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)( ::core::mem::transmute_copy(self), strassocclass.into_param().abi(), strresultclass.into_param().abi(), strresultrole.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredassocqualifier.into_param().abi(), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__, ) .from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn AssociatorsAsync_< 'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param8: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param10: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param11: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, objwbemsink: Param0, strassocclass: Param1, strresultclass: Param2, strresultrole: Param3, strrole: Param4, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: Param7, strrequiredqualifier: Param8, iflags: i32, objwbemnamedvalueset: Param10, objwbemasynccontext: Param11, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)( ::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strassocclass.into_param().abi(), strresultclass.into_param().abi(), strresultrole.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredassocqualifier.into_param().abi(), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi(), ) .ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn References_<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param6: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, strresultclass: Param0, strrole: Param1, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: Param4, iflags: i32, objwbemnamedvalueset: Param6, ) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), strresultclass.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ReferencesAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param8: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, objwbemsink: Param0, strresultclass: Param1, strrole: Param2, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: Param5, iflags: i32, objwbemnamedvalueset: Param7, objwbemasynccontext: Param8, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)( ::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strresultclass.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi(), ) .ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecMethod_<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strmethodname: Param0, objwbeminparameters: Param1, iflags: i32, objwbemnamedvalueset: Param3) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), strmethodname.into_param().abi(), objwbeminparameters.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecMethodAsync_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param5: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, objwbemsink: Param0, strmethodname: Param1, objwbeminparameters: Param2, iflags: i32, objwbemnamedvalueset: Param4, objwbemasynccontext: Param5, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strmethodname.into_param().abi(), objwbeminparameters.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } pub unsafe fn Clone_(&self) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetObjectText_(&self, iflags: i32) -> ::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).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn SpawnDerivedClass_(&self, iflags: i32) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemObject>(result__) } pub unsafe fn SpawnInstance_(&self, iflags: i32) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CompareTo_<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemobject: Param0, iflags: i32) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), objwbemobject.into_param().abi(), ::core::mem::transmute(iflags), &mut result__).from_abi::<i16>(result__) } pub unsafe fn Qualifiers_(&self) -> ::windows::core::Result<ISWbemQualifierSet> { let mut result__: <ISWbemQualifierSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemQualifierSet>(result__) } pub unsafe fn Properties_(&self) -> ::windows::core::Result<ISWbemPropertySet> { let mut result__: <ISWbemPropertySet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemPropertySet>(result__) } pub unsafe fn Methods_(&self) -> ::windows::core::Result<ISWbemMethodSet> { let mut result__: <ISWbemMethodSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemMethodSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Derivation_(&self) -> ::windows::core::Result<super::Com::VARIANT> { let mut result__: <super::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn Path_(&self) -> ::windows::core::Result<ISWbemObjectPath> { let mut result__: <ISWbemObjectPath as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemObjectPath>(result__) } pub unsafe fn Security_(&self) -> ::windows::core::Result<ISWbemSecurity> { let mut result__: <ISWbemSecurity as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemSecurity>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Refresh_<'a, Param1: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iflags: i32, objwbemnamedvalueset: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi()).ok() } pub unsafe fn SystemProperties_(&self) -> ::windows::core::Result<ISWbemPropertySet> { let mut result__: <ISWbemPropertySet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemPropertySet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn GetText_<'a, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, iobjecttextformat: WbemObjectTextFormatEnum, iflags: i32, objwbemnamedvalueset: Param2) -> ::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).34)(::core::mem::transmute_copy(self), ::core::mem::transmute(iobjecttextformat), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn SetFromText_<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, bstext: Param0, iobjecttextformat: WbemObjectTextFormatEnum, iflags: i32, objwbemnamedvalueset: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), bstext.into_param().abi(), ::core::mem::transmute(iobjecttextformat), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for ISWbemObjectEx { type Vtable = ISWbemObjectEx_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x269ad56a_8a67_4129_bc8c_0506dcfe9880); } impl ::core::convert::From<ISWbemObjectEx> for ::windows::core::IUnknown { fn from(value: ISWbemObjectEx) -> Self { value.0 } } impl ::core::convert::From<&ISWbemObjectEx> for ::windows::core::IUnknown { fn from(value: &ISWbemObjectEx) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemObjectEx { 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 ISWbemObjectEx { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ISWbemObjectEx> for ISWbemObject { fn from(value: ISWbemObjectEx) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&ISWbemObjectEx> for ISWbemObject { fn from(value: &ISWbemObjectEx) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, ISWbemObject> for ISWbemObjectEx { fn into_param(self) -> ::windows::core::Param<'a, ISWbemObject> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, ISWbemObject> for &ISWbemObjectEx { fn into_param(self) -> ::windows::core::Param<'a, ISWbemObject> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<ISWbemObjectEx> for super::Com::IDispatch { fn from(value: ISWbemObjectEx) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemObjectEx> for super::Com::IDispatch { fn from(value: &ISWbemObjectEx) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemObjectEx { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemObjectEx { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemObjectEx_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectpath: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, strassocclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strassocclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strmethodname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, objwbeminparameters: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemoutparameters: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strmethodname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, objwbeminparameters: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, strobjecttext: *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, iflags: i32, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemobject: ::windows::core::RawPtr, iflags: i32, bresult: *mut i16) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemqualifierset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbempropertyset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemmethodset: *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, strclassnamearray: *mut ::core::mem::ManuallyDrop<super::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, objwbemobjectpath: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsecurity: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbempropertyset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iobjecttextformat: WbemObjectTextFormatEnum, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, bstext: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bstext: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iobjecttextformat: WbemObjectTextFormatEnum, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemObjectPath(pub ::windows::core::IUnknown); impl ISWbemObjectPath { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Path(&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 SetPath<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strpath: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), strpath.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn RelPath(&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).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetRelPath<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strrelpath: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), strrelpath.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Server(&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).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServer<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strserver: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), strserver.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Namespace(&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 SetNamespace<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strnamespace: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), strnamespace.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ParentNamespace(&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 DisplayName(&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).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetDisplayName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strdisplayname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), strdisplayname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Class(&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).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetClass<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strclass: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), strclass.into_param().abi()).ok() } pub unsafe fn IsClass(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetAsClass(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn IsSingleton(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetAsSingleton(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Keys(&self) -> ::windows::core::Result<ISWbemNamedValueSet> { let mut result__: <ISWbemNamedValueSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemNamedValueSet>(result__) } pub unsafe fn Security_(&self) -> ::windows::core::Result<ISWbemSecurity> { let mut result__: <ISWbemSecurity as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemSecurity>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Locale(&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).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLocale<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strlocale: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), strlocale.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Authority(&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).28)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetAuthority<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strauthority: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), strauthority.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for ISWbemObjectPath { type Vtable = ISWbemObjectPath_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5791bc27_ce9c_11d1_97bf_0000f81e849c); } impl ::core::convert::From<ISWbemObjectPath> for ::windows::core::IUnknown { fn from(value: ISWbemObjectPath) -> Self { value.0 } } impl ::core::convert::From<&ISWbemObjectPath> for ::windows::core::IUnknown { fn from(value: &ISWbemObjectPath) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemObjectPath { 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 ISWbemObjectPath { 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<ISWbemObjectPath> for super::Com::IDispatch { fn from(value: ISWbemObjectPath) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemObjectPath> for super::Com::IDispatch { fn from(value: &ISWbemObjectPath) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemObjectPath { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemObjectPath { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemObjectPath_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, strpath: *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, strpath: ::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, strrelpath: *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, strrelpath: ::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, strserver: *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, strserver: ::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, strnamespace: *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, strnamespace: ::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, strparentnamespace: *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, strdisplayname: *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, strdisplayname: ::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, strclass: *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, strclass: ::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, bisclass: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bissingleton: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemnamedvalueset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsecurity: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strlocale: *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, strlocale: ::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, strauthority: *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, strauthority: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::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 ISWbemObjectSet(pub ::windows::core::IUnknown); impl ISWbemObjectSet { 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(feature = "Win32_Foundation")] pub unsafe fn Item<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strobjectpath: Param0, iflags: i32) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemObject>(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 Security_(&self) -> ::windows::core::Result<ISWbemSecurity> { let mut result__: <ISWbemSecurity as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemSecurity>(result__) } pub unsafe fn ItemIndex(&self, lindex: i32) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(lindex), &mut result__).from_abi::<ISWbemObject>(result__) } } unsafe impl ::windows::core::Interface for ISWbemObjectSet { type Vtable = ISWbemObjectSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x76a6415f_cb41_11d1_8b02_00600806d9b6); } impl ::core::convert::From<ISWbemObjectSet> for ::windows::core::IUnknown { fn from(value: ISWbemObjectSet) -> Self { value.0 } } impl ::core::convert::From<&ISWbemObjectSet> for ::windows::core::IUnknown { fn from(value: &ISWbemObjectSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemObjectSet { 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 ISWbemObjectSet { 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<ISWbemObjectSet> for super::Com::IDispatch { fn from(value: ISWbemObjectSet) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemObjectSet> for super::Com::IDispatch { fn from(value: &ISWbemObjectSet) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemObjectSet { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemObjectSet { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemObjectSet_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, punk: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, icount: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsecurity: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lindex: i32, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemPrivilege(pub ::windows::core::IUnknown); impl ISWbemPrivilege { pub unsafe fn IsEnabled(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetIsEnabled(&self, bisenabled: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(bisenabled)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&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).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DisplayName(&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).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn Identifier(&self) -> ::windows::core::Result<WbemPrivilegeEnum> { let mut result__: <WbemPrivilegeEnum as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<WbemPrivilegeEnum>(result__) } } unsafe impl ::windows::core::Interface for ISWbemPrivilege { type Vtable = ISWbemPrivilege_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x26ee67bd_5804_11d2_8b4a_00600806d9b6); } impl ::core::convert::From<ISWbemPrivilege> for ::windows::core::IUnknown { fn from(value: ISWbemPrivilege) -> Self { value.0 } } impl ::core::convert::From<&ISWbemPrivilege> for ::windows::core::IUnknown { fn from(value: &ISWbemPrivilege) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemPrivilege { 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 ISWbemPrivilege { 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<ISWbemPrivilege> for super::Com::IDispatch { fn from(value: ISWbemPrivilege) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemPrivilege> for super::Com::IDispatch { fn from(value: &ISWbemPrivilege) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemPrivilege { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemPrivilege { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemPrivilege_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, bisenabled: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bisenabled: i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strdisplayname: *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, strdisplayname: *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, iprivilege: *mut WbemPrivilegeEnum) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemPrivilegeSet(pub ::windows::core::IUnknown); impl ISWbemPrivilegeSet { 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__) } pub unsafe fn Item(&self, iprivilege: WbemPrivilegeEnum) -> ::windows::core::Result<ISWbemPrivilege> { let mut result__: <ISWbemPrivilege as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(iprivilege), &mut result__).from_abi::<ISWbemPrivilege>(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(&self, iprivilege: WbemPrivilegeEnum, bisenabled: i16) -> ::windows::core::Result<ISWbemPrivilege> { let mut result__: <ISWbemPrivilege as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(iprivilege), ::core::mem::transmute(bisenabled), &mut result__).from_abi::<ISWbemPrivilege>(result__) } pub unsafe fn Remove(&self, iprivilege: WbemPrivilegeEnum) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(iprivilege)).ok() } pub unsafe fn DeleteAll(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn AddAsString<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strprivilege: Param0, bisenabled: i16) -> ::windows::core::Result<ISWbemPrivilege> { let mut result__: <ISWbemPrivilege as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), strprivilege.into_param().abi(), ::core::mem::transmute(bisenabled), &mut result__).from_abi::<ISWbemPrivilege>(result__) } } unsafe impl ::windows::core::Interface for ISWbemPrivilegeSet { type Vtable = ISWbemPrivilegeSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x26ee67bf_5804_11d2_8b4a_00600806d9b6); } impl ::core::convert::From<ISWbemPrivilegeSet> for ::windows::core::IUnknown { fn from(value: ISWbemPrivilegeSet) -> Self { value.0 } } impl ::core::convert::From<&ISWbemPrivilegeSet> for ::windows::core::IUnknown { fn from(value: &ISWbemPrivilegeSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemPrivilegeSet { 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 ISWbemPrivilegeSet { 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<ISWbemPrivilegeSet> for super::Com::IDispatch { fn from(value: ISWbemPrivilegeSet) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemPrivilegeSet> for super::Com::IDispatch { fn from(value: &ISWbemPrivilegeSet) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemPrivilegeSet { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemPrivilegeSet { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemPrivilegeSet_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, punk: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iprivilege: WbemPrivilegeEnum, objwbemprivilege: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, icount: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iprivilege: WbemPrivilegeEnum, bisenabled: i16, objwbemprivilege: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iprivilege: WbemPrivilegeEnum) -> ::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, strprivilege: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bisenabled: i16, objwbemprivilege: *mut ::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 ISWbemProperty(pub ::windows::core::IUnknown); impl ISWbemProperty { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Value(&self) -> ::windows::core::Result<super::Com::VARIANT> { let mut result__: <super::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetValue(&self, varvalue: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(varvalue)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&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).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn IsLocal(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Origin(&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).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn CIMType(&self) -> ::windows::core::Result<WbemCimtypeEnum> { let mut result__: <WbemCimtypeEnum as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<WbemCimtypeEnum>(result__) } pub unsafe fn Qualifiers_(&self) -> ::windows::core::Result<ISWbemQualifierSet> { let mut result__: <ISWbemQualifierSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemQualifierSet>(result__) } pub unsafe fn IsArray(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } } unsafe impl ::windows::core::Interface for ISWbemProperty { type Vtable = ISWbemProperty_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1a388f98_d4ba_11d1_8b09_00600806d9b6); } impl ::core::convert::From<ISWbemProperty> for ::windows::core::IUnknown { fn from(value: ISWbemProperty) -> Self { value.0 } } impl ::core::convert::From<&ISWbemProperty> for ::windows::core::IUnknown { fn from(value: &ISWbemProperty) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemProperty { 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 ISWbemProperty { 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<ISWbemProperty> for super::Com::IDispatch { fn from(value: ISWbemProperty) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemProperty> for super::Com::IDispatch { fn from(value: &ISWbemProperty) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemProperty { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemProperty { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemProperty_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::Com::EXCEPINFO>, puargerr: *mut u32) -> ::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, varvalue: *mut ::core::mem::ManuallyDrop<super::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, varvalue: *const ::core::mem::ManuallyDrop<super::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, strname: *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, bislocal: *mut i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strorigin: *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, icimtype: *mut WbemCimtypeEnum) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemqualifierset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bisarray: *mut i16) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemPropertySet(pub ::windows::core::IUnknown); impl ISWbemPropertySet { 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(feature = "Win32_Foundation")] pub unsafe fn Item<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strname: Param0, iflags: i32) -> ::windows::core::Result<ISWbemProperty> { let mut result__: <ISWbemProperty as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), strname.into_param().abi(), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemProperty>(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__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Add<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strname: Param0, icimtype: WbemCimtypeEnum, bisarray: i16, iflags: i32) -> ::windows::core::Result<ISWbemProperty> { let mut result__: <ISWbemProperty as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), strname.into_param().abi(), ::core::mem::transmute(icimtype), ::core::mem::transmute(bisarray), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemProperty>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Remove<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strname: Param0, iflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), strname.into_param().abi(), ::core::mem::transmute(iflags)).ok() } } unsafe impl ::windows::core::Interface for ISWbemPropertySet { type Vtable = ISWbemPropertySet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdea0a7b2_d4ba_11d1_8b09_00600806d9b6); } impl ::core::convert::From<ISWbemPropertySet> for ::windows::core::IUnknown { fn from(value: ISWbemPropertySet) -> Self { value.0 } } impl ::core::convert::From<&ISWbemPropertySet> for ::windows::core::IUnknown { fn from(value: &ISWbemPropertySet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemPropertySet { 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 ISWbemPropertySet { 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<ISWbemPropertySet> for super::Com::IDispatch { fn from(value: ISWbemPropertySet) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemPropertySet> for super::Com::IDispatch { fn from(value: &ISWbemPropertySet) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemPropertySet { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemPropertySet { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemPropertySet_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, punk: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemproperty: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, icount: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, icimtype: WbemCimtypeEnum, bisarray: i16, iflags: i32, objwbemproperty: *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, strname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32) -> ::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 ISWbemQualifier(pub ::windows::core::IUnknown); impl ISWbemQualifier { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Value(&self) -> ::windows::core::Result<super::Com::VARIANT> { let mut result__: <super::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetValue(&self, varvalue: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(varvalue)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Name(&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).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn IsLocal(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn PropagatesToSubclass(&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 SetPropagatesToSubclass(&self, bpropagatestosubclass: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(bpropagatestosubclass)).ok() } pub unsafe fn PropagatesToInstance(&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__) } pub unsafe fn SetPropagatesToInstance(&self, bpropagatestoinstance: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(bpropagatestoinstance)).ok() } pub unsafe fn IsOverridable(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetIsOverridable(&self, bisoverridable: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), ::core::mem::transmute(bisoverridable)).ok() } pub unsafe fn IsAmended(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } } unsafe impl ::windows::core::Interface for ISWbemQualifier { type Vtable = ISWbemQualifier_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x79b05932_d3b7_11d1_8b06_00600806d9b6); } impl ::core::convert::From<ISWbemQualifier> for ::windows::core::IUnknown { fn from(value: ISWbemQualifier) -> Self { value.0 } } impl ::core::convert::From<&ISWbemQualifier> for ::windows::core::IUnknown { fn from(value: &ISWbemQualifier) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemQualifier { 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 ISWbemQualifier { 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<ISWbemQualifier> for super::Com::IDispatch { fn from(value: ISWbemQualifier) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemQualifier> for super::Com::IDispatch { fn from(value: &ISWbemQualifier) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemQualifier { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemQualifier { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemQualifier_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::Com::EXCEPINFO>, puargerr: *mut u32) -> ::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, varvalue: *mut ::core::mem::ManuallyDrop<super::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, varvalue: *const ::core::mem::ManuallyDrop<super::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, strname: *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, bislocal: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bpropagatestosubclass: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bpropagatestosubclass: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bpropagatestoinstance: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bpropagatestoinstance: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bisoverridable: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bisoverridable: i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bisamended: *mut i16) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemQualifierSet(pub ::windows::core::IUnknown); impl ISWbemQualifierSet { 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(feature = "Win32_Foundation")] pub unsafe fn Item<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, name: Param0, iflags: i32) -> ::windows::core::Result<ISWbemQualifier> { let mut result__: <ISWbemQualifier as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), name.into_param().abi(), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemQualifier>(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__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Add<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strname: Param0, varval: *const super::Com::VARIANT, bpropagatestosubclass: i16, bpropagatestoinstance: i16, bisoverridable: i16, iflags: i32) -> ::windows::core::Result<ISWbemQualifier> { let mut result__: <ISWbemQualifier as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), strname.into_param().abi(), ::core::mem::transmute(varval), ::core::mem::transmute(bpropagatestosubclass), ::core::mem::transmute(bpropagatestoinstance), ::core::mem::transmute(bisoverridable), ::core::mem::transmute(iflags), &mut result__).from_abi::<ISWbemQualifier>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Remove<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strname: Param0, iflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), strname.into_param().abi(), ::core::mem::transmute(iflags)).ok() } } unsafe impl ::windows::core::Interface for ISWbemQualifierSet { type Vtable = ISWbemQualifierSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9b16ed16_d3df_11d1_8b08_00600806d9b6); } impl ::core::convert::From<ISWbemQualifierSet> for ::windows::core::IUnknown { fn from(value: ISWbemQualifierSet) -> Self { value.0 } } impl ::core::convert::From<&ISWbemQualifierSet> for ::windows::core::IUnknown { fn from(value: &ISWbemQualifierSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemQualifierSet { 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 ISWbemQualifierSet { 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<ISWbemQualifierSet> for super::Com::IDispatch { fn from(value: ISWbemQualifierSet) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemQualifierSet> for super::Com::IDispatch { fn from(value: &ISWbemQualifierSet) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemQualifierSet { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemQualifierSet { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemQualifierSet_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, punk: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, name: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemqualifier: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, icount: *mut i32) -> ::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, strname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, varval: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, bpropagatestosubclass: i16, bpropagatestoinstance: i16, bisoverridable: i16, iflags: i32, objwbemqualifier: *mut ::windows::core::RawPtr) -> ::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, strname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32) -> ::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 ISWbemRefreshableItem(pub ::windows::core::IUnknown); impl ISWbemRefreshableItem { pub unsafe fn Index(&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__) } pub unsafe fn Refresher(&self) -> ::windows::core::Result<ISWbemRefresher> { let mut result__: <ISWbemRefresher as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemRefresher>(result__) } pub unsafe fn IsSet(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn Object(&self) -> ::windows::core::Result<ISWbemObjectEx> { let mut result__: <ISWbemObjectEx as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemObjectEx>(result__) } pub unsafe fn ObjectSet(&self) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemObjectSet>(result__) } pub unsafe fn Remove(&self, iflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags)).ok() } } unsafe impl ::windows::core::Interface for ISWbemRefreshableItem { type Vtable = ISWbemRefreshableItem_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5ad4bf92_daab_11d3_b38f_00105a1f473a); } impl ::core::convert::From<ISWbemRefreshableItem> for ::windows::core::IUnknown { fn from(value: ISWbemRefreshableItem) -> Self { value.0 } } impl ::core::convert::From<&ISWbemRefreshableItem> for ::windows::core::IUnknown { fn from(value: &ISWbemRefreshableItem) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemRefreshableItem { 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 ISWbemRefreshableItem { 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<ISWbemRefreshableItem> for super::Com::IDispatch { fn from(value: ISWbemRefreshableItem) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemRefreshableItem> for super::Com::IDispatch { fn from(value: &ISWbemRefreshableItem) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemRefreshableItem { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemRefreshableItem { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemRefreshableItem_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, iindex: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemrefresher: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bisset: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemRefresher(pub ::windows::core::IUnknown); impl ISWbemRefresher { 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__) } pub unsafe fn Item(&self, iindex: i32) -> ::windows::core::Result<ISWbemRefreshableItem> { let mut result__: <ISWbemRefreshableItem as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(iindex), &mut result__).from_abi::<ISWbemRefreshableItem>(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__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn Add<'a, Param0: ::windows::core::IntoParam<'a, ISWbemServicesEx>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemservices: Param0, bsinstancepath: Param1, iflags: i32, objwbemnamedvalueset: Param3) -> ::windows::core::Result<ISWbemRefreshableItem> { let mut result__: <ISWbemRefreshableItem as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), objwbemservices.into_param().abi(), bsinstancepath.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemRefreshableItem>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn AddEnum<'a, Param0: ::windows::core::IntoParam<'a, ISWbemServicesEx>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemservices: Param0, bsclassname: Param1, iflags: i32, objwbemnamedvalueset: Param3) -> ::windows::core::Result<ISWbemRefreshableItem> { let mut result__: <ISWbemRefreshableItem as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), objwbemservices.into_param().abi(), bsclassname.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemRefreshableItem>(result__) } pub unsafe fn Remove(&self, iindex: i32, iflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(iindex), ::core::mem::transmute(iflags)).ok() } pub unsafe fn Refresh(&self, iflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(iflags)).ok() } pub unsafe fn AutoReconnect(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn SetAutoReconnect(&self, bcount: i16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(bcount)).ok() } pub unsafe fn DeleteAll(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for ISWbemRefresher { type Vtable = ISWbemRefresher_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x14d8250e_d9c2_11d3_b38f_00105a1f473a); } impl ::core::convert::From<ISWbemRefresher> for ::windows::core::IUnknown { fn from(value: ISWbemRefresher) -> Self { value.0 } } impl ::core::convert::From<&ISWbemRefresher> for ::windows::core::IUnknown { fn from(value: &ISWbemRefresher) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemRefresher { 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 ISWbemRefresher { 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<ISWbemRefresher> for super::Com::IDispatch { fn from(value: ISWbemRefresher) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemRefresher> for super::Com::IDispatch { fn from(value: &ISWbemRefresher) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemRefresher { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemRefresher { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemRefresher_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, punk: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iindex: i32, objwbemrefreshableitem: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, icount: *mut i32) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemservices: ::windows::core::RawPtr, bsinstancepath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemrefreshableitem: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemservices: ::windows::core::RawPtr, bsclassname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemrefreshableitem: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iindex: i32, iflags: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iflags: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bcount: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bcount: 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 ISWbemSecurity(pub ::windows::core::IUnknown); impl ISWbemSecurity { pub unsafe fn ImpersonationLevel(&self) -> ::windows::core::Result<WbemImpersonationLevelEnum> { let mut result__: <WbemImpersonationLevelEnum as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<WbemImpersonationLevelEnum>(result__) } pub unsafe fn SetImpersonationLevel(&self, iimpersonationlevel: WbemImpersonationLevelEnum) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(iimpersonationlevel)).ok() } pub unsafe fn AuthenticationLevel(&self) -> ::windows::core::Result<WbemAuthenticationLevelEnum> { let mut result__: <WbemAuthenticationLevelEnum as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<WbemAuthenticationLevelEnum>(result__) } pub unsafe fn SetAuthenticationLevel(&self, iauthenticationlevel: WbemAuthenticationLevelEnum) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(iauthenticationlevel)).ok() } pub unsafe fn Privileges(&self) -> ::windows::core::Result<ISWbemPrivilegeSet> { let mut result__: <ISWbemPrivilegeSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemPrivilegeSet>(result__) } } unsafe impl ::windows::core::Interface for ISWbemSecurity { type Vtable = ISWbemSecurity_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb54d66e6_2287_11d2_8b33_00600806d9b6); } impl ::core::convert::From<ISWbemSecurity> for ::windows::core::IUnknown { fn from(value: ISWbemSecurity) -> Self { value.0 } } impl ::core::convert::From<&ISWbemSecurity> for ::windows::core::IUnknown { fn from(value: &ISWbemSecurity) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemSecurity { 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 ISWbemSecurity { 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<ISWbemSecurity> for super::Com::IDispatch { fn from(value: ISWbemSecurity) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemSecurity> for super::Com::IDispatch { fn from(value: &ISWbemSecurity) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemSecurity { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemSecurity { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemSecurity_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, iimpersonationlevel: *mut WbemImpersonationLevelEnum) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iimpersonationlevel: WbemImpersonationLevelEnum) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iauthenticationlevel: *mut WbemAuthenticationLevelEnum) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, iauthenticationlevel: WbemAuthenticationLevelEnum) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemprivilegeset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemServices(pub ::windows::core::IUnknown); impl ISWbemServices { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strobjectpath: Param0, iflags: i32, objwbemnamedvalueset: Param2) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn GetAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, strobjectpath: Param1, iflags: i32, objwbemnamedvalueset: Param3, objwbemasynccontext: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strobjectpath.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strobjectpath: Param0, iflags: i32, objwbemnamedvalueset: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn DeleteAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, strobjectpath: Param1, iflags: i32, objwbemnamedvalueset: Param3, objwbemasynccontext: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strobjectpath.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn InstancesOf<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strclass: Param0, iflags: i32, objwbemnamedvalueset: Param2) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), strclass.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn InstancesOfAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, strclass: Param1, iflags: i32, objwbemnamedvalueset: Param3, objwbemasynccontext: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strclass.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn SubclassesOf<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strsuperclass: Param0, iflags: i32, objwbemnamedvalueset: Param2) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), strsuperclass.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn SubclassesOfAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, strsuperclass: Param1, iflags: i32, objwbemnamedvalueset: Param3, objwbemasynccontext: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strsuperclass.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecQuery<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strquery: Param0, strquerylanguage: Param1, iflags: i32, objwbemnamedvalueset: Param3) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), strquery.into_param().abi(), strquerylanguage.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecQueryAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param5: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, objwbemsink: Param0, strquery: Param1, strquerylanguage: Param2, lflags: i32, objwbemnamedvalueset: Param4, objwbemasynccontext: Param5, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strquery.into_param().abi(), strquerylanguage.into_param().abi(), ::core::mem::transmute(lflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn AssociatorsOf< '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>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param8: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param10: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, strobjectpath: Param0, strassocclass: Param1, strresultclass: Param2, strresultrole: Param3, strrole: Param4, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: Param7, strrequiredqualifier: Param8, iflags: i32, objwbemnamedvalueset: Param10, ) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)( ::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), strassocclass.into_param().abi(), strresultclass.into_param().abi(), strresultrole.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredassocqualifier.into_param().abi(), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__, ) .from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn AssociatorsOfAsync< 'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param8: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param9: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param11: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param12: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, objwbemsink: Param0, strobjectpath: Param1, strassocclass: Param2, strresultclass: Param3, strresultrole: Param4, strrole: Param5, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: Param8, strrequiredqualifier: Param9, iflags: i32, objwbemnamedvalueset: Param11, objwbemasynccontext: Param12, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)( ::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strobjectpath.into_param().abi(), strassocclass.into_param().abi(), strresultclass.into_param().abi(), strresultrole.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredassocqualifier.into_param().abi(), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi(), ) .ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ReferencesTo<'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>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, strobjectpath: Param0, strresultclass: Param1, strrole: Param2, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: Param5, iflags: i32, objwbemnamedvalueset: Param7, ) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)( ::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), strresultclass.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__, ) .from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ReferencesToAsync< 'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param8: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param9: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, objwbemsink: Param0, strobjectpath: Param1, strresultclass: Param2, strrole: Param3, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: Param6, iflags: i32, objwbemnamedvalueset: Param8, objwbemasynccontext: Param9, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)( ::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strobjectpath.into_param().abi(), strresultclass.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi(), ) .ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecNotificationQuery<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strquery: Param0, strquerylanguage: Param1, iflags: i32, objwbemnamedvalueset: Param3) -> ::windows::core::Result<ISWbemEventSource> { let mut result__: <ISWbemEventSource as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), strquery.into_param().abi(), strquerylanguage.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemEventSource>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecNotificationQueryAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param5: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, objwbemsink: Param0, strquery: Param1, strquerylanguage: Param2, iflags: i32, objwbemnamedvalueset: Param4, objwbemasynccontext: Param5, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strquery.into_param().abi(), strquerylanguage.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecMethod<'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::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strobjectpath: Param0, strmethodname: Param1, objwbeminparameters: Param2, iflags: i32, objwbemnamedvalueset: Param4) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), strmethodname.into_param().abi(), objwbeminparameters.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecMethodAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param5: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param6: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, objwbemsink: Param0, strobjectpath: Param1, strmethodname: Param2, objwbeminparameters: Param3, iflags: i32, objwbemnamedvalueset: Param5, objwbemasynccontext: Param6, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strobjectpath.into_param().abi(), strmethodname.into_param().abi(), objwbeminparameters.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } pub unsafe fn Security_(&self) -> ::windows::core::Result<ISWbemSecurity> { let mut result__: <ISWbemSecurity as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemSecurity>(result__) } } unsafe impl ::windows::core::Interface for ISWbemServices { type Vtable = ISWbemServices_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x76a6415c_cb41_11d1_8b02_00600806d9b6); } impl ::core::convert::From<ISWbemServices> for ::windows::core::IUnknown { fn from(value: ISWbemServices) -> Self { value.0 } } impl ::core::convert::From<&ISWbemServices> for ::windows::core::IUnknown { fn from(value: &ISWbemServices) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemServices { 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 ISWbemServices { 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<ISWbemServices> for super::Com::IDispatch { fn from(value: ISWbemServices) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemServices> for super::Com::IDispatch { fn from(value: &ISWbemServices) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemServices { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemServices { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemServices_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::Com::EXCEPINFO>, puargerr: *mut u32) -> ::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"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strsuperclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strsuperclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strquery: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strquerylanguage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strquery: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strquerylanguage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strassocclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strassocclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strquery: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strquerylanguage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemeventsource: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strquery: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strquerylanguage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strmethodname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, objwbeminparameters: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemoutparameters: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strmethodname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, objwbeminparameters: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsecurity: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemServicesEx(pub ::windows::core::IUnknown); impl ISWbemServicesEx { pub unsafe fn GetTypeInfoCount(&self) -> ::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), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetTypeInfo(&self, itinfo: u32, lcid: u32) -> ::windows::core::Result<super::Com::ITypeInfo> { let mut result__: <super::Com::ITypeInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(itinfo), ::core::mem::transmute(lcid), &mut result__).from_abi::<super::Com::ITypeInfo>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetIDsOfNames(&self, riid: *const ::windows::core::GUID, rgsznames: *const super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(riid), ::core::mem::transmute(rgsznames), ::core::mem::transmute(cnames), ::core::mem::transmute(lcid), ::core::mem::transmute(rgdispid)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const ::windows::core::GUID, lcid: u32, wflags: u16, pdispparams: *const super::Com::DISPPARAMS, pvarresult: *mut super::Com::VARIANT, pexcepinfo: *mut super::Com::EXCEPINFO, puargerr: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dispidmember), ::core::mem::transmute(riid), ::core::mem::transmute(lcid), ::core::mem::transmute(wflags), ::core::mem::transmute(pdispparams), ::core::mem::transmute(pvarresult), ::core::mem::transmute(pexcepinfo), ::core::mem::transmute(puargerr), ) .ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strobjectpath: Param0, iflags: i32, objwbemnamedvalueset: Param2) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn GetAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, strobjectpath: Param1, iflags: i32, objwbemnamedvalueset: Param3, objwbemasynccontext: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strobjectpath.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strobjectpath: Param0, iflags: i32, objwbemnamedvalueset: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn DeleteAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, strobjectpath: Param1, iflags: i32, objwbemnamedvalueset: Param3, objwbemasynccontext: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strobjectpath.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn InstancesOf<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strclass: Param0, iflags: i32, objwbemnamedvalueset: Param2) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), strclass.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn InstancesOfAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, strclass: Param1, iflags: i32, objwbemnamedvalueset: Param3, objwbemasynccontext: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strclass.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn SubclassesOf<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strsuperclass: Param0, iflags: i32, objwbemnamedvalueset: Param2) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), strsuperclass.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn SubclassesOfAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, strsuperclass: Param1, iflags: i32, objwbemnamedvalueset: Param3, objwbemasynccontext: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strsuperclass.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecQuery<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strquery: Param0, strquerylanguage: Param1, iflags: i32, objwbemnamedvalueset: Param3) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), strquery.into_param().abi(), strquerylanguage.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecQueryAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param5: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, objwbemsink: Param0, strquery: Param1, strquerylanguage: Param2, lflags: i32, objwbemnamedvalueset: Param4, objwbemasynccontext: Param5, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strquery.into_param().abi(), strquerylanguage.into_param().abi(), ::core::mem::transmute(lflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn AssociatorsOf< '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>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param8: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param10: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, strobjectpath: Param0, strassocclass: Param1, strresultclass: Param2, strresultrole: Param3, strrole: Param4, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: Param7, strrequiredqualifier: Param8, iflags: i32, objwbemnamedvalueset: Param10, ) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)( ::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), strassocclass.into_param().abi(), strresultclass.into_param().abi(), strresultrole.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredassocqualifier.into_param().abi(), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__, ) .from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn AssociatorsOfAsync< 'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param8: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param9: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param11: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param12: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, objwbemsink: Param0, strobjectpath: Param1, strassocclass: Param2, strresultclass: Param3, strresultrole: Param4, strrole: Param5, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: Param8, strrequiredqualifier: Param9, iflags: i32, objwbemnamedvalueset: Param11, objwbemasynccontext: Param12, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)( ::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strobjectpath.into_param().abi(), strassocclass.into_param().abi(), strresultclass.into_param().abi(), strresultrole.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredassocqualifier.into_param().abi(), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi(), ) .ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ReferencesTo<'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>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param7: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, strobjectpath: Param0, strresultclass: Param1, strrole: Param2, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: Param5, iflags: i32, objwbemnamedvalueset: Param7, ) -> ::windows::core::Result<ISWbemObjectSet> { let mut result__: <ISWbemObjectSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)( ::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), strresultclass.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__, ) .from_abi::<ISWbemObjectSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ReferencesToAsync< 'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param8: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param9: ::windows::core::IntoParam<'a, super::Com::IDispatch>, >( &self, objwbemsink: Param0, strobjectpath: Param1, strresultclass: Param2, strrole: Param3, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: Param6, iflags: i32, objwbemnamedvalueset: Param8, objwbemasynccontext: Param9, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)( ::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strobjectpath.into_param().abi(), strresultclass.into_param().abi(), strrole.into_param().abi(), ::core::mem::transmute(bclassesonly), ::core::mem::transmute(bschemaonly), strrequiredqualifier.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi(), ) .ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecNotificationQuery<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strquery: Param0, strquerylanguage: Param1, iflags: i32, objwbemnamedvalueset: Param3) -> ::windows::core::Result<ISWbemEventSource> { let mut result__: <ISWbemEventSource as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), strquery.into_param().abi(), strquerylanguage.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemEventSource>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecNotificationQueryAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param5: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, objwbemsink: Param0, strquery: Param1, strquerylanguage: Param2, iflags: i32, objwbemnamedvalueset: Param4, objwbemasynccontext: Param5, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strquery.into_param().abi(), strquerylanguage.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecMethod<'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::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, strobjectpath: Param0, strmethodname: Param1, objwbeminparameters: Param2, iflags: i32, objwbemnamedvalueset: Param4) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), strmethodname.into_param().abi(), objwbeminparameters.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObject>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn ExecMethodAsync<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param5: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param6: ::windows::core::IntoParam<'a, super::Com::IDispatch>>( &self, objwbemsink: Param0, strobjectpath: Param1, strmethodname: Param2, objwbeminparameters: Param3, iflags: i32, objwbemnamedvalueset: Param5, objwbemasynccontext: Param6, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), strobjectpath.into_param().abi(), strmethodname.into_param().abi(), objwbeminparameters.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } pub unsafe fn Security_(&self) -> ::windows::core::Result<ISWbemSecurity> { let mut result__: <ISWbemSecurity as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemSecurity>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, ISWbemObjectEx>, Param2: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemobject: Param0, iflags: i32, objwbemnamedvalueset: Param2) -> ::windows::core::Result<ISWbemObjectPath> { let mut result__: <ISWbemObjectPath as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), objwbemobject.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), &mut result__).from_abi::<ISWbemObjectPath>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn PutAsync<'a, Param0: ::windows::core::IntoParam<'a, ISWbemSink>, Param1: ::windows::core::IntoParam<'a, ISWbemObjectEx>, Param3: ::windows::core::IntoParam<'a, super::Com::IDispatch>, Param4: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, objwbemsink: Param0, objwbemobject: Param1, iflags: i32, objwbemnamedvalueset: Param3, objwbemasynccontext: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), objwbemsink.into_param().abi(), objwbemobject.into_param().abi(), ::core::mem::transmute(iflags), objwbemnamedvalueset.into_param().abi(), objwbemasynccontext.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for ISWbemServicesEx { type Vtable = ISWbemServicesEx_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd2f68443_85dc_427e_91d8_366554cc754c); } impl ::core::convert::From<ISWbemServicesEx> for ::windows::core::IUnknown { fn from(value: ISWbemServicesEx) -> Self { value.0 } } impl ::core::convert::From<&ISWbemServicesEx> for ::windows::core::IUnknown { fn from(value: &ISWbemServicesEx) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemServicesEx { 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 ISWbemServicesEx { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<ISWbemServicesEx> for ISWbemServices { fn from(value: ISWbemServicesEx) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&ISWbemServicesEx> for ISWbemServices { fn from(value: &ISWbemServicesEx) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, ISWbemServices> for ISWbemServicesEx { fn into_param(self) -> ::windows::core::Param<'a, ISWbemServices> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, ISWbemServices> for &ISWbemServicesEx { fn into_param(self) -> ::windows::core::Param<'a, ISWbemServices> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<ISWbemServicesEx> for super::Com::IDispatch { fn from(value: ISWbemServicesEx) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemServicesEx> for super::Com::IDispatch { fn from(value: &ISWbemServicesEx) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemServicesEx { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemServicesEx { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemServicesEx_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::Com::EXCEPINFO>, puargerr: *mut u32) -> ::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"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strsuperclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strsuperclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strquery: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strquerylanguage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strquery: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strquerylanguage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strassocclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strassocclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredassocqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectset: *mut ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strresultclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strrole: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, bclassesonly: i16, bschemaonly: i16, strrequiredqualifier: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strquery: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strquerylanguage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemeventsource: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strquery: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strquerylanguage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strmethodname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, objwbeminparameters: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemoutparameters: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strmethodname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, objwbeminparameters: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsecurity: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemobject: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemobjectpath: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwbemsink: ::windows::core::RawPtr, objwbemobject: ::windows::core::RawPtr, iflags: i32, objwbemnamedvalueset: ::windows::core::RawPtr, objwbemasynccontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemSink(pub ::windows::core::IUnknown); impl ISWbemSink { pub unsafe fn Cancel(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for ISWbemSink { type Vtable = ISWbemSink_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x75718c9f_f029_11d1_a1ac_00c04fb6c223); } impl ::core::convert::From<ISWbemSink> for ::windows::core::IUnknown { fn from(value: ISWbemSink) -> Self { value.0 } } impl ::core::convert::From<&ISWbemSink> for ::windows::core::IUnknown { fn from(value: &ISWbemSink) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemSink { 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 ISWbemSink { 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<ISWbemSink> for super::Com::IDispatch { fn from(value: ISWbemSink) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemSink> for super::Com::IDispatch { fn from(value: &ISWbemSink) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemSink { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemSink { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemSink_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISWbemSinkEvents(pub ::windows::core::IUnknown); impl ISWbemSinkEvents {} unsafe impl ::windows::core::Interface for ISWbemSinkEvents { type Vtable = ISWbemSinkEvents_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x75718ca0_f029_11d1_a1ac_00c04fb6c223); } impl ::core::convert::From<ISWbemSinkEvents> for ::windows::core::IUnknown { fn from(value: ISWbemSinkEvents) -> Self { value.0 } } impl ::core::convert::From<&ISWbemSinkEvents> for ::windows::core::IUnknown { fn from(value: &ISWbemSinkEvents) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISWbemSinkEvents { 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 ISWbemSinkEvents { 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<ISWbemSinkEvents> for super::Com::IDispatch { fn from(value: ISWbemSinkEvents) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&ISWbemSinkEvents> for super::Com::IDispatch { fn from(value: &ISWbemSinkEvents) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for ISWbemSinkEvents { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &ISWbemSinkEvents { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct ISWbemSinkEvents_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::Com::EXCEPINFO>, puargerr: *mut u32) -> ::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 IUnsecuredApartment(pub ::windows::core::IUnknown); impl IUnsecuredApartment { pub unsafe fn CreateObjectStub<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(&self, pobject: Param0) -> ::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).3)(::core::mem::transmute_copy(self), pobject.into_param().abi(), &mut result__).from_abi::<::windows::core::IUnknown>(result__) } } unsafe impl ::windows::core::Interface for IUnsecuredApartment { type Vtable = IUnsecuredApartment_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1cfaba8c_1523_11d1_ad79_00c04fd8fdff); } impl ::core::convert::From<IUnsecuredApartment> for ::windows::core::IUnknown { fn from(value: IUnsecuredApartment) -> Self { value.0 } } impl ::core::convert::From<&IUnsecuredApartment> for ::windows::core::IUnknown { fn from(value: &IUnsecuredApartment) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IUnsecuredApartment { 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 IUnsecuredApartment { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IUnsecuredApartment_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, pobject: ::windows::core::RawPtr, ppstub: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWMIExtension(pub ::windows::core::IUnknown); impl IWMIExtension { #[cfg(feature = "Win32_Foundation")] pub unsafe fn WMIObjectPath(&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 GetWMIObject(&self) -> ::windows::core::Result<ISWbemObject> { let mut result__: <ISWbemObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemObject>(result__) } pub unsafe fn GetWMIServices(&self) -> ::windows::core::Result<ISWbemServices> { let mut result__: <ISWbemServices as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<ISWbemServices>(result__) } } unsafe impl ::windows::core::Interface for IWMIExtension { type Vtable = IWMIExtension_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xadc1f06e_5c7e_11d2_8b74_00104b2afb41); } impl ::core::convert::From<IWMIExtension> for ::windows::core::IUnknown { fn from(value: IWMIExtension) -> Self { value.0 } } impl ::core::convert::From<&IWMIExtension> for ::windows::core::IUnknown { fn from(value: &IWMIExtension) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWMIExtension { 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 IWMIExtension { 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<IWMIExtension> for super::Com::IDispatch { fn from(value: IWMIExtension) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IWMIExtension> for super::Com::IDispatch { fn from(value: &IWMIExtension) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for IWMIExtension { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl<'a> ::windows::core::IntoParam<'a, super::Com::IDispatch> for &IWMIExtension { fn into_param(self) -> ::windows::core::Param<'a, super::Com::IDispatch> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IWMIExtension_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::Com::DISPPARAMS, pvarresult: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, pexcepinfo: *mut ::core::mem::ManuallyDrop<super::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, strwmiobjectpath: *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, objwmiobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, objwmiservices: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemAddressResolution(pub ::windows::core::IUnknown); impl IWbemAddressResolution { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Resolve<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wsznamespacepath: Param0, wszaddresstype: super::super::Foundation::PWSTR, pdwaddresslength: *mut u32, pabbinaryaddress: *mut *mut u8) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), wsznamespacepath.into_param().abi(), ::core::mem::transmute(wszaddresstype), ::core::mem::transmute(pdwaddresslength), ::core::mem::transmute(pabbinaryaddress)).ok() } } unsafe impl ::windows::core::Interface for IWbemAddressResolution { type Vtable = IWbemAddressResolution_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf7ce2e12_8c90_11d1_9e7b_00c04fc324a8); } impl ::core::convert::From<IWbemAddressResolution> for ::windows::core::IUnknown { fn from(value: IWbemAddressResolution) -> Self { value.0 } } impl ::core::convert::From<&IWbemAddressResolution> for ::windows::core::IUnknown { fn from(value: &IWbemAddressResolution) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemAddressResolution { 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 IWbemAddressResolution { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemAddressResolution_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, wsznamespacepath: super::super::Foundation::PWSTR, wszaddresstype: super::super::Foundation::PWSTR, pdwaddresslength: *mut u32, pabbinaryaddress: *mut *mut u8) -> ::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 IWbemBackupRestore(pub ::windows::core::IUnknown); impl IWbemBackupRestore { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Backup<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, strbackuptofile: Param0, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), strbackuptofile.into_param().abi(), ::core::mem::transmute(lflags)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Restore<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, strrestorefromfile: Param0, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), strrestorefromfile.into_param().abi(), ::core::mem::transmute(lflags)).ok() } } unsafe impl ::windows::core::Interface for IWbemBackupRestore { type Vtable = IWbemBackupRestore_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc49e32c7_bc8b_11d2_85d4_00105a1f8304); } impl ::core::convert::From<IWbemBackupRestore> for ::windows::core::IUnknown { fn from(value: IWbemBackupRestore) -> Self { value.0 } } impl ::core::convert::From<&IWbemBackupRestore> for ::windows::core::IUnknown { fn from(value: &IWbemBackupRestore) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemBackupRestore { 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 IWbemBackupRestore { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemBackupRestore_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, strbackuptofile: super::super::Foundation::PWSTR, lflags: i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strrestorefromfile: super::super::Foundation::PWSTR, lflags: i32) -> ::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 IWbemBackupRestoreEx(pub ::windows::core::IUnknown); impl IWbemBackupRestoreEx { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Backup<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, strbackuptofile: Param0, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), strbackuptofile.into_param().abi(), ::core::mem::transmute(lflags)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Restore<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, strrestorefromfile: Param0, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), strrestorefromfile.into_param().abi(), ::core::mem::transmute(lflags)).ok() } pub unsafe fn Pause(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Resume(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IWbemBackupRestoreEx { type Vtable = IWbemBackupRestoreEx_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa359dec5_e813_4834_8a2a_ba7f1d777d76); } impl ::core::convert::From<IWbemBackupRestoreEx> for ::windows::core::IUnknown { fn from(value: IWbemBackupRestoreEx) -> Self { value.0 } } impl ::core::convert::From<&IWbemBackupRestoreEx> for ::windows::core::IUnknown { fn from(value: &IWbemBackupRestoreEx) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemBackupRestoreEx { 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 IWbemBackupRestoreEx { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IWbemBackupRestoreEx> for IWbemBackupRestore { fn from(value: IWbemBackupRestoreEx) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IWbemBackupRestoreEx> for IWbemBackupRestore { fn from(value: &IWbemBackupRestoreEx) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IWbemBackupRestore> for IWbemBackupRestoreEx { fn into_param(self) -> ::windows::core::Param<'a, IWbemBackupRestore> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IWbemBackupRestore> for &IWbemBackupRestoreEx { fn into_param(self) -> ::windows::core::Param<'a, IWbemBackupRestore> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IWbemBackupRestoreEx_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, strbackuptofile: super::super::Foundation::PWSTR, lflags: i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strrestorefromfile: super::super::Foundation::PWSTR, lflags: i32) -> ::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, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemCallResult(pub ::windows::core::IUnknown); impl IWbemCallResult { pub unsafe fn GetResultObject(&self, ltimeout: i32) -> ::windows::core::Result<IWbemClassObject> { let mut result__: <IWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(ltimeout), &mut result__).from_abi::<IWbemClassObject>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetResultString(&self, ltimeout: i32) -> ::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).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(ltimeout), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn GetResultServices(&self, ltimeout: i32) -> ::windows::core::Result<IWbemServices> { let mut result__: <IWbemServices as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(ltimeout), &mut result__).from_abi::<IWbemServices>(result__) } pub unsafe fn GetCallStatus(&self, ltimeout: i32) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(ltimeout), &mut result__).from_abi::<i32>(result__) } } unsafe impl ::windows::core::Interface for IWbemCallResult { type Vtable = IWbemCallResult_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x44aca675_e8fc_11d0_a07c_00c04fb68820); } impl ::core::convert::From<IWbemCallResult> for ::windows::core::IUnknown { fn from(value: IWbemCallResult) -> Self { value.0 } } impl ::core::convert::From<&IWbemCallResult> for ::windows::core::IUnknown { fn from(value: &IWbemCallResult) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemCallResult { 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 IWbemCallResult { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemCallResult_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, ltimeout: i32, ppresultobject: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ltimeout: i32, pstrresultstring: *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, ltimeout: i32, ppservices: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ltimeout: i32, plstatus: *mut i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemClassObject(pub ::windows::core::IUnknown); impl IWbemClassObject { pub unsafe fn GetQualifierSet(&self) -> ::windows::core::Result<IWbemQualifierSet> { let mut result__: <IWbemQualifierSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IWbemQualifierSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, lflags: i32, pval: *mut super::Com::VARIANT, ptype: *mut i32, plflavor: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(lflags), ::core::mem::transmute(pval), ::core::mem::transmute(ptype), ::core::mem::transmute(plflavor)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, lflags: i32, pval: *const super::Com::VARIANT, r#type: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(lflags), ::core::mem::transmute(pval), ::core::mem::transmute(r#type)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), wszname.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetNames<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszqualifiername: Param0, lflags: i32, pqualifierval: *const super::Com::VARIANT) -> ::windows::core::Result<*mut super::Com::SAFEARRAY> { let mut result__: <*mut super::Com::SAFEARRAY as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), wszqualifiername.into_param().abi(), ::core::mem::transmute(lflags), ::core::mem::transmute(pqualifierval), &mut result__).from_abi::<*mut super::Com::SAFEARRAY>(result__) } pub unsafe fn BeginEnumeration(&self, lenumflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lenumflags)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Next(&self, lflags: i32, strname: *mut super::super::Foundation::BSTR, pval: *mut super::Com::VARIANT, ptype: *mut i32, plflavor: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(strname), ::core::mem::transmute(pval), ::core::mem::transmute(ptype), ::core::mem::transmute(plflavor)).ok() } pub unsafe fn EndEnumeration(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPropertyQualifierSet<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszproperty: Param0) -> ::windows::core::Result<IWbemQualifierSet> { let mut result__: <IWbemQualifierSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), wszproperty.into_param().abi(), &mut result__).from_abi::<IWbemQualifierSet>(result__) } pub unsafe fn Clone(&self) -> ::windows::core::Result<IWbemClassObject> { let mut result__: <IWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IWbemClassObject>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetObjectText(&self, lflags: i32) -> ::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), ::core::mem::transmute(lflags), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn SpawnDerivedClass(&self, lflags: i32) -> ::windows::core::Result<IWbemClassObject> { let mut result__: <IWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), &mut result__).from_abi::<IWbemClassObject>(result__) } pub unsafe fn SpawnInstance(&self, lflags: i32) -> ::windows::core::Result<IWbemClassObject> { let mut result__: <IWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), &mut result__).from_abi::<IWbemClassObject>(result__) } pub unsafe fn CompareTo<'a, Param1: ::windows::core::IntoParam<'a, IWbemClassObject>>(&self, lflags: i32, pcompareto: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), pcompareto.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPropertyOrigin<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0) -> ::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).17)(::core::mem::transmute_copy(self), wszname.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn InheritsFrom<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, strancestor: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), strancestor.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetMethod<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, lflags: i32, ppinsignature: *mut ::core::option::Option<IWbemClassObject>, ppoutsignature: *mut ::core::option::Option<IWbemClassObject>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(lflags), ::core::mem::transmute(ppinsignature), ::core::mem::transmute(ppoutsignature)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PutMethod<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, IWbemClassObject>, Param3: ::windows::core::IntoParam<'a, IWbemClassObject>>(&self, wszname: Param0, lflags: i32, pinsignature: Param2, poutsignature: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(lflags), pinsignature.into_param().abi(), poutsignature.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DeleteMethod<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), wszname.into_param().abi()).ok() } pub unsafe fn BeginMethodEnumeration(&self, lenumflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(lenumflags)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn NextMethod(&self, lflags: i32, pstrname: *mut super::super::Foundation::BSTR, ppinsignature: *mut ::core::option::Option<IWbemClassObject>, ppoutsignature: *mut ::core::option::Option<IWbemClassObject>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(pstrname), ::core::mem::transmute(ppinsignature), ::core::mem::transmute(ppoutsignature)).ok() } pub unsafe fn EndMethodEnumeration(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetMethodQualifierSet<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszmethod: Param0) -> ::windows::core::Result<IWbemQualifierSet> { let mut result__: <IWbemQualifierSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), wszmethod.into_param().abi(), &mut result__).from_abi::<IWbemQualifierSet>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetMethodOrigin<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszmethodname: Param0) -> ::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).26)(::core::mem::transmute_copy(self), wszmethodname.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } } unsafe impl ::windows::core::Interface for IWbemClassObject { type Vtable = IWbemClassObject_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdc12a681_737f_11cf_884d_00aa004b2e24); } impl ::core::convert::From<IWbemClassObject> for ::windows::core::IUnknown { fn from(value: IWbemClassObject) -> Self { value.0 } } impl ::core::convert::From<&IWbemClassObject> for ::windows::core::IUnknown { fn from(value: &IWbemClassObject) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemClassObject { 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 IWbemClassObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemClassObject_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, ppqualset: *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, wszname: super::super::Foundation::PWSTR, lflags: i32, pval: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, ptype: *mut i32, plflavor: *mut i32) -> ::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, wszname: super::super::Foundation::PWSTR, lflags: i32, pval: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, r#type: i32) -> ::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, wszname: super::super::Foundation::PWSTR) -> ::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, wszqualifiername: super::super::Foundation::PWSTR, lflags: i32, pqualifierval: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, pnames: *mut *mut super::Com::SAFEARRAY) -> ::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, lenumflags: i32) -> ::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, lflags: i32, strname: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pval: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, ptype: *mut i32, plflavor: *mut i32) -> ::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(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszproperty: super::super::Foundation::PWSTR, ppqualset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcopy: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, pstrobjecttext: *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, lflags: i32, ppnewclass: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, ppnewinstance: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, pcompareto: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszname: super::super::Foundation::PWSTR, pstrclassname: *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, strancestor: 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, wszname: super::super::Foundation::PWSTR, lflags: i32, ppinsignature: *mut ::windows::core::RawPtr, ppoutsignature: *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, wszname: super::super::Foundation::PWSTR, lflags: i32, pinsignature: ::windows::core::RawPtr, poutsignature: ::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, wszname: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lenumflags: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, pstrname: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, ppinsignature: *mut ::windows::core::RawPtr, ppoutsignature: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, 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, wszmethod: super::super::Foundation::PWSTR, ppqualset: *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, wszmethodname: super::super::Foundation::PWSTR, pstrclassname: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::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 IWbemClientConnectionTransport(pub ::windows::core::IUnknown); impl IWbemClientConnectionTransport { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Open<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param8: ::windows::core::IntoParam<'a, IWbemContext>>( &self, straddresstype: Param0, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strobject: Param3, struser: Param4, strpassword: Param5, strlocale: Param6, lflags: i32, pctx: Param8, riid: *const ::windows::core::GUID, pinterface: *mut *mut ::core::ffi::c_void, pcallres: *mut ::core::option::Option<IWbemCallResult>, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)( ::core::mem::transmute_copy(self), straddresstype.into_param().abi(), ::core::mem::transmute(dwbinaryaddresslength), ::core::mem::transmute(abbinaryaddress), strobject.into_param().abi(), struser.into_param().abi(), strpassword.into_param().abi(), strlocale.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), ::core::mem::transmute(riid), ::core::mem::transmute(pinterface), ::core::mem::transmute(pcallres), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn OpenAsync< 'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param8: ::windows::core::IntoParam<'a, IWbemContext>, Param10: ::windows::core::IntoParam<'a, IWbemObjectSink>, >( &self, straddresstype: Param0, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strobject: Param3, struser: Param4, strpassword: Param5, strlocale: Param6, lflags: i32, pctx: Param8, riid: *const ::windows::core::GUID, presponsehandler: Param10, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)( ::core::mem::transmute_copy(self), straddresstype.into_param().abi(), ::core::mem::transmute(dwbinaryaddresslength), ::core::mem::transmute(abbinaryaddress), strobject.into_param().abi(), struser.into_param().abi(), strpassword.into_param().abi(), strlocale.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), ::core::mem::transmute(riid), presponsehandler.into_param().abi(), ) .ok() } pub unsafe fn Cancel<'a, Param1: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, lflags: i32, phandler: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), phandler.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IWbemClientConnectionTransport { type Vtable = IWbemClientConnectionTransport_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa889c72a_fcc1_4a9e_af61_ed071333fb5b); } impl ::core::convert::From<IWbemClientConnectionTransport> for ::windows::core::IUnknown { fn from(value: IWbemClientConnectionTransport) -> Self { value.0 } } impl ::core::convert::From<&IWbemClientConnectionTransport> for ::windows::core::IUnknown { fn from(value: &IWbemClientConnectionTransport) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemClientConnectionTransport { 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 IWbemClientConnectionTransport { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemClientConnectionTransport_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, straddresstype: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strobject: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, struser: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strlocale: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, pinterface: *mut *mut ::core::ffi::c_void, pcallres: *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, straddresstype: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strobject: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, struser: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strlocale: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, presponsehandler: ::windows::core::RawPtr, ) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, phandler: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemClientTransport(pub ::windows::core::IUnknown); impl IWbemClientTransport { #[cfg(feature = "Win32_Foundation")] pub unsafe fn ConnectServer< 'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param8: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param9: ::windows::core::IntoParam<'a, IWbemContext>, >( &self, straddresstype: Param0, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strnetworkresource: Param3, struser: Param4, strpassword: Param5, strlocale: Param6, lsecurityflags: i32, strauthority: Param8, pctx: Param9, ) -> ::windows::core::Result<IWbemServices> { let mut result__: <IWbemServices as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)( ::core::mem::transmute_copy(self), straddresstype.into_param().abi(), ::core::mem::transmute(dwbinaryaddresslength), ::core::mem::transmute(abbinaryaddress), strnetworkresource.into_param().abi(), struser.into_param().abi(), strpassword.into_param().abi(), strlocale.into_param().abi(), ::core::mem::transmute(lsecurityflags), strauthority.into_param().abi(), pctx.into_param().abi(), &mut result__, ) .from_abi::<IWbemServices>(result__) } } unsafe impl ::windows::core::Interface for IWbemClientTransport { type Vtable = IWbemClientTransport_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf7ce2e11_8c90_11d1_9e7b_00c04fc324a8); } impl ::core::convert::From<IWbemClientTransport> for ::windows::core::IUnknown { fn from(value: IWbemClientTransport) -> Self { value.0 } } impl ::core::convert::From<&IWbemClientTransport> for ::windows::core::IUnknown { fn from(value: &IWbemClientTransport) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemClientTransport { 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 IWbemClientTransport { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemClientTransport_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, straddresstype: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, dwbinaryaddresslength: u32, abbinaryaddress: *const u8, strnetworkresource: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, struser: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strlocale: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lsecurityflags: i32, strauthority: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pctx: ::windows::core::RawPtr, ppnamespace: *mut ::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 IWbemConfigureRefresher(pub ::windows::core::IUnknown); impl IWbemConfigureRefresher { #[cfg(feature = "Win32_Foundation")] pub unsafe fn AddObjectByPath<'a, Param0: ::windows::core::IntoParam<'a, IWbemServices>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>>(&self, pnamespace: Param0, wszpath: Param1, lflags: i32, pcontext: Param3, pprefreshable: *mut ::core::option::Option<IWbemClassObject>, plid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pnamespace.into_param().abi(), wszpath.into_param().abi(), ::core::mem::transmute(lflags), pcontext.into_param().abi(), ::core::mem::transmute(pprefreshable), ::core::mem::transmute(plid)).ok() } pub unsafe fn AddObjectByTemplate<'a, Param0: ::windows::core::IntoParam<'a, IWbemServices>, Param1: ::windows::core::IntoParam<'a, IWbemClassObject>, Param3: ::windows::core::IntoParam<'a, IWbemContext>>(&self, pnamespace: Param0, ptemplate: Param1, lflags: i32, pcontext: Param3, pprefreshable: *mut ::core::option::Option<IWbemClassObject>, plid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pnamespace.into_param().abi(), ptemplate.into_param().abi(), ::core::mem::transmute(lflags), pcontext.into_param().abi(), ::core::mem::transmute(pprefreshable), ::core::mem::transmute(plid)).ok() } pub unsafe fn AddRefresher<'a, Param0: ::windows::core::IntoParam<'a, IWbemRefresher>>(&self, prefresher: Param0, lflags: i32, plid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), prefresher.into_param().abi(), ::core::mem::transmute(lflags), ::core::mem::transmute(plid)).ok() } pub unsafe fn Remove(&self, lid: i32, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(lid), ::core::mem::transmute(lflags)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn AddEnum<'a, Param0: ::windows::core::IntoParam<'a, IWbemServices>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>>(&self, pnamespace: Param0, wszclassname: Param1, lflags: i32, pcontext: Param3, ppenum: *mut ::core::option::Option<IWbemHiPerfEnum>, plid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), pnamespace.into_param().abi(), wszclassname.into_param().abi(), ::core::mem::transmute(lflags), pcontext.into_param().abi(), ::core::mem::transmute(ppenum), ::core::mem::transmute(plid)).ok() } } unsafe impl ::windows::core::Interface for IWbemConfigureRefresher { type Vtable = IWbemConfigureRefresher_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x49353c92_516b_11d1_aea6_00c04fb68820); } impl ::core::convert::From<IWbemConfigureRefresher> for ::windows::core::IUnknown { fn from(value: IWbemConfigureRefresher) -> Self { value.0 } } impl ::core::convert::From<&IWbemConfigureRefresher> for ::windows::core::IUnknown { fn from(value: &IWbemConfigureRefresher) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemConfigureRefresher { 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 IWbemConfigureRefresher { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemConfigureRefresher_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, pnamespace: ::windows::core::RawPtr, wszpath: super::super::Foundation::PWSTR, lflags: i32, pcontext: ::windows::core::RawPtr, pprefreshable: *mut ::windows::core::RawPtr, plid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pnamespace: ::windows::core::RawPtr, ptemplate: ::windows::core::RawPtr, lflags: i32, pcontext: ::windows::core::RawPtr, pprefreshable: *mut ::windows::core::RawPtr, plid: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, prefresher: ::windows::core::RawPtr, lflags: i32, plid: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lid: i32, lflags: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pnamespace: ::windows::core::RawPtr, wszclassname: super::super::Foundation::PWSTR, lflags: i32, pcontext: ::windows::core::RawPtr, ppenum: *mut ::windows::core::RawPtr, plid: *mut i32) -> ::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 IWbemConnectorLogin(pub ::windows::core::IUnknown); impl IWbemConnectorLogin { #[cfg(feature = "Win32_Foundation")] pub unsafe fn ConnectorLogin<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>, T: ::windows::core::Interface>(&self, wsznetworkresource: Param0, wszpreferredlocale: Param1, lflags: i32, pctx: Param3) -> ::windows::core::Result<T> { let mut result__ = ::core::option::Option::None; (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), wsznetworkresource.into_param().abi(), wszpreferredlocale.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__) } } unsafe impl ::windows::core::Interface for IWbemConnectorLogin { type Vtable = IWbemConnectorLogin_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd8ec9cb1_b135_4f10_8b1b_c7188bb0d186); } impl ::core::convert::From<IWbemConnectorLogin> for ::windows::core::IUnknown { fn from(value: IWbemConnectorLogin) -> Self { value.0 } } impl ::core::convert::From<&IWbemConnectorLogin> for ::windows::core::IUnknown { fn from(value: &IWbemConnectorLogin) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemConnectorLogin { 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 IWbemConnectorLogin { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemConnectorLogin_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, wsznetworkresource: super::super::Foundation::PWSTR, wszpreferredlocale: super::super::Foundation::PWSTR, lflags: i32, pctx: ::windows::core::RawPtr, riid: *const ::windows::core::GUID, pinterface: *mut *mut ::core::ffi::c_void) -> ::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 IWbemConstructClassObject(pub ::windows::core::IUnknown); impl IWbemConstructClassObject { #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetInheritanceChain(&self, lnumantecedents: i32, awszantecedents: *const super::super::Foundation::PWSTR) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnumantecedents), ::core::mem::transmute(awszantecedents)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPropertyOrigin<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszpropertyname: Param0, loriginindex: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), wszpropertyname.into_param().abi(), ::core::mem::transmute(loriginindex)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetMethodOrigin<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszmethodname: Param0, loriginindex: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), wszmethodname.into_param().abi(), ::core::mem::transmute(loriginindex)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServerNamespace<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszserver: Param0, wsznamespace: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), wszserver.into_param().abi(), wsznamespace.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IWbemConstructClassObject { type Vtable = IWbemConstructClassObject_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9ef76194_70d5_11d1_ad90_00c04fd8fdff); } impl ::core::convert::From<IWbemConstructClassObject> for ::windows::core::IUnknown { fn from(value: IWbemConstructClassObject) -> Self { value.0 } } impl ::core::convert::From<&IWbemConstructClassObject> for ::windows::core::IUnknown { fn from(value: &IWbemConstructClassObject) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemConstructClassObject { 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 IWbemConstructClassObject { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemConstructClassObject_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, lnumantecedents: i32, awszantecedents: *const 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, wszpropertyname: super::super::Foundation::PWSTR, loriginindex: i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszmethodname: super::super::Foundation::PWSTR, loriginindex: i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszserver: super::super::Foundation::PWSTR, wsznamespace: 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 IWbemContext(pub ::windows::core::IUnknown); impl IWbemContext { pub unsafe fn Clone(&self) -> ::windows::core::Result<IWbemContext> { let mut result__: <IWbemContext as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IWbemContext>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetNames(&self, lflags: i32) -> ::windows::core::Result<*mut super::Com::SAFEARRAY> { let mut result__: <*mut super::Com::SAFEARRAY as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), &mut result__).from_abi::<*mut super::Com::SAFEARRAY>(result__) } pub unsafe fn BeginEnumeration(&self, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Next(&self, lflags: i32, pstrname: *mut super::super::Foundation::BSTR, pvalue: *mut super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(pstrname), ::core::mem::transmute(pvalue)).ok() } pub unsafe fn EndEnumeration(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, lflags: i32, pvalue: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(lflags), ::core::mem::transmute(pvalue)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, lflags: i32) -> ::windows::core::Result<super::Com::VARIANT> { let mut result__: <super::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(lflags), &mut result__).from_abi::<super::Com::VARIANT>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DeleteValue<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(lflags)).ok() } pub unsafe fn DeleteAll(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IWbemContext { type Vtable = IWbemContext_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x44aca674_e8fc_11d0_a07c_00c04fb68820); } impl ::core::convert::From<IWbemContext> for ::windows::core::IUnknown { fn from(value: IWbemContext) -> Self { value.0 } } impl ::core::convert::From<&IWbemContext> for ::windows::core::IUnknown { fn from(value: &IWbemContext) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemContext { 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 IWbemContext { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemContext_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, ppnewcopy: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, pnames: *mut *mut super::Com::SAFEARRAY) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32) -> ::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, lflags: i32, pstrname: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvalue: *mut ::core::mem::ManuallyDrop<super::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, wszname: super::super::Foundation::PWSTR, lflags: i32, pvalue: *const ::core::mem::ManuallyDrop<super::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, wszname: super::super::Foundation::PWSTR, lflags: i32, pvalue: *mut ::core::mem::ManuallyDrop<super::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, wszname: super::super::Foundation::PWSTR, lflags: i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, 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 IWbemDecoupledBasicEventProvider(pub ::windows::core::IUnknown); impl IWbemDecoupledBasicEventProvider { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Register<'a, Param1: ::windows::core::IntoParam<'a, IWbemContext>, 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>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param6: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>( &self, a_flags: i32, a_context: Param1, a_user: Param2, a_locale: Param3, a_scope: Param4, a_registration: Param5, piunknown: Param6, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(a_flags), a_context.into_param().abi(), a_user.into_param().abi(), a_locale.into_param().abi(), a_scope.into_param().abi(), a_registration.into_param().abi(), piunknown.into_param().abi()).ok() } pub unsafe fn UnRegister(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn GetSink<'a, Param1: ::windows::core::IntoParam<'a, IWbemContext>>(&self, a_flags: i32, a_context: Param1) -> ::windows::core::Result<IWbemObjectSink> { let mut result__: <IWbemObjectSink as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(a_flags), a_context.into_param().abi(), &mut result__).from_abi::<IWbemObjectSink>(result__) } pub unsafe fn GetService<'a, Param1: ::windows::core::IntoParam<'a, IWbemContext>>(&self, a_flags: i32, a_context: Param1) -> ::windows::core::Result<IWbemServices> { let mut result__: <IWbemServices as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(a_flags), a_context.into_param().abi(), &mut result__).from_abi::<IWbemServices>(result__) } } unsafe impl ::windows::core::Interface for IWbemDecoupledBasicEventProvider { type Vtable = IWbemDecoupledBasicEventProvider_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x86336d20_ca11_4786_9ef1_bc8a946b42fc); } impl ::core::convert::From<IWbemDecoupledBasicEventProvider> for ::windows::core::IUnknown { fn from(value: IWbemDecoupledBasicEventProvider) -> Self { value.0 } } impl ::core::convert::From<&IWbemDecoupledBasicEventProvider> for ::windows::core::IUnknown { fn from(value: &IWbemDecoupledBasicEventProvider) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemDecoupledBasicEventProvider { 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 IWbemDecoupledBasicEventProvider { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IWbemDecoupledBasicEventProvider> for IWbemDecoupledRegistrar { fn from(value: IWbemDecoupledBasicEventProvider) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IWbemDecoupledBasicEventProvider> for IWbemDecoupledRegistrar { fn from(value: &IWbemDecoupledBasicEventProvider) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IWbemDecoupledRegistrar> for IWbemDecoupledBasicEventProvider { fn into_param(self) -> ::windows::core::Param<'a, IWbemDecoupledRegistrar> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IWbemDecoupledRegistrar> for &IWbemDecoupledBasicEventProvider { fn into_param(self) -> ::windows::core::Param<'a, IWbemDecoupledRegistrar> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IWbemDecoupledBasicEventProvider_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, a_flags: i32, a_context: ::windows::core::RawPtr, a_user: super::super::Foundation::PWSTR, a_locale: super::super::Foundation::PWSTR, a_scope: super::super::Foundation::PWSTR, a_registration: super::super::Foundation::PWSTR, piunknown: ::windows::core::RawPtr) -> ::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, a_flags: i32, a_context: ::windows::core::RawPtr, a_sink: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, a_flags: i32, a_context: ::windows::core::RawPtr, a_service: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemDecoupledRegistrar(pub ::windows::core::IUnknown); impl IWbemDecoupledRegistrar { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Register<'a, Param1: ::windows::core::IntoParam<'a, IWbemContext>, 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>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param6: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>( &self, a_flags: i32, a_context: Param1, a_user: Param2, a_locale: Param3, a_scope: Param4, a_registration: Param5, piunknown: Param6, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(a_flags), a_context.into_param().abi(), a_user.into_param().abi(), a_locale.into_param().abi(), a_scope.into_param().abi(), a_registration.into_param().abi(), piunknown.into_param().abi()).ok() } pub unsafe fn UnRegister(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IWbemDecoupledRegistrar { type Vtable = IWbemDecoupledRegistrar_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1005cbcf_e64f_4646_bcd3_3a089d8a84b4); } impl ::core::convert::From<IWbemDecoupledRegistrar> for ::windows::core::IUnknown { fn from(value: IWbemDecoupledRegistrar) -> Self { value.0 } } impl ::core::convert::From<&IWbemDecoupledRegistrar> for ::windows::core::IUnknown { fn from(value: &IWbemDecoupledRegistrar) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemDecoupledRegistrar { 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 IWbemDecoupledRegistrar { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemDecoupledRegistrar_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, a_flags: i32, a_context: ::windows::core::RawPtr, a_user: super::super::Foundation::PWSTR, a_locale: super::super::Foundation::PWSTR, a_scope: super::super::Foundation::PWSTR, a_registration: super::super::Foundation::PWSTR, piunknown: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, 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 IWbemEventConsumerProvider(pub ::windows::core::IUnknown); impl IWbemEventConsumerProvider { pub unsafe fn FindConsumer<'a, Param0: ::windows::core::IntoParam<'a, IWbemClassObject>>(&self, plogicalconsumer: Param0) -> ::windows::core::Result<IWbemUnboundObjectSink> { let mut result__: <IWbemUnboundObjectSink as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), plogicalconsumer.into_param().abi(), &mut result__).from_abi::<IWbemUnboundObjectSink>(result__) } } unsafe impl ::windows::core::Interface for IWbemEventConsumerProvider { type Vtable = IWbemEventConsumerProvider_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe246107a_b06e_11d0_ad61_00c04fd8fdff); } impl ::core::convert::From<IWbemEventConsumerProvider> for ::windows::core::IUnknown { fn from(value: IWbemEventConsumerProvider) -> Self { value.0 } } impl ::core::convert::From<&IWbemEventConsumerProvider> for ::windows::core::IUnknown { fn from(value: &IWbemEventConsumerProvider) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemEventConsumerProvider { 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 IWbemEventConsumerProvider { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemEventConsumerProvider_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, plogicalconsumer: ::windows::core::RawPtr, ppconsumer: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemEventProvider(pub ::windows::core::IUnknown); impl IWbemEventProvider { pub unsafe fn ProvideEvents<'a, Param0: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, psink: Param0, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), psink.into_param().abi(), ::core::mem::transmute(lflags)).ok() } } unsafe impl ::windows::core::Interface for IWbemEventProvider { type Vtable = IWbemEventProvider_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe245105b_b06e_11d0_ad61_00c04fd8fdff); } impl ::core::convert::From<IWbemEventProvider> for ::windows::core::IUnknown { fn from(value: IWbemEventProvider) -> Self { value.0 } } impl ::core::convert::From<&IWbemEventProvider> for ::windows::core::IUnknown { fn from(value: &IWbemEventProvider) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemEventProvider { 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 IWbemEventProvider { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemEventProvider_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, psink: ::windows::core::RawPtr, lflags: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemEventProviderQuerySink(pub ::windows::core::IUnknown); impl IWbemEventProviderQuerySink { pub unsafe fn NewQuery(&self, dwid: u32, wszquerylanguage: *const u16, wszquery: *const u16) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwid), ::core::mem::transmute(wszquerylanguage), ::core::mem::transmute(wszquery)).ok() } pub unsafe fn CancelQuery(&self, dwid: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(dwid)).ok() } } unsafe impl ::windows::core::Interface for IWbemEventProviderQuerySink { type Vtable = IWbemEventProviderQuerySink_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x580acaf8_fa1c_11d0_ad72_00c04fd8fdff); } impl ::core::convert::From<IWbemEventProviderQuerySink> for ::windows::core::IUnknown { fn from(value: IWbemEventProviderQuerySink) -> Self { value.0 } } impl ::core::convert::From<&IWbemEventProviderQuerySink> for ::windows::core::IUnknown { fn from(value: &IWbemEventProviderQuerySink) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemEventProviderQuerySink { 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 IWbemEventProviderQuerySink { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemEventProviderQuerySink_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, dwid: u32, wszquerylanguage: *const u16, wszquery: *const u16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dwid: u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemEventProviderSecurity(pub ::windows::core::IUnknown); impl IWbemEventProviderSecurity { pub unsafe fn AccessCheck(&self, wszquerylanguage: *const u16, wszquery: *const u16, lsidlength: i32, psid: *const u8) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(wszquerylanguage), ::core::mem::transmute(wszquery), ::core::mem::transmute(lsidlength), ::core::mem::transmute(psid)).ok() } } unsafe impl ::windows::core::Interface for IWbemEventProviderSecurity { type Vtable = IWbemEventProviderSecurity_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x631f7d96_d993_11d2_b339_00105a1f4aaf); } impl ::core::convert::From<IWbemEventProviderSecurity> for ::windows::core::IUnknown { fn from(value: IWbemEventProviderSecurity) -> Self { value.0 } } impl ::core::convert::From<&IWbemEventProviderSecurity> for ::windows::core::IUnknown { fn from(value: &IWbemEventProviderSecurity) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemEventProviderSecurity { 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 IWbemEventProviderSecurity { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemEventProviderSecurity_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, wszquerylanguage: *const u16, wszquery: *const u16, lsidlength: i32, psid: *const u8) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemEventSink(pub ::windows::core::IUnknown); impl IWbemEventSink { pub unsafe fn Indicate(&self, lobjectcount: i32, apobjarray: *const ::core::option::Option<IWbemClassObject>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(lobjectcount), ::core::mem::transmute(apobjarray)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetStatus<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, IWbemClassObject>>(&self, lflags: i32, hresult: ::windows::core::HRESULT, strparam: Param2, pobjparam: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(hresult), strparam.into_param().abi(), pobjparam.into_param().abi()).ok() } pub unsafe fn SetSinkSecurity(&self, lsdlength: i32, psd: *const u8) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(lsdlength), ::core::mem::transmute(psd)).ok() } pub unsafe fn IsActive(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetRestrictedSink<'a, Param2: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(&self, lnumqueries: i32, awszqueries: *const super::super::Foundation::PWSTR, pcallback: Param2) -> ::windows::core::Result<IWbemEventSink> { let mut result__: <IWbemEventSink as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(lnumqueries), ::core::mem::transmute(awszqueries), pcallback.into_param().abi(), &mut result__).from_abi::<IWbemEventSink>(result__) } pub unsafe fn SetBatchingParameters(&self, lflags: i32, dwmaxbuffersize: u32, dwmaxsendlatency: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(dwmaxbuffersize), ::core::mem::transmute(dwmaxsendlatency)).ok() } } unsafe impl ::windows::core::Interface for IWbemEventSink { type Vtable = IWbemEventSink_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3ae0080a_7e3a_4366_bf89_0feedc931659); } impl ::core::convert::From<IWbemEventSink> for ::windows::core::IUnknown { fn from(value: IWbemEventSink) -> Self { value.0 } } impl ::core::convert::From<&IWbemEventSink> for ::windows::core::IUnknown { fn from(value: &IWbemEventSink) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemEventSink { 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 IWbemEventSink { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IWbemEventSink> for IWbemObjectSink { fn from(value: IWbemEventSink) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IWbemEventSink> for IWbemObjectSink { fn from(value: &IWbemEventSink) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IWbemObjectSink> for IWbemEventSink { fn into_param(self) -> ::windows::core::Param<'a, IWbemObjectSink> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IWbemObjectSink> for &IWbemEventSink { fn into_param(self) -> ::windows::core::Param<'a, IWbemObjectSink> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IWbemEventSink_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, lobjectcount: i32, apobjarray: *const ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, hresult: ::windows::core::HRESULT, strparam: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pobjparam: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lsdlength: i32, psd: *const u8) -> ::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, lnumqueries: i32, awszqueries: *const super::super::Foundation::PWSTR, pcallback: ::windows::core::RawPtr, ppsink: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, dwmaxbuffersize: u32, dwmaxsendlatency: u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemHiPerfEnum(pub ::windows::core::IUnknown); impl IWbemHiPerfEnum { pub unsafe fn AddObjects(&self, lflags: i32, unumobjects: u32, apids: *const i32, apobj: *const ::core::option::Option<IWbemObjectAccess>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(unumobjects), ::core::mem::transmute(apids), ::core::mem::transmute(apobj)).ok() } pub unsafe fn RemoveObjects(&self, lflags: i32, unumobjects: u32, apids: *const i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(unumobjects), ::core::mem::transmute(apids)).ok() } pub unsafe fn GetObjects(&self, lflags: i32, unumobjects: u32, apobj: *mut ::core::option::Option<IWbemObjectAccess>, pureturned: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(unumobjects), ::core::mem::transmute(apobj), ::core::mem::transmute(pureturned)).ok() } pub unsafe fn RemoveAll(&self, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags)).ok() } } unsafe impl ::windows::core::Interface for IWbemHiPerfEnum { type Vtable = IWbemHiPerfEnum_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2705c288_79ae_11d2_b348_00105a1f8177); } impl ::core::convert::From<IWbemHiPerfEnum> for ::windows::core::IUnknown { fn from(value: IWbemHiPerfEnum) -> Self { value.0 } } impl ::core::convert::From<&IWbemHiPerfEnum> for ::windows::core::IUnknown { fn from(value: &IWbemHiPerfEnum) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemHiPerfEnum { 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 IWbemHiPerfEnum { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemHiPerfEnum_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, lflags: i32, unumobjects: u32, apids: *const i32, apobj: *const ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, unumobjects: u32, apids: *const i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, unumobjects: u32, apobj: *mut ::windows::core::RawPtr, pureturned: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemHiPerfProvider(pub ::windows::core::IUnknown); impl IWbemHiPerfProvider { #[cfg(feature = "Win32_Foundation")] pub unsafe fn QueryInstances<'a, Param0: ::windows::core::IntoParam<'a, IWbemServices>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>>(&self, pnamespace: Param0, wszclass: Param1, lflags: i32, pctx: Param3, psink: ::core::option::Option<IWbemObjectSink>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pnamespace.into_param().abi(), wszclass.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), ::core::mem::transmute(psink)).ok() } pub unsafe fn CreateRefresher<'a, Param0: ::windows::core::IntoParam<'a, IWbemServices>>(&self, pnamespace: Param0, lflags: i32) -> ::windows::core::Result<IWbemRefresher> { let mut result__: <IWbemRefresher as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pnamespace.into_param().abi(), ::core::mem::transmute(lflags), &mut result__).from_abi::<IWbemRefresher>(result__) } pub unsafe fn CreateRefreshableObject<'a, Param0: ::windows::core::IntoParam<'a, IWbemServices>, Param1: ::windows::core::IntoParam<'a, IWbemObjectAccess>, Param2: ::windows::core::IntoParam<'a, IWbemRefresher>, Param4: ::windows::core::IntoParam<'a, IWbemContext>>(&self, pnamespace: Param0, ptemplate: Param1, prefresher: Param2, lflags: i32, pcontext: Param4, pprefreshable: *mut ::core::option::Option<IWbemObjectAccess>, plid: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), pnamespace.into_param().abi(), ptemplate.into_param().abi(), prefresher.into_param().abi(), ::core::mem::transmute(lflags), pcontext.into_param().abi(), ::core::mem::transmute(pprefreshable), ::core::mem::transmute(plid)).ok() } pub unsafe fn StopRefreshing<'a, Param0: ::windows::core::IntoParam<'a, IWbemRefresher>>(&self, prefresher: Param0, lid: i32, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), prefresher.into_param().abi(), ::core::mem::transmute(lid), ::core::mem::transmute(lflags)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateRefreshableEnum<'a, Param0: ::windows::core::IntoParam<'a, IWbemServices>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, IWbemRefresher>, Param4: ::windows::core::IntoParam<'a, IWbemContext>, Param5: ::windows::core::IntoParam<'a, IWbemHiPerfEnum>>(&self, pnamespace: Param0, wszclass: Param1, prefresher: Param2, lflags: i32, pcontext: Param4, phiperfenum: Param5) -> ::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), pnamespace.into_param().abi(), wszclass.into_param().abi(), prefresher.into_param().abi(), ::core::mem::transmute(lflags), pcontext.into_param().abi(), phiperfenum.into_param().abi(), &mut result__).from_abi::<i32>(result__) } pub unsafe fn GetObjects<'a, Param0: ::windows::core::IntoParam<'a, IWbemServices>, Param4: ::windows::core::IntoParam<'a, IWbemContext>>(&self, pnamespace: Param0, lnumobjects: i32, apobj: *mut ::core::option::Option<IWbemObjectAccess>, lflags: i32, pcontext: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), pnamespace.into_param().abi(), ::core::mem::transmute(lnumobjects), ::core::mem::transmute(apobj), ::core::mem::transmute(lflags), pcontext.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IWbemHiPerfProvider { type Vtable = IWbemHiPerfProvider_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x49353c93_516b_11d1_aea6_00c04fb68820); } impl ::core::convert::From<IWbemHiPerfProvider> for ::windows::core::IUnknown { fn from(value: IWbemHiPerfProvider) -> Self { value.0 } } impl ::core::convert::From<&IWbemHiPerfProvider> for ::windows::core::IUnknown { fn from(value: &IWbemHiPerfProvider) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemHiPerfProvider { 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 IWbemHiPerfProvider { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemHiPerfProvider_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, pnamespace: ::windows::core::RawPtr, wszclass: super::super::Foundation::PWSTR, lflags: i32, pctx: ::windows::core::RawPtr, psink: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pnamespace: ::windows::core::RawPtr, lflags: i32, pprefresher: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pnamespace: ::windows::core::RawPtr, ptemplate: ::windows::core::RawPtr, prefresher: ::windows::core::RawPtr, lflags: i32, pcontext: ::windows::core::RawPtr, pprefreshable: *mut ::windows::core::RawPtr, plid: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, prefresher: ::windows::core::RawPtr, lid: i32, lflags: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pnamespace: ::windows::core::RawPtr, wszclass: super::super::Foundation::PWSTR, prefresher: ::windows::core::RawPtr, lflags: i32, pcontext: ::windows::core::RawPtr, phiperfenum: ::windows::core::RawPtr, plid: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pnamespace: ::windows::core::RawPtr, lnumobjects: i32, apobj: *mut ::windows::core::RawPtr, lflags: i32, pcontext: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemLevel1Login(pub ::windows::core::IUnknown); impl IWbemLevel1Login { #[cfg(feature = "Win32_Foundation")] pub unsafe fn EstablishPosition<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszlocalelist: Param0, dwnumlocales: 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), wszlocalelist.into_param().abi(), ::core::mem::transmute(dwnumlocales), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn RequestChallenge<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wsznetworkresource: Param0, wszuser: Param1) -> ::windows::core::Result<u8> { let mut result__: <u8 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), wsznetworkresource.into_param().abi(), wszuser.into_param().abi(), &mut result__).from_abi::<u8>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn WBEMLogin<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>>(&self, wszpreferredlocale: Param0, accesstoken: *const u8, lflags: i32, pctx: Param3) -> ::windows::core::Result<IWbemServices> { let mut result__: <IWbemServices as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), wszpreferredlocale.into_param().abi(), ::core::mem::transmute(accesstoken), ::core::mem::transmute(lflags), pctx.into_param().abi(), &mut result__).from_abi::<IWbemServices>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn NTLMLogin<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>>(&self, wsznetworkresource: Param0, wszpreferredlocale: Param1, lflags: i32, pctx: Param3) -> ::windows::core::Result<IWbemServices> { let mut result__: <IWbemServices as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), wsznetworkresource.into_param().abi(), wszpreferredlocale.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), &mut result__).from_abi::<IWbemServices>(result__) } } unsafe impl ::windows::core::Interface for IWbemLevel1Login { type Vtable = IWbemLevel1Login_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf309ad18_d86a_11d0_a075_00c04fb68820); } impl ::core::convert::From<IWbemLevel1Login> for ::windows::core::IUnknown { fn from(value: IWbemLevel1Login) -> Self { value.0 } } impl ::core::convert::From<&IWbemLevel1Login> for ::windows::core::IUnknown { fn from(value: &IWbemLevel1Login) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemLevel1Login { 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 IWbemLevel1Login { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemLevel1Login_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, wszlocalelist: super::super::Foundation::PWSTR, dwnumlocales: u32, reserved: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wsznetworkresource: super::super::Foundation::PWSTR, wszuser: super::super::Foundation::PWSTR, nonce: *mut u8) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszpreferredlocale: super::super::Foundation::PWSTR, accesstoken: *const u8, lflags: i32, pctx: ::windows::core::RawPtr, ppnamespace: *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, wsznetworkresource: super::super::Foundation::PWSTR, wszpreferredlocale: super::super::Foundation::PWSTR, lflags: i32, pctx: ::windows::core::RawPtr, ppnamespace: *mut ::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 IWbemLocator(pub ::windows::core::IUnknown); impl IWbemLocator { #[cfg(feature = "Win32_Foundation")] pub unsafe fn ConnectServer<'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>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param5: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param6: ::windows::core::IntoParam<'a, IWbemContext>>( &self, strnetworkresource: Param0, struser: Param1, strpassword: Param2, strlocale: Param3, lsecurityflags: i32, strauthority: Param5, pctx: Param6, ) -> ::windows::core::Result<IWbemServices> { let mut result__: <IWbemServices as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), strnetworkresource.into_param().abi(), struser.into_param().abi(), strpassword.into_param().abi(), strlocale.into_param().abi(), ::core::mem::transmute(lsecurityflags), strauthority.into_param().abi(), pctx.into_param().abi(), &mut result__).from_abi::<IWbemServices>(result__) } } unsafe impl ::windows::core::Interface for IWbemLocator { type Vtable = IWbemLocator_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdc12a687_737f_11cf_884d_00aa004b2e24); } impl ::core::convert::From<IWbemLocator> for ::windows::core::IUnknown { fn from(value: IWbemLocator) -> Self { value.0 } } impl ::core::convert::From<&IWbemLocator> for ::windows::core::IUnknown { fn from(value: &IWbemLocator) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemLocator { 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 IWbemLocator { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemLocator_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, strnetworkresource: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, struser: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strpassword: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strlocale: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lsecurityflags: i32, strauthority: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pctx: ::windows::core::RawPtr, ppnamespace: *mut ::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 IWbemObjectAccess(pub ::windows::core::IUnknown); impl IWbemObjectAccess { pub unsafe fn GetQualifierSet(&self) -> ::windows::core::Result<IWbemQualifierSet> { let mut result__: <IWbemQualifierSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IWbemQualifierSet>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, lflags: i32, pval: *mut super::Com::VARIANT, ptype: *mut i32, plflavor: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(lflags), ::core::mem::transmute(pval), ::core::mem::transmute(ptype), ::core::mem::transmute(plflavor)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, lflags: i32, pval: *const super::Com::VARIANT, r#type: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(lflags), ::core::mem::transmute(pval), ::core::mem::transmute(r#type)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), wszname.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetNames<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszqualifiername: Param0, lflags: i32, pqualifierval: *const super::Com::VARIANT) -> ::windows::core::Result<*mut super::Com::SAFEARRAY> { let mut result__: <*mut super::Com::SAFEARRAY as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), wszqualifiername.into_param().abi(), ::core::mem::transmute(lflags), ::core::mem::transmute(pqualifierval), &mut result__).from_abi::<*mut super::Com::SAFEARRAY>(result__) } pub unsafe fn BeginEnumeration(&self, lenumflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lenumflags)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Next(&self, lflags: i32, strname: *mut super::super::Foundation::BSTR, pval: *mut super::Com::VARIANT, ptype: *mut i32, plflavor: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(strname), ::core::mem::transmute(pval), ::core::mem::transmute(ptype), ::core::mem::transmute(plflavor)).ok() } pub unsafe fn EndEnumeration(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPropertyQualifierSet<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszproperty: Param0) -> ::windows::core::Result<IWbemQualifierSet> { let mut result__: <IWbemQualifierSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), wszproperty.into_param().abi(), &mut result__).from_abi::<IWbemQualifierSet>(result__) } pub unsafe fn Clone(&self) -> ::windows::core::Result<IWbemClassObject> { let mut result__: <IWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IWbemClassObject>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetObjectText(&self, lflags: i32) -> ::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), ::core::mem::transmute(lflags), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn SpawnDerivedClass(&self, lflags: i32) -> ::windows::core::Result<IWbemClassObject> { let mut result__: <IWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), &mut result__).from_abi::<IWbemClassObject>(result__) } pub unsafe fn SpawnInstance(&self, lflags: i32) -> ::windows::core::Result<IWbemClassObject> { let mut result__: <IWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), &mut result__).from_abi::<IWbemClassObject>(result__) } pub unsafe fn CompareTo<'a, Param1: ::windows::core::IntoParam<'a, IWbemClassObject>>(&self, lflags: i32, pcompareto: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), pcompareto.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPropertyOrigin<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0) -> ::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).17)(::core::mem::transmute_copy(self), wszname.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn InheritsFrom<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, strancestor: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), strancestor.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetMethod<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, lflags: i32, ppinsignature: *mut ::core::option::Option<IWbemClassObject>, ppoutsignature: *mut ::core::option::Option<IWbemClassObject>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(lflags), ::core::mem::transmute(ppinsignature), ::core::mem::transmute(ppoutsignature)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PutMethod<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, IWbemClassObject>, Param3: ::windows::core::IntoParam<'a, IWbemClassObject>>(&self, wszname: Param0, lflags: i32, pinsignature: Param2, poutsignature: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(lflags), pinsignature.into_param().abi(), poutsignature.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DeleteMethod<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), wszname.into_param().abi()).ok() } pub unsafe fn BeginMethodEnumeration(&self, lenumflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(lenumflags)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn NextMethod(&self, lflags: i32, pstrname: *mut super::super::Foundation::BSTR, ppinsignature: *mut ::core::option::Option<IWbemClassObject>, ppoutsignature: *mut ::core::option::Option<IWbemClassObject>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(pstrname), ::core::mem::transmute(ppinsignature), ::core::mem::transmute(ppoutsignature)).ok() } pub unsafe fn EndMethodEnumeration(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetMethodQualifierSet<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszmethod: Param0) -> ::windows::core::Result<IWbemQualifierSet> { let mut result__: <IWbemQualifierSet as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), wszmethod.into_param().abi(), &mut result__).from_abi::<IWbemQualifierSet>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetMethodOrigin<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszmethodname: Param0) -> ::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).26)(::core::mem::transmute_copy(self), wszmethodname.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPropertyHandle<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszpropertyname: Param0, ptype: *mut i32, plhandle: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), wszpropertyname.into_param().abi(), ::core::mem::transmute(ptype), ::core::mem::transmute(plhandle)).ok() } pub unsafe fn WritePropertyValue(&self, lhandle: i32, lnumbytes: i32, adata: *const u8) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), ::core::mem::transmute(lhandle), ::core::mem::transmute(lnumbytes), ::core::mem::transmute(adata)).ok() } pub unsafe fn ReadPropertyValue(&self, lhandle: i32, lbuffersize: i32, plnumbytes: *mut i32, adata: *mut u8) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), ::core::mem::transmute(lhandle), ::core::mem::transmute(lbuffersize), ::core::mem::transmute(plnumbytes), ::core::mem::transmute(adata)).ok() } pub unsafe fn ReadDWORD(&self, lhandle: i32) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), ::core::mem::transmute(lhandle), &mut result__).from_abi::<u32>(result__) } pub unsafe fn WriteDWORD(&self, lhandle: i32, dw: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), ::core::mem::transmute(lhandle), ::core::mem::transmute(dw)).ok() } pub unsafe fn ReadQWORD(&self, lhandle: i32) -> ::windows::core::Result<u64> { let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), ::core::mem::transmute(lhandle), &mut result__).from_abi::<u64>(result__) } pub unsafe fn WriteQWORD(&self, lhandle: i32, pw: u64) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), ::core::mem::transmute(lhandle), ::core::mem::transmute(pw)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetPropertyInfoByHandle(&self, lhandle: i32, pstrname: *mut super::super::Foundation::BSTR, ptype: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), ::core::mem::transmute(lhandle), ::core::mem::transmute(pstrname), ::core::mem::transmute(ptype)).ok() } pub unsafe fn Lock(&self, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags)).ok() } pub unsafe fn Unlock(&self, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags)).ok() } } unsafe impl ::windows::core::Interface for IWbemObjectAccess { type Vtable = IWbemObjectAccess_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x49353c9a_516b_11d1_aea6_00c04fb68820); } impl ::core::convert::From<IWbemObjectAccess> for ::windows::core::IUnknown { fn from(value: IWbemObjectAccess) -> Self { value.0 } } impl ::core::convert::From<&IWbemObjectAccess> for ::windows::core::IUnknown { fn from(value: &IWbemObjectAccess) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemObjectAccess { 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 IWbemObjectAccess { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IWbemObjectAccess> for IWbemClassObject { fn from(value: IWbemObjectAccess) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IWbemObjectAccess> for IWbemClassObject { fn from(value: &IWbemObjectAccess) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IWbemClassObject> for IWbemObjectAccess { fn into_param(self) -> ::windows::core::Param<'a, IWbemClassObject> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IWbemClassObject> for &IWbemObjectAccess { fn into_param(self) -> ::windows::core::Param<'a, IWbemClassObject> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IWbemObjectAccess_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, ppqualset: *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, wszname: super::super::Foundation::PWSTR, lflags: i32, pval: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, ptype: *mut i32, plflavor: *mut i32) -> ::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, wszname: super::super::Foundation::PWSTR, lflags: i32, pval: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, r#type: i32) -> ::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, wszname: super::super::Foundation::PWSTR) -> ::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, wszqualifiername: super::super::Foundation::PWSTR, lflags: i32, pqualifierval: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, pnames: *mut *mut super::Com::SAFEARRAY) -> ::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, lenumflags: i32) -> ::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, lflags: i32, strname: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pval: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, ptype: *mut i32, plflavor: *mut i32) -> ::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(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszproperty: super::super::Foundation::PWSTR, ppqualset: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcopy: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, pstrobjecttext: *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, lflags: i32, ppnewclass: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, ppnewinstance: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, pcompareto: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszname: super::super::Foundation::PWSTR, pstrclassname: *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, strancestor: 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, wszname: super::super::Foundation::PWSTR, lflags: i32, ppinsignature: *mut ::windows::core::RawPtr, ppoutsignature: *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, wszname: super::super::Foundation::PWSTR, lflags: i32, pinsignature: ::windows::core::RawPtr, poutsignature: ::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, wszname: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lenumflags: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, pstrname: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, ppinsignature: *mut ::windows::core::RawPtr, ppoutsignature: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, 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, wszmethod: super::super::Foundation::PWSTR, ppqualset: *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, wszmethodname: super::super::Foundation::PWSTR, pstrclassname: *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, wszpropertyname: super::super::Foundation::PWSTR, ptype: *mut i32, plhandle: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lhandle: i32, lnumbytes: i32, adata: *const u8) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lhandle: i32, lbuffersize: i32, plnumbytes: *mut i32, adata: *mut u8) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lhandle: i32, pdw: *mut u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lhandle: i32, dw: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lhandle: i32, pqw: *mut u64) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lhandle: i32, pw: u64) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lhandle: i32, pstrname: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, ptype: *mut i32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemObjectSink(pub ::windows::core::IUnknown); impl IWbemObjectSink { pub unsafe fn Indicate(&self, lobjectcount: i32, apobjarray: *const ::core::option::Option<IWbemClassObject>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(lobjectcount), ::core::mem::transmute(apobjarray)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetStatus<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, IWbemClassObject>>(&self, lflags: i32, hresult: ::windows::core::HRESULT, strparam: Param2, pobjparam: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(hresult), strparam.into_param().abi(), pobjparam.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IWbemObjectSink { type Vtable = IWbemObjectSink_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7c857801_7381_11cf_884d_00aa004b2e24); } impl ::core::convert::From<IWbemObjectSink> for ::windows::core::IUnknown { fn from(value: IWbemObjectSink) -> Self { value.0 } } impl ::core::convert::From<&IWbemObjectSink> for ::windows::core::IUnknown { fn from(value: &IWbemObjectSink) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemObjectSink { 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 IWbemObjectSink { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemObjectSink_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, lobjectcount: i32, apobjarray: *const ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, hresult: ::windows::core::HRESULT, strparam: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pobjparam: ::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 IWbemObjectSinkEx(pub ::windows::core::IUnknown); impl IWbemObjectSinkEx { pub unsafe fn Indicate(&self, lobjectcount: i32, apobjarray: *const ::core::option::Option<IWbemClassObject>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(lobjectcount), ::core::mem::transmute(apobjarray)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetStatus<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, IWbemClassObject>>(&self, lflags: i32, hresult: ::windows::core::HRESULT, strparam: Param2, pobjparam: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(hresult), strparam.into_param().abi(), pobjparam.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn WriteMessage<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, uchannel: u32, strmessage: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(uchannel), strmessage.into_param().abi()).ok() } pub unsafe fn WriteError<'a, Param0: ::windows::core::IntoParam<'a, IWbemClassObject>>(&self, pobjerror: Param0) -> ::windows::core::Result<u8> { let mut result__: <u8 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pobjerror.into_param().abi(), &mut result__).from_abi::<u8>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PromptUser<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strmessage: Param0, uprompttype: u8) -> ::windows::core::Result<u8> { let mut result__: <u8 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), strmessage.into_param().abi(), ::core::mem::transmute(uprompttype), &mut result__).from_abi::<u8>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn WriteProgress<'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, stractivity: Param0, strcurrentoperation: Param1, strstatusdescription: Param2, upercentcomplete: u32, usecondsremaining: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), stractivity.into_param().abi(), strcurrentoperation.into_param().abi(), strstatusdescription.into_param().abi(), ::core::mem::transmute(upercentcomplete), ::core::mem::transmute(usecondsremaining)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn WriteStreamParameter<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, strname: Param0, vtvalue: *const super::Com::VARIANT, ultype: u32, ulflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), strname.into_param().abi(), ::core::mem::transmute(vtvalue), ::core::mem::transmute(ultype), ::core::mem::transmute(ulflags)).ok() } } unsafe impl ::windows::core::Interface for IWbemObjectSinkEx { type Vtable = IWbemObjectSinkEx_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe7d35cfa_348b_485e_b524_252725d697ca); } impl ::core::convert::From<IWbemObjectSinkEx> for ::windows::core::IUnknown { fn from(value: IWbemObjectSinkEx) -> Self { value.0 } } impl ::core::convert::From<&IWbemObjectSinkEx> for ::windows::core::IUnknown { fn from(value: &IWbemObjectSinkEx) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemObjectSinkEx { 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 IWbemObjectSinkEx { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IWbemObjectSinkEx> for IWbemObjectSink { fn from(value: IWbemObjectSinkEx) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IWbemObjectSinkEx> for IWbemObjectSink { fn from(value: &IWbemObjectSinkEx) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IWbemObjectSink> for IWbemObjectSinkEx { fn into_param(self) -> ::windows::core::Param<'a, IWbemObjectSink> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IWbemObjectSink> for &IWbemObjectSinkEx { fn into_param(self) -> ::windows::core::Param<'a, IWbemObjectSink> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IWbemObjectSinkEx_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, lobjectcount: i32, apobjarray: *const ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, hresult: ::windows::core::HRESULT, strparam: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pobjparam: ::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, uchannel: u32, strmessage: ::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, pobjerror: ::windows::core::RawPtr, pureturned: *mut u8) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strmessage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, uprompttype: u8, pureturned: *mut u8) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, stractivity: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strcurrentoperation: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strstatusdescription: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, upercentcomplete: u32, usecondsremaining: u32) -> ::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, strname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, vtvalue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ultype: u32, ulflags: u32) -> ::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 IWbemObjectTextSrc(pub ::windows::core::IUnknown); impl IWbemObjectTextSrc { #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetText<'a, Param1: ::windows::core::IntoParam<'a, IWbemClassObject>, Param3: ::windows::core::IntoParam<'a, IWbemContext>>(&self, lflags: i32, pobj: Param1, uobjtextformat: u32, pctx: Param3) -> ::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).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), pobj.into_param().abi(), ::core::mem::transmute(uobjtextformat), pctx.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateFromText<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>>(&self, lflags: i32, strtext: Param1, uobjtextformat: u32, pctx: Param3) -> ::windows::core::Result<IWbemClassObject> { let mut result__: <IWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), strtext.into_param().abi(), ::core::mem::transmute(uobjtextformat), pctx.into_param().abi(), &mut result__).from_abi::<IWbemClassObject>(result__) } } unsafe impl ::windows::core::Interface for IWbemObjectTextSrc { type Vtable = IWbemObjectTextSrc_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbfbf883a_cad7_11d3_a11b_00105a1f515a); } impl ::core::convert::From<IWbemObjectTextSrc> for ::windows::core::IUnknown { fn from(value: IWbemObjectTextSrc) -> Self { value.0 } } impl ::core::convert::From<&IWbemObjectTextSrc> for ::windows::core::IUnknown { fn from(value: &IWbemObjectTextSrc) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemObjectTextSrc { 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 IWbemObjectTextSrc { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemObjectTextSrc_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, lflags: i32, pobj: ::windows::core::RawPtr, uobjtextformat: u32, pctx: ::windows::core::RawPtr, strtext: *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, lflags: i32, strtext: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, uobjtextformat: u32, pctx: ::windows::core::RawPtr, pnewobj: *mut ::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 IWbemPath(pub ::windows::core::IUnknown); impl IWbemPath { #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetText<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, umode: u32, pszpath: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(umode), pszpath.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetText(&self, lflags: i32, pubufflength: *mut u32, psztext: super::super::Foundation::PWSTR) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(pubufflength), ::core::mem::transmute(psztext)).ok() } pub unsafe fn GetInfo(&self, urequestedinfo: u32) -> ::windows::core::Result<u64> { let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(urequestedinfo), &mut result__).from_abi::<u64>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServer<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, name: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), name.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetServer(&self, punamebuflength: *mut u32, pname: super::super::Foundation::PWSTR) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(punamebuflength), ::core::mem::transmute(pname)).ok() } pub unsafe fn GetNamespaceCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetNamespaceAt<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, uindex: u32, pszname: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(uindex), pszname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetNamespaceAt(&self, uindex: u32, punamebuflength: *mut u32, pname: super::super::Foundation::PWSTR) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(uindex), ::core::mem::transmute(punamebuflength), ::core::mem::transmute(pname)).ok() } pub unsafe fn RemoveNamespaceAt(&self, uindex: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(uindex)).ok() } pub unsafe fn RemoveAllNamespaces(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn GetScopeCount(&self) -> ::windows::core::Result<u32> { let mut result__: <u32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetScope<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, uindex: u32, pszclass: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(uindex), pszclass.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetScopeFromText<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, uindex: u32, psztext: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), ::core::mem::transmute(uindex), psztext.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetScope(&self, uindex: u32, puclassnamebufsize: *mut u32, pszclass: super::super::Foundation::PWSTR, pkeylist: *mut ::core::option::Option<IWbemPathKeyList>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), ::core::mem::transmute(uindex), ::core::mem::transmute(puclassnamebufsize), ::core::mem::transmute(pszclass), ::core::mem::transmute(pkeylist)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetScopeAsText(&self, uindex: u32, putextbufsize: *mut u32, psztext: super::super::Foundation::PWSTR) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), ::core::mem::transmute(uindex), ::core::mem::transmute(putextbufsize), ::core::mem::transmute(psztext)).ok() } pub unsafe fn RemoveScope(&self, uindex: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(uindex)).ok() } pub unsafe fn RemoveAllScopes(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetClassName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, name: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), name.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetClassName(&self, pubufflength: *mut u32, pszname: super::super::Foundation::PWSTR) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(pubufflength), ::core::mem::transmute(pszname)).ok() } pub unsafe fn GetKeyList(&self) -> ::windows::core::Result<IWbemPathKeyList> { let mut result__: <IWbemPathKeyList as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IWbemPathKeyList>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateClassPart<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, lflags: i32, name: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), name.into_param().abi()).ok() } pub unsafe fn DeleteClassPart(&self, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn IsRelative<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszmachine: Param0, wsznamespace: Param1) -> super::super::Foundation::BOOL { ::core::mem::transmute((::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), wszmachine.into_param().abi(), wsznamespace.into_param().abi())) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn IsRelativeOrChild<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszmachine: Param0, wsznamespace: Param1, lflags: i32) -> super::super::Foundation::BOOL { ::core::mem::transmute((::windows::core::Interface::vtable(self).26)(::core::mem::transmute_copy(self), wszmachine.into_param().abi(), wsznamespace.into_param().abi(), ::core::mem::transmute(lflags))) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn IsLocal<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszmachine: Param0) -> super::super::Foundation::BOOL { ::core::mem::transmute((::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), wszmachine.into_param().abi())) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn IsSameClassName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszclass: Param0) -> super::super::Foundation::BOOL { ::core::mem::transmute((::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), wszclass.into_param().abi())) } } unsafe impl ::windows::core::Interface for IWbemPath { type Vtable = IWbemPath_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3bc15af2_736c_477e_9e51_238af8667dcc); } impl ::core::convert::From<IWbemPath> for ::windows::core::IUnknown { fn from(value: IWbemPath) -> Self { value.0 } } impl ::core::convert::From<&IWbemPath> for ::windows::core::IUnknown { fn from(value: &IWbemPath) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemPath { 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 IWbemPath { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemPath_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, umode: u32, pszpath: 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, lflags: i32, pubufflength: *mut u32, psztext: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, urequestedinfo: u32, puresponse: *mut u64) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, name: 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, punamebuflength: *mut u32, pname: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pucount: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uindex: u32, pszname: 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, uindex: u32, punamebuflength: *mut u32, pname: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uindex: 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, pucount: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uindex: u32, pszclass: 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, uindex: u32, psztext: 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, uindex: u32, puclassnamebufsize: *mut u32, pszclass: super::super::Foundation::PWSTR, pkeylist: *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, uindex: u32, putextbufsize: *mut u32, psztext: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uindex: u32) -> ::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, name: 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, pubufflength: *mut u32, pszname: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pout: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, name: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszmachine: super::super::Foundation::PWSTR, wsznamespace: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszmachine: super::super::Foundation::PWSTR, wsznamespace: super::super::Foundation::PWSTR, lflags: i32) -> super::super::Foundation::BOOL, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszmachine: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszclass: super::super::Foundation::PWSTR) -> super::super::Foundation::BOOL, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemPathKeyList(pub ::windows::core::IUnknown); impl IWbemPathKeyList { pub unsafe fn GetCount(&self) -> ::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), &mut result__).from_abi::<u32>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetKey<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, uflags: u32, ucimtype: u32, pkeyval: *const ::core::ffi::c_void) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(uflags), ::core::mem::transmute(ucimtype), ::core::mem::transmute(pkeyval)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetKey2<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, uflags: u32, ucimtype: u32, pkeyval: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(uflags), ::core::mem::transmute(ucimtype), ::core::mem::transmute(pkeyval)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetKey(&self, ukeyix: u32, uflags: u32, punamebufsize: *mut u32, pszkeyname: super::super::Foundation::PWSTR, pukeyvalbufsize: *mut u32, pkeyval: *mut ::core::ffi::c_void, puapparentcimtype: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(ukeyix), ::core::mem::transmute(uflags), ::core::mem::transmute(punamebufsize), ::core::mem::transmute(pszkeyname), ::core::mem::transmute(pukeyvalbufsize), ::core::mem::transmute(pkeyval), ::core::mem::transmute(puapparentcimtype)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetKey2(&self, ukeyix: u32, uflags: u32, punamebufsize: *mut u32, pszkeyname: super::super::Foundation::PWSTR, pkeyvalue: *mut super::Com::VARIANT, puapparentcimtype: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(ukeyix), ::core::mem::transmute(uflags), ::core::mem::transmute(punamebufsize), ::core::mem::transmute(pszkeyname), ::core::mem::transmute(pkeyvalue), ::core::mem::transmute(puapparentcimtype)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn RemoveKey<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, uflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(uflags)).ok() } pub unsafe fn RemoveAllKeys(&self, uflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(uflags)).ok() } pub unsafe fn MakeSingleton(&self, bset: u8) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), ::core::mem::transmute(bset)).ok() } pub unsafe fn GetInfo(&self, urequestedinfo: u32) -> ::windows::core::Result<u64> { let mut result__: <u64 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(urequestedinfo), &mut result__).from_abi::<u64>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetText(&self, lflags: i32, pubufflength: *mut u32, psztext: super::super::Foundation::PWSTR) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(pubufflength), ::core::mem::transmute(psztext)).ok() } } unsafe impl ::windows::core::Interface for IWbemPathKeyList { type Vtable = IWbemPathKeyList_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9ae62877_7544_4bb0_aa26_a13824659ed6); } impl ::core::convert::From<IWbemPathKeyList> for ::windows::core::IUnknown { fn from(value: IWbemPathKeyList) -> Self { value.0 } } impl ::core::convert::From<&IWbemPathKeyList> for ::windows::core::IUnknown { fn from(value: &IWbemPathKeyList) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemPathKeyList { 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 IWbemPathKeyList { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemPathKeyList_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, pukeycount: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszname: super::super::Foundation::PWSTR, uflags: u32, ucimtype: u32, pkeyval: *const ::core::ffi::c_void) -> ::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, wszname: super::super::Foundation::PWSTR, uflags: u32, ucimtype: u32, pkeyval: *const ::core::mem::ManuallyDrop<super::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, ukeyix: u32, uflags: u32, punamebufsize: *mut u32, pszkeyname: super::super::Foundation::PWSTR, pukeyvalbufsize: *mut u32, pkeyval: *mut ::core::ffi::c_void, puapparentcimtype: *mut u32) -> ::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, ukeyix: u32, uflags: u32, punamebufsize: *mut u32, pszkeyname: super::super::Foundation::PWSTR, pkeyvalue: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, puapparentcimtype: *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, wszname: super::super::Foundation::PWSTR, uflags: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uflags: u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, bset: u8) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, urequestedinfo: u32, puresponse: *mut u64) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, pubufflength: *mut u32, psztext: 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 IWbemPropertyProvider(pub ::windows::core::IUnknown); impl IWbemPropertyProvider { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn GetProperty<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, lflags: i32, strlocale: Param1, strclassmapping: Param2, strinstmapping: Param3, strpropmapping: Param4) -> ::windows::core::Result<super::Com::VARIANT> { let mut result__: <super::Com::VARIANT as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), strlocale.into_param().abi(), strclassmapping.into_param().abi(), strinstmapping.into_param().abi(), strpropmapping.into_param().abi(), &mut result__).from_abi::<super::Com::VARIANT>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PutProperty<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>( &self, lflags: i32, strlocale: Param1, strclassmapping: Param2, strinstmapping: Param3, strpropmapping: Param4, pvvalue: *const super::Com::VARIANT, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), strlocale.into_param().abi(), strclassmapping.into_param().abi(), strinstmapping.into_param().abi(), strpropmapping.into_param().abi(), ::core::mem::transmute(pvvalue)).ok() } } unsafe impl ::windows::core::Interface for IWbemPropertyProvider { type Vtable = IWbemPropertyProvider_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xce61e841_65bc_11d0_b6bd_00aa003240c7); } impl ::core::convert::From<IWbemPropertyProvider> for ::windows::core::IUnknown { fn from(value: IWbemPropertyProvider) -> Self { value.0 } } impl ::core::convert::From<&IWbemPropertyProvider> for ::windows::core::IUnknown { fn from(value: &IWbemPropertyProvider) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemPropertyProvider { 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 IWbemPropertyProvider { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemPropertyProvider_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_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, strlocale: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strclassmapping: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strinstmapping: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strpropmapping: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvvalue: *mut ::core::mem::ManuallyDrop<super::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, lflags: i32, strlocale: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strclassmapping: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strinstmapping: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strpropmapping: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pvvalue: *const ::core::mem::ManuallyDrop<super::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 IWbemProviderIdentity(pub ::windows::core::IUnknown); impl IWbemProviderIdentity { pub unsafe fn SetRegistrationObject<'a, Param1: ::windows::core::IntoParam<'a, IWbemClassObject>>(&self, lflags: i32, pprovreg: Param1) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), pprovreg.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IWbemProviderIdentity { type Vtable = IWbemProviderIdentity_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x631f7d97_d993_11d2_b339_00105a1f4aaf); } impl ::core::convert::From<IWbemProviderIdentity> for ::windows::core::IUnknown { fn from(value: IWbemProviderIdentity) -> Self { value.0 } } impl ::core::convert::From<&IWbemProviderIdentity> for ::windows::core::IUnknown { fn from(value: &IWbemProviderIdentity) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemProviderIdentity { 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 IWbemProviderIdentity { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemProviderIdentity_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, lflags: i32, pprovreg: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemProviderInit(pub ::windows::core::IUnknown); impl IWbemProviderInit { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Initialize<'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>, Param4: ::windows::core::IntoParam<'a, IWbemServices>, Param5: ::windows::core::IntoParam<'a, IWbemContext>, Param6: ::windows::core::IntoParam<'a, IWbemProviderInitSink>>( &self, wszuser: Param0, lflags: i32, wsznamespace: Param2, wszlocale: Param3, pnamespace: Param4, pctx: Param5, pinitsink: Param6, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), wszuser.into_param().abi(), ::core::mem::transmute(lflags), wsznamespace.into_param().abi(), wszlocale.into_param().abi(), pnamespace.into_param().abi(), pctx.into_param().abi(), pinitsink.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IWbemProviderInit { type Vtable = IWbemProviderInit_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1be41572_91dd_11d1_aeb2_00c04fb68820); } impl ::core::convert::From<IWbemProviderInit> for ::windows::core::IUnknown { fn from(value: IWbemProviderInit) -> Self { value.0 } } impl ::core::convert::From<&IWbemProviderInit> for ::windows::core::IUnknown { fn from(value: &IWbemProviderInit) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemProviderInit { 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 IWbemProviderInit { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemProviderInit_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, wszuser: super::super::Foundation::PWSTR, lflags: i32, wsznamespace: super::super::Foundation::PWSTR, wszlocale: super::super::Foundation::PWSTR, pnamespace: ::windows::core::RawPtr, pctx: ::windows::core::RawPtr, pinitsink: ::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 IWbemProviderInitSink(pub ::windows::core::IUnknown); impl IWbemProviderInitSink { pub unsafe fn SetStatus(&self, lstatus: i32, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(lstatus), ::core::mem::transmute(lflags)).ok() } } unsafe impl ::windows::core::Interface for IWbemProviderInitSink { type Vtable = IWbemProviderInitSink_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x1be41571_91dd_11d1_aeb2_00c04fb68820); } impl ::core::convert::From<IWbemProviderInitSink> for ::windows::core::IUnknown { fn from(value: IWbemProviderInitSink) -> Self { value.0 } } impl ::core::convert::From<&IWbemProviderInitSink> for ::windows::core::IUnknown { fn from(value: &IWbemProviderInitSink) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemProviderInitSink { 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 IWbemProviderInitSink { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemProviderInitSink_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, lstatus: i32, lflags: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemQualifierSet(pub ::windows::core::IUnknown); impl IWbemQualifierSet { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Get<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, lflags: i32, pval: *mut super::Com::VARIANT, plflavor: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(lflags), ::core::mem::transmute(pval), ::core::mem::transmute(plflavor)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Put<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0, pval: *const super::Com::VARIANT, lflavor: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), wszname.into_param().abi(), ::core::mem::transmute(pval), ::core::mem::transmute(lflavor)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Delete<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, wszname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), wszname.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetNames(&self, lflags: i32) -> ::windows::core::Result<*mut super::Com::SAFEARRAY> { let mut result__: <*mut super::Com::SAFEARRAY as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), &mut result__).from_abi::<*mut super::Com::SAFEARRAY>(result__) } pub unsafe fn BeginEnumeration(&self, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Next(&self, lflags: i32, pstrname: *mut super::super::Foundation::BSTR, pval: *mut super::Com::VARIANT, plflavor: *mut i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), ::core::mem::transmute(pstrname), ::core::mem::transmute(pval), ::core::mem::transmute(plflavor)).ok() } pub unsafe fn EndEnumeration(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IWbemQualifierSet { type Vtable = IWbemQualifierSet_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdc12a680_737f_11cf_884d_00aa004b2e24); } impl ::core::convert::From<IWbemQualifierSet> for ::windows::core::IUnknown { fn from(value: IWbemQualifierSet) -> Self { value.0 } } impl ::core::convert::From<&IWbemQualifierSet> for ::windows::core::IUnknown { fn from(value: &IWbemQualifierSet) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemQualifierSet { 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 IWbemQualifierSet { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemQualifierSet_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_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, wszname: super::super::Foundation::PWSTR, lflags: i32, pval: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, plflavor: *mut i32) -> ::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, wszname: super::super::Foundation::PWSTR, pval: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, lflavor: i32) -> ::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, wszname: super::super::Foundation::PWSTR) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, pnames: *mut *mut super::Com::SAFEARRAY) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32) -> ::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, lflags: i32, pstrname: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pval: *mut ::core::mem::ManuallyDrop<super::Com::VARIANT>, plflavor: *mut i32) -> ::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, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemQuery(pub ::windows::core::IUnknown); impl IWbemQuery { pub unsafe fn Empty(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SetLanguageFeatures(&self, uflags: u32, uarraysize: u32, pufeatures: *const u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(uflags), ::core::mem::transmute(uarraysize), ::core::mem::transmute(pufeatures)).ok() } pub unsafe fn TestLanguageFeatures(&self, uflags: u32, uarraysize: *mut u32, pufeatures: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(uflags), ::core::mem::transmute(uarraysize), ::core::mem::transmute(pufeatures)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Parse<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszlang: Param0, pszquery: Param1, uflags: u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), pszlang.into_param().abi(), pszquery.into_param().abi(), ::core::mem::transmute(uflags)).ok() } pub unsafe fn GetAnalysis(&self, uanalysistype: u32, uflags: u32, panalysis: *mut *mut ::core::ffi::c_void) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(uanalysistype), ::core::mem::transmute(uflags), ::core::mem::transmute(panalysis)).ok() } pub unsafe fn FreeMemory(&self, pmem: *const ::core::ffi::c_void) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(pmem)).ok() } pub unsafe fn GetQueryInfo(&self, uanalysistype: u32, uinfoid: u32, ubufsize: u32, pdestbuf: *mut ::core::ffi::c_void) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(uanalysistype), ::core::mem::transmute(uinfoid), ::core::mem::transmute(ubufsize), ::core::mem::transmute(pdestbuf)).ok() } } unsafe impl ::windows::core::Interface for IWbemQuery { type Vtable = IWbemQuery_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x81166f58_dd98_11d3_a120_00105a1f515a); } impl ::core::convert::From<IWbemQuery> for ::windows::core::IUnknown { fn from(value: IWbemQuery) -> Self { value.0 } } impl ::core::convert::From<&IWbemQuery> for ::windows::core::IUnknown { fn from(value: &IWbemQuery) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemQuery { 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 IWbemQuery { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemQuery_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) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uflags: u32, uarraysize: u32, pufeatures: *const u32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uflags: u32, uarraysize: *mut u32, pufeatures: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszlang: super::super::Foundation::PWSTR, pszquery: super::super::Foundation::PWSTR, uflags: u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uanalysistype: u32, uflags: u32, panalysis: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pmem: *const ::core::ffi::c_void) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uanalysistype: u32, uinfoid: u32, ubufsize: u32, pdestbuf: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemRefresher(pub ::windows::core::IUnknown); impl IWbemRefresher { pub unsafe fn Refresh(&self, lflags: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags)).ok() } } unsafe impl ::windows::core::Interface for IWbemRefresher { type Vtable = IWbemRefresher_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x49353c99_516b_11d1_aea6_00c04fb68820); } impl ::core::convert::From<IWbemRefresher> for ::windows::core::IUnknown { fn from(value: IWbemRefresher) -> Self { value.0 } } impl ::core::convert::From<&IWbemRefresher> for ::windows::core::IUnknown { fn from(value: &IWbemRefresher) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemRefresher { 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 IWbemRefresher { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemRefresher_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, lflags: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemServices(pub ::windows::core::IUnknown); impl IWbemServices { #[cfg(feature = "Win32_Foundation")] pub unsafe fn OpenNamespace<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, IWbemContext>>(&self, strnamespace: Param0, lflags: i32, pctx: Param2, ppworkingnamespace: *mut ::core::option::Option<IWbemServices>, ppresult: *mut ::core::option::Option<IWbemCallResult>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), strnamespace.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), ::core::mem::transmute(ppworkingnamespace), ::core::mem::transmute(ppresult)).ok() } pub unsafe fn CancelAsyncCall<'a, Param0: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, psink: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), psink.into_param().abi()).ok() } pub unsafe fn QueryObjectSink(&self, lflags: i32) -> ::windows::core::Result<IWbemObjectSink> { let mut result__: <IWbemObjectSink as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(lflags), &mut result__).from_abi::<IWbemObjectSink>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetObject<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, IWbemContext>>(&self, strobjectpath: Param0, lflags: i32, pctx: Param2, ppobject: *mut ::core::option::Option<IWbemClassObject>, ppcallresult: *mut ::core::option::Option<IWbemCallResult>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), ::core::mem::transmute(ppobject), ::core::mem::transmute(ppcallresult)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetObjectAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, IWbemContext>, Param3: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, strobjectpath: Param0, lflags: i32, pctx: Param2, presponsehandler: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), presponsehandler.into_param().abi()).ok() } pub unsafe fn PutClass<'a, Param0: ::windows::core::IntoParam<'a, IWbemClassObject>, Param2: ::windows::core::IntoParam<'a, IWbemContext>>(&self, pobject: Param0, lflags: i32, pctx: Param2, ppcallresult: *mut ::core::option::Option<IWbemCallResult>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), pobject.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), ::core::mem::transmute(ppcallresult)).ok() } pub unsafe fn PutClassAsync<'a, Param0: ::windows::core::IntoParam<'a, IWbemClassObject>, Param2: ::windows::core::IntoParam<'a, IWbemContext>, Param3: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, pobject: Param0, lflags: i32, pctx: Param2, presponsehandler: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), pobject.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), presponsehandler.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DeleteClass<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, IWbemContext>>(&self, strclass: Param0, lflags: i32, pctx: Param2, ppcallresult: *mut ::core::option::Option<IWbemCallResult>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), strclass.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), ::core::mem::transmute(ppcallresult)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DeleteClassAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, IWbemContext>, Param3: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, strclass: Param0, lflags: i32, pctx: Param2, presponsehandler: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), strclass.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), presponsehandler.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateClassEnum<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, IWbemContext>>(&self, strsuperclass: Param0, lflags: i32, pctx: Param2) -> ::windows::core::Result<IEnumWbemClassObject> { let mut result__: <IEnumWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), strsuperclass.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), &mut result__).from_abi::<IEnumWbemClassObject>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateClassEnumAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, IWbemContext>, Param3: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, strsuperclass: Param0, lflags: i32, pctx: Param2, presponsehandler: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), strsuperclass.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), presponsehandler.into_param().abi()).ok() } pub unsafe fn PutInstance<'a, Param0: ::windows::core::IntoParam<'a, IWbemClassObject>, Param2: ::windows::core::IntoParam<'a, IWbemContext>>(&self, pinst: Param0, lflags: i32, pctx: Param2, ppcallresult: *mut ::core::option::Option<IWbemCallResult>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), pinst.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), ::core::mem::transmute(ppcallresult)).ok() } pub unsafe fn PutInstanceAsync<'a, Param0: ::windows::core::IntoParam<'a, IWbemClassObject>, Param2: ::windows::core::IntoParam<'a, IWbemContext>, Param3: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, pinst: Param0, lflags: i32, pctx: Param2, presponsehandler: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), pinst.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), presponsehandler.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DeleteInstance<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, IWbemContext>>(&self, strobjectpath: Param0, lflags: i32, pctx: Param2, ppcallresult: *mut ::core::option::Option<IWbemCallResult>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), ::core::mem::transmute(ppcallresult)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DeleteInstanceAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, IWbemContext>, Param3: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, strobjectpath: Param0, lflags: i32, pctx: Param2, presponsehandler: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), presponsehandler.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateInstanceEnum<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, IWbemContext>>(&self, strfilter: Param0, lflags: i32, pctx: Param2) -> ::windows::core::Result<IEnumWbemClassObject> { let mut result__: <IEnumWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), strfilter.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), &mut result__).from_abi::<IEnumWbemClassObject>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateInstanceEnumAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param2: ::windows::core::IntoParam<'a, IWbemContext>, Param3: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, strfilter: Param0, lflags: i32, pctx: Param2, presponsehandler: Param3) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), strfilter.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), presponsehandler.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ExecQuery<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>>(&self, strquerylanguage: Param0, strquery: Param1, lflags: i32, pctx: Param3) -> ::windows::core::Result<IEnumWbemClassObject> { let mut result__: <IEnumWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), strquerylanguage.into_param().abi(), strquery.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), &mut result__).from_abi::<IEnumWbemClassObject>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ExecQueryAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>, Param4: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, strquerylanguage: Param0, strquery: Param1, lflags: i32, pctx: Param3, presponsehandler: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), strquerylanguage.into_param().abi(), strquery.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), presponsehandler.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ExecNotificationQuery<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>>(&self, strquerylanguage: Param0, strquery: Param1, lflags: i32, pctx: Param3) -> ::windows::core::Result<IEnumWbemClassObject> { let mut result__: <IEnumWbemClassObject as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), strquerylanguage.into_param().abi(), strquery.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), &mut result__).from_abi::<IEnumWbemClassObject>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ExecNotificationQueryAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>, Param4: ::windows::core::IntoParam<'a, IWbemObjectSink>>(&self, strquerylanguage: Param0, strquery: Param1, lflags: i32, pctx: Param3, presponsehandler: Param4) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), strquerylanguage.into_param().abi(), strquery.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), presponsehandler.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ExecMethod<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>, Param4: ::windows::core::IntoParam<'a, IWbemClassObject>>( &self, strobjectpath: Param0, strmethodname: Param1, lflags: i32, pctx: Param3, pinparams: Param4, ppoutparams: *mut ::core::option::Option<IWbemClassObject>, ppcallresult: *mut ::core::option::Option<IWbemCallResult>, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), strmethodname.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), pinparams.into_param().abi(), ::core::mem::transmute(ppoutparams), ::core::mem::transmute(ppcallresult)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ExecMethodAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>, Param3: ::windows::core::IntoParam<'a, IWbemContext>, Param4: ::windows::core::IntoParam<'a, IWbemClassObject>, Param5: ::windows::core::IntoParam<'a, IWbemObjectSink>>( &self, strobjectpath: Param0, strmethodname: Param1, lflags: i32, pctx: Param3, pinparams: Param4, presponsehandler: Param5, ) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), strobjectpath.into_param().abi(), strmethodname.into_param().abi(), ::core::mem::transmute(lflags), pctx.into_param().abi(), pinparams.into_param().abi(), presponsehandler.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IWbemServices { type Vtable = IWbemServices_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9556dc99_828c_11cf_a37e_00aa003240c7); } impl ::core::convert::From<IWbemServices> for ::windows::core::IUnknown { fn from(value: IWbemServices) -> Self { value.0 } } impl ::core::convert::From<&IWbemServices> for ::windows::core::IUnknown { fn from(value: &IWbemServices) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemServices { 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 IWbemServices { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemServices_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, strnamespace: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, ppworkingnamespace: *mut ::windows::core::RawPtr, ppresult: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psink: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lflags: i32, ppresponsehandler: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, ppobject: *mut ::windows::core::RawPtr, ppcallresult: *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, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, presponsehandler: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pobject: ::windows::core::RawPtr, lflags: i32, pctx: ::windows::core::RawPtr, ppcallresult: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pobject: ::windows::core::RawPtr, lflags: i32, pctx: ::windows::core::RawPtr, presponsehandler: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, ppcallresult: *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, strclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, presponsehandler: ::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, strsuperclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, ppenum: *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, strsuperclass: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, presponsehandler: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pinst: ::windows::core::RawPtr, lflags: i32, pctx: ::windows::core::RawPtr, ppcallresult: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pinst: ::windows::core::RawPtr, lflags: i32, pctx: ::windows::core::RawPtr, presponsehandler: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, ppcallresult: *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, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, presponsehandler: ::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, strfilter: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, ppenum: *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, strfilter: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, presponsehandler: ::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, strquerylanguage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strquery: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, ppenum: *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, strquerylanguage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strquery: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, presponsehandler: ::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, strquerylanguage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strquery: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, ppenum: *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, strquerylanguage: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strquery: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, presponsehandler: ::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, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strmethodname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, pinparams: ::windows::core::RawPtr, ppoutparams: *mut ::windows::core::RawPtr, ppcallresult: *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, strobjectpath: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, strmethodname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, lflags: i32, pctx: ::windows::core::RawPtr, pinparams: ::windows::core::RawPtr, presponsehandler: ::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 IWbemShutdown(pub ::windows::core::IUnknown); impl IWbemShutdown { pub unsafe fn Shutdown<'a, Param2: ::windows::core::IntoParam<'a, IWbemContext>>(&self, ureason: i32, umaxmilliseconds: u32, pctx: Param2) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(ureason), ::core::mem::transmute(umaxmilliseconds), pctx.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IWbemShutdown { type Vtable = IWbemShutdown_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb7b31df9_d515_11d3_a11c_00105a1f515a); } impl ::core::convert::From<IWbemShutdown> for ::windows::core::IUnknown { fn from(value: IWbemShutdown) -> Self { value.0 } } impl ::core::convert::From<&IWbemShutdown> for ::windows::core::IUnknown { fn from(value: &IWbemShutdown) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemShutdown { 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 IWbemShutdown { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemShutdown_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, ureason: i32, umaxmilliseconds: u32, pctx: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemStatusCodeText(pub ::windows::core::IUnknown); impl IWbemStatusCodeText { #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetErrorCodeText(&self, hres: ::windows::core::HRESULT, localeid: u32, lflags: i32) -> ::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).3)(::core::mem::transmute_copy(self), ::core::mem::transmute(hres), ::core::mem::transmute(localeid), ::core::mem::transmute(lflags), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetFacilityCodeText(&self, hres: ::windows::core::HRESULT, localeid: u32, lflags: i32) -> ::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).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(hres), ::core::mem::transmute(localeid), ::core::mem::transmute(lflags), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } } unsafe impl ::windows::core::Interface for IWbemStatusCodeText { type Vtable = IWbemStatusCodeText_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeb87e1bc_3233_11d2_aec9_00c04fb68820); } impl ::core::convert::From<IWbemStatusCodeText> for ::windows::core::IUnknown { fn from(value: IWbemStatusCodeText) -> Self { value.0 } } impl ::core::convert::From<&IWbemStatusCodeText> for ::windows::core::IUnknown { fn from(value: &IWbemStatusCodeText) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemStatusCodeText { 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 IWbemStatusCodeText { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemStatusCodeText_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, hres: ::windows::core::HRESULT, localeid: u32, lflags: i32, messagetext: *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, hres: ::windows::core::HRESULT, localeid: u32, lflags: i32, messagetext: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::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 IWbemTransport(pub ::windows::core::IUnknown); impl IWbemTransport { pub unsafe fn Initialize(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IWbemTransport { type Vtable = IWbemTransport_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x553fe584_2156_11d0_b6ae_00aa003240c7); } impl ::core::convert::From<IWbemTransport> for ::windows::core::IUnknown { fn from(value: IWbemTransport) -> Self { value.0 } } impl ::core::convert::From<&IWbemTransport> for ::windows::core::IUnknown { fn from(value: &IWbemTransport) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemTransport { 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 IWbemTransport { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemTransport_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) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemUnboundObjectSink(pub ::windows::core::IUnknown); impl IWbemUnboundObjectSink { pub unsafe fn IndicateToConsumer<'a, Param0: ::windows::core::IntoParam<'a, IWbemClassObject>>(&self, plogicalconsumer: Param0, lnumobjects: i32, apobjects: *const ::core::option::Option<IWbemClassObject>) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), plogicalconsumer.into_param().abi(), ::core::mem::transmute(lnumobjects), ::core::mem::transmute(apobjects)).ok() } } unsafe impl ::windows::core::Interface for IWbemUnboundObjectSink { type Vtable = IWbemUnboundObjectSink_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe246107b_b06e_11d0_ad61_00c04fd8fdff); } impl ::core::convert::From<IWbemUnboundObjectSink> for ::windows::core::IUnknown { fn from(value: IWbemUnboundObjectSink) -> Self { value.0 } } impl ::core::convert::From<&IWbemUnboundObjectSink> for ::windows::core::IUnknown { fn from(value: &IWbemUnboundObjectSink) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemUnboundObjectSink { 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 IWbemUnboundObjectSink { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IWbemUnboundObjectSink_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, plogicalconsumer: ::windows::core::RawPtr, lnumobjects: i32, apobjects: *const ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IWbemUnsecuredApartment(pub ::windows::core::IUnknown); impl IWbemUnsecuredApartment { pub unsafe fn CreateObjectStub<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(&self, pobject: Param0) -> ::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).3)(::core::mem::transmute_copy(self), pobject.into_param().abi(), &mut result__).from_abi::<::windows::core::IUnknown>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateSinkStub<'a, Param0: ::windows::core::IntoParam<'a, IWbemObjectSink>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, psink: Param0, dwflags: u32, wszreserved: Param2) -> ::windows::core::Result<IWbemObjectSink> { let mut result__: <IWbemObjectSink as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), psink.into_param().abi(), ::core::mem::transmute(dwflags), wszreserved.into_param().abi(), &mut result__).from_abi::<IWbemObjectSink>(result__) } } unsafe impl ::windows::core::Interface for IWbemUnsecuredApartment { type Vtable = IWbemUnsecuredApartment_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x31739d04_3471_4cf4_9a7c_57a44ae71956); } impl ::core::convert::From<IWbemUnsecuredApartment> for ::windows::core::IUnknown { fn from(value: IWbemUnsecuredApartment) -> Self { value.0 } } impl ::core::convert::From<&IWbemUnsecuredApartment> for ::windows::core::IUnknown { fn from(value: &IWbemUnsecuredApartment) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IWbemUnsecuredApartment { 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 IWbemUnsecuredApartment { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IWbemUnsecuredApartment> for IUnsecuredApartment { fn from(value: IWbemUnsecuredApartment) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IWbemUnsecuredApartment> for IUnsecuredApartment { fn from(value: &IWbemUnsecuredApartment) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IUnsecuredApartment> for IWbemUnsecuredApartment { fn into_param(self) -> ::windows::core::Param<'a, IUnsecuredApartment> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IUnsecuredApartment> for &IWbemUnsecuredApartment { fn into_param(self) -> ::windows::core::Param<'a, IUnsecuredApartment> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IWbemUnsecuredApartment_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, pobject: ::windows::core::RawPtr, ppstub: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psink: ::windows::core::RawPtr, dwflags: u32, wszreserved: super::super::Foundation::PWSTR, ppstub: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Application { pub reserved1: u64, pub reserved2: isize, pub ft: *mut MI_ApplicationFT, } impl MI_Application {} impl ::core::default::Default for MI_Application { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Application { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Application").field("reserved1", &self.reserved1).field("reserved2", &self.reserved2).field("ft", &self.ft).finish() } } impl ::core::cmp::PartialEq for MI_Application { fn eq(&self, other: &Self) -> bool { self.reserved1 == other.reserved1 && self.reserved2 == other.reserved2 && self.ft == other.ft } } impl ::core::cmp::Eq for MI_Application {} unsafe impl ::windows::core::Abi for MI_Application { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ApplicationFT { pub Close: isize, pub NewSession: isize, pub NewHostedProvider: isize, pub NewInstance: isize, pub NewDestinationOptions: isize, pub NewOperationOptions: isize, pub NewSubscriptionDeliveryOptions: isize, pub NewSerializer: isize, pub NewDeserializer: isize, pub NewInstanceFromClass: isize, pub NewClass: isize, } impl MI_ApplicationFT {} impl ::core::default::Default for MI_ApplicationFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ApplicationFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ApplicationFT") .field("Close", &self.Close) .field("NewSession", &self.NewSession) .field("NewHostedProvider", &self.NewHostedProvider) .field("NewInstance", &self.NewInstance) .field("NewDestinationOptions", &self.NewDestinationOptions) .field("NewOperationOptions", &self.NewOperationOptions) .field("NewSubscriptionDeliveryOptions", &self.NewSubscriptionDeliveryOptions) .field("NewSerializer", &self.NewSerializer) .field("NewDeserializer", &self.NewDeserializer) .field("NewInstanceFromClass", &self.NewInstanceFromClass) .field("NewClass", &self.NewClass) .finish() } } impl ::core::cmp::PartialEq for MI_ApplicationFT { fn eq(&self, other: &Self) -> bool { self.Close == other.Close && self.NewSession == other.NewSession && self.NewHostedProvider == other.NewHostedProvider && self.NewInstance == other.NewInstance && self.NewDestinationOptions == other.NewDestinationOptions && self.NewOperationOptions == other.NewOperationOptions && self.NewSubscriptionDeliveryOptions == other.NewSubscriptionDeliveryOptions && self.NewSerializer == other.NewSerializer && self.NewDeserializer == other.NewDeserializer && self.NewInstanceFromClass == other.NewInstanceFromClass && self.NewClass == other.NewClass } } impl ::core::cmp::Eq for MI_ApplicationFT {} unsafe impl ::windows::core::Abi for MI_ApplicationFT { type Abi = Self; } #[inline] pub unsafe fn MI_Application_InitializeV1(flags: u32, applicationid: *const u16, extendederror: *mut *mut MI_Instance, application: *mut MI_Application) -> MI_Result { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn MI_Application_InitializeV1(flags: u32, applicationid: *const u16, extendederror: *mut *mut MI_Instance, application: *mut MI_Application) -> MI_Result; } ::core::mem::transmute(MI_Application_InitializeV1(::core::mem::transmute(flags), ::core::mem::transmute(applicationid), ::core::mem::transmute(extendederror), ::core::mem::transmute(application))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Array { pub data: *mut ::core::ffi::c_void, pub size: u32, } impl MI_Array {} impl ::core::default::Default for MI_Array { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Array { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Array").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_Array { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_Array {} unsafe impl ::windows::core::Abi for MI_Array { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ArrayField { pub value: MI_Array, pub exists: u8, pub flags: u8, } impl MI_ArrayField {} impl ::core::default::Default for MI_ArrayField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ArrayField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ArrayField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ArrayField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ArrayField {} unsafe impl ::windows::core::Abi for MI_ArrayField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_BooleanA { pub data: *mut u8, pub size: u32, } impl MI_BooleanA {} impl ::core::default::Default for MI_BooleanA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_BooleanA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_BooleanA").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_BooleanA { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_BooleanA {} unsafe impl ::windows::core::Abi for MI_BooleanA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_BooleanAField { pub value: MI_BooleanA, pub exists: u8, pub flags: u8, } impl MI_BooleanAField {} impl ::core::default::Default for MI_BooleanAField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_BooleanAField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_BooleanAField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_BooleanAField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_BooleanAField {} unsafe impl ::windows::core::Abi for MI_BooleanAField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_BooleanField { pub value: u8, pub exists: u8, pub flags: u8, } impl MI_BooleanField {} impl ::core::default::Default for MI_BooleanField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_BooleanField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_BooleanField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_BooleanField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_BooleanField {} unsafe impl ::windows::core::Abi for MI_BooleanField { type Abi = Self; } pub const MI_CALL_VERSION: 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 MI_CallbackMode(pub i32); pub const MI_CALLBACKMODE_REPORT: MI_CallbackMode = MI_CallbackMode(0i32); pub const MI_CALLBACKMODE_INQUIRE: MI_CallbackMode = MI_CallbackMode(1i32); pub const MI_CALLBACKMODE_IGNORE: MI_CallbackMode = MI_CallbackMode(2i32); impl ::core::convert::From<i32> for MI_CallbackMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MI_CallbackMode { type Abi = Self; } pub type MI_CancelCallback = unsafe extern "system" fn(reason: MI_CancellationReason, callbackdata: *const ::core::ffi::c_void); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MI_CancellationReason(pub i32); pub const MI_REASON_NONE: MI_CancellationReason = MI_CancellationReason(0i32); pub const MI_REASON_TIMEOUT: MI_CancellationReason = MI_CancellationReason(1i32); pub const MI_REASON_SHUTDOWN: MI_CancellationReason = MI_CancellationReason(2i32); pub const MI_REASON_SERVICESTOP: MI_CancellationReason = MI_CancellationReason(3i32); impl ::core::convert::From<i32> for MI_CancellationReason { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MI_CancellationReason { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Char16A { pub data: *mut u16, pub size: u32, } impl MI_Char16A {} impl ::core::default::Default for MI_Char16A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Char16A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Char16A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_Char16A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_Char16A {} unsafe impl ::windows::core::Abi for MI_Char16A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Char16AField { pub value: MI_Char16A, pub exists: u8, pub flags: u8, } impl MI_Char16AField {} impl ::core::default::Default for MI_Char16AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Char16AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Char16AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Char16AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Char16AField {} unsafe impl ::windows::core::Abi for MI_Char16AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Char16Field { pub value: u16, pub exists: u8, pub flags: u8, } impl MI_Char16Field {} impl ::core::default::Default for MI_Char16Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Char16Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Char16Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Char16Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Char16Field {} unsafe impl ::windows::core::Abi for MI_Char16Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Class { pub ft: *mut MI_ClassFT, pub classDecl: *mut MI_ClassDecl, pub namespaceName: *mut u16, pub serverName: *mut u16, pub reserved: [isize; 4], } impl MI_Class {} impl ::core::default::Default for MI_Class { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Class { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Class").field("ft", &self.ft).field("classDecl", &self.classDecl).field("namespaceName", &self.namespaceName).field("serverName", &self.serverName).field("reserved", &self.reserved).finish() } } impl ::core::cmp::PartialEq for MI_Class { fn eq(&self, other: &Self) -> bool { self.ft == other.ft && self.classDecl == other.classDecl && self.namespaceName == other.namespaceName && self.serverName == other.serverName && self.reserved == other.reserved } } impl ::core::cmp::Eq for MI_Class {} unsafe impl ::windows::core::Abi for MI_Class { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ClassDecl { pub flags: u32, pub code: u32, pub name: *mut u16, pub qualifiers: *mut *mut MI_Qualifier, pub numQualifiers: u32, pub properties: *mut *mut MI_PropertyDecl, pub numProperties: u32, pub size: u32, pub superClass: *mut u16, pub superClassDecl: *mut MI_ClassDecl, pub methods: *mut *mut MI_MethodDecl, pub numMethods: u32, pub schema: *mut MI_SchemaDecl, pub providerFT: *mut MI_ProviderFT, pub owningClass: *mut MI_Class, } impl MI_ClassDecl {} impl ::core::default::Default for MI_ClassDecl { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ClassDecl { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ClassDecl") .field("flags", &self.flags) .field("code", &self.code) .field("name", &self.name) .field("qualifiers", &self.qualifiers) .field("numQualifiers", &self.numQualifiers) .field("properties", &self.properties) .field("numProperties", &self.numProperties) .field("size", &self.size) .field("superClass", &self.superClass) .field("superClassDecl", &self.superClassDecl) .field("methods", &self.methods) .field("numMethods", &self.numMethods) .field("schema", &self.schema) .field("providerFT", &self.providerFT) .field("owningClass", &self.owningClass) .finish() } } impl ::core::cmp::PartialEq for MI_ClassDecl { fn eq(&self, other: &Self) -> bool { self.flags == other.flags && self.code == other.code && self.name == other.name && self.qualifiers == other.qualifiers && self.numQualifiers == other.numQualifiers && self.properties == other.properties && self.numProperties == other.numProperties && self.size == other.size && self.superClass == other.superClass && self.superClassDecl == other.superClassDecl && self.methods == other.methods && self.numMethods == other.numMethods && self.schema == other.schema && self.providerFT == other.providerFT && self.owningClass == other.owningClass } } impl ::core::cmp::Eq for MI_ClassDecl {} unsafe impl ::windows::core::Abi for MI_ClassDecl { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ClassFT { pub GetClassNameA: isize, pub GetNameSpace: isize, pub GetServerName: isize, pub GetElementCount: isize, pub GetElement: isize, pub GetElementAt: isize, pub GetClassQualifierSet: isize, pub GetMethodCount: isize, pub GetMethodAt: isize, pub GetMethod: isize, pub GetParentClassName: isize, pub GetParentClass: isize, pub Delete: isize, pub Clone: isize, } impl MI_ClassFT {} impl ::core::default::Default for MI_ClassFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ClassFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ClassFT") .field("GetClassNameA", &self.GetClassNameA) .field("GetNameSpace", &self.GetNameSpace) .field("GetServerName", &self.GetServerName) .field("GetElementCount", &self.GetElementCount) .field("GetElement", &self.GetElement) .field("GetElementAt", &self.GetElementAt) .field("GetClassQualifierSet", &self.GetClassQualifierSet) .field("GetMethodCount", &self.GetMethodCount) .field("GetMethodAt", &self.GetMethodAt) .field("GetMethod", &self.GetMethod) .field("GetParentClassName", &self.GetParentClassName) .field("GetParentClass", &self.GetParentClass) .field("Delete", &self.Delete) .field("Clone", &self.Clone) .finish() } } impl ::core::cmp::PartialEq for MI_ClassFT { fn eq(&self, other: &Self) -> bool { self.GetClassNameA == other.GetClassNameA && self.GetNameSpace == other.GetNameSpace && self.GetServerName == other.GetServerName && self.GetElementCount == other.GetElementCount && self.GetElement == other.GetElement && self.GetElementAt == other.GetElementAt && self.GetClassQualifierSet == other.GetClassQualifierSet && self.GetMethodCount == other.GetMethodCount && self.GetMethodAt == other.GetMethodAt && self.GetMethod == other.GetMethod && self.GetParentClassName == other.GetParentClassName && self.GetParentClass == other.GetParentClass && self.Delete == other.Delete && self.Clone == other.Clone } } impl ::core::cmp::Eq for MI_ClassFT {} unsafe impl ::windows::core::Abi for MI_ClassFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ClientFT_V1 { pub applicationFT: *mut MI_ApplicationFT, pub sessionFT: *mut MI_SessionFT, pub operationFT: *mut MI_OperationFT, pub hostedProviderFT: *mut MI_HostedProviderFT, pub serializerFT: *mut MI_SerializerFT, pub deserializerFT: *mut MI_DeserializerFT, pub subscribeDeliveryOptionsFT: *mut MI_SubscriptionDeliveryOptionsFT, pub destinationOptionsFT: *mut MI_DestinationOptionsFT, pub operationOptionsFT: *mut MI_OperationOptionsFT, pub utilitiesFT: *mut MI_UtilitiesFT, } impl MI_ClientFT_V1 {} impl ::core::default::Default for MI_ClientFT_V1 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ClientFT_V1 { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ClientFT_V1") .field("applicationFT", &self.applicationFT) .field("sessionFT", &self.sessionFT) .field("operationFT", &self.operationFT) .field("hostedProviderFT", &self.hostedProviderFT) .field("serializerFT", &self.serializerFT) .field("deserializerFT", &self.deserializerFT) .field("subscribeDeliveryOptionsFT", &self.subscribeDeliveryOptionsFT) .field("destinationOptionsFT", &self.destinationOptionsFT) .field("operationOptionsFT", &self.operationOptionsFT) .field("utilitiesFT", &self.utilitiesFT) .finish() } } impl ::core::cmp::PartialEq for MI_ClientFT_V1 { fn eq(&self, other: &Self) -> bool { self.applicationFT == other.applicationFT && self.sessionFT == other.sessionFT && self.operationFT == other.operationFT && self.hostedProviderFT == other.hostedProviderFT && self.serializerFT == other.serializerFT && self.deserializerFT == other.deserializerFT && self.subscribeDeliveryOptionsFT == other.subscribeDeliveryOptionsFT && self.destinationOptionsFT == other.destinationOptionsFT && self.operationOptionsFT == other.operationOptionsFT && self.utilitiesFT == other.utilitiesFT } } impl ::core::cmp::Eq for MI_ClientFT_V1 {} unsafe impl ::windows::core::Abi for MI_ClientFT_V1 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstBooleanA { pub data: *mut u8, pub size: u32, } impl MI_ConstBooleanA {} impl ::core::default::Default for MI_ConstBooleanA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstBooleanA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstBooleanA").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstBooleanA { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstBooleanA {} unsafe impl ::windows::core::Abi for MI_ConstBooleanA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstBooleanAField { pub value: MI_ConstBooleanA, pub exists: u8, pub flags: u8, } impl MI_ConstBooleanAField {} impl ::core::default::Default for MI_ConstBooleanAField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstBooleanAField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstBooleanAField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstBooleanAField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstBooleanAField {} unsafe impl ::windows::core::Abi for MI_ConstBooleanAField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstBooleanField { pub value: u8, pub exists: u8, pub flags: u8, } impl MI_ConstBooleanField {} impl ::core::default::Default for MI_ConstBooleanField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstBooleanField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstBooleanField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstBooleanField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstBooleanField {} unsafe impl ::windows::core::Abi for MI_ConstBooleanField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstChar16A { pub data: *mut u16, pub size: u32, } impl MI_ConstChar16A {} impl ::core::default::Default for MI_ConstChar16A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstChar16A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstChar16A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstChar16A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstChar16A {} unsafe impl ::windows::core::Abi for MI_ConstChar16A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstChar16AField { pub value: MI_ConstChar16A, pub exists: u8, pub flags: u8, } impl MI_ConstChar16AField {} impl ::core::default::Default for MI_ConstChar16AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstChar16AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstChar16AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstChar16AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstChar16AField {} unsafe impl ::windows::core::Abi for MI_ConstChar16AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstChar16Field { pub value: u16, pub exists: u8, pub flags: u8, } impl MI_ConstChar16Field {} impl ::core::default::Default for MI_ConstChar16Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstChar16Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstChar16Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstChar16Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstChar16Field {} unsafe impl ::windows::core::Abi for MI_ConstChar16Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstDatetimeA { pub data: *mut MI_Datetime, pub size: u32, } impl MI_ConstDatetimeA {} impl ::core::default::Default for MI_ConstDatetimeA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstDatetimeA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstDatetimeA").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstDatetimeA { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstDatetimeA {} unsafe impl ::windows::core::Abi for MI_ConstDatetimeA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstDatetimeAField { pub value: MI_ConstDatetimeA, pub exists: u8, pub flags: u8, } impl MI_ConstDatetimeAField {} impl ::core::default::Default for MI_ConstDatetimeAField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstDatetimeAField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstDatetimeAField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstDatetimeAField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstDatetimeAField {} unsafe impl ::windows::core::Abi for MI_ConstDatetimeAField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstDatetimeField { pub value: MI_Datetime, pub exists: u8, pub flags: u8, } impl MI_ConstDatetimeField {} impl ::core::default::Default for MI_ConstDatetimeField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for MI_ConstDatetimeField { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for MI_ConstDatetimeField {} unsafe impl ::windows::core::Abi for MI_ConstDatetimeField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstInstanceA { pub data: *mut *mut MI_Instance, pub size: u32, } impl MI_ConstInstanceA {} impl ::core::default::Default for MI_ConstInstanceA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstInstanceA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstInstanceA").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstInstanceA { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstInstanceA {} unsafe impl ::windows::core::Abi for MI_ConstInstanceA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstInstanceAField { pub value: MI_ConstInstanceA, pub exists: u8, pub flags: u8, } impl MI_ConstInstanceAField {} impl ::core::default::Default for MI_ConstInstanceAField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstInstanceAField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstInstanceAField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstInstanceAField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstInstanceAField {} unsafe impl ::windows::core::Abi for MI_ConstInstanceAField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstInstanceField { pub value: *mut MI_Instance, pub exists: u8, pub flags: u8, } impl MI_ConstInstanceField {} impl ::core::default::Default for MI_ConstInstanceField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstInstanceField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstInstanceField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstInstanceField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstInstanceField {} unsafe impl ::windows::core::Abi for MI_ConstInstanceField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstReal32A { pub data: *mut f32, pub size: u32, } impl MI_ConstReal32A {} impl ::core::default::Default for MI_ConstReal32A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstReal32A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstReal32A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstReal32A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstReal32A {} unsafe impl ::windows::core::Abi for MI_ConstReal32A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstReal32AField { pub value: MI_ConstReal32A, pub exists: u8, pub flags: u8, } impl MI_ConstReal32AField {} impl ::core::default::Default for MI_ConstReal32AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstReal32AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstReal32AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstReal32AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstReal32AField {} unsafe impl ::windows::core::Abi for MI_ConstReal32AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstReal32Field { pub value: f32, pub exists: u8, pub flags: u8, } impl MI_ConstReal32Field {} impl ::core::default::Default for MI_ConstReal32Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstReal32Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstReal32Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstReal32Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstReal32Field {} unsafe impl ::windows::core::Abi for MI_ConstReal32Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstReal64A { pub data: *mut f64, pub size: u32, } impl MI_ConstReal64A {} impl ::core::default::Default for MI_ConstReal64A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstReal64A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstReal64A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstReal64A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstReal64A {} unsafe impl ::windows::core::Abi for MI_ConstReal64A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstReal64AField { pub value: MI_ConstReal64A, pub exists: u8, pub flags: u8, } impl MI_ConstReal64AField {} impl ::core::default::Default for MI_ConstReal64AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstReal64AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstReal64AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstReal64AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstReal64AField {} unsafe impl ::windows::core::Abi for MI_ConstReal64AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstReal64Field { pub value: f64, pub exists: u8, pub flags: u8, } impl MI_ConstReal64Field {} impl ::core::default::Default for MI_ConstReal64Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstReal64Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstReal64Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstReal64Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstReal64Field {} unsafe impl ::windows::core::Abi for MI_ConstReal64Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstReferenceA { pub data: *mut *mut MI_Instance, pub size: u32, } impl MI_ConstReferenceA {} impl ::core::default::Default for MI_ConstReferenceA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstReferenceA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstReferenceA").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstReferenceA { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstReferenceA {} unsafe impl ::windows::core::Abi for MI_ConstReferenceA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstReferenceAField { pub value: MI_ConstReferenceA, pub exists: u8, pub flags: u8, } impl MI_ConstReferenceAField {} impl ::core::default::Default for MI_ConstReferenceAField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstReferenceAField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstReferenceAField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstReferenceAField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstReferenceAField {} unsafe impl ::windows::core::Abi for MI_ConstReferenceAField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstReferenceField { pub value: *mut MI_Instance, pub exists: u8, pub flags: u8, } impl MI_ConstReferenceField {} impl ::core::default::Default for MI_ConstReferenceField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstReferenceField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstReferenceField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstReferenceField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstReferenceField {} unsafe impl ::windows::core::Abi for MI_ConstReferenceField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstSint16A { pub data: *mut i16, pub size: u32, } impl MI_ConstSint16A {} impl ::core::default::Default for MI_ConstSint16A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstSint16A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstSint16A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstSint16A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstSint16A {} unsafe impl ::windows::core::Abi for MI_ConstSint16A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstSint16AField { pub value: MI_ConstSint16A, pub exists: u8, pub flags: u8, } impl MI_ConstSint16AField {} impl ::core::default::Default for MI_ConstSint16AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstSint16AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstSint16AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstSint16AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstSint16AField {} unsafe impl ::windows::core::Abi for MI_ConstSint16AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstSint16Field { pub value: i16, pub exists: u8, pub flags: u8, } impl MI_ConstSint16Field {} impl ::core::default::Default for MI_ConstSint16Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstSint16Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstSint16Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstSint16Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstSint16Field {} unsafe impl ::windows::core::Abi for MI_ConstSint16Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstSint32A { pub data: *mut i32, pub size: u32, } impl MI_ConstSint32A {} impl ::core::default::Default for MI_ConstSint32A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstSint32A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstSint32A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstSint32A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstSint32A {} unsafe impl ::windows::core::Abi for MI_ConstSint32A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstSint32AField { pub value: MI_ConstSint32A, pub exists: u8, pub flags: u8, } impl MI_ConstSint32AField {} impl ::core::default::Default for MI_ConstSint32AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstSint32AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstSint32AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstSint32AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstSint32AField {} unsafe impl ::windows::core::Abi for MI_ConstSint32AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstSint32Field { pub value: i32, pub exists: u8, pub flags: u8, } impl MI_ConstSint32Field {} impl ::core::default::Default for MI_ConstSint32Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstSint32Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstSint32Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstSint32Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstSint32Field {} unsafe impl ::windows::core::Abi for MI_ConstSint32Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstSint64A { pub data: *mut i64, pub size: u32, } impl MI_ConstSint64A {} impl ::core::default::Default for MI_ConstSint64A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstSint64A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstSint64A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstSint64A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstSint64A {} unsafe impl ::windows::core::Abi for MI_ConstSint64A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstSint64AField { pub value: MI_ConstSint64A, pub exists: u8, pub flags: u8, } impl MI_ConstSint64AField {} impl ::core::default::Default for MI_ConstSint64AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstSint64AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstSint64AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstSint64AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstSint64AField {} unsafe impl ::windows::core::Abi for MI_ConstSint64AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstSint64Field { pub value: i64, pub exists: u8, pub flags: u8, } impl MI_ConstSint64Field {} impl ::core::default::Default for MI_ConstSint64Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstSint64Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstSint64Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstSint64Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstSint64Field {} unsafe impl ::windows::core::Abi for MI_ConstSint64Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstSint8A { pub data: *mut i8, pub size: u32, } impl MI_ConstSint8A {} impl ::core::default::Default for MI_ConstSint8A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstSint8A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstSint8A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstSint8A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstSint8A {} unsafe impl ::windows::core::Abi for MI_ConstSint8A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstSint8AField { pub value: MI_ConstSint8A, pub exists: u8, pub flags: u8, } impl MI_ConstSint8AField {} impl ::core::default::Default for MI_ConstSint8AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstSint8AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstSint8AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstSint8AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstSint8AField {} unsafe impl ::windows::core::Abi for MI_ConstSint8AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstSint8Field { pub value: i8, pub exists: u8, pub flags: u8, } impl MI_ConstSint8Field {} impl ::core::default::Default for MI_ConstSint8Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstSint8Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstSint8Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstSint8Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstSint8Field {} unsafe impl ::windows::core::Abi for MI_ConstSint8Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstStringA { pub data: *mut *mut u16, pub size: u32, } impl MI_ConstStringA {} impl ::core::default::Default for MI_ConstStringA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstStringA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstStringA").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstStringA { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstStringA {} unsafe impl ::windows::core::Abi for MI_ConstStringA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstStringAField { pub value: MI_ConstStringA, pub exists: u8, pub flags: u8, } impl MI_ConstStringAField {} impl ::core::default::Default for MI_ConstStringAField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstStringAField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstStringAField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstStringAField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstStringAField {} unsafe impl ::windows::core::Abi for MI_ConstStringAField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstStringField { pub value: *mut u16, pub exists: u8, pub flags: u8, } impl MI_ConstStringField {} impl ::core::default::Default for MI_ConstStringField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstStringField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstStringField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstStringField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstStringField {} unsafe impl ::windows::core::Abi for MI_ConstStringField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstUint16A { pub data: *mut u16, pub size: u32, } impl MI_ConstUint16A {} impl ::core::default::Default for MI_ConstUint16A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstUint16A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstUint16A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstUint16A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstUint16A {} unsafe impl ::windows::core::Abi for MI_ConstUint16A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstUint16AField { pub value: MI_ConstUint16A, pub exists: u8, pub flags: u8, } impl MI_ConstUint16AField {} impl ::core::default::Default for MI_ConstUint16AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstUint16AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstUint16AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstUint16AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstUint16AField {} unsafe impl ::windows::core::Abi for MI_ConstUint16AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstUint16Field { pub value: u16, pub exists: u8, pub flags: u8, } impl MI_ConstUint16Field {} impl ::core::default::Default for MI_ConstUint16Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstUint16Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstUint16Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstUint16Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstUint16Field {} unsafe impl ::windows::core::Abi for MI_ConstUint16Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstUint32A { pub data: *mut u32, pub size: u32, } impl MI_ConstUint32A {} impl ::core::default::Default for MI_ConstUint32A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstUint32A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstUint32A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstUint32A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstUint32A {} unsafe impl ::windows::core::Abi for MI_ConstUint32A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstUint32AField { pub value: MI_ConstUint32A, pub exists: u8, pub flags: u8, } impl MI_ConstUint32AField {} impl ::core::default::Default for MI_ConstUint32AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstUint32AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstUint32AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstUint32AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstUint32AField {} unsafe impl ::windows::core::Abi for MI_ConstUint32AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstUint32Field { pub value: u32, pub exists: u8, pub flags: u8, } impl MI_ConstUint32Field {} impl ::core::default::Default for MI_ConstUint32Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstUint32Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstUint32Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstUint32Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstUint32Field {} unsafe impl ::windows::core::Abi for MI_ConstUint32Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstUint64A { pub data: *mut u64, pub size: u32, } impl MI_ConstUint64A {} impl ::core::default::Default for MI_ConstUint64A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstUint64A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstUint64A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstUint64A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstUint64A {} unsafe impl ::windows::core::Abi for MI_ConstUint64A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstUint64AField { pub value: MI_ConstUint64A, pub exists: u8, pub flags: u8, } impl MI_ConstUint64AField {} impl ::core::default::Default for MI_ConstUint64AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstUint64AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstUint64AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstUint64AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstUint64AField {} unsafe impl ::windows::core::Abi for MI_ConstUint64AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstUint64Field { pub value: u64, pub exists: u8, pub flags: u8, } impl MI_ConstUint64Field {} impl ::core::default::Default for MI_ConstUint64Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstUint64Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstUint64Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstUint64Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstUint64Field {} unsafe impl ::windows::core::Abi for MI_ConstUint64Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstUint8A { pub data: *mut u8, pub size: u32, } impl MI_ConstUint8A {} impl ::core::default::Default for MI_ConstUint8A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstUint8A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstUint8A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ConstUint8A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ConstUint8A {} unsafe impl ::windows::core::Abi for MI_ConstUint8A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstUint8AField { pub value: MI_ConstUint8A, pub exists: u8, pub flags: u8, } impl MI_ConstUint8AField {} impl ::core::default::Default for MI_ConstUint8AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstUint8AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstUint8AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstUint8AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstUint8AField {} unsafe impl ::windows::core::Abi for MI_ConstUint8AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ConstUint8Field { pub value: u8, pub exists: u8, pub flags: u8, } impl MI_ConstUint8Field {} impl ::core::default::Default for MI_ConstUint8Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ConstUint8Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ConstUint8Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ConstUint8Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ConstUint8Field {} unsafe impl ::windows::core::Abi for MI_ConstUint8Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Context { pub ft: *mut MI_ContextFT, pub reserved: [isize; 3], } impl MI_Context {} impl ::core::default::Default for MI_Context { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Context { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Context").field("ft", &self.ft).field("reserved", &self.reserved).finish() } } impl ::core::cmp::PartialEq for MI_Context { fn eq(&self, other: &Self) -> bool { self.ft == other.ft && self.reserved == other.reserved } } impl ::core::cmp::Eq for MI_Context {} unsafe impl ::windows::core::Abi for MI_Context { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ContextFT { pub PostResult: isize, pub PostInstance: isize, pub PostIndication: isize, pub ConstructInstance: isize, pub ConstructParameters: isize, pub NewInstance: isize, pub NewDynamicInstance: isize, pub NewParameters: isize, pub Canceled: isize, pub GetLocale: isize, pub RegisterCancel: isize, pub RequestUnload: isize, pub RefuseUnload: isize, pub GetLocalSession: isize, pub SetStringOption: isize, pub GetStringOption: isize, pub GetNumberOption: isize, pub GetCustomOption: isize, pub GetCustomOptionCount: isize, pub GetCustomOptionAt: isize, pub WriteMessage: isize, pub WriteProgress: isize, pub WriteStreamParameter: isize, pub WriteCimError: isize, pub PromptUser: isize, pub ShouldProcess: isize, pub ShouldContinue: isize, pub PostError: isize, pub PostCimError: isize, pub WriteError: isize, } impl MI_ContextFT {} impl ::core::default::Default for MI_ContextFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ContextFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ContextFT") .field("PostResult", &self.PostResult) .field("PostInstance", &self.PostInstance) .field("PostIndication", &self.PostIndication) .field("ConstructInstance", &self.ConstructInstance) .field("ConstructParameters", &self.ConstructParameters) .field("NewInstance", &self.NewInstance) .field("NewDynamicInstance", &self.NewDynamicInstance) .field("NewParameters", &self.NewParameters) .field("Canceled", &self.Canceled) .field("GetLocale", &self.GetLocale) .field("RegisterCancel", &self.RegisterCancel) .field("RequestUnload", &self.RequestUnload) .field("RefuseUnload", &self.RefuseUnload) .field("GetLocalSession", &self.GetLocalSession) .field("SetStringOption", &self.SetStringOption) .field("GetStringOption", &self.GetStringOption) .field("GetNumberOption", &self.GetNumberOption) .field("GetCustomOption", &self.GetCustomOption) .field("GetCustomOptionCount", &self.GetCustomOptionCount) .field("GetCustomOptionAt", &self.GetCustomOptionAt) .field("WriteMessage", &self.WriteMessage) .field("WriteProgress", &self.WriteProgress) .field("WriteStreamParameter", &self.WriteStreamParameter) .field("WriteCimError", &self.WriteCimError) .field("PromptUser", &self.PromptUser) .field("ShouldProcess", &self.ShouldProcess) .field("ShouldContinue", &self.ShouldContinue) .field("PostError", &self.PostError) .field("PostCimError", &self.PostCimError) .field("WriteError", &self.WriteError) .finish() } } impl ::core::cmp::PartialEq for MI_ContextFT { fn eq(&self, other: &Self) -> bool { self.PostResult == other.PostResult && self.PostInstance == other.PostInstance && self.PostIndication == other.PostIndication && self.ConstructInstance == other.ConstructInstance && self.ConstructParameters == other.ConstructParameters && self.NewInstance == other.NewInstance && self.NewDynamicInstance == other.NewDynamicInstance && self.NewParameters == other.NewParameters && self.Canceled == other.Canceled && self.GetLocale == other.GetLocale && self.RegisterCancel == other.RegisterCancel && self.RequestUnload == other.RequestUnload && self.RefuseUnload == other.RefuseUnload && self.GetLocalSession == other.GetLocalSession && self.SetStringOption == other.SetStringOption && self.GetStringOption == other.GetStringOption && self.GetNumberOption == other.GetNumberOption && self.GetCustomOption == other.GetCustomOption && self.GetCustomOptionCount == other.GetCustomOptionCount && self.GetCustomOptionAt == other.GetCustomOptionAt && self.WriteMessage == other.WriteMessage && self.WriteProgress == other.WriteProgress && self.WriteStreamParameter == other.WriteStreamParameter && self.WriteCimError == other.WriteCimError && self.PromptUser == other.PromptUser && self.ShouldProcess == other.ShouldProcess && self.ShouldContinue == other.ShouldContinue && self.PostError == other.PostError && self.PostCimError == other.PostCimError && self.WriteError == other.WriteError } } impl ::core::cmp::Eq for MI_ContextFT {} unsafe impl ::windows::core::Abi for MI_ContextFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Datetime { pub isTimestamp: u32, pub u: MI_Datetime_0, } impl MI_Datetime {} impl ::core::default::Default for MI_Datetime { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for MI_Datetime { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for MI_Datetime {} unsafe impl ::windows::core::Abi for MI_Datetime { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union MI_Datetime_0 { pub timestamp: MI_Timestamp, pub interval: MI_Interval, } impl MI_Datetime_0 {} impl ::core::default::Default for MI_Datetime_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for MI_Datetime_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for MI_Datetime_0 {} unsafe impl ::windows::core::Abi for MI_Datetime_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_DatetimeA { pub data: *mut MI_Datetime, pub size: u32, } impl MI_DatetimeA {} impl ::core::default::Default for MI_DatetimeA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_DatetimeA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_DatetimeA").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_DatetimeA { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_DatetimeA {} unsafe impl ::windows::core::Abi for MI_DatetimeA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_DatetimeAField { pub value: MI_DatetimeA, pub exists: u8, pub flags: u8, } impl MI_DatetimeAField {} impl ::core::default::Default for MI_DatetimeAField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_DatetimeAField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_DatetimeAField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_DatetimeAField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_DatetimeAField {} unsafe impl ::windows::core::Abi for MI_DatetimeAField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_DatetimeField { pub value: MI_Datetime, pub exists: u8, pub flags: u8, } impl MI_DatetimeField {} impl ::core::default::Default for MI_DatetimeField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for MI_DatetimeField { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for MI_DatetimeField {} unsafe impl ::windows::core::Abi for MI_DatetimeField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Deserializer { pub reserved1: u64, pub reserved2: isize, } impl MI_Deserializer {} impl ::core::default::Default for MI_Deserializer { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Deserializer { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Deserializer").field("reserved1", &self.reserved1).field("reserved2", &self.reserved2).finish() } } impl ::core::cmp::PartialEq for MI_Deserializer { fn eq(&self, other: &Self) -> bool { self.reserved1 == other.reserved1 && self.reserved2 == other.reserved2 } } impl ::core::cmp::Eq for MI_Deserializer {} unsafe impl ::windows::core::Abi for MI_Deserializer { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_DeserializerFT { pub Close: isize, pub DeserializeClass: isize, pub Class_GetClassName: isize, pub Class_GetParentClassName: isize, pub DeserializeInstance: isize, pub Instance_GetClassName: isize, } impl MI_DeserializerFT {} impl ::core::default::Default for MI_DeserializerFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_DeserializerFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_DeserializerFT") .field("Close", &self.Close) .field("DeserializeClass", &self.DeserializeClass) .field("Class_GetClassName", &self.Class_GetClassName) .field("Class_GetParentClassName", &self.Class_GetParentClassName) .field("DeserializeInstance", &self.DeserializeInstance) .field("Instance_GetClassName", &self.Instance_GetClassName) .finish() } } impl ::core::cmp::PartialEq for MI_DeserializerFT { fn eq(&self, other: &Self) -> bool { self.Close == other.Close && self.DeserializeClass == other.DeserializeClass && self.Class_GetClassName == other.Class_GetClassName && self.Class_GetParentClassName == other.Class_GetParentClassName && self.DeserializeInstance == other.DeserializeInstance && self.Instance_GetClassName == other.Instance_GetClassName } } impl ::core::cmp::Eq for MI_DeserializerFT {} unsafe impl ::windows::core::Abi for MI_DeserializerFT { type Abi = Self; } pub type MI_Deserializer_ClassObjectNeeded = unsafe extern "system" fn(context: *const ::core::ffi::c_void, servername: *const u16, namespacename: *const u16, classname: *const u16, requestedclassobject: *mut *mut MI_Class) -> MI_Result; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_DestinationOptions { pub reserved1: u64, pub reserved2: isize, pub ft: *mut MI_DestinationOptionsFT, } impl MI_DestinationOptions {} impl ::core::default::Default for MI_DestinationOptions { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_DestinationOptions { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_DestinationOptions").field("reserved1", &self.reserved1).field("reserved2", &self.reserved2).field("ft", &self.ft).finish() } } impl ::core::cmp::PartialEq for MI_DestinationOptions { fn eq(&self, other: &Self) -> bool { self.reserved1 == other.reserved1 && self.reserved2 == other.reserved2 && self.ft == other.ft } } impl ::core::cmp::Eq for MI_DestinationOptions {} unsafe impl ::windows::core::Abi for MI_DestinationOptions { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_DestinationOptionsFT { pub Delete: isize, pub SetString: isize, pub SetNumber: isize, pub AddCredentials: isize, pub GetString: isize, pub GetNumber: isize, pub GetOptionCount: isize, pub GetOptionAt: isize, pub GetOption: isize, pub GetCredentialsCount: isize, pub GetCredentialsAt: isize, pub GetCredentialsPasswordAt: isize, pub Clone: isize, pub SetInterval: isize, pub GetInterval: isize, } impl MI_DestinationOptionsFT {} impl ::core::default::Default for MI_DestinationOptionsFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_DestinationOptionsFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_DestinationOptionsFT") .field("Delete", &self.Delete) .field("SetString", &self.SetString) .field("SetNumber", &self.SetNumber) .field("AddCredentials", &self.AddCredentials) .field("GetString", &self.GetString) .field("GetNumber", &self.GetNumber) .field("GetOptionCount", &self.GetOptionCount) .field("GetOptionAt", &self.GetOptionAt) .field("GetOption", &self.GetOption) .field("GetCredentialsCount", &self.GetCredentialsCount) .field("GetCredentialsAt", &self.GetCredentialsAt) .field("GetCredentialsPasswordAt", &self.GetCredentialsPasswordAt) .field("Clone", &self.Clone) .field("SetInterval", &self.SetInterval) .field("GetInterval", &self.GetInterval) .finish() } } impl ::core::cmp::PartialEq for MI_DestinationOptionsFT { fn eq(&self, other: &Self) -> bool { self.Delete == other.Delete && self.SetString == other.SetString && self.SetNumber == other.SetNumber && self.AddCredentials == other.AddCredentials && self.GetString == other.GetString && self.GetNumber == other.GetNumber && self.GetOptionCount == other.GetOptionCount && self.GetOptionAt == other.GetOptionAt && self.GetOption == other.GetOption && self.GetCredentialsCount == other.GetCredentialsCount && self.GetCredentialsAt == other.GetCredentialsAt && self.GetCredentialsPasswordAt == other.GetCredentialsPasswordAt && self.Clone == other.Clone && self.SetInterval == other.SetInterval && self.GetInterval == other.GetInterval } } impl ::core::cmp::Eq for MI_DestinationOptionsFT {} unsafe impl ::windows::core::Abi for MI_DestinationOptionsFT { 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 MI_DestinationOptions_ImpersonationType(pub i32); pub const MI_DestinationOptions_ImpersonationType_Default: MI_DestinationOptions_ImpersonationType = MI_DestinationOptions_ImpersonationType(0i32); pub const MI_DestinationOptions_ImpersonationType_None: MI_DestinationOptions_ImpersonationType = MI_DestinationOptions_ImpersonationType(1i32); pub const MI_DestinationOptions_ImpersonationType_Identify: MI_DestinationOptions_ImpersonationType = MI_DestinationOptions_ImpersonationType(2i32); pub const MI_DestinationOptions_ImpersonationType_Impersonate: MI_DestinationOptions_ImpersonationType = MI_DestinationOptions_ImpersonationType(3i32); pub const MI_DestinationOptions_ImpersonationType_Delegate: MI_DestinationOptions_ImpersonationType = MI_DestinationOptions_ImpersonationType(4i32); impl ::core::convert::From<i32> for MI_DestinationOptions_ImpersonationType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MI_DestinationOptions_ImpersonationType { 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 MI_ErrorCategory(pub i32); pub const MI_ERRORCATEGORY_NOT_SPECIFIED: MI_ErrorCategory = MI_ErrorCategory(0i32); pub const MI_ERRORCATEGORY_OPEN_ERROR: MI_ErrorCategory = MI_ErrorCategory(1i32); pub const MI_ERRORCATEGORY_CLOS_EERROR: MI_ErrorCategory = MI_ErrorCategory(2i32); pub const MI_ERRORCATEGORY_DEVICE_ERROR: MI_ErrorCategory = MI_ErrorCategory(3i32); pub const MI_ERRORCATEGORY_DEADLOCK_DETECTED: MI_ErrorCategory = MI_ErrorCategory(4i32); pub const MI_ERRORCATEGORY_INVALID_ARGUMENT: MI_ErrorCategory = MI_ErrorCategory(5i32); pub const MI_ERRORCATEGORY_INVALID_DATA: MI_ErrorCategory = MI_ErrorCategory(6i32); pub const MI_ERRORCATEGORY_INVALID_OPERATION: MI_ErrorCategory = MI_ErrorCategory(7i32); pub const MI_ERRORCATEGORY_INVALID_RESULT: MI_ErrorCategory = MI_ErrorCategory(8i32); pub const MI_ERRORCATEGORY_INVALID_TYPE: MI_ErrorCategory = MI_ErrorCategory(9i32); pub const MI_ERRORCATEGORY_METADATA_ERROR: MI_ErrorCategory = MI_ErrorCategory(10i32); pub const MI_ERRORCATEGORY_NOT_IMPLEMENTED: MI_ErrorCategory = MI_ErrorCategory(11i32); pub const MI_ERRORCATEGORY_NOT_INSTALLED: MI_ErrorCategory = MI_ErrorCategory(12i32); pub const MI_ERRORCATEGORY_OBJECT_NOT_FOUND: MI_ErrorCategory = MI_ErrorCategory(13i32); pub const MI_ERRORCATEGORY_OPERATION_STOPPED: MI_ErrorCategory = MI_ErrorCategory(14i32); pub const MI_ERRORCATEGORY_OPERATION_TIMEOUT: MI_ErrorCategory = MI_ErrorCategory(15i32); pub const MI_ERRORCATEGORY_SYNTAX_ERROR: MI_ErrorCategory = MI_ErrorCategory(16i32); pub const MI_ERRORCATEGORY_PARSER_ERROR: MI_ErrorCategory = MI_ErrorCategory(17i32); pub const MI_ERRORCATEGORY_ACCESS_DENIED: MI_ErrorCategory = MI_ErrorCategory(18i32); pub const MI_ERRORCATEGORY_RESOURCE_BUSY: MI_ErrorCategory = MI_ErrorCategory(19i32); pub const MI_ERRORCATEGORY_RESOURCE_EXISTS: MI_ErrorCategory = MI_ErrorCategory(20i32); pub const MI_ERRORCATEGORY_RESOURCE_UNAVAILABLE: MI_ErrorCategory = MI_ErrorCategory(21i32); pub const MI_ERRORCATEGORY_READ_ERROR: MI_ErrorCategory = MI_ErrorCategory(22i32); pub const MI_ERRORCATEGORY_WRITE_ERROR: MI_ErrorCategory = MI_ErrorCategory(23i32); pub const MI_ERRORCATEGORY_FROM_STDERR: MI_ErrorCategory = MI_ErrorCategory(24i32); pub const MI_ERRORCATEGORY_SECURITY_ERROR: MI_ErrorCategory = MI_ErrorCategory(25i32); pub const MI_ERRORCATEGORY_PROTOCOL_ERROR: MI_ErrorCategory = MI_ErrorCategory(26i32); pub const MI_ERRORCATEGORY_CONNECTION_ERROR: MI_ErrorCategory = MI_ErrorCategory(27i32); pub const MI_ERRORCATEGORY_AUTHENTICATION_ERROR: MI_ErrorCategory = MI_ErrorCategory(28i32); pub const MI_ERRORCATEGORY_LIMITS_EXCEEDED: MI_ErrorCategory = MI_ErrorCategory(29i32); pub const MI_ERRORCATEGORY_QUOTA_EXCEEDED: MI_ErrorCategory = MI_ErrorCategory(30i32); pub const MI_ERRORCATEGORY_NOT_ENABLED: MI_ErrorCategory = MI_ErrorCategory(31i32); impl ::core::convert::From<i32> for MI_ErrorCategory { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MI_ErrorCategory { type Abi = Self; } pub const MI_FLAG_ABSTRACT: u32 = 131072u32; pub const MI_FLAG_ADOPT: u32 = 2147483648u32; pub const MI_FLAG_ANY: u32 = 127u32; pub const MI_FLAG_ASSOCIATION: u32 = 16u32; pub const MI_FLAG_BORROW: u32 = 1073741824u32; pub const MI_FLAG_CLASS: u32 = 1u32; pub const MI_FLAG_DISABLEOVERRIDE: u32 = 256u32; pub const MI_FLAG_ENABLEOVERRIDE: u32 = 128u32; pub const MI_FLAG_EXPENSIVE: u32 = 524288u32; pub const MI_FLAG_EXTENDED: u32 = 4096u32; pub const MI_FLAG_IN: u32 = 8192u32; pub const MI_FLAG_INDICATION: u32 = 32u32; pub const MI_FLAG_KEY: u32 = 4096u32; pub const MI_FLAG_METHOD: u32 = 2u32; pub const MI_FLAG_NOT_MODIFIED: u32 = 33554432u32; pub const MI_FLAG_NULL: u32 = 536870912u32; pub const MI_FLAG_OUT: u32 = 16384u32; pub const MI_FLAG_PARAMETER: u32 = 8u32; pub const MI_FLAG_PROPERTY: u32 = 4u32; pub const MI_FLAG_READONLY: u32 = 2097152u32; pub const MI_FLAG_REFERENCE: u32 = 64u32; pub const MI_FLAG_REQUIRED: u32 = 32768u32; pub const MI_FLAG_RESTRICTED: u32 = 512u32; pub const MI_FLAG_STATIC: u32 = 65536u32; pub const MI_FLAG_STREAM: u32 = 1048576u32; pub const MI_FLAG_TERMINAL: u32 = 262144u32; pub const MI_FLAG_TOSUBCLASS: u32 = 1024u32; pub const MI_FLAG_TRANSLATABLE: u32 = 2048u32; pub const MI_FLAG_VERSION: u32 = 469762048u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_FeatureDecl { pub flags: u32, pub code: u32, pub name: *mut u16, pub qualifiers: *mut *mut MI_Qualifier, pub numQualifiers: u32, } impl MI_FeatureDecl {} impl ::core::default::Default for MI_FeatureDecl { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_FeatureDecl { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_FeatureDecl").field("flags", &self.flags).field("code", &self.code).field("name", &self.name).field("qualifiers", &self.qualifiers).field("numQualifiers", &self.numQualifiers).finish() } } impl ::core::cmp::PartialEq for MI_FeatureDecl { fn eq(&self, other: &Self) -> bool { self.flags == other.flags && self.code == other.code && self.name == other.name && self.qualifiers == other.qualifiers && self.numQualifiers == other.numQualifiers } } impl ::core::cmp::Eq for MI_FeatureDecl {} unsafe impl ::windows::core::Abi for MI_FeatureDecl { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Filter { pub ft: *mut MI_FilterFT, pub reserved: [isize; 3], } impl MI_Filter {} impl ::core::default::Default for MI_Filter { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Filter { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Filter").field("ft", &self.ft).field("reserved", &self.reserved).finish() } } impl ::core::cmp::PartialEq for MI_Filter { fn eq(&self, other: &Self) -> bool { self.ft == other.ft && self.reserved == other.reserved } } impl ::core::cmp::Eq for MI_Filter {} unsafe impl ::windows::core::Abi for MI_Filter { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_FilterFT { pub Evaluate: isize, pub GetExpression: isize, } impl MI_FilterFT {} impl ::core::default::Default for MI_FilterFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_FilterFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_FilterFT").field("Evaluate", &self.Evaluate).field("GetExpression", &self.GetExpression).finish() } } impl ::core::cmp::PartialEq for MI_FilterFT { fn eq(&self, other: &Self) -> bool { self.Evaluate == other.Evaluate && self.GetExpression == other.GetExpression } } impl ::core::cmp::Eq for MI_FilterFT {} unsafe impl ::windows::core::Abi for MI_FilterFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_HostedProvider { pub reserved1: u64, pub reserved2: isize, pub ft: *mut MI_HostedProviderFT, } impl MI_HostedProvider {} impl ::core::default::Default for MI_HostedProvider { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_HostedProvider { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_HostedProvider").field("reserved1", &self.reserved1).field("reserved2", &self.reserved2).field("ft", &self.ft).finish() } } impl ::core::cmp::PartialEq for MI_HostedProvider { fn eq(&self, other: &Self) -> bool { self.reserved1 == other.reserved1 && self.reserved2 == other.reserved2 && self.ft == other.ft } } impl ::core::cmp::Eq for MI_HostedProvider {} unsafe impl ::windows::core::Abi for MI_HostedProvider { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_HostedProviderFT { pub Close: isize, pub GetApplication: isize, } impl MI_HostedProviderFT {} impl ::core::default::Default for MI_HostedProviderFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_HostedProviderFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_HostedProviderFT").field("Close", &self.Close).field("GetApplication", &self.GetApplication).finish() } } impl ::core::cmp::PartialEq for MI_HostedProviderFT { fn eq(&self, other: &Self) -> bool { self.Close == other.Close && self.GetApplication == other.GetApplication } } impl ::core::cmp::Eq for MI_HostedProviderFT {} unsafe impl ::windows::core::Abi for MI_HostedProviderFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Instance { pub ft: *mut MI_InstanceFT, pub classDecl: *mut MI_ClassDecl, pub serverName: *mut u16, pub nameSpace: *mut u16, pub reserved: [isize; 4], } impl MI_Instance {} impl ::core::default::Default for MI_Instance { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Instance { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Instance").field("ft", &self.ft).field("classDecl", &self.classDecl).field("serverName", &self.serverName).field("nameSpace", &self.nameSpace).field("reserved", &self.reserved).finish() } } impl ::core::cmp::PartialEq for MI_Instance { fn eq(&self, other: &Self) -> bool { self.ft == other.ft && self.classDecl == other.classDecl && self.serverName == other.serverName && self.nameSpace == other.nameSpace && self.reserved == other.reserved } } impl ::core::cmp::Eq for MI_Instance {} unsafe impl ::windows::core::Abi for MI_Instance { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_InstanceA { pub data: *mut *mut MI_Instance, pub size: u32, } impl MI_InstanceA {} impl ::core::default::Default for MI_InstanceA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_InstanceA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_InstanceA").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_InstanceA { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_InstanceA {} unsafe impl ::windows::core::Abi for MI_InstanceA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_InstanceAField { pub value: MI_InstanceA, pub exists: u8, pub flags: u8, } impl MI_InstanceAField {} impl ::core::default::Default for MI_InstanceAField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_InstanceAField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_InstanceAField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_InstanceAField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_InstanceAField {} unsafe impl ::windows::core::Abi for MI_InstanceAField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_InstanceExFT { pub parent: MI_InstanceFT, pub Normalize: isize, } impl MI_InstanceExFT {} impl ::core::default::Default for MI_InstanceExFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_InstanceExFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_InstanceExFT").field("parent", &self.parent).field("Normalize", &self.Normalize).finish() } } impl ::core::cmp::PartialEq for MI_InstanceExFT { fn eq(&self, other: &Self) -> bool { self.parent == other.parent && self.Normalize == other.Normalize } } impl ::core::cmp::Eq for MI_InstanceExFT {} unsafe impl ::windows::core::Abi for MI_InstanceExFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_InstanceFT { pub Clone: isize, pub Destruct: isize, pub Delete: isize, pub IsA: isize, pub GetClassNameA: isize, pub SetNameSpace: isize, pub GetNameSpace: isize, pub GetElementCount: isize, pub AddElement: isize, pub SetElement: isize, pub SetElementAt: isize, pub GetElement: isize, pub GetElementAt: isize, pub ClearElement: isize, pub ClearElementAt: isize, pub GetServerName: isize, pub SetServerName: isize, pub GetClass: isize, } impl MI_InstanceFT {} impl ::core::default::Default for MI_InstanceFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_InstanceFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_InstanceFT") .field("Clone", &self.Clone) .field("Destruct", &self.Destruct) .field("Delete", &self.Delete) .field("IsA", &self.IsA) .field("GetClassNameA", &self.GetClassNameA) .field("SetNameSpace", &self.SetNameSpace) .field("GetNameSpace", &self.GetNameSpace) .field("GetElementCount", &self.GetElementCount) .field("AddElement", &self.AddElement) .field("SetElement", &self.SetElement) .field("SetElementAt", &self.SetElementAt) .field("GetElement", &self.GetElement) .field("GetElementAt", &self.GetElementAt) .field("ClearElement", &self.ClearElement) .field("ClearElementAt", &self.ClearElementAt) .field("GetServerName", &self.GetServerName) .field("SetServerName", &self.SetServerName) .field("GetClass", &self.GetClass) .finish() } } impl ::core::cmp::PartialEq for MI_InstanceFT { fn eq(&self, other: &Self) -> bool { self.Clone == other.Clone && self.Destruct == other.Destruct && self.Delete == other.Delete && self.IsA == other.IsA && self.GetClassNameA == other.GetClassNameA && self.SetNameSpace == other.SetNameSpace && self.GetNameSpace == other.GetNameSpace && self.GetElementCount == other.GetElementCount && self.AddElement == other.AddElement && self.SetElement == other.SetElement && self.SetElementAt == other.SetElementAt && self.GetElement == other.GetElement && self.GetElementAt == other.GetElementAt && self.ClearElement == other.ClearElement && self.ClearElementAt == other.ClearElementAt && self.GetServerName == other.GetServerName && self.SetServerName == other.SetServerName && self.GetClass == other.GetClass } } impl ::core::cmp::Eq for MI_InstanceFT {} unsafe impl ::windows::core::Abi for MI_InstanceFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_InstanceField { pub value: *mut MI_Instance, pub exists: u8, pub flags: u8, } impl MI_InstanceField {} impl ::core::default::Default for MI_InstanceField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_InstanceField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_InstanceField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_InstanceField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_InstanceField {} unsafe impl ::windows::core::Abi for MI_InstanceField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Interval { pub days: u32, pub hours: u32, pub minutes: u32, pub seconds: u32, pub microseconds: u32, pub __padding1: u32, pub __padding2: u32, pub __padding3: u32, } impl MI_Interval {} impl ::core::default::Default for MI_Interval { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Interval { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Interval") .field("days", &self.days) .field("hours", &self.hours) .field("minutes", &self.minutes) .field("seconds", &self.seconds) .field("microseconds", &self.microseconds) .field("__padding1", &self.__padding1) .field("__padding2", &self.__padding2) .field("__padding3", &self.__padding3) .finish() } } impl ::core::cmp::PartialEq for MI_Interval { fn eq(&self, other: &Self) -> bool { self.days == other.days && self.hours == other.hours && self.minutes == other.minutes && self.seconds == other.seconds && self.microseconds == other.microseconds && self.__padding1 == other.__padding1 && self.__padding2 == other.__padding2 && self.__padding3 == other.__padding3 } } impl ::core::cmp::Eq for MI_Interval {} unsafe impl ::windows::core::Abi for MI_Interval { 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 MI_LocaleType(pub i32); pub const MI_LOCALE_TYPE_REQUESTED_UI: MI_LocaleType = MI_LocaleType(0i32); pub const MI_LOCALE_TYPE_REQUESTED_DATA: MI_LocaleType = MI_LocaleType(1i32); pub const MI_LOCALE_TYPE_CLOSEST_UI: MI_LocaleType = MI_LocaleType(2i32); pub const MI_LOCALE_TYPE_CLOSEST_DATA: MI_LocaleType = MI_LocaleType(3i32); impl ::core::convert::From<i32> for MI_LocaleType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MI_LocaleType { type Abi = Self; } pub const MI_MAX_LOCALE_SIZE: u32 = 128u32; pub const MI_MODULE_FLAG_BOOLEANS: u32 = 16u32; pub const MI_MODULE_FLAG_CPLUSPLUS: u32 = 32u32; pub const MI_MODULE_FLAG_DESCRIPTIONS: u32 = 2u32; pub const MI_MODULE_FLAG_FILTER_SUPPORT: u32 = 128u32; pub const MI_MODULE_FLAG_LOCALIZED: u32 = 64u32; pub const MI_MODULE_FLAG_MAPPING_STRINGS: u32 = 8u32; pub const MI_MODULE_FLAG_STANDARD_QUALIFIERS: u32 = 1u32; pub const MI_MODULE_FLAG_VALUES: u32 = 4u32; pub type MI_MainFunction = unsafe extern "system" fn(server: *mut MI_Server) -> *mut MI_Module; #[derive(:: core :: clone :: Clone)] #[repr(C)] pub struct MI_MethodDecl { pub flags: u32, pub code: u32, pub name: *mut u16, pub qualifiers: *mut *mut MI_Qualifier, pub numQualifiers: u32, pub parameters: *mut *mut MI_ParameterDecl, pub numParameters: u32, pub size: u32, pub returnType: u32, pub origin: *mut u16, pub propagator: *mut u16, pub schema: *mut MI_SchemaDecl, pub function: ::core::option::Option<MI_MethodDecl_Invoke>, } impl MI_MethodDecl {} impl ::core::default::Default for MI_MethodDecl { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_MethodDecl { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_MethodDecl") .field("flags", &self.flags) .field("code", &self.code) .field("name", &self.name) .field("qualifiers", &self.qualifiers) .field("numQualifiers", &self.numQualifiers) .field("parameters", &self.parameters) .field("numParameters", &self.numParameters) .field("size", &self.size) .field("returnType", &self.returnType) .field("origin", &self.origin) .field("propagator", &self.propagator) .field("schema", &self.schema) .finish() } } impl ::core::cmp::PartialEq for MI_MethodDecl { fn eq(&self, other: &Self) -> bool { self.flags == other.flags && self.code == other.code && self.name == other.name && self.qualifiers == other.qualifiers && self.numQualifiers == other.numQualifiers && self.parameters == other.parameters && self.numParameters == other.numParameters && self.size == other.size && self.returnType == other.returnType && self.origin == other.origin && self.propagator == other.propagator && self.schema == other.schema && self.function.map(|f| f as usize) == other.function.map(|f| f as usize) } } impl ::core::cmp::Eq for MI_MethodDecl {} unsafe impl ::windows::core::Abi for MI_MethodDecl { type Abi = ::core::mem::ManuallyDrop<Self>; } pub type MI_MethodDecl_Invoke = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, context: *const MI_Context, namespace: *const u16, classname: *const u16, methodname: *const u16, instancename: *const MI_Instance, parameters: *const MI_Instance); #[derive(:: core :: clone :: Clone)] #[repr(C)] pub struct MI_Module { pub version: u32, pub generatorVersion: u32, pub flags: u32, pub charSize: u32, pub schemaDecl: *mut MI_SchemaDecl, pub Load: ::core::option::Option<MI_Module_Load>, pub Unload: ::core::option::Option<MI_Module_Unload>, pub dynamicProviderFT: *mut MI_ProviderFT, } impl MI_Module {} impl ::core::default::Default for MI_Module { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Module { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Module").field("version", &self.version).field("generatorVersion", &self.generatorVersion).field("flags", &self.flags).field("charSize", &self.charSize).field("schemaDecl", &self.schemaDecl).field("dynamicProviderFT", &self.dynamicProviderFT).finish() } } impl ::core::cmp::PartialEq for MI_Module { fn eq(&self, other: &Self) -> bool { self.version == other.version && self.generatorVersion == other.generatorVersion && self.flags == other.flags && self.charSize == other.charSize && self.schemaDecl == other.schemaDecl && self.Load.map(|f| f as usize) == other.Load.map(|f| f as usize) && self.Unload.map(|f| f as usize) == other.Unload.map(|f| f as usize) && self.dynamicProviderFT == other.dynamicProviderFT } } impl ::core::cmp::Eq for MI_Module {} unsafe impl ::windows::core::Abi for MI_Module { type Abi = ::core::mem::ManuallyDrop<Self>; } pub type MI_Module_Load = unsafe extern "system" fn(self_: *mut *mut MI_Module_Self, context: *const MI_Context); #[repr(C)] #[derive(:: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug, :: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy)] pub struct MI_Module_Self(pub u8); pub type MI_Module_Unload = unsafe extern "system" fn(self_: *const MI_Module_Self, context: *const MI_Context); pub const MI_OPERATIONFLAGS_BASIC_RTTI: u32 = 2u32; pub const MI_OPERATIONFLAGS_DEFAULT_RTTI: u32 = 0u32; pub const MI_OPERATIONFLAGS_EXPENSIVE_PROPERTIES: u32 = 64u32; pub const MI_OPERATIONFLAGS_FULL_RTTI: u32 = 4u32; pub const MI_OPERATIONFLAGS_LOCALIZED_QUALIFIERS: u32 = 8u32; pub const MI_OPERATIONFLAGS_MANUAL_ACK_RESULTS: u32 = 1u32; pub const MI_OPERATIONFLAGS_NO_RTTI: u32 = 1024u32; pub const MI_OPERATIONFLAGS_POLYMORPHISM_DEEP_BASE_PROPS_ONLY: u32 = 384u32; pub const MI_OPERATIONFLAGS_POLYMORPHISM_SHALLOW: u32 = 128u32; pub const MI_OPERATIONFLAGS_REPORT_OPERATION_STARTED: u32 = 512u32; pub const MI_OPERATIONFLAGS_STANDARD_RTTI: u32 = 2048u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ObjectDecl { pub flags: u32, pub code: u32, pub name: *mut u16, pub qualifiers: *mut *mut MI_Qualifier, pub numQualifiers: u32, pub properties: *mut *mut MI_PropertyDecl, pub numProperties: u32, pub size: u32, } impl MI_ObjectDecl {} impl ::core::default::Default for MI_ObjectDecl { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ObjectDecl { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ObjectDecl") .field("flags", &self.flags) .field("code", &self.code) .field("name", &self.name) .field("qualifiers", &self.qualifiers) .field("numQualifiers", &self.numQualifiers) .field("properties", &self.properties) .field("numProperties", &self.numProperties) .field("size", &self.size) .finish() } } impl ::core::cmp::PartialEq for MI_ObjectDecl { fn eq(&self, other: &Self) -> bool { self.flags == other.flags && self.code == other.code && self.name == other.name && self.qualifiers == other.qualifiers && self.numQualifiers == other.numQualifiers && self.properties == other.properties && self.numProperties == other.numProperties && self.size == other.size } } impl ::core::cmp::Eq for MI_ObjectDecl {} unsafe impl ::windows::core::Abi for MI_ObjectDecl { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Operation { pub reserved1: u64, pub reserved2: isize, pub ft: *mut MI_OperationFT, } impl MI_Operation {} impl ::core::default::Default for MI_Operation { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Operation { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Operation").field("reserved1", &self.reserved1).field("reserved2", &self.reserved2).field("ft", &self.ft).finish() } } impl ::core::cmp::PartialEq for MI_Operation { fn eq(&self, other: &Self) -> bool { self.reserved1 == other.reserved1 && self.reserved2 == other.reserved2 && self.ft == other.ft } } impl ::core::cmp::Eq for MI_Operation {} unsafe impl ::windows::core::Abi for MI_Operation { type Abi = Self; } pub type MI_OperationCallback_Class = unsafe extern "system" fn(operation: *const MI_Operation, callbackcontext: *const ::core::ffi::c_void, classresult: *const MI_Class, moreresults: u8, resultcode: MI_Result, errorstring: *const u16, errordetails: *const MI_Instance, resultacknowledgement: isize); pub type MI_OperationCallback_Indication = unsafe extern "system" fn(operation: *const MI_Operation, callbackcontext: *const ::core::ffi::c_void, instance: *const MI_Instance, bookmark: *const u16, machineid: *const u16, moreresults: u8, resultcode: MI_Result, errorstring: *const u16, errordetails: *const MI_Instance, resultacknowledgement: isize); pub type MI_OperationCallback_Instance = unsafe extern "system" fn(operation: *const MI_Operation, callbackcontext: *const ::core::ffi::c_void, instance: *const MI_Instance, moreresults: u8, resultcode: MI_Result, errorstring: *const u16, errordetails: *const MI_Instance, resultacknowledgement: isize); pub type MI_OperationCallback_PromptUser = unsafe extern "system" fn(operation: *const MI_Operation, callbackcontext: *const ::core::ffi::c_void, message: *const u16, prompttype: MI_PromptType, promptuserresult: isize); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MI_OperationCallback_ResponseType(pub i32); pub const MI_OperationCallback_ResponseType_No: MI_OperationCallback_ResponseType = MI_OperationCallback_ResponseType(0i32); pub const MI_OperationCallback_ResponseType_Yes: MI_OperationCallback_ResponseType = MI_OperationCallback_ResponseType(1i32); pub const MI_OperationCallback_ResponseType_NoToAll: MI_OperationCallback_ResponseType = MI_OperationCallback_ResponseType(2i32); pub const MI_OperationCallback_ResponseType_YesToAll: MI_OperationCallback_ResponseType = MI_OperationCallback_ResponseType(3i32); impl ::core::convert::From<i32> for MI_OperationCallback_ResponseType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MI_OperationCallback_ResponseType { type Abi = Self; } pub type MI_OperationCallback_StreamedParameter = unsafe extern "system" fn(operation: *const MI_Operation, callbackcontext: *const ::core::ffi::c_void, parametername: *const u16, resulttype: MI_Type, result: *const MI_Value, resultacknowledgement: isize); pub type MI_OperationCallback_WriteError = unsafe extern "system" fn(operation: *const MI_Operation, callbackcontext: *const ::core::ffi::c_void, instance: *const MI_Instance, writeerrorresult: isize); pub type MI_OperationCallback_WriteMessage = unsafe extern "system" fn(operation: *const MI_Operation, callbackcontext: *const ::core::ffi::c_void, channel: u32, message: *const u16); pub type MI_OperationCallback_WriteProgress = unsafe extern "system" fn(operation: *const MI_Operation, callbackcontext: *const ::core::ffi::c_void, activity: *const u16, currentoperation: *const u16, statusdescription: *const u16, percentagecomplete: u32, secondsremaining: u32); #[derive(:: core :: clone :: Clone)] #[repr(C)] pub struct MI_OperationCallbacks { pub callbackContext: *mut ::core::ffi::c_void, pub promptUser: ::core::option::Option<MI_OperationCallback_PromptUser>, pub writeError: ::core::option::Option<MI_OperationCallback_WriteError>, pub writeMessage: ::core::option::Option<MI_OperationCallback_WriteMessage>, pub writeProgress: ::core::option::Option<MI_OperationCallback_WriteProgress>, pub instanceResult: ::core::option::Option<MI_OperationCallback_Instance>, pub indicationResult: ::core::option::Option<MI_OperationCallback_Indication>, pub classResult: ::core::option::Option<MI_OperationCallback_Class>, pub streamedParameterResult: ::core::option::Option<MI_OperationCallback_StreamedParameter>, } impl MI_OperationCallbacks {} impl ::core::default::Default for MI_OperationCallbacks { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_OperationCallbacks { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_OperationCallbacks").field("callbackContext", &self.callbackContext).finish() } } impl ::core::cmp::PartialEq for MI_OperationCallbacks { fn eq(&self, other: &Self) -> bool { self.callbackContext == other.callbackContext && self.promptUser.map(|f| f as usize) == other.promptUser.map(|f| f as usize) && self.writeError.map(|f| f as usize) == other.writeError.map(|f| f as usize) && self.writeMessage.map(|f| f as usize) == other.writeMessage.map(|f| f as usize) && self.writeProgress.map(|f| f as usize) == other.writeProgress.map(|f| f as usize) && self.instanceResult.map(|f| f as usize) == other.instanceResult.map(|f| f as usize) && self.indicationResult.map(|f| f as usize) == other.indicationResult.map(|f| f as usize) && self.classResult.map(|f| f as usize) == other.classResult.map(|f| f as usize) && self.streamedParameterResult.map(|f| f as usize) == other.streamedParameterResult.map(|f| f as usize) } } impl ::core::cmp::Eq for MI_OperationCallbacks {} unsafe impl ::windows::core::Abi for MI_OperationCallbacks { type Abi = ::core::mem::ManuallyDrop<Self>; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_OperationFT { pub Close: isize, pub Cancel: isize, pub GetSession: isize, pub GetInstance: isize, pub GetIndication: isize, pub GetClass: isize, } impl MI_OperationFT {} impl ::core::default::Default for MI_OperationFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_OperationFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_OperationFT").field("Close", &self.Close).field("Cancel", &self.Cancel).field("GetSession", &self.GetSession).field("GetInstance", &self.GetInstance).field("GetIndication", &self.GetIndication).field("GetClass", &self.GetClass).finish() } } impl ::core::cmp::PartialEq for MI_OperationFT { fn eq(&self, other: &Self) -> bool { self.Close == other.Close && self.Cancel == other.Cancel && self.GetSession == other.GetSession && self.GetInstance == other.GetInstance && self.GetIndication == other.GetIndication && self.GetClass == other.GetClass } } impl ::core::cmp::Eq for MI_OperationFT {} unsafe impl ::windows::core::Abi for MI_OperationFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_OperationOptions { pub reserved1: u64, pub reserved2: isize, pub ft: *mut MI_OperationOptionsFT, } impl MI_OperationOptions {} impl ::core::default::Default for MI_OperationOptions { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_OperationOptions { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_OperationOptions").field("reserved1", &self.reserved1).field("reserved2", &self.reserved2).field("ft", &self.ft).finish() } } impl ::core::cmp::PartialEq for MI_OperationOptions { fn eq(&self, other: &Self) -> bool { self.reserved1 == other.reserved1 && self.reserved2 == other.reserved2 && self.ft == other.ft } } impl ::core::cmp::Eq for MI_OperationOptions {} unsafe impl ::windows::core::Abi for MI_OperationOptions { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_OperationOptionsFT { pub Delete: isize, pub SetString: isize, pub SetNumber: isize, pub SetCustomOption: isize, pub GetString: isize, pub GetNumber: isize, pub GetOptionCount: isize, pub GetOptionAt: isize, pub GetOption: isize, pub GetEnabledChannels: isize, pub Clone: isize, pub SetInterval: isize, pub GetInterval: isize, } impl MI_OperationOptionsFT {} impl ::core::default::Default for MI_OperationOptionsFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_OperationOptionsFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_OperationOptionsFT") .field("Delete", &self.Delete) .field("SetString", &self.SetString) .field("SetNumber", &self.SetNumber) .field("SetCustomOption", &self.SetCustomOption) .field("GetString", &self.GetString) .field("GetNumber", &self.GetNumber) .field("GetOptionCount", &self.GetOptionCount) .field("GetOptionAt", &self.GetOptionAt) .field("GetOption", &self.GetOption) .field("GetEnabledChannels", &self.GetEnabledChannels) .field("Clone", &self.Clone) .field("SetInterval", &self.SetInterval) .field("GetInterval", &self.GetInterval) .finish() } } impl ::core::cmp::PartialEq for MI_OperationOptionsFT { fn eq(&self, other: &Self) -> bool { self.Delete == other.Delete && self.SetString == other.SetString && self.SetNumber == other.SetNumber && self.SetCustomOption == other.SetCustomOption && self.GetString == other.GetString && self.GetNumber == other.GetNumber && self.GetOptionCount == other.GetOptionCount && self.GetOptionAt == other.GetOptionAt && self.GetOption == other.GetOption && self.GetEnabledChannels == other.GetEnabledChannels && self.Clone == other.Clone && self.SetInterval == other.SetInterval && self.GetInterval == other.GetInterval } } impl ::core::cmp::Eq for MI_OperationOptionsFT {} unsafe impl ::windows::core::Abi for MI_OperationOptionsFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ParameterDecl { pub flags: u32, pub code: u32, pub name: *mut u16, pub qualifiers: *mut *mut MI_Qualifier, pub numQualifiers: u32, pub r#type: u32, pub className: *mut u16, pub subscript: u32, pub offset: u32, } impl MI_ParameterDecl {} impl ::core::default::Default for MI_ParameterDecl { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ParameterDecl { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ParameterDecl") .field("flags", &self.flags) .field("code", &self.code) .field("name", &self.name) .field("qualifiers", &self.qualifiers) .field("numQualifiers", &self.numQualifiers) .field("r#type", &self.r#type) .field("className", &self.className) .field("subscript", &self.subscript) .field("offset", &self.offset) .finish() } } impl ::core::cmp::PartialEq for MI_ParameterDecl { fn eq(&self, other: &Self) -> bool { self.flags == other.flags && self.code == other.code && self.name == other.name && self.qualifiers == other.qualifiers && self.numQualifiers == other.numQualifiers && self.r#type == other.r#type && self.className == other.className && self.subscript == other.subscript && self.offset == other.offset } } impl ::core::cmp::Eq for MI_ParameterDecl {} unsafe impl ::windows::core::Abi for MI_ParameterDecl { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ParameterSet { pub reserved1: u64, pub reserved2: isize, pub ft: *mut MI_ParameterSetFT, } impl MI_ParameterSet {} impl ::core::default::Default for MI_ParameterSet { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ParameterSet { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ParameterSet").field("reserved1", &self.reserved1).field("reserved2", &self.reserved2).field("ft", &self.ft).finish() } } impl ::core::cmp::PartialEq for MI_ParameterSet { fn eq(&self, other: &Self) -> bool { self.reserved1 == other.reserved1 && self.reserved2 == other.reserved2 && self.ft == other.ft } } impl ::core::cmp::Eq for MI_ParameterSet {} unsafe impl ::windows::core::Abi for MI_ParameterSet { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ParameterSetFT { pub GetMethodReturnType: isize, pub GetParameterCount: isize, pub GetParameterAt: isize, pub GetParameter: isize, } impl MI_ParameterSetFT {} impl ::core::default::Default for MI_ParameterSetFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ParameterSetFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ParameterSetFT").field("GetMethodReturnType", &self.GetMethodReturnType).field("GetParameterCount", &self.GetParameterCount).field("GetParameterAt", &self.GetParameterAt).field("GetParameter", &self.GetParameter).finish() } } impl ::core::cmp::PartialEq for MI_ParameterSetFT { fn eq(&self, other: &Self) -> bool { self.GetMethodReturnType == other.GetMethodReturnType && self.GetParameterCount == other.GetParameterCount && self.GetParameterAt == other.GetParameterAt && self.GetParameter == other.GetParameter } } impl ::core::cmp::Eq for MI_ParameterSetFT {} unsafe impl ::windows::core::Abi for MI_ParameterSetFT { 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 MI_PromptType(pub i32); pub const MI_PROMPTTYPE_NORMAL: MI_PromptType = MI_PromptType(0i32); pub const MI_PROMPTTYPE_CRITICAL: MI_PromptType = MI_PromptType(1i32); impl ::core::convert::From<i32> for MI_PromptType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MI_PromptType { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_PropertyDecl { pub flags: u32, pub code: u32, pub name: *mut u16, pub qualifiers: *mut *mut MI_Qualifier, pub numQualifiers: u32, pub r#type: u32, pub className: *mut u16, pub subscript: u32, pub offset: u32, pub origin: *mut u16, pub propagator: *mut u16, pub value: *mut ::core::ffi::c_void, } impl MI_PropertyDecl {} impl ::core::default::Default for MI_PropertyDecl { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_PropertyDecl { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_PropertyDecl") .field("flags", &self.flags) .field("code", &self.code) .field("name", &self.name) .field("qualifiers", &self.qualifiers) .field("numQualifiers", &self.numQualifiers) .field("r#type", &self.r#type) .field("className", &self.className) .field("subscript", &self.subscript) .field("offset", &self.offset) .field("origin", &self.origin) .field("propagator", &self.propagator) .field("value", &self.value) .finish() } } impl ::core::cmp::PartialEq for MI_PropertyDecl { fn eq(&self, other: &Self) -> bool { self.flags == other.flags && self.code == other.code && self.name == other.name && self.qualifiers == other.qualifiers && self.numQualifiers == other.numQualifiers && self.r#type == other.r#type && self.className == other.className && self.subscript == other.subscript && self.offset == other.offset && self.origin == other.origin && self.propagator == other.propagator && self.value == other.value } } impl ::core::cmp::Eq for MI_PropertyDecl {} unsafe impl ::windows::core::Abi for MI_PropertyDecl { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_PropertySet { pub ft: *mut MI_PropertySetFT, pub reserved: [isize; 3], } impl MI_PropertySet {} impl ::core::default::Default for MI_PropertySet { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_PropertySet { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_PropertySet").field("ft", &self.ft).field("reserved", &self.reserved).finish() } } impl ::core::cmp::PartialEq for MI_PropertySet { fn eq(&self, other: &Self) -> bool { self.ft == other.ft && self.reserved == other.reserved } } impl ::core::cmp::Eq for MI_PropertySet {} unsafe impl ::windows::core::Abi for MI_PropertySet { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_PropertySetFT { pub GetElementCount: isize, pub ContainsElement: isize, pub AddElement: isize, pub GetElementAt: isize, pub Clear: isize, pub Destruct: isize, pub Delete: isize, pub Clone: isize, } impl MI_PropertySetFT {} impl ::core::default::Default for MI_PropertySetFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_PropertySetFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_PropertySetFT") .field("GetElementCount", &self.GetElementCount) .field("ContainsElement", &self.ContainsElement) .field("AddElement", &self.AddElement) .field("GetElementAt", &self.GetElementAt) .field("Clear", &self.Clear) .field("Destruct", &self.Destruct) .field("Delete", &self.Delete) .field("Clone", &self.Clone) .finish() } } impl ::core::cmp::PartialEq for MI_PropertySetFT { fn eq(&self, other: &Self) -> bool { self.GetElementCount == other.GetElementCount && self.ContainsElement == other.ContainsElement && self.AddElement == other.AddElement && self.GetElementAt == other.GetElementAt && self.Clear == other.Clear && self.Destruct == other.Destruct && self.Delete == other.Delete && self.Clone == other.Clone } } impl ::core::cmp::Eq for MI_PropertySetFT {} unsafe impl ::windows::core::Abi for MI_PropertySetFT { 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 MI_ProviderArchitecture(pub i32); pub const MI_PROVIDER_ARCHITECTURE_32BIT: MI_ProviderArchitecture = MI_ProviderArchitecture(0i32); pub const MI_PROVIDER_ARCHITECTURE_64BIT: MI_ProviderArchitecture = MI_ProviderArchitecture(1i32); impl ::core::convert::From<i32> for MI_ProviderArchitecture { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MI_ProviderArchitecture { type Abi = Self; } #[derive(:: core :: clone :: Clone)] #[repr(C)] pub struct MI_ProviderFT { pub Load: ::core::option::Option<MI_ProviderFT_Load>, pub Unload: ::core::option::Option<MI_ProviderFT_Unload>, pub GetInstance: ::core::option::Option<MI_ProviderFT_GetInstance>, pub EnumerateInstances: ::core::option::Option<MI_ProviderFT_EnumerateInstances>, pub CreateInstance: ::core::option::Option<MI_ProviderFT_CreateInstance>, pub ModifyInstance: ::core::option::Option<MI_ProviderFT_ModifyInstance>, pub DeleteInstance: ::core::option::Option<MI_ProviderFT_DeleteInstance>, pub AssociatorInstances: ::core::option::Option<MI_ProviderFT_AssociatorInstances>, pub ReferenceInstances: ::core::option::Option<MI_ProviderFT_ReferenceInstances>, pub EnableIndications: ::core::option::Option<MI_ProviderFT_EnableIndications>, pub DisableIndications: ::core::option::Option<MI_ProviderFT_DisableIndications>, pub Subscribe: ::core::option::Option<MI_ProviderFT_Subscribe>, pub Unsubscribe: ::core::option::Option<MI_ProviderFT_Unsubscribe>, pub Invoke: ::core::option::Option<MI_ProviderFT_Invoke>, } impl MI_ProviderFT {} impl ::core::default::Default for MI_ProviderFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ProviderFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ProviderFT").finish() } } impl ::core::cmp::PartialEq for MI_ProviderFT { fn eq(&self, other: &Self) -> bool { self.Load.map(|f| f as usize) == other.Load.map(|f| f as usize) && self.Unload.map(|f| f as usize) == other.Unload.map(|f| f as usize) && self.GetInstance.map(|f| f as usize) == other.GetInstance.map(|f| f as usize) && self.EnumerateInstances.map(|f| f as usize) == other.EnumerateInstances.map(|f| f as usize) && self.CreateInstance.map(|f| f as usize) == other.CreateInstance.map(|f| f as usize) && self.ModifyInstance.map(|f| f as usize) == other.ModifyInstance.map(|f| f as usize) && self.DeleteInstance.map(|f| f as usize) == other.DeleteInstance.map(|f| f as usize) && self.AssociatorInstances.map(|f| f as usize) == other.AssociatorInstances.map(|f| f as usize) && self.ReferenceInstances.map(|f| f as usize) == other.ReferenceInstances.map(|f| f as usize) && self.EnableIndications.map(|f| f as usize) == other.EnableIndications.map(|f| f as usize) && self.DisableIndications.map(|f| f as usize) == other.DisableIndications.map(|f| f as usize) && self.Subscribe.map(|f| f as usize) == other.Subscribe.map(|f| f as usize) && self.Unsubscribe.map(|f| f as usize) == other.Unsubscribe.map(|f| f as usize) && self.Invoke.map(|f| f as usize) == other.Invoke.map(|f| f as usize) } } impl ::core::cmp::Eq for MI_ProviderFT {} unsafe impl ::windows::core::Abi for MI_ProviderFT { type Abi = ::core::mem::ManuallyDrop<Self>; } pub type MI_ProviderFT_AssociatorInstances = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, context: *const MI_Context, namespace: *const u16, classname: *const u16, instancename: *const MI_Instance, resultclass: *const u16, role: *const u16, resultrole: *const u16, propertyset: *const MI_PropertySet, keysonly: u8, filter: *const MI_Filter); pub type MI_ProviderFT_CreateInstance = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, context: *const MI_Context, namespace: *const u16, classname: *const u16, newinstance: *const MI_Instance); pub type MI_ProviderFT_DeleteInstance = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, context: *const MI_Context, namespace: *const u16, classname: *const u16, instancename: *const MI_Instance); pub type MI_ProviderFT_DisableIndications = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, indicationscontext: *const MI_Context, namespace: *const u16, classname: *const u16); pub type MI_ProviderFT_EnableIndications = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, indicationscontext: *const MI_Context, namespace: *const u16, classname: *const u16); pub type MI_ProviderFT_EnumerateInstances = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, context: *const MI_Context, namespace: *const u16, classname: *const u16, propertyset: *const MI_PropertySet, keysonly: u8, filter: *const MI_Filter); pub type MI_ProviderFT_GetInstance = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, context: *const MI_Context, namespace: *const u16, classname: *const u16, instancename: *const MI_Instance, propertyset: *const MI_PropertySet); pub type MI_ProviderFT_Invoke = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, context: *const MI_Context, namespace: *const u16, classname: *const u16, methodname: *const u16, instancename: *const MI_Instance, inputparameters: *const MI_Instance); pub type MI_ProviderFT_Load = unsafe extern "system" fn(self_: *mut *mut ::core::ffi::c_void, selfmodule: *const MI_Module_Self, context: *const MI_Context); pub type MI_ProviderFT_ModifyInstance = unsafe extern "system" fn(self_: *mut ::core::ffi::c_void, context: *mut MI_Context, namespace: *const u16, classname: *const u16, modifiedinstance: *const MI_Instance, propertyset: *const MI_PropertySet); pub type MI_ProviderFT_ReferenceInstances = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, context: *const MI_Context, namespace: *const u16, classname: *const u16, instancename: *const MI_Instance, role: *const u16, propertyset: *const MI_PropertySet, keysonly: u8, filter: *const MI_Filter); pub type MI_ProviderFT_Subscribe = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, context: *const MI_Context, namespace: *const u16, classname: *const u16, filter: *const MI_Filter, bookmark: *const u16, subscriptionid: u64, subscriptionself: *mut *mut ::core::ffi::c_void); pub type MI_ProviderFT_Unload = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, context: *const MI_Context); pub type MI_ProviderFT_Unsubscribe = unsafe extern "system" fn(self_: *const ::core::ffi::c_void, context: *const MI_Context, namespace: *const u16, classname: *const u16, subscriptionid: u64, subscriptionself: *const ::core::ffi::c_void); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Qualifier { pub name: *mut u16, pub r#type: u32, pub flavor: u32, pub value: *mut ::core::ffi::c_void, } impl MI_Qualifier {} impl ::core::default::Default for MI_Qualifier { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Qualifier { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Qualifier").field("name", &self.name).field("r#type", &self.r#type).field("flavor", &self.flavor).field("value", &self.value).finish() } } impl ::core::cmp::PartialEq for MI_Qualifier { fn eq(&self, other: &Self) -> bool { self.name == other.name && self.r#type == other.r#type && self.flavor == other.flavor && self.value == other.value } } impl ::core::cmp::Eq for MI_Qualifier {} unsafe impl ::windows::core::Abi for MI_Qualifier { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_QualifierDecl { pub name: *mut u16, pub r#type: u32, pub scope: u32, pub flavor: u32, pub subscript: u32, pub value: *mut ::core::ffi::c_void, } impl MI_QualifierDecl {} impl ::core::default::Default for MI_QualifierDecl { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_QualifierDecl { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_QualifierDecl").field("name", &self.name).field("r#type", &self.r#type).field("scope", &self.scope).field("flavor", &self.flavor).field("subscript", &self.subscript).field("value", &self.value).finish() } } impl ::core::cmp::PartialEq for MI_QualifierDecl { fn eq(&self, other: &Self) -> bool { self.name == other.name && self.r#type == other.r#type && self.scope == other.scope && self.flavor == other.flavor && self.subscript == other.subscript && self.value == other.value } } impl ::core::cmp::Eq for MI_QualifierDecl {} unsafe impl ::windows::core::Abi for MI_QualifierDecl { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_QualifierSet { pub reserved1: u64, pub reserved2: isize, pub ft: *mut MI_QualifierSetFT, } impl MI_QualifierSet {} impl ::core::default::Default for MI_QualifierSet { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_QualifierSet { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_QualifierSet").field("reserved1", &self.reserved1).field("reserved2", &self.reserved2).field("ft", &self.ft).finish() } } impl ::core::cmp::PartialEq for MI_QualifierSet { fn eq(&self, other: &Self) -> bool { self.reserved1 == other.reserved1 && self.reserved2 == other.reserved2 && self.ft == other.ft } } impl ::core::cmp::Eq for MI_QualifierSet {} unsafe impl ::windows::core::Abi for MI_QualifierSet { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_QualifierSetFT { pub GetQualifierCount: isize, pub GetQualifierAt: isize, pub GetQualifier: isize, } impl MI_QualifierSetFT {} impl ::core::default::Default for MI_QualifierSetFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_QualifierSetFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_QualifierSetFT").field("GetQualifierCount", &self.GetQualifierCount).field("GetQualifierAt", &self.GetQualifierAt).field("GetQualifier", &self.GetQualifier).finish() } } impl ::core::cmp::PartialEq for MI_QualifierSetFT { fn eq(&self, other: &Self) -> bool { self.GetQualifierCount == other.GetQualifierCount && self.GetQualifierAt == other.GetQualifierAt && self.GetQualifier == other.GetQualifier } } impl ::core::cmp::Eq for MI_QualifierSetFT {} unsafe impl ::windows::core::Abi for MI_QualifierSetFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Real32A { pub data: *mut f32, pub size: u32, } impl MI_Real32A {} impl ::core::default::Default for MI_Real32A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Real32A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Real32A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_Real32A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_Real32A {} unsafe impl ::windows::core::Abi for MI_Real32A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Real32AField { pub value: MI_Real32A, pub exists: u8, pub flags: u8, } impl MI_Real32AField {} impl ::core::default::Default for MI_Real32AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Real32AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Real32AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Real32AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Real32AField {} unsafe impl ::windows::core::Abi for MI_Real32AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Real32Field { pub value: f32, pub exists: u8, pub flags: u8, } impl MI_Real32Field {} impl ::core::default::Default for MI_Real32Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Real32Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Real32Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Real32Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Real32Field {} unsafe impl ::windows::core::Abi for MI_Real32Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Real64A { pub data: *mut f64, pub size: u32, } impl MI_Real64A {} impl ::core::default::Default for MI_Real64A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Real64A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Real64A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_Real64A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_Real64A {} unsafe impl ::windows::core::Abi for MI_Real64A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Real64AField { pub value: MI_Real64A, pub exists: u8, pub flags: u8, } impl MI_Real64AField {} impl ::core::default::Default for MI_Real64AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Real64AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Real64AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Real64AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Real64AField {} unsafe impl ::windows::core::Abi for MI_Real64AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Real64Field { pub value: f64, pub exists: u8, pub flags: u8, } impl MI_Real64Field {} impl ::core::default::Default for MI_Real64Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Real64Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Real64Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Real64Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Real64Field {} unsafe impl ::windows::core::Abi for MI_Real64Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ReferenceA { pub data: *mut *mut MI_Instance, pub size: u32, } impl MI_ReferenceA {} impl ::core::default::Default for MI_ReferenceA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ReferenceA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ReferenceA").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_ReferenceA { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_ReferenceA {} unsafe impl ::windows::core::Abi for MI_ReferenceA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ReferenceAField { pub value: MI_ReferenceA, pub exists: u8, pub flags: u8, } impl MI_ReferenceAField {} impl ::core::default::Default for MI_ReferenceAField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ReferenceAField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ReferenceAField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ReferenceAField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ReferenceAField {} unsafe impl ::windows::core::Abi for MI_ReferenceAField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ReferenceField { pub value: *mut MI_Instance, pub exists: u8, pub flags: u8, } impl MI_ReferenceField {} impl ::core::default::Default for MI_ReferenceField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ReferenceField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ReferenceField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_ReferenceField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_ReferenceField {} unsafe impl ::windows::core::Abi for MI_ReferenceField { 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 MI_Result(pub i32); pub const MI_RESULT_OK: MI_Result = MI_Result(0i32); pub const MI_RESULT_FAILED: MI_Result = MI_Result(1i32); pub const MI_RESULT_ACCESS_DENIED: MI_Result = MI_Result(2i32); pub const MI_RESULT_INVALID_NAMESPACE: MI_Result = MI_Result(3i32); pub const MI_RESULT_INVALID_PARAMETER: MI_Result = MI_Result(4i32); pub const MI_RESULT_INVALID_CLASS: MI_Result = MI_Result(5i32); pub const MI_RESULT_NOT_FOUND: MI_Result = MI_Result(6i32); pub const MI_RESULT_NOT_SUPPORTED: MI_Result = MI_Result(7i32); pub const MI_RESULT_CLASS_HAS_CHILDREN: MI_Result = MI_Result(8i32); pub const MI_RESULT_CLASS_HAS_INSTANCES: MI_Result = MI_Result(9i32); pub const MI_RESULT_INVALID_SUPERCLASS: MI_Result = MI_Result(10i32); pub const MI_RESULT_ALREADY_EXISTS: MI_Result = MI_Result(11i32); pub const MI_RESULT_NO_SUCH_PROPERTY: MI_Result = MI_Result(12i32); pub const MI_RESULT_TYPE_MISMATCH: MI_Result = MI_Result(13i32); pub const MI_RESULT_QUERY_LANGUAGE_NOT_SUPPORTED: MI_Result = MI_Result(14i32); pub const MI_RESULT_INVALID_QUERY: MI_Result = MI_Result(15i32); pub const MI_RESULT_METHOD_NOT_AVAILABLE: MI_Result = MI_Result(16i32); pub const MI_RESULT_METHOD_NOT_FOUND: MI_Result = MI_Result(17i32); pub const MI_RESULT_NAMESPACE_NOT_EMPTY: MI_Result = MI_Result(20i32); pub const MI_RESULT_INVALID_ENUMERATION_CONTEXT: MI_Result = MI_Result(21i32); pub const MI_RESULT_INVALID_OPERATION_TIMEOUT: MI_Result = MI_Result(22i32); pub const MI_RESULT_PULL_HAS_BEEN_ABANDONED: MI_Result = MI_Result(23i32); pub const MI_RESULT_PULL_CANNOT_BE_ABANDONED: MI_Result = MI_Result(24i32); pub const MI_RESULT_FILTERED_ENUMERATION_NOT_SUPPORTED: MI_Result = MI_Result(25i32); pub const MI_RESULT_CONTINUATION_ON_ERROR_NOT_SUPPORTED: MI_Result = MI_Result(26i32); pub const MI_RESULT_SERVER_LIMITS_EXCEEDED: MI_Result = MI_Result(27i32); pub const MI_RESULT_SERVER_IS_SHUTTING_DOWN: MI_Result = MI_Result(28i32); impl ::core::convert::From<i32> for MI_Result { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MI_Result { type Abi = Self; } pub const MI_SERIALIZER_FLAGS_CLASS_DEEP: u32 = 1u32; pub const MI_SERIALIZER_FLAGS_INSTANCE_WITH_CLASS: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_SchemaDecl { pub qualifierDecls: *mut *mut MI_QualifierDecl, pub numQualifierDecls: u32, pub classDecls: *mut *mut MI_ClassDecl, pub numClassDecls: u32, } impl MI_SchemaDecl {} impl ::core::default::Default for MI_SchemaDecl { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_SchemaDecl { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_SchemaDecl").field("qualifierDecls", &self.qualifierDecls).field("numQualifierDecls", &self.numQualifierDecls).field("classDecls", &self.classDecls).field("numClassDecls", &self.numClassDecls).finish() } } impl ::core::cmp::PartialEq for MI_SchemaDecl { fn eq(&self, other: &Self) -> bool { self.qualifierDecls == other.qualifierDecls && self.numQualifierDecls == other.numQualifierDecls && self.classDecls == other.classDecls && self.numClassDecls == other.numClassDecls } } impl ::core::cmp::Eq for MI_SchemaDecl {} unsafe impl ::windows::core::Abi for MI_SchemaDecl { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Serializer { pub reserved1: u64, pub reserved2: isize, } impl MI_Serializer {} impl ::core::default::Default for MI_Serializer { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Serializer { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Serializer").field("reserved1", &self.reserved1).field("reserved2", &self.reserved2).finish() } } impl ::core::cmp::PartialEq for MI_Serializer { fn eq(&self, other: &Self) -> bool { self.reserved1 == other.reserved1 && self.reserved2 == other.reserved2 } } impl ::core::cmp::Eq for MI_Serializer {} unsafe impl ::windows::core::Abi for MI_Serializer { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_SerializerFT { pub Close: isize, pub SerializeClass: isize, pub SerializeInstance: isize, } impl MI_SerializerFT {} impl ::core::default::Default for MI_SerializerFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_SerializerFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_SerializerFT").field("Close", &self.Close).field("SerializeClass", &self.SerializeClass).field("SerializeInstance", &self.SerializeInstance).finish() } } impl ::core::cmp::PartialEq for MI_SerializerFT { fn eq(&self, other: &Self) -> bool { self.Close == other.Close && self.SerializeClass == other.SerializeClass && self.SerializeInstance == other.SerializeInstance } } impl ::core::cmp::Eq for MI_SerializerFT {} unsafe impl ::windows::core::Abi for MI_SerializerFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Server { pub serverFT: *mut MI_ServerFT, pub contextFT: *mut MI_ContextFT, pub instanceFT: *mut MI_InstanceFT, pub propertySetFT: *mut MI_PropertySetFT, pub filterFT: *mut MI_FilterFT, } impl MI_Server {} impl ::core::default::Default for MI_Server { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Server { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Server").field("serverFT", &self.serverFT).field("contextFT", &self.contextFT).field("instanceFT", &self.instanceFT).field("propertySetFT", &self.propertySetFT).field("filterFT", &self.filterFT).finish() } } impl ::core::cmp::PartialEq for MI_Server { fn eq(&self, other: &Self) -> bool { self.serverFT == other.serverFT && self.contextFT == other.contextFT && self.instanceFT == other.instanceFT && self.propertySetFT == other.propertySetFT && self.filterFT == other.filterFT } } impl ::core::cmp::Eq for MI_Server {} unsafe impl ::windows::core::Abi for MI_Server { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_ServerFT { pub GetVersion: isize, pub GetSystemName: isize, } impl MI_ServerFT {} impl ::core::default::Default for MI_ServerFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_ServerFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_ServerFT").field("GetVersion", &self.GetVersion).field("GetSystemName", &self.GetSystemName).finish() } } impl ::core::cmp::PartialEq for MI_ServerFT { fn eq(&self, other: &Self) -> bool { self.GetVersion == other.GetVersion && self.GetSystemName == other.GetSystemName } } impl ::core::cmp::Eq for MI_ServerFT {} unsafe impl ::windows::core::Abi for MI_ServerFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Session { pub reserved1: u64, pub reserved2: isize, pub ft: *mut MI_SessionFT, } impl MI_Session {} impl ::core::default::Default for MI_Session { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Session { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Session").field("reserved1", &self.reserved1).field("reserved2", &self.reserved2).field("ft", &self.ft).finish() } } impl ::core::cmp::PartialEq for MI_Session { fn eq(&self, other: &Self) -> bool { self.reserved1 == other.reserved1 && self.reserved2 == other.reserved2 && self.ft == other.ft } } impl ::core::cmp::Eq for MI_Session {} unsafe impl ::windows::core::Abi for MI_Session { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_SessionCallbacks { pub callbackContext: *mut ::core::ffi::c_void, pub writeMessage: isize, pub writeError: isize, } impl MI_SessionCallbacks {} impl ::core::default::Default for MI_SessionCallbacks { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_SessionCallbacks { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_SessionCallbacks").field("callbackContext", &self.callbackContext).field("writeMessage", &self.writeMessage).field("writeError", &self.writeError).finish() } } impl ::core::cmp::PartialEq for MI_SessionCallbacks { fn eq(&self, other: &Self) -> bool { self.callbackContext == other.callbackContext && self.writeMessage == other.writeMessage && self.writeError == other.writeError } } impl ::core::cmp::Eq for MI_SessionCallbacks {} unsafe impl ::windows::core::Abi for MI_SessionCallbacks { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_SessionFT { pub Close: isize, pub GetApplication: isize, pub GetInstance: isize, pub ModifyInstance: isize, pub CreateInstance: isize, pub DeleteInstance: isize, pub Invoke: isize, pub EnumerateInstances: isize, pub QueryInstances: isize, pub AssociatorInstances: isize, pub ReferenceInstances: isize, pub Subscribe: isize, pub GetClass: isize, pub EnumerateClasses: isize, pub TestConnection: isize, } impl MI_SessionFT {} impl ::core::default::Default for MI_SessionFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_SessionFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_SessionFT") .field("Close", &self.Close) .field("GetApplication", &self.GetApplication) .field("GetInstance", &self.GetInstance) .field("ModifyInstance", &self.ModifyInstance) .field("CreateInstance", &self.CreateInstance) .field("DeleteInstance", &self.DeleteInstance) .field("Invoke", &self.Invoke) .field("EnumerateInstances", &self.EnumerateInstances) .field("QueryInstances", &self.QueryInstances) .field("AssociatorInstances", &self.AssociatorInstances) .field("ReferenceInstances", &self.ReferenceInstances) .field("Subscribe", &self.Subscribe) .field("GetClass", &self.GetClass) .field("EnumerateClasses", &self.EnumerateClasses) .field("TestConnection", &self.TestConnection) .finish() } } impl ::core::cmp::PartialEq for MI_SessionFT { fn eq(&self, other: &Self) -> bool { self.Close == other.Close && self.GetApplication == other.GetApplication && self.GetInstance == other.GetInstance && self.ModifyInstance == other.ModifyInstance && self.CreateInstance == other.CreateInstance && self.DeleteInstance == other.DeleteInstance && self.Invoke == other.Invoke && self.EnumerateInstances == other.EnumerateInstances && self.QueryInstances == other.QueryInstances && self.AssociatorInstances == other.AssociatorInstances && self.ReferenceInstances == other.ReferenceInstances && self.Subscribe == other.Subscribe && self.GetClass == other.GetClass && self.EnumerateClasses == other.EnumerateClasses && self.TestConnection == other.TestConnection } } impl ::core::cmp::Eq for MI_SessionFT {} unsafe impl ::windows::core::Abi for MI_SessionFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Sint16A { pub data: *mut i16, pub size: u32, } impl MI_Sint16A {} impl ::core::default::Default for MI_Sint16A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Sint16A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Sint16A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_Sint16A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_Sint16A {} unsafe impl ::windows::core::Abi for MI_Sint16A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Sint16AField { pub value: MI_Sint16A, pub exists: u8, pub flags: u8, } impl MI_Sint16AField {} impl ::core::default::Default for MI_Sint16AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Sint16AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Sint16AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Sint16AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Sint16AField {} unsafe impl ::windows::core::Abi for MI_Sint16AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Sint16Field { pub value: i16, pub exists: u8, pub flags: u8, } impl MI_Sint16Field {} impl ::core::default::Default for MI_Sint16Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Sint16Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Sint16Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Sint16Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Sint16Field {} unsafe impl ::windows::core::Abi for MI_Sint16Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Sint32A { pub data: *mut i32, pub size: u32, } impl MI_Sint32A {} impl ::core::default::Default for MI_Sint32A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Sint32A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Sint32A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_Sint32A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_Sint32A {} unsafe impl ::windows::core::Abi for MI_Sint32A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Sint32AField { pub value: MI_Sint32A, pub exists: u8, pub flags: u8, } impl MI_Sint32AField {} impl ::core::default::Default for MI_Sint32AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Sint32AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Sint32AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Sint32AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Sint32AField {} unsafe impl ::windows::core::Abi for MI_Sint32AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Sint32Field { pub value: i32, pub exists: u8, pub flags: u8, } impl MI_Sint32Field {} impl ::core::default::Default for MI_Sint32Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Sint32Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Sint32Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Sint32Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Sint32Field {} unsafe impl ::windows::core::Abi for MI_Sint32Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Sint64A { pub data: *mut i64, pub size: u32, } impl MI_Sint64A {} impl ::core::default::Default for MI_Sint64A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Sint64A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Sint64A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_Sint64A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_Sint64A {} unsafe impl ::windows::core::Abi for MI_Sint64A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Sint64AField { pub value: MI_Sint64A, pub exists: u8, pub flags: u8, } impl MI_Sint64AField {} impl ::core::default::Default for MI_Sint64AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Sint64AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Sint64AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Sint64AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Sint64AField {} unsafe impl ::windows::core::Abi for MI_Sint64AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Sint64Field { pub value: i64, pub exists: u8, pub flags: u8, } impl MI_Sint64Field {} impl ::core::default::Default for MI_Sint64Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Sint64Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Sint64Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Sint64Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Sint64Field {} unsafe impl ::windows::core::Abi for MI_Sint64Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Sint8A { pub data: *mut i8, pub size: u32, } impl MI_Sint8A {} impl ::core::default::Default for MI_Sint8A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Sint8A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Sint8A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_Sint8A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_Sint8A {} unsafe impl ::windows::core::Abi for MI_Sint8A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Sint8AField { pub value: MI_Sint8A, pub exists: u8, pub flags: u8, } impl MI_Sint8AField {} impl ::core::default::Default for MI_Sint8AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Sint8AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Sint8AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Sint8AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Sint8AField {} unsafe impl ::windows::core::Abi for MI_Sint8AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Sint8Field { pub value: i8, pub exists: u8, pub flags: u8, } impl MI_Sint8Field {} impl ::core::default::Default for MI_Sint8Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Sint8Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Sint8Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Sint8Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Sint8Field {} unsafe impl ::windows::core::Abi for MI_Sint8Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_StringA { pub data: *mut *mut u16, pub size: u32, } impl MI_StringA {} impl ::core::default::Default for MI_StringA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_StringA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_StringA").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_StringA { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_StringA {} unsafe impl ::windows::core::Abi for MI_StringA { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_StringAField { pub value: MI_StringA, pub exists: u8, pub flags: u8, } impl MI_StringAField {} impl ::core::default::Default for MI_StringAField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_StringAField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_StringAField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_StringAField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_StringAField {} unsafe impl ::windows::core::Abi for MI_StringAField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_StringField { pub value: *mut u16, pub exists: u8, pub flags: u8, } impl MI_StringField {} impl ::core::default::Default for MI_StringField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_StringField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_StringField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_StringField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_StringField {} unsafe impl ::windows::core::Abi for MI_StringField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_SubscriptionDeliveryOptions { pub reserved1: u64, pub reserved2: isize, pub ft: *mut MI_SubscriptionDeliveryOptionsFT, } impl MI_SubscriptionDeliveryOptions {} impl ::core::default::Default for MI_SubscriptionDeliveryOptions { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_SubscriptionDeliveryOptions { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_SubscriptionDeliveryOptions").field("reserved1", &self.reserved1).field("reserved2", &self.reserved2).field("ft", &self.ft).finish() } } impl ::core::cmp::PartialEq for MI_SubscriptionDeliveryOptions { fn eq(&self, other: &Self) -> bool { self.reserved1 == other.reserved1 && self.reserved2 == other.reserved2 && self.ft == other.ft } } impl ::core::cmp::Eq for MI_SubscriptionDeliveryOptions {} unsafe impl ::windows::core::Abi for MI_SubscriptionDeliveryOptions { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_SubscriptionDeliveryOptionsFT { pub SetString: isize, pub SetNumber: isize, pub SetDateTime: isize, pub SetInterval: isize, pub AddCredentials: isize, pub Delete: isize, pub GetString: isize, pub GetNumber: isize, pub GetDateTime: isize, pub GetInterval: isize, pub GetOptionCount: isize, pub GetOptionAt: isize, pub GetOption: isize, pub GetCredentialsCount: isize, pub GetCredentialsAt: isize, pub GetCredentialsPasswordAt: isize, pub Clone: isize, } impl MI_SubscriptionDeliveryOptionsFT {} impl ::core::default::Default for MI_SubscriptionDeliveryOptionsFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_SubscriptionDeliveryOptionsFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_SubscriptionDeliveryOptionsFT") .field("SetString", &self.SetString) .field("SetNumber", &self.SetNumber) .field("SetDateTime", &self.SetDateTime) .field("SetInterval", &self.SetInterval) .field("AddCredentials", &self.AddCredentials) .field("Delete", &self.Delete) .field("GetString", &self.GetString) .field("GetNumber", &self.GetNumber) .field("GetDateTime", &self.GetDateTime) .field("GetInterval", &self.GetInterval) .field("GetOptionCount", &self.GetOptionCount) .field("GetOptionAt", &self.GetOptionAt) .field("GetOption", &self.GetOption) .field("GetCredentialsCount", &self.GetCredentialsCount) .field("GetCredentialsAt", &self.GetCredentialsAt) .field("GetCredentialsPasswordAt", &self.GetCredentialsPasswordAt) .field("Clone", &self.Clone) .finish() } } impl ::core::cmp::PartialEq for MI_SubscriptionDeliveryOptionsFT { fn eq(&self, other: &Self) -> bool { self.SetString == other.SetString && self.SetNumber == other.SetNumber && self.SetDateTime == other.SetDateTime && self.SetInterval == other.SetInterval && self.AddCredentials == other.AddCredentials && self.Delete == other.Delete && self.GetString == other.GetString && self.GetNumber == other.GetNumber && self.GetDateTime == other.GetDateTime && self.GetInterval == other.GetInterval && self.GetOptionCount == other.GetOptionCount && self.GetOptionAt == other.GetOptionAt && self.GetOption == other.GetOption && self.GetCredentialsCount == other.GetCredentialsCount && self.GetCredentialsAt == other.GetCredentialsAt && self.GetCredentialsPasswordAt == other.GetCredentialsPasswordAt && self.Clone == other.Clone } } impl ::core::cmp::Eq for MI_SubscriptionDeliveryOptionsFT {} unsafe impl ::windows::core::Abi for MI_SubscriptionDeliveryOptionsFT { 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 MI_SubscriptionDeliveryType(pub i32); pub const MI_SubscriptionDeliveryType_Pull: MI_SubscriptionDeliveryType = MI_SubscriptionDeliveryType(1i32); pub const MI_SubscriptionDeliveryType_Push: MI_SubscriptionDeliveryType = MI_SubscriptionDeliveryType(2i32); impl ::core::convert::From<i32> for MI_SubscriptionDeliveryType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MI_SubscriptionDeliveryType { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Timestamp { pub year: u32, pub month: u32, pub day: u32, pub hour: u32, pub minute: u32, pub second: u32, pub microseconds: u32, pub utc: i32, } impl MI_Timestamp {} impl ::core::default::Default for MI_Timestamp { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Timestamp { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Timestamp").field("year", &self.year).field("month", &self.month).field("day", &self.day).field("hour", &self.hour).field("minute", &self.minute).field("second", &self.second).field("microseconds", &self.microseconds).field("utc", &self.utc).finish() } } impl ::core::cmp::PartialEq for MI_Timestamp { fn eq(&self, other: &Self) -> bool { self.year == other.year && self.month == other.month && self.day == other.day && self.hour == other.hour && self.minute == other.minute && self.second == other.second && self.microseconds == other.microseconds && self.utc == other.utc } } impl ::core::cmp::Eq for MI_Timestamp {} unsafe impl ::windows::core::Abi for MI_Timestamp { 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 MI_Type(pub i32); pub const MI_BOOLEAN: MI_Type = MI_Type(0i32); pub const MI_UINT8: MI_Type = MI_Type(1i32); pub const MI_SINT8: MI_Type = MI_Type(2i32); pub const MI_UINT16: MI_Type = MI_Type(3i32); pub const MI_SINT16: MI_Type = MI_Type(4i32); pub const MI_UINT32: MI_Type = MI_Type(5i32); pub const MI_SINT32: MI_Type = MI_Type(6i32); pub const MI_UINT64: MI_Type = MI_Type(7i32); pub const MI_SINT64: MI_Type = MI_Type(8i32); pub const MI_REAL32: MI_Type = MI_Type(9i32); pub const MI_REAL64: MI_Type = MI_Type(10i32); pub const MI_CHAR16: MI_Type = MI_Type(11i32); pub const MI_DATETIME: MI_Type = MI_Type(12i32); pub const MI_STRING: MI_Type = MI_Type(13i32); pub const MI_REFERENCE: MI_Type = MI_Type(14i32); pub const MI_INSTANCE: MI_Type = MI_Type(15i32); pub const MI_BOOLEANA: MI_Type = MI_Type(16i32); pub const MI_UINT8A: MI_Type = MI_Type(17i32); pub const MI_SINT8A: MI_Type = MI_Type(18i32); pub const MI_UINT16A: MI_Type = MI_Type(19i32); pub const MI_SINT16A: MI_Type = MI_Type(20i32); pub const MI_UINT32A: MI_Type = MI_Type(21i32); pub const MI_SINT32A: MI_Type = MI_Type(22i32); pub const MI_UINT64A: MI_Type = MI_Type(23i32); pub const MI_SINT64A: MI_Type = MI_Type(24i32); pub const MI_REAL32A: MI_Type = MI_Type(25i32); pub const MI_REAL64A: MI_Type = MI_Type(26i32); pub const MI_CHAR16A: MI_Type = MI_Type(27i32); pub const MI_DATETIMEA: MI_Type = MI_Type(28i32); pub const MI_STRINGA: MI_Type = MI_Type(29i32); pub const MI_REFERENCEA: MI_Type = MI_Type(30i32); pub const MI_INSTANCEA: MI_Type = MI_Type(31i32); pub const MI_ARRAY: MI_Type = MI_Type(16i32); impl ::core::convert::From<i32> for MI_Type { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MI_Type { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Uint16A { pub data: *mut u16, pub size: u32, } impl MI_Uint16A {} impl ::core::default::Default for MI_Uint16A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Uint16A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Uint16A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_Uint16A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_Uint16A {} unsafe impl ::windows::core::Abi for MI_Uint16A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Uint16AField { pub value: MI_Uint16A, pub exists: u8, pub flags: u8, } impl MI_Uint16AField {} impl ::core::default::Default for MI_Uint16AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Uint16AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Uint16AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Uint16AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Uint16AField {} unsafe impl ::windows::core::Abi for MI_Uint16AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Uint16Field { pub value: u16, pub exists: u8, pub flags: u8, } impl MI_Uint16Field {} impl ::core::default::Default for MI_Uint16Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Uint16Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Uint16Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Uint16Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Uint16Field {} unsafe impl ::windows::core::Abi for MI_Uint16Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Uint32A { pub data: *mut u32, pub size: u32, } impl MI_Uint32A {} impl ::core::default::Default for MI_Uint32A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Uint32A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Uint32A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_Uint32A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_Uint32A {} unsafe impl ::windows::core::Abi for MI_Uint32A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Uint32AField { pub value: MI_Uint32A, pub exists: u8, pub flags: u8, } impl MI_Uint32AField {} impl ::core::default::Default for MI_Uint32AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Uint32AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Uint32AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Uint32AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Uint32AField {} unsafe impl ::windows::core::Abi for MI_Uint32AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Uint32Field { pub value: u32, pub exists: u8, pub flags: u8, } impl MI_Uint32Field {} impl ::core::default::Default for MI_Uint32Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Uint32Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Uint32Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Uint32Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Uint32Field {} unsafe impl ::windows::core::Abi for MI_Uint32Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Uint64A { pub data: *mut u64, pub size: u32, } impl MI_Uint64A {} impl ::core::default::Default for MI_Uint64A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Uint64A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Uint64A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_Uint64A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_Uint64A {} unsafe impl ::windows::core::Abi for MI_Uint64A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Uint64AField { pub value: MI_Uint64A, pub exists: u8, pub flags: u8, } impl MI_Uint64AField {} impl ::core::default::Default for MI_Uint64AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Uint64AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Uint64AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Uint64AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Uint64AField {} unsafe impl ::windows::core::Abi for MI_Uint64AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Uint64Field { pub value: u64, pub exists: u8, pub flags: u8, } impl MI_Uint64Field {} impl ::core::default::Default for MI_Uint64Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Uint64Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Uint64Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Uint64Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Uint64Field {} unsafe impl ::windows::core::Abi for MI_Uint64Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Uint8A { pub data: *mut u8, pub size: u32, } impl MI_Uint8A {} impl ::core::default::Default for MI_Uint8A { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Uint8A { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Uint8A").field("data", &self.data).field("size", &self.size).finish() } } impl ::core::cmp::PartialEq for MI_Uint8A { fn eq(&self, other: &Self) -> bool { self.data == other.data && self.size == other.size } } impl ::core::cmp::Eq for MI_Uint8A {} unsafe impl ::windows::core::Abi for MI_Uint8A { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Uint8AField { pub value: MI_Uint8A, pub exists: u8, pub flags: u8, } impl MI_Uint8AField {} impl ::core::default::Default for MI_Uint8AField { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Uint8AField { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Uint8AField").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Uint8AField { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Uint8AField {} unsafe impl ::windows::core::Abi for MI_Uint8AField { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_Uint8Field { pub value: u8, pub exists: u8, pub flags: u8, } impl MI_Uint8Field {} impl ::core::default::Default for MI_Uint8Field { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_Uint8Field { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_Uint8Field").field("value", &self.value).field("exists", &self.exists).field("flags", &self.flags).finish() } } impl ::core::cmp::PartialEq for MI_Uint8Field { fn eq(&self, other: &Self) -> bool { self.value == other.value && self.exists == other.exists && self.flags == other.flags } } impl ::core::cmp::Eq for MI_Uint8Field {} unsafe impl ::windows::core::Abi for MI_Uint8Field { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_UserCredentials { pub authenticationType: *mut u16, pub credentials: MI_UserCredentials_0, } impl MI_UserCredentials {} impl ::core::default::Default for MI_UserCredentials { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for MI_UserCredentials { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for MI_UserCredentials {} unsafe impl ::windows::core::Abi for MI_UserCredentials { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union MI_UserCredentials_0 { pub usernamePassword: MI_UsernamePasswordCreds, pub certificateThumbprint: *mut u16, } impl MI_UserCredentials_0 {} impl ::core::default::Default for MI_UserCredentials_0 { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for MI_UserCredentials_0 { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for MI_UserCredentials_0 {} unsafe impl ::windows::core::Abi for MI_UserCredentials_0 { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_UsernamePasswordCreds { pub domain: *mut u16, pub username: *mut u16, pub password: *mut u16, } impl MI_UsernamePasswordCreds {} impl ::core::default::Default for MI_UsernamePasswordCreds { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_UsernamePasswordCreds { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_UsernamePasswordCreds").field("domain", &self.domain).field("username", &self.username).field("password", &self.password).finish() } } impl ::core::cmp::PartialEq for MI_UsernamePasswordCreds { fn eq(&self, other: &Self) -> bool { self.domain == other.domain && self.username == other.username && self.password == other.password } } impl ::core::cmp::Eq for MI_UsernamePasswordCreds {} unsafe impl ::windows::core::Abi for MI_UsernamePasswordCreds { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct MI_UtilitiesFT { pub MapErrorToMiErrorCategory: isize, pub CimErrorFromErrorCode: isize, } impl MI_UtilitiesFT {} impl ::core::default::Default for MI_UtilitiesFT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for MI_UtilitiesFT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("MI_UtilitiesFT").field("MapErrorToMiErrorCategory", &self.MapErrorToMiErrorCategory).field("CimErrorFromErrorCode", &self.CimErrorFromErrorCode).finish() } } impl ::core::cmp::PartialEq for MI_UtilitiesFT { fn eq(&self, other: &Self) -> bool { self.MapErrorToMiErrorCategory == other.MapErrorToMiErrorCategory && self.CimErrorFromErrorCode == other.CimErrorFromErrorCode } } impl ::core::cmp::Eq for MI_UtilitiesFT {} unsafe impl ::windows::core::Abi for MI_UtilitiesFT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub union MI_Value { pub boolean: u8, pub uint8: u8, pub sint8: i8, pub uint16: u16, pub sint16: i16, pub uint32: u32, pub sint32: i32, pub uint64: u64, pub sint64: i64, pub real32: f32, pub real64: f64, pub char16: u16, pub datetime: MI_Datetime, pub string: *mut u16, pub instance: *mut MI_Instance, pub reference: *mut MI_Instance, pub booleana: MI_BooleanA, pub uint8a: MI_Uint8A, pub sint8a: MI_Sint8A, pub uint16a: MI_Uint16A, pub sint16a: MI_Sint16A, pub uint32a: MI_Uint32A, pub sint32a: MI_Sint32A, pub uint64a: MI_Uint64A, pub sint64a: MI_Sint64A, pub real32a: MI_Real32A, pub real64a: MI_Real64A, pub char16a: MI_Char16A, pub datetimea: MI_DatetimeA, pub stringa: MI_StringA, pub referencea: MI_ReferenceA, pub instancea: MI_InstanceA, pub array: MI_Array, } impl MI_Value {} impl ::core::default::Default for MI_Value { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::cmp::PartialEq for MI_Value { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } impl ::core::cmp::Eq for MI_Value {} unsafe impl ::windows::core::Abi for MI_Value { type Abi = Self; } pub const MI_WRITEMESSAGE_CHANNEL_DEBUG: u32 = 2u32; pub const MI_WRITEMESSAGE_CHANNEL_VERBOSE: u32 = 1u32; pub const MI_WRITEMESSAGE_CHANNEL_WARNING: u32 = 0u32; pub const MofCompiler: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6daf9757_2e37_11d2_aec9_00c04fb68820); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct SWbemAnalysisMatrix { pub m_uVersion: u32, pub m_uMatrixType: u32, pub m_pszProperty: super::super::Foundation::PWSTR, pub m_uPropertyType: u32, pub m_uEntries: u32, pub m_pValues: *mut *mut ::core::ffi::c_void, pub m_pbTruthTable: *mut super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl SWbemAnalysisMatrix {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for SWbemAnalysisMatrix { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for SWbemAnalysisMatrix { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SWbemAnalysisMatrix") .field("m_uVersion", &self.m_uVersion) .field("m_uMatrixType", &self.m_uMatrixType) .field("m_pszProperty", &self.m_pszProperty) .field("m_uPropertyType", &self.m_uPropertyType) .field("m_uEntries", &self.m_uEntries) .field("m_pValues", &self.m_pValues) .field("m_pbTruthTable", &self.m_pbTruthTable) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for SWbemAnalysisMatrix { fn eq(&self, other: &Self) -> bool { self.m_uVersion == other.m_uVersion && self.m_uMatrixType == other.m_uMatrixType && self.m_pszProperty == other.m_pszProperty && self.m_uPropertyType == other.m_uPropertyType && self.m_uEntries == other.m_uEntries && self.m_pValues == other.m_pValues && self.m_pbTruthTable == other.m_pbTruthTable } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for SWbemAnalysisMatrix {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for SWbemAnalysisMatrix { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct SWbemAnalysisMatrixList { pub m_uVersion: u32, pub m_uMatrixType: u32, pub m_uNumMatrices: u32, pub m_pMatrices: *mut SWbemAnalysisMatrix, } #[cfg(feature = "Win32_Foundation")] impl SWbemAnalysisMatrixList {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for SWbemAnalysisMatrixList { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for SWbemAnalysisMatrixList { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SWbemAnalysisMatrixList").field("m_uVersion", &self.m_uVersion).field("m_uMatrixType", &self.m_uMatrixType).field("m_uNumMatrices", &self.m_uNumMatrices).field("m_pMatrices", &self.m_pMatrices).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for SWbemAnalysisMatrixList { fn eq(&self, other: &Self) -> bool { self.m_uVersion == other.m_uVersion && self.m_uMatrixType == other.m_uMatrixType && self.m_uNumMatrices == other.m_uNumMatrices && self.m_pMatrices == other.m_pMatrices } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for SWbemAnalysisMatrixList {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for SWbemAnalysisMatrixList { type Abi = Self; } #[derive(:: core :: clone :: Clone)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct SWbemAssocQueryInf { pub m_uVersion: u32, pub m_uAnalysisType: u32, pub m_uFeatureMask: u32, pub m_pPath: ::core::option::Option<IWbemPath>, pub m_pszPath: super::super::Foundation::PWSTR, pub m_pszQueryText: super::super::Foundation::PWSTR, pub m_pszResultClass: super::super::Foundation::PWSTR, pub m_pszAssocClass: super::super::Foundation::PWSTR, pub m_pszRole: super::super::Foundation::PWSTR, pub m_pszResultRole: super::super::Foundation::PWSTR, pub m_pszRequiredQualifier: super::super::Foundation::PWSTR, pub m_pszRequiredAssocQualifier: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl SWbemAssocQueryInf {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for SWbemAssocQueryInf { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for SWbemAssocQueryInf { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SWbemAssocQueryInf") .field("m_uVersion", &self.m_uVersion) .field("m_uAnalysisType", &self.m_uAnalysisType) .field("m_uFeatureMask", &self.m_uFeatureMask) .field("m_pPath", &self.m_pPath) .field("m_pszPath", &self.m_pszPath) .field("m_pszQueryText", &self.m_pszQueryText) .field("m_pszResultClass", &self.m_pszResultClass) .field("m_pszAssocClass", &self.m_pszAssocClass) .field("m_pszRole", &self.m_pszRole) .field("m_pszResultRole", &self.m_pszResultRole) .field("m_pszRequiredQualifier", &self.m_pszRequiredQualifier) .field("m_pszRequiredAssocQualifier", &self.m_pszRequiredAssocQualifier) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for SWbemAssocQueryInf { fn eq(&self, other: &Self) -> bool { self.m_uVersion == other.m_uVersion && self.m_uAnalysisType == other.m_uAnalysisType && self.m_uFeatureMask == other.m_uFeatureMask && self.m_pPath == other.m_pPath && self.m_pszPath == other.m_pszPath && self.m_pszQueryText == other.m_pszQueryText && self.m_pszResultClass == other.m_pszResultClass && self.m_pszAssocClass == other.m_pszAssocClass && self.m_pszRole == other.m_pszRole && self.m_pszResultRole == other.m_pszResultRole && self.m_pszRequiredQualifier == other.m_pszRequiredQualifier && self.m_pszRequiredAssocQualifier == other.m_pszRequiredAssocQualifier } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for SWbemAssocQueryInf {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for SWbemAssocQueryInf { type Abi = ::core::mem::ManuallyDrop<Self>; } pub const SWbemDateTime: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x47dfbe54_cf76_11d3_b38f_00105a1f473a); pub const SWbemEventSource: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x04b83d58_21ae_11d2_8b33_00600806d9b6); pub const SWbemLastError: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc2feeeac_cfcd_11d1_8b05_00600806d9b6); pub const SWbemLocator: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x76a64158_cb41_11d1_8b02_00600806d9b6); pub const SWbemMethod: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x04b83d5b_21ae_11d2_8b33_00600806d9b6); pub const SWbemMethodSet: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x04b83d5a_21ae_11d2_8b33_00600806d9b6); pub const SWbemNamedValue: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x04b83d60_21ae_11d2_8b33_00600806d9b6); pub const SWbemNamedValueSet: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9aed384e_ce8b_11d1_8b05_00600806d9b6); pub const SWbemObject: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x04b83d62_21ae_11d2_8b33_00600806d9b6); pub const SWbemObjectEx: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd6bdafb2_9435_491f_bb87_6aa0f0bc31a2); pub const SWbemObjectPath: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5791bc26_ce9c_11d1_97bf_0000f81e849c); pub const SWbemObjectSet: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x04b83d61_21ae_11d2_8b33_00600806d9b6); pub const SWbemPrivilege: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x26ee67bc_5804_11d2_8b4a_00600806d9b6); pub const SWbemPrivilegeSet: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x26ee67be_5804_11d2_8b4a_00600806d9b6); pub const SWbemProperty: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x04b83d5d_21ae_11d2_8b33_00600806d9b6); pub const SWbemPropertySet: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x04b83d5c_21ae_11d2_8b33_00600806d9b6); pub const SWbemQualifier: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x04b83d5f_21ae_11d2_8b33_00600806d9b6); pub const SWbemQualifierSet: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x04b83d5e_21ae_11d2_8b33_00600806d9b6); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct SWbemQueryQualifiedName { pub m_uVersion: u32, pub m_uTokenType: u32, pub m_uNameListSize: u32, pub m_ppszNameList: *mut super::super::Foundation::PWSTR, pub m_bArraysUsed: super::super::Foundation::BOOL, pub m_pbArrayElUsed: *mut super::super::Foundation::BOOL, pub m_puArrayIndex: *mut u32, } #[cfg(feature = "Win32_Foundation")] impl SWbemQueryQualifiedName {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for SWbemQueryQualifiedName { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for SWbemQueryQualifiedName { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SWbemQueryQualifiedName") .field("m_uVersion", &self.m_uVersion) .field("m_uTokenType", &self.m_uTokenType) .field("m_uNameListSize", &self.m_uNameListSize) .field("m_ppszNameList", &self.m_ppszNameList) .field("m_bArraysUsed", &self.m_bArraysUsed) .field("m_pbArrayElUsed", &self.m_pbArrayElUsed) .field("m_puArrayIndex", &self.m_puArrayIndex) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for SWbemQueryQualifiedName { fn eq(&self, other: &Self) -> bool { self.m_uVersion == other.m_uVersion && self.m_uTokenType == other.m_uTokenType && self.m_uNameListSize == other.m_uNameListSize && self.m_ppszNameList == other.m_ppszNameList && self.m_bArraysUsed == other.m_bArraysUsed && self.m_pbArrayElUsed == other.m_pbArrayElUsed && self.m_puArrayIndex == other.m_puArrayIndex } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for SWbemQueryQualifiedName {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for SWbemQueryQualifiedName { type Abi = Self; } pub const SWbemRefreshableItem: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8c6854bc_de4b_11d3_b390_00105a1f473a); pub const SWbemRefresher: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd269bf5c_d9c1_11d3_b38f_00105a1f473a); #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union SWbemRpnConst { pub m_pszStrVal: super::super::Foundation::PWSTR, pub m_bBoolVal: super::super::Foundation::BOOL, pub m_lLongVal: i32, pub m_uLongVal: u32, pub m_dblVal: f64, pub m_lVal64: i64, pub m_uVal64: i64, } #[cfg(feature = "Win32_Foundation")] impl SWbemRpnConst {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for SWbemRpnConst { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for SWbemRpnConst { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for SWbemRpnConst {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for SWbemRpnConst { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct SWbemRpnEncodedQuery { pub m_uVersion: u32, pub m_uTokenType: u32, pub m_uParsedFeatureMask: u64, pub m_uDetectedArraySize: u32, pub m_puDetectedFeatures: *mut u32, pub m_uSelectListSize: u32, pub m_ppSelectList: *mut *mut SWbemQueryQualifiedName, pub m_uFromTargetType: u32, pub m_pszOptionalFromPath: super::super::Foundation::PWSTR, pub m_uFromListSize: u32, pub m_ppszFromList: *mut super::super::Foundation::PWSTR, pub m_uWhereClauseSize: u32, pub m_ppRpnWhereClause: *mut *mut SWbemRpnQueryToken, pub m_dblWithinPolling: f64, pub m_dblWithinWindow: f64, pub m_uOrderByListSize: u32, pub m_ppszOrderByList: *mut super::super::Foundation::PWSTR, pub m_uOrderDirectionEl: *mut u32, } #[cfg(feature = "Win32_Foundation")] impl SWbemRpnEncodedQuery {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for SWbemRpnEncodedQuery { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for SWbemRpnEncodedQuery { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SWbemRpnEncodedQuery") .field("m_uVersion", &self.m_uVersion) .field("m_uTokenType", &self.m_uTokenType) .field("m_uParsedFeatureMask", &self.m_uParsedFeatureMask) .field("m_uDetectedArraySize", &self.m_uDetectedArraySize) .field("m_puDetectedFeatures", &self.m_puDetectedFeatures) .field("m_uSelectListSize", &self.m_uSelectListSize) .field("m_ppSelectList", &self.m_ppSelectList) .field("m_uFromTargetType", &self.m_uFromTargetType) .field("m_pszOptionalFromPath", &self.m_pszOptionalFromPath) .field("m_uFromListSize", &self.m_uFromListSize) .field("m_ppszFromList", &self.m_ppszFromList) .field("m_uWhereClauseSize", &self.m_uWhereClauseSize) .field("m_ppRpnWhereClause", &self.m_ppRpnWhereClause) .field("m_dblWithinPolling", &self.m_dblWithinPolling) .field("m_dblWithinWindow", &self.m_dblWithinWindow) .field("m_uOrderByListSize", &self.m_uOrderByListSize) .field("m_ppszOrderByList", &self.m_ppszOrderByList) .field("m_uOrderDirectionEl", &self.m_uOrderDirectionEl) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for SWbemRpnEncodedQuery { fn eq(&self, other: &Self) -> bool { self.m_uVersion == other.m_uVersion && self.m_uTokenType == other.m_uTokenType && self.m_uParsedFeatureMask == other.m_uParsedFeatureMask && self.m_uDetectedArraySize == other.m_uDetectedArraySize && self.m_puDetectedFeatures == other.m_puDetectedFeatures && self.m_uSelectListSize == other.m_uSelectListSize && self.m_ppSelectList == other.m_ppSelectList && self.m_uFromTargetType == other.m_uFromTargetType && self.m_pszOptionalFromPath == other.m_pszOptionalFromPath && self.m_uFromListSize == other.m_uFromListSize && self.m_ppszFromList == other.m_ppszFromList && self.m_uWhereClauseSize == other.m_uWhereClauseSize && self.m_ppRpnWhereClause == other.m_ppRpnWhereClause && self.m_dblWithinPolling == other.m_dblWithinPolling && self.m_dblWithinWindow == other.m_dblWithinWindow && self.m_uOrderByListSize == other.m_uOrderByListSize && self.m_ppszOrderByList == other.m_ppszOrderByList && self.m_uOrderDirectionEl == other.m_uOrderDirectionEl } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for SWbemRpnEncodedQuery {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for SWbemRpnEncodedQuery { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct SWbemRpnQueryToken { pub m_uVersion: u32, pub m_uTokenType: u32, pub m_uSubexpressionShape: u32, pub m_uOperator: u32, pub m_pRightIdent: *mut SWbemQueryQualifiedName, pub m_pLeftIdent: *mut SWbemQueryQualifiedName, pub m_uConstApparentType: u32, pub m_Const: SWbemRpnConst, pub m_uConst2ApparentType: u32, pub m_Const2: SWbemRpnConst, pub m_pszRightFunc: super::super::Foundation::PWSTR, pub m_pszLeftFunc: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl SWbemRpnQueryToken {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for SWbemRpnQueryToken { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for SWbemRpnQueryToken { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for SWbemRpnQueryToken {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for SWbemRpnQueryToken { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct SWbemRpnTokenList { pub m_uVersion: u32, pub m_uTokenType: u32, pub m_uNumTokens: u32, } impl SWbemRpnTokenList {} impl ::core::default::Default for SWbemRpnTokenList { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for SWbemRpnTokenList { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("SWbemRpnTokenList").field("m_uVersion", &self.m_uVersion).field("m_uTokenType", &self.m_uTokenType).field("m_uNumTokens", &self.m_uNumTokens).finish() } } impl ::core::cmp::PartialEq for SWbemRpnTokenList { fn eq(&self, other: &Self) -> bool { self.m_uVersion == other.m_uVersion && self.m_uTokenType == other.m_uTokenType && self.m_uNumTokens == other.m_uNumTokens } } impl ::core::cmp::Eq for SWbemRpnTokenList {} unsafe impl ::windows::core::Abi for SWbemRpnTokenList { type Abi = Self; } pub const SWbemSecurity: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb54d66e9_2287_11d2_8b33_00600806d9b6); pub const SWbemServices: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x04b83d63_21ae_11d2_8b33_00600806d9b6); pub const SWbemServicesEx: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x62e522dc_8cf3_40a8_8b2e_37d595651e40); pub const SWbemSink: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x75718c9a_f029_11d1_a1ac_00c04fb6c223); pub const UnsecuredApartment: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x49bd2028_1523_11d1_ad79_00c04fd8fdff); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct WBEMSTATUS(pub i32); pub const WBEM_NO_ERROR: WBEMSTATUS = WBEMSTATUS(0i32); pub const WBEM_S_NO_ERROR: WBEMSTATUS = WBEMSTATUS(0i32); pub const WBEM_S_SAME: WBEMSTATUS = WBEMSTATUS(0i32); pub const WBEM_S_FALSE: WBEMSTATUS = WBEMSTATUS(1i32); pub const WBEM_S_ALREADY_EXISTS: WBEMSTATUS = WBEMSTATUS(262145i32); pub const WBEM_S_RESET_TO_DEFAULT: WBEMSTATUS = WBEMSTATUS(262146i32); pub const WBEM_S_DIFFERENT: WBEMSTATUS = WBEMSTATUS(262147i32); pub const WBEM_S_TIMEDOUT: WBEMSTATUS = WBEMSTATUS(262148i32); pub const WBEM_S_NO_MORE_DATA: WBEMSTATUS = WBEMSTATUS(262149i32); pub const WBEM_S_OPERATION_CANCELLED: WBEMSTATUS = WBEMSTATUS(262150i32); pub const WBEM_S_PENDING: WBEMSTATUS = WBEMSTATUS(262151i32); pub const WBEM_S_DUPLICATE_OBJECTS: WBEMSTATUS = WBEMSTATUS(262152i32); pub const WBEM_S_ACCESS_DENIED: WBEMSTATUS = WBEMSTATUS(262153i32); pub const WBEM_S_PARTIAL_RESULTS: WBEMSTATUS = WBEMSTATUS(262160i32); pub const WBEM_S_SOURCE_NOT_AVAILABLE: WBEMSTATUS = WBEMSTATUS(262167i32); pub const WBEM_E_FAILED: WBEMSTATUS = WBEMSTATUS(-2147217407i32); pub const WBEM_E_NOT_FOUND: WBEMSTATUS = WBEMSTATUS(-2147217406i32); pub const WBEM_E_ACCESS_DENIED: WBEMSTATUS = WBEMSTATUS(-2147217405i32); pub const WBEM_E_PROVIDER_FAILURE: WBEMSTATUS = WBEMSTATUS(-2147217404i32); pub const WBEM_E_TYPE_MISMATCH: WBEMSTATUS = WBEMSTATUS(-2147217403i32); pub const WBEM_E_OUT_OF_MEMORY: WBEMSTATUS = WBEMSTATUS(-2147217402i32); pub const WBEM_E_INVALID_CONTEXT: WBEMSTATUS = WBEMSTATUS(-2147217401i32); pub const WBEM_E_INVALID_PARAMETER: WBEMSTATUS = WBEMSTATUS(-2147217400i32); pub const WBEM_E_NOT_AVAILABLE: WBEMSTATUS = WBEMSTATUS(-2147217399i32); pub const WBEM_E_CRITICAL_ERROR: WBEMSTATUS = WBEMSTATUS(-2147217398i32); pub const WBEM_E_INVALID_STREAM: WBEMSTATUS = WBEMSTATUS(-2147217397i32); pub const WBEM_E_NOT_SUPPORTED: WBEMSTATUS = WBEMSTATUS(-2147217396i32); pub const WBEM_E_INVALID_SUPERCLASS: WBEMSTATUS = WBEMSTATUS(-2147217395i32); pub const WBEM_E_INVALID_NAMESPACE: WBEMSTATUS = WBEMSTATUS(-2147217394i32); pub const WBEM_E_INVALID_OBJECT: WBEMSTATUS = WBEMSTATUS(-2147217393i32); pub const WBEM_E_INVALID_CLASS: WBEMSTATUS = WBEMSTATUS(-2147217392i32); pub const WBEM_E_PROVIDER_NOT_FOUND: WBEMSTATUS = WBEMSTATUS(-2147217391i32); pub const WBEM_E_INVALID_PROVIDER_REGISTRATION: WBEMSTATUS = WBEMSTATUS(-2147217390i32); pub const WBEM_E_PROVIDER_LOAD_FAILURE: WBEMSTATUS = WBEMSTATUS(-2147217389i32); pub const WBEM_E_INITIALIZATION_FAILURE: WBEMSTATUS = WBEMSTATUS(-2147217388i32); pub const WBEM_E_TRANSPORT_FAILURE: WBEMSTATUS = WBEMSTATUS(-2147217387i32); pub const WBEM_E_INVALID_OPERATION: WBEMSTATUS = WBEMSTATUS(-2147217386i32); pub const WBEM_E_INVALID_QUERY: WBEMSTATUS = WBEMSTATUS(-2147217385i32); pub const WBEM_E_INVALID_QUERY_TYPE: WBEMSTATUS = WBEMSTATUS(-2147217384i32); pub const WBEM_E_ALREADY_EXISTS: WBEMSTATUS = WBEMSTATUS(-2147217383i32); pub const WBEM_E_OVERRIDE_NOT_ALLOWED: WBEMSTATUS = WBEMSTATUS(-2147217382i32); pub const WBEM_E_PROPAGATED_QUALIFIER: WBEMSTATUS = WBEMSTATUS(-2147217381i32); pub const WBEM_E_PROPAGATED_PROPERTY: WBEMSTATUS = WBEMSTATUS(-2147217380i32); pub const WBEM_E_UNEXPECTED: WBEMSTATUS = WBEMSTATUS(-2147217379i32); pub const WBEM_E_ILLEGAL_OPERATION: WBEMSTATUS = WBEMSTATUS(-2147217378i32); pub const WBEM_E_CANNOT_BE_KEY: WBEMSTATUS = WBEMSTATUS(-2147217377i32); pub const WBEM_E_INCOMPLETE_CLASS: WBEMSTATUS = WBEMSTATUS(-2147217376i32); pub const WBEM_E_INVALID_SYNTAX: WBEMSTATUS = WBEMSTATUS(-2147217375i32); pub const WBEM_E_NONDECORATED_OBJECT: WBEMSTATUS = WBEMSTATUS(-2147217374i32); pub const WBEM_E_READ_ONLY: WBEMSTATUS = WBEMSTATUS(-2147217373i32); pub const WBEM_E_PROVIDER_NOT_CAPABLE: WBEMSTATUS = WBEMSTATUS(-2147217372i32); pub const WBEM_E_CLASS_HAS_CHILDREN: WBEMSTATUS = WBEMSTATUS(-2147217371i32); pub const WBEM_E_CLASS_HAS_INSTANCES: WBEMSTATUS = WBEMSTATUS(-2147217370i32); pub const WBEM_E_QUERY_NOT_IMPLEMENTED: WBEMSTATUS = WBEMSTATUS(-2147217369i32); pub const WBEM_E_ILLEGAL_NULL: WBEMSTATUS = WBEMSTATUS(-2147217368i32); pub const WBEM_E_INVALID_QUALIFIER_TYPE: WBEMSTATUS = WBEMSTATUS(-2147217367i32); pub const WBEM_E_INVALID_PROPERTY_TYPE: WBEMSTATUS = WBEMSTATUS(-2147217366i32); pub const WBEM_E_VALUE_OUT_OF_RANGE: WBEMSTATUS = WBEMSTATUS(-2147217365i32); pub const WBEM_E_CANNOT_BE_SINGLETON: WBEMSTATUS = WBEMSTATUS(-2147217364i32); pub const WBEM_E_INVALID_CIM_TYPE: WBEMSTATUS = WBEMSTATUS(-2147217363i32); pub const WBEM_E_INVALID_METHOD: WBEMSTATUS = WBEMSTATUS(-2147217362i32); pub const WBEM_E_INVALID_METHOD_PARAMETERS: WBEMSTATUS = WBEMSTATUS(-2147217361i32); pub const WBEM_E_SYSTEM_PROPERTY: WBEMSTATUS = WBEMSTATUS(-2147217360i32); pub const WBEM_E_INVALID_PROPERTY: WBEMSTATUS = WBEMSTATUS(-2147217359i32); pub const WBEM_E_CALL_CANCELLED: WBEMSTATUS = WBEMSTATUS(-2147217358i32); pub const WBEM_E_SHUTTING_DOWN: WBEMSTATUS = WBEMSTATUS(-2147217357i32); pub const WBEM_E_PROPAGATED_METHOD: WBEMSTATUS = WBEMSTATUS(-2147217356i32); pub const WBEM_E_UNSUPPORTED_PARAMETER: WBEMSTATUS = WBEMSTATUS(-2147217355i32); pub const WBEM_E_MISSING_PARAMETER_ID: WBEMSTATUS = WBEMSTATUS(-2147217354i32); pub const WBEM_E_INVALID_PARAMETER_ID: WBEMSTATUS = WBEMSTATUS(-2147217353i32); pub const WBEM_E_NONCONSECUTIVE_PARAMETER_IDS: WBEMSTATUS = WBEMSTATUS(-2147217352i32); pub const WBEM_E_PARAMETER_ID_ON_RETVAL: WBEMSTATUS = WBEMSTATUS(-2147217351i32); pub const WBEM_E_INVALID_OBJECT_PATH: WBEMSTATUS = WBEMSTATUS(-2147217350i32); pub const WBEM_E_OUT_OF_DISK_SPACE: WBEMSTATUS = WBEMSTATUS(-2147217349i32); pub const WBEM_E_BUFFER_TOO_SMALL: WBEMSTATUS = WBEMSTATUS(-2147217348i32); pub const WBEM_E_UNSUPPORTED_PUT_EXTENSION: WBEMSTATUS = WBEMSTATUS(-2147217347i32); pub const WBEM_E_UNKNOWN_OBJECT_TYPE: WBEMSTATUS = WBEMSTATUS(-2147217346i32); pub const WBEM_E_UNKNOWN_PACKET_TYPE: WBEMSTATUS = WBEMSTATUS(-2147217345i32); pub const WBEM_E_MARSHAL_VERSION_MISMATCH: WBEMSTATUS = WBEMSTATUS(-2147217344i32); pub const WBEM_E_MARSHAL_INVALID_SIGNATURE: WBEMSTATUS = WBEMSTATUS(-2147217343i32); pub const WBEM_E_INVALID_QUALIFIER: WBEMSTATUS = WBEMSTATUS(-2147217342i32); pub const WBEM_E_INVALID_DUPLICATE_PARAMETER: WBEMSTATUS = WBEMSTATUS(-2147217341i32); pub const WBEM_E_TOO_MUCH_DATA: WBEMSTATUS = WBEMSTATUS(-2147217340i32); pub const WBEM_E_SERVER_TOO_BUSY: WBEMSTATUS = WBEMSTATUS(-2147217339i32); pub const WBEM_E_INVALID_FLAVOR: WBEMSTATUS = WBEMSTATUS(-2147217338i32); pub const WBEM_E_CIRCULAR_REFERENCE: WBEMSTATUS = WBEMSTATUS(-2147217337i32); pub const WBEM_E_UNSUPPORTED_CLASS_UPDATE: WBEMSTATUS = WBEMSTATUS(-2147217336i32); pub const WBEM_E_CANNOT_CHANGE_KEY_INHERITANCE: WBEMSTATUS = WBEMSTATUS(-2147217335i32); pub const WBEM_E_CANNOT_CHANGE_INDEX_INHERITANCE: WBEMSTATUS = WBEMSTATUS(-2147217328i32); pub const WBEM_E_TOO_MANY_PROPERTIES: WBEMSTATUS = WBEMSTATUS(-2147217327i32); pub const WBEM_E_UPDATE_TYPE_MISMATCH: WBEMSTATUS = WBEMSTATUS(-2147217326i32); pub const WBEM_E_UPDATE_OVERRIDE_NOT_ALLOWED: WBEMSTATUS = WBEMSTATUS(-2147217325i32); pub const WBEM_E_UPDATE_PROPAGATED_METHOD: WBEMSTATUS = WBEMSTATUS(-2147217324i32); pub const WBEM_E_METHOD_NOT_IMPLEMENTED: WBEMSTATUS = WBEMSTATUS(-2147217323i32); pub const WBEM_E_METHOD_DISABLED: WBEMSTATUS = WBEMSTATUS(-2147217322i32); pub const WBEM_E_REFRESHER_BUSY: WBEMSTATUS = WBEMSTATUS(-2147217321i32); pub const WBEM_E_UNPARSABLE_QUERY: WBEMSTATUS = WBEMSTATUS(-2147217320i32); pub const WBEM_E_NOT_EVENT_CLASS: WBEMSTATUS = WBEMSTATUS(-2147217319i32); pub const WBEM_E_MISSING_GROUP_WITHIN: WBEMSTATUS = WBEMSTATUS(-2147217318i32); pub const WBEM_E_MISSING_AGGREGATION_LIST: WBEMSTATUS = WBEMSTATUS(-2147217317i32); pub const WBEM_E_PROPERTY_NOT_AN_OBJECT: WBEMSTATUS = WBEMSTATUS(-2147217316i32); pub const WBEM_E_AGGREGATING_BY_OBJECT: WBEMSTATUS = WBEMSTATUS(-2147217315i32); pub const WBEM_E_UNINTERPRETABLE_PROVIDER_QUERY: WBEMSTATUS = WBEMSTATUS(-2147217313i32); pub const WBEM_E_BACKUP_RESTORE_WINMGMT_RUNNING: WBEMSTATUS = WBEMSTATUS(-2147217312i32); pub const WBEM_E_QUEUE_OVERFLOW: WBEMSTATUS = WBEMSTATUS(-2147217311i32); pub const WBEM_E_PRIVILEGE_NOT_HELD: WBEMSTATUS = WBEMSTATUS(-2147217310i32); pub const WBEM_E_INVALID_OPERATOR: WBEMSTATUS = WBEMSTATUS(-2147217309i32); pub const WBEM_E_LOCAL_CREDENTIALS: WBEMSTATUS = WBEMSTATUS(-2147217308i32); pub const WBEM_E_CANNOT_BE_ABSTRACT: WBEMSTATUS = WBEMSTATUS(-2147217307i32); pub const WBEM_E_AMENDED_OBJECT: WBEMSTATUS = WBEMSTATUS(-2147217306i32); pub const WBEM_E_CLIENT_TOO_SLOW: WBEMSTATUS = WBEMSTATUS(-2147217305i32); pub const WBEM_E_NULL_SECURITY_DESCRIPTOR: WBEMSTATUS = WBEMSTATUS(-2147217304i32); pub const WBEM_E_TIMED_OUT: WBEMSTATUS = WBEMSTATUS(-2147217303i32); pub const WBEM_E_INVALID_ASSOCIATION: WBEMSTATUS = WBEMSTATUS(-2147217302i32); pub const WBEM_E_AMBIGUOUS_OPERATION: WBEMSTATUS = WBEMSTATUS(-2147217301i32); pub const WBEM_E_QUOTA_VIOLATION: WBEMSTATUS = WBEMSTATUS(-2147217300i32); pub const WBEM_E_RESERVED_001: WBEMSTATUS = WBEMSTATUS(-2147217299i32); pub const WBEM_E_RESERVED_002: WBEMSTATUS = WBEMSTATUS(-2147217298i32); pub const WBEM_E_UNSUPPORTED_LOCALE: WBEMSTATUS = WBEMSTATUS(-2147217297i32); pub const WBEM_E_HANDLE_OUT_OF_DATE: WBEMSTATUS = WBEMSTATUS(-2147217296i32); pub const WBEM_E_CONNECTION_FAILED: WBEMSTATUS = WBEMSTATUS(-2147217295i32); pub const WBEM_E_INVALID_HANDLE_REQUEST: WBEMSTATUS = WBEMSTATUS(-2147217294i32); pub const WBEM_E_PROPERTY_NAME_TOO_WIDE: WBEMSTATUS = WBEMSTATUS(-2147217293i32); pub const WBEM_E_CLASS_NAME_TOO_WIDE: WBEMSTATUS = WBEMSTATUS(-2147217292i32); pub const WBEM_E_METHOD_NAME_TOO_WIDE: WBEMSTATUS = WBEMSTATUS(-2147217291i32); pub const WBEM_E_QUALIFIER_NAME_TOO_WIDE: WBEMSTATUS = WBEMSTATUS(-2147217290i32); pub const WBEM_E_RERUN_COMMAND: WBEMSTATUS = WBEMSTATUS(-2147217289i32); pub const WBEM_E_DATABASE_VER_MISMATCH: WBEMSTATUS = WBEMSTATUS(-2147217288i32); pub const WBEM_E_VETO_DELETE: WBEMSTATUS = WBEMSTATUS(-2147217287i32); pub const WBEM_E_VETO_PUT: WBEMSTATUS = WBEMSTATUS(-2147217286i32); pub const WBEM_E_INVALID_LOCALE: WBEMSTATUS = WBEMSTATUS(-2147217280i32); pub const WBEM_E_PROVIDER_SUSPENDED: WBEMSTATUS = WBEMSTATUS(-2147217279i32); pub const WBEM_E_SYNCHRONIZATION_REQUIRED: WBEMSTATUS = WBEMSTATUS(-2147217278i32); pub const WBEM_E_NO_SCHEMA: WBEMSTATUS = WBEMSTATUS(-2147217277i32); pub const WBEM_E_PROVIDER_ALREADY_REGISTERED: WBEMSTATUS = WBEMSTATUS(-2147217276i32); pub const WBEM_E_PROVIDER_NOT_REGISTERED: WBEMSTATUS = WBEMSTATUS(-2147217275i32); pub const WBEM_E_FATAL_TRANSPORT_ERROR: WBEMSTATUS = WBEMSTATUS(-2147217274i32); pub const WBEM_E_ENCRYPTED_CONNECTION_REQUIRED: WBEMSTATUS = WBEMSTATUS(-2147217273i32); pub const WBEM_E_PROVIDER_TIMED_OUT: WBEMSTATUS = WBEMSTATUS(-2147217272i32); pub const WBEM_E_NO_KEY: WBEMSTATUS = WBEMSTATUS(-2147217271i32); pub const WBEM_E_PROVIDER_DISABLED: WBEMSTATUS = WBEMSTATUS(-2147217270i32); pub const WBEMESS_E_REGISTRATION_TOO_BROAD: WBEMSTATUS = WBEMSTATUS(-2147213311i32); pub const WBEMESS_E_REGISTRATION_TOO_PRECISE: WBEMSTATUS = WBEMSTATUS(-2147213310i32); pub const WBEMESS_E_AUTHZ_NOT_PRIVILEGED: WBEMSTATUS = WBEMSTATUS(-2147213309i32); pub const WBEMMOF_E_EXPECTED_QUALIFIER_NAME: WBEMSTATUS = WBEMSTATUS(-2147205119i32); pub const WBEMMOF_E_EXPECTED_SEMI: WBEMSTATUS = WBEMSTATUS(-2147205118i32); pub const WBEMMOF_E_EXPECTED_OPEN_BRACE: WBEMSTATUS = WBEMSTATUS(-2147205117i32); pub const WBEMMOF_E_EXPECTED_CLOSE_BRACE: WBEMSTATUS = WBEMSTATUS(-2147205116i32); pub const WBEMMOF_E_EXPECTED_CLOSE_BRACKET: WBEMSTATUS = WBEMSTATUS(-2147205115i32); pub const WBEMMOF_E_EXPECTED_CLOSE_PAREN: WBEMSTATUS = WBEMSTATUS(-2147205114i32); pub const WBEMMOF_E_ILLEGAL_CONSTANT_VALUE: WBEMSTATUS = WBEMSTATUS(-2147205113i32); pub const WBEMMOF_E_EXPECTED_TYPE_IDENTIFIER: WBEMSTATUS = WBEMSTATUS(-2147205112i32); pub const WBEMMOF_E_EXPECTED_OPEN_PAREN: WBEMSTATUS = WBEMSTATUS(-2147205111i32); pub const WBEMMOF_E_UNRECOGNIZED_TOKEN: WBEMSTATUS = WBEMSTATUS(-2147205110i32); pub const WBEMMOF_E_UNRECOGNIZED_TYPE: WBEMSTATUS = WBEMSTATUS(-2147205109i32); pub const WBEMMOF_E_EXPECTED_PROPERTY_NAME: WBEMSTATUS = WBEMSTATUS(-2147205108i32); pub const WBEMMOF_E_TYPEDEF_NOT_SUPPORTED: WBEMSTATUS = WBEMSTATUS(-2147205107i32); pub const WBEMMOF_E_UNEXPECTED_ALIAS: WBEMSTATUS = WBEMSTATUS(-2147205106i32); pub const WBEMMOF_E_UNEXPECTED_ARRAY_INIT: WBEMSTATUS = WBEMSTATUS(-2147205105i32); pub const WBEMMOF_E_INVALID_AMENDMENT_SYNTAX: WBEMSTATUS = WBEMSTATUS(-2147205104i32); pub const WBEMMOF_E_INVALID_DUPLICATE_AMENDMENT: WBEMSTATUS = WBEMSTATUS(-2147205103i32); pub const WBEMMOF_E_INVALID_PRAGMA: WBEMSTATUS = WBEMSTATUS(-2147205102i32); pub const WBEMMOF_E_INVALID_NAMESPACE_SYNTAX: WBEMSTATUS = WBEMSTATUS(-2147205101i32); pub const WBEMMOF_E_EXPECTED_CLASS_NAME: WBEMSTATUS = WBEMSTATUS(-2147205100i32); pub const WBEMMOF_E_TYPE_MISMATCH: WBEMSTATUS = WBEMSTATUS(-2147205099i32); pub const WBEMMOF_E_EXPECTED_ALIAS_NAME: WBEMSTATUS = WBEMSTATUS(-2147205098i32); pub const WBEMMOF_E_INVALID_CLASS_DECLARATION: WBEMSTATUS = WBEMSTATUS(-2147205097i32); pub const WBEMMOF_E_INVALID_INSTANCE_DECLARATION: WBEMSTATUS = WBEMSTATUS(-2147205096i32); pub const WBEMMOF_E_EXPECTED_DOLLAR: WBEMSTATUS = WBEMSTATUS(-2147205095i32); pub const WBEMMOF_E_CIMTYPE_QUALIFIER: WBEMSTATUS = WBEMSTATUS(-2147205094i32); pub const WBEMMOF_E_DUPLICATE_PROPERTY: WBEMSTATUS = WBEMSTATUS(-2147205093i32); pub const WBEMMOF_E_INVALID_NAMESPACE_SPECIFICATION: WBEMSTATUS = WBEMSTATUS(-2147205092i32); pub const WBEMMOF_E_OUT_OF_RANGE: WBEMSTATUS = WBEMSTATUS(-2147205091i32); pub const WBEMMOF_E_INVALID_FILE: WBEMSTATUS = WBEMSTATUS(-2147205090i32); pub const WBEMMOF_E_ALIASES_IN_EMBEDDED: WBEMSTATUS = WBEMSTATUS(-2147205089i32); pub const WBEMMOF_E_NULL_ARRAY_ELEM: WBEMSTATUS = WBEMSTATUS(-2147205088i32); pub const WBEMMOF_E_DUPLICATE_QUALIFIER: WBEMSTATUS = WBEMSTATUS(-2147205087i32); pub const WBEMMOF_E_EXPECTED_FLAVOR_TYPE: WBEMSTATUS = WBEMSTATUS(-2147205086i32); pub const WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES: WBEMSTATUS = WBEMSTATUS(-2147205085i32); pub const WBEMMOF_E_MULTIPLE_ALIASES: WBEMSTATUS = WBEMSTATUS(-2147205084i32); pub const WBEMMOF_E_INCOMPATIBLE_FLAVOR_TYPES2: WBEMSTATUS = WBEMSTATUS(-2147205083i32); pub const WBEMMOF_E_NO_ARRAYS_RETURNED: WBEMSTATUS = WBEMSTATUS(-2147205082i32); pub const WBEMMOF_E_MUST_BE_IN_OR_OUT: WBEMSTATUS = WBEMSTATUS(-2147205081i32); pub const WBEMMOF_E_INVALID_FLAGS_SYNTAX: WBEMSTATUS = WBEMSTATUS(-2147205080i32); pub const WBEMMOF_E_EXPECTED_BRACE_OR_BAD_TYPE: WBEMSTATUS = WBEMSTATUS(-2147205079i32); pub const WBEMMOF_E_UNSUPPORTED_CIMV22_QUAL_VALUE: WBEMSTATUS = WBEMSTATUS(-2147205078i32); pub const WBEMMOF_E_UNSUPPORTED_CIMV22_DATA_TYPE: WBEMSTATUS = WBEMSTATUS(-2147205077i32); pub const WBEMMOF_E_INVALID_DELETEINSTANCE_SYNTAX: WBEMSTATUS = WBEMSTATUS(-2147205076i32); pub const WBEMMOF_E_INVALID_QUALIFIER_SYNTAX: WBEMSTATUS = WBEMSTATUS(-2147205075i32); pub const WBEMMOF_E_QUALIFIER_USED_OUTSIDE_SCOPE: WBEMSTATUS = WBEMSTATUS(-2147205074i32); pub const WBEMMOF_E_ERROR_CREATING_TEMP_FILE: WBEMSTATUS = WBEMSTATUS(-2147205073i32); pub const WBEMMOF_E_ERROR_INVALID_INCLUDE_FILE: WBEMSTATUS = WBEMSTATUS(-2147205072i32); pub const WBEMMOF_E_INVALID_DELETECLASS_SYNTAX: WBEMSTATUS = WBEMSTATUS(-2147205071i32); impl ::core::convert::From<i32> for WBEMSTATUS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEMSTATUS { 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 WBEMSTATUS_FORMAT(pub i32); pub const WBEMSTATUS_FORMAT_NEWLINE: WBEMSTATUS_FORMAT = WBEMSTATUS_FORMAT(0i32); pub const WBEMSTATUS_FORMAT_NO_NEWLINE: WBEMSTATUS_FORMAT = WBEMSTATUS_FORMAT(1i32); impl ::core::convert::From<i32> for WBEMSTATUS_FORMAT { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEMSTATUS_FORMAT { type Abi = Self; } pub const WBEMS_DISPID_COMPLETED: u32 = 2u32; pub const WBEMS_DISPID_CONNECTION_READY: u32 = 5u32; pub const WBEMS_DISPID_DERIVATION: u32 = 23u32; pub const WBEMS_DISPID_OBJECT_PUT: u32 = 4u32; pub const WBEMS_DISPID_OBJECT_READY: u32 = 1u32; pub const WBEMS_DISPID_PROGRESS: 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 WBEM_BACKUP_RESTORE_FLAGS(pub i32); pub const WBEM_FLAG_BACKUP_RESTORE_DEFAULT: WBEM_BACKUP_RESTORE_FLAGS = WBEM_BACKUP_RESTORE_FLAGS(0i32); pub const WBEM_FLAG_BACKUP_RESTORE_FORCE_SHUTDOWN: WBEM_BACKUP_RESTORE_FLAGS = WBEM_BACKUP_RESTORE_FLAGS(1i32); impl ::core::convert::From<i32> for WBEM_BACKUP_RESTORE_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_BACKUP_RESTORE_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 WBEM_BATCH_TYPE(pub i32); pub const WBEM_FLAG_BATCH_IF_NEEDED: WBEM_BATCH_TYPE = WBEM_BATCH_TYPE(0i32); pub const WBEM_FLAG_MUST_BATCH: WBEM_BATCH_TYPE = WBEM_BATCH_TYPE(1i32); pub const WBEM_FLAG_MUST_NOT_BATCH: WBEM_BATCH_TYPE = WBEM_BATCH_TYPE(2i32); impl ::core::convert::From<i32> for WBEM_BATCH_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_BATCH_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 WBEM_CHANGE_FLAG_TYPE(pub i32); pub const WBEM_FLAG_CREATE_OR_UPDATE: WBEM_CHANGE_FLAG_TYPE = WBEM_CHANGE_FLAG_TYPE(0i32); pub const WBEM_FLAG_UPDATE_ONLY: WBEM_CHANGE_FLAG_TYPE = WBEM_CHANGE_FLAG_TYPE(1i32); pub const WBEM_FLAG_CREATE_ONLY: WBEM_CHANGE_FLAG_TYPE = WBEM_CHANGE_FLAG_TYPE(2i32); pub const WBEM_FLAG_UPDATE_COMPATIBLE: WBEM_CHANGE_FLAG_TYPE = WBEM_CHANGE_FLAG_TYPE(0i32); pub const WBEM_FLAG_UPDATE_SAFE_MODE: WBEM_CHANGE_FLAG_TYPE = WBEM_CHANGE_FLAG_TYPE(32i32); pub const WBEM_FLAG_UPDATE_FORCE_MODE: WBEM_CHANGE_FLAG_TYPE = WBEM_CHANGE_FLAG_TYPE(64i32); pub const WBEM_MASK_UPDATE_MODE: WBEM_CHANGE_FLAG_TYPE = WBEM_CHANGE_FLAG_TYPE(96i32); pub const WBEM_FLAG_ADVISORY: WBEM_CHANGE_FLAG_TYPE = WBEM_CHANGE_FLAG_TYPE(65536i32); impl ::core::convert::From<i32> for WBEM_CHANGE_FLAG_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_CHANGE_FLAG_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 WBEM_COMPARISON_FLAG(pub i32); pub const WBEM_COMPARISON_INCLUDE_ALL: WBEM_COMPARISON_FLAG = WBEM_COMPARISON_FLAG(0i32); pub const WBEM_FLAG_IGNORE_QUALIFIERS: WBEM_COMPARISON_FLAG = WBEM_COMPARISON_FLAG(1i32); pub const WBEM_FLAG_IGNORE_OBJECT_SOURCE: WBEM_COMPARISON_FLAG = WBEM_COMPARISON_FLAG(2i32); pub const WBEM_FLAG_IGNORE_DEFAULT_VALUES: WBEM_COMPARISON_FLAG = WBEM_COMPARISON_FLAG(4i32); pub const WBEM_FLAG_IGNORE_CLASS: WBEM_COMPARISON_FLAG = WBEM_COMPARISON_FLAG(8i32); pub const WBEM_FLAG_IGNORE_CASE: WBEM_COMPARISON_FLAG = WBEM_COMPARISON_FLAG(16i32); pub const WBEM_FLAG_IGNORE_FLAVOR: WBEM_COMPARISON_FLAG = WBEM_COMPARISON_FLAG(32i32); impl ::core::convert::From<i32> for WBEM_COMPARISON_FLAG { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_COMPARISON_FLAG { 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 WBEM_COMPILER_OPTIONS(pub i32); pub const WBEM_FLAG_CHECK_ONLY: WBEM_COMPILER_OPTIONS = WBEM_COMPILER_OPTIONS(1i32); pub const WBEM_FLAG_AUTORECOVER: WBEM_COMPILER_OPTIONS = WBEM_COMPILER_OPTIONS(2i32); pub const WBEM_FLAG_WMI_CHECK: WBEM_COMPILER_OPTIONS = WBEM_COMPILER_OPTIONS(4i32); pub const WBEM_FLAG_CONSOLE_PRINT: WBEM_COMPILER_OPTIONS = WBEM_COMPILER_OPTIONS(8i32); pub const WBEM_FLAG_DONT_ADD_TO_LIST: WBEM_COMPILER_OPTIONS = WBEM_COMPILER_OPTIONS(16i32); pub const WBEM_FLAG_SPLIT_FILES: WBEM_COMPILER_OPTIONS = WBEM_COMPILER_OPTIONS(32i32); pub const WBEM_FLAG_STORE_FILE: WBEM_COMPILER_OPTIONS = WBEM_COMPILER_OPTIONS(256i32); impl ::core::convert::From<i32> for WBEM_COMPILER_OPTIONS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_COMPILER_OPTIONS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct WBEM_COMPILE_STATUS_INFO { pub lPhaseError: i32, pub hRes: ::windows::core::HRESULT, pub ObjectNum: i32, pub FirstLine: i32, pub LastLine: i32, pub dwOutFlags: u32, } impl WBEM_COMPILE_STATUS_INFO {} impl ::core::default::Default for WBEM_COMPILE_STATUS_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for WBEM_COMPILE_STATUS_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("WBEM_COMPILE_STATUS_INFO").field("lPhaseError", &self.lPhaseError).field("hRes", &self.hRes).field("ObjectNum", &self.ObjectNum).field("FirstLine", &self.FirstLine).field("LastLine", &self.LastLine).field("dwOutFlags", &self.dwOutFlags).finish() } } impl ::core::cmp::PartialEq for WBEM_COMPILE_STATUS_INFO { fn eq(&self, other: &Self) -> bool { self.lPhaseError == other.lPhaseError && self.hRes == other.hRes && self.ObjectNum == other.ObjectNum && self.FirstLine == other.FirstLine && self.LastLine == other.LastLine && self.dwOutFlags == other.dwOutFlags } } impl ::core::cmp::Eq for WBEM_COMPILE_STATUS_INFO {} unsafe impl ::windows::core::Abi for WBEM_COMPILE_STATUS_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 WBEM_CONDITION_FLAG_TYPE(pub i32); pub const WBEM_FLAG_ALWAYS: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(0i32); pub const WBEM_FLAG_ONLY_IF_TRUE: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(1i32); pub const WBEM_FLAG_ONLY_IF_FALSE: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(2i32); pub const WBEM_FLAG_ONLY_IF_IDENTICAL: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(3i32); pub const WBEM_MASK_PRIMARY_CONDITION: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(3i32); pub const WBEM_FLAG_KEYS_ONLY: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(4i32); pub const WBEM_FLAG_REFS_ONLY: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(8i32); pub const WBEM_FLAG_LOCAL_ONLY: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(16i32); pub const WBEM_FLAG_PROPAGATED_ONLY: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(32i32); pub const WBEM_FLAG_SYSTEM_ONLY: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(48i32); pub const WBEM_FLAG_NONSYSTEM_ONLY: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(64i32); pub const WBEM_MASK_CONDITION_ORIGIN: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(112i32); pub const WBEM_FLAG_CLASS_OVERRIDES_ONLY: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(256i32); pub const WBEM_FLAG_CLASS_LOCAL_AND_OVERRIDES: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(512i32); pub const WBEM_MASK_CLASS_CONDITION: WBEM_CONDITION_FLAG_TYPE = WBEM_CONDITION_FLAG_TYPE(768i32); impl ::core::convert::From<i32> for WBEM_CONDITION_FLAG_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_CONDITION_FLAG_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 WBEM_CONNECT_OPTIONS(pub i32); pub const WBEM_FLAG_CONNECT_REPOSITORY_ONLY: WBEM_CONNECT_OPTIONS = WBEM_CONNECT_OPTIONS(64i32); pub const WBEM_FLAG_CONNECT_USE_MAX_WAIT: WBEM_CONNECT_OPTIONS = WBEM_CONNECT_OPTIONS(128i32); pub const WBEM_FLAG_CONNECT_PROVIDERS: WBEM_CONNECT_OPTIONS = WBEM_CONNECT_OPTIONS(256i32); impl ::core::convert::From<i32> for WBEM_CONNECT_OPTIONS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_CONNECT_OPTIONS { 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 WBEM_EXTRA_RETURN_CODES(pub i32); pub const WBEM_S_INITIALIZED: WBEM_EXTRA_RETURN_CODES = WBEM_EXTRA_RETURN_CODES(0i32); pub const WBEM_S_LIMITED_SERVICE: WBEM_EXTRA_RETURN_CODES = WBEM_EXTRA_RETURN_CODES(274433i32); pub const WBEM_S_INDIRECTLY_UPDATED: WBEM_EXTRA_RETURN_CODES = WBEM_EXTRA_RETURN_CODES(274434i32); pub const WBEM_S_SUBJECT_TO_SDS: WBEM_EXTRA_RETURN_CODES = WBEM_EXTRA_RETURN_CODES(274435i32); pub const WBEM_E_RETRY_LATER: WBEM_EXTRA_RETURN_CODES = WBEM_EXTRA_RETURN_CODES(-2147209215i32); pub const WBEM_E_RESOURCE_CONTENTION: WBEM_EXTRA_RETURN_CODES = WBEM_EXTRA_RETURN_CODES(-2147209214i32); impl ::core::convert::From<i32> for WBEM_EXTRA_RETURN_CODES { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_EXTRA_RETURN_CODES { 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 WBEM_FLAVOR_TYPE(pub i32); pub const WBEM_FLAVOR_DONT_PROPAGATE: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(0i32); pub const WBEM_FLAVOR_FLAG_PROPAGATE_TO_INSTANCE: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(1i32); pub const WBEM_FLAVOR_FLAG_PROPAGATE_TO_DERIVED_CLASS: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(2i32); pub const WBEM_FLAVOR_MASK_PROPAGATION: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(15i32); pub const WBEM_FLAVOR_OVERRIDABLE: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(0i32); pub const WBEM_FLAVOR_NOT_OVERRIDABLE: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(16i32); pub const WBEM_FLAVOR_MASK_PERMISSIONS: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(16i32); pub const WBEM_FLAVOR_ORIGIN_LOCAL: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(0i32); pub const WBEM_FLAVOR_ORIGIN_PROPAGATED: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(32i32); pub const WBEM_FLAVOR_ORIGIN_SYSTEM: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(64i32); pub const WBEM_FLAVOR_MASK_ORIGIN: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(96i32); pub const WBEM_FLAVOR_NOT_AMENDED: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(0i32); pub const WBEM_FLAVOR_AMENDED: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(128i32); pub const WBEM_FLAVOR_MASK_AMENDED: WBEM_FLAVOR_TYPE = WBEM_FLAVOR_TYPE(128i32); impl ::core::convert::From<i32> for WBEM_FLAVOR_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_FLAVOR_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 WBEM_GENERIC_FLAG_TYPE(pub i32); pub const WBEM_FLAG_RETURN_IMMEDIATELY: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(16i32); pub const WBEM_FLAG_RETURN_WBEM_COMPLETE: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(0i32); pub const WBEM_FLAG_BIDIRECTIONAL: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(0i32); pub const WBEM_FLAG_FORWARD_ONLY: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(32i32); pub const WBEM_FLAG_NO_ERROR_OBJECT: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(64i32); pub const WBEM_FLAG_RETURN_ERROR_OBJECT: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(0i32); pub const WBEM_FLAG_SEND_STATUS: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(128i32); pub const WBEM_FLAG_DONT_SEND_STATUS: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(0i32); pub const WBEM_FLAG_ENSURE_LOCATABLE: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(256i32); pub const WBEM_FLAG_DIRECT_READ: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(512i32); pub const WBEM_FLAG_SEND_ONLY_SELECTED: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(0i32); pub const WBEM_RETURN_WHEN_COMPLETE: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(0i32); pub const WBEM_RETURN_IMMEDIATELY: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(16i32); pub const WBEM_MASK_RESERVED_FLAGS: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(126976i32); pub const WBEM_FLAG_USE_AMENDED_QUALIFIERS: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(131072i32); pub const WBEM_FLAG_STRONG_VALIDATION: WBEM_GENERIC_FLAG_TYPE = WBEM_GENERIC_FLAG_TYPE(1048576i32); impl ::core::convert::From<i32> for WBEM_GENERIC_FLAG_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_GENERIC_FLAG_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 WBEM_GENUS_TYPE(pub i32); pub const WBEM_GENUS_CLASS: WBEM_GENUS_TYPE = WBEM_GENUS_TYPE(1i32); pub const WBEM_GENUS_INSTANCE: WBEM_GENUS_TYPE = WBEM_GENUS_TYPE(2i32); impl ::core::convert::From<i32> for WBEM_GENUS_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_GENUS_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 WBEM_GET_KEY_FLAGS(pub i32); pub const WBEMPATH_TEXT: WBEM_GET_KEY_FLAGS = WBEM_GET_KEY_FLAGS(1i32); pub const WBEMPATH_QUOTEDTEXT: WBEM_GET_KEY_FLAGS = WBEM_GET_KEY_FLAGS(2i32); impl ::core::convert::From<i32> for WBEM_GET_KEY_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_GET_KEY_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 WBEM_GET_TEXT_FLAGS(pub i32); pub const WBEMPATH_COMPRESSED: WBEM_GET_TEXT_FLAGS = WBEM_GET_TEXT_FLAGS(1i32); pub const WBEMPATH_GET_RELATIVE_ONLY: WBEM_GET_TEXT_FLAGS = WBEM_GET_TEXT_FLAGS(2i32); pub const WBEMPATH_GET_SERVER_TOO: WBEM_GET_TEXT_FLAGS = WBEM_GET_TEXT_FLAGS(4i32); pub const WBEMPATH_GET_SERVER_AND_NAMESPACE_ONLY: WBEM_GET_TEXT_FLAGS = WBEM_GET_TEXT_FLAGS(8i32); pub const WBEMPATH_GET_NAMESPACE_ONLY: WBEM_GET_TEXT_FLAGS = WBEM_GET_TEXT_FLAGS(16i32); pub const WBEMPATH_GET_ORIGINAL: WBEM_GET_TEXT_FLAGS = WBEM_GET_TEXT_FLAGS(32i32); impl ::core::convert::From<i32> for WBEM_GET_TEXT_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_GET_TEXT_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 WBEM_INFORMATION_FLAG_TYPE(pub i32); pub const WBEM_FLAG_SHORT_NAME: WBEM_INFORMATION_FLAG_TYPE = WBEM_INFORMATION_FLAG_TYPE(1i32); pub const WBEM_FLAG_LONG_NAME: WBEM_INFORMATION_FLAG_TYPE = WBEM_INFORMATION_FLAG_TYPE(2i32); impl ::core::convert::From<i32> for WBEM_INFORMATION_FLAG_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_INFORMATION_FLAG_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 WBEM_LIMITATION_FLAG_TYPE(pub i32); pub const WBEM_FLAG_EXCLUDE_OBJECT_QUALIFIERS: WBEM_LIMITATION_FLAG_TYPE = WBEM_LIMITATION_FLAG_TYPE(16i32); pub const WBEM_FLAG_EXCLUDE_PROPERTY_QUALIFIERS: WBEM_LIMITATION_FLAG_TYPE = WBEM_LIMITATION_FLAG_TYPE(32i32); impl ::core::convert::From<i32> for WBEM_LIMITATION_FLAG_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_LIMITATION_FLAG_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 WBEM_LIMITS(pub i32); pub const WBEM_MAX_IDENTIFIER: WBEM_LIMITS = WBEM_LIMITS(4096i32); pub const WBEM_MAX_QUERY: WBEM_LIMITS = WBEM_LIMITS(16384i32); pub const WBEM_MAX_PATH: WBEM_LIMITS = WBEM_LIMITS(8192i32); pub const WBEM_MAX_OBJECT_NESTING: WBEM_LIMITS = WBEM_LIMITS(64i32); pub const WBEM_MAX_USER_PROPERTIES: WBEM_LIMITS = WBEM_LIMITS(1024i32); impl ::core::convert::From<i32> for WBEM_LIMITS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_LIMITS { 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 WBEM_LOCKING(pub i32); pub const WBEM_FLAG_ALLOW_READ: WBEM_LOCKING = WBEM_LOCKING(1i32); impl ::core::convert::From<i32> for WBEM_LOCKING { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_LOCKING { 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 WBEM_PATH_CREATE_FLAG(pub i32); pub const WBEMPATH_CREATE_ACCEPT_RELATIVE: WBEM_PATH_CREATE_FLAG = WBEM_PATH_CREATE_FLAG(1i32); pub const WBEMPATH_CREATE_ACCEPT_ABSOLUTE: WBEM_PATH_CREATE_FLAG = WBEM_PATH_CREATE_FLAG(2i32); pub const WBEMPATH_CREATE_ACCEPT_ALL: WBEM_PATH_CREATE_FLAG = WBEM_PATH_CREATE_FLAG(4i32); pub const WBEMPATH_TREAT_SINGLE_IDENT_AS_NS: WBEM_PATH_CREATE_FLAG = WBEM_PATH_CREATE_FLAG(8i32); impl ::core::convert::From<i32> for WBEM_PATH_CREATE_FLAG { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_PATH_CREATE_FLAG { 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 WBEM_PATH_STATUS_FLAG(pub i32); pub const WBEMPATH_INFO_ANON_LOCAL_MACHINE: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(1i32); pub const WBEMPATH_INFO_HAS_MACHINE_NAME: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(2i32); pub const WBEMPATH_INFO_IS_CLASS_REF: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(4i32); pub const WBEMPATH_INFO_IS_INST_REF: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(8i32); pub const WBEMPATH_INFO_HAS_SUBSCOPES: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(16i32); pub const WBEMPATH_INFO_IS_COMPOUND: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(32i32); pub const WBEMPATH_INFO_HAS_V2_REF_PATHS: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(64i32); pub const WBEMPATH_INFO_HAS_IMPLIED_KEY: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(128i32); pub const WBEMPATH_INFO_CONTAINS_SINGLETON: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(256i32); pub const WBEMPATH_INFO_V1_COMPLIANT: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(512i32); pub const WBEMPATH_INFO_V2_COMPLIANT: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(1024i32); pub const WBEMPATH_INFO_CIM_COMPLIANT: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(2048i32); pub const WBEMPATH_INFO_IS_SINGLETON: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(4096i32); pub const WBEMPATH_INFO_IS_PARENT: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(8192i32); pub const WBEMPATH_INFO_SERVER_NAMESPACE_ONLY: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(16384i32); pub const WBEMPATH_INFO_NATIVE_PATH: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(32768i32); pub const WBEMPATH_INFO_WMI_PATH: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(65536i32); pub const WBEMPATH_INFO_PATH_HAD_SERVER: WBEM_PATH_STATUS_FLAG = WBEM_PATH_STATUS_FLAG(131072i32); impl ::core::convert::From<i32> for WBEM_PATH_STATUS_FLAG { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_PATH_STATUS_FLAG { 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 WBEM_PROVIDER_FLAGS(pub i32); pub const WBEM_FLAG_OWNER_UPDATE: WBEM_PROVIDER_FLAGS = WBEM_PROVIDER_FLAGS(65536i32); impl ::core::convert::From<i32> for WBEM_PROVIDER_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_PROVIDER_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 WBEM_PROVIDER_REQUIREMENTS_TYPE(pub i32); pub const WBEM_REQUIREMENTS_START_POSTFILTER: WBEM_PROVIDER_REQUIREMENTS_TYPE = WBEM_PROVIDER_REQUIREMENTS_TYPE(0i32); pub const WBEM_REQUIREMENTS_STOP_POSTFILTER: WBEM_PROVIDER_REQUIREMENTS_TYPE = WBEM_PROVIDER_REQUIREMENTS_TYPE(1i32); pub const WBEM_REQUIREMENTS_RECHECK_SUBSCRIPTIONS: WBEM_PROVIDER_REQUIREMENTS_TYPE = WBEM_PROVIDER_REQUIREMENTS_TYPE(2i32); impl ::core::convert::From<i32> for WBEM_PROVIDER_REQUIREMENTS_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_PROVIDER_REQUIREMENTS_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 WBEM_QUERY_FLAG_TYPE(pub i32); pub const WBEM_FLAG_DEEP: WBEM_QUERY_FLAG_TYPE = WBEM_QUERY_FLAG_TYPE(0i32); pub const WBEM_FLAG_SHALLOW: WBEM_QUERY_FLAG_TYPE = WBEM_QUERY_FLAG_TYPE(1i32); pub const WBEM_FLAG_PROTOTYPE: WBEM_QUERY_FLAG_TYPE = WBEM_QUERY_FLAG_TYPE(2i32); impl ::core::convert::From<i32> for WBEM_QUERY_FLAG_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_QUERY_FLAG_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 WBEM_REFRESHER_FLAGS(pub i32); pub const WBEM_FLAG_REFRESH_AUTO_RECONNECT: WBEM_REFRESHER_FLAGS = WBEM_REFRESHER_FLAGS(0i32); pub const WBEM_FLAG_REFRESH_NO_AUTO_RECONNECT: WBEM_REFRESHER_FLAGS = WBEM_REFRESHER_FLAGS(1i32); impl ::core::convert::From<i32> for WBEM_REFRESHER_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_REFRESHER_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 WBEM_SECURITY_FLAGS(pub i32); pub const WBEM_ENABLE: WBEM_SECURITY_FLAGS = WBEM_SECURITY_FLAGS(1i32); pub const WBEM_METHOD_EXECUTE: WBEM_SECURITY_FLAGS = WBEM_SECURITY_FLAGS(2i32); pub const WBEM_FULL_WRITE_REP: WBEM_SECURITY_FLAGS = WBEM_SECURITY_FLAGS(4i32); pub const WBEM_PARTIAL_WRITE_REP: WBEM_SECURITY_FLAGS = WBEM_SECURITY_FLAGS(8i32); pub const WBEM_WRITE_PROVIDER: WBEM_SECURITY_FLAGS = WBEM_SECURITY_FLAGS(16i32); pub const WBEM_REMOTE_ACCESS: WBEM_SECURITY_FLAGS = WBEM_SECURITY_FLAGS(32i32); pub const WBEM_RIGHT_SUBSCRIBE: WBEM_SECURITY_FLAGS = WBEM_SECURITY_FLAGS(64i32); pub const WBEM_RIGHT_PUBLISH: WBEM_SECURITY_FLAGS = WBEM_SECURITY_FLAGS(128i32); impl ::core::convert::From<i32> for WBEM_SECURITY_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_SECURITY_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 WBEM_SHUTDOWN_FLAGS(pub i32); pub const WBEM_SHUTDOWN_UNLOAD_COMPONENT: WBEM_SHUTDOWN_FLAGS = WBEM_SHUTDOWN_FLAGS(1i32); pub const WBEM_SHUTDOWN_WMI: WBEM_SHUTDOWN_FLAGS = WBEM_SHUTDOWN_FLAGS(2i32); pub const WBEM_SHUTDOWN_OS: WBEM_SHUTDOWN_FLAGS = WBEM_SHUTDOWN_FLAGS(3i32); impl ::core::convert::From<i32> for WBEM_SHUTDOWN_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_SHUTDOWN_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 WBEM_STATUS_TYPE(pub i32); pub const WBEM_STATUS_COMPLETE: WBEM_STATUS_TYPE = WBEM_STATUS_TYPE(0i32); pub const WBEM_STATUS_REQUIREMENTS: WBEM_STATUS_TYPE = WBEM_STATUS_TYPE(1i32); pub const WBEM_STATUS_PROGRESS: WBEM_STATUS_TYPE = WBEM_STATUS_TYPE(2i32); pub const WBEM_STATUS_LOGGING_INFORMATION: WBEM_STATUS_TYPE = WBEM_STATUS_TYPE(256i32); pub const WBEM_STATUS_LOGGING_INFORMATION_PROVIDER: WBEM_STATUS_TYPE = WBEM_STATUS_TYPE(512i32); pub const WBEM_STATUS_LOGGING_INFORMATION_HOST: WBEM_STATUS_TYPE = WBEM_STATUS_TYPE(1024i32); pub const WBEM_STATUS_LOGGING_INFORMATION_REPOSITORY: WBEM_STATUS_TYPE = WBEM_STATUS_TYPE(2048i32); pub const WBEM_STATUS_LOGGING_INFORMATION_ESS: WBEM_STATUS_TYPE = WBEM_STATUS_TYPE(4096i32); impl ::core::convert::From<i32> for WBEM_STATUS_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_STATUS_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 WBEM_TEXT_FLAG_TYPE(pub i32); pub const WBEM_FLAG_NO_FLAVORS: WBEM_TEXT_FLAG_TYPE = WBEM_TEXT_FLAG_TYPE(1i32); impl ::core::convert::From<i32> for WBEM_TEXT_FLAG_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_TEXT_FLAG_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 WBEM_TIMEOUT_TYPE(pub i32); pub const WBEM_NO_WAIT: WBEM_TIMEOUT_TYPE = WBEM_TIMEOUT_TYPE(0i32); pub const WBEM_INFINITE: WBEM_TIMEOUT_TYPE = WBEM_TIMEOUT_TYPE(-1i32); impl ::core::convert::From<i32> for WBEM_TIMEOUT_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_TIMEOUT_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 WBEM_UNSECAPP_FLAG_TYPE(pub i32); pub const WBEM_FLAG_UNSECAPP_DEFAULT_CHECK_ACCESS: WBEM_UNSECAPP_FLAG_TYPE = WBEM_UNSECAPP_FLAG_TYPE(0i32); pub const WBEM_FLAG_UNSECAPP_CHECK_ACCESS: WBEM_UNSECAPP_FLAG_TYPE = WBEM_UNSECAPP_FLAG_TYPE(1i32); pub const WBEM_FLAG_UNSECAPP_DONT_CHECK_ACCESS: WBEM_UNSECAPP_FLAG_TYPE = WBEM_UNSECAPP_FLAG_TYPE(2i32); impl ::core::convert::From<i32> for WBEM_UNSECAPP_FLAG_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WBEM_UNSECAPP_FLAG_TYPE { type Abi = Self; } pub const WMIExtension: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf0975afe_5c7f_11d2_8b74_00104b2afb41); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct WMIQ_ANALYSIS_TYPE(pub i32); pub const WMIQ_ANALYSIS_RPN_SEQUENCE: WMIQ_ANALYSIS_TYPE = WMIQ_ANALYSIS_TYPE(1i32); pub const WMIQ_ANALYSIS_ASSOC_QUERY: WMIQ_ANALYSIS_TYPE = WMIQ_ANALYSIS_TYPE(2i32); pub const WMIQ_ANALYSIS_PROP_ANALYSIS_MATRIX: WMIQ_ANALYSIS_TYPE = WMIQ_ANALYSIS_TYPE(3i32); pub const WMIQ_ANALYSIS_QUERY_TEXT: WMIQ_ANALYSIS_TYPE = WMIQ_ANALYSIS_TYPE(4i32); pub const WMIQ_ANALYSIS_RESERVED: WMIQ_ANALYSIS_TYPE = WMIQ_ANALYSIS_TYPE(134217728i32); impl ::core::convert::From<i32> for WMIQ_ANALYSIS_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WMIQ_ANALYSIS_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 WMIQ_ASSOCQ_FLAGS(pub i32); pub const WMIQ_ASSOCQ_ASSOCIATORS: WMIQ_ASSOCQ_FLAGS = WMIQ_ASSOCQ_FLAGS(1i32); pub const WMIQ_ASSOCQ_REFERENCES: WMIQ_ASSOCQ_FLAGS = WMIQ_ASSOCQ_FLAGS(2i32); pub const WMIQ_ASSOCQ_RESULTCLASS: WMIQ_ASSOCQ_FLAGS = WMIQ_ASSOCQ_FLAGS(4i32); pub const WMIQ_ASSOCQ_ASSOCCLASS: WMIQ_ASSOCQ_FLAGS = WMIQ_ASSOCQ_FLAGS(8i32); pub const WMIQ_ASSOCQ_ROLE: WMIQ_ASSOCQ_FLAGS = WMIQ_ASSOCQ_FLAGS(16i32); pub const WMIQ_ASSOCQ_RESULTROLE: WMIQ_ASSOCQ_FLAGS = WMIQ_ASSOCQ_FLAGS(32i32); pub const WMIQ_ASSOCQ_REQUIREDQUALIFIER: WMIQ_ASSOCQ_FLAGS = WMIQ_ASSOCQ_FLAGS(64i32); pub const WMIQ_ASSOCQ_REQUIREDASSOCQUALIFIER: WMIQ_ASSOCQ_FLAGS = WMIQ_ASSOCQ_FLAGS(128i32); pub const WMIQ_ASSOCQ_CLASSDEFSONLY: WMIQ_ASSOCQ_FLAGS = WMIQ_ASSOCQ_FLAGS(256i32); pub const WMIQ_ASSOCQ_KEYSONLY: WMIQ_ASSOCQ_FLAGS = WMIQ_ASSOCQ_FLAGS(512i32); pub const WMIQ_ASSOCQ_SCHEMAONLY: WMIQ_ASSOCQ_FLAGS = WMIQ_ASSOCQ_FLAGS(1024i32); pub const WMIQ_ASSOCQ_CLASSREFSONLY: WMIQ_ASSOCQ_FLAGS = WMIQ_ASSOCQ_FLAGS(2048i32); impl ::core::convert::From<i32> for WMIQ_ASSOCQ_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WMIQ_ASSOCQ_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 WMIQ_LANGUAGE_FEATURES(pub i32); pub const WMIQ_LF1_BASIC_SELECT: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(1i32); pub const WMIQ_LF2_CLASS_NAME_IN_QUERY: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(2i32); pub const WMIQ_LF3_STRING_CASE_FUNCTIONS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(3i32); pub const WMIQ_LF4_PROP_TO_PROP_TESTS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(4i32); pub const WMIQ_LF5_COUNT_STAR: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(5i32); pub const WMIQ_LF6_ORDER_BY: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(6i32); pub const WMIQ_LF7_DISTINCT: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(7i32); pub const WMIQ_LF8_ISA: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(8i32); pub const WMIQ_LF9_THIS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(9i32); pub const WMIQ_LF10_COMPEX_SUBEXPRESSIONS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(10i32); pub const WMIQ_LF11_ALIASING: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(11i32); pub const WMIQ_LF12_GROUP_BY_HAVING: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(12i32); pub const WMIQ_LF13_WMI_WITHIN: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(13i32); pub const WMIQ_LF14_SQL_WRITE_OPERATIONS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(14i32); pub const WMIQ_LF15_GO: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(15i32); pub const WMIQ_LF16_SINGLE_LEVEL_TRANSACTIONS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(16i32); pub const WMIQ_LF17_QUALIFIED_NAMES: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(17i32); pub const WMIQ_LF18_ASSOCIATONS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(18i32); pub const WMIQ_LF19_SYSTEM_PROPERTIES: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(19i32); pub const WMIQ_LF20_EXTENDED_SYSTEM_PROPERTIES: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(20i32); pub const WMIQ_LF21_SQL89_JOINS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(21i32); pub const WMIQ_LF22_SQL92_JOINS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(22i32); pub const WMIQ_LF23_SUBSELECTS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(23i32); pub const WMIQ_LF24_UMI_EXTENSIONS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(24i32); pub const WMIQ_LF25_DATEPART: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(25i32); pub const WMIQ_LF26_LIKE: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(26i32); pub const WMIQ_LF27_CIM_TEMPORAL_CONSTRUCTS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(27i32); pub const WMIQ_LF28_STANDARD_AGGREGATES: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(28i32); pub const WMIQ_LF29_MULTI_LEVEL_ORDER_BY: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(29i32); pub const WMIQ_LF30_WMI_PRAGMAS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(30i32); pub const WMIQ_LF31_QUALIFIER_TESTS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(31i32); pub const WMIQ_LF32_SP_EXECUTE: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(32i32); pub const WMIQ_LF33_ARRAY_ACCESS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(33i32); pub const WMIQ_LF34_UNION: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(34i32); pub const WMIQ_LF35_COMPLEX_SELECT_TARGET: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(35i32); pub const WMIQ_LF36_REFERENCE_TESTS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(36i32); pub const WMIQ_LF37_SELECT_INTO: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(37i32); pub const WMIQ_LF38_BASIC_DATETIME_TESTS: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(38i32); pub const WMIQ_LF39_COUNT_COLUMN: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(39i32); pub const WMIQ_LF40_BETWEEN: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(40i32); pub const WMIQ_LF_LAST: WMIQ_LANGUAGE_FEATURES = WMIQ_LANGUAGE_FEATURES(40i32); impl ::core::convert::From<i32> for WMIQ_LANGUAGE_FEATURES { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WMIQ_LANGUAGE_FEATURES { 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 WMIQ_RPNQ_FEATURE(pub i32); pub const WMIQ_RPNF_WHERE_CLAUSE_PRESENT: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(1i32); pub const WMIQ_RPNF_QUERY_IS_CONJUNCTIVE: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(2i32); pub const WMIQ_RPNF_QUERY_IS_DISJUNCTIVE: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(4i32); pub const WMIQ_RPNF_PROJECTION: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(8i32); pub const WMIQ_RPNF_FEATURE_SELECT_STAR: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(16i32); pub const WMIQ_RPNF_EQUALITY_TESTS_ONLY: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(32i32); pub const WMIQ_RPNF_COUNT_STAR: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(64i32); pub const WMIQ_RPNF_QUALIFIED_NAMES_USED: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(128i32); pub const WMIQ_RPNF_SYSPROP_CLASS_USED: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(256i32); pub const WMIQ_RPNF_PROP_TO_PROP_TESTS: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(512i32); pub const WMIQ_RPNF_ORDER_BY: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(1024i32); pub const WMIQ_RPNF_ISA_USED: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(2048i32); pub const WMIQ_RPNF_GROUP_BY_HAVING: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(4096i32); pub const WMIQ_RPNF_ARRAY_ACCESS_USED: WMIQ_RPNQ_FEATURE = WMIQ_RPNQ_FEATURE(8192i32); impl ::core::convert::From<i32> for WMIQ_RPNQ_FEATURE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WMIQ_RPNQ_FEATURE { 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 WMIQ_RPN_TOKEN_FLAGS(pub i32); pub const WMIQ_RPN_TOKEN_EXPRESSION: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(1i32); pub const WMIQ_RPN_TOKEN_AND: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(2i32); pub const WMIQ_RPN_TOKEN_OR: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(3i32); pub const WMIQ_RPN_TOKEN_NOT: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(4i32); pub const WMIQ_RPN_OP_UNDEFINED: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(0i32); pub const WMIQ_RPN_OP_EQ: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(1i32); pub const WMIQ_RPN_OP_NE: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(2i32); pub const WMIQ_RPN_OP_GE: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(3i32); pub const WMIQ_RPN_OP_LE: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(4i32); pub const WMIQ_RPN_OP_LT: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(5i32); pub const WMIQ_RPN_OP_GT: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(6i32); pub const WMIQ_RPN_OP_LIKE: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(7i32); pub const WMIQ_RPN_OP_ISA: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(8i32); pub const WMIQ_RPN_OP_ISNOTA: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(9i32); pub const WMIQ_RPN_OP_ISNULL: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(10i32); pub const WMIQ_RPN_OP_ISNOTNULL: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(11i32); pub const WMIQ_RPN_LEFT_PROPERTY_NAME: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(1i32); pub const WMIQ_RPN_RIGHT_PROPERTY_NAME: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(2i32); pub const WMIQ_RPN_CONST2: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(4i32); pub const WMIQ_RPN_CONST: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(8i32); pub const WMIQ_RPN_RELOP: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(16i32); pub const WMIQ_RPN_LEFT_FUNCTION: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(32i32); pub const WMIQ_RPN_RIGHT_FUNCTION: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(64i32); pub const WMIQ_RPN_GET_TOKEN_TYPE: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(1i32); pub const WMIQ_RPN_GET_EXPR_SHAPE: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(2i32); pub const WMIQ_RPN_GET_LEFT_FUNCTION: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(3i32); pub const WMIQ_RPN_GET_RIGHT_FUNCTION: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(4i32); pub const WMIQ_RPN_GET_RELOP: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(5i32); pub const WMIQ_RPN_NEXT_TOKEN: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(1i32); pub const WMIQ_RPN_FROM_UNARY: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(1i32); pub const WMIQ_RPN_FROM_PATH: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(2i32); pub const WMIQ_RPN_FROM_CLASS_LIST: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(4i32); pub const WMIQ_RPN_FROM_MULTIPLE: WMIQ_RPN_TOKEN_FLAGS = WMIQ_RPN_TOKEN_FLAGS(8i32); impl ::core::convert::From<i32> for WMIQ_RPN_TOKEN_FLAGS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WMIQ_RPN_TOKEN_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 WMI_OBJ_TEXT(pub i32); pub const WMI_OBJ_TEXT_CIM_DTD_2_0: WMI_OBJ_TEXT = WMI_OBJ_TEXT(1i32); pub const WMI_OBJ_TEXT_WMI_DTD_2_0: WMI_OBJ_TEXT = WMI_OBJ_TEXT(2i32); pub const WMI_OBJ_TEXT_WMI_EXT1: WMI_OBJ_TEXT = WMI_OBJ_TEXT(3i32); pub const WMI_OBJ_TEXT_WMI_EXT2: WMI_OBJ_TEXT = WMI_OBJ_TEXT(4i32); pub const WMI_OBJ_TEXT_WMI_EXT3: WMI_OBJ_TEXT = WMI_OBJ_TEXT(5i32); pub const WMI_OBJ_TEXT_WMI_EXT4: WMI_OBJ_TEXT = WMI_OBJ_TEXT(6i32); pub const WMI_OBJ_TEXT_WMI_EXT5: WMI_OBJ_TEXT = WMI_OBJ_TEXT(7i32); pub const WMI_OBJ_TEXT_WMI_EXT6: WMI_OBJ_TEXT = WMI_OBJ_TEXT(8i32); pub const WMI_OBJ_TEXT_WMI_EXT7: WMI_OBJ_TEXT = WMI_OBJ_TEXT(9i32); pub const WMI_OBJ_TEXT_WMI_EXT8: WMI_OBJ_TEXT = WMI_OBJ_TEXT(10i32); pub const WMI_OBJ_TEXT_WMI_EXT9: WMI_OBJ_TEXT = WMI_OBJ_TEXT(11i32); pub const WMI_OBJ_TEXT_WMI_EXT10: WMI_OBJ_TEXT = WMI_OBJ_TEXT(12i32); pub const WMI_OBJ_TEXT_LAST: WMI_OBJ_TEXT = WMI_OBJ_TEXT(13i32); impl ::core::convert::From<i32> for WMI_OBJ_TEXT { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WMI_OBJ_TEXT { type Abi = Self; } pub const WbemAdministrativeLocator: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcb8555cc_9128_11d1_ad9b_00c04fd8fdff); pub const WbemAuthenticatedLocator: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcd184336_9128_11d1_ad9b_00c04fd8fdff); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct WbemAuthenticationLevelEnum(pub i32); pub const wbemAuthenticationLevelDefault: WbemAuthenticationLevelEnum = WbemAuthenticationLevelEnum(0i32); pub const wbemAuthenticationLevelNone: WbemAuthenticationLevelEnum = WbemAuthenticationLevelEnum(1i32); pub const wbemAuthenticationLevelConnect: WbemAuthenticationLevelEnum = WbemAuthenticationLevelEnum(2i32); pub const wbemAuthenticationLevelCall: WbemAuthenticationLevelEnum = WbemAuthenticationLevelEnum(3i32); pub const wbemAuthenticationLevelPkt: WbemAuthenticationLevelEnum = WbemAuthenticationLevelEnum(4i32); pub const wbemAuthenticationLevelPktIntegrity: WbemAuthenticationLevelEnum = WbemAuthenticationLevelEnum(5i32); pub const wbemAuthenticationLevelPktPrivacy: WbemAuthenticationLevelEnum = WbemAuthenticationLevelEnum(6i32); impl ::core::convert::From<i32> for WbemAuthenticationLevelEnum { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemAuthenticationLevelEnum { type Abi = Self; } pub const WbemBackupRestore: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc49e32c6_bc8b_11d2_85d4_00105a1f8304); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct WbemChangeFlagEnum(pub i32); pub const wbemChangeFlagCreateOrUpdate: WbemChangeFlagEnum = WbemChangeFlagEnum(0i32); pub const wbemChangeFlagUpdateOnly: WbemChangeFlagEnum = WbemChangeFlagEnum(1i32); pub const wbemChangeFlagCreateOnly: WbemChangeFlagEnum = WbemChangeFlagEnum(2i32); pub const wbemChangeFlagUpdateCompatible: WbemChangeFlagEnum = WbemChangeFlagEnum(0i32); pub const wbemChangeFlagUpdateSafeMode: WbemChangeFlagEnum = WbemChangeFlagEnum(32i32); pub const wbemChangeFlagUpdateForceMode: WbemChangeFlagEnum = WbemChangeFlagEnum(64i32); pub const wbemChangeFlagStrongValidation: WbemChangeFlagEnum = WbemChangeFlagEnum(128i32); pub const wbemChangeFlagAdvisory: WbemChangeFlagEnum = WbemChangeFlagEnum(65536i32); impl ::core::convert::From<i32> for WbemChangeFlagEnum { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemChangeFlagEnum { 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 WbemCimtypeEnum(pub i32); pub const wbemCimtypeSint8: WbemCimtypeEnum = WbemCimtypeEnum(16i32); pub const wbemCimtypeUint8: WbemCimtypeEnum = WbemCimtypeEnum(17i32); pub const wbemCimtypeSint16: WbemCimtypeEnum = WbemCimtypeEnum(2i32); pub const wbemCimtypeUint16: WbemCimtypeEnum = WbemCimtypeEnum(18i32); pub const wbemCimtypeSint32: WbemCimtypeEnum = WbemCimtypeEnum(3i32); pub const wbemCimtypeUint32: WbemCimtypeEnum = WbemCimtypeEnum(19i32); pub const wbemCimtypeSint64: WbemCimtypeEnum = WbemCimtypeEnum(20i32); pub const wbemCimtypeUint64: WbemCimtypeEnum = WbemCimtypeEnum(21i32); pub const wbemCimtypeReal32: WbemCimtypeEnum = WbemCimtypeEnum(4i32); pub const wbemCimtypeReal64: WbemCimtypeEnum = WbemCimtypeEnum(5i32); pub const wbemCimtypeBoolean: WbemCimtypeEnum = WbemCimtypeEnum(11i32); pub const wbemCimtypeString: WbemCimtypeEnum = WbemCimtypeEnum(8i32); pub const wbemCimtypeDatetime: WbemCimtypeEnum = WbemCimtypeEnum(101i32); pub const wbemCimtypeReference: WbemCimtypeEnum = WbemCimtypeEnum(102i32); pub const wbemCimtypeChar16: WbemCimtypeEnum = WbemCimtypeEnum(103i32); pub const wbemCimtypeObject: WbemCimtypeEnum = WbemCimtypeEnum(13i32); impl ::core::convert::From<i32> for WbemCimtypeEnum { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemCimtypeEnum { type Abi = Self; } pub const WbemClassObject: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9a653086_174f_11d2_b5f9_00104b703efd); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct WbemComparisonFlagEnum(pub i32); pub const wbemComparisonFlagIncludeAll: WbemComparisonFlagEnum = WbemComparisonFlagEnum(0i32); pub const wbemComparisonFlagIgnoreQualifiers: WbemComparisonFlagEnum = WbemComparisonFlagEnum(1i32); pub const wbemComparisonFlagIgnoreObjectSource: WbemComparisonFlagEnum = WbemComparisonFlagEnum(2i32); pub const wbemComparisonFlagIgnoreDefaultValues: WbemComparisonFlagEnum = WbemComparisonFlagEnum(4i32); pub const wbemComparisonFlagIgnoreClass: WbemComparisonFlagEnum = WbemComparisonFlagEnum(8i32); pub const wbemComparisonFlagIgnoreCase: WbemComparisonFlagEnum = WbemComparisonFlagEnum(16i32); pub const wbemComparisonFlagIgnoreFlavor: WbemComparisonFlagEnum = WbemComparisonFlagEnum(32i32); impl ::core::convert::From<i32> for WbemComparisonFlagEnum { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemComparisonFlagEnum { 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 WbemConnectOptionsEnum(pub i32); pub const wbemConnectFlagUseMaxWait: WbemConnectOptionsEnum = WbemConnectOptionsEnum(128i32); impl ::core::convert::From<i32> for WbemConnectOptionsEnum { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemConnectOptionsEnum { type Abi = Self; } pub const WbemContext: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x674b6698_ee92_11d0_ad71_00c04fd8fdff); pub const WbemDCOMTransport: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf7ce2e13_8c90_11d1_9e7b_00c04fc324a8); pub const WbemDecoupledBasicEventProvider: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf5f75737_2843_4f22_933d_c76a97cda62f); pub const WbemDecoupledRegistrar: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4cfc7932_0f9d_4bef_9c32_8ea2a6b56fcb); pub const WbemDefPath: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcf4cc405_e2c5_4ddd_b3ce_5e7582d8c9fa); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct WbemErrorEnum(pub i32); pub const wbemNoErr: WbemErrorEnum = WbemErrorEnum(0i32); pub const wbemErrFailed: WbemErrorEnum = WbemErrorEnum(-2147217407i32); pub const wbemErrNotFound: WbemErrorEnum = WbemErrorEnum(-2147217406i32); pub const wbemErrAccessDenied: WbemErrorEnum = WbemErrorEnum(-2147217405i32); pub const wbemErrProviderFailure: WbemErrorEnum = WbemErrorEnum(-2147217404i32); pub const wbemErrTypeMismatch: WbemErrorEnum = WbemErrorEnum(-2147217403i32); pub const wbemErrOutOfMemory: WbemErrorEnum = WbemErrorEnum(-2147217402i32); pub const wbemErrInvalidContext: WbemErrorEnum = WbemErrorEnum(-2147217401i32); pub const wbemErrInvalidParameter: WbemErrorEnum = WbemErrorEnum(-2147217400i32); pub const wbemErrNotAvailable: WbemErrorEnum = WbemErrorEnum(-2147217399i32); pub const wbemErrCriticalError: WbemErrorEnum = WbemErrorEnum(-2147217398i32); pub const wbemErrInvalidStream: WbemErrorEnum = WbemErrorEnum(-2147217397i32); pub const wbemErrNotSupported: WbemErrorEnum = WbemErrorEnum(-2147217396i32); pub const wbemErrInvalidSuperclass: WbemErrorEnum = WbemErrorEnum(-2147217395i32); pub const wbemErrInvalidNamespace: WbemErrorEnum = WbemErrorEnum(-2147217394i32); pub const wbemErrInvalidObject: WbemErrorEnum = WbemErrorEnum(-2147217393i32); pub const wbemErrInvalidClass: WbemErrorEnum = WbemErrorEnum(-2147217392i32); pub const wbemErrProviderNotFound: WbemErrorEnum = WbemErrorEnum(-2147217391i32); pub const wbemErrInvalidProviderRegistration: WbemErrorEnum = WbemErrorEnum(-2147217390i32); pub const wbemErrProviderLoadFailure: WbemErrorEnum = WbemErrorEnum(-2147217389i32); pub const wbemErrInitializationFailure: WbemErrorEnum = WbemErrorEnum(-2147217388i32); pub const wbemErrTransportFailure: WbemErrorEnum = WbemErrorEnum(-2147217387i32); pub const wbemErrInvalidOperation: WbemErrorEnum = WbemErrorEnum(-2147217386i32); pub const wbemErrInvalidQuery: WbemErrorEnum = WbemErrorEnum(-2147217385i32); pub const wbemErrInvalidQueryType: WbemErrorEnum = WbemErrorEnum(-2147217384i32); pub const wbemErrAlreadyExists: WbemErrorEnum = WbemErrorEnum(-2147217383i32); pub const wbemErrOverrideNotAllowed: WbemErrorEnum = WbemErrorEnum(-2147217382i32); pub const wbemErrPropagatedQualifier: WbemErrorEnum = WbemErrorEnum(-2147217381i32); pub const wbemErrPropagatedProperty: WbemErrorEnum = WbemErrorEnum(-2147217380i32); pub const wbemErrUnexpected: WbemErrorEnum = WbemErrorEnum(-2147217379i32); pub const wbemErrIllegalOperation: WbemErrorEnum = WbemErrorEnum(-2147217378i32); pub const wbemErrCannotBeKey: WbemErrorEnum = WbemErrorEnum(-2147217377i32); pub const wbemErrIncompleteClass: WbemErrorEnum = WbemErrorEnum(-2147217376i32); pub const wbemErrInvalidSyntax: WbemErrorEnum = WbemErrorEnum(-2147217375i32); pub const wbemErrNondecoratedObject: WbemErrorEnum = WbemErrorEnum(-2147217374i32); pub const wbemErrReadOnly: WbemErrorEnum = WbemErrorEnum(-2147217373i32); pub const wbemErrProviderNotCapable: WbemErrorEnum = WbemErrorEnum(-2147217372i32); pub const wbemErrClassHasChildren: WbemErrorEnum = WbemErrorEnum(-2147217371i32); pub const wbemErrClassHasInstances: WbemErrorEnum = WbemErrorEnum(-2147217370i32); pub const wbemErrQueryNotImplemented: WbemErrorEnum = WbemErrorEnum(-2147217369i32); pub const wbemErrIllegalNull: WbemErrorEnum = WbemErrorEnum(-2147217368i32); pub const wbemErrInvalidQualifierType: WbemErrorEnum = WbemErrorEnum(-2147217367i32); pub const wbemErrInvalidPropertyType: WbemErrorEnum = WbemErrorEnum(-2147217366i32); pub const wbemErrValueOutOfRange: WbemErrorEnum = WbemErrorEnum(-2147217365i32); pub const wbemErrCannotBeSingleton: WbemErrorEnum = WbemErrorEnum(-2147217364i32); pub const wbemErrInvalidCimType: WbemErrorEnum = WbemErrorEnum(-2147217363i32); pub const wbemErrInvalidMethod: WbemErrorEnum = WbemErrorEnum(-2147217362i32); pub const wbemErrInvalidMethodParameters: WbemErrorEnum = WbemErrorEnum(-2147217361i32); pub const wbemErrSystemProperty: WbemErrorEnum = WbemErrorEnum(-2147217360i32); pub const wbemErrInvalidProperty: WbemErrorEnum = WbemErrorEnum(-2147217359i32); pub const wbemErrCallCancelled: WbemErrorEnum = WbemErrorEnum(-2147217358i32); pub const wbemErrShuttingDown: WbemErrorEnum = WbemErrorEnum(-2147217357i32); pub const wbemErrPropagatedMethod: WbemErrorEnum = WbemErrorEnum(-2147217356i32); pub const wbemErrUnsupportedParameter: WbemErrorEnum = WbemErrorEnum(-2147217355i32); pub const wbemErrMissingParameter: WbemErrorEnum = WbemErrorEnum(-2147217354i32); pub const wbemErrInvalidParameterId: WbemErrorEnum = WbemErrorEnum(-2147217353i32); pub const wbemErrNonConsecutiveParameterIds: WbemErrorEnum = WbemErrorEnum(-2147217352i32); pub const wbemErrParameterIdOnRetval: WbemErrorEnum = WbemErrorEnum(-2147217351i32); pub const wbemErrInvalidObjectPath: WbemErrorEnum = WbemErrorEnum(-2147217350i32); pub const wbemErrOutOfDiskSpace: WbemErrorEnum = WbemErrorEnum(-2147217349i32); pub const wbemErrBufferTooSmall: WbemErrorEnum = WbemErrorEnum(-2147217348i32); pub const wbemErrUnsupportedPutExtension: WbemErrorEnum = WbemErrorEnum(-2147217347i32); pub const wbemErrUnknownObjectType: WbemErrorEnum = WbemErrorEnum(-2147217346i32); pub const wbemErrUnknownPacketType: WbemErrorEnum = WbemErrorEnum(-2147217345i32); pub const wbemErrMarshalVersionMismatch: WbemErrorEnum = WbemErrorEnum(-2147217344i32); pub const wbemErrMarshalInvalidSignature: WbemErrorEnum = WbemErrorEnum(-2147217343i32); pub const wbemErrInvalidQualifier: WbemErrorEnum = WbemErrorEnum(-2147217342i32); pub const wbemErrInvalidDuplicateParameter: WbemErrorEnum = WbemErrorEnum(-2147217341i32); pub const wbemErrTooMuchData: WbemErrorEnum = WbemErrorEnum(-2147217340i32); pub const wbemErrServerTooBusy: WbemErrorEnum = WbemErrorEnum(-2147217339i32); pub const wbemErrInvalidFlavor: WbemErrorEnum = WbemErrorEnum(-2147217338i32); pub const wbemErrCircularReference: WbemErrorEnum = WbemErrorEnum(-2147217337i32); pub const wbemErrUnsupportedClassUpdate: WbemErrorEnum = WbemErrorEnum(-2147217336i32); pub const wbemErrCannotChangeKeyInheritance: WbemErrorEnum = WbemErrorEnum(-2147217335i32); pub const wbemErrCannotChangeIndexInheritance: WbemErrorEnum = WbemErrorEnum(-2147217328i32); pub const wbemErrTooManyProperties: WbemErrorEnum = WbemErrorEnum(-2147217327i32); pub const wbemErrUpdateTypeMismatch: WbemErrorEnum = WbemErrorEnum(-2147217326i32); pub const wbemErrUpdateOverrideNotAllowed: WbemErrorEnum = WbemErrorEnum(-2147217325i32); pub const wbemErrUpdatePropagatedMethod: WbemErrorEnum = WbemErrorEnum(-2147217324i32); pub const wbemErrMethodNotImplemented: WbemErrorEnum = WbemErrorEnum(-2147217323i32); pub const wbemErrMethodDisabled: WbemErrorEnum = WbemErrorEnum(-2147217322i32); pub const wbemErrRefresherBusy: WbemErrorEnum = WbemErrorEnum(-2147217321i32); pub const wbemErrUnparsableQuery: WbemErrorEnum = WbemErrorEnum(-2147217320i32); pub const wbemErrNotEventClass: WbemErrorEnum = WbemErrorEnum(-2147217319i32); pub const wbemErrMissingGroupWithin: WbemErrorEnum = WbemErrorEnum(-2147217318i32); pub const wbemErrMissingAggregationList: WbemErrorEnum = WbemErrorEnum(-2147217317i32); pub const wbemErrPropertyNotAnObject: WbemErrorEnum = WbemErrorEnum(-2147217316i32); pub const wbemErrAggregatingByObject: WbemErrorEnum = WbemErrorEnum(-2147217315i32); pub const wbemErrUninterpretableProviderQuery: WbemErrorEnum = WbemErrorEnum(-2147217313i32); pub const wbemErrBackupRestoreWinmgmtRunning: WbemErrorEnum = WbemErrorEnum(-2147217312i32); pub const wbemErrQueueOverflow: WbemErrorEnum = WbemErrorEnum(-2147217311i32); pub const wbemErrPrivilegeNotHeld: WbemErrorEnum = WbemErrorEnum(-2147217310i32); pub const wbemErrInvalidOperator: WbemErrorEnum = WbemErrorEnum(-2147217309i32); pub const wbemErrLocalCredentials: WbemErrorEnum = WbemErrorEnum(-2147217308i32); pub const wbemErrCannotBeAbstract: WbemErrorEnum = WbemErrorEnum(-2147217307i32); pub const wbemErrAmendedObject: WbemErrorEnum = WbemErrorEnum(-2147217306i32); pub const wbemErrClientTooSlow: WbemErrorEnum = WbemErrorEnum(-2147217305i32); pub const wbemErrNullSecurityDescriptor: WbemErrorEnum = WbemErrorEnum(-2147217304i32); pub const wbemErrTimeout: WbemErrorEnum = WbemErrorEnum(-2147217303i32); pub const wbemErrInvalidAssociation: WbemErrorEnum = WbemErrorEnum(-2147217302i32); pub const wbemErrAmbiguousOperation: WbemErrorEnum = WbemErrorEnum(-2147217301i32); pub const wbemErrQuotaViolation: WbemErrorEnum = WbemErrorEnum(-2147217300i32); pub const wbemErrTransactionConflict: WbemErrorEnum = WbemErrorEnum(-2147217299i32); pub const wbemErrForcedRollback: WbemErrorEnum = WbemErrorEnum(-2147217298i32); pub const wbemErrUnsupportedLocale: WbemErrorEnum = WbemErrorEnum(-2147217297i32); pub const wbemErrHandleOutOfDate: WbemErrorEnum = WbemErrorEnum(-2147217296i32); pub const wbemErrConnectionFailed: WbemErrorEnum = WbemErrorEnum(-2147217295i32); pub const wbemErrInvalidHandleRequest: WbemErrorEnum = WbemErrorEnum(-2147217294i32); pub const wbemErrPropertyNameTooWide: WbemErrorEnum = WbemErrorEnum(-2147217293i32); pub const wbemErrClassNameTooWide: WbemErrorEnum = WbemErrorEnum(-2147217292i32); pub const wbemErrMethodNameTooWide: WbemErrorEnum = WbemErrorEnum(-2147217291i32); pub const wbemErrQualifierNameTooWide: WbemErrorEnum = WbemErrorEnum(-2147217290i32); pub const wbemErrRerunCommand: WbemErrorEnum = WbemErrorEnum(-2147217289i32); pub const wbemErrDatabaseVerMismatch: WbemErrorEnum = WbemErrorEnum(-2147217288i32); pub const wbemErrVetoPut: WbemErrorEnum = WbemErrorEnum(-2147217287i32); pub const wbemErrVetoDelete: WbemErrorEnum = WbemErrorEnum(-2147217286i32); pub const wbemErrInvalidLocale: WbemErrorEnum = WbemErrorEnum(-2147217280i32); pub const wbemErrProviderSuspended: WbemErrorEnum = WbemErrorEnum(-2147217279i32); pub const wbemErrSynchronizationRequired: WbemErrorEnum = WbemErrorEnum(-2147217278i32); pub const wbemErrNoSchema: WbemErrorEnum = WbemErrorEnum(-2147217277i32); pub const wbemErrProviderAlreadyRegistered: WbemErrorEnum = WbemErrorEnum(-2147217276i32); pub const wbemErrProviderNotRegistered: WbemErrorEnum = WbemErrorEnum(-2147217275i32); pub const wbemErrFatalTransportError: WbemErrorEnum = WbemErrorEnum(-2147217274i32); pub const wbemErrEncryptedConnectionRequired: WbemErrorEnum = WbemErrorEnum(-2147217273i32); pub const wbemErrRegistrationTooBroad: WbemErrorEnum = WbemErrorEnum(-2147213311i32); pub const wbemErrRegistrationTooPrecise: WbemErrorEnum = WbemErrorEnum(-2147213310i32); pub const wbemErrTimedout: WbemErrorEnum = WbemErrorEnum(-2147209215i32); pub const wbemErrResetToDefault: WbemErrorEnum = WbemErrorEnum(-2147209214i32); impl ::core::convert::From<i32> for WbemErrorEnum { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemErrorEnum { 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 WbemFlagEnum(pub i32); pub const wbemFlagReturnImmediately: WbemFlagEnum = WbemFlagEnum(16i32); pub const wbemFlagReturnWhenComplete: WbemFlagEnum = WbemFlagEnum(0i32); pub const wbemFlagBidirectional: WbemFlagEnum = WbemFlagEnum(0i32); pub const wbemFlagForwardOnly: WbemFlagEnum = WbemFlagEnum(32i32); pub const wbemFlagNoErrorObject: WbemFlagEnum = WbemFlagEnum(64i32); pub const wbemFlagReturnErrorObject: WbemFlagEnum = WbemFlagEnum(0i32); pub const wbemFlagSendStatus: WbemFlagEnum = WbemFlagEnum(128i32); pub const wbemFlagDontSendStatus: WbemFlagEnum = WbemFlagEnum(0i32); pub const wbemFlagEnsureLocatable: WbemFlagEnum = WbemFlagEnum(256i32); pub const wbemFlagDirectRead: WbemFlagEnum = WbemFlagEnum(512i32); pub const wbemFlagSendOnlySelected: WbemFlagEnum = WbemFlagEnum(0i32); pub const wbemFlagUseAmendedQualifiers: WbemFlagEnum = WbemFlagEnum(131072i32); pub const wbemFlagGetDefault: WbemFlagEnum = WbemFlagEnum(0i32); pub const wbemFlagSpawnInstance: WbemFlagEnum = WbemFlagEnum(1i32); pub const wbemFlagUseCurrentTime: WbemFlagEnum = WbemFlagEnum(1i32); impl ::core::convert::From<i32> for WbemFlagEnum { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemFlagEnum { 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 WbemImpersonationLevelEnum(pub i32); pub const wbemImpersonationLevelAnonymous: WbemImpersonationLevelEnum = WbemImpersonationLevelEnum(1i32); pub const wbemImpersonationLevelIdentify: WbemImpersonationLevelEnum = WbemImpersonationLevelEnum(2i32); pub const wbemImpersonationLevelImpersonate: WbemImpersonationLevelEnum = WbemImpersonationLevelEnum(3i32); pub const wbemImpersonationLevelDelegate: WbemImpersonationLevelEnum = WbemImpersonationLevelEnum(4i32); impl ::core::convert::From<i32> for WbemImpersonationLevelEnum { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemImpersonationLevelEnum { type Abi = Self; } pub const WbemLevel1Login: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8bc3f05e_d86b_11d0_a075_00c04fb68820); pub const WbemLocalAddrRes: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa1044801_8f7e_11d1_9e7c_00c04fc324a8); pub const WbemLocator: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4590f811_1d3a_11d0_891f_00aa004b2e24); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct WbemObjectTextFormatEnum(pub i32); pub const wbemObjectTextFormatCIMDTD20: WbemObjectTextFormatEnum = WbemObjectTextFormatEnum(1i32); pub const wbemObjectTextFormatWMIDTD20: WbemObjectTextFormatEnum = WbemObjectTextFormatEnum(2i32); impl ::core::convert::From<i32> for WbemObjectTextFormatEnum { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemObjectTextFormatEnum { type Abi = Self; } pub const WbemObjectTextSrc: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8d1c559d_84f0_4bb3_a7d5_56a7435a9ba6); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct WbemPrivilegeEnum(pub i32); pub const wbemPrivilegeCreateToken: WbemPrivilegeEnum = WbemPrivilegeEnum(1i32); pub const wbemPrivilegePrimaryToken: WbemPrivilegeEnum = WbemPrivilegeEnum(2i32); pub const wbemPrivilegeLockMemory: WbemPrivilegeEnum = WbemPrivilegeEnum(3i32); pub const wbemPrivilegeIncreaseQuota: WbemPrivilegeEnum = WbemPrivilegeEnum(4i32); pub const wbemPrivilegeMachineAccount: WbemPrivilegeEnum = WbemPrivilegeEnum(5i32); pub const wbemPrivilegeTcb: WbemPrivilegeEnum = WbemPrivilegeEnum(6i32); pub const wbemPrivilegeSecurity: WbemPrivilegeEnum = WbemPrivilegeEnum(7i32); pub const wbemPrivilegeTakeOwnership: WbemPrivilegeEnum = WbemPrivilegeEnum(8i32); pub const wbemPrivilegeLoadDriver: WbemPrivilegeEnum = WbemPrivilegeEnum(9i32); pub const wbemPrivilegeSystemProfile: WbemPrivilegeEnum = WbemPrivilegeEnum(10i32); pub const wbemPrivilegeSystemtime: WbemPrivilegeEnum = WbemPrivilegeEnum(11i32); pub const wbemPrivilegeProfileSingleProcess: WbemPrivilegeEnum = WbemPrivilegeEnum(12i32); pub const wbemPrivilegeIncreaseBasePriority: WbemPrivilegeEnum = WbemPrivilegeEnum(13i32); pub const wbemPrivilegeCreatePagefile: WbemPrivilegeEnum = WbemPrivilegeEnum(14i32); pub const wbemPrivilegeCreatePermanent: WbemPrivilegeEnum = WbemPrivilegeEnum(15i32); pub const wbemPrivilegeBackup: WbemPrivilegeEnum = WbemPrivilegeEnum(16i32); pub const wbemPrivilegeRestore: WbemPrivilegeEnum = WbemPrivilegeEnum(17i32); pub const wbemPrivilegeShutdown: WbemPrivilegeEnum = WbemPrivilegeEnum(18i32); pub const wbemPrivilegeDebug: WbemPrivilegeEnum = WbemPrivilegeEnum(19i32); pub const wbemPrivilegeAudit: WbemPrivilegeEnum = WbemPrivilegeEnum(20i32); pub const wbemPrivilegeSystemEnvironment: WbemPrivilegeEnum = WbemPrivilegeEnum(21i32); pub const wbemPrivilegeChangeNotify: WbemPrivilegeEnum = WbemPrivilegeEnum(22i32); pub const wbemPrivilegeRemoteShutdown: WbemPrivilegeEnum = WbemPrivilegeEnum(23i32); pub const wbemPrivilegeUndock: WbemPrivilegeEnum = WbemPrivilegeEnum(24i32); pub const wbemPrivilegeSyncAgent: WbemPrivilegeEnum = WbemPrivilegeEnum(25i32); pub const wbemPrivilegeEnableDelegation: WbemPrivilegeEnum = WbemPrivilegeEnum(26i32); pub const wbemPrivilegeManageVolume: WbemPrivilegeEnum = WbemPrivilegeEnum(27i32); impl ::core::convert::From<i32> for WbemPrivilegeEnum { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemPrivilegeEnum { type Abi = Self; } pub const WbemQuery: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeac8a024_21e2_4523_ad73_a71a0aa2f56a); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct WbemQueryFlagEnum(pub i32); pub const wbemQueryFlagDeep: WbemQueryFlagEnum = WbemQueryFlagEnum(0i32); pub const wbemQueryFlagShallow: WbemQueryFlagEnum = WbemQueryFlagEnum(1i32); pub const wbemQueryFlagPrototype: WbemQueryFlagEnum = WbemQueryFlagEnum(2i32); impl ::core::convert::From<i32> for WbemQueryFlagEnum { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemQueryFlagEnum { type Abi = Self; } pub const WbemRefresher: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc71566f2_561e_11d1_ad87_00c04fd8fdff); pub const WbemStatusCodeText: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeb87e1bd_3233_11d2_aec9_00c04fb68820); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct WbemTextFlagEnum(pub i32); pub const wbemTextFlagNoFlavors: WbemTextFlagEnum = WbemTextFlagEnum(1i32); impl ::core::convert::From<i32> for WbemTextFlagEnum { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemTextFlagEnum { 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 WbemTimeout(pub i32); pub const wbemTimeoutInfinite: WbemTimeout = WbemTimeout(-1i32); impl ::core::convert::From<i32> for WbemTimeout { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for WbemTimeout { type Abi = Self; } pub const WbemUnauthenticatedLocator: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x443e7b79_de31_11d2_b340_00104bcc4b4a); pub const WbemUninitializedClassObject: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7a0227f6_7108_11d1_ad90_00c04fd8fdff); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct tag_WBEM_LOGIN_TYPE(pub i32); pub const WBEM_FLAG_INPROC_LOGIN: tag_WBEM_LOGIN_TYPE = tag_WBEM_LOGIN_TYPE(0i32); pub const WBEM_FLAG_LOCAL_LOGIN: tag_WBEM_LOGIN_TYPE = tag_WBEM_LOGIN_TYPE(1i32); pub const WBEM_FLAG_REMOTE_LOGIN: tag_WBEM_LOGIN_TYPE = tag_WBEM_LOGIN_TYPE(2i32); pub const WBEM_AUTHENTICATION_METHOD_MASK: tag_WBEM_LOGIN_TYPE = tag_WBEM_LOGIN_TYPE(15i32); pub const WBEM_FLAG_USE_MULTIPLE_CHALLENGES: tag_WBEM_LOGIN_TYPE = tag_WBEM_LOGIN_TYPE(16i32); impl ::core::convert::From<i32> for tag_WBEM_LOGIN_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for tag_WBEM_LOGIN_TYPE { type Abi = Self; }
#[cfg(unix)] use nix::libc; use std::{sync, thread}; /// Get an identifier for the thread; uses gettid on linux; pthread_threadid_np on mac; GetCurrentThreadId on windows. #[inline] pub fn gettid() -> u64 { #[cfg(any(target_os = "android", target_os = "linux"))] { use nix::unistd; Into::<libc::pid_t>::into(unistd::gettid()) as u64 } #[cfg(any(target_os = "macos", target_os = "ios"))] { use std::mem; // https://github.com/google/xi-editor/blob/346bfe2d96f412cca5c8aa858287730f5ed521c3/rust/trace/src/sys_tid.rs #[link(name = "pthread")] extern "C" { fn pthread_threadid_np( thread: libc::pthread_t, thread_id: *mut libc::uint64_t, ) -> libc::c_int; } let mut tid: libc::uint64_t = unsafe { mem::uninitialized() }; let err = unsafe { pthread_threadid_np(0, &mut tid) }; assert_eq!(err, 0); tid } #[cfg(windows)] { extern "C" { fn GetCurrentThreadId() -> libc::c_ulong; } (unsafe { GetCurrentThreadId() }) as u64 } } /// A wrapper around `std::thread::spawn()` that blocks until the new thread has left library code. Library code can do things like temporarily opening fds (leading to dup2 on other threads returning EBUSY on Linux), so blocking this thread until it's done just makes things more predictable. pub fn spawn<F, T>(name: String, f: F) -> thread::JoinHandle<T> where F: FnOnce() -> T, F: Send + 'static, T: Send + 'static, { // #[cfg(any(target_os = "macos", target_os = "ios"))] // { let (sender, receiver) = sync::mpsc::channel::<()>(); let ret = thread::Builder::new() .name(name) .spawn(move || { drop(sender); f() }) .unwrap(); if let Err(sync::mpsc::RecvError) = receiver.recv() { } else { unreachable!() } ret // } // #[cfg(not(any(target_os = "macos", target_os = "ios")))] // { // thread::Builder::new().name(name).spawn(f).unwrap() // } }
use bevy::{ asset::{AssetLoader, LoadedAsset}, prelude::*, reflect::TypeUuid, }; pub use pyxel; use pyxel::Pyxel; use serde::Deserialize; #[derive(Debug, Deserialize, TypeUuid)] #[uuid = "9da4b419-2d5f-4def-a63b-bcc1f43254d4"] pub struct PyxelFile { /// The file's name pub file_name: String, /// The path inside your assets folder pub path_inside_assets_folder: String, pub data: Pyxel, } #[derive(Default)] pub struct PyxelFileLoader; impl AssetLoader for PyxelFileLoader { fn load<'a>( &'a self, bytes: &'a [u8], load_context: &'a mut bevy::asset::LoadContext, ) -> bevy::asset::BoxedFuture<'a, Result<(), anyhow::Error>> { Box::pin(async move { let data = pyxel::load_from_memory(bytes)?; let custom_asset = PyxelFile { path_inside_assets_folder: load_context.path().to_str().unwrap().to_string(), file_name: load_context .path() .file_stem() .unwrap() .to_str() .unwrap() .to_string(), data, }; load_context.set_default_asset(LoadedAsset::new(custom_asset)); Ok(()) }) } fn extensions(&self) -> &[&str] { &["pyxel"] } } pub struct BevyPyxelPlugin; impl Plugin for BevyPyxelPlugin { fn build(&self, app: &mut App) { app.add_asset::<PyxelFile>() .init_asset_loader::<PyxelFileLoader>(); } }
use std::cmp::Ordering; use std::collections::BinaryHeap; use std::usize; #[derive(Copy, Clone, Eq, PartialEq)] struct State { cost: usize, position: usize, pre_node: usize, } impl Ord for State { fn cmp(&self, other: &State) -> Ordering { other .cost .cmp(&self.cost) .then_with(|| self.position.cmp(&other.position)) } } impl PartialOrd for State { fn partial_cmp(&self, other: &State) -> Option<Ordering> { Some(self.cmp(other)) } } #[derive(Debug)] struct Edge { node: usize, cost: usize, } fn shortest_path( adj_ist: &Vec<Vec<Edge>>, start: usize, goal: usize, ) -> Option<(usize, Vec<usize>)> { let mut dist: Vec<_> = (0..adj_ist.len()).map(|_| usize::MAX).collect(); let mut pre_nodes: Vec<_> = (0..adj_ist.len()).map(|i| i).collect(); let mut heap = BinaryHeap::new(); dist[start] = 0; heap.push(State { cost: 0, position: start, pre_node: 0, }); while let Some(State { cost, position, pre_node, }) = heap.pop() { if cost > dist[position] { continue; } pre_nodes[position] = pre_node; if position == goal { let mut v = goal; let mut path = vec![goal]; // はじめまでたどる while v != start { path.push(pre_nodes[v]); v = pre_nodes[v]; } path.reverse(); return Some((cost, path)); } for edge in &adj_ist[position] { let next = State { cost: cost + edge.cost, position: edge.node, pre_node: position, }; // 次に行けるところがdistに書いたのより早く行ける if next.cost < dist[next.position] { heap.push(next); dist[next.position] = next.cost; } } } None } fn main() { let graph = vec![ vec![Edge { node: 2, cost: 10 }, Edge { node: 1, cost: 1 }], // Node 1 vec![Edge { node: 3, cost: 2 }], // Node 2 vec![ Edge { node: 1, cost: 1 }, Edge { node: 3, cost: 3 }, Edge { node: 4, cost: 1 }, ], // Node 3 vec![Edge { node: 0, cost: 7 }, Edge { node: 4, cost: 2 }], // Node 4 vec![], ]; assert_eq!(shortest_path(&graph, 0, 1), Some((1, vec![0, 1]))); assert_eq!(shortest_path(&graph, 0, 3), Some((3, vec![0, 1, 3]))); assert_eq!(shortest_path(&graph, 3, 0), Some((7, vec![3, 0]))); assert_eq!(shortest_path(&graph, 0, 4), Some((5, vec![0, 1, 3, 4]))); assert_eq!(shortest_path(&graph, 4, 0), None); }
use opengl_graphics::shader_utils::{Shader, DynamicAttribute, compile_shader}; use opengl_graphics::gl::types::GLuint; use opengl_graphics::{gl, GlGraphics}; use opengl_graphics::GLSL; use graphics::BACK_END_MAX_VERTEX_COUNT; use opengl_graphics::shader_uniforms::{ShaderUniform, SUMat4x4, SUVec3, SUVec4}; use cgmath::{Matrix4, SquareMatrix, Vector3, Rad}; const FRAGMENT_SOURCE: &'static str = include_str!("./fragment.glsl"); const VERTEX_SOURCE: &'static str = include_str!("./vertex.glsl"); const CHUNKS: usize = 100; pub struct LightShader { // Shader items vao: GLuint, vertex_shader: GLuint, fragment_shader: GLuint, program: GLuint, // Per-vertex attributes uv: DynamicAttribute, pos: DynamicAttribute, color: DynamicAttribute, normal: DynamicAttribute, // Per-vertex attribute buffers uv_buffer: Vec<[f32; 2]>, pos_buffer: Vec<[f32; 4]>, color_buffer: Vec<[f32; 4]>, normal_buffer: Vec<[f32; 3]>, // Indices and the offset indices: Vec<u16>, offset: usize, texture: GLuint, // Matrices and other items pub world: Matrix4<f32>, pub view: Matrix4<f32>, pub projection: Matrix4<f32>, pub eye: Vector3<f32>, // Uniforms for the above matrices and other items pub projection_matrix_uni: ShaderUniform<SUMat4x4>, pub world_matrix_uni: ShaderUniform<SUMat4x4>, pub view_matrix_uni: ShaderUniform<SUMat4x4>, pub light_uni: ShaderUniform<SUVec3>, pub eye_uni: ShaderUniform<SUVec3>, pub light_colour_uni: ShaderUniform<SUVec4>, } impl LightShader { pub fn set_eye(&mut self, value: Vector3<f32>) { self.eye = value; self.view = Matrix4::from_translation(value); } pub fn rotate_eye(&mut self, value: Vector3<f32>) { self.view = self.view * Matrix4::from_angle_x(Rad(value.x)) * Matrix4::from_angle_y(Rad(value.y)) * Matrix4::from_angle_z(Rad(value.z)); } } impl Drop for LightShader { fn drop(&mut self) { unsafe { gl::DeleteVertexArrays(1, &self.vao); gl::DeleteProgram(self.program); gl::DeleteShader(self.vertex_shader); gl::DeleteShader(self.fragment_shader); } } } impl Shader for LightShader { type Vertex = [f32; 4]; fn new(_: GLSL, gl: Option<&mut GlGraphics>) -> Self { let gl = gl.unwrap(); let vertex_shader_compiled = compile_shader(gl::VERTEX_SHADER, VERTEX_SOURCE).expect("Vertex shader error"); let fragment_shader_compiled = compile_shader(gl::FRAGMENT_SHADER, FRAGMENT_SOURCE).expect("Fragment shader error"); let program = unsafe { let program = gl::CreateProgram(); gl::AttachShader(program, vertex_shader_compiled); gl::AttachShader(program, fragment_shader_compiled); program }; let mut vao = 0; unsafe { gl::GenVertexArrays(1, &mut vao); gl::LinkProgram(program); } let pos = DynamicAttribute::xyzw(program, "pos").unwrap(); let color = DynamicAttribute::rgba(program, "color").unwrap(); let normal = DynamicAttribute::xyz(program, "normal").unwrap(); let uv = DynamicAttribute::uv(program, "uv").unwrap(); gl.use_program(program); let light_uni = gl.get_uniform("light").expect("Could not find light uniform"); light_uni.set(gl, &[0.0; 3]); let projection_matrix_uni = gl.get_uniform("projection").expect("Could not find projection uniform"); projection_matrix_uni.set(gl, &[0.0; 16]); let world_matrix_uni = gl.get_uniform("model").expect("Could not find model uniform"); world_matrix_uni.set(gl, &[0.0; 16]); let view_matrix_uni = gl.get_uniform("view").expect("Could not find view uniform"); view_matrix_uni.set(gl, &[0.0; 16]); let eye_uni = gl.get_uniform("eye").expect("Could not find eye uniform"); eye_uni.set(gl, &[0.0; 3]); let light_colour_uni = gl.get_uniform("light_colour").expect("Could not find light colour uniform"); light_colour_uni.set(gl, &[0.77, 0.61, 0.80, 1.0]); gl.clear_program(); Self { // Shader items vao, vertex_shader: vertex_shader_compiled, fragment_shader: fragment_shader_compiled, program, // Per vertex items uv, pos, color, normal, uv_buffer: vec![[0.0; 2]; CHUNKS * BACK_END_MAX_VERTEX_COUNT], pos_buffer: vec![[0.0; 4]; CHUNKS * BACK_END_MAX_VERTEX_COUNT], color_buffer: vec![[0.0; 4]; CHUNKS * BACK_END_MAX_VERTEX_COUNT], normal_buffer: vec![[0.0; 3]; CHUNKS * BACK_END_MAX_VERTEX_COUNT], // Indices and offset indices: vec![0u16; 100], offset: 0, texture: 0, // Matrices and vectors world: Matrix4::from_translation(Vector3::new(0., 0., 100.)), view: Matrix4::identity(), projection: Matrix4::identity(), eye: Vector3::new(0., 0., 0.), // Uniforms world_matrix_uni, view_matrix_uni, projection_matrix_uni, light_uni, eye_uni, light_colour_uni, } } fn flush(&mut self) { unsafe { gl::BindVertexArray(self.vao); gl::Disable(gl::CULL_FACE); gl::BindTexture(gl::TEXTURE_2D, self.texture); gl::Enable(gl::DEPTH_TEST); self.color.bind_vao(self.vao); self.color.set(&self.color_buffer[..self.offset]); self.pos.bind_vao(self.vao); self.pos.set(&self.pos_buffer[..self.offset]); self.normal.bind_vao(self.vao); self.normal.set(&self.normal_buffer[..self.offset]); self.uv.bind_vao(self.vao); self.uv.set(&self.uv_buffer[..self.offset]); gl::DrawElements(gl::TRIANGLES, self.indices.len() as i32, gl::UNSIGNED_SHORT, self.indices.as_ptr() as *const _); gl::BindVertexArray(0); self.indices.clear(); } self.offset = 0; } fn program(&self) -> GLuint { self.program } fn offset(&mut self) -> &mut usize { &mut self.offset } fn pos_buffer(&mut self) -> &mut Vec<[f32; 4]> { &mut self.pos_buffer } fn colour_buffer(&mut self) -> Option<&mut Vec<[f32; 4]>> { Some(&mut self.color_buffer) } fn uv_buffer(&mut self) -> Option<&mut Vec<[f32; 2]>> { Some(&mut self.uv_buffer) } fn index_buffer(&mut self) -> Option<&mut Vec<u16>> { Some(&mut self.indices) } fn normal_buffer(&mut self) -> Option<&mut Vec<[f32; 3]>> { Some(&mut self.normal_buffer) } fn texture_id(&mut self) -> Option<&mut GLuint> { Some(&mut self.texture) } fn has_texture(&self) -> bool { true } }
#[doc = "Reader of register PPSCTRL"] pub type R = crate::R<u32, super::PPSCTRL>; #[doc = "Writer for register PPSCTRL"] pub type W = crate::W<u32, super::PPSCTRL>; #[doc = "Register PPSCTRL `reset()`'s with value 0"] impl crate::ResetValue for super::PPSCTRL { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `PPSCTRL`"] pub type PPSCTRL_R = crate::R<u8, u8>; #[doc = "Write proxy for field `PPSCTRL`"] pub struct PPSCTRL_W<'a> { w: &'a mut W, } impl<'a> PPSCTRL_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 & !0x0f) | ((value as u32) & 0x0f); self.w } } #[doc = "Reader of field `PPSEN0`"] pub type PPSEN0_R = crate::R<bool, bool>; #[doc = "Write proxy for field `PPSEN0`"] pub struct PPSEN0_W<'a> { w: &'a mut W, } impl<'a> PPSEN0_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 = "Target Time Register Mode for PPS0 Output\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum TRGMODS0_A { #[doc = "0: Indicates that the Target Time registers are programmed only for generating the interrupt event"] INTONLY = 0, #[doc = "2: Indicates that the Target Time registers are programmed for generating the interrupt event and starting or stopping the generation of the EN0PPS output signal"] INTPPS0 = 2, #[doc = "3: Indicates that the Target Time registers are programmed only for starting or stopping the generation of the EN0PPS output signal. No interrupt is asserted"] PPS0ONLY = 3, } impl From<TRGMODS0_A> for u8 { #[inline(always)] fn from(variant: TRGMODS0_A) -> Self { variant as _ } } #[doc = "Reader of field `TRGMODS0`"] pub type TRGMODS0_R = crate::R<u8, TRGMODS0_A>; impl TRGMODS0_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, TRGMODS0_A> { use crate::Variant::*; match self.bits { 0 => Val(TRGMODS0_A::INTONLY), 2 => Val(TRGMODS0_A::INTPPS0), 3 => Val(TRGMODS0_A::PPS0ONLY), i => Res(i), } } #[doc = "Checks if the value of the field is `INTONLY`"] #[inline(always)] pub fn is_intonly(&self) -> bool { *self == TRGMODS0_A::INTONLY } #[doc = "Checks if the value of the field is `INTPPS0`"] #[inline(always)] pub fn is_intpps0(&self) -> bool { *self == TRGMODS0_A::INTPPS0 } #[doc = "Checks if the value of the field is `PPS0ONLY`"] #[inline(always)] pub fn is_pps0only(&self) -> bool { *self == TRGMODS0_A::PPS0ONLY } } #[doc = "Write proxy for field `TRGMODS0`"] pub struct TRGMODS0_W<'a> { w: &'a mut W, } impl<'a> TRGMODS0_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: TRGMODS0_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "Indicates that the Target Time registers are programmed only for generating the interrupt event"] #[inline(always)] pub fn intonly(self) -> &'a mut W { self.variant(TRGMODS0_A::INTONLY) } #[doc = "Indicates that the Target Time registers are programmed for generating the interrupt event and starting or stopping the generation of the EN0PPS output signal"] #[inline(always)] pub fn intpps0(self) -> &'a mut W { self.variant(TRGMODS0_A::INTPPS0) } #[doc = "Indicates that the Target Time registers are programmed only for starting or stopping the generation of the EN0PPS output signal. No interrupt is asserted"] #[inline(always)] pub fn pps0only(self) -> &'a mut W { self.variant(TRGMODS0_A::PPS0ONLY) } #[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 << 5)) | (((value as u32) & 0x03) << 5); self.w } } impl R { #[doc = "Bits 0:3 - EN0PPS Output Frequency Control (PPSCTRL) or Command Control (PPSCMD)"] #[inline(always)] pub fn ppsctrl(&self) -> PPSCTRL_R { PPSCTRL_R::new((self.bits & 0x0f) as u8) } #[doc = "Bit 4 - Flexible PPS Output Mode Enable"] #[inline(always)] pub fn ppsen0(&self) -> PPSEN0_R { PPSEN0_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bits 5:6 - Target Time Register Mode for PPS0 Output"] #[inline(always)] pub fn trgmods0(&self) -> TRGMODS0_R { TRGMODS0_R::new(((self.bits >> 5) & 0x03) as u8) } } impl W { #[doc = "Bits 0:3 - EN0PPS Output Frequency Control (PPSCTRL) or Command Control (PPSCMD)"] #[inline(always)] pub fn ppsctrl(&mut self) -> PPSCTRL_W { PPSCTRL_W { w: self } } #[doc = "Bit 4 - Flexible PPS Output Mode Enable"] #[inline(always)] pub fn ppsen0(&mut self) -> PPSEN0_W { PPSEN0_W { w: self } } #[doc = "Bits 5:6 - Target Time Register Mode for PPS0 Output"] #[inline(always)] pub fn trgmods0(&mut self) -> TRGMODS0_W { TRGMODS0_W { w: self } } }
#[doc = "Reader of register ECR"] pub type R = crate::R<u32, super::ECR>; #[doc = "Writer for register ECR"] pub type W = crate::W<u32, super::ECR>; #[doc = "Register ECR `reset()`'s with value 0"] impl crate::ResetValue for super::ECR { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `IE`"] pub type IE_R = crate::R<bool, bool>; #[doc = "Write proxy for field `IE`"] pub struct IE_W<'a> { w: &'a mut W, } impl<'a> IE_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 `IDIR`"] pub type IDIR_R = crate::R<u8, u8>; #[doc = "Write proxy for field `IDIR`"] pub struct IDIR_W<'a> { w: &'a mut W, } impl<'a> IDIR_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 << 1)) | (((value as u32) & 0x03) << 1); self.w } } #[doc = "Reader of field `IBLK`"] pub type IBLK_R = crate::R<u8, u8>; #[doc = "Write proxy for field `IBLK`"] pub struct IBLK_W<'a> { w: &'a mut W, } impl<'a> IBLK_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 << 3)) | (((value as u32) & 0x03) << 3); self.w } } #[doc = "Reader of field `FIDX`"] pub type FIDX_R = crate::R<bool, bool>; #[doc = "Write proxy for field `FIDX`"] pub struct FIDX_W<'a> { w: &'a mut W, } impl<'a> FIDX_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 `IPOS`"] pub type IPOS_R = crate::R<u8, u8>; #[doc = "Write proxy for field `IPOS`"] pub struct IPOS_W<'a> { w: &'a mut W, } impl<'a> IPOS_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 << 6)) | (((value as u32) & 0x03) << 6); self.w } } #[doc = "Reader of field `PW`"] pub type PW_R = crate::R<u8, u8>; #[doc = "Write proxy for field `PW`"] pub struct PW_W<'a> { w: &'a mut W, } impl<'a> PW_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 & !(0xff << 16)) | (((value as u32) & 0xff) << 16); self.w } } #[doc = "Reader of field `PWPRSC`"] pub type PWPRSC_R = crate::R<u8, u8>; #[doc = "Write proxy for field `PWPRSC`"] pub struct PWPRSC_W<'a> { w: &'a mut W, } impl<'a> PWPRSC_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 & !(0x07 << 24)) | (((value as u32) & 0x07) << 24); self.w } } impl R { #[doc = "Bit 0 - Index Enable"] #[inline(always)] pub fn ie(&self) -> IE_R { IE_R::new((self.bits & 0x01) != 0) } #[doc = "Bits 1:2 - Index Direction"] #[inline(always)] pub fn idir(&self) -> IDIR_R { IDIR_R::new(((self.bits >> 1) & 0x03) as u8) } #[doc = "Bits 3:4 - Index Blanking"] #[inline(always)] pub fn iblk(&self) -> IBLK_R { IBLK_R::new(((self.bits >> 3) & 0x03) as u8) } #[doc = "Bit 5 - First Index"] #[inline(always)] pub fn fidx(&self) -> FIDX_R { FIDX_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bits 6:7 - Index Positioning"] #[inline(always)] pub fn ipos(&self) -> IPOS_R { IPOS_R::new(((self.bits >> 6) & 0x03) as u8) } #[doc = "Bits 16:23 - Pulse width"] #[inline(always)] pub fn pw(&self) -> PW_R { PW_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 24:26 - Pulse Width prescaler"] #[inline(always)] pub fn pwprsc(&self) -> PWPRSC_R { PWPRSC_R::new(((self.bits >> 24) & 0x07) as u8) } } impl W { #[doc = "Bit 0 - Index Enable"] #[inline(always)] pub fn ie(&mut self) -> IE_W { IE_W { w: self } } #[doc = "Bits 1:2 - Index Direction"] #[inline(always)] pub fn idir(&mut self) -> IDIR_W { IDIR_W { w: self } } #[doc = "Bits 3:4 - Index Blanking"] #[inline(always)] pub fn iblk(&mut self) -> IBLK_W { IBLK_W { w: self } } #[doc = "Bit 5 - First Index"] #[inline(always)] pub fn fidx(&mut self) -> FIDX_W { FIDX_W { w: self } } #[doc = "Bits 6:7 - Index Positioning"] #[inline(always)] pub fn ipos(&mut self) -> IPOS_W { IPOS_W { w: self } } #[doc = "Bits 16:23 - Pulse width"] #[inline(always)] pub fn pw(&mut self) -> PW_W { PW_W { w: self } } #[doc = "Bits 24:26 - Pulse Width prescaler"] #[inline(always)] pub fn pwprsc(&mut self) -> PWPRSC_W { PWPRSC_W { w: self } } }
// mengakses array dengan `index` fn main() { let number = [1,2,3]; println!("{}", number[0]); }
#![feature(proc_macro_hygiene, decl_macro)] // Nightly-only language features needed by rocket // Macros from rocket #[macro_use] extern crate rocket; use std::collections::HashMap; use oauth2::token::{AccessToken, Scope, TokenType}; use oauth2::user::{User, UserId}; struct Server { user_list: Vec<User>, token_list: HashMap<UserId, AccessToken>, } impl Server { pub fn new() -> Self { let user_list = vec![User::new(0)]; Server { user_list, token_list: HashMap::new(), } } pub fn authorize(&mut self, user_id: UserId) -> Option<AccessToken> { let users: Vec<&User> = self .user_list .iter() .filter(|&u| u.user_id == user_id) .collect(); match users.as_slice() { [user] => { let token = AccessToken::new(Scope::Read, TokenType::Bearer); self.token_list.insert(user.user_id, token.clone()); Some(token) } _ => None, } } } fn main() { rocket::ignite().launch(); }
use std::io; use std::io::prelude::*; use std::net::TcpStream; use std::num; use std::sync::mpsc; use message; #[derive(Debug)] pub enum ClientError { Io(io::Error), ClientId(num::ParseIntError), Other, } pub struct Client<W: Write> { pub id: u64, out: W, events: mpsc::Receiver<message::Message>, } impl<W: Write> Client<W> { pub fn new(chan: TcpStream, events: mpsc::Receiver<message::Message>) -> Result<Client<TcpStream>, ClientError> { let client_id = { let mut br = io::BufReader::new(&chan); let mut buf = String::new(); try!(br.read_line(&mut buf).map_err(ClientError::Io)); try!(buf.trim().parse().map_err(ClientError::ClientId)) }; Ok(Client {id: client_id, out: chan, events: events}) } pub fn run(mut self) -> Result<(), ClientError> { for event in self.events { try!(writeln!(self.out, "{}", event).map_err(ClientError::Io)); } Ok(()) } }
use crate::{Attribute, Listener, Mailbox, Property}; use derivative::Derivative; use std::rc::Rc; use web_sys as web; #[derive(Derivative)] #[derivative(Debug(bound = ""))] pub enum Aspect<Message> { Attribute(Attribute), Property(Property), Listener(Listener<Message>), } impl<Message: 'static> Aspect<Message> { pub(crate) fn do_map<NewMessage: 'static>( self, f: Rc<impl Fn(Message) -> NewMessage + 'static>, ) -> Aspect<NewMessage> { match self { Aspect::Attribute(attribute) => Aspect::Attribute(attribute), Aspect::Property(property) => Aspect::Property(property), Aspect::Listener(listener) => Aspect::Listener(listener.do_map(f)), } } } pub fn patch<Message>( new_aspects: &mut [Aspect<Message>], old_aspects: &[Aspect<Message>], element: &web::Element, mailbox: &Mailbox<Message>, ) { macro_rules! find { ($aspects:expr, $name:expr, $ty:ident) => { $aspects .iter() .filter_map(|aspect| match aspect { Aspect::$ty(aspect) if aspect.name() == $name => Some(aspect), _ => None, }) .next() }; } for new_aspect in new_aspects.iter_mut() { match new_aspect { Aspect::Attribute(attribute) => { attribute.patch(find!(old_aspects, attribute.name(), Attribute), element) } Aspect::Property(property) => { property.patch(find!(old_aspects, property.name(), Property), element) } Aspect::Listener(listener) => listener.attach(element, mailbox), } } for old_aspect in old_aspects { match old_aspect { Aspect::Attribute(attribute) => { if find!(new_aspects, attribute.name(), Attribute).is_none() { attribute.remove(element); } } Aspect::Property(property) => { if find!(new_aspects, property.name(), Property).is_none() { property.remove(element); } } Aspect::Listener(listener) => listener.detach(element), } } } impl<Message> From<Attribute> for Aspect<Message> { fn from(attribute: Attribute) -> Self { Aspect::Attribute(attribute) } } impl<Message> From<Property> for Aspect<Message> { fn from(property: Property) -> Self { Aspect::Property(property) } } impl<Message> From<Listener<Message>> for Aspect<Message> { fn from(listener: Listener<Message>) -> Self { Aspect::Listener(listener) } }
test_stdout!( with_small_integer_divisor_returns_small_integer, "true\n1024\n" ); test_stdout!(with_big_integer_divisor_returns_zero, "false\n0\n");
pub struct Solution; impl Solution { pub fn eval_rpn(tokens: Vec<String>) -> i32 { use std::str::FromStr; let mut stack = Vec::new(); for token in tokens { if let Ok(n) = i32::from_str(&token) { stack.push(n); } else if token == "+" { let b = stack.pop().unwrap(); let a = stack.pop().unwrap(); stack.push(a + b); } else if token == "-" { let b = stack.pop().unwrap(); let a = stack.pop().unwrap(); stack.push(a - b); } else if token == "*" { let b = stack.pop().unwrap(); let a = stack.pop().unwrap(); stack.push(a * b); } else if token == "/" { let b = stack.pop().unwrap(); let a = stack.pop().unwrap(); stack.push(a / b); } } stack.pop().unwrap() } } #[test] fn test0150() { let wrap = |tokens: &[&str]| { tokens .iter() .map(|s| s.to_string()) .collect::<Vec<String>>() }; assert_eq!(Solution::eval_rpn(wrap(&["2", "1", "+", "3", "*"])), 9); assert_eq!(Solution::eval_rpn(wrap(&["4", "13", "5", "/", "+"])), 6); assert_eq!( Solution::eval_rpn(wrap(&[ "10", "6", "9", "3", "+", "-11", "*", "/", "*", "17", "+", "5", "+" ])), 22 ); }
mod render_buffer; pub use render_buffer::RenderBuffer; mod image_buffer; pub use image_buffer::Image; mod instance_buffer; pub use instance_buffer::InstanceBuffer;
// ByteArray, IntArray and LongArray serialization use coruscant_nbt::as_nbt_array; use serde::Serialize; #[derive(Serialize)] struct Wrap<'a> { list_of_bytes: &'a [i8], // no attributes, do it as ListTag of bytes . #[serde(serialize_with = "as_nbt_array")] // special attribute used, regard as ByteArray. byte_array: &'a [i8], #[serde(serialize_with = "as_nbt_array")] // same attribute, but for seq of i32 values, int_array: &'a [i32], // we serialize it as IntArray instead. #[serde(serialize_with = "as_nbt_array")] long_array: &'a [i64], // for the same reason, LongArray here. } fn main() { let bytes = &[-1, 2, -3]; let data = Wrap { list_of_bytes: bytes, byte_array: bytes, int_array: &[19132, -25565], long_array: &[-31415926, 299792458], }; // You may also use other to-functions. For human readability, this example // prints informal NBT transctiption for reference. let out = coruscant_nbt::to_string_transcript(&data).expect("generate string transcript"); // Should firstly print a ListTag of bytes, and secondly a special ByteArray. // IntArray and LongArray are also supported. println!("{}", out); }
pub mod contour; pub mod rstar;
//! xshell is a swiss-army knife for writing cross-platform "bash" scripts in //! Rust. //! //! It doesn't use the shell directly, but rather re-implements parts of //! scripting environment in Rust. The intended use-case is various bits of glue //! code, which could be written in bash or python. The original motivation is //! [`xtask`](https://github.com/matklad/cargo-xtask) development. //! //! Here's a quick example: //! //! ```no_run //! use xshell::{Shell, cmd}; //! //! let sh = Shell::new()?; //! let branch = "main"; //! let commit_hash = cmd!(sh, "git rev-parse {branch}").read()?; //! # Ok::<(), xshell::Error>(()) //! ``` //! //! **Goals:** //! //! * Ergonomics and DWIM ("do what I mean"): `cmd!` macro supports //! interpolation, writing to a file automatically creates parent directories, //! etc. //! * Reliability: no [shell injection] by construction, good error messages //! with file paths, non-zero exit status is an error, independence of the //! host environment, etc. //! * Frugality: fast compile times, few dependencies, low-tech API. //! //! # Guide //! //! For a short API overview, let's implement a script to clone a github //! repository and publish it as a crates.io crate. The script will do the //! following: //! //! 1. Clone the repository. //! 2. `cd` into the repository's directory. //! 3. Run the tests. //! 4. Create a git tag using a version from `Cargo.toml`. //! 5. Publish the crate with an optional `--dry-run`. //! //! Start with the following skeleton: //! //! ```no_run //! use xshell::{cmd, Shell}; //! //! fn main() -> anyhow::Result<()> { //! let sh = Shell::new()?; //! //! Ok(()) //! } //! ``` //! //! Only two imports are needed -- the [`Shell`] struct the and [`cmd!`] macro. //! By convention, an instance of a [`Shell`] is stored in a variable named //! `sh`. All the API is available as methods, so a short name helps here. For //! "scripts", the [`anyhow`](https://docs.rs/anyhow) crate is a great choice //! for an error-handling library. //! //! Next, clone the repository: //! //! ```no_run //! # use xshell::{Shell, cmd}; let sh = Shell::new().unwrap(); //! cmd!(sh, "git clone https://github.com/matklad/xshell.git").run()?; //! # Ok::<(), xshell::Error>(()) //! ``` //! //! The [`cmd!`] macro provides a convenient syntax for creating a command -- //! the [`Cmd`] struct. The [`Cmd::run`] method runs the command as if you //! typed it into the shell. The whole program outputs: //! //! ```console //! $ git clone https://github.com/matklad/xshell.git //! Cloning into 'xshell'... //! remote: Enumerating objects: 676, done. //! remote: Counting objects: 100% (220/220), done. //! remote: Compressing objects: 100% (123/123), done. //! remote: Total 676 (delta 106), reused 162 (delta 76), pack-reused 456 //! Receiving objects: 100% (676/676), 136.80 KiB | 222.00 KiB/s, done. //! Resolving deltas: 100% (327/327), done. //! ``` //! //! Note that the command itself is echoed to stderr (the `$ git ...` bit in the //! output). You can use [`Cmd::quiet`] to override this behavior: //! //! ```no_run //! # use xshell::{Shell, cmd}; let sh = Shell::new().unwrap(); //! cmd!(sh, "git clone https://github.com/matklad/xshell.git") //! .quiet() //! .run()?; //! # Ok::<(), xshell::Error>(()) //! ``` //! //! To make the code more general, let's use command interpolation to extract //! the username and the repository: //! //! ```no_run //! # use xshell::{Shell, cmd}; let sh = Shell::new().unwrap(); //! let user = "matklad"; //! let repo = "xshell"; //! cmd!(sh, "git clone https://github.com/{user}/{repo}.git").run()?; //! # Ok::<(), xshell::Error>(()) //! ``` //! //! Note that the `cmd!` macro parses the command string at compile time, so you //! don't have to worry about escaping the arguments. For example, the following //! command "touches" a single file whose name is `contains a space`: //! //! ```no_run //! # use xshell::{Shell, cmd}; let sh = Shell::new().unwrap(); //! let file = "contains a space"; //! cmd!(sh, "touch {file}").run()?; //! # Ok::<(), xshell::Error>(()) //! ``` //! //! Next, `cd` into the folder you have just cloned: //! //! ```no_run //! # use xshell::{Shell, cmd}; let sh = Shell::new().unwrap(); //! # let repo = "xshell"; //! sh.change_dir(repo); //! ``` //! //! Each instance of [`Shell`] has a current directory, which is independent of //! the process-wide [`std::env::current_dir`]. The same applies to the //! environment. //! //! Next, run the tests: //! //! ```no_run //! # use xshell::{Shell, cmd}; let sh = Shell::new().unwrap(); //! let test_args = ["-Zunstable-options", "--report-time"]; //! cmd!(sh, "cargo test -- {test_args...}").run()?; //! # Ok::<(), xshell::Error>(()) //! ``` //! //! Note how the so-called splat syntax (`...`) is used to interpolate an //! iterable of arguments. //! //! Next, read the Cargo.toml so that we can fetch crate' declared version: //! //! ```no_run //! # use xshell::{Shell, cmd}; let sh = Shell::new().unwrap(); //! let manifest = sh.read_file("Cargo.toml")?; //! # Ok::<(), xshell::Error>(()) //! ``` //! //! [`Shell::read_file`] works like [`std::fs::read_to_string`], but paths are //! relative to the current directory of the [`Shell`]. Unlike [`std::fs`], //! error messages are much more useful. For example, if there isn't a //! `Cargo.toml` in the repository, the error message is: //! //! ```text //! Error: failed to read file `xshell/Cargo.toml`: no such file or directory (os error 2) //! ``` //! //! `xshell` doesn't implement string processing utils like `grep`, `sed` or //! `awk` -- there's no need to, built-in language features work fine, and it's //! always possible to pull extra functionality from crates.io. //! //! To extract the `version` field from Cargo.toml, [`str::split_once`] is //! enough: //! //! ```no_run //! # use xshell::{Shell, cmd}; let sh = Shell::new().unwrap(); //! let manifest = sh.read_file("Cargo.toml")?; //! let version = manifest //! .split_once("version = \"") //! .and_then(|it| it.1.split_once('\"')) //! .map(|it| it.0) //! .ok_or_else(|| anyhow::format_err!("can't find version field in the manifest"))?; //! //! cmd!(sh, "git tag {version}").run()?; //! # Ok::<(), anyhow::Error>(()) //! ``` //! //! The splat (`...`) syntax works with any iterable, and in Rust options are //! iterable. This means that `...` can be used to implement optional arguments. //! For example, here's how to pass `--dry-run` when *not* running in CI: //! //! ```no_run //! # use xshell::{Shell, cmd}; let sh = Shell::new().unwrap(); //! let dry_run = if sh.var("CI").is_ok() { None } else { Some("--dry-run") }; //! cmd!(sh, "cargo publish {dry_run...}").run()?; //! # Ok::<(), xshell::Error>(()) //! ``` //! //! Putting everything altogether, here's the whole script: //! //! ```no_run //! use xshell::{cmd, Shell}; //! //! fn main() -> anyhow::Result<()> { //! let sh = Shell::new()?; //! //! let user = "matklad"; //! let repo = "xshell"; //! cmd!(sh, "git clone https://github.com/{user}/{repo}.git").run()?; //! sh.change_dir(repo); //! //! let test_args = ["-Zunstable-options", "--report-time"]; //! cmd!(sh, "cargo test -- {test_args...}").run()?; //! //! let manifest = sh.read_file("Cargo.toml")?; //! let version = manifest //! .split_once("version = \"") //! .and_then(|it| it.1.split_once('\"')) //! .map(|it| it.0) //! .ok_or_else(|| anyhow::format_err!("can't find version field in the manifest"))?; //! //! cmd!(sh, "git tag {version}").run()?; //! //! let dry_run = if sh.var("CI").is_ok() { None } else { Some("--dry-run") }; //! cmd!(sh, "cargo publish {dry_run...}").run()?; //! //! Ok(()) //! } //! ``` //! //! `xshell` itself uses a similar script to automatically publish oneself to //! crates.io when the version in Cargo.toml changes: //! //! <https://github.com/matklad/xshell/blob/master/examples/ci.rs> //! //! # Maintenance //! //! Minimum Supported Rust Version: 1.59.0. MSRV bump is not considered semver //! breaking. MSRV is updated conservatively. //! //! The crate isn't comprehensive yet, but this is a goal. You are hereby //! encouraged to submit PRs with missing functionality! //! //! # Related Crates //! //! [`duct`] is a crate for heavy-duty process herding, with support for //! pipelines. //! //! Most of what this crate provides can be open-coded using //! [`std::process::Command`] and [`std::fs`]. If you only need to spawn a //! single process, using `std` is probably better (but don't forget to check //! the exit status!). //! //! [`duct`]: https://github.com/oconnor663/duct.rs //! [shell injection]: //! https://en.wikipedia.org/wiki/Code_injection#Shell_injection //! //! # Implementation Notes //! //! The design is heavily inspired by the Julia language: //! //! * [Shelling Out //! Sucks](https://julialang.org/blog/2012/03/shelling-out-sucks/) //! * [Put This In Your //! Pipe](https://julialang.org/blog/2013/04/put-this-in-your-pipe/) //! * [Running External //! Programs](https://docs.julialang.org/en/v1/manual/running-external-programs/) //! * [Filesystem](https://docs.julialang.org/en/v1/base/file/) //! //! Smaller influences are the [`duct`] crate and Ruby's //! [`FileUtils`](https://ruby-doc.org/stdlib-2.4.1/libdoc/fileutils/rdoc/FileUtils.html) //! module. //! //! The `cmd!` macro uses a simple proc-macro internally. It doesn't depend on //! helper libraries, so the fixed-cost impact on compile times is moderate. //! Compiling a trivial program with `cmd!("date +%Y-%m-%d")` takes one second. //! Equivalent program using only `std::process::Command` compiles in 0.25 //! seconds. //! //! To make IDEs infer correct types without expanding proc-macro, it is wrapped //! into a declarative macro which supplies type hints. #![deny(missing_debug_implementations)] #![deny(missing_docs)] #![deny(rust_2018_idioms)] mod error; use std::{ cell::RefCell, collections::HashMap, env::{self, current_dir, VarError}, ffi::{OsStr, OsString}, fmt, fs, io::{self, ErrorKind, Write}, mem, path::{Path, PathBuf}, process::{Command, ExitStatus, Output, Stdio}, sync::atomic::{AtomicUsize, Ordering}, }; pub use crate::error::{Error, Result}; #[doc(hidden)] pub use xshell_macros::__cmd; /// Constructs a [`Cmd`] from the given string. /// /// # Examples /// /// Basic: /// /// ```no_run /// # use xshell::{cmd, Shell}; /// let sh = Shell::new()?; /// cmd!(sh, "echo hello world").run()?; /// # Ok::<(), xshell::Error>(()) /// ``` /// /// Interpolation: /// /// ``` /// # use xshell::{cmd, Shell}; let sh = Shell::new()?; /// let greeting = "hello world"; /// let c = cmd!(sh, "echo {greeting}"); /// assert_eq!(c.to_string(), r#"echo "hello world""#); /// /// let c = cmd!(sh, "echo '{greeting}'"); /// assert_eq!(c.to_string(), r#"echo {greeting}"#); /// /// let c = cmd!(sh, "echo {greeting}!"); /// assert_eq!(c.to_string(), r#"echo "hello world!""#); /// /// let c = cmd!(sh, "echo 'spaces '{greeting}' around'"); /// assert_eq!(c.to_string(), r#"echo "spaces hello world around""#); /// /// # Ok::<(), xshell::Error>(()) /// ``` /// /// Splat interpolation: /// /// ``` /// # use xshell::{cmd, Shell}; let sh = Shell::new()?; /// let args = ["hello", "world"]; /// let c = cmd!(sh, "echo {args...}"); /// assert_eq!(c.to_string(), r#"echo hello world"#); /// /// let arg1: Option<&str> = Some("hello"); /// let arg2: Option<&str> = None; /// let c = cmd!(sh, "echo {arg1...} {arg2...}"); /// assert_eq!(c.to_string(), r#"echo hello"#); /// # Ok::<(), xshell::Error>(()) /// ``` #[macro_export] macro_rules! cmd { ($sh:expr, $cmd:literal) => {{ #[cfg(trick_rust_analyzer_into_highlighting_interpolated_bits)] format_args!($cmd); let f = |prog| $sh.cmd(prog); let cmd: $crate::Cmd = $crate::__cmd!(f $cmd); cmd }}; } /// A `Shell` is the main API entry point. /// /// Almost all of the crate's functionality is available as methods of the /// `Shell` object. /// /// `Shell` is a stateful object. It maintains a logical working directory and /// an environment map. They are independent from process's /// [`std::env::current_dir`] and [`std::env::var`], and only affect paths and /// commands passed to the [`Shell`]. /// /// /// By convention, variable holding the shell is named `sh`. /// /// # Example /// /// ```no_run /// use xshell::{cmd, Shell}; /// /// let sh = Shell::new()?; /// let _d = sh.push_dir("./target"); /// let cwd = sh.current_dir(); /// cmd!(sh, "echo current dir is {cwd}").run()?; /// /// let process_cwd = std::env::current_dir().unwrap(); /// assert_eq!(cwd, process_cwd.join("./target")); /// # Ok::<(), xshell::Error>(()) /// ``` #[derive(Debug)] pub struct Shell { cwd: RefCell<PathBuf>, env: RefCell<HashMap<OsString, OsString>>, } impl std::panic::UnwindSafe for Shell {} impl std::panic::RefUnwindSafe for Shell {} impl Shell { /// Creates a new [`Shell`]. /// /// Fails if [`std::env::current_dir`] returns an error. pub fn new() -> Result<Shell> { let cwd = current_dir().map_err(|err| Error::new_current_dir(err, None))?; let cwd = RefCell::new(cwd); let env = RefCell::new(HashMap::new()); Ok(Shell { cwd, env }) } // region:env /// Returns the working directory for this [`Shell`]. /// /// All relative paths are interpreted relative to this directory, rather /// than [`std::env::current_dir`]. #[doc(alias = "pwd")] pub fn current_dir(&self) -> PathBuf { self.cwd.borrow().clone() } /// Changes the working directory for this [`Shell`]. /// /// Note that this doesn't affect [`std::env::current_dir`]. #[doc(alias = "pwd")] pub fn change_dir<P: AsRef<Path>>(&self, dir: P) { self._change_dir(dir.as_ref()) } fn _change_dir(&self, dir: &Path) { let dir = self.path(dir); *self.cwd.borrow_mut() = dir; } /// Temporary changes the working directory of this [`Shell`]. /// /// Returns a RAII guard which reverts the working directory to the old /// value when dropped. /// /// Note that this doesn't affect [`std::env::current_dir`]. #[doc(alias = "pushd")] pub fn push_dir<P: AsRef<Path>>(&self, path: P) -> PushDir<'_> { self._push_dir(path.as_ref()) } fn _push_dir(&self, path: &Path) -> PushDir<'_> { let path = self.path(path); PushDir::new(self, path) } /// Fetches the environmental variable `key` for this [`Shell`]. /// /// Returns an error if the variable is not set, or set to a non-utf8 value. /// /// Environment of the [`Shell`] affects all commands spawned via this /// shell. pub fn var<K: AsRef<OsStr>>(&self, key: K) -> Result<String> { self._var(key.as_ref()) } fn _var(&self, key: &OsStr) -> Result<String> { match self._var_os(key) { Some(it) => it.into_string().map_err(VarError::NotUnicode), None => Err(VarError::NotPresent), } .map_err(|err| Error::new_var(err, key.to_os_string())) } /// Fetches the environmental variable `key` for this [`Shell`] as /// [`OsString`] Returns [`None`] if the variable is not set. /// /// Environment of the [`Shell`] affects all commands spawned via this /// shell. pub fn var_os<K: AsRef<OsStr>>(&self, key: K) -> Option<OsString> { self._var_os(key.as_ref()) } fn _var_os(&self, key: &OsStr) -> Option<OsString> { self.env.borrow().get(key).cloned().or_else(|| env::var_os(key)) } /// Sets the value of `key` environment variable for this [`Shell`] to /// `val`. /// /// Note that this doesn't affect [`std::env::var`]. pub fn set_var<K: AsRef<OsStr>, V: AsRef<OsStr>>(&self, key: K, val: V) { self._set_var(key.as_ref(), val.as_ref()) } fn _set_var(&self, key: &OsStr, val: &OsStr) { self.env.borrow_mut().insert(key.to_os_string(), val.to_os_string()); } /// Temporary sets the value of `key` environment variable for this /// [`Shell`] to `val`. /// /// Returns a RAII guard which restores the old environment when dropped. /// /// Note that this doesn't affect [`std::env::var`]. pub fn push_env<K: AsRef<OsStr>, V: AsRef<OsStr>>(&self, key: K, val: V) -> PushEnv<'_> { self._push_env(key.as_ref(), val.as_ref()) } fn _push_env(&self, key: &OsStr, val: &OsStr) -> PushEnv<'_> { PushEnv::new(self, key.to_os_string(), val.to_os_string()) } // endregion:env // region:fs /// Read the entire contents of a file into a string. #[doc(alias = "cat")] pub fn read_file<P: AsRef<Path>>(&self, path: P) -> Result<String> { self._read_file(path.as_ref()) } fn _read_file(&self, path: &Path) -> Result<String> { let path = self.path(path); fs::read_to_string(&path).map_err(|err| Error::new_read_file(err, path)) } /// Read the entire contents of a file into a vector of bytes. pub fn read_binary_file<P: AsRef<Path>>(&self, path: P) -> Result<Vec<u8>> { self._read_binary_file(path.as_ref()) } fn _read_binary_file(&self, path: &Path) -> Result<Vec<u8>> { let path = self.path(path); fs::read(&path).map_err(|err| Error::new_read_file(err, path)) } /// Returns a sorted list of paths directly contained in the directory at /// `path`. #[doc(alias = "ls")] pub fn read_dir<P: AsRef<Path>>(&self, path: P) -> Result<Vec<PathBuf>> { self._read_dir(path.as_ref()) } fn _read_dir(&self, path: &Path) -> Result<Vec<PathBuf>> { let path = self.path(path); let mut res = Vec::new(); || -> _ { for entry in fs::read_dir(&path)? { let entry = entry?; res.push(entry.path()) } Ok(()) }() .map_err(|err| Error::new_read_dir(err, path))?; res.sort(); Ok(res) } /// Write a slice as the entire contents of a file. /// /// This function will create the file and all intermediate directories if /// they don't exist. // TODO: probably want to make this an atomic rename write? pub fn write_file<P: AsRef<Path>, C: AsRef<[u8]>>(&self, path: P, contents: C) -> Result<()> { self._write_file(path.as_ref(), contents.as_ref()) } fn _write_file(&self, path: &Path, contents: &[u8]) -> Result<()> { let path = self.path(path); if let Some(p) = path.parent() { self.create_dir(p)?; } fs::write(&path, contents).map_err(|err| Error::new_write_file(err, path)) } /// Copies `src` into `dst`. /// /// `src` must be a file, but `dst` need not be. If `dst` is an existing /// directory, `src` will be copied into a file in the `dst` directory whose /// name is same as that of `src`. /// /// Otherwise, `dst` is a file or does not exist, and `src` will be copied into /// it. #[doc(alias = "cp")] pub fn copy_file<S: AsRef<Path>, D: AsRef<Path>>(&self, src: S, dst: D) -> Result<()> { self._copy_file(src.as_ref(), dst.as_ref()) } fn _copy_file(&self, src: &Path, dst: &Path) -> Result<()> { let src = self.path(src); let dst = self.path(dst); let dst = dst.as_path(); let mut _tmp; let mut dst = dst; if dst.is_dir() { if let Some(file_name) = src.file_name() { _tmp = dst.join(file_name); dst = &_tmp; } } std::fs::copy(&src, dst) .map_err(|err| Error::new_copy_file(err, src.to_path_buf(), dst.to_path_buf()))?; Ok(()) } /// Hardlinks `src` to `dst`. #[doc(alias = "ln")] pub fn hard_link<S: AsRef<Path>, D: AsRef<Path>>(&self, src: S, dst: D) -> Result<()> { self._hard_link(src.as_ref(), dst.as_ref()) } fn _hard_link(&self, src: &Path, dst: &Path) -> Result<()> { let src = self.path(src); let dst = self.path(dst); fs::hard_link(&src, &dst).map_err(|err| Error::new_hard_link(err, src, dst)) } /// Creates the specified directory. /// /// All intermediate directories will also be created. #[doc(alias("mkdir_p", "mkdir"))] pub fn create_dir<P: AsRef<Path>>(&self, path: P) -> Result<PathBuf> { self._create_dir(path.as_ref()) } fn _create_dir(&self, path: &Path) -> Result<PathBuf> { let path = self.path(path); match fs::create_dir_all(&path) { Ok(()) => Ok(path), Err(err) => Err(Error::new_create_dir(err, path)), } } /// Creates an empty named world-readable temporary directory. /// /// Returns a [`TempDir`] RAII guard with the path to the directory. When /// dropped, the temporary directory and all of its contents will be /// removed. /// /// Note that this is an **insecure method** -- any other process on the /// system will be able to read the data. #[doc(alias = "mktemp")] pub fn create_temp_dir(&self) -> Result<TempDir> { let base = std::env::temp_dir(); self.create_dir(&base)?; static CNT: AtomicUsize = AtomicUsize::new(0); let mut n_try = 0u32; loop { let cnt = CNT.fetch_add(1, Ordering::Relaxed); let path = base.join(format!("xshell-tmp-dir-{}", cnt)); match fs::create_dir(&path) { Ok(()) => return Ok(TempDir { path }), Err(err) if n_try == 1024 => return Err(Error::new_create_dir(err, path)), Err(_) => n_try += 1, } } } /// Removes the file or directory at the given path. #[doc(alias("rm_rf", "rm"))] pub fn remove_path<P: AsRef<Path>>(&self, path: P) -> Result<()> { self._remove_path(path.as_ref()) } fn _remove_path(&self, path: &Path) -> Result<(), Error> { let path = self.path(path); match path.metadata() { Ok(meta) => if meta.is_dir() { remove_dir_all(&path) } else { fs::remove_file(&path) } .map_err(|err| Error::new_remove_path(err, path)), Err(err) if err.kind() == ErrorKind::NotFound => Ok(()), Err(err) => Err(Error::new_remove_path(err, path)), } } /// Returns whether a file or directory exists at the given path. #[doc(alias("stat"))] pub fn path_exists<P: AsRef<Path>>(&self, path: P) -> bool { self.path(path.as_ref()).exists() } // endregion:fs /// Creates a new [`Cmd`] that executes the given `program`. pub fn cmd<P: AsRef<Path>>(&self, program: P) -> Cmd<'_> { // TODO: path lookup? Cmd::new(self, program.as_ref()) } fn path(&self, p: &Path) -> PathBuf { let cd = self.cwd.borrow(); cd.join(p) } } /// RAII guard returned from [`Shell::push_dir`]. /// /// Dropping `PushDir` restores the working directory of the [`Shell`] to the /// old value. #[derive(Debug)] #[must_use] pub struct PushDir<'a> { old_cwd: PathBuf, shell: &'a Shell, } impl<'a> PushDir<'a> { fn new(shell: &'a Shell, path: PathBuf) -> PushDir<'a> { PushDir { old_cwd: mem::replace(&mut *shell.cwd.borrow_mut(), path), shell } } } impl Drop for PushDir<'_> { fn drop(&mut self) { mem::swap(&mut *self.shell.cwd.borrow_mut(), &mut self.old_cwd) } } /// RAII guard returned from [`Shell::push_env`]. /// /// Dropping `PushEnv` restores the old value of the environmental variable. #[derive(Debug)] #[must_use] pub struct PushEnv<'a> { key: OsString, old_value: Option<OsString>, shell: &'a Shell, } impl<'a> PushEnv<'a> { fn new(shell: &'a Shell, key: OsString, val: OsString) -> PushEnv<'a> { let old_value = shell.env.borrow_mut().insert(key.clone(), val); PushEnv { shell, key, old_value } } } impl Drop for PushEnv<'_> { fn drop(&mut self) { let mut env = self.shell.env.borrow_mut(); let key = mem::take(&mut self.key); match self.old_value.take() { Some(value) => { env.insert(key, value); } None => { env.remove(&key); } } } } /// A builder object for constructing a subprocess. /// /// A [`Cmd`] is usually created with the [`cmd!`] macro. The command exists /// within a context of a [`Shell`] and uses its working directory and /// environment. /// /// # Example /// /// ```no_run /// use xshell::{Shell, cmd}; /// /// let sh = Shell::new()?; /// /// let branch = "main"; /// let cmd = cmd!(sh, "git switch {branch}").quiet().run()?; /// # Ok::<(), xshell::Error>(()) /// ``` #[derive(Debug)] #[must_use] pub struct Cmd<'a> { shell: &'a Shell, data: CmdData, } #[derive(Debug, Default, Clone)] struct CmdData { prog: PathBuf, args: Vec<OsString>, env_changes: Vec<EnvChange>, ignore_status: bool, quiet: bool, secret: bool, stdin_contents: Option<Vec<u8>>, ignore_stdout: bool, ignore_stderr: bool, } // We just store a list of functions to call on the `Command` — the alternative // would require mirroring the logic that `std::process::Command` (or rather // `sys_common::CommandEnvs`) uses, which is moderately complex, involves // special-casing `PATH`, and plausibly could change. #[derive(Debug, Clone)] enum EnvChange { Set(OsString, OsString), Remove(OsString), Clear, } impl fmt::Display for Cmd<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Display::fmt(&self.data, f) } } impl fmt::Display for CmdData { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { if self.secret { return write!(f, "<secret>"); } write!(f, "{}", self.prog.display())?; for arg in &self.args { // TODO: this is potentially not copy-paste safe. let arg = arg.to_string_lossy(); if arg.chars().any(|it| it.is_ascii_whitespace()) { write!(f, " \"{}\"", arg.escape_default())? } else { write!(f, " {}", arg)? }; } Ok(()) } } impl From<Cmd<'_>> for Command { fn from(cmd: Cmd<'_>) -> Command { cmd.to_command() } } impl<'a> Cmd<'a> { fn new(shell: &'a Shell, prog: &Path) -> Cmd<'a> { let mut data = CmdData::default(); data.prog = prog.to_path_buf(); Cmd { shell, data } } // region:builder /// Adds an argument to this commands. pub fn arg<P: AsRef<OsStr>>(mut self, arg: P) -> Cmd<'a> { self._arg(arg.as_ref()); self } fn _arg(&mut self, arg: &OsStr) { self.data.args.push(arg.to_owned()) } /// Adds all of the arguments to this command. pub fn args<I>(mut self, args: I) -> Cmd<'a> where I: IntoIterator, I::Item: AsRef<OsStr>, { args.into_iter().for_each(|it| self._arg(it.as_ref())); self } #[doc(hidden)] pub fn __extend_arg<P: AsRef<OsStr>>(mut self, arg_fragment: P) -> Cmd<'a> { self.___extend_arg(arg_fragment.as_ref()); self } fn ___extend_arg(&mut self, arg_fragment: &OsStr) { match self.data.args.last_mut() { Some(last_arg) => last_arg.push(arg_fragment), None => { let mut prog = mem::take(&mut self.data.prog).into_os_string(); prog.push(arg_fragment); self.data.prog = prog.into(); } } } /// Overrides the value of the environmental variable for this command. pub fn env<K: AsRef<OsStr>, V: AsRef<OsStr>>(mut self, key: K, val: V) -> Cmd<'a> { self._env_set(key.as_ref(), val.as_ref()); self } fn _env_set(&mut self, key: &OsStr, val: &OsStr) { self.data.env_changes.push(EnvChange::Set(key.to_owned(), val.to_owned())); } /// Overrides the values of specified environmental variables for this /// command. pub fn envs<I, K, V>(mut self, vars: I) -> Cmd<'a> where I: IntoIterator<Item = (K, V)>, K: AsRef<OsStr>, V: AsRef<OsStr>, { vars.into_iter().for_each(|(k, v)| self._env_set(k.as_ref(), v.as_ref())); self } /// Removes the environment variable from this command. pub fn env_remove<K: AsRef<OsStr>>(mut self, key: K) -> Cmd<'a> { self._env_remove(key.as_ref()); self } fn _env_remove(&mut self, key: &OsStr) { self.data.env_changes.push(EnvChange::Remove(key.to_owned())); } /// Removes all of the environment variables from this command. pub fn env_clear(mut self) -> Cmd<'a> { self.data.env_changes.push(EnvChange::Clear); self } /// Don't return an error if command the command exits with non-zero status. /// /// By default, non-zero exit status is considered an error. pub fn ignore_status(mut self) -> Cmd<'a> { self.set_ignore_status(true); self } /// Controls whether non-zero exit status is considered an error. pub fn set_ignore_status(&mut self, yes: bool) { self.data.ignore_status = yes; } /// Don't echo the command itself to stderr. /// /// By default, the command itself will be printed to stderr when executed via [`Cmd::run`]. pub fn quiet(mut self) -> Cmd<'a> { self.set_quiet(true); self } /// Controls whether the command itself is printed to stderr. pub fn set_quiet(&mut self, yes: bool) { self.data.quiet = yes; } /// Marks the command as secret. /// /// If a command is secret, it echoes `<secret>` instead of the program and /// its arguments, even in error messages. pub fn secret(mut self) -> Cmd<'a> { self.set_secret(true); self } /// Controls whether the command is secret. pub fn set_secret(&mut self, yes: bool) { self.data.secret = yes; } /// Pass the given slice to the standard input of the spawned process. pub fn stdin(mut self, stdin: impl AsRef<[u8]>) -> Cmd<'a> { self._stdin(stdin.as_ref()); self } fn _stdin(&mut self, stdin: &[u8]) { self.data.stdin_contents = Some(stdin.to_vec()); } /// Ignores the standard output stream of the process. /// /// This is equivalent to redirecting stdout to `/dev/null`. By default, the /// stdout is inherited or captured. pub fn ignore_stdout(mut self) -> Cmd<'a> { self.set_ignore_stdout(true); self } /// Controls whether the standard output is ignored. pub fn set_ignore_stdout(&mut self, yes: bool) { self.data.ignore_stdout = yes; } /// Ignores the standard output stream of the process. /// /// This is equivalent redirecting stderr to `/dev/null`. By default, the /// stderr is inherited or captured. pub fn ignore_stderr(mut self) -> Cmd<'a> { self.set_ignore_stderr(true); self } /// Controls whether the standard error is ignored. pub fn set_ignore_stderr(&mut self, yes: bool) { self.data.ignore_stderr = yes; } // endregion:builder // region:running /// Runs the command. /// /// By default the command itself is echoed to stderr, its standard streams /// are inherited, and non-zero return code is considered an error. These /// behaviors can be overridden by using various builder methods of the [`Cmd`]. pub fn run(&self) -> Result<()> { if !self.data.quiet { eprintln!("$ {}", self); } self.output_impl(false, false).map(|_| ()) } /// Run the command and return its stdout as a string. pub fn read(&self) -> Result<String> { self.read_stream(false) } /// Run the command and return its stderr as a string. pub fn read_stderr(&self) -> Result<String> { self.read_stream(true) } /// Run the command and return its output. pub fn output(&self) -> Result<Output> { self.output_impl(true, true) } // endregion:running fn read_stream(&self, read_stderr: bool) -> Result<String> { let read_stdout = !read_stderr; let output = self.output_impl(read_stdout, read_stderr)?; self.check_status(output.status)?; let stream = if read_stderr { output.stderr } else { output.stdout }; let mut stream = String::from_utf8(stream).map_err(|err| Error::new_cmd_utf8(self, err))?; if stream.ends_with('\n') { stream.pop(); } if stream.ends_with('\r') { stream.pop(); } Ok(stream) } fn output_impl(&self, read_stdout: bool, read_stderr: bool) -> Result<Output> { let mut child = { let mut command = self.to_command(); if !self.data.ignore_stdout { command.stdout(if read_stdout { Stdio::piped() } else { Stdio::inherit() }); } if !self.data.ignore_stderr { command.stderr(if read_stderr { Stdio::piped() } else { Stdio::inherit() }); } command.stdin(match &self.data.stdin_contents { Some(_) => Stdio::piped(), None => Stdio::null(), }); command.spawn().map_err(|err| { // Try to determine whether the command failed because the current // directory does not exist. Return an appropriate error in such a // case. if matches!(err.kind(), io::ErrorKind::NotFound) { let cwd = self.shell.cwd.borrow(); if let Err(err) = cwd.metadata() { return Error::new_current_dir(err, Some(cwd.clone())); } } Error::new_cmd_io(self, err) })? }; let mut io_thread = None; if let Some(stdin_contents) = self.data.stdin_contents.clone() { let mut stdin = child.stdin.take().unwrap(); io_thread = Some(std::thread::spawn(move || { stdin.write_all(&stdin_contents)?; stdin.flush() })); } let out_res = child.wait_with_output(); let err_res = io_thread.map(|it| it.join().unwrap()); let output = out_res.map_err(|err| Error::new_cmd_io(self, err))?; if let Some(err_res) = err_res { err_res.map_err(|err| Error::new_cmd_stdin(self, err))?; } self.check_status(output.status)?; Ok(output) } fn to_command(&self) -> Command { let mut res = Command::new(&self.data.prog); res.current_dir(self.shell.current_dir()); res.args(&self.data.args); for (key, val) in &*self.shell.env.borrow() { res.env(key, val); } for change in &self.data.env_changes { match change { EnvChange::Clear => res.env_clear(), EnvChange::Remove(key) => res.env_remove(key), EnvChange::Set(key, val) => res.env(key, val), }; } if self.data.ignore_stdout { res.stdout(Stdio::null()); } if self.data.ignore_stderr { res.stderr(Stdio::null()); } res } fn check_status(&self, status: ExitStatus) -> Result<()> { if status.success() || self.data.ignore_status { return Ok(()); } Err(Error::new_cmd_status(self, status)) } } /// A temporary directory. /// /// This is a RAII object which will remove the underlying temporary directory /// when dropped. #[derive(Debug)] #[must_use] pub struct TempDir { path: PathBuf, } impl TempDir { /// Returns the path to the underlying temporary directory. pub fn path(&self) -> &Path { &self.path } } impl Drop for TempDir { fn drop(&mut self) { let _ = remove_dir_all(&self.path); } } #[cfg(not(windows))] fn remove_dir_all(path: &Path) -> io::Result<()> { std::fs::remove_dir_all(path) } #[cfg(windows)] fn remove_dir_all(path: &Path) -> io::Result<()> { for _ in 0..99 { if fs::remove_dir_all(path).is_ok() { return Ok(()); } std::thread::sleep(std::time::Duration::from_millis(10)) } fs::remove_dir_all(path) }
// Copyright 2018 Grove Enterprises LLC // // 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::cell::RefCell; use std::rc::Rc; use std::sync::Arc; extern crate arrow; extern crate datafusion; use arrow::array::{BinaryArray, Float64Array}; use arrow::datatypes::{DataType, Field, Schema}; use datafusion::execution::context::ExecutionContext; use datafusion::execution::datasource::CsvDataSource; /// This example demonstrates executing a simple query against an Arrow data source and fetching results fn main() { // create local execution context let mut ctx = ExecutionContext::new(); // define schema for data source (csv file) let schema = Arc::new(Schema::new(vec![ Field::new("city", DataType::Utf8, false), Field::new("lat", DataType::Float64, false), Field::new("lng", DataType::Float64, false), ])); // register csv file with the execution context let csv_datasource = CsvDataSource::new("test/data/uk_cities.csv", schema.clone(), 1024); ctx.register_datasource("cities", Rc::new(RefCell::new(csv_datasource))); // simple projection and selection let sql = "SELECT city, lat, lng FROM cities WHERE lat > 51.0 AND lat < 53"; // execute the query let relation = ctx.sql(&sql).unwrap(); // display the relation let mut results = relation.borrow_mut(); while let Some(batch) = results.next().unwrap() { println!( "RecordBatch has {} rows and {} columns", batch.num_rows(), batch.num_columns() ); let city = batch .column(0) .as_any() .downcast_ref::<BinaryArray>() .unwrap(); let lat = batch .column(1) .as_any() .downcast_ref::<Float64Array>() .unwrap(); let lng = batch .column(2) .as_any() .downcast_ref::<Float64Array>() .unwrap(); for i in 0..batch.num_rows() { let city_name: String = String::from_utf8(city.value(i).to_vec()).unwrap(); println!( "City: {}, Latitude: {}, Longitude: {}", city_name, lat.value(i), lng.value(i), ); } } }
use super::Topic; use super::FirstUpper; pub struct ListStrings; impl FirstUpper for String { fn first_upper(&self) -> String { let (first, last) = self.split_at(1); first.to_uppercase() + last } } impl Topic for ListStrings { fn run_example(&self, n: u8) { println!("Topic: {}, example {}", self.describe().first_upper(), n); match n { 1 => { println!("Hello, world!"); }, _ => { println!("Example not known or not implemented!"); } }; } fn describe(&self) -> String { "list-strings".to_string() } } // // fn first_upper(name: String) -> String { // // let (first, last) = name.split_at(1); // first.to_uppercase() + last // } // // #[test] // fn should_raise_first_char_to_upper() { // // let result = first_upper("yo".to_string()); // assert_eq!(result, "Yo"); // }
use utilities::prelude::*; use super::pipeline::PipelineType; use crate::prelude::*; use crate::impl_vk_handle; use std::sync::{Arc, Mutex}; pub struct QueryEnable { pub query_flags: VkQueryControlFlagBits, pub pipeline_statistics: VkQueryPipelineStatisticFlagBits, } pub struct CommandBufferBuilder { buffer_level: VkCommandBufferLevel, } impl CommandBufferBuilder { pub fn build( self, device: Arc<Device>, command_pool: &Arc<CommandPool>, ) -> VerboseResult<Arc<CommandBuffer>> { let command_buffer_ci = VkCommandBufferAllocateInfo::new(command_pool.vk_handle(), self.buffer_level, 1); let command_buffer = device.allocate_command_buffers(&command_buffer_ci)?[0]; Ok(Arc::new(CommandBuffer { device, pool: command_pool.clone(), pipeline: Mutex::new(None), buffer: command_buffer, })) } } #[derive(Debug)] pub struct CommandBuffer { device: Arc<Device>, pool: Arc<CommandPool>, pipeline: Mutex<Option<Arc<Pipeline>>>, buffer: VkCommandBuffer, } impl_vk_handle!(CommandBuffer, VkCommandBuffer, buffer); impl CommandBuffer { pub(crate) fn primary() -> CommandBufferBuilder { CommandBufferBuilder { buffer_level: VK_COMMAND_BUFFER_LEVEL_PRIMARY, } } pub(crate) fn secondary() -> CommandBufferBuilder { CommandBufferBuilder { buffer_level: VK_COMMAND_BUFFER_LEVEL_SECONDARY, } } pub fn reset(&self, flags: impl Into<VkCommandBufferResetFlagBits>) -> VerboseResult<()> { self.device.reset_command_buffer(self.buffer, flags) } pub fn begin(&self, begin_info: VkCommandBufferBeginInfo) -> VerboseResult<()> { self.device.begin_command_buffer(self.buffer, &begin_info) } pub fn end(&self) -> VerboseResult<()> { self.device.end_command_buffer(self.buffer) } pub fn pipeline_barrier( &self, src_stage_mask: impl Into<VkPipelineStageFlagBits>, dst_stage_mask: impl Into<VkPipelineStageFlagBits>, dependency_flags: impl Into<VkDependencyFlagBits>, memory_barriers: &[VkMemoryBarrier], buffer_memory_barriers: &[VkBufferMemoryBarrier], image_memory_barriers: &[VkImageMemoryBarrier], ) { self.device.cmd_pipeline_barrier( self.buffer, src_stage_mask, dst_stage_mask, dependency_flags, memory_barriers, buffer_memory_barriers, image_memory_barriers, ) } pub fn memory_barrier( &self, src_access_mask: impl Into<VkAccessFlagBits>, src_stage: VkPipelineStageFlags, dst_access_mask: impl Into<VkAccessFlagBits>, dst_stage: VkPipelineStageFlags, ) { self.pipeline_barrier( src_stage, dst_stage, 0, &[VkMemoryBarrier::new(src_access_mask, dst_access_mask)], &[], &[], ); } pub fn buffer_barrier<T>( &self, buffer: &Arc<Buffer<T>>, src_access_mask: impl Into<VkAccessFlagBits>, src_stage: impl Into<VkPipelineStageFlagBits>, dst_access_mask: impl Into<VkAccessFlagBits>, dst_stage: impl Into<VkPipelineStageFlagBits>, ) { self.pipeline_barrier( src_stage, dst_stage, 0, &[], &[VkBufferMemoryBarrier::new( src_access_mask, dst_access_mask, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, buffer.vk_handle(), 0, buffer.byte_size(), )], &[], ); } pub fn image_barrier( &self, image: &Arc<Image>, old_image_layout: VkImageLayout, src_stage: impl Into<VkPipelineStageFlagBits>, new_image_layout: VkImageLayout, dst_stage: impl Into<VkPipelineStageFlagBits>, ) -> VerboseResult<()> { let src_access_mask = Image::src_layout_to_access(old_image_layout); let dst_access_mask = Image::dst_layout_to_access(new_image_layout); self.pipeline_barrier( src_stage, dst_stage, 0, &[], &[], &[VkImageMemoryBarrier::new( src_access_mask, dst_access_mask, old_image_layout, new_image_layout, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, image.vk_handle(), image.full_resource_range(), )], ); image.set_image_layout(new_image_layout) } pub fn begin_render_pass( &self, renderpass_begin_info: VkRenderPassBeginInfo, subpass_contents: VkSubpassContents, ) { self.device .cmd_begin_render_pass(self.buffer, &renderpass_begin_info, subpass_contents); } pub fn begin_render_pass_full( &self, render_pass: &Arc<RenderPass>, framebuffer: &Arc<Framebuffer>, clear_values: &[VkClearValue], subpass_contents: VkSubpassContents, ) { let render_pass_begin_info = VkRenderPassBeginInfo::new( render_pass.vk_handle(), framebuffer.vk_handle(), VkRect2D { offset: VkOffset2D { x: 0, y: 0 }, extent: VkExtent2D { width: framebuffer.width(), height: framebuffer.height(), }, }, clear_values, ); self.device .cmd_begin_render_pass(self.buffer, &render_pass_begin_info, subpass_contents); } pub fn next_subpass(&self, subpass_contents: VkSubpassContents) { self.device.cmd_next_subpass(self.buffer, subpass_contents); } pub fn end_render_pass(&self) { self.device.cmd_end_render_pass(self.buffer); } pub fn bind_pipeline(&self, pipeline: &Arc<Pipeline>) -> VerboseResult<()> { match pipeline.pipeline_type() { PipelineType::None => create_error!("PipelineType was None"), PipelineType::Graphics => self.device.cmd_bind_pipeline( self.buffer, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline.vk_handle(), ), PipelineType::Compute => self.device.cmd_bind_pipeline( self.buffer, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline.vk_handle(), ), PipelineType::RayTracing => self.device.cmd_bind_pipeline( self.buffer, VK_PIPELINE_BIND_POINT_RAY_TRACING_NV, pipeline.vk_handle(), ), } *self.pipeline.lock()? = Some(pipeline.clone()); Ok(()) } pub fn execute_commands(&self, command_buffers: &[&impl VkHandle<VkCommandBuffer>]) { let buffers: Vec<VkCommandBuffer> = command_buffers.iter().map(|cb| cb.vk_handle()).collect(); self.device .cmd_execute_commands(self.buffer, buffers.as_slice()); } pub fn bind_descriptor_sets_minimal( &self, descriptor_sets: &[&dyn VkHandle<VkDescriptorSet>], ) -> VerboseResult<()> { let (pipeline_bind_point, vk_layout) = { let opt_borrow = self.pipeline.lock()?; let pipeline = match opt_borrow.as_ref() { Some(pipeline) => pipeline, None => create_error!("no pipeline in command buffer"), }; let pipe_type = match pipeline.pipeline_type() { PipelineType::None => create_error!("PipelineType was None"), PipelineType::Graphics => VK_PIPELINE_BIND_POINT_GRAPHICS, PipelineType::Compute => VK_PIPELINE_BIND_POINT_COMPUTE, PipelineType::RayTracing => VK_PIPELINE_BIND_POINT_RAY_TRACING_NV, }; (pipe_type, pipeline.pipeline_layout().vk_handle()) }; let vk_descriptor_sets: Vec<VkDescriptorSet> = descriptor_sets.iter().map(|ds| ds.vk_handle()).collect(); self.device.cmd_bind_descriptor_sets( self.buffer, pipeline_bind_point, vk_layout, 0, vk_descriptor_sets.as_slice(), &[], ); Ok(()) } pub fn bind_vertex_buffer<T>(&self, buffer: &Arc<Buffer<T>>) { self.device .cmd_bind_vertex_buffers(self.buffer, 0, &[buffer.vk_handle()], &[0]); } pub fn bind_vertex_buffers_minimal<T>(&self, buffers: &[&Arc<Buffer<T>>]) { let vk_buffers: Vec<VkBuffer> = buffers.iter().map(|b| b.vk_handle()).collect(); let offsets = vec![0; vk_buffers.len()]; self.device.cmd_bind_vertex_buffers( self.buffer, 0, vk_buffers.as_slice(), offsets.as_slice(), ); } pub fn bind_index_buffer<T>( &self, buffer: &Arc<Buffer<T>>, offset: VkDeviceSize, index_type: VkIndexType, ) { self.device .cmd_bind_index_buffer(self.buffer, buffer.vk_handle(), offset, index_type); } pub fn set_viewport(&self, viewports: &[VkViewport]) { self.device.cmd_set_viewport(self.buffer, 0, viewports); } pub fn set_scissor(&self, scissors: &[VkRect2D]) { self.device.cmd_set_scissor(self.buffer, 0, scissors); } pub fn draw( &self, vertex_count: u32, instance_count: u32, first_vertex: u32, first_instance: u32, ) { self.device.cmd_draw( self.buffer, vertex_count, instance_count, first_vertex, first_instance, ); } pub fn draw_complete_single_instance(&self, vertex_count: u32) { self.device.cmd_draw(self.buffer, vertex_count, 1, 0, 0); } pub fn draw_indexed( &self, index_count: u32, instance_count: u32, first_index: u32, vertex_offset: i32, first_instance: u32, ) { self.device.cmd_draw_indexed( self.buffer, index_count, instance_count, first_index, vertex_offset, first_instance, ); } pub fn draw_indexed_complete_single_instance(&self, index_count: u32) { self.device .cmd_draw_indexed(self.buffer, index_count, 1, 0, 0, 0); } pub fn push_constants<U>( &self, stage_flags: impl Into<VkShaderStageFlagBits>, data: &U, ) -> VerboseResult<()> { let opt_borrow = self.pipeline.lock()?; let pipeline = match opt_borrow.as_ref() { Some(pipeline) => pipeline, None => create_error!("no pipeline in command buffer"), }; let layout = pipeline.pipeline_layout(); self.device .cmd_push_constants(self.buffer, layout.vk_handle(), stage_flags, 0, data); Ok(()) } pub fn set_image_layout( &self, image: &Image, new_image_layout: VkImageLayout, subresource_range: VkImageSubresourceRange, ) -> VerboseResult<()> { let src_access = Image::src_layout_to_access(image.image_layout()?); let dst_access = Image::dst_layout_to_access(new_image_layout); self.pipeline_barrier( Self::access_to_stage(src_access), Self::access_to_stage(dst_access), 0, &[], &[], &[VkImageMemoryBarrier::new( src_access, dst_access, image.image_layout()?, new_image_layout, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, image.vk_handle(), subresource_range, )], ); image.set_image_layout(new_image_layout) } pub fn set_full_image_layout( &self, image: &Arc<Image>, new_image_layout: VkImageLayout, ) -> VerboseResult<()> { let src_access = Image::src_layout_to_access(image.image_layout()?); let dst_access = Image::dst_layout_to_access(new_image_layout); self.pipeline_barrier( Self::access_to_stage(src_access), Self::access_to_stage(dst_access), 0, &[], &[], &[VkImageMemoryBarrier::new( src_access, dst_access, image.image_layout()?, new_image_layout, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED, image.vk_handle(), image.full_resource_range(), )], ); image.set_image_layout(new_image_layout) } pub fn access_to_stage(access_mask: impl Into<VkAccessFlagBits>) -> VkPipelineStageFlags { let access_mask = access_mask.into(); if access_mask == 0 { VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT } else if access_mask == VK_ACCESS_HOST_WRITE_BIT { VK_PIPELINE_STAGE_HOST_BIT } else if access_mask == VK_ACCESS_TRANSFER_WRITE_BIT || access_mask == VK_ACCESS_TRANSFER_READ_BIT { VK_PIPELINE_STAGE_TRANSFER_BIT } else if access_mask == VK_ACCESS_SHADER_READ_BIT { VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT } else if access_mask == VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT { VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT } else if access_mask == VK_ACCESS_MEMORY_READ_BIT { VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT } else if access_mask == VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT { VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT } else if access_mask == VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT | VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT { VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT } else { unimplemented!("access mask not supported {:?}", access_mask) } } // TODO: pub fn set_line_width(&self) { unimplemented!(); } pub fn set_depth_bias(&self) { unimplemented!(); } pub fn set_blend_constants(&self) { unimplemented!(); } pub fn ste_depth_bounds(&self) { unimplemented!(); } pub fn set_stencil_compare_mask(&self) { unimplemented!(); } pub fn set_stencil_write_mask(&self) { unimplemented!(); } pub fn set_stencil_reference(&self) { unimplemented!(); } pub fn draw_indirect(&self) { unimplemented!(); } pub fn draw_indexed_indirect(&self) { unimplemented!(); } pub fn dispatch(&self, x: u32, y: u32, z: u32) { self.device.cmd_dispatch(self.buffer, x, y, z); } pub fn dispatch_indirect(&self) { unimplemented!(); } pub fn copy_buffer<T, U>( &self, src_buffer: &Buffer<T>, dst_buffer: &Buffer<U>, regions: &[VkBufferCopy], ) { self.device.cmd_copy_buffer( self.buffer, src_buffer.vk_handle(), dst_buffer.vk_handle(), regions, ); } pub fn copy_image( &self, src_image: &Arc<Image>, dst_image: &Arc<Image>, src_layout: VkImageLayout, dst_layout: VkImageLayout, regions: &[VkImageCopy], ) { self.device.cmd_copy_image( self.buffer, src_image.vk_handle(), src_layout, dst_image.vk_handle(), dst_layout, regions, ); } pub fn blit_complete( &self, src_image: &Arc<Image>, dst_image: &Arc<Image>, filter: VkFilter, ) -> VerboseResult<()> { let image_blit = VkImageBlit { srcSubresource: src_image.full_resource_layers(), srcOffsets: [ VkOffset3D { x: 0, y: 0, z: 0 }, VkOffset3D { x: src_image.width() as i32, y: src_image.height() as i32, z: 1, }, ], dstSubresource: dst_image.full_resource_layers(), dstOffsets: [ VkOffset3D { x: 0, y: 0, z: 0 }, VkOffset3D { x: dst_image.width() as i32, y: dst_image.height() as i32, z: 1, }, ], }; self.blit_image( src_image, dst_image, src_image.image_layout()?, dst_image.image_layout()?, &[image_blit], filter, ); Ok(()) } pub fn blit_image( &self, src_image: &Arc<Image>, dst_image: &Arc<Image>, src_layout: VkImageLayout, dst_layout: VkImageLayout, regions: &[VkImageBlit], filter: VkFilter, ) { self.device.cmd_blit_image( self.buffer, src_image.vk_handle(), src_layout, dst_image.vk_handle(), dst_layout, regions, filter, ); } pub fn copy_buffer_to_image<T>( &self, src_buffer: &Arc<Buffer<T>>, dst_image: &Arc<Image>, image_layout: VkImageLayout, regions: &[VkBufferImageCopy], ) { self.device.cmd_copy_buffer_to_image( self.buffer, src_buffer.vk_handle(), dst_image.vk_handle(), image_layout, regions, ); } pub fn copy_image_to_buffer<T>( &self, src_image: &Arc<Image>, image_layout: VkImageLayout, dst_buffer: &Arc<Buffer<T>>, regions: &[VkBufferImageCopy], ) { self.device.cmd_copy_image_to_buffer( self.buffer, src_image.vk_handle(), image_layout, dst_buffer.vk_handle(), regions, ) } pub fn update_buffer(&self) { unimplemented!(); } pub fn fill_buffer(&self) { unimplemented!(); } pub fn clear_color_image( &self, image: &Arc<Image>, clear_color: VkClearColorValue, ) -> VerboseResult<()> { self.device.cmd_clear_color_image( self.buffer, image.vk_handle(), image.image_layout()?, clear_color, &[image.full_resource_range()], ); Ok(()) } pub fn clear_depth_stencil_image(&self) { unimplemented!(); } pub fn clear_attachments(&self) { unimplemented!(); } pub fn resolve_image(&self) { unimplemented!(); } pub fn set_event(&self) { unimplemented!(); } pub fn reset_event(&self) { unimplemented!(); } pub fn wait_events(&self) { unimplemented!(); } pub fn begin_query(&self) { unimplemented!(); } pub fn end_query(&self) { unimplemented!(); } pub fn reset_query_pool(&self) { unimplemented!(); } pub fn write_timestamp( &self, query_pool: &Arc<QueryPool>, query: u32, pipeline_stage: impl Into<VkPipelineStageFlagBits>, ) { self.device .cmd_write_timestamp(self.buffer, pipeline_stage, query_pool.vk_handle(), query); } pub fn build_acceleration_structure<T>( &self, info: &VkAccelerationStructureInfoNV, instance_data: &Option<Arc<Buffer<VkGeometryInstanceNV>>>, dst: &AccelerationStructure, src: Option<&AccelerationStructure>, scratch: &Arc<Buffer<T>>, ) { self.device.cmd_build_acceleration_structure( self.buffer, info, match instance_data { Some(instance) => instance.vk_handle(), None => VkBuffer::NULL_HANDLE, }, 0, src.is_some(), dst.vk_handle(), match src { Some(src) => src.vk_handle(), None => VkAccelerationStructureNV::NULL_HANDLE, }, scratch.vk_handle(), 0, ) } pub fn copy_acceleration_structure( &self, dst: &Arc<AccelerationStructure>, src: &Arc<AccelerationStructure>, mode: VkCopyAccelerationStructureModeNV, ) { self.device.cmd_copy_acceleration_structure( self.buffer, dst.vk_handle(), src.vk_handle(), mode, ) } pub fn write_acceleration_structure_properties( &self, acceleration_structures: &[&Arc<AccelerationStructure>], query_type: VkQueryType, query_pool: &Arc<QueryPool>, first_query: u32, ) { let vk_handles: Vec<VkAccelerationStructureNV> = acceleration_structures .iter() .map(|a| a.vk_handle()) .collect(); self.device.cmd_write_acceleration_structure_properties( self.buffer, &vk_handles, query_type, query_pool.vk_handle(), first_query, ) } // TODO: callable shader binding !?!?!? pub fn trace_rays_sbt(&self, sbt: &ShaderBindingTable, width: u32, height: u32, depth: u32) { self.device.cmd_trace_rays( self.buffer, sbt.sbt_buffer().vk_handle(), sbt.ray_gen_offset(), sbt.sbt_buffer().vk_handle(), sbt.miss_offset(), sbt.miss_stride(), sbt.sbt_buffer().vk_handle(), sbt.hit_group_offset(), sbt.hit_group_stride(), VkBuffer::NULL_HANDLE, 0, 0, width, height, depth, ) } pub fn trace_rays<T, U, V, W>( &self, raygen_shader_binding_table: &Arc<Buffer<T>>, raygen_shader_binding_offset: VkDeviceSize, miss_shader_binding_table: &Arc<Buffer<U>>, miss_shader_binding_offset: VkDeviceSize, miss_shader_binding_stride: VkDeviceSize, hit_shader_binding_table: &Arc<Buffer<V>>, hit_shader_binding_offset: VkDeviceSize, hit_shader_binding_stride: VkDeviceSize, callable_shader_binding_table: &Arc<Buffer<W>>, callable_shader_binding_offset: VkDeviceSize, callable_shader_binding_stride: VkDeviceSize, width: u32, height: u32, depth: u32, ) { self.device.cmd_trace_rays( self.buffer, raygen_shader_binding_table.vk_handle(), raygen_shader_binding_offset, miss_shader_binding_table.vk_handle(), miss_shader_binding_offset, miss_shader_binding_stride, hit_shader_binding_table.vk_handle(), hit_shader_binding_offset, hit_shader_binding_stride, callable_shader_binding_table.vk_handle(), callable_shader_binding_offset, callable_shader_binding_stride, width, height, depth, ) } pub fn copy_query_pool_results(&self) { unimplemented!(); } pub fn inheritance_info( render_pass: Option<&Arc<RenderPass>>, sub_pass: Option<u32>, framebuffer: Option<&Arc<Framebuffer>>, query_enable: Option<QueryEnable>, ) -> VkCommandBufferInheritanceInfo { let mut info = VkCommandBufferInheritanceInfo::new( match render_pass { Some(render_pass) => render_pass.vk_handle(), None => VkRenderPass::NULL_HANDLE, }, match sub_pass { Some(sub_pass) => sub_pass, None => 0, }, match framebuffer { Some(framebuffer) => framebuffer.vk_handle(), None => VkFramebuffer::NULL_HANDLE, }, ); if let Some(query) = query_enable { info.set_query(true, query.query_flags, query.pipeline_statistics); } info } } impl VulkanDevice for CommandBuffer { fn device(&self) -> &Arc<Device> { &self.device } } impl Drop for CommandBuffer { fn drop(&mut self) { self.device .free_command_buffers(self.pool.vk_handle(), &[self.buffer]); } }
use crate::gl_wrapper::vao::VAO; use crate::gl_wrapper::vbo::{VBO, VertexAttribute}; use std::collections::HashMap; use crate::gl_wrapper::{EBO, BufferUpdateFrequency}; pub struct PredefinedShapes { pub shapes: HashMap<&'static str, VAO>, } impl Default for PredefinedShapes { fn default() -> Self { let mut shapes = HashMap::new(); shapes.insert("unit_cube", parallelepiped()); shapes.insert("unit_quad", quad()); PredefinedShapes { shapes } } } fn parallelepiped() -> VAO { let positions = [ // positions -1.0f32, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0 ]; VAO::new( &[ { let mut vbo = VBO::new(vec![ VertexAttribute { index: 0, components: 3 } ]); vbo.with(&positions, BufferUpdateFrequency::Never); vbo } ], None ) } fn quad() -> VAO { let quad_pos = [ -1.0f32, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, ]; let quad_tex = [ 0.0f32, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 1.0, 1.0 ]; VAO::new( &[ { let mut vbo = VBO::new(vec![ VertexAttribute { index: 0, components: 2 } ]); vbo.with(&quad_pos, BufferUpdateFrequency::Never); vbo }, { let mut vbo = VBO::new(vec![ VertexAttribute { index: 1, components: 2 } ]); vbo.with(&quad_tex, BufferUpdateFrequency::Never); vbo } ], None ) }
use std::io::BufRead; use std::ops::RangeInclusive; pub fn run(input: impl BufRead) { let pairs = read_assignment_pairs(input); println!("* Part 1: {}", count_containing(&pairs)); println!("* Part 2: {}", count_overlapping(&pairs)); } fn read_assignment_pairs(input: impl BufRead) -> Vec<AssignmentPair> { input .lines() .map(|l| l.expect("expected line")) .map(|l| AssignmentPair::from(l.as_str())) .collect() } fn count_containing(pairs: &Vec<AssignmentPair>) -> usize { pairs .iter() .filter(|p| p.0.contains(&p.1) || p.1.contains(&p.0)) .count() } fn count_overlapping(pairs: &Vec<AssignmentPair>) -> usize { pairs.iter().filter(|p| p.0.overlaps(&p.1)).count() } struct AssignmentPair(Assignment, Assignment); struct Assignment { range: RangeInclusive<u32>, } impl Assignment { fn contains(&self, other: &Assignment) -> bool { self.range.start() <= other.range.start() && self.range.end() >= other.range.end() } fn overlaps(&self, other: &Assignment) -> bool { self.range.start() <= other.range.end() && self.range.end() >= other.range.start() } } impl From<&str> for AssignmentPair { fn from(s: &str) -> Self { let pair: Vec<&str> = s.split(',').collect(); assert_eq!(pair.len(), 2); AssignmentPair(pair[0].into(), pair[1].into()) } } impl From<&str> for Assignment { fn from(s: &str) -> Self { let range: Vec<&str> = s.split("-").collect(); let range = range[0].parse().unwrap()..=range[1].parse().unwrap(); Assignment { range } } } #[cfg(test)] mod tests { use super::*; const INPUT: &[u8] = b"2-4,6-8 2-3,4-5 5-7,7-9 2-8,3-7 6-6,4-6 2-6,4-8 "; #[test] fn test_read_assignment_pairs() { let pairs: Vec<AssignmentPair> = read_assignment_pairs(INPUT); assert_eq!(pairs.len(), 6); assert_eq!(pairs[0].0.range, 2..=4); assert_eq!(pairs[0].1.range, 6..=8); assert_eq!(pairs[1].0.range, 2..=3); assert_eq!(pairs[1].1.range, 4..=5); assert_eq!(pairs[2].0.range, 5..=7); assert_eq!(pairs[2].1.range, 7..=9); assert_eq!(pairs[3].0.range, 2..=8); assert_eq!(pairs[3].1.range, 3..=7); assert_eq!(pairs[4].0.range, 6..=6); assert_eq!(pairs[4].1.range, 4..=6); assert_eq!(pairs[5].0.range, 2..=6); assert_eq!(pairs[5].1.range, 4..=8); } #[test] fn test_assignment_from_str() { let pair = AssignmentPair::from("2-4,6-8"); assert_eq!(pair.0.range, 2..=4); assert_eq!(pair.1.range, 6..=8); } #[test] fn test_assignment_contains() { assert!(Assignment::from("2-8").contains(&Assignment::from("3-7"))); assert!(!Assignment::from("3-7").contains(&Assignment::from("2-8"))); assert!(Assignment::from("1-2").contains(&Assignment::from("1-2"))); } #[test] fn test_count_containing() { assert_eq!(count_containing(&read_assignment_pairs(INPUT)), 2); } #[test] fn test_count_overlapping() { assert_eq!(count_overlapping(&read_assignment_pairs(INPUT)), 4); } }
//! Som misc shared functionality pub mod fs; use std::path::Path; use std::path::PathBuf; fn is_rust_src(file_path: &Path) -> bool { match std::env::var("RUST_SRC_PATH") { Err(_) => false, Ok(p) => file_path.starts_with(p), } } fn cargo_dir() -> PathBuf { let mut cargo_dir = dirs::home_dir().unwrap(); cargo_dir.push(".cargo"); cargo_dir.push("registry"); cargo_dir.push("src"); cargo_dir } fn is_cargo_registry(file_path: &Path) -> bool { file_path.starts_with(cargo_dir()) } pub fn shorten_context(file_path: &str) -> String { let path = Path::new(file_path); let result = if is_rust_src(path) { let rust_src = PathBuf::from(std::env::var("RUST_SRC_PATH").unwrap()); path.strip_prefix(rust_src) .unwrap() .to_str() .unwrap() .to_owned() } else if is_cargo_registry(path) { path.strip_prefix(cargo_dir()) .unwrap() .iter() .skip(1) .collect::<PathBuf>() .to_str() .unwrap() .to_owned() } else { file_path.to_owned() }; result.trim_start_matches("pub ").to_owned() } use crate::engine::Completion; pub fn sort_completion(mut vec: Vec<Completion>) -> Vec<Completion> { vec.dedup_by(|a, b| a.text == b.text); vec }
table! { posts (id) { id -> Integer, title -> Varchar, slug -> Varchar, body -> Text, introduction -> Nullable<Text>, tags -> Array<Varchar>, published -> Bool, created_at -> Timestamp, updated_at -> Timestamp, published_at -> Nullable<Timestamp>, } } table! { tags (id) { id -> Integer, name -> Varchar, } } table! { post_tags (id) { id -> Integer, post_id -> Integer, tag_id -> Integer, } } joinable!(post_tags -> posts (post_id)); joinable!(post_tags -> tags (tag_id)); allow_tables_to_appear_in_same_query!( posts, tags, post_tags, );
use crate::{app, db, graphql::ctx::GraphContext}; use chrono::{DateTime, NaiveDateTime, Utc}; use juniper::{FieldError, FieldResult}; pub struct PadsQueryRoot; graphql_object!(PadsQueryRoot: GraphContext |&self| { field all(&executor, req: ApiReqPadsQueryAll) -> FieldResult<ApiRespPadsQueryAll> { query_all(&executor, req) } }); pub struct PadsMutationRoot; graphql_object!(PadsMutationRoot: GraphContext |&self| { field create(&executor, req: ApiReqPadsCreate) -> FieldResult<ApiRespPadsCreate> { create_pad(&executor, req) } }); #[derive(GraphQLInputObject, Debug)] #[graphql(description = "pad create params")] struct ApiReqPadsCreate { title: Option<String>, language: Option<String>, } #[derive(GraphQLObject, Debug)] #[graphql(description = "pad create response")] struct ApiRespPadsCreate { pad: ApiPad, } #[derive(GraphQLInputObject, Debug)] #[graphql(description = "pads filter")] struct ApiReqPadsFilter { search: Option<String>, status: Option<String>, days: Option<String>, } impl Into<db::PadFilter> for ApiReqPadsFilter { fn into(self) -> db::PadFilter { db::PadFilter { search: self.search, status: self.status, days: self.days, } } } #[derive(GraphQLInputObject, Debug)] #[graphql(description = "pads query all request")] struct ApiReqPadsQueryAll { page_index: i32, page_size: i32, filters: ApiReqPadsFilter, } #[derive(GraphQLObject, Debug)] #[graphql(description = "pad")] struct ApiPad { id: i32, hash: String, title: String, status: String, creator: String, language: String, create_time: DateTime<Utc>, update_time: DateTime<Utc>, } impl From<db::Pad> for ApiPad { fn from(pad: db::Pad) -> Self { Self { id: pad.id, hash: pad.hash, title: pad.title, status: pad.status, creator: pad.creator, language: pad.language, create_time: DateTime::from_utc(pad.created_at, Utc), update_time: DateTime::from_utc(pad.updated_at, Utc), } } } #[derive(GraphQLObject, Debug)] struct ApiRespPadsQueryAll { page_index: i32, page_size: i32, total: i32, pads: Vec<ApiPad>, } impl From<db::PaginatedData<db::Pad>> for ApiRespPadsQueryAll { fn from(data: db::PaginatedData<db::Pad>) -> Self { Self { page_index: data.page_index, page_size: data.page_size, total: data.total, pads: data.data.into_iter().map(|item| item.into()).collect(), } } } fn query_all( executor: &juniper::Executor<GraphContext>, req: ApiReqPadsQueryAll, ) -> FieldResult<ApiRespPadsQueryAll> { let ctx = executor.context(); let session = ctx.session_ref()?; let dao: &db::ApiDao = &ctx.dao; let pagination = db::Pagination { page_index: req.page_index, page_size: req.page_size, }; let filters: db::PadFilter = req.filters.into(); debug!( "pads.query_all pagination = {:?}, filters = {:?}", pagination, filters ); let data = dao.pads.query_all(session.user_id, &pagination, &filters)?; Ok(data.into()) } fn create_pad( executor: &juniper::Executor<GraphContext>, req: ApiReqPadsCreate, ) -> FieldResult<ApiRespPadsCreate> { let ctx = executor.context(); let user_id = ctx.session_ref().map(|s| s.user_id).unwrap_or(0); let dao: &db::ApiDao = &ctx.dao; debug!("create_pad user_id = {}, req = {:?}", user_id, req); let curr_pads_count = dao.pads.query_pad_count(user_id).map_err(|e| { debug!("query pad count err = {:?}", e); FieldError::new( "query pads count failure", graphql_value!({"pad": "query_pads_count_failure"}), ) })?; let config: &app::config::Config = app::config(); let pad_limit = config.room.max_pads_per_user as i32; debug!( "pad count = {}, pad limit = {}, user_id = {}", curr_pads_count, pad_limit, user_id ); if pad_limit > 0 && (curr_pads_count < 0 || curr_pads_count >= pad_limit) { return Err(FieldError::new( "pads limit exceeded", graphql_value!({"pad": "pads_limit_exceeded"}), )); } let pad = dao .pads .create_pad(user_id, req.title, req.language) .map_err(|e| { FieldError::new( "create pad failure", graphql_value!({ "pad": "create_pad_failure" }), ) })?; Ok(ApiRespPadsCreate { pad: pad.into() }) }
//! Tests auto-converted from "sass-spec/spec/selector-functions" //! version 0f59164a, 2019-02-01 17:21:13 -0800. //! See <https://github.com/sass/sass-spec> for source material.\n //! The following tests are excluded from conversion: //! ["extend/nested", "extend/simple", "is_superselector", "parse", "replace", "unify/base", "unify/universal_simple"] extern crate rsass; use rsass::{compile_scss, OutputStyle}; /// From "sass-spec/spec/selector-functions/append" #[test] fn append() { assert_eq!( rsass( "body {\n a: selector-append(\".foo\", \".bar\", \".baz\");\n b: selector-append(\".a .foo\", \".b .bar\");\n c: selector-append(\".foo\", \"-suffix\");\n d: selector-append(\'.foo\', \'.bar, -suffix\');\n e: selector-append(\'.foo\', \'--suffix\');\n f: selector-append(\'.foo\', \'.bar, --suffix\');\n}" ) .unwrap(), "body {\n a: .foo.bar.baz;\n b: .a .foo.b .bar;\n c: .foo-suffix;\n d: .foo.bar, .foo-suffix;\n e: .foo--suffix;\n f: .foo.bar, .foo--suffix;\n}\n" ); } mod extend; // Ignoring "is_superselector", not expected to work yet. /// From "sass-spec/spec/selector-functions/nest" #[test] fn nest() { assert_eq!( rsass( ".simple {\n a: selector-nest(\'.foo\');\n b: selector-nest(\'.foo\', \'.bar\');\n c: selector-nest(\'.foo\', \'.bar\', \'.baz\');\n d: selector-nest(\'.a .foo\', \'.b .bar\');\n e: selector-nest(\'.foo\', \'&.bar\');\n e: selector-nest(\'.foo\', \'&.bar\', \'.baz &\');\n}" ) .unwrap(), ".simple {\n a: .foo;\n b: .foo .bar;\n c: .foo .bar .baz;\n d: .a .foo .b .bar;\n e: .foo.bar;\n e: .baz .foo.bar;\n}\n" ); } // Ignoring "parse", not expected to work yet. // Ignoring "replace", not expected to work yet. mod unify; fn rsass(input: &str) -> Result<String, String> { compile_scss(input.as_bytes(), OutputStyle::Expanded) .map_err(|e| format!("rsass failed: {}", e)) .and_then(|s| String::from_utf8(s).map_err(|e| format!("{:?}", e))) }
use crate::context::Context; use crate::position::lsp_range_to_kakoune; use crate::types::{EditorMeta, EditorParams, PositionParams}; use crate::util::{editor_quote, get_file_contents, get_lsp_position, short_file_path}; use itertools::Itertools; use lsp_types::request::{GotoDefinition, GotoImplementation, GotoTypeDefinition, References}; use lsp_types::*; use serde::Deserialize; use url::Url; pub fn goto(meta: EditorMeta, result: Option<GotoDefinitionResponse>, ctx: &mut Context) { let locations = match result { Some(GotoDefinitionResponse::Scalar(location)) => vec![location], Some(GotoDefinitionResponse::Array(locations)) => locations, Some(GotoDefinitionResponse::Link(locations)) => locations .into_iter() .map( |LocationLink { target_uri: uri, target_range: range, .. }| Location { uri, range }, ) .collect(), None => return, }; match locations.len() { 0 => {} 1 => { goto_location(meta, &locations[0], ctx); } _ => { goto_locations(meta, &locations, ctx); } } } pub fn goto_location(meta: EditorMeta, Location { uri, range }: &Location, ctx: &mut Context) { let path = uri.to_file_path().unwrap(); let path_str = path.to_str().unwrap(); if let Some(contents) = get_file_contents(path_str, ctx) { let pos = lsp_range_to_kakoune(&range, &contents, ctx.offset_encoding).start; let command = format!( "eval -try-client %opt{{jumpclient}} -verbatim -- edit -existing {} {} {}", editor_quote(path_str), pos.line, pos.column, ); ctx.exec(meta, command); } } pub fn goto_locations(meta: EditorMeta, locations: &[Location], ctx: &mut Context) { let select_location = locations .iter() .group_by(|Location { uri, .. }| uri.to_file_path().unwrap()) .into_iter() .map(|(path, locations)| { let path_str = path.to_str().unwrap(); let contents = match get_file_contents(path_str, ctx) { Some(contents) => contents, None => return "".into(), }; locations .map(|Location { range, .. }| { let pos = lsp_range_to_kakoune(&range, &contents, ctx.offset_encoding).start; if range.start.line as usize >= contents.len_lines() { return "".into(); } format!( "{}:{}:{}:{}", short_file_path(path_str, &ctx.root_path), pos.line, pos.column, contents.line(range.start.line as usize), ) }) .join("") }) .join(""); let command = format!( "lsp-show-goto-choices {} {}", editor_quote(&ctx.root_path), editor_quote(&select_location), ); ctx.exec(meta, command); } pub fn text_document_definition(meta: EditorMeta, params: EditorParams, ctx: &mut Context) { let params = PositionParams::deserialize(params).unwrap(); let req_params = GotoDefinitionParams { text_document_position_params: TextDocumentPositionParams { text_document: TextDocumentIdentifier { uri: Url::from_file_path(&meta.buffile).unwrap(), }, position: get_lsp_position(&meta.buffile, &params.position, ctx).unwrap(), }, partial_result_params: Default::default(), work_done_progress_params: Default::default(), }; ctx.call::<GotoDefinition, _>(meta, req_params, move |ctx: &mut Context, meta, result| { goto(meta, result, ctx); }); } pub fn text_document_implementation(meta: EditorMeta, params: EditorParams, ctx: &mut Context) { let params = PositionParams::deserialize(params).unwrap(); let req_params = GotoDefinitionParams { text_document_position_params: TextDocumentPositionParams { text_document: TextDocumentIdentifier { uri: Url::from_file_path(&meta.buffile).unwrap(), }, position: get_lsp_position(&meta.buffile, &params.position, ctx).unwrap(), }, partial_result_params: Default::default(), work_done_progress_params: Default::default(), }; ctx.call::<GotoImplementation, _>(meta, req_params, move |ctx: &mut Context, meta, result| { goto(meta, result, ctx); }); } pub fn text_document_type_definition(meta: EditorMeta, params: EditorParams, ctx: &mut Context) { let params = PositionParams::deserialize(params).unwrap(); let req_params = GotoDefinitionParams { text_document_position_params: TextDocumentPositionParams { text_document: TextDocumentIdentifier { uri: Url::from_file_path(&meta.buffile).unwrap(), }, position: get_lsp_position(&meta.buffile, &params.position, ctx).unwrap(), }, partial_result_params: Default::default(), work_done_progress_params: Default::default(), }; ctx.call::<GotoTypeDefinition, _>(meta, req_params, move |ctx: &mut Context, meta, result| { goto(meta, result, ctx); }); } pub fn text_document_references(meta: EditorMeta, params: EditorParams, ctx: &mut Context) { let params = PositionParams::deserialize(params).unwrap(); let req_params = ReferenceParams { text_document_position: TextDocumentPositionParams { text_document: TextDocumentIdentifier { uri: Url::from_file_path(&meta.buffile).unwrap(), }, position: get_lsp_position(&meta.buffile, &params.position, ctx).unwrap(), }, context: ReferenceContext { include_declaration: true, }, partial_result_params: Default::default(), work_done_progress_params: Default::default(), }; ctx.call::<References, _>(meta, req_params, move |ctx: &mut Context, meta, result| { goto(meta, result.map(GotoDefinitionResponse::Array), ctx); }); }
use std::any::type_name; use std::cmp::Ordering; use itertools::Itertools; pub use regex::Regex; #[cfg(feature = "use_serde")] use serde::{Deserialize, Serialize}; pub use agg::AggregationMethod; pub use column::{ColumnDefinition, SimpleColumn}; pub use datatype::ClickhouseDataType; use h3ron::H3_MAX_RESOLUTION; use once_cell::sync::Lazy; pub use other::{CompressionMethod, TableEngine}; pub use partitioning::{H3Partitioning, TemporalPartitioning, TemporalResolution}; use std::collections::HashMap; use crate::clickhouse::compacted_tables::temporary_key::TemporaryKey; use crate::clickhouse::compacted_tables::{Table, TableSpec, COL_NAME_H3INDEX}; use crate::Error; pub mod agg; pub mod column; pub mod datatype; pub mod other; pub mod partitioning; pub trait ValidateSchema { fn validate(&self) -> Result<(), Error>; } #[cfg_attr(feature = "use_serde", derive(Serialize, Deserialize))] #[derive(Debug, PartialEq, Eq, Clone)] pub struct CompactedTableSchema { pub name: String, table_engine: TableEngine, compression_method: CompressionMethod, pub(crate) h3_base_resolutions: Vec<u8>, pub max_h3_resolution: u8, pub(crate) use_compaction: bool, temporal_resolution: TemporalResolution, temporal_partitioning: TemporalPartitioning, h3_partitioning: H3Partitioning, pub(crate) columns: HashMap<String, ColumnDefinition>, partition_by_columns: Vec<String>, pub(crate) has_base_suffix: bool, } #[derive(Eq)] pub(crate) struct ResolutionMetadata { h3_resolution: u8, is_compacted: bool, } impl ResolutionMetadata { #[inline] pub fn new(h3_resolution: u8, is_compacted: bool) -> Self { Self { h3_resolution, is_compacted, } } } impl PartialOrd for ResolutionMetadata { fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(self.cmp(other)) } } impl Ord for ResolutionMetadata { fn cmp(&self, other: &Self) -> Ordering { if self.h3_resolution < other.h3_resolution { Ordering::Less } else if self.h3_resolution > other.h3_resolution { Ordering::Greater } else if self.is_compacted == other.is_compacted { Ordering::Equal } else if self.is_compacted && !other.is_compacted { Ordering::Greater } else { Ordering::Less } } } impl PartialEq for ResolutionMetadata { fn eq(&self, other: &Self) -> bool { self.is_compacted == other.is_compacted && self.h3_resolution == other.h3_resolution } } impl ValidateSchema for CompactedTableSchema { fn validate(&self) -> Result<(), Error> { validate_table_name(type_name::<Self>(), &self.name)?; self.compression_method.validate()?; self.temporal_partitioning.validate()?; // a h3index column must exist self.h3index_column()?; // validate table engine if let TableEngine::SummingMergeTree(sum_columns) = &self.table_engine { let missing_columns: Vec<_> = sum_columns .iter() .filter(|sum_column| !self.columns.contains_key(*sum_column)) .cloned() .collect(); if !missing_columns.is_empty() { return Err(Error::SchemaValidationError( type_name::<TableEngine>(), format!( "SummingMergeTree engine is missing columns: {}", missing_columns.join(", ") ), )); } } // validate h3 resolutions let base_resolutions = ordered_h3_resolutions(&self.h3_base_resolutions)?; if base_resolutions.is_empty() { return Err(Error::SchemaValidationError( type_name::<Self>(), "at least one h3 base resolution is required".to_string(), )); } // a useful partitioning can be created self.partition_by_expressions()?; Ok(()) } } // validation does not include reserved SQL keywords, but Clickhouse will fail happily when // encountering them as a table name anyways. static RE_VALID_NAME: Lazy<Regex> = Lazy::new(|| Regex::new(r"^[a-zA-Z].[_a-zA-Z_0-9]+$").unwrap()); fn validate_table_name(location: &'static str, name: &str) -> Result<(), Error> { if RE_VALID_NAME.is_match(name) { Ok(()) } else { Err(Error::SchemaValidationError( location, format!("invalid table name: \"{}\"", name), )) } } impl CompactedTableSchema { pub(crate) fn build_table( &self, resolution_metadata: &ResolutionMetadata, temporary_key: &Option<TemporaryKey>, ) -> Table { Table { basename: self.name.as_str().into(), spec: TableSpec { h3_resolution: resolution_metadata.h3_resolution, is_compacted: resolution_metadata.is_compacted, temporary_key: temporary_key.as_ref().map(|tk| tk.to_string()), has_base_suffix: self.has_base_suffix, }, } } /// columns to use for the order-by of the table pub fn order_by_column_names(&self) -> Vec<String> { let default_key_pos = 10; self.columns .iter() .filter(|(column_name, def)| { def.order_key_position().is_some() || COL_NAME_H3INDEX == column_name.as_str() }) .map(|(column_name, def)| { let key_pos = def.order_key_position().unwrap_or(default_key_pos) as i16; // always have the mandatory h3index first as the location is most certainly the // most important criteria for a fast lookup let pos = key_pos - if column_name == COL_NAME_H3INDEX { 100 } else { 0 }; (pos, column_name) }) .sorted_by(|a, b| { match a.0.cmp(&b.0) { Ordering::Less => Ordering::Less, // sort by column name as second criteria, to have a repeatable ordering Ordering::Equal => a.1.cmp(b.1), Ordering::Greater => Ordering::Greater, } }) .map(|(_, column_name)| column_name.clone()) .collect() } fn get_column_definition(&self, column_name: &str) -> Result<ColumnDefinition, Error> { match self.columns.get(column_name) { Some(def) => Ok(def.clone()), None => { return Err(Error::SchemaValidationError( type_name::<Self>(), format!("mandatory column {} is missing", COL_NAME_H3INDEX), )) } } } pub fn h3index_column(&self) -> Result<(String, ColumnDefinition), Error> { let def = self.get_column_definition(COL_NAME_H3INDEX)?; if ColumnDefinition::H3Index == def { Ok((COL_NAME_H3INDEX.to_string(), def)) } else { return Err(Error::SchemaValidationError( type_name::<Self>(), format!( "mandatory column {} is must be a h3index column", COL_NAME_H3INDEX ), )); } } /// generate a single partition expression for a single column fn partition_by_expression(&self, column_name: &str, def: &ColumnDefinition) -> String { match def { ColumnDefinition::H3Index => self.h3_partitioning.sql_expression(column_name), ColumnDefinition::Simple(_) | ColumnDefinition::WithAggregation(_, _) => { if def.datatype().is_temporal() { self.temporal_partitioning.sql_expression(column_name) } else { column_name.to_string() } } } } /// columns expressions to use the partitioning of the tables pub fn partition_by_expressions(&self) -> Result<Vec<String>, Error> { let (h3index_col_name, h3index_col_def) = self.h3index_column()?; let mut partition_by = vec![ // h3index base cell is always the first self.partition_by_expression(&h3index_col_name, &h3index_col_def), ]; if self.partition_by_columns.is_empty() { // attempt to use a time column for partitioning if there is one let mut new_partition_by_entries = vec![]; for (column_name, def) in self.columns.iter() { if def.datatype().is_temporal() { let partition_expr = self.partition_by_expression(column_name, def); if !new_partition_by_entries.contains(&partition_expr) && !partition_by.contains(&partition_expr) { new_partition_by_entries.push(partition_expr); } } } if new_partition_by_entries.len() > 1 { return Err(Error::SchemaValidationError( type_name::<Self>(), "found multiple temporal columns - explict specification of partitioning columns required".to_string() )); } partition_by.append(&mut new_partition_by_entries); } else { for column_name in self.partition_by_columns.iter() { let def = self.get_column_definition(column_name)?; let partition_expr = self.partition_by_expression(column_name, &def); if !partition_by.contains(&partition_expr) { partition_by.push(partition_expr); } } } Ok(partition_by) } pub(crate) fn get_resolution_metadata(&self) -> Result<Vec<ResolutionMetadata>, Error> { let compacted_resolutions: Vec<_> = if self.use_compaction { let max_res = *self .h3_base_resolutions .iter() .max() .ok_or(Error::MixedH3Resolutions)?; // TODO: better error (0..=max_res) .map(|r| ResolutionMetadata::new(r, true)) .collect() } else { vec![] }; Ok(self .h3_base_resolutions .iter() .cloned() .map(|r| ResolutionMetadata::new(r, false)) .chain(compacted_resolutions) .collect()) } fn build_create_statement(&self, table: &Table) -> Result<String, Error> { let partition_by = if table.spec.temporary_key.is_none() { // partitioning is only relevant for non-temporary tables Some(self.partition_by_expressions()?.join(", ")) } else { None }; let order_by = self.order_by_column_names().join(", "); let engine = match &self.table_engine { TableEngine::ReplacingMergeTree => "ReplacingMergeTree".to_string(), TableEngine::SummingMergeTree(smt_columns) => { format!("SummingMergeTree({})", smt_columns.join(", ")) } TableEngine::AggregatingMergeTree => "AggregatingMergeTree".to_string(), }; let default_codec = codec_string(&self.compression_method); let columns = &self .columns .iter() .sorted_by(|a, b| Ord::cmp(a.0, b.0)) // order to make the SQL comparable .map(|(col_name, def)| { let col_codec = def.compression_method().map(codec_string); let col_dtype = if def.nullable() { format!("Nullable({})", def.datatype().sql_type_name()) } else { def.datatype().sql_type_name().to_string() }; format!( " {} {} CODEC({})", col_name, col_dtype, col_codec.unwrap_or_else(|| default_codec.clone()) ) }) .join(",\n"); Ok(format!( "CREATE TABLE IF NOT EXISTS {} ( {} ) ENGINE {} {} ORDER BY ({});", table.to_table_name(), columns, engine, partition_by.map_or_else(|| "".to_string(), |pb| format!("PARTITION BY ({})", pb)), order_by )) } pub fn build_create_statements( &self, temporary_key: &Option<TemporaryKey>, ) -> Result<Vec<String>, Error> { self.get_resolution_metadata()? .iter() .map(|resolution_metadata| { let table = self.build_table(resolution_metadata, temporary_key); self.build_create_statement(&table) }) .collect::<Result<Vec<String>, Error>>() } pub fn build_drop_statements( &self, temporary_key: &Option<TemporaryKey>, ) -> Result<Vec<String>, Error> { Ok(self .get_resolution_metadata()? .iter() .map(|resolution_metadata| { let table = self.build_table(resolution_metadata, temporary_key); format!("drop table if exists {}", table.to_table_name()) }) .collect::<Vec<String>>()) } } fn codec_string(compression_method: &CompressionMethod) -> String { match compression_method { CompressionMethod::LZ4HC(level) => format!("LZ4HC({})", level), CompressionMethod::ZSTD(level) => format!("ZSTD({})", level), CompressionMethod::Delta(delta_bytes) => format!("Delta({})", delta_bytes), CompressionMethod::DoubleDelta => "DoubleDelta".to_string(), CompressionMethod::Gorilla => "Gorilla".to_string(), CompressionMethod::T64 => "T64".to_string(), } } fn ordered_h3_resolutions(h3res_slice: &[u8]) -> Result<Vec<u8>, Error> { let mut cleaned = vec![]; for res in h3res_slice.iter() { if res > &H3_MAX_RESOLUTION { return Err(Error::UnsupportedH3Resolution(*res)); } cleaned.push(*res); } cleaned.sort_unstable(); cleaned.dedup(); Ok(cleaned) } #[derive(Clone)] pub struct CompactedTableSchemaBuilder { schema: CompactedTableSchema, use_compaction: bool, } impl CompactedTableSchemaBuilder { pub fn new(table_name: &str) -> Self { let mut columns = HashMap::new(); columns.insert(COL_NAME_H3INDEX.to_string(), ColumnDefinition::H3Index); Self { schema: CompactedTableSchema { name: table_name.to_string(), table_engine: Default::default(), compression_method: Default::default(), h3_base_resolutions: vec![], max_h3_resolution: 0, use_compaction: true, temporal_resolution: Default::default(), temporal_partitioning: Default::default(), partition_by_columns: Default::default(), columns, has_base_suffix: true, h3_partitioning: Default::default(), }, use_compaction: true, } } pub fn table_engine(mut self, table_engine: TableEngine) -> Self { self.schema.table_engine = table_engine; self } pub fn compression_method(mut self, compression_method: CompressionMethod) -> Self { self.schema.compression_method = compression_method; self } pub fn h3_base_resolutions(mut self, h3res: Vec<u8>) -> Self { if !h3res.is_empty() { self.schema.max_h3_resolution = *(h3res .iter() .max() .expect("no resolutions to ge max res from")); } self.schema.h3_base_resolutions = h3res; self } pub fn use_compacted_resolutions(mut self, use_compaction: bool) -> Self { self.use_compaction = use_compaction; self } pub fn temporal_resolution(mut self, temporal_resolution: TemporalResolution) -> Self { self.schema.temporal_resolution = temporal_resolution; self } pub fn temporal_partitioning(mut self, temporal_partitioning: TemporalPartitioning) -> Self { self.schema.temporal_partitioning = temporal_partitioning; self } pub fn h3_partitioning(mut self, h3_partitioning: H3Partitioning) -> Self { self.schema.h3_partitioning = h3_partitioning; self } /// add a column /// /// replaces previously added columns with the same name pub fn add_column(mut self, column_name: &str, def: ColumnDefinition) -> Self { self.schema.columns.insert(column_name.to_string(), def); self } pub fn partition_by(mut self, columns: Vec<String>) -> Self { self.schema.partition_by_columns = columns; self } pub fn build(self) -> Result<CompactedTableSchema, Error> { self.schema.validate()?; Ok(self.schema) } } #[cfg(test)] mod tests { use crate::clickhouse::compacted_tables::schema::{ validate_table_name, AggregationMethod, ClickhouseDataType, ColumnDefinition, CompactedTableSchema, CompactedTableSchemaBuilder, CompressionMethod, ResolutionMetadata, SimpleColumn, TemporalPartitioning, }; #[test] fn test_validate_table_name() { assert!(validate_table_name("unittest", "").is_err()); assert!(validate_table_name("unittest", " test").is_err()); assert!(validate_table_name("unittest", "4test").is_err()); assert!(validate_table_name("unittest", "something").is_ok()); assert!(validate_table_name("unittest", "some_thing").is_ok()); } fn data_okavango_delta() -> CompactedTableSchema { CompactedTableSchemaBuilder::new("okavango_delta") .h3_base_resolutions(vec![1, 2, 3, 4, 5]) .temporal_partitioning(TemporalPartitioning::Months(1)) .add_column( "elephant_density", ColumnDefinition::WithAggregation( SimpleColumn::new( ClickhouseDataType::Float32, None, Some(CompressionMethod::Delta(1)), false, ), AggregationMethod::Average, ), ) .add_column( "observed_on", ColumnDefinition::Simple(SimpleColumn::new( ClickhouseDataType::DateTime, Some(0), None, false, )), ) .build() .unwrap() } #[test] #[cfg(feature = "serde")] fn schema_json_roundtrip() { let s = data_okavango_delta(); let json_string = serde_json::to_string(&s).unwrap(); //println!("{}", json_string); let s2: CompactedTableSchema = serde_json::from_str(&json_string).unwrap(); assert_eq!(s, s2); } #[test] fn create_schema() { data_okavango_delta(); } #[test] fn resolution_metadata_sort() { let mut v1 = vec![ ResolutionMetadata::new(4, false), ResolutionMetadata::new(3, false), ]; v1.sort_unstable(); assert_eq!(v1[0].h3_resolution, 3); assert_eq!(v1[1].h3_resolution, 4); let mut v2 = vec![ ResolutionMetadata::new(3, true), ResolutionMetadata::new(3, false), ]; v2.sort_unstable(); assert!(!v2[0].is_compacted); assert!(v2[1].is_compacted); } }
use std::{ error::Error, fs::File, io::{ self, prelude::*, }, net::TcpStream, }; use clipboard::{ ClipboardContext, ClipboardProvider, }; use crate::app; pub struct Cmd { file: Option<String>, clip: bool, remote: String, } impl Cmd { pub fn from_args() -> Self { let m = app::new().get_matches(); let file = m.value_of("file").map(String::from); let remote = m.value_of("remote").unwrap().to_string(); let clip = m.is_present("clip"); Self { file, clip, remote } } pub fn run(&self) -> Result<(), Box<dyn Error>> { let url = match &self.file { None => self.send_stdin(), Some(f) => self.send_file(f), }?; if self.clip { let mut ctx: ClipboardContext = ClipboardProvider::new()?; ctx.set_contents(url).map(|_| { println!("copied the link to clipboard"); }) } else { println!("{}", &url); Ok(()) } } } impl Cmd { fn send_file(&self, p: &str) -> Result<String, io::Error> { let mut file = File::open(p)?; let mut stream = TcpStream::connect(&self.remote)?; io::copy(&mut file, &mut stream)?; let mut buf = String::new(); stream.read_to_string(&mut buf)?; Ok(buf) } fn send_stdin(&self) -> Result<String, io::Error> { let mut stdin = io::stdin(); let mut stream = TcpStream::connect(&self.remote)?; io::copy(&mut stdin, &mut stream)?; let mut buf = String::new(); stream.read_to_string(&mut buf)?; Ok(buf) } }
//! Query AST models pub mod identifier; pub use self::identifier::Identifier; pub mod statement; pub use self::statement::Statement; pub mod expression; pub use self::expression::Expression; pub mod call_expression; pub use self::call_expression::CallExpression; pub mod member_expression; pub use self::member_expression::MemberExpression; pub mod string_literal; pub use self::string_literal::StringLiteral; pub mod dict_item; pub use self::dict_item::DictItem; pub mod variable_assignment; pub use self::variable_assignment::VariableAssignment; pub mod node; pub use self::node::Node; pub mod property; pub use self::property::Property; pub mod property_key; pub use self::property_key::PropertyKey; pub mod dialect; pub use self::dialect::Dialect; pub mod import_declaration; pub use self::import_declaration::ImportDeclaration; pub mod package; pub use self::package::Package; pub mod package_clause; pub use self::package_clause::PackageClause; pub mod duration; pub use self::duration::Duration;
//! # Monotron API //! //! This crate contains the Userspace to Kernel API for the Monotron. //! //! It is pulled in by the Kernel (github.com/thejpster/monotron) and the //! various user-space example applications //! (github.com/thejpster/monotron-apps). //! //! The API in here is modelled after both the UNIX/POSIX API and the MS-DOS //! API. We use function pointers rather than `SWI` calls (software //! interrupts), provided in a structure. This structure is designed to be //! extensible. //! //! A C header file version of this API can be generated with `cbindgen`. //! //! All types in this file must be `#[repr(C)]`. #![cfg_attr(not(test), no_std)] #![deny(missing_docs)] /// The set of Error codes the API can report. #[repr(C)] #[derive(Debug, Clone, Copy)] pub enum Error { /// The given filename was not found FileNotFound, /// The given file handle was not valid BadFileHandle, /// Error reading or writing IOError, /// You can't do that operation on that sort of file NotSupported, /// An unknown error occured Unknown = 0xFFFF, } /// Describes a handle to some resource. #[repr(C)] #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct Handle(pub u16); /// Describes a string of fixed length, which must not be free'd by the /// recipient. The given length must not include any null terminators that may /// be present. The string must be valid UTF-8 (or 7-bit ASCII, which is a /// valid subset of UTF-8). #[repr(C)] #[derive(Debug, Clone, Eq)] pub struct BorrowedString { /// The start of the string pub ptr: *const u8, /// The length of the string in bytes pub length: usize, } impl BorrowedString { /// Create a new API-compatible borrowed string, from a static string slice. pub fn new(value: &'static str) -> BorrowedString { BorrowedString { ptr: value.as_ptr(), length: value.len(), } } } impl core::cmp::PartialEq for BorrowedString { fn eq(&self, rhs: &BorrowedString) -> bool { if self.length == rhs.length { let left = unsafe { core::slice::from_raw_parts(self.ptr, self.length) }; let right = unsafe { core::slice::from_raw_parts(rhs.ptr, rhs.length) }; left == right } else { false } } } /// Describes the result of a function which may return a `Handle` if /// everything was Ok, or return an `Error` if something went wrong. /// /// This is not a standard Rust `Result` because they are not `#[repr(C)]`. #[repr(C)] #[derive(Debug)] pub enum HandleResult { /// Success - a handle is returned Ok(Handle), /// Failure - an error is returned Error(Error), } /// Describes the result of a function which may return nothing if everything /// was Ok, or return an `Error` if something went wrong. /// /// This is not a standard Rust `Result` because they are not `#[repr(C)]`. #[repr(C)] #[derive(Debug)] pub enum EmptyResult { /// Success - nothing is returned Ok, /// Failure - an error is returned Error(Error), } /// Describes the result of a function which may return a numeric count of /// bytes read/written if everything was Ok, or return an `Error` if something /// went wrong. /// /// This is not a standard Rust `Result` because they are not `#[repr(C)]`. #[repr(C)] #[derive(Debug)] pub enum SizeResult { /// Success - a size in bytes is returned Ok(usize), /// Failure - an error is returned Error(Error), } /// Describes the sort of files you will find in the system-wide virtual /// filesystem. Some exist on disk, and some do not. #[repr(C)] #[derive(Debug, Copy, Clone, PartialEq, Eq)] pub enum FileType { /// A regular file File, /// A directory contains other files and directories Directory, /// A device you can read/write a block (e.g. 512 bytes) at a time BlockDevice, /// A device you can read/write one or more bytes at a time CharDevice, } /// Describes an instant in time. The system only supports local time and has /// no concept of time zones. #[repr(C)] #[derive(Debug, Clone, PartialEq, Eq)] pub struct Timestamp { /// The Gregorian calendar year, minus 1970 (so 10 is 1980, and 30 is the year 2000) pub year_from_1970: u8, /// The month of the year, where January is 1 and December is 12 pub month: u8, /// The day of the month where 1 is the first of the month, through to 28, /// 29, 30 or 31 (as appropriate) pub days: u8, /// The hour in the day, from 0 to 23 pub hours: u8, /// The minutes past the hour, from 0 to 59 pub minutes: u8, /// The seconds past the minute, from 0 to 59. Note that some filesystems /// only have 2-second precision on their timestamps. pub seconds: u8, } /// Represents the seven days of the week #[repr(C)] #[derive(Debug, Eq, PartialEq, Ord, PartialOrd)] pub enum DayOfWeek { /// First day of the week Monday, /// Comes after Monday Tuesday, /// Middle of the week Wednesday, /// Between Wednesday and Friday Thursday, /// Almost the weekend Friday, /// First day of the weekend Saturday, /// Last day of the week Sunday, } impl DayOfWeek { /// Returns the UK English word for the day of the week pub fn day_str(&self) -> &'static str { match self { DayOfWeek::Monday => "Monday", DayOfWeek::Tuesday => "Tuesday", DayOfWeek::Wednesday => "Wednesday", DayOfWeek::Thursday => "Thursday", DayOfWeek::Friday => "Friday", DayOfWeek::Saturday => "Saturday", DayOfWeek::Sunday => "Sunday", } } } impl Timestamp { /// Returns the day of the week for the given timestamp. pub fn day_of_week(&self) -> DayOfWeek { let zellers_month = ((i32::from(self.month) + 9) % 12) + 1; let k = i32::from(self.days); let year = if zellers_month >= 11 { i32::from(self.year_from_1970) + 1969 } else { i32::from(self.year_from_1970) + 1970 }; let d = year % 100; let c = year / 100; let f = k + (((13 * zellers_month) - 1) / 5) + d + (d / 4) + (c / 4) - (2 * c); let day_of_week = f % 7; match day_of_week { 0 => DayOfWeek::Sunday, 1 => DayOfWeek::Monday, 2 => DayOfWeek::Tuesday, 3 => DayOfWeek::Wednesday, 4 => DayOfWeek::Thursday, 5 => DayOfWeek::Friday, _ => DayOfWeek::Saturday, } } /// Move this timestamp forward by a number of days and seconds. pub fn increment(&mut self, days: u32, seconds: u32) { let new_seconds = seconds + u32::from(self.seconds); self.seconds = (new_seconds % 60) as u8; let new_minutes = (new_seconds / 60) + u32::from(self.minutes); self.minutes = (new_minutes % 60) as u8; let new_hours = (new_minutes / 60) + u32::from(self.hours); self.hours = (new_hours % 24) as u8; let mut new_days = (new_hours / 24) + u32::from(self.days) + days; while new_days > u32::from(self.days_in_month()) { new_days -= u32::from(self.days_in_month()); self.month += 1; if self.month > 12 { self.month = 1; self.year_from_1970 += 1; } } self.days = new_days as u8; } /// Returns true if this is a leap year, false otherwise. pub fn is_leap_year(&self) -> bool { let year = u32::from(self.year_from_1970) + 1970; (year == 2000) || (((year % 4) == 0) && ((year % 100) != 0)) } /// Returns the number of days in the current month pub fn days_in_month(&self) -> u8 { match self.month { 1 => 31, 2 if self.is_leap_year() => 29, 2 => 28, 3 => 31, 4 => 30, 5 => 31, 6 => 30, 7 => 31, 8 => 31, 9 => 30, 10 => 31, 11 => 30, 12 => 31, _ => panic!("Bad timestamp {:?}", self), } } /// Returns the current month as a UK English string (e.g. "August"). pub fn month_str(&self) -> &'static str { match self.month { 1 => "January", 2 => "February", 3 => "March", 4 => "April", 5 => "May", 6 => "June", 7 => "July", 8 => "August", 9 => "September", 10 => "October", 11 => "November", 12 => "December", _ => "Unknown", } } } impl core::fmt::Display for Timestamp { fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { write!( f, "{year:04}-{month:02}-{days:02}T{hours:02}:{minutes:02}:{seconds:02}", year = u16::from(self.year_from_1970) + 1970u16, month = self.month, days = self.days, hours = self.hours, minutes = self.minutes, seconds = self.seconds, ) } } /// Describes a file as it exists on disk. #[repr(C)] #[derive(Debug, Clone)] pub struct DirEntry { /// The file of the file this entry represents pub file_type: FileType, /// The name of the file (not including its full path) pub name: [u8; 11], /// The sie of the file in bytes pub size: u32, /// When this file was last modified pub mtime: Timestamp, /// When this file was created pub ctime: Timestamp, /// The various mode bits set on this file pub mode: FileMode, } /// A bitfield indicating if a file is: /// /// * read-only /// * a volume label /// * a system file /// * in need of archiving #[repr(C)] #[derive(Debug, Clone, Copy)] pub struct FileMode(u8); /// Is the read-only bit set in this FileMode bit-field? #[no_mangle] pub extern "C" fn monotron_filemode_is_readonly(flags: FileMode) -> bool { (flags.0 & FileMode::READ_ONLY) != 0 } /// Is the volume label bit set in this FileMode bit-field? #[no_mangle] pub extern "C" fn monotron_filemode_is_volume(flags: FileMode) -> bool { (flags.0 & FileMode::VOLUME) != 0 } /// Is the system bit set in this FileMode bit-field? #[no_mangle] pub extern "C" fn monotron_filemode_is_system(flags: FileMode) -> bool { (flags.0 & FileMode::SYSTEM) != 0 } /// Is the archive bit set in this FileMode bit-field? #[no_mangle] pub extern "C" fn monotron_filemode_is_archive(flags: FileMode) -> bool { (flags.0 & FileMode::ARCHIVE) != 0 } impl FileMode { const READ_ONLY: u8 = 1; const VOLUME: u8 = 2; const SYSTEM: u8 = 4; const ARCHIVE: u8 = 8; } /// Represents how far to move the current read/write pointer through a file. /// You can specify the position as relative to the start of the file, /// relative to the end of the file, or relative to the current pointer /// position. #[repr(C)] #[derive(Debug, Clone, PartialEq, Eq)] pub enum Offset { /// Set the pointer to this many bytes from the start of the file FromStart(u32), /// Set the pointer to this many bytes from the current position (+ve is forwards, -ve is backwards) FromCurrent(i32), /// Set the pointer to this many bytes back from the end of the file FromEnd(u32), } /// The ways in which we can open a file. /// /// TODO: Replace all these booleans with a u8 flag-set #[repr(C)] pub enum OpenMode { /// Open file in read-only mode. No writes allowed. One file can be opened in read-only mode multiple times. ReadOnly { /// Set to true if read/write requests on this handle should be non-blocking non_blocking: bool, }, /// Open a file for writing, but not reading. WriteOnly { /// If true, the write pointer will default to the end of the file append: bool, /// If true, the file will be created if it doesn't exist. If false, the file must exist. See also the `exclusive` flag. create: bool, /// If true AND the create flag is true, the open will fail if the file already exists. exclusive: bool, /// If true, the file contents will be deleted on open, giving a zero byte file. truncate: bool, /// Set to true if read/write requests on this handle should be non-blocking non_blocking: bool, }, /// Open a file for reading and writing. ReadWrite { /// If true, the write pointer will default to the end of the file append: bool, /// If true, the file will be created if it doesn't exist. If false, the file must exist. See also the `exclusive` flag. create: bool, /// If true AND the create flag is true, the open will fail if the file already exists. exclusive: bool, /// If true, the file contents will be deleted on open, giving a zero byte file. truncate: bool, /// Set to true if read/write requests on this handle should be non-blocking non_blocking: bool, }, } /// Create a new Read Only open mode object, for passing to the `open` syscall. #[no_mangle] pub extern "C" fn monotron_openmode_readonly(non_blocking: bool) -> OpenMode { OpenMode::ReadOnly { non_blocking } } /// Create a new Write Only open mode object, for passing to the `open` syscall. #[no_mangle] pub extern "C" fn monotron_openmode_writeonly( append: bool, create: bool, exclusive: bool, truncate: bool, non_blocking: bool, ) -> OpenMode { OpenMode::WriteOnly { append, create, exclusive, truncate, non_blocking, } } /// Create a new Read Write open mode object, for passing to the `open` syscall. #[no_mangle] pub extern "C" fn monotron_openmode_readwrite( append: bool, create: bool, exclusive: bool, truncate: bool, non_blocking: bool, ) -> OpenMode { OpenMode::ReadWrite { append, create, exclusive, truncate, non_blocking, } } /// Standard Output pub static STDOUT: Handle = Handle(0); /// Standard Error pub static STDERR: Handle = Handle(1); /// Standard Input pub static STDIN: Handle = Handle(2); /// This structure contains all the function pointers the application can use /// to access OS functions. #[repr(C)] pub struct Api { /// Old function for writing a single 8-bit character to the screen. pub putchar: extern "C" fn(ch: u8) -> i32, /// Old function for writing a null-terminated 8-bit string to the screen. pub puts: extern "C" fn(string: *const u8) -> i32, /// Old function for reading one byte from stdin, blocking. pub readc: extern "C" fn() -> i32, /// Old function for checking if readc() would block. pub kbhit: extern "C" fn() -> i32, /// Old function for moving the cursor on screen. To be replaced with ANSI /// escape codes. pub move_cursor: extern "C" fn(row: u8, col: u8), /// Old function for playing a note. pub play: extern "C" fn(frequency: u32, channel: u8, volume: u8, waveform: u8) -> i32, /// Old function for changing the on-screen font. pub change_font: extern "C" fn(font_id: u32, font_data: *const u8), /// Old function for reading the Joystick status. pub get_joystick: extern "C" fn() -> u8, /// Old function for turning the cursor on/off. pub set_cursor_visible: extern "C" fn(enabled: u8), /// Old function for reading the contents of the screen. pub read_char_at: extern "C" fn(row: u8, col: u8) -> u16, /// Wait for next vertical blanking interval. pub wfvbi: extern "C" fn(), /// Open/create a device/file. Returns a file handle, or an error. pub open: extern "C" fn(filename: BorrowedString, mode: OpenMode) -> HandleResult, /// Close a previously opened handle. pub close: extern "C" fn(handle: Handle) -> EmptyResult, /// Read from a file handle into the given buffer. Returns an error, or /// the number of bytes read (which may be less than `buffer_len`). pub read: extern "C" fn(handle: Handle, buffer: *mut u8, buffer_len: usize) -> SizeResult, /// Write the contents of the given buffer to a file handle. Returns an /// error, or the number of bytes written (which may be less than /// `buffer_len`). pub write: extern "C" fn(handle: Handle, buffer: *const u8, buffer_len: usize) -> SizeResult, /// Write to the handle and the read from the handle. Useful when doing an /// I2C read of a specific address. It is an error if the complete /// `out_buffer` could not be written. pub write_then_read: extern "C" fn( handle: Handle, out_buffer: *const u8, out_buffer_len: usize, in_buffer: *mut u8, in_buffer_len: usize, ) -> SizeResult, /// Move the read/write pointer in a file. pub seek: extern "C" fn(handle: Handle, offset: Offset) -> EmptyResult, /// Open a directory. Returns a file handle, or an error. pub opendir: extern "C" fn(filename: BorrowedString) -> HandleResult, /// Read directory entry into given buffer. pub readdir: extern "C" fn(handle: Handle, dir_entry: &mut DirEntry) -> EmptyResult, /// Get information about a file by path pub stat: extern "C" fn(filename: BorrowedString, stat_entry: &mut DirEntry) -> EmptyResult, /// Get the current time pub gettime: extern "C" fn() -> Timestamp, /// Old function for writing a UTF-8 string to the screen. pub puts_utf8: extern "C" fn(string: *const u8, length: usize), /// Maps an actual line on the screen to be drawn as if it was somewhere else on the screen. /// /// So if you ran this, the image would look completely normal: /// /// ```rust /// for x in 0..576 { /// map_line(x, x); /// } /// ``` /// /// But if you did this, the screen would be upside down. /// /// ```rust /// for x in 0..576 { /// map_line(x, 576 - x); /// } /// ``` /// /// And if you did this, the top 32 scanlines on the screen would repeat /// all the way down. /// /// ```rust /// for x in 0..576 { /// map_line(x, x % 32); /// } /// ``` pub map_line: extern "C" fn(actual_scanline: u16, drawn_scanline: u16), /// Get the current cursor position pub get_cursor: extern "C" fn(row: *mut u8, col: *mut u8), } #[cfg(test)] mod test { use super::*; #[test] fn day_of_week() { let samples = [ ( Timestamp { year_from_1970: 49, month: 7, day: 16, hours: 0, minutes: 0, seconds: 0, }, DayOfWeek::Tuesday, ), ( Timestamp { year_from_1970: 49, month: 7, day: 17, hours: 0, minutes: 0, seconds: 0, }, DayOfWeek::Wednesday, ), ( Timestamp { year_from_1970: 49, month: 7, day: 18, hours: 0, minutes: 0, seconds: 0, }, DayOfWeek::Thursday, ), ]; for (timestamp, day) in samples.iter() { assert_eq!(timestamp.day_of_week(), *day); } } }
// The database connection, the parameters for creating one, and authenticaton. mod am_conn_core; mod authentication; mod connection_core; mod initial_request; mod params; mod session_state; mod tcp_client; pub use am_conn_core::AmConnCore; use authentication::AuthenticationResult; pub use connection_core::ConnectionCore; pub use params::{ connect_params::{ConnectParams, ServerCerts, Tls}, connect_params_builder::ConnectParamsBuilder, into_connect_params::IntoConnectParams, into_connect_params_builder::IntoConnectParamsBuilder, }; use session_state::SessionState; pub use url; use tcp_client::TcpClient;
use diesel::sqlite::SqliteConnection; use iron::typemap::Key; use iron::{Plugin, Request}; use persistent::Write; use r2d2::{Pool, PooledConnection}; use r2d2_diesel::ConnectionManager; use errors::*; /// Struct to attach a database connection pool to an iron request. pub struct ConnectionPool; impl ConnectionPool { /// Create connection pool for the sqlite database pub fn create(database_url: &str) -> Result<Pool<ConnectionManager<SqliteConnection>>> { let manager = ConnectionManager::<SqliteConnection>::new(database_url); Pool::new(manager).chain_err(|| ErrorKind::ConnectionPoolCreationError).map_err(Error::from) } /// Extract a database connection from the pool stored in the request. pub fn from_request(request: &mut Request) -> Result<PooledConnection<ConnectionManager<SqliteConnection>>> { let mutex = request.get::<Write<ConnectionPool>>().chain_err(|| ErrorKind::ConnectionPoolExtractionError)?; let pool = match mutex.lock() { Ok(pool) => pool, // we can recover from a poisoned lock, because the thread that panicked will not be // able to finish/persist the changes, so it will be as if they never happened and we // are OK. Err(poisoned_lock) => poisoned_lock.into_inner(), }; pool.get().chain_err(|| ErrorKind::GetConnectionError).map_err(Error::from) } } impl Key for ConnectionPool { type Value = Pool<ConnectionManager<SqliteConnection>>; }
use std::net::TcpStream; use anyhow::Result; use std::io::{Write, BufReader}; use std::iter; use std::time::Duration; use std::io::BufRead; use crate::ircclient::message::IrcMessage; pub mod message; const DEFAULT_IRC_PORT:isize = 6667; pub struct IrcClient { config:Config, socket:Option<TcpStream> } pub struct IrcCommand { command:String, params:Vec<String> } #[derive(Debug,Clone)] pub struct Config { pub server:String, pub nickname:String, pub port: Option<isize> } impl IrcCommand { pub fn new(cmd:&str,params:Vec<String>) -> Self { return IrcCommand { command:String::from(cmd), params } } } macro_rules! get_soc { ($self:ident) => ($self.socket.as_ref().ok_or(anyhow::Error::msg("wtf"))); } impl IrcClient { pub fn new(config:Config) -> Self { return IrcClient { config, socket:None } } pub fn read_line(&mut self) -> Result<String> { let soc = get_soc!(self)?; let mut resp_str = String::new(); let mut buff = BufReader::new(soc); buff.read_line(&mut resp_str)?; Ok(resp_str) } pub fn send_message(&mut self,target:&str,msg:&str) -> Result<()> { let priv_msg = IrcCommand::new("PRIVMSG",vec![String::from(target),String::from(msg)]); self.send_command_without_response(&priv_msg)?; Ok(()) } pub fn send_ping(&mut self) -> Result<()> { let ping = IrcCommand::new("PONG",vec![String::from(" :pingisn")]); self.send_command_without_response(&ping)?; Ok(()) } pub fn send_command(&mut self,cmd:&IrcCommand) -> Result<String> { self.send_command_without_response(cmd)?; let resp_str = self.read_line()?; Ok(resp_str) } pub fn send_command_without_response(&mut self, cmd:&IrcCommand ) -> Result<()> { let mut soc = get_soc!(self)?; let str_msg = format!("{} {}\n",cmd.command,cmd.params.join(" ")); soc.write(str_msg.as_bytes())?; println!("Sent command {}",cmd.command); Ok(()) } pub fn connect(&mut self) -> Result<()> { self.socket = Some(TcpStream::connect(format!("{}:{}",self.config.server,self.config.port.or(Some(DEFAULT_IRC_PORT)).unwrap()))?); self.socket.as_ref().unwrap().set_read_timeout(Some(Duration::new(5,0)))?; let user_cmd = IrcCommand::new("USER",Self::get_nick_params(self.config.nickname.clone().as_str())); self.send_command_without_response(&user_cmd)?; let nick_cmd = IrcCommand::new("NICK",vec![self.config.nickname.clone()]); self.send_command_without_response(&nick_cmd)?; Ok(()) } pub fn join_channel(&mut self,channel:&str) -> Result<()> { let join_cmd = IrcCommand::new("JOIN",vec![String::from(channel)]); self.send_command_without_response(&join_cmd) } fn get_nick_params(nick:&str) -> Vec<String> { let mut user_params : Vec<String> = iter::repeat(String::from(nick)).take(4).collect(); user_params } pub fn read_next_message(&mut self) -> Result<IrcMessage> { let mut soc = get_soc!(self)?; let mut test_buf = [0;10]; let peek_res = soc.peek(&mut test_buf); if peek_res.is_ok() { let mut got_str = self.read_line()?; Ok(IrcMessage::from(&got_str)) } else { Ok(IrcMessage::None) } } }
/* Part 1 Calculate the spreadsheet's checksum. For each row, determine the difference between the largest value and the smallest value; the checksum is the sum of all of these differences. For example, given the following spreadsheet: 5 1 9 5 7 5 3 2 4 6 8 The first row's largest and smallest values are 9 and 1, and their difference is 8. The second row's largest and smallest values are 7 and 3, and their difference is 4. The third row's difference is 6. In this example, the spreadsheet's checksum would be 8 + 4 + 6 = 18. */ fn checksum_of_spreadsheet(input: &str) -> u32 { input.lines() .map(|l| { let (min, max) = l.split_whitespace() .map(|v| v.parse::<u32>().unwrap()) .fold((u32::max_value(), 0), |(mut min, mut max), i| { if i < min { min = i; } if i > max { max = i; } (min, max) }); max - min }).sum() } fn run_tests() { let input = "5 1 9 5 7 5 3 2 4 6 8"; assert_eq!(checksum_of_spreadsheet(input), 18); } fn main() { run_tests(); let input: &str = "5 1 9 5 7 5 3 2 4 6 8"; let sum = checksum_of_spreadsheet(input); println!("Sum: {}", sum); }
mod erlang; mod golang; mod rust; mod viml; pub use erlang::Erlang; pub use golang::Golang; pub use rust::Rust; pub use viml::Viml; pub trait KeywordPriority { /// Definition/Decleration keywords. const DEFINITION: &'static [&'static str]; /// Dummy reference keywords. const REFERENCE: &'static [&'static str]; /// Keywords for simple & compund statement. const STATEMENT: &'static [&'static str]; fn keyword_priority(token: &str) -> Option<usize> { if Self::DEFINITION.contains(&token) { Some(4) } else if Self::REFERENCE.contains(&token) { Some(6) } else if Self::STATEMENT.contains(&token) { Some(8) } else { None } } }
#[doc = "Reader of register HSSR"] pub type R = crate::R<u32, super::HSSR>; #[doc = "Writer for register HSSR"] pub type W = crate::W<u32, super::HSSR>; #[doc = "Register HSSR `reset()`'s with value 0"] impl crate::ResetValue for super::HSSR { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `CDOFF`"] pub type CDOFF_R = crate::R<u32, u32>; #[doc = "Write proxy for field `CDOFF`"] pub struct CDOFF_W<'a> { w: &'a mut W, } impl<'a> CDOFF_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { self.w.bits = (self.w.bits & !0x00ff_ffff) | ((value as u32) & 0x00ff_ffff); self.w } } #[doc = "Reader of field `KEY`"] pub type KEY_R = crate::R<u8, u8>; #[doc = "Write proxy for field `KEY`"] pub struct KEY_W<'a> { w: &'a mut W, } impl<'a> KEY_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 & !(0xff << 24)) | (((value as u32) & 0xff) << 24); self.w } } impl R { #[doc = "Bits 0:23 - Command Descriptor Pointer"] #[inline(always)] pub fn cdoff(&self) -> CDOFF_R { CDOFF_R::new((self.bits & 0x00ff_ffff) as u32) } #[doc = "Bits 24:31 - Write Key"] #[inline(always)] pub fn key(&self) -> KEY_R { KEY_R::new(((self.bits >> 24) & 0xff) as u8) } } impl W { #[doc = "Bits 0:23 - Command Descriptor Pointer"] #[inline(always)] pub fn cdoff(&mut self) -> CDOFF_W { CDOFF_W { w: self } } #[doc = "Bits 24:31 - Write Key"] #[inline(always)] pub fn key(&mut self) -> KEY_W { KEY_W { w: self } } }
use eosio_cdt::eos; use eosio_cdt::{check, expect, print, require_auth, Table, TableIterator}; #[derive(eos::Serialize, eos::Deserialize)] pub struct UserAge { user: eos::Name, age: u16, } impl Table for UserAge { fn new(code: eos::Name, scope: eos::Name) -> TableIterator<UserAge> { TableIterator::new(code, scope, eos::name_from_str("usersage")) } fn pk(&self) -> u64 { self.user.value } } #[eosio_cdt::action] pub fn signupage(name: eos::Name, age: u16) { require_auth(&contract.get_self()); check_age(age); let mut user_age_table = UserAge::new(contract.get_self().clone(), eos::Name::new(0)); check( user_age_table.find(name.value) == user_age_table.end(), "user is already signed up", ); let user_age = UserAge { user: name, age }; user_age_table.insert(&contract.get_self(), &user_age); accepted_message(user_age.user, age); } #[eosio_cdt::action] pub fn updateage(name: eos::Name, age: u16) { require_auth(&contract.get_self()); check_age(age); let mut user_age_table = UserAge::new(contract.get_self().clone(), eos::Name::new(0)); let mut user_age = user_age_table.get(name.value); user_age.age = age; user_age_table.update(&contract.get_self(), &user_age); accepted_message(name, age); } #[eosio_cdt::action] pub fn signout(name: eos::Name) { require_auth(&contract.get_self()); let mut user_age_table = UserAge::new(contract.get_self().clone(), eos::Name::new(0)); user_age_table.delete(name.value); print!("user ", name, " was removed successfully"); } #[eosio_cdt::action] pub fn advanceages() { require_auth(&contract.get_self()); let mut user_age_table = UserAge::new(contract.get_self(), eos::Name::new(0)); expect(user_age_table.begin(), "no users are signed up"); user_age_table.for_each(|itr| { let mut item = itr.read(); item.age += 1; itr.update(&contract.get_self(), &item); print!(" >>> ", item.user, " now is ", item.age); }); } fn check_age(age: u16) { check( age >= 18, "OOpsss... Looks like the user does not have the required age", ); } fn accepted_message(name: eos::Name, age: u16) { print!( "Hey, it looks like the user ", name, " is ", age, " years old. He/she is considered adult for our services." ); }
#[macro_use] extern crate conrod; extern crate find_folder; extern crate piston_window; extern crate netlion; use std::thread; use std::sync::{Arc, Mutex}; use piston_window::{EventLoop, PistonWindow, UpdateEvent, WindowSettings}; use netlion::*; // Generate the ID for the Button COUNTER. widget_ids! { struct Ids { canvas, text_box, start, proto_list, result, } } struct Netlion { port: String, sel_option: Option<usize>, net_mode: String, text: Arc<Mutex<String>>, } impl Netlion { fn new() -> Netlion { Netlion{ port: String::from("8080"), sel_option: Some(1), net_mode: String::from("tcp"), text: Arc::new(Mutex::new(String::from("Welcome to netlion:\n"))), } } } fn main() { const WIDTH: u32 = 800; const HEIGHT: u32 = 600; // Construct the window. let mut window: PistonWindow = WindowSettings::new("netlion", [WIDTH, HEIGHT]) .exit_on_esc(true).build().unwrap(); // construct our `Ui`. let mut ui = conrod::UiBuilder::new().build(); // Identifiers used for instantiating our widgets. let mut ids = Ids::new(ui.widget_id_generator()); // Add a `Font` to the `Ui`'s `font::Map` from file. let assets = find_folder::Search::KidsThenParents(3, 5).for_folder("conrod").unwrap(); let font_path = assets.join("assets/fonts/NotoSans/NotoSans-Regular.ttf"); ui.fonts.insert_from_file(font_path).unwrap(); // Create a texture to use for efficiently caching text on the GPU. let mut text_texture_cache = conrod::backend::piston_window::GlyphCache::new(&mut window, WIDTH, HEIGHT); // The image map describing each of our widget->image mappings (in our case, none). let image_map = conrod::image::Map::new(); // let mut ui = { // let theme = Theme::default(); // let glyph_cache = Glyphs::new(&font_path, window.factory.clone()); // Ui::new(glyph_cache.unwrap(), theme) // }; let mut app = Netlion::new(); window.set_ups(60); // Poll events from the window. while let Some(event) = window.next() { // Convert the piston event to a conrod event. if let Some(e) = conrod::backend::piston_window::convert_event(event.clone(), &window) { ui.handle_event(e); } event.update(|_| { let mut ui = ui.set_widgets(); set_widgets(&mut ui, &mut app, &mut ids); }); window.draw_2d(&event, |c, g| { if let Some(primitives) = ui.draw_if_changed() { fn texture_from_image<T>(img: &T) -> &T { img }; conrod::backend::piston_window::draw(c, g, primitives, &mut text_texture_cache, &image_map, texture_from_image); } }); } } fn set_widgets(ui: &mut conrod::UiCell, app: &mut Netlion, ids: &mut Ids) { use conrod::{color, widget, Colorable, Labelable, Positionable, Sizeable, Widget}; // Create a background canvas upon which we'll place the button. widget::Canvas::new().pad(40.0).set(ids.canvas, ui); widget::TextBox::new(app.port.as_str()) .top_left_of(ids.canvas) .w_h(200.0, 40.0) // .react(|s: &mut String|{println!("react: {}", s)}) .set(ids.text_box, ui); let options = &mut vec![String::from("udp"), String::from("tcp")]; // Draw the button and increment `count` if pressed. for selected_idx in widget::DropDownList::new(options, app.sel_option) .right_from(ids.text_box, 10.0) .w_h(150.0, 40.0) .set(ids.proto_list, ui) { app.sel_option = Some(selected_idx); app.net_mode = options[selected_idx].clone(); } if widget::Button::new() .right_from(ids.proto_list, 10.0) .w_h(80.0, 40.0) .label(&String::from("Start")) .set(ids.start, ui).was_clicked() { let text = app.text.clone(); start(app.net_mode.as_str(), &app.port, text); } widget::Text::new(app.text.lock().unwrap().as_str()) .down_from(ids.text_box, 10.0) .color(color::Color::Rgba(0.5, 0.5, 0.5, 1.0)) .align_text_left() .line_spacing(10.0) .set(ids.result, ui); } fn start(mode: &str, port: &String, text: Arc<Mutex<String>>) { let text = text.clone(); let host = "127.0.0.1"; let port = port.parse::<u16>().unwrap(); println!("Starting {} listener: {}:{}", mode, host, port); match mode { "tcp" => {thread::spawn(move || listen_tcp(host, port, text));}, "udp" => {thread::spawn(move || listen_udp(host, port, text));}, _ => println!("Listener type not recognized: {}", mode), }; }
use chrono::{Duration, Utc}; use jsonwebtoken::{decode, encode, DecodingKey, EncodingKey, Header, Validation}; use serde::{Deserialize, Serialize}; use std::{collections::HashMap, convert::Infallible, sync::Arc}; use tokio::sync::Mutex; use warp::{http::Response, http::StatusCode, Filter, Rejection, Reply}; type Result<T> = std::result::Result<T, Rejection>; type UsersDb = Arc<Mutex<HashMap<String, UserData>>>; const JWT_SECRET: &[u8; 10] = b"our_secret"; #[derive(Deserialize, Serialize, Debug)] struct Claims { sub: String, iat: usize, exp: usize, } #[derive(Debug, Clone, Deserialize)] struct UserData { username: String, password: String, } #[derive(Debug, Clone, Deserialize)] struct LoginData { username: String, password: String, } #[tokio::main] async fn main() { let users_db: UsersDb = Arc::new(Mutex::new(HashMap::new())); let default_route = warp::any().map(|| "Welcome"); let register_path = warp::path("register"); let register_routes = register_path .and(warp::get()) .map(|| "Please use a HTTP POST request to register") .or(register_path .and(warp::post()) .and(warp::body::json()) .and(with_users_db(users_db.clone())) .and_then(register_handler)); let login_path = warp::path("login"); let login_routes = login_path .and(warp::get()) .map(|| "Please use a HTTP POST request to login") .or(login_path .and(warp::post()) .and(warp::body::json()) .and(with_users_db(users_db.clone())) .and_then(login_handler)); let routes = register_routes .or(login_routes) .or(default_route) .with(warp::cors().allow_any_origin()); warp::serve(routes).run(([127, 0, 0, 1], 5000)).await; } fn get_jwt_for_user(user: &UserData) -> String { let issued_at = Utc::now().timestamp(); let expiration_time = Utc::now() .checked_add_signed(Duration::seconds(60)) .expect("invalid timestamp") .timestamp(); let user_claims = Claims { sub: user.username.to_string(), iat: issued_at as usize, exp: expiration_time as usize, }; let token = match encode( &Header::default(), &user_claims, &EncodingKey::from_secret(JWT_SECRET), ) { Ok(t) => t, Err(_) => panic!(), }; token } async fn register_handler(user: UserData, users_db: UsersDb) -> Result<impl Reply> { println!("Received UserData: {:?}", user); if users_db.lock().await.contains_key(&user.username) { println!("User already exists"); return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) .body("User already exists")); } users_db.lock().await.insert(user.username.clone(), user); println!("Users database: {:?}", users_db); Ok(Response::builder() .status(StatusCode::CREATED) .body("registered")) } async fn login_handler(login_data: LoginData, users_db: UsersDb) -> Result<impl Reply> { println!("Received login data: {:?}", login_data); let cur_user_db = users_db.lock().await; let user = match cur_user_db.get(&login_data.username) { Some(k) => k, None => { println!("User '{}' not found in database", &login_data.username); return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) .body("login failed".to_string())); } }; if user.password != login_data.password { println!("Password incorrect for user: {}", &login_data.username); return Ok(Response::builder() .status(StatusCode::BAD_REQUEST) .body("login failed".to_string())); } println!("Login ok"); let token = get_jwt_for_user(user); Ok(Response::builder().status(StatusCode::OK).body(token)) } fn with_users_db( users_db: UsersDb, ) -> impl Filter<Extract = (UsersDb,), Error = Infallible> + Clone { warp::any().map(move || users_db.clone()) }
use std::{ cmp, collections::{HashMap, hash_map::Entry}, fs::{File, OpenOptions}, io, os::unix::fs::OpenOptionsExt, rc::Rc, }; use syscall::{error::*, flag::O_NONBLOCK, Error, Map, SchemeMut, Result}; #[derive(Default)] pub struct ShmHandle { buffer: Option<Box<[u8]>>, refs: usize } pub struct ShmScheme { maps: HashMap<Rc<str>, ShmHandle>, handles: HashMap<usize, Rc<str>>, next_id: usize, pub socket: File } impl ShmScheme { pub fn new() -> io::Result<Self> { Ok(Self { maps: HashMap::new(), handles: HashMap::new(), next_id: 0, socket: OpenOptions::new() .read(true) .write(true) .create(true) .custom_flags(O_NONBLOCK as i32) .open(":shm")? }) } } impl SchemeMut for ShmScheme { fn open(&mut self, path: &str, _flags: usize, _uid: u32, _gid: u32) -> Result<usize> { let path = Rc::from(path); let entry = self.maps.entry(Rc::clone(&path)).or_insert(ShmHandle::default()); entry.refs += 1; self.handles.insert(self.next_id, path); let id = self.next_id; self.next_id += 1; Ok(id) } fn fmap(&mut self, id: usize, map: &Map) -> Result<usize> { let path = self.handles.get(&id).ok_or(Error::new(EBADF))?; let total_size = map.offset + map.size; match self.maps.get_mut(path).expect("handle pointing to nothing").buffer { Some(ref mut buf) => { if total_size != buf.len() { return Err(Error::new(ERANGE)); } Ok(buf[map.offset..].as_mut_ptr() as usize) }, ref mut buf @ None => { *buf = Some(vec![0; total_size].into_boxed_slice()); Ok(buf.as_mut().unwrap()[map.offset..].as_mut_ptr() as usize) } } } fn fpath(&mut self, id: usize, buf: &mut [u8]) -> Result<usize> { // Write scheme name const PREFIX: &[u8] = b"shm:"; let len = cmp::min(PREFIX.len(), buf.len()); buf[..len].copy_from_slice(&PREFIX[..len]); if len < PREFIX.len() { return Ok(len); } // Write path let path = self.handles.get(&id).ok_or(Error::new(EBADF))?; let len = cmp::min(path.len(), buf.len() - PREFIX.len()); buf[PREFIX.len()..][..len].copy_from_slice(&path.as_bytes()[..len]); Ok(PREFIX.len() + len) } fn close(&mut self, id: usize) -> Result<usize> { let path = self.handles.remove(&id).ok_or(Error::new(EBADF))?; let mut entry = match self.maps.entry(path) { Entry::Occupied(entry) => entry, Entry::Vacant(_) => panic!("handle pointing to nothing") }; entry.get_mut().refs -= 1; if entry.get().refs == 0 { // There is no other reference to this entry, drop entry.remove_entry(); } Ok(0) } }
use crate::prelude::*; use std::ptr; #[repr(C)] #[derive(Debug, Clone)] pub struct VkDescriptorSetLayoutBinding { pub binding: u32, pub descriptorType: VkDescriptorType, pub descriptorCount: u32, pub stageFlagBits: VkShaderStageFlagBits, pub pImmutableSamplers: *const VkSampler, } impl VkDescriptorSetLayoutBinding { pub fn new<T>(binding: u32, descriptor_type: VkDescriptorType, stage_flags: T) -> Self where T: Into<VkShaderStageFlagBits>, { VkDescriptorSetLayoutBinding { binding, descriptorType: descriptor_type, descriptorCount: 1, stageFlagBits: stage_flags.into(), pImmutableSamplers: ptr::null(), } } pub fn new_array<T>( binding: u32, count: u32, descriptor_type: VkDescriptorType, stage_flags: T, ) -> Self where T: Into<VkShaderStageFlagBits>, { VkDescriptorSetLayoutBinding { binding, descriptorType: descriptor_type, descriptorCount: count, stageFlagBits: stage_flags.into(), pImmutableSamplers: ptr::null(), } } pub fn set_immutable_samplers<'a, 'b: 'a>(&'a mut self, immutable_samplers: &'b [VkSampler]) { self.pImmutableSamplers = if immutable_samplers.is_empty() { ptr::null() } else { immutable_samplers.as_ptr() }; } }
#[doc = "Reader of register DMACTL0"] pub type R = crate::R<u16, super::DMACTL0>; #[doc = "Writer for register DMACTL0"] pub type W = crate::W<u16, super::DMACTL0>; #[doc = "Register DMACTL0 `reset()`'s with value 0"] impl crate::ResetValue for super::DMACTL0 { type Type = u16; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `ENABLE`"] pub type ENABLE_R = crate::R<bool, bool>; #[doc = "Write proxy for field `ENABLE`"] pub struct ENABLE_W<'a> { w: &'a mut W, } impl<'a> ENABLE_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 u16) & 0x01); self.w } } #[doc = "Reader of field `DIR`"] pub type DIR_R = crate::R<bool, bool>; #[doc = "Write proxy for field `DIR`"] pub struct DIR_W<'a> { w: &'a mut W, } impl<'a> DIR_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 u16) & 0x01) << 1); self.w } } #[doc = "Reader of field `MODE`"] pub type MODE_R = crate::R<bool, bool>; #[doc = "Write proxy for field `MODE`"] pub struct MODE_W<'a> { w: &'a mut W, } impl<'a> MODE_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 u16) & 0x01) << 2); self.w } } #[doc = "Reader of field `IE`"] pub type IE_R = crate::R<bool, bool>; #[doc = "Write proxy for field `IE`"] pub struct IE_W<'a> { w: &'a mut W, } impl<'a> IE_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 u16) & 0x01) << 3); self.w } } #[doc = "Reader of field `EP`"] pub type EP_R = crate::R<u8, u8>; #[doc = "Write proxy for field `EP`"] pub struct EP_W<'a> { w: &'a mut W, } impl<'a> EP_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 & !(0x0f << 4)) | (((value as u16) & 0x0f) << 4); self.w } } #[doc = "Reader of field `ERR`"] pub type ERR_R = crate::R<bool, bool>; #[doc = "Write proxy for field `ERR`"] pub struct ERR_W<'a> { w: &'a mut W, } impl<'a> ERR_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 << 8)) | (((value as u16) & 0x01) << 8); self.w } } #[doc = "Burst Mode\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum BRSTM_A { #[doc = "0: Bursts of unspecified length"] ANY = 0, #[doc = "1: INCR4 or unspecified length"] INC4 = 1, #[doc = "2: INCR8, INCR4 or unspecified length"] INC8 = 2, #[doc = "3: INCR16, INCR8, INCR4 or unspecified length"] INC16 = 3, } impl From<BRSTM_A> for u8 { #[inline(always)] fn from(variant: BRSTM_A) -> Self { variant as _ } } #[doc = "Reader of field `BRSTM`"] pub type BRSTM_R = crate::R<u8, BRSTM_A>; impl BRSTM_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> BRSTM_A { match self.bits { 0 => BRSTM_A::ANY, 1 => BRSTM_A::INC4, 2 => BRSTM_A::INC8, 3 => BRSTM_A::INC16, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `ANY`"] #[inline(always)] pub fn is_any(&self) -> bool { *self == BRSTM_A::ANY } #[doc = "Checks if the value of the field is `INC4`"] #[inline(always)] pub fn is_inc4(&self) -> bool { *self == BRSTM_A::INC4 } #[doc = "Checks if the value of the field is `INC8`"] #[inline(always)] pub fn is_inc8(&self) -> bool { *self == BRSTM_A::INC8 } #[doc = "Checks if the value of the field is `INC16`"] #[inline(always)] pub fn is_inc16(&self) -> bool { *self == BRSTM_A::INC16 } } #[doc = "Write proxy for field `BRSTM`"] pub struct BRSTM_W<'a> { w: &'a mut W, } impl<'a> BRSTM_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: BRSTM_A) -> &'a mut W { { self.bits(variant.into()) } } #[doc = "Bursts of unspecified length"] #[inline(always)] pub fn any(self) -> &'a mut W { self.variant(BRSTM_A::ANY) } #[doc = "INCR4 or unspecified length"] #[inline(always)] pub fn inc4(self) -> &'a mut W { self.variant(BRSTM_A::INC4) } #[doc = "INCR8, INCR4 or unspecified length"] #[inline(always)] pub fn inc8(self) -> &'a mut W { self.variant(BRSTM_A::INC8) } #[doc = "INCR16, INCR8, INCR4 or unspecified length"] #[inline(always)] pub fn inc16(self) -> &'a mut W { self.variant(BRSTM_A::INC16) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x03 << 9)) | (((value as u16) & 0x03) << 9); self.w } } impl R { #[doc = "Bit 0 - DMA Transfer Enable"] #[inline(always)] pub fn enable(&self) -> ENABLE_R { ENABLE_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - DMA Direction"] #[inline(always)] pub fn dir(&self) -> DIR_R { DIR_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - DMA Transfer Mode"] #[inline(always)] pub fn mode(&self) -> MODE_R { MODE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - DMA Interrupt Enable"] #[inline(always)] pub fn ie(&self) -> IE_R { IE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bits 4:7 - Endpoint number"] #[inline(always)] pub fn ep(&self) -> EP_R { EP_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bit 8 - Bus Error Bit"] #[inline(always)] pub fn err(&self) -> ERR_R { ERR_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bits 9:10 - Burst Mode"] #[inline(always)] pub fn brstm(&self) -> BRSTM_R { BRSTM_R::new(((self.bits >> 9) & 0x03) as u8) } } impl W { #[doc = "Bit 0 - DMA Transfer Enable"] #[inline(always)] pub fn enable(&mut self) -> ENABLE_W { ENABLE_W { w: self } } #[doc = "Bit 1 - DMA Direction"] #[inline(always)] pub fn dir(&mut self) -> DIR_W { DIR_W { w: self } } #[doc = "Bit 2 - DMA Transfer Mode"] #[inline(always)] pub fn mode(&mut self) -> MODE_W { MODE_W { w: self } } #[doc = "Bit 3 - DMA Interrupt Enable"] #[inline(always)] pub fn ie(&mut self) -> IE_W { IE_W { w: self } } #[doc = "Bits 4:7 - Endpoint number"] #[inline(always)] pub fn ep(&mut self) -> EP_W { EP_W { w: self } } #[doc = "Bit 8 - Bus Error Bit"] #[inline(always)] pub fn err(&mut self) -> ERR_W { ERR_W { w: self } } #[doc = "Bits 9:10 - Burst Mode"] #[inline(always)] pub fn brstm(&mut self) -> BRSTM_W { BRSTM_W { w: self } } }
// Wiggle Subsequence // https://leetcode.com/explore/challenge/card/march-leetcoding-challenge-2021/590/week-3-march-15th-march-21st/3676/ pub struct Solution; impl Solution { #[cfg(disable)] pub fn wiggle_max_length(nums: Vec<i32>) -> i32 { enum State { Any(i32), Min(i32), Max(i32), } use State::*; let mut state = Any(nums[0]); let mut count = 1; for &num in nums[1..].iter() { match state { Any(prev) | Min(prev) if num > prev => { state = Max(num); count += 1; } Min(prev) if num < prev => { state = Min(num); } Any(prev) | Max(prev) if num < prev => { state = Min(num); count += 1; } Max(prev) if num > prev => { state = Max(num); } _ => {} } } count } pub fn wiggle_max_length(nums: Vec<i32>) -> i32 { let mut prev_sign = 0; let mut count = 1; for window in nums.windows(2) { let sign = (window[1] - window[0]).signum(); if sign != 0 && sign != prev_sign { count += 1; prev_sign = sign; } } count } } #[cfg(test)] mod tests { use super::*; #[test] fn test_one() { assert_eq!(Solution::wiggle_max_length(vec![1]), 1); } #[test] fn test_two_eq() { assert_eq!(Solution::wiggle_max_length(vec![1, 1]), 1); } #[test] fn test_two_ne() { assert_eq!(Solution::wiggle_max_length(vec![1, 2]), 2); } #[test] fn example1() { assert_eq!(Solution::wiggle_max_length(vec![1, 7, 4, 9, 2, 5]), 6); } #[test] fn example2() { assert_eq!( Solution::wiggle_max_length(vec![ 1, 17, 5, 10, 13, 15, 10, 5, 16, 8 ]), 7 ); } #[test] fn example3() { assert_eq!( Solution::wiggle_max_length(vec![1, 2, 3, 4, 5, 6, 7, 8, 9]), 2 ); } }
#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, clashing_extern_declarations, clippy::all)] #[link(name = "windows")] extern "system" { #[cfg(feature = "Win32_Foundation")] pub fn BuildCommDCBA(lpdef: super::super::Foundation::PSTR, lpdcb: *mut DCB) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn BuildCommDCBAndTimeoutsA(lpdef: super::super::Foundation::PSTR, lpdcb: *mut DCB, lpcommtimeouts: *mut COMMTIMEOUTS) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn BuildCommDCBAndTimeoutsW(lpdef: super::super::Foundation::PWSTR, lpdcb: *mut DCB, lpcommtimeouts: *mut COMMTIMEOUTS) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn BuildCommDCBW(lpdef: super::super::Foundation::PWSTR, lpdcb: *mut DCB) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn ClearCommBreak(hfile: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn ClearCommError(hfile: super::super::Foundation::HANDLE, lperrors: *mut CLEAR_COMM_ERROR_FLAGS, lpstat: *mut COMSTAT) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn CommConfigDialogA(lpszname: super::super::Foundation::PSTR, hwnd: super::super::Foundation::HWND, lpcc: *mut COMMCONFIG) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn CommConfigDialogW(lpszname: super::super::Foundation::PWSTR, hwnd: super::super::Foundation::HWND, lpcc: *mut COMMCONFIG) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn EscapeCommFunction(hfile: super::super::Foundation::HANDLE, dwfunc: ESCAPE_COMM_FUNCTION) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn GetCommConfig(hcommdev: super::super::Foundation::HANDLE, lpcc: *mut COMMCONFIG, lpdwsize: *mut u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn GetCommMask(hfile: super::super::Foundation::HANDLE, lpevtmask: *mut COMM_EVENT_MASK) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn GetCommModemStatus(hfile: super::super::Foundation::HANDLE, lpmodemstat: *mut MODEM_STATUS_FLAGS) -> super::super::Foundation::BOOL; pub fn GetCommPorts(lpportnumbers: *mut u32, uportnumberscount: u32, puportnumbersfound: *mut u32) -> u32; #[cfg(feature = "Win32_Foundation")] pub fn GetCommProperties(hfile: super::super::Foundation::HANDLE, lpcommprop: *mut COMMPROP) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn GetCommState(hfile: super::super::Foundation::HANDLE, lpdcb: *mut DCB) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn GetCommTimeouts(hfile: super::super::Foundation::HANDLE, lpcommtimeouts: *mut COMMTIMEOUTS) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn GetDefaultCommConfigA(lpszname: super::super::Foundation::PSTR, lpcc: *mut COMMCONFIG, lpdwsize: *mut u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn GetDefaultCommConfigW(lpszname: super::super::Foundation::PWSTR, lpcc: *mut COMMCONFIG, lpdwsize: *mut u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn OpenCommPort(uportnumber: u32, dwdesiredaccess: u32, dwflagsandattributes: u32) -> super::super::Foundation::HANDLE; #[cfg(feature = "Win32_Foundation")] pub fn PurgeComm(hfile: super::super::Foundation::HANDLE, dwflags: PURGE_COMM_FLAGS) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn SetCommBreak(hfile: super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn SetCommConfig(hcommdev: super::super::Foundation::HANDLE, lpcc: *const COMMCONFIG, dwsize: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn SetCommMask(hfile: super::super::Foundation::HANDLE, dwevtmask: COMM_EVENT_MASK) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn SetCommState(hfile: super::super::Foundation::HANDLE, lpdcb: *const DCB) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn SetCommTimeouts(hfile: super::super::Foundation::HANDLE, lpcommtimeouts: *const COMMTIMEOUTS) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn SetDefaultCommConfigA(lpszname: super::super::Foundation::PSTR, lpcc: *const COMMCONFIG, dwsize: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn SetDefaultCommConfigW(lpszname: super::super::Foundation::PWSTR, lpcc: *const COMMCONFIG, dwsize: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn SetupComm(hfile: super::super::Foundation::HANDLE, dwinqueue: u32, dwoutqueue: u32) -> super::super::Foundation::BOOL; #[cfg(feature = "Win32_Foundation")] pub fn TransmitCommChar(hfile: super::super::Foundation::HANDLE, cchar: super::super::Foundation::CHAR) -> super::super::Foundation::BOOL; #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] pub fn WaitCommEvent(hfile: super::super::Foundation::HANDLE, lpevtmask: *mut COMM_EVENT_MASK, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL; } pub type CLEAR_COMM_ERROR_FLAGS = u32; pub const CE_BREAK: CLEAR_COMM_ERROR_FLAGS = 16u32; pub const CE_FRAME: CLEAR_COMM_ERROR_FLAGS = 8u32; pub const CE_OVERRUN: CLEAR_COMM_ERROR_FLAGS = 2u32; pub const CE_RXOVER: CLEAR_COMM_ERROR_FLAGS = 1u32; pub const CE_RXPARITY: CLEAR_COMM_ERROR_FLAGS = 4u32; #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct COMMCONFIG { pub dwSize: u32, pub wVersion: u16, pub wReserved: u16, pub dcb: DCB, pub dwProviderSubType: u32, pub dwProviderOffset: u32, pub dwProviderSize: u32, pub wcProviderData: [u16; 1], } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for COMMCONFIG {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for COMMCONFIG { fn clone(&self) -> Self { *self } } #[repr(C)] pub struct COMMPROP { pub wPacketLength: u16, pub wPacketVersion: u16, pub dwServiceMask: u32, pub dwReserved1: u32, pub dwMaxTxQueue: u32, pub dwMaxRxQueue: u32, pub dwMaxBaud: u32, pub dwProvSubType: u32, pub dwProvCapabilities: u32, pub dwSettableParams: u32, pub dwSettableBaud: u32, pub wSettableData: u16, pub wSettableStopParity: COMMPROP_STOP_PARITY, pub dwCurrentTxQueue: u32, pub dwCurrentRxQueue: u32, pub dwProvSpec1: u32, pub dwProvSpec2: u32, pub wcProvChar: [u16; 1], } impl ::core::marker::Copy for COMMPROP {} impl ::core::clone::Clone for COMMPROP { fn clone(&self) -> Self { *self } } pub type COMMPROP_STOP_PARITY = u16; pub const STOPBITS_10: COMMPROP_STOP_PARITY = 1u16; pub const STOPBITS_15: COMMPROP_STOP_PARITY = 2u16; pub const STOPBITS_20: COMMPROP_STOP_PARITY = 4u16; pub const PARITY_NONE: COMMPROP_STOP_PARITY = 256u16; pub const PARITY_ODD: COMMPROP_STOP_PARITY = 512u16; pub const PARITY_EVEN: COMMPROP_STOP_PARITY = 1024u16; pub const PARITY_MARK: COMMPROP_STOP_PARITY = 2048u16; pub const PARITY_SPACE: COMMPROP_STOP_PARITY = 4096u16; #[repr(C)] pub struct COMMTIMEOUTS { pub ReadIntervalTimeout: u32, pub ReadTotalTimeoutMultiplier: u32, pub ReadTotalTimeoutConstant: u32, pub WriteTotalTimeoutMultiplier: u32, pub WriteTotalTimeoutConstant: u32, } impl ::core::marker::Copy for COMMTIMEOUTS {} impl ::core::clone::Clone for COMMTIMEOUTS { fn clone(&self) -> Self { *self } } pub type COMM_EVENT_MASK = u32; pub const EV_BREAK: COMM_EVENT_MASK = 64u32; pub const EV_CTS: COMM_EVENT_MASK = 8u32; pub const EV_DSR: COMM_EVENT_MASK = 16u32; pub const EV_ERR: COMM_EVENT_MASK = 128u32; pub const EV_EVENT1: COMM_EVENT_MASK = 2048u32; pub const EV_EVENT2: COMM_EVENT_MASK = 4096u32; pub const EV_PERR: COMM_EVENT_MASK = 512u32; pub const EV_RING: COMM_EVENT_MASK = 256u32; pub const EV_RLSD: COMM_EVENT_MASK = 32u32; pub const EV_RX80FULL: COMM_EVENT_MASK = 1024u32; pub const EV_RXCHAR: COMM_EVENT_MASK = 1u32; pub const EV_RXFLAG: COMM_EVENT_MASK = 2u32; pub const EV_TXEMPTY: COMM_EVENT_MASK = 4u32; #[repr(C)] pub struct COMSTAT { pub _bitfield: u32, pub cbInQue: u32, pub cbOutQue: u32, } impl ::core::marker::Copy for COMSTAT {} impl ::core::clone::Clone for COMSTAT { fn clone(&self) -> Self { *self } } #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct DCB { pub DCBlength: u32, pub BaudRate: u32, pub _bitfield: u32, pub wReserved: u16, pub XonLim: u16, pub XoffLim: u16, pub ByteSize: u8, pub Parity: u8, pub StopBits: u8, pub XonChar: super::super::Foundation::CHAR, pub XoffChar: super::super::Foundation::CHAR, pub ErrorChar: super::super::Foundation::CHAR, pub EofChar: super::super::Foundation::CHAR, pub EvtChar: super::super::Foundation::CHAR, pub wReserved1: u16, } #[cfg(feature = "Win32_Foundation")] impl ::core::marker::Copy for DCB {} #[cfg(feature = "Win32_Foundation")] impl ::core::clone::Clone for DCB { fn clone(&self) -> Self { *self } } pub type ESCAPE_COMM_FUNCTION = u32; pub const CLRBREAK: ESCAPE_COMM_FUNCTION = 9u32; pub const CLRDTR: ESCAPE_COMM_FUNCTION = 6u32; pub const CLRRTS: ESCAPE_COMM_FUNCTION = 4u32; pub const SETBREAK: ESCAPE_COMM_FUNCTION = 8u32; pub const SETDTR: ESCAPE_COMM_FUNCTION = 5u32; pub const SETRTS: ESCAPE_COMM_FUNCTION = 3u32; pub const SETXOFF: ESCAPE_COMM_FUNCTION = 1u32; pub const SETXON: ESCAPE_COMM_FUNCTION = 2u32; pub const MAXLENGTH_NAI: u32 = 72u32; pub const MAXLENGTH_UICCDATASTORE: u32 = 10u32; pub const MDM_ANALOG_RLP_OFF: u32 = 1u32; pub const MDM_ANALOG_RLP_ON: u32 = 0u32; pub const MDM_ANALOG_V34: u32 = 2u32; pub const MDM_AUTO_ML_2: u32 = 2u32; pub const MDM_AUTO_ML_DEFAULT: u32 = 0u32; pub const MDM_AUTO_ML_NONE: u32 = 1u32; pub const MDM_AUTO_SPEED_DEFAULT: u32 = 0u32; pub const MDM_BEARERMODE_ANALOG: u32 = 0u32; pub const MDM_BEARERMODE_GSM: u32 = 2u32; pub const MDM_BEARERMODE_ISDN: u32 = 1u32; pub const MDM_BLIND_DIAL: u32 = 512u32; pub const MDM_CCITT_OVERRIDE: u32 = 64u32; pub const MDM_CELLULAR: u32 = 8u32; pub const MDM_COMPRESSION: u32 = 1u32; pub const MDM_DIAGNOSTICS: u32 = 2048u32; pub const MDM_ERROR_CONTROL: u32 = 2u32; pub const MDM_FLOWCONTROL_HARD: u32 = 16u32; pub const MDM_FLOWCONTROL_SOFT: u32 = 32u32; pub const MDM_FORCED_EC: u32 = 4u32; pub const MDM_HDLCPPP_AUTH_CHAP: u32 = 3u32; pub const MDM_HDLCPPP_AUTH_DEFAULT: u32 = 0u32; pub const MDM_HDLCPPP_AUTH_MSCHAP: u32 = 4u32; pub const MDM_HDLCPPP_AUTH_NONE: u32 = 1u32; pub const MDM_HDLCPPP_AUTH_PAP: u32 = 2u32; pub const MDM_HDLCPPP_ML_2: u32 = 2u32; pub const MDM_HDLCPPP_ML_DEFAULT: u32 = 0u32; pub const MDM_HDLCPPP_ML_NONE: u32 = 1u32; pub const MDM_HDLCPPP_SPEED_56K: u32 = 2u32; pub const MDM_HDLCPPP_SPEED_64K: u32 = 1u32; pub const MDM_HDLCPPP_SPEED_DEFAULT: u32 = 0u32; pub const MDM_MASK_AUTO_SPEED: u32 = 7u32; pub const MDM_MASK_BEARERMODE: u32 = 61440u32; pub const MDM_MASK_HDLCPPP_SPEED: u32 = 7u32; pub const MDM_MASK_PROTOCOLDATA: u32 = 267386880u32; pub const MDM_MASK_PROTOCOLID: u32 = 983040u32; pub const MDM_MASK_V110_SPEED: u32 = 15u32; pub const MDM_MASK_V120_SPEED: u32 = 7u32; pub const MDM_MASK_X75_DATA: u32 = 7u32; pub const MDM_PIAFS_INCOMING: u32 = 0u32; pub const MDM_PIAFS_OUTGOING: u32 = 1u32; pub const MDM_PROTOCOLID_ANALOG: u32 = 7u32; pub const MDM_PROTOCOLID_AUTO: u32 = 6u32; pub const MDM_PROTOCOLID_DEFAULT: u32 = 0u32; pub const MDM_PROTOCOLID_GPRS: u32 = 8u32; pub const MDM_PROTOCOLID_HDLCPPP: u32 = 1u32; pub const MDM_PROTOCOLID_PIAFS: u32 = 9u32; pub const MDM_PROTOCOLID_V110: u32 = 4u32; pub const MDM_PROTOCOLID_V120: u32 = 5u32; pub const MDM_PROTOCOLID_V128: u32 = 2u32; pub const MDM_PROTOCOLID_X75: u32 = 3u32; pub const MDM_SHIFT_AUTO_ML: u32 = 6u32; pub const MDM_SHIFT_AUTO_SPEED: u32 = 0u32; pub const MDM_SHIFT_BEARERMODE: u32 = 12u32; pub const MDM_SHIFT_EXTENDEDINFO: u32 = 12u32; pub const MDM_SHIFT_HDLCPPP_AUTH: u32 = 3u32; pub const MDM_SHIFT_HDLCPPP_ML: u32 = 6u32; pub const MDM_SHIFT_HDLCPPP_SPEED: u32 = 0u32; pub const MDM_SHIFT_PROTOCOLDATA: u32 = 20u32; pub const MDM_SHIFT_PROTOCOLID: u32 = 16u32; pub const MDM_SHIFT_PROTOCOLINFO: u32 = 16u32; pub const MDM_SHIFT_V110_SPEED: u32 = 0u32; pub const MDM_SHIFT_V120_ML: u32 = 6u32; pub const MDM_SHIFT_V120_SPEED: u32 = 0u32; pub const MDM_SHIFT_X75_DATA: u32 = 0u32; pub const MDM_SPEED_ADJUST: u32 = 128u32; pub const MDM_TONE_DIAL: u32 = 256u32; pub const MDM_V110_SPEED_12DOT0K: u32 = 5u32; pub const MDM_V110_SPEED_14DOT4K: u32 = 6u32; pub const MDM_V110_SPEED_19DOT2K: u32 = 7u32; pub const MDM_V110_SPEED_1DOT2K: u32 = 1u32; pub const MDM_V110_SPEED_28DOT8K: u32 = 8u32; pub const MDM_V110_SPEED_2DOT4K: u32 = 2u32; pub const MDM_V110_SPEED_38DOT4K: u32 = 9u32; pub const MDM_V110_SPEED_4DOT8K: u32 = 3u32; pub const MDM_V110_SPEED_57DOT6K: u32 = 10u32; pub const MDM_V110_SPEED_9DOT6K: u32 = 4u32; pub const MDM_V110_SPEED_DEFAULT: u32 = 0u32; pub const MDM_V120_ML_2: u32 = 2u32; pub const MDM_V120_ML_DEFAULT: u32 = 0u32; pub const MDM_V120_ML_NONE: u32 = 1u32; pub const MDM_V120_SPEED_56K: u32 = 2u32; pub const MDM_V120_SPEED_64K: u32 = 1u32; pub const MDM_V120_SPEED_DEFAULT: u32 = 0u32; pub const MDM_V23_OVERRIDE: u32 = 1024u32; pub const MDM_X75_DATA_128K: u32 = 2u32; pub const MDM_X75_DATA_64K: u32 = 1u32; pub const MDM_X75_DATA_BTX: u32 = 4u32; pub const MDM_X75_DATA_DEFAULT: u32 = 0u32; pub const MDM_X75_DATA_T_70: u32 = 3u32; #[repr(C)] pub struct MODEMDEVCAPS { pub dwActualSize: u32, pub dwRequiredSize: u32, pub dwDevSpecificOffset: u32, pub dwDevSpecificSize: u32, pub dwModemProviderVersion: u32, pub dwModemManufacturerOffset: u32, pub dwModemManufacturerSize: u32, pub dwModemModelOffset: u32, pub dwModemModelSize: u32, pub dwModemVersionOffset: u32, pub dwModemVersionSize: u32, pub dwDialOptions: MODEMDEVCAPS_DIAL_OPTIONS, pub dwCallSetupFailTimer: u32, pub dwInactivityTimeout: u32, pub dwSpeakerVolume: MODEMDEVCAPS_SPEAKER_VOLUME, pub dwSpeakerMode: MODEMDEVCAPS_SPEAKER_MODE, pub dwModemOptions: u32, pub dwMaxDTERate: u32, pub dwMaxDCERate: u32, pub abVariablePortion: [u8; 1], } impl ::core::marker::Copy for MODEMDEVCAPS {} impl ::core::clone::Clone for MODEMDEVCAPS { fn clone(&self) -> Self { *self } } pub type MODEMDEVCAPS_DIAL_OPTIONS = u32; pub const DIALOPTION_BILLING: MODEMDEVCAPS_DIAL_OPTIONS = 64u32; pub const DIALOPTION_DIALTONE: MODEMDEVCAPS_DIAL_OPTIONS = 256u32; pub const DIALOPTION_QUIET: MODEMDEVCAPS_DIAL_OPTIONS = 128u32; pub type MODEMDEVCAPS_SPEAKER_MODE = u32; pub const MDMSPKRFLAG_CALLSETUP: MODEMDEVCAPS_SPEAKER_MODE = 8u32; pub const MDMSPKRFLAG_DIAL: MODEMDEVCAPS_SPEAKER_MODE = 2u32; pub const MDMSPKRFLAG_OFF: MODEMDEVCAPS_SPEAKER_MODE = 1u32; pub const MDMSPKRFLAG_ON: MODEMDEVCAPS_SPEAKER_MODE = 4u32; pub type MODEMDEVCAPS_SPEAKER_VOLUME = u32; pub const MDMVOLFLAG_HIGH: MODEMDEVCAPS_SPEAKER_VOLUME = 4u32; pub const MDMVOLFLAG_LOW: MODEMDEVCAPS_SPEAKER_VOLUME = 1u32; pub const MDMVOLFLAG_MEDIUM: MODEMDEVCAPS_SPEAKER_VOLUME = 2u32; #[repr(C)] pub struct MODEMSETTINGS { pub dwActualSize: u32, pub dwRequiredSize: u32, pub dwDevSpecificOffset: u32, pub dwDevSpecificSize: u32, pub dwCallSetupFailTimer: u32, pub dwInactivityTimeout: u32, pub dwSpeakerVolume: MODEM_SPEAKER_VOLUME, pub dwSpeakerMode: MODEMSETTINGS_SPEAKER_MODE, pub dwPreferredModemOptions: u32, pub dwNegotiatedModemOptions: u32, pub dwNegotiatedDCERate: u32, pub abVariablePortion: [u8; 1], } impl ::core::marker::Copy for MODEMSETTINGS {} impl ::core::clone::Clone for MODEMSETTINGS { fn clone(&self) -> Self { *self } } pub type MODEMSETTINGS_SPEAKER_MODE = u32; pub const MDMSPKR_CALLSETUP: MODEMSETTINGS_SPEAKER_MODE = 8u32; pub const MDMSPKR_DIAL: MODEMSETTINGS_SPEAKER_MODE = 2u32; pub const MDMSPKR_OFF: MODEMSETTINGS_SPEAKER_MODE = 1u32; pub const MDMSPKR_ON: MODEMSETTINGS_SPEAKER_MODE = 4u32; pub type MODEM_SPEAKER_VOLUME = u32; pub const MDMVOL_HIGH: MODEM_SPEAKER_VOLUME = 2u32; pub const MDMVOL_LOW: MODEM_SPEAKER_VOLUME = 0u32; pub const MDMVOL_MEDIUM: MODEM_SPEAKER_VOLUME = 1u32; pub type MODEM_STATUS_FLAGS = u32; pub const MS_CTS_ON: MODEM_STATUS_FLAGS = 16u32; pub const MS_DSR_ON: MODEM_STATUS_FLAGS = 32u32; pub const MS_RING_ON: MODEM_STATUS_FLAGS = 64u32; pub const MS_RLSD_ON: MODEM_STATUS_FLAGS = 128u32; pub type PURGE_COMM_FLAGS = u32; pub const PURGE_RXABORT: PURGE_COMM_FLAGS = 2u32; pub const PURGE_RXCLEAR: PURGE_COMM_FLAGS = 8u32; pub const PURGE_TXABORT: PURGE_COMM_FLAGS = 1u32; pub const PURGE_TXCLEAR: PURGE_COMM_FLAGS = 4u32; pub const SID_3GPP_SUPSVCMODEL: ::windows_sys::core::GUID = ::windows_sys::core::GUID { data1: 3620769287, data2: 55143, data3: 17528, data4: [177, 74, 238, 204, 135, 234, 18, 247], };
use crate::sig::HasWrite; use nom::{ multi::count, number::complete::{le_f32, le_u16}, IResult, }; use std::fmt; #[derive(Debug)] // Поля публичные, добавить интерфейс pub struct Opening { pub num_points: u16, //Количество точек отверстия pub x_vec: Vec<f32>, //Последовательность х координат всех точек pub y_vec: Vec<f32>, //Последовательность у координат всех точек } impl HasWrite for Opening { fn write(&self) -> Vec<u8> { let mut out: Vec<u8> = vec![]; out.extend(&self.num_points.to_le_bytes()); for i in &self.x_vec { out.extend(&i.to_le_bytes()); } for i in &self.y_vec { out.extend(&i.to_le_bytes()); } out } fn name(&self) -> &str { "" } } impl fmt::Display for Opening { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "|{}|", &self.num_points) } } pub(crate) fn read_op(i: &[u8]) -> IResult<&[u8], Opening> { let (i, num_points) = le_u16(i)?; let (i, x_vec) = count(le_f32, num_points as usize)(i)?; let (i, y_vec) = count(le_f32, num_points as usize)(i)?; Ok(( i, Opening { num_points, x_vec, y_vec, }, )) }
// 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::scenic::types::ScreenshotDataDef; use failure::{Error, ResultExt}; use fidl_fuchsia_ui_app::{ViewConfig, ViewMarker, ViewProviderMarker}; use fidl_fuchsia_ui_policy::PresenterMarker; use fidl_fuchsia_ui_scenic::ScenicMarker; use fuchsia_component::{ self as app, client::{launch, launcher}, }; use fuchsia_scenic as scenic; use serde_json::{to_value, Value}; /// Perform Scenic operations. /// /// Note this object is shared among all threads created by server. /// /// This facade does not hold onto a Scenic proxy as the server may be /// long-running while individual tests set up and tear down Scenic. #[derive(Debug)] pub struct ScenicFacade {} impl ScenicFacade { pub fn new() -> ScenicFacade { ScenicFacade {} } pub async fn take_screenshot(&self) -> Result<Value, Error> { let scenic = app::client::connect_to_service::<ScenicMarker>().expect("failed to connect to Scenic"); let (screenshot, success) = scenic.take_screenshot().await?; if success { Ok(to_value(ScreenshotDataDef::new(screenshot))?) } else { bail!("TakeScreenshot failed") } } pub async fn present_view(&self, url: String, config: Option<ViewConfig>) -> Result<(), Error> { let presenter = app::client::connect_to_service::<PresenterMarker>() .expect("failed to connect to root presenter"); let launcher = launcher().context("Failed to open launcher service")?; let app = launch(&launcher, url, None)?; let mut token_pair = scenic::ViewTokenPair::new()?; // (for now) gate v1/v2 on the presence of a view config match config { Some(mut config) => { // v2 let view = app.connect_to_service::<ViewMarker>()?; view.set_config(&mut config)?; view.attach(token_pair.view_token.value)?; } None => { // v1 let view_provider = app.connect_to_service::<ViewProviderMarker>()?; view_provider.create_view(token_pair.view_token.value, None, None)?; } } presenter.present_view(&mut token_pair.view_holder_token, None)?; app.controller().detach()?; Ok(()) } }
macro_rules! bigint { ( $t:ident, $body:item ) => { #[cfg(feature="inclramp")] mod ramp { #[allow(dead_code)] type $t = ::RampBigInteger; $body } #[cfg(feature="inclgmp")] mod gmp { #[allow(dead_code)] type $t = ::GmpBigInteger; $body } #[cfg(feature="inclnum")] mod num { #[allow(dead_code)] type $t = ::NumBigInteger; $body } }; }
use sdl2::messagebox::*; use json; use std::fs::File; use std::io::Read; use std::io::Write; fn once_introduced() { let mut file = match File::open("./meta.json") { Err(err) => panic!("'meta.json' file is unable to be read. {}", err), Ok(file) => file, }; let mut buffer = String::new(); match file.read_to_string(&mut buffer) { Err(_) => panic!("File cannot be indexed."), Ok(file) => file, }; let mut obj = json::parse(buffer.as_str()).unwrap(); obj["introducted"] = json::JsonValue::Boolean(true); let serialize = json::stringify(obj); match file.write_all(serialize.as_bytes()) { Err(_) => panic!("Cannot write to meta file."), Ok(file) => file, } } fn already_introduced() -> bool { let mut file = match File::open("./meta.json") { Err(err) => panic!("'meta.json' file is unable to be opened. {}", err), Ok(file) => file, }; let mut buffer = String::new(); match file.read_to_string(&mut buffer) { Err(_) => panic!("File cannot be indexed."), Ok(file) => file, }; let obj = json::parse(buffer.as_str()).unwrap(); if obj["introduced"] == false { false } else { true } } pub fn introduce_client() { let buttons: Vec<_> = vec![ ButtonData { flags: MessageBoxButtonFlag::RETURNKEY_DEFAULT, button_id: 1, text: "Ok", } ]; if already_introduced() == false { show_message_box( MessageBoxFlag::WARNING, buttons.as_slice(), "Welcome to the Easy Discord Bot!", "", None, None, ); } else { once_introduced(); } }
// Following https://bodil.lol/parser-combinators/ // From the above: 'nom' is the state of the art in Rust parsers, 'pom' is like the following file, 'combine' is also popular. #![allow(dead_code)] // We will parse the following xml-subset: // <parent-element> // <single-element attribute="value" /> // </parent-element> // Introduce a type to avoid writing Fn(&str) -> Result<(&str, Output), &str> all the time // The lifetime is required, but can usually be inferred by the compiler type ParseResult<'a, Output> = Result<(&'a str, Output), &'a str>; trait Parser<'a, Output> { fn parse(&self, input: &'a str) -> ParseResult<'a, Output>; fn map<F, NewOutput>(self, map_fn: F) -> BoxedParser<'a, NewOutput> where Self: Sized + 'a, Output: 'a, NewOutput: 'a, F: Fn(Output) -> NewOutput + 'a, { BoxedParser::new(map(self, map_fn)) } fn pred<F>(self, pred_fn: F) -> BoxedParser<'a, Output> where Self: Sized + 'a, Output: 'a, F: Fn(&Output) -> bool + 'a, { BoxedParser::new(pred(self, pred_fn)) } fn and_then<F, NextParser, NewOutput>(self, f: F) -> BoxedParser<'a, NewOutput> where Self: Sized + 'a, Output: 'a, NewOutput: 'a, NextParser: Parser<'a, NewOutput> + 'a, F: Fn(Output) -> NextParser + 'a, { BoxedParser::new(and_then(self, f)) } } // Implement the trait for all functions that look like a parser impl<'a, F, Output> Parser<'a, Output> for F where F: Fn(&'a str) -> ParseResult<Output>, { fn parse(&self, input: &'a str) -> ParseResult<'a, Output> { self(input) } } // To avoid unlimited length return types which the compiler does not like, we allow using a pointer to a parser instead of a parser struct BoxedParser<'a, Output> { parser: Box<dyn Parser<'a, Output> + 'a>, } impl<'a, Output> BoxedParser<'a, Output> { fn new<P>(parser: P) -> Self where P: Parser<'a, Output> + 'a, { BoxedParser { parser: Box::new(parser), } } } impl<'a, Output> Parser<'a, Output> for BoxedParser<'a, Output> { fn parse(&self, input: &'a str) -> ParseResult<'a, Output> { self.parser.parse(input) } } // Our representation of an element is: #[derive(Clone, Debug, PartialEq, Eq)] struct Element { name: String, attributes: Vec<(String, String)>, children: Vec<Element>, } // A parser is basically Input -> Result<(RemainingInput, Output), Error> fn the_letter_a(input: &str) -> Result<(&str, ()), &str> { match input.chars().next() { Some('a') => Ok((&input['a'.len_utf8()..], ())), _ => Err(input), } } // A parser builder fn match_literal<'a>(expected: &'static str) -> impl Parser<'a, ()> { move |input: &'a str| match input.get(0..expected.len()) { // Match condition Some(next) if next == expected => Ok((&input[expected.len()..], ())), _ => Err(input), } } #[test] fn literal_parser() { let parse_joe = match_literal("Hello Joe!"); assert_eq!(Ok(("", ())), parse_joe.parse("Hello Joe!")); assert_eq!( Ok((" Hello Robert!", ())), parse_joe.parse("Hello Joe! Hello Robert!") ); assert_eq!(Err("Hello Mike!"), parse_joe.parse("Hello Mike!")); } // We'll write our own parser for identifiers instead of using the regex crate fn identifier<'a>(input: &'a str) -> ParseResult<String> { let mut matched = String::new(); let mut chars = input.chars(); match chars.next() { // The identifier must start with an alphabetic character Some(next) if next.is_alphabetic() => matched.push(next), _ => return Err(input), } for next in chars { // The rest of the characters in the identifier can be alphanumeric or '-' if next.is_alphanumeric() || next == '-' { matched.push(next); } else { break; } } let next_index = matched.len(); Ok((&input[next_index..], matched)) } #[test] fn identifier_parser() { assert_eq!( Ok(("", "i-am-an-identifier".to_string())), identifier("i-am-an-identifier") ); assert_eq!( Ok((" entirely an identifier", "not".to_string())), identifier("not entirely an identifier") ); assert_eq!( Err("!not at all an identifier"), identifier("!not at all an identifier") ) } // Parser combinators fn pair<'a, P1, P2, R1, R2>(parser1: P1, parser2: P2) -> impl Parser<'a, (R1, R2)> // impl Fn(&str) -> Result<(&str, (R1, R2)), &str> where P1: Parser<'a, R1>, // Fn(&str) -> Result<(&str, R1), &str>, P2: Parser<'a, R2>, // Fn(&str) -> Result<(&str, R2), &str>, { move |input| { // .and_then is like map, but returns a new Result instead of just mapping to a new type parser1.parse(input).and_then(|(next_input, result1)| { parser2 .parse(next_input) .map(|(last_input, result2)| (last_input, (result1, result2))) }) } } #[test] fn pair_combinator() { let tag_opener = pair(match_literal("<"), identifier); assert_eq!( Ok(("/>", ((), "my-first-element".to_string()))), tag_opener.parse("<my-first-element/>") ); assert_eq!(Err("oops"), tag_opener.parse("oops")); assert_eq!(Err("!oops"), tag_opener.parse("<!oops")); } // Parser functors - apply a function to the result of a parser // Before implementing Parser type and trait (body is the same if you delete the .parse): // fn map<P, F, A, B>(parser: P, map_fn: F) -> impl Fn(&str) -> Result<(&str, B), &str> // where // P: Fn(&str) -> Result<(&str, A), &str>, // F: Fn(A) -> B, // After implementing traits: fn map<'a, P, F, A, B>(parser: P, map_fn: F) -> impl Parser<'a, B> where P: Parser<'a, A>, F: Fn(A) -> B, { move |input| { parser .parse(input) .map(|(next_input, result)| (next_input, map_fn(result))) } } fn left<'a, P1, P2, R1, R2>(parser1: P1, parser2: P2) -> impl Parser<'a, R1> where P1: Parser<'a, R1>, P2: Parser<'a, R2>, { map(pair(parser1, parser2), |(left, _right)| left) } fn right<'a, P1, P2, R1, R2>(parser1: P1, parser2: P2) -> impl Parser<'a, R2> where P1: Parser<'a, R1>, P2: Parser<'a, R2>, { map(pair(parser1, parser2), |(_left, right)| right) } #[test] fn right_combinator() { let tag_opener = right(match_literal("<"), identifier); assert_eq!( Ok(("/>", "my-first-element".to_string())), tag_opener.parse("<my-first-element/>") ); assert_eq!(Err("oops"), tag_opener.parse("oops")); assert_eq!(Err("!oops"), tag_opener.parse("<!oops")); } // Basically the code from literal changed a little bit fn one_or_more<'a, P, A>(parser: P) -> impl Parser<'a, Vec<A>> where P: Parser<'a, A>, { move |mut input| { let mut result = Vec::new(); if let Ok((next_input, first_item)) = parser.parse(input) { input = next_input; result.push(first_item); } else { return Err(input); } while let Ok((next_input, next_item)) = parser.parse(input) { input = next_input; result.push(next_item); } Ok((input, result)) } } // We can match zero or more by just removing the first required match fn zero_or_more<'a, P, A>(parser: P) -> impl Parser<'a, Vec<A>> where P: Parser<'a, A>, { move |mut input| { let mut result = Vec::new(); while let Ok((next_input, next_item)) = parser.parse(input) { input = next_input; result.push(next_item); } Ok((input, result)) } } #[test] fn one_or_more_combinator() { let parser = one_or_more(match_literal("ha")); assert_eq!(Ok(("", vec![(), (), ()])), parser.parse("hahaha")); assert_eq!(Err("ahah"), parser.parse("ahah")); assert_eq!(Err(""), parser.parse("")); } #[test] fn zero_or_more_combinator() { let parser = zero_or_more(match_literal("ha")); assert_eq!(Ok(("", vec![(), (), ()])), parser.parse("hahaha")); assert_eq!(Ok(("ahah", vec![])), parser.parse("ahah")); assert_eq!(Ok(("", vec![])), parser.parse("")); } fn any_char(input: &str) -> ParseResult<char> { match input.chars().next() { Some(next) => Ok((&input[next.len_utf8()..], next)), _ => Err(input), } } fn pred<'a, P, A, F>(parser: P, predicate: F) -> impl Parser<'a, A> where P: Parser<'a, A>, F: Fn(&A) -> bool, { move |input| { if let Ok((next_input, value)) = parser.parse(input) { if predicate(&value) { return Ok((next_input, value)); } } Err(input) } } #[test] fn predicate_combinator() { let parser = pred(any_char, |c| *c == 'o'); assert_eq!(Ok(("mg", 'o')), parser.parse("omg")); assert_eq!(Err("lol"), parser.parse("lol")); } fn whitespace_char<'a>() -> impl Parser<'a, char> { pred(any_char, |c| c.is_whitespace()) } fn space1<'a>() -> impl Parser<'a, Vec<char>> { one_or_more(whitespace_char()) } fn space0<'a>() -> impl Parser<'a, Vec<char>> { zero_or_more(whitespace_char()) } fn quoted_string<'a>() -> impl Parser<'a, String> { // Discard opening quote right( match_literal("\""), // Opening quote // Discard closing quote left( zero_or_more(any_char.pred(|c| *c != '"')), // Zero or more non-quote characters match_literal("\""), // Ending quote ), ) .map(|chars| chars.into_iter().collect()) // Turn a Vec<char> to a String } #[test] fn quoted_string_parser() { assert_eq!( Ok(("", "Hello Joe".to_string())), quoted_string().parse("\"Hello Joe\"") ) } fn attribute_pair<'a>() -> impl Parser<'a, (String, String)> { pair(identifier, right(match_literal("="), quoted_string())) } fn attributes<'a>() -> impl Parser<'a, Vec<(String, String)>> { zero_or_more(right(space1(), attribute_pair())) } #[test] fn attribute_parser() { assert_eq!( Ok(( "", vec![ ("one".to_string(), "1".to_string()), ("two".to_string(), "2".to_string()) ] )), attributes().parse(" one=\"1\" two=\"2\"") ) } fn element_start<'a>() -> impl Parser<'a, (String, Vec<(String, String)>)> { right(match_literal("<"), pair(identifier, attributes())) } fn single_element<'a>() -> impl Parser<'a, Element> { left(element_start(), match_literal("/>")).map(|(name, attributes)| Element { name, attributes, children: vec![], }) } #[test] fn single_element_parser() { assert_eq!( Ok(( "", Element { name: "div".to_string(), attributes: vec![("class".to_string(), "float".to_string())], children: vec![] } )), single_element().parse("<div class=\"float\"/>") ) } fn open_element<'a>() -> impl Parser<'a, Element> { left(element_start(), match_literal(">")).map(|(name, attributes)| Element { name, attributes, children: vec![], }) } // Match parser1, or if that fails match parser2 fn either<'a, P1, P2, A>(parser1: P1, parser2: P2) -> impl Parser<'a, A> where P1: Parser<'a, A>, P2: Parser<'a, A>, { move |input| match parser1.parse(input) { ok @ Ok(_) => ok, Err(_) => parser2.parse(input), } } // An element is either a single_element or a parent_element, surrounded by whitespace fn element<'a>() -> impl Parser<'a, Element> { whitespace_wrap(either(single_element(), parent_element())) } fn close_element<'a>(expected_name: String) -> impl Parser<'a, String> { right(match_literal("</"), left(identifier, match_literal(">"))) .pred(move |name| name == &expected_name) } // Take a parser and a function that takes the result of the parser and gives a new parser, which is then run on the rest of the input // This is and_then from Result/Option for our parsers fn and_then<'a, P, F, A, B, NextP>(parser: P, f: F) -> impl Parser<'a, B> where P: Parser<'a, A>, NextP: Parser<'a, B>, F: Fn(A) -> NextP, { move |input| match parser.parse(input) { Ok((next_input, result)) => f(result).parse(next_input), Err(err) => Err(err), } } fn parent_element<'a>() -> impl Parser<'a, Element> { open_element().and_then(|e1| { left(zero_or_more(element()), close_element(e1.name.clone())).map(move |children| { // children is a Vec of children, the result of out zero_or_more(element()) parser let mut e1 = e1.clone(); e1.children = children; e1 }) }) } // Given a parser, make it ignore whitespace before and after fn whitespace_wrap<'a, P, A>(parser: P) -> impl Parser<'a, A> where P: Parser<'a, A>, { right(space0(), left(parser, space0())) } #[test] fn xml_parser() { let doc = r#" <top label="Top"> <semi-bottom label="Bottom"/> <middle> <bottom label="Another bottom"/> </middle> </top>"#; let parsed_doc = Element { name: "top".to_string(), attributes: vec![("label".to_string(), "Top".to_string())], children: vec![ Element { name: "semi-bottom".to_string(), attributes: vec![("label".to_string(), "Bottom".to_string())], children: vec![], }, Element { name: "middle".to_string(), attributes: vec![], children: vec![Element { name: "bottom".to_string(), attributes: vec![("label".to_string(), "Another bottom".to_string())], children: vec![], }], }, ], }; assert_eq!(Ok(("", parsed_doc)), element().parse(doc)); } #[test] fn mismatched_closing_tag() { let doc = r#" <top> <bottom/> </middle>"#; assert_eq!(Err("</middle>"), element().parse(doc)); } fn main() { println!("Hello, world!"); }
// Author: Artyom Liu use clap::{Arg, App}; mod http; // parse/deliver the http packet mod config; // parse the given config file in TOML form mod mthread; // thread pool for multi-thread use crate::config::Config; use crate::mthread::ThreadPool; use std::process::exit; use std::sync::Mutex; use lazy_static::*; lazy_static! { static ref TP: Mutex<Option<ThreadPool>> = Mutex::new(None); } fn main() { // load configurations from command-line let matches = App::new("Melantha") .version(format!("{}.{}", env!("CARGO_PKG_VERSION_MAJOR"), env!("CARGO_PKG_VERSION_MINOR") ).as_str()) .author( format!("{}", env!("CARGO_PKG_AUTHORS"), ).as_str() ) .about("A simple web server") .arg(Arg::with_name("config") .short("f") .long("file") .takes_value(true) .help("Config file for server to run, default as \"./config.toml\"")) .arg(Arg::with_name("port") .short("p") .long("port") .takes_value(true) .help("Assign the port for socket to listen")) .arg(Arg::with_name("root_path") .short("r") .long("root") .takes_value(true) .help("Root path of server")) .get_matches(); let config_file = matches.value_of("config").unwrap_or("./config.toml"); let mut config = Config::read_from(config_file); if let Some(port) = matches.value_of("port") { config.port = String::from(port); } if let Some(root_path) = matches.value_of("root_path") { config.root_path = String::from(root_path); } let config = config; // make it constant println!("port: {}", config.port); println!("root: {}", config.root_path); // initialize thread pool for multi-threading *TP.lock().unwrap() = Some(ThreadPool::new(4)); // initialize signal handler for Ctrl-C, to shutdown and exit ctrlc::set_handler(|| { println!("{} exit, thanks for your using", env!("CARGO_PKG_NAME")); exit(0); }).unwrap(); // initialize socket let listener = http::init(&config.port).unwrap(); for stream in listener.incoming() { let stream = stream.unwrap(); if let Some(mut res) = http::resolve_request( &config.root_path, stream ) { println!("filetype: {}", res.filetype.as_str()); TP.lock().unwrap().as_mut().unwrap().execute(move || { match res.solve() { Ok(_) => {}, Err(e) => eprintln!("An error happens: {}", e), }; }).unwrap(); } } }
use chars::human_names; use proptest::prelude::*; use std::fmt::Write; fn diagnostics(ch: char, query: &str) -> String { format!( "char: {:?} / {}, query: {:?}", ch, ch.escape_unicode(), query ) } proptest! { #![proptest_config(ProptestConfig::with_cases(100_000))] #[test] fn find_any_by_identity(ch in prop::char::any()) { let mut chstr = String::new(); chstr.write_char(ch).unwrap(); let found = human_names::from_arg(&chstr); assert!(!found.is_empty()); assert!(found.contains(&ch)); } #[test] fn find_by_name(ch in prop::char::any().prop_filter("Must have a name", |c| unicode_names2::name(*c).is_some())) { let query = unicode_names2::name(ch).unwrap().to_string(); let found = human_names::from_arg(&query); assert!(!found.is_empty(), "{}", diagnostics(ch, &query)); assert!(found.contains(&ch), "{}", diagnostics(ch, &query)); } #[test] fn find_any_by_hex(ch in prop::char::any()) { let num = ch as u32; let query = format!("0x{:04x}", num); let found = human_names::from_arg(&query); println!("num: {:?}", num); assert_eq!(found.len(), 1, "{}", diagnostics(ch, &query)); assert_eq!(found[0], ch, "{}", diagnostics(ch, &query)); let query = format!("U+{:04x}", num); let found = human_names::from_arg(&query); assert_eq!(found.len(), 1, "{}", diagnostics(ch, &query)); assert_eq!(found[0], ch, "{}", diagnostics(ch, &query)); let query = format!("{:04x}", num); let found = human_names::from_arg(&query); assert!(!found.is_empty(), "{}", diagnostics(ch, &query)); assert!(found.contains(&ch), "{}", diagnostics(ch, &query)); } #[test] fn find_control_chars(ch in prop::char::range(0 as char, 0x1f as char)) { let query = format!("^{}", (b'@' + (ch as u8 & 0x1f)) as char); let found = human_names::from_arg(&query); assert_eq!(found.len(), 1, "nothing found for query: {:?}", query); assert_eq!(found[0], ch, "query: {:?}", query); } }
#[doc = "Reader of register LPMCNTRL"] pub type R = crate::R<u8, super::LPMCNTRL>; #[doc = "Reader of field `TXLPM`"] pub type TXLPM_R = crate::R<bool, bool>; #[doc = "Reader of field `RES`"] pub type RES_R = crate::R<bool, bool>; #[doc = "LPM Enable\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum EN_A { #[doc = "0: LPM and Extended transactions are not supported. In this case, the USB does not respond to LPM transactions and LPM transactions cause a timeout"] NONE = 0, #[doc = "1: LPM is not supported but extended transactions are supported. In this case, the USB does respond to an LPM transaction with a STALL"] EXT = 1, #[doc = "3: The USB supports LPM extended transactions. In this case, the USB responds with a NYET or an ACK as determined by the value of TXLPM and other conditions"] LPMEXT = 3, } impl From<EN_A> for u8 { #[inline(always)] fn from(variant: EN_A) -> Self { variant as _ } } #[doc = "Reader of field `EN`"] pub type EN_R = crate::R<u8, EN_A>; impl EN_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, EN_A> { use crate::Variant::*; match self.bits { 0 => Val(EN_A::NONE), 1 => Val(EN_A::EXT), 3 => Val(EN_A::LPMEXT), i => Res(i), } } #[doc = "Checks if the value of the field is `NONE`"] #[inline(always)] pub fn is_none(&self) -> bool { *self == EN_A::NONE } #[doc = "Checks if the value of the field is `EXT`"] #[inline(always)] pub fn is_ext(&self) -> bool { *self == EN_A::EXT } #[doc = "Checks if the value of the field is `LPMEXT`"] #[inline(always)] pub fn is_lpmext(&self) -> bool { *self == EN_A::LPMEXT } } #[doc = "Reader of field `NAK`"] pub type NAK_R = crate::R<bool, bool>; impl R { #[doc = "Bit 0 - Transmit LPM Transaction Enable"] #[inline(always)] pub fn txlpm(&self) -> TXLPM_R { TXLPM_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - LPM Resume"] #[inline(always)] pub fn res(&self) -> RES_R { RES_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bits 2:3 - LPM Enable"] #[inline(always)] pub fn en(&self) -> EN_R { EN_R::new(((self.bits >> 2) & 0x03) as u8) } #[doc = "Bit 4 - LPM NAK"] #[inline(always)] pub fn nak(&self) -> NAK_R { NAK_R::new(((self.bits >> 4) & 0x01) != 0) } }
use super::{ ifaces::RwLockIface, ttas::{TTas, TTasGuard}, }; use std::cell::UnsafeCell; use std::{ fmt, time::{Duration, Instant}, }; use std::{ marker::PhantomData as marker, ops::{Deref, DerefMut}, }; use std::{thread, thread::ThreadId}; const READ_OPTIMIZED_ALLOC: usize = 50_usize; struct ThreadRef { id: ThreadId, count: usize, } impl ThreadRef { #[inline] pub fn new(count: usize) -> Self { Self { id: thread::current().id(), count, } } #[inline] pub fn is_current(&self) -> bool { thread::current().id() == self.id } #[inline] pub fn try_inc(&mut self) -> bool { if self.is_current() { self.count = match self.count.checked_add(1) { Some(x) => x, _ => return false, }; true } else { false } } #[inline] pub fn try_dec(&mut self) -> bool { if self.is_current() { self.count = match self.count.checked_sub(1) { Some(x) => x, _ => return false, }; true } else { false } } #[inline] pub fn is_positive(&self) -> bool { self.count > 0 } } impl fmt::Debug for ThreadRef { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("ThreadRef") .field("id", &self.id) .field("count", &self.count) .finish() } } struct Container { writer: Option<ThreadRef>, readers: Vec<ThreadRef>, } impl Container { pub fn new() -> Self { Self { writer: None, readers: Vec::with_capacity(READ_OPTIMIZED_ALLOC), } } pub fn readers_from_single_thread(&self) -> (bool, Option<&ThreadRef>) { let mut reader = None; for counter in self.readers.iter() { if counter.is_positive() { match reader { Some(_) => return (false, None), None => reader = Some(counter), } } } (true, reader) } fn readers_for_current_thread(&mut self) -> &mut ThreadRef { match self.readers.iter().position(|c| c.is_current()) { Some(index) => &mut self.readers[index], None => { self.readers.push(ThreadRef::new(0_usize)); self.readers .last_mut() .expect("Last element was just added right before!") } } } fn writer_from_current_thread(&mut self) -> bool { self.writer.as_ref().map_or(false, |ow| ow.is_current()) } } // Write Guard pub struct ReentrantWriteGuard<'a, T: ?Sized> where ReentrantRwLock<T>: 'a, { lock: &'a ReentrantRwLock<T>, marker: marker<&'a mut T>, } impl<'a, T: ?Sized> Deref for ReentrantWriteGuard<'a, T> where ReentrantRwLock<T>: 'a, { type Target = T; fn deref(&self) -> &T { unsafe { &*self.lock.data.get() } } } impl<'a, T: ?Sized> DerefMut for ReentrantWriteGuard<'a, T> where ReentrantRwLock<T>: 'a, { fn deref_mut(&mut self) -> &mut T { unsafe { &mut *self.lock.data.get() } } } impl<'a, T: ?Sized> Drop for ReentrantWriteGuard<'a, T> { fn drop(&mut self) { let mut c = self.lock.get_container().unwrap(); c.try_release_write(); if thread::panicking() { // TODO: Drop all the guards on poisoned data. // c.try_release_write(); c.try_release_read(); } } } impl<'a, T> fmt::Debug for ReentrantWriteGuard<'a, T> where T: fmt::Debug + ?Sized + 'a, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Debug::fmt(&**self, f) } } impl<'a, T> fmt::Display for ReentrantWriteGuard<'a, T> where T: fmt::Display + ?Sized + 'a, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { (**self).fmt(f) } } // Read Guard pub struct ReentrantReadGuard<'a, T: ?Sized> where ReentrantRwLock<T>: 'a, { lock: &'a ReentrantRwLock<T>, marker: marker<&'a T>, } impl<'a, T: ?Sized> Deref for ReentrantReadGuard<'a, T> where ReentrantRwLock<T>: 'a, { type Target = T; fn deref(&self) -> &T { unsafe { &*self.lock.data.get() } } } impl<'a, T: ?Sized> Drop for ReentrantReadGuard<'a, T> { fn drop(&mut self) { self.lock.get_container().unwrap().try_release_read(); } } impl<'a, T> fmt::Debug for ReentrantReadGuard<'a, T> where T: fmt::Debug + ?Sized + 'a, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Debug::fmt(&**self, f) } } impl<'a, T> fmt::Display for ReentrantReadGuard<'a, T> where T: fmt::Display + ?Sized + 'a, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { (**self).fmt(f) } } /// /// Lock-free Reentrant RW Lock implementation. pub struct ReentrantRwLock<T> where T: ?Sized, { container: TTas<Container>, data: UnsafeCell<T>, } unsafe impl<T: ?Sized + Send> Send for ReentrantRwLock<T> {} unsafe impl<T: ?Sized + Send> Sync for ReentrantRwLock<T> {} impl<T> ReentrantRwLock<T> where T: ?Sized, { #[inline] pub fn get_mut(&mut self) -> &mut T { unsafe { &mut *self.data.get() } } #[inline] fn get_container(&self) -> Option<TTasGuard<Container>> { self.container.try_lock() } } impl<T> ReentrantRwLock<T> { pub fn new(data: T) -> Self { Self { container: TTas::new(Container::new()), data: UnsafeCell::new(data), } } #[inline] pub fn into_inner(self) -> T { self.data.into_inner() } // Exposed methods #[inline] pub fn read(&self) -> ReentrantReadGuard<'_, T> { loop { match self.try_read() { Some(guard) => return guard, None => thread::yield_now(), } } } #[inline] pub fn try_read(&self) -> Option<ReentrantReadGuard<'_, T>> { let cont = self.get_container(); match cont { Some(mut c) => { if c.try_lock_read() { Some(ReentrantReadGuard { lock: self, marker }) } else { None } } _ => None, } } #[inline] pub fn write(&self) -> ReentrantWriteGuard<'_, T> { loop { match self.try_write() { Some(guard) => return guard, None => thread::yield_now(), } } } #[inline] pub fn try_write(&self) -> Option<ReentrantWriteGuard<'_, T>> { let cont = self.get_container(); match cont { Some(mut c) => { if c.try_lock_write() { Some(ReentrantWriteGuard { lock: self, marker }) } else { None } } _ => None, } } #[inline] pub fn is_locked(&self) -> bool { self.try_write().is_none() } #[inline] pub fn try_write_lock_for(&self, timeout: Duration) -> Option<ReentrantWriteGuard<'_, T>> { let deadline = Instant::now() .checked_add(timeout) .expect("Deadline can't fit in"); loop { if Instant::now() < deadline { match self.try_write() { Some(guard) => { break Some(guard); } _ => { std::thread::sleep(timeout / 10); std::thread::yield_now() } }; } else { break None; } } } #[inline] pub fn is_writer_held_by_current(&self) -> bool { loop { if let Some(mut cont) = self.get_container() { break cont.writer_from_current_thread(); } else { thread::yield_now(); } } } } unsafe impl RwLockIface for Container { fn try_lock_read(&mut self) -> bool { if let Some(holder) = &mut self.writer { if !holder.is_current() { return false; } } self.readers_for_current_thread().try_inc() } fn try_release_read(&mut self) -> bool { self.readers_for_current_thread().try_dec() } fn try_lock_write(&mut self) -> bool { if let Some(holder) = &mut self.writer { return holder.try_inc(); } match self.readers_from_single_thread() { (true, Some(holder)) => { if !holder.is_current() { return false; } } // (true, None) => {} (false, _) => return false, _ => {} } self.writer = Some(ThreadRef::new(1_usize)); true } fn try_release_write(&mut self) -> bool { match &mut self.writer { Some(holder) => holder.try_dec(), None => false, } } } #[cfg(test)] mod reentrant_lock_tests { use super::*; #[test] fn rwlock_create_and_reacquire_write_lock() { let rew = ReentrantRwLock::new(144); let data = rew.try_read(); assert!(data.is_some()); assert!(rew.try_read().is_some()); assert!(rew.try_read().is_some()); core::mem::drop(data); assert!(rew.try_write().is_some()); assert!(rew.try_read().is_some()); } #[test] fn rwlock_create_and_reacquire_read_lock() { let rew = ReentrantRwLock::new(144); let data = rew.try_read(); assert!(data.is_some()); assert!(rew.try_read().is_some()); assert!(rew.try_read().is_some()); core::mem::drop(data); assert!(rew.try_read().is_some()); assert!(rew.try_write().is_some()); } #[test] fn rwlock_reacquire_without_drop() { let rew = ReentrantRwLock::new(144); let datar = rew.read(); assert_eq!(*datar, 144); assert!(rew.try_read().is_some()); assert!(rew.try_read().is_some()); assert!(rew.try_write().is_some()); // Write data while holding read guard let mut dataw = rew.write(); *dataw += 288; // Read after write guard let datar2 = rew.read(); assert_eq!(*datar2, 432); } }
use amethyst::core::Time; use amethyst::core::ecs::{WriteStorage, System, Read, WriteExpect, World}; use amethyst::ui::UiText; use crate::timer::TimerText; use amethyst::prelude::SystemDesc; use amethyst::core::ecs::shred::SystemData; use crate::state::Pause; pub struct TimerSystem; impl<'a, 'b> SystemDesc<'a, 'b, TimerSystem> for TimerSystem { fn build(self, world: &mut World) -> TimerSystem { <TimerSystem as System>::SystemData::setup(world); TimerSystem } } impl<'s> System<'s> for TimerSystem { type SystemData = ( Read<'s, Time>, WriteExpect<'s, TimerText>, WriteStorage<'s, UiText>, Read<'s, Pause>, ); fn run(&mut self, (time, mut timer_text, mut ui_text, pause): Self::SystemData) { if pause.paused { return; } if let Some(timer) = timer_text.timer { let ui = ui_text.get_mut(timer).unwrap(); let as_float = ui.text.parse::<f32>().unwrap(); timer_text.game_time += time.delta_seconds(); if timer_text.game_time - as_float > 0.1 { ui.text = format!("{:.1}", timer_text.game_time); } } } }