text
stringlengths
8
4.13M
use std::{path::Path}; use crate::error::Error; pub enum SamplingKind { WithReplacement, WithoutReplacement, } pub trait SampleText { fn sample( src: &Path, dst: &Path, sample_size: usize, sampling: SamplingKind, ) -> Result<(), Error>; }
// 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 // pretty-expanded FIXME #23616 use std::default::Default; struct X { pub x: usize } impl Default for X { fn default() -> X { X { x: 42 } } } struct Y<T> { pub y: T } impl<T: Default> Default for Y<T> { fn default() -> Y<T> { Y { y: Default::default() } } } fn main() { let X { x: _ } = Default::default(); let Y { y: X { x } } = Default::default(); }
use serde::{Serialize, Deserialize}; use std::io::Write; #[derive(Debug, Serialize, Deserialize)] pub struct Array{ pub values: Vec<String> } impl Array{ #[inline] pub fn walk(&self, name: &str, mut file: &std::fs::File, depth: u64){ let t = (0..depth).map(|_| "\t").collect::<String>(); let t2 = (0..=depth).map(|_| "\t").collect::<String>(); file.write_all(format!("{}{}[]={{\r\n",t, name).as_bytes()).unwrap(); for v in &self.values { file.write_all(format!("{}{},\r\n",t2, v).as_bytes()).unwrap(); } file.write_all(format!("{}}};\r\n", t).as_bytes()).unwrap(); } }
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] #[cfg(feature = "Devices_Spi_Provider")] pub mod Provider; #[repr(transparent)] #[doc(hidden)] pub struct ISpiBusInfo(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpiBusInfo { type Vtable = ISpiBusInfo_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9929444a_54f2_48c6_b952_9c32fc02c669); } #[repr(C)] #[doc(hidden)] pub struct ISpiBusInfo_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, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation_Collections")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation_Collections"))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpiConnectionSettings(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpiConnectionSettings { type Vtable = ISpiConnectionSettings_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5283a37f_f935_4b9f_a7a7_3a7890afa5ce); } #[repr(C)] #[doc(hidden)] pub struct ISpiConnectionSettings_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, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut SpiMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: SpiMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut SpiSharingMode) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: SpiSharingMode) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpiConnectionSettingsFactory(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpiConnectionSettingsFactory { type Vtable = ISpiConnectionSettingsFactory_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xff99081e_10c4_44b7_9fea_a748b5a46f31); } #[repr(C)] #[doc(hidden)] pub struct ISpiConnectionSettingsFactory_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, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, chipselectline: i32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpiController(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpiController { type Vtable = ISpiController_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa8d3c829_9895_4159_a934_8741f1ee6d27); } #[repr(C)] #[doc(hidden)] pub struct ISpiController_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, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, settings: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpiControllerStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpiControllerStatics { type Vtable = ISpiControllerStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0d5229e2_138b_4e48_b964_4f2f79b9c5a2); } #[repr(C)] #[doc(hidden)] pub struct ISpiControllerStatics_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, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, #[cfg(all(feature = "Devices_Spi_Provider", feature = "Foundation", feature = "Foundation_Collections"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, provider: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Devices_Spi_Provider", feature = "Foundation", feature = "Foundation_Collections")))] usize, ); #[repr(transparent)] #[doc(hidden)] pub struct ISpiDevice(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpiDevice { type Vtable = ISpiDevice_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x05d5356d_11b6_4d39_84d5_95dfb4c9f2ce); } #[repr(C)] #[doc(hidden)] pub struct ISpiDevice_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, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, buffer_array_size: u32, buffer: *const u8) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, buffer_array_size: u32, buffer: *mut u8) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, writeBuffer_array_size: u32, writebuffer: *const u8, readBuffer_array_size: u32, readbuffer: *mut u8) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, writeBuffer_array_size: u32, writebuffer: *const u8, readBuffer_array_size: u32, readbuffer: *mut u8) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct ISpiDeviceStatics(pub ::windows::core::IInspectable); unsafe impl ::windows::core::Interface for ISpiDeviceStatics { type Vtable = ISpiDeviceStatics_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa278e559_5720_4d3f_bd93_56f5ff5a5879); } impl ISpiDeviceStatics { pub fn GetDeviceSelector(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn GetDeviceSelectorFromFriendlyName<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, friendlyname: Param0) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), friendlyname.into_param().abi(), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn GetBusInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, busid: Param0) -> ::windows::core::Result<SpiBusInfo> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), busid.into_param().abi(), &mut result__).from_abi::<SpiBusInfo>(result__) } } #[cfg(feature = "Foundation")] pub fn FromIdAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, SpiConnectionSettings>>(&self, busid: Param0, settings: Param1) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<SpiDevice>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), busid.into_param().abi(), settings.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<SpiDevice>>(result__) } } } unsafe impl ::windows::core::RuntimeType for ISpiDeviceStatics { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"{a278e559-5720-4d3f-bd93-56f5ff5a5879}"); } impl ::core::convert::From<ISpiDeviceStatics> for ::windows::core::IUnknown { fn from(value: ISpiDeviceStatics) -> Self { value.0 .0 } } impl ::core::convert::From<&ISpiDeviceStatics> for ::windows::core::IUnknown { fn from(value: &ISpiDeviceStatics) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for ISpiDeviceStatics { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a ISpiDeviceStatics { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<ISpiDeviceStatics> for ::windows::core::IInspectable { fn from(value: ISpiDeviceStatics) -> Self { value.0 } } impl ::core::convert::From<&ISpiDeviceStatics> for ::windows::core::IInspectable { fn from(value: &ISpiDeviceStatics) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for ISpiDeviceStatics { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a ISpiDeviceStatics { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct ISpiDeviceStatics_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, count: *mut u32, values: *mut *mut ::windows::core::GUID) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, value: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, friendlyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, busid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, busid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, settings: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SpiBusInfo(pub ::windows::core::IInspectable); impl SpiBusInfo { pub fn ChipSelectLineCount(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn MinClockFrequency(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn MaxClockFrequency(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } #[cfg(feature = "Foundation_Collections")] pub fn SupportedDataBitLengths(&self) -> ::windows::core::Result<super::super::Foundation::Collections::IVectorView<i32>> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::Collections::IVectorView<i32>>(result__) } } } unsafe impl ::windows::core::RuntimeType for SpiBusInfo { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.Spi.SpiBusInfo;{9929444a-54f2-48c6-b952-9c32fc02c669})"); } unsafe impl ::windows::core::Interface for SpiBusInfo { type Vtable = ISpiBusInfo_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9929444a_54f2_48c6_b952_9c32fc02c669); } impl ::windows::core::RuntimeName for SpiBusInfo { const NAME: &'static str = "Windows.Devices.Spi.SpiBusInfo"; } impl ::core::convert::From<SpiBusInfo> for ::windows::core::IUnknown { fn from(value: SpiBusInfo) -> Self { value.0 .0 } } impl ::core::convert::From<&SpiBusInfo> for ::windows::core::IUnknown { fn from(value: &SpiBusInfo) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SpiBusInfo { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SpiBusInfo { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SpiBusInfo> for ::windows::core::IInspectable { fn from(value: SpiBusInfo) -> Self { value.0 } } impl ::core::convert::From<&SpiBusInfo> for ::windows::core::IInspectable { fn from(value: &SpiBusInfo) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SpiBusInfo { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SpiBusInfo { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for SpiBusInfo {} unsafe impl ::core::marker::Sync for SpiBusInfo {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SpiConnectionSettings(pub ::windows::core::IInspectable); impl SpiConnectionSettings { pub fn ChipSelectLine(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetChipSelectLine(&self, value: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), value).ok() } } pub fn Mode(&self) -> ::windows::core::Result<SpiMode> { let this = self; unsafe { let mut result__: SpiMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SpiMode>(result__) } } pub fn SetMode(&self, value: SpiMode) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), value).ok() } } pub fn DataBitLength(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetDataBitLength(&self, value: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), value).ok() } } pub fn ClockFrequency(&self) -> ::windows::core::Result<i32> { let this = self; unsafe { let mut result__: i32 = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).12)(::core::mem::transmute_copy(this), &mut result__).from_abi::<i32>(result__) } } pub fn SetClockFrequency(&self, value: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).13)(::core::mem::transmute_copy(this), value).ok() } } pub fn SharingMode(&self) -> ::windows::core::Result<SpiSharingMode> { let this = self; unsafe { let mut result__: SpiSharingMode = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).14)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SpiSharingMode>(result__) } } pub fn SetSharingMode(&self, value: SpiSharingMode) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).15)(::core::mem::transmute_copy(this), value).ok() } } pub fn Create(chipselectline: i32) -> ::windows::core::Result<SpiConnectionSettings> { Self::ISpiConnectionSettingsFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), chipselectline, &mut result__).from_abi::<SpiConnectionSettings>(result__) }) } pub fn ISpiConnectionSettingsFactory<R, F: FnOnce(&ISpiConnectionSettingsFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<SpiConnectionSettings, ISpiConnectionSettingsFactory> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for SpiConnectionSettings { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.Spi.SpiConnectionSettings;{5283a37f-f935-4b9f-a7a7-3a7890afa5ce})"); } unsafe impl ::windows::core::Interface for SpiConnectionSettings { type Vtable = ISpiConnectionSettings_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5283a37f_f935_4b9f_a7a7_3a7890afa5ce); } impl ::windows::core::RuntimeName for SpiConnectionSettings { const NAME: &'static str = "Windows.Devices.Spi.SpiConnectionSettings"; } impl ::core::convert::From<SpiConnectionSettings> for ::windows::core::IUnknown { fn from(value: SpiConnectionSettings) -> Self { value.0 .0 } } impl ::core::convert::From<&SpiConnectionSettings> for ::windows::core::IUnknown { fn from(value: &SpiConnectionSettings) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SpiConnectionSettings { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SpiConnectionSettings { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SpiConnectionSettings> for ::windows::core::IInspectable { fn from(value: SpiConnectionSettings) -> Self { value.0 } } impl ::core::convert::From<&SpiConnectionSettings> for ::windows::core::IInspectable { fn from(value: &SpiConnectionSettings) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SpiConnectionSettings { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SpiConnectionSettings { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for SpiConnectionSettings {} unsafe impl ::core::marker::Sync for SpiConnectionSettings {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SpiController(pub ::windows::core::IInspectable); impl SpiController { pub fn GetDevice<'a, Param0: ::windows::core::IntoParam<'a, SpiConnectionSettings>>(&self, settings: Param0) -> ::windows::core::Result<SpiDevice> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), settings.into_param().abi(), &mut result__).from_abi::<SpiDevice>(result__) } } #[cfg(feature = "Foundation")] pub fn GetDefaultAsync() -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<SpiController>> { Self::ISpiControllerStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<SpiController>>(result__) }) } #[cfg(all(feature = "Devices_Spi_Provider", feature = "Foundation", feature = "Foundation_Collections"))] pub fn GetControllersAsync<'a, Param0: ::windows::core::IntoParam<'a, Provider::ISpiProvider>>(provider: Param0) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<SpiController>>> { Self::ISpiControllerStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), provider.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<super::super::Foundation::Collections::IVectorView<SpiController>>>(result__) }) } pub fn ISpiControllerStatics<R, F: FnOnce(&ISpiControllerStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<SpiController, ISpiControllerStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for SpiController { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.Spi.SpiController;{a8d3c829-9895-4159-a934-8741f1ee6d27})"); } unsafe impl ::windows::core::Interface for SpiController { type Vtable = ISpiController_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa8d3c829_9895_4159_a934_8741f1ee6d27); } impl ::windows::core::RuntimeName for SpiController { const NAME: &'static str = "Windows.Devices.Spi.SpiController"; } impl ::core::convert::From<SpiController> for ::windows::core::IUnknown { fn from(value: SpiController) -> Self { value.0 .0 } } impl ::core::convert::From<&SpiController> for ::windows::core::IUnknown { fn from(value: &SpiController) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SpiController { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SpiController { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SpiController> for ::windows::core::IInspectable { fn from(value: SpiController) -> Self { value.0 } } impl ::core::convert::From<&SpiController> for ::windows::core::IInspectable { fn from(value: &SpiController) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SpiController { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SpiController { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } unsafe impl ::core::marker::Send for SpiController {} unsafe impl ::core::marker::Sync for SpiController {} #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct SpiDevice(pub ::windows::core::IInspectable); impl SpiDevice { pub fn DeviceId(&self) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) } } pub fn ConnectionSettings(&self) -> ::windows::core::Result<SpiConnectionSettings> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), &mut result__).from_abi::<SpiConnectionSettings>(result__) } } pub fn Write(&self, buffer: &[<u8 as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), buffer.len() as u32, ::core::mem::transmute(buffer.as_ptr())).ok() } } pub fn Read(&self, buffer: &mut [<u8 as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), buffer.len() as u32, ::core::mem::transmute_copy(&buffer)).ok() } } pub fn TransferSequential(&self, writebuffer: &[<u8 as ::windows::core::DefaultType>::DefaultType], readbuffer: &mut [<u8 as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).10)(::core::mem::transmute_copy(this), writebuffer.len() as u32, ::core::mem::transmute(writebuffer.as_ptr()), readbuffer.len() as u32, ::core::mem::transmute_copy(&readbuffer)).ok() } } pub fn TransferFullDuplex(&self, writebuffer: &[<u8 as ::windows::core::DefaultType>::DefaultType], readbuffer: &mut [<u8 as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).11)(::core::mem::transmute_copy(this), writebuffer.len() as u32, ::core::mem::transmute(writebuffer.as_ptr()), readbuffer.len() as u32, ::core::mem::transmute_copy(&readbuffer)).ok() } } #[cfg(feature = "Foundation")] pub fn Close(&self) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::<super::super::Foundation::IClosable>(self)?; unsafe { (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this)).ok() } } pub fn GetDeviceSelector() -> ::windows::core::Result<::windows::core::HSTRING> { Self::ISpiDeviceStatics(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).6)(::core::mem::transmute_copy(this), &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn GetDeviceSelectorFromFriendlyName<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(friendlyname: Param0) -> ::windows::core::Result<::windows::core::HSTRING> { Self::ISpiDeviceStatics(|this| unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).7)(::core::mem::transmute_copy(this), friendlyname.into_param().abi(), &mut result__).from_abi::<::windows::core::HSTRING>(result__) }) } pub fn GetBusInfo<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(busid: Param0) -> ::windows::core::Result<SpiBusInfo> { Self::ISpiDeviceStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).8)(::core::mem::transmute_copy(this), busid.into_param().abi(), &mut result__).from_abi::<SpiBusInfo>(result__) }) } #[cfg(feature = "Foundation")] pub fn FromIdAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param1: ::windows::core::IntoParam<'a, SpiConnectionSettings>>(busid: Param0, settings: Param1) -> ::windows::core::Result<super::super::Foundation::IAsyncOperation<SpiDevice>> { Self::ISpiDeviceStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).9)(::core::mem::transmute_copy(this), busid.into_param().abi(), settings.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::IAsyncOperation<SpiDevice>>(result__) }) } pub fn ISpiDeviceStatics<R, F: FnOnce(&ISpiDeviceStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> { static mut SHARED: ::windows::core::FactoryCache<SpiDevice, ISpiDeviceStatics> = ::windows::core::FactoryCache::new(); unsafe { SHARED.call(callback) } } } unsafe impl ::windows::core::RuntimeType for SpiDevice { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"rc(Windows.Devices.Spi.SpiDevice;{05d5356d-11b6-4d39-84d5-95dfb4c9f2ce})"); } unsafe impl ::windows::core::Interface for SpiDevice { type Vtable = ISpiDevice_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x05d5356d_11b6_4d39_84d5_95dfb4c9f2ce); } impl ::windows::core::RuntimeName for SpiDevice { const NAME: &'static str = "Windows.Devices.Spi.SpiDevice"; } impl ::core::convert::From<SpiDevice> for ::windows::core::IUnknown { fn from(value: SpiDevice) -> Self { value.0 .0 } } impl ::core::convert::From<&SpiDevice> for ::windows::core::IUnknown { fn from(value: &SpiDevice) -> Self { value.0 .0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for SpiDevice { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Owned(self.0 .0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for &'a SpiDevice { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0 .0) } } impl ::core::convert::From<SpiDevice> for ::windows::core::IInspectable { fn from(value: SpiDevice) -> Self { value.0 } } impl ::core::convert::From<&SpiDevice> for ::windows::core::IInspectable { fn from(value: &SpiDevice) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for SpiDevice { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Owned(self.0) } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IInspectable> for &'a SpiDevice { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IInspectable> { ::windows::core::Param::Borrowed(&self.0) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<SpiDevice> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: SpiDevice) -> ::windows::core::Result<Self> { ::core::convert::TryFrom::try_from(&value) } } #[cfg(feature = "Foundation")] impl ::core::convert::TryFrom<&SpiDevice> for super::super::Foundation::IClosable { type Error = ::windows::core::Error; fn try_from(value: &SpiDevice) -> ::windows::core::Result<Self> { ::windows::core::Interface::cast(value) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for SpiDevice { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::windows::core::IntoParam::into_param(&self) } } #[cfg(feature = "Foundation")] impl<'a> ::windows::core::IntoParam<'a, super::super::Foundation::IClosable> for &SpiDevice { fn into_param(self) -> ::windows::core::Param<'a, super::super::Foundation::IClosable> { ::core::convert::TryInto::<super::super::Foundation::IClosable>::try_into(self).map(::windows::core::Param::Owned).unwrap_or(::windows::core::Param::None) } } unsafe impl ::core::marker::Send for SpiDevice {} unsafe impl ::core::marker::Sync for SpiDevice {} #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct SpiMode(pub i32); impl SpiMode { pub const Mode0: SpiMode = SpiMode(0i32); pub const Mode1: SpiMode = SpiMode(1i32); pub const Mode2: SpiMode = SpiMode(2i32); pub const Mode3: SpiMode = SpiMode(3i32); } impl ::core::convert::From<i32> for SpiMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for SpiMode { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for SpiMode { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.Spi.SpiMode;i4)"); } impl ::windows::core::DefaultType for SpiMode { type DefaultType = Self; } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct SpiSharingMode(pub i32); impl SpiSharingMode { pub const Exclusive: SpiSharingMode = SpiSharingMode(0i32); pub const Shared: SpiSharingMode = SpiSharingMode(1i32); } impl ::core::convert::From<i32> for SpiSharingMode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for SpiSharingMode { type Abi = Self; } unsafe impl ::windows::core::RuntimeType for SpiSharingMode { const SIGNATURE: ::windows::core::ConstBuffer = ::windows::core::ConstBuffer::from_slice(b"enum(Windows.Devices.Spi.SpiSharingMode;i4)"); } impl ::windows::core::DefaultType for SpiSharingMode { type DefaultType = Self; }
// Copyright (c) 2021 Quark Container Authors / 2018 The gVisor Authors. // // 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 alloc::sync::Arc; use core::ops::Deref; use core::sync::atomic::AtomicU64; use core::sync::atomic::Ordering; #[derive(Default, Debug)] pub struct IOInternal { // CharsRead is the number of bytes read by read syscalls. pub CharsRead: AtomicU64, // CharsWritten is the number of bytes written by write syscalls. pub CharsWritten: AtomicU64, // ReadSyscalls is the number of read syscalls. pub ReadSyscalls: AtomicU64, // WriteSyscalls is the number of write syscalls. pub WriteSyscalls: AtomicU64, // BytesRead is the number of bytes actually read into pagecache. pub BytesRead: AtomicU64, // BytesWritten is the number of bytes actually written from pagecache. pub BytesWritten: AtomicU64, // BytesWriteCancelled is the number of bytes not written out due to // truncation. pub BytesWriteCancelled: AtomicU64, } #[derive(Clone, Default, Debug)] pub struct IO(Arc<IOInternal>); impl Deref for IO { type Target = Arc<IOInternal>; fn deref(&self) -> &Arc<IOInternal> { &self.0 } } impl IO { pub fn AccountReadSyscall(&self, bytes: i64) { self.ReadSyscalls.fetch_add(1, Ordering::SeqCst); if bytes > 0 { self.CharsRead.fetch_add(bytes as u64, Ordering::SeqCst); } } pub fn WriteSyscallAddr(&self) -> u64 { return &self.WriteSyscalls as * const _ as u64; } pub fn AccountWriteSyscall(&self, bytes: i64) { self.WriteSyscalls.fetch_add(1, Ordering::SeqCst); if bytes > 0 { self.CharsWritten.fetch_add(bytes as u64, Ordering::SeqCst); } } pub fn AccountReadIO(&self, bytes: i64) { if bytes > 0 { self.BytesRead.fetch_add(bytes as u64, Ordering::SeqCst); } } pub fn AccountWriteIO(&self, bytes: i64) { if bytes > 0 { self.BytesWritten.fetch_add(bytes as u64, Ordering::SeqCst); } } pub fn Accumulate(&self, io: &IO) { self.CharsRead.fetch_add(io.CharsRead.load(Ordering::SeqCst), Ordering::SeqCst); self.CharsWritten.fetch_add(io.CharsWritten.load(Ordering::SeqCst), Ordering::SeqCst); self.ReadSyscalls.fetch_add(io.ReadSyscalls.load(Ordering::SeqCst), Ordering::SeqCst); self.WriteSyscalls.fetch_add(io.WriteSyscalls.load(Ordering::SeqCst), Ordering::SeqCst); self.BytesRead.fetch_add(io.BytesRead.load(Ordering::SeqCst), Ordering::SeqCst); self.BytesWritten.fetch_add(io.BytesWritten.load(Ordering::SeqCst), Ordering::SeqCst); self.BytesWriteCancelled.fetch_add(io.BytesWriteCancelled.load(Ordering::SeqCst), Ordering::SeqCst); } }
use actix_web::client::{Client, Connector}; use openssl::ssl::{SslConnector, SslMethod, SslVerifyMode}; pub struct SSLClinet {} impl SSLClinet { pub fn build() -> Client { // disable ssl verification let mut builder = SslConnector::builder(SslMethod::tls()).unwrap(); builder.set_verify(SslVerifyMode::NONE); let _ = builder .set_alpn_protos(b"\x02h2\x08http/1.1") .map_err(|e| eprintln!("ssl clinet build err: ==>:{:?}", e)); Client::build() .connector(Connector::new().ssl(builder.build()).finish()) .finish() } }
use nannou::ease::*; pub trait EasingsExtension { fn ease_out_circ(&self) -> f32; fn ease_in_circ(&self) -> f32; fn ease_in_cubic(&self) -> f32; fn ease_out_cubic(&self) -> f32; fn ease_in_quad(&self) -> f32; fn ease_out_quad(&self) -> f32; fn ease_in_sine(&self) -> f32; fn ease_out_sine(&self) -> f32; } impl EasingsExtension for f32 { fn ease_out_circ(&self) -> f32 { circ::ease_out(*self, 0.0, 1.0, 1.0) } fn ease_in_circ(&self) -> f32 { circ::ease_in(*self, 0.0, 1.0, 1.0) } fn ease_in_cubic(&self) -> f32 { cubic::ease_in(*self, 0.0, 1.0, 1.0) } fn ease_out_cubic(&self) -> f32 { cubic::ease_out(*self, 0.0, 1.0, 1.0) } fn ease_in_quad(&self) -> f32 { quad::ease_in(*self, 0.0, 1.0, 1.0) } fn ease_out_quad(&self) -> f32 { quad::ease_out(*self, 0.0, 1.0, 1.0) } fn ease_in_sine(&self) -> f32 { sine::ease_in(*self, 0.0, 1.0, 1.0) } fn ease_out_sine(&self) -> f32 { sine::ease_out(*self, 0.0, 1.0, 1.0) } }
extern crate fastcgi; extern crate serde_json; extern crate redis; use std::io::Write; use std::io::Read; use std::str; use std::sync::{Arc, Mutex}; use serde_json::{json}; use redis::Commands; fn deserialize_body(req: &mut fastcgi::Request) -> Result<serde_json::Value, serde_json::Error> { let mut buffer = Vec::new(); &mut req.stdin().read_to_end(&mut buffer); let s = match str::from_utf8(&mut buffer) { Ok(v) => v, Err(e) => panic!("Invalid UTF-8 sequence: {}", e), }; let v = serde_json::from_str(s); return v; } fn error_out(req: &mut fastcgi::Request, string: &str) { write!(&mut req.stdout(), "{}", string) .unwrap_or(()); } fn choose_player(conn: &mut redis::Connection, json: serde_json::Value) -> serde_json::Value { let player_a_opt = json["data"][0].as_str(); let player_a = match player_a_opt { Some(x) => x, None => return json!({"error": "player a invalid"}), }; let player_b_opt = json["data"][1].as_str(); let player_b = match player_b_opt { Some(x) => x, None => return json!({"error": "player b invalid"}), }; let chosen_pairs_string: String = conn.get("chosen_pairs").unwrap(); let chosen_pairs: Vec::<&str> = chosen_pairs_string.split("-").collect(); let mut games: String = conn.get("games").unwrap(); for i in 0..chosen_pairs.len() { let pair: Vec::<&str> = chosen_pairs[i].split(",").collect(); let a = pair[0]; let b = pair[1]; if String::from(b) == String::from(player_a) && String::from(a) == String::from(player_b) { games = format!("{}-{}{}+{}", games, player_a, player_b, "leeg"); let _c : () = conn.set("games", games).unwrap(); return json!({"new_game": format!("{}{}", player_a, player_b)}); } } let chosen_pairs_string_new = format!("{}-{},{}",chosen_pairs.join("-"), player_a, player_b); let _d : () = conn.set("chosen_pairs", chosen_pairs_string_new).unwrap(); return json!({"current_preferences": chosen_pairs}); } fn get_players(conn: &mut redis::Connection) -> serde_json::Value { let players_string: String = conn.get("players").unwrap(); let players: Vec::<&str> = players_string.split("-").collect(); return json!({"players": players}); } fn set_player(conn: &mut redis::Connection, json: serde_json::Value) -> serde_json::Value { let new_player_opt = json["data"].as_str(); let new_player = match new_player_opt { Some(x) => x, None => return json!({"error": "player a invalid"}), }; let players: String = conn.get("players").unwrap(); let new_players: String = format!("{}-{}", players, new_player); let _c : () = conn.set("players", new_players.clone()).unwrap(); return json!({"players": *new_players}); } fn get_games(conn: &mut redis::Connection) -> serde_json::Value { let mut game_ids = Vec::<String>::new(); let games_string: String = conn.get("games").unwrap(); let games: Vec::<&str> = games_string.split("-").collect(); for i in 0..games.len() { let pair: Vec::<&str> = games[i].split("+").collect(); game_ids.push(String::from(pair[0])); } return json!({"games": game_ids}); } fn get_board(conn: &mut redis::Connection, json: serde_json::Value) -> serde_json::Value { let game_id_opt = json["game_id"].as_str(); let game_id = match game_id_opt { Some(x) => x, None => return json!({"error": "game id invalid"}), }; let games_string: String = conn.get("games").unwrap(); let games: Vec::<&str> = games_string.split("-").collect(); for i in 0..games.len() { let pair: Vec::<&str> = games[i].split("+").collect(); if *pair[0] == *game_id { return json!({"board": pair[1].clone()}); } } return json!({"board": "not found"}); } fn update_board(conn: &mut redis::Connection, json: serde_json::Value) -> serde_json::Value { let game_id_opt = json["game_id"].as_str(); let game_id = match game_id_opt { Some(x) => x, None => return json!({"error": "game id invalid"}), }; let board_opt = json["data"].as_str(); let board = match board_opt { Some(x) => x, None => return json!({"error": "board invalid"}), }; let games_string: String = conn.get("games").unwrap(); let games: Vec::<&str> = games_string.split("-").collect(); // Let update_board() own the slices in games_string_vec so we can insert something let mut games_string_vec: Vec::<String> = games.into_iter().map(|s| s.to_owned()).collect(); let mut found = false; for i in 0..games_string_vec.len() { let pair: Vec::<&str> = games_string_vec[i].split("+").collect(); if pair[0] == game_id { let updated_game = format!("{}+{}", game_id, board); games_string_vec[i] = updated_game; found = true; break; } } let delim = "-"; if found { let new_games_string: String = games_string_vec.join(delim); let _c : () = conn.set("games", new_games_string).unwrap(); return json!({"status": "succesful"}); } else { return json!({"status": "could not find game!"}); } } fn main() { // Create reference counted ptr to Redis let client = Arc::new(Mutex::new(redis::Client::open("redis://127.0.0.1/").unwrap())); fastcgi::run(move |mut req| { // Each thread is required to clone the ptr let conn_clone = Arc::clone(&client); // Lock the ptr and open a new connection let conn_locked = conn_clone.lock().unwrap(); let mut connection = conn_locked.get_connection().unwrap(); write!(&mut req.stdout(), "Content-Type: text/plain\n\n") .unwrap_or(()); let json = match deserialize_body(&mut req) { Ok(json) => json, Err(_e) => { error_out(&mut req, "Error deserializing input json"); return; }, }; let method_option = json["method"].as_str(); let method = match method_option { Some(x) => x, None => return, }; let mut return_json: Option<serde_json::Value> = None; match method { "set_player" => { return_json = Some(set_player(&mut connection, json)); }, "get_player_list" => { return_json = Some(get_players(&mut connection)); }, "choose_player" => { return_json=Some(choose_player(&mut connection, json)); }, "get_games" => { return_json=Some(get_games(&mut connection)); }, "update_board" => { return_json = Some(update_board(&mut connection, json)); }, "get_board" => { return_json=Some(get_board(&mut connection, json)); }, _ => { println!("something else!") }, }; let string_result_json = match return_json { Some(x) => x.to_string(), None => String::from(""), }; if !string_result_json.is_empty() { write!(&mut req.stdout(), "{}", string_result_json) .unwrap_or(()); } else { error_out(&mut req, "Error serializing output json") } }); }
use std::libc::*; use opcode::*; use interpret::*; use libjit::*; use jit::*; mod variable_type; mod libjit; mod opcode; mod interpret; mod jit; mod basic_block; mod analysis; fn main() { // Sample VM function that omputes the factorial of 10. let factorial = ~[ // n := 10 // Constf32(10f32), // Store(0), // // // f := 1 // Constf32(1f32), // Store(1), // // // if n <= 1 go end // Loadf32(0), // <--------- Constf32(1f32), // | Leq, // | Iftrue(17), // ------ | // | | // f := n * f // | | Loadf32(0), // | | Loadf32(1), // | | Multiply, // | | Store(1), // | | // | | // n := n - 1 // | | Loadf32(0), // | | Constf32(1f32), // | | Subtract, // | | Store(0), // | | // | | // loop // | | Jmp(4), // -----+---- // | // return f // | Loadf32(1), // <----- Ret // ]; println("Interpreting factorial(10)..."); interpret(factorial); println(""); println("Jitting factorial(10)..."); let context = Context::new(); let function = compile(factorial, context); function.dump("factorial"); println(""); let args: ~[*c_void] = ~[]; let mut retval: ~f32 = ~0f32; function.apply(args, retval); println("Returned:"); println(fmt!("%?", *retval)); println(""); println("Closure factorial(10)..."); let f: extern "C" fn() -> c_float = function.closure(); let ret = f(); println(fmt!("%?", ret)); }
use crate::{app::AppContextPointer, gui::control_area::BOX_SPACING}; use gtk::{self, gdk::RGBA, prelude::*, Frame, ScrolledWindow}; use std::rc::Rc; pub fn make_data_option_frame(ac: &AppContextPointer) -> ScrolledWindow { let f = Frame::new(None); //f.set_shadow_type(gtk::ShadowType::None); f.set_hexpand(true); f.set_vexpand(true); // Layout vertically let v_box = gtk::Box::new(gtk::Orientation::Vertical, BOX_SPACING); v_box.set_baseline_position(gtk::BaselinePosition::Top); let skewt_frame = gtk::Frame::new(Some("Skew-T")); let skewt_box = gtk::Box::new(gtk::Orientation::Vertical, BOX_SPACING); skewt_frame.set_child(Some(&skewt_box)); build_config_color!(skewt_box, "Temperature", ac, temperature_rgba); build_config_color!(skewt_box, "Wet Bulb", ac, wet_bulb_rgba); build_config_color!(skewt_box, "Dew Point", ac, dew_point_rgba); build_config_color!(skewt_box, "Wind", ac, wind_rgba); /* let hodo_frame = gtk::Frame::new(Some("Hodograph")); let hodo_box = gtk::Box::new(gtk::Orientation::Vertical, BOX_SPACING); hodo_frame.add(&hodo_box); */ let profiles_frame = gtk::Frame::new(Some("Profiles")); let profiles_box = gtk::Box::new(gtk::Orientation::Vertical, BOX_SPACING); profiles_frame.set_child(Some(&profiles_box)); build_config_color_and_check!( profiles_box, "Vertical Velocity (\u{03C9})", ac, show_omega, omega_rgba ); build_config_color_and_check!(profiles_box, "Relative Humidity", ac, show_rh, rh_rgba); build_config_color_and_check!( profiles_box, "Relative Humidity (ice)", ac, show_rh_ice, rh_ice_rgba ); build_config_color!(profiles_box, "Cloud Coverage", ac, cloud_rgba); let fire_plumes_frame = gtk::Frame::new(Some("Fire Plume")); let fire_plumes_box = gtk::Box::new(gtk::Orientation::Vertical, BOX_SPACING); fire_plumes_frame.set_child(Some(&fire_plumes_box)); build_config_color!( fire_plumes_box, "Lifting Condensation Level", ac, fire_plume_lcl_color ); build_config_color!( fire_plumes_box, "Level of Max Ingetgrated Buoyancy", ac, fire_plume_lmib_color ); build_config_color!(fire_plumes_box, "Maximum Height", ac, fire_plume_maxh_color); build_config_color!( fire_plumes_box, "Percent Wet Integrated Bouyancy", ac, fire_plume_pct_wet_cape_color ); f.set_child(Some(&v_box)); v_box.append(&skewt_frame); //v_box.pack_start(&hodo_frame, true, true, PADDING); v_box.append(&profiles_frame); v_box.append(&fire_plumes_frame); let sw = ScrolledWindow::new(); sw.set_child(Some(&f)); sw }
use super::{Error, SassFunction}; use css::{CallArgs, Value}; use num_rational::Rational; use num_traits::One; use std::collections::BTreeMap; use value::{ListSeparator, Number, Unit}; pub fn register(f: &mut BTreeMap<&'static str, SassFunction>) { def!(f, rgb(red, green, blue), |s| Ok(Value::rgba( to_int(s.get("red"))?, to_int(s.get("green"))?, to_int(s.get("blue"))?, Rational::one() ))); def!(f, rgba(red, green, blue, alpha, color), |s| { let a = s.get("alpha"); let red = s.get("red"); let red = if red.is_null() { s.get("color") } else { red }; if let Value::Color(rgba, _) = red { let a = if a.is_null() { s.get("green") } else { a }; match a { Value::Numeric(a, ..) => { Ok(Value::rgba(rgba.red, rgba.green, rgba.blue, a.value)) } _ => Ok(Value::Call( "rgba".into(), CallArgs::from_value(Value::List( vec![ int_value(rgba.red), int_value(rgba.green), int_value(rgba.blue), a, ], ListSeparator::Space, false, )), )), } } else { Ok(Value::rgba( to_int(red)?, to_int(s.get("green"))?, to_int(s.get("blue"))?, to_rational(a)?, )) } }); fn num(v: &Rational) -> Result<Value, Error> { Ok(Value::Numeric(Number::from(*v), Unit::None, true)) } def!(f, red(color), |s| match &s.get("color") { &Value::Color(ref rgba, _) => num(&rgba.red), value => Err(Error::badarg("color", value)), }); def!(f, green(color), |s| match &s.get("color") { &Value::Color(ref rgba, _) => num(&rgba.green), value => Err(Error::badarg("color", value)), }); def!(f, blue(color), |s| match &s.get("color") { &Value::Color(ref rgba, _) => num(&rgba.blue), value => Err(Error::badarg("color", value)), }); def!(f, mix(color1, color2, weight = b"50%"), |s| match ( s.get("color1"), s.get("color2"), s.get("weight"), ) { ( Value::Color(a, _), Value::Color(b, _), Value::Numeric(w, wu, ..), ) => { let w = if wu == Unit::Percent { w.value / 100 } else { w.value }; let one = Rational::one(); let w2 = one - (one - w * a.alpha) * b.alpha; let m_c = |a, b| a * w2 + b * (one - w2);; let m_a = |a, b| a * w + b * (one - w); Ok(Value::rgba( m_c(a.red, b.red), m_c(a.green, b.green), m_c(a.blue, b.blue), m_a(a.alpha, b.alpha), )) } (color1, color2, weight) => Err(Error::badargs( &["color", "color", "number"], &[&color1, &color2, &weight], )), }); def!(f, invert(color, weight = b"100%"), |s| match ( s.get("color"), s.get("weight"), ) { (Value::Color(rgba, _), Value::Numeric(w, wu, ..)) => { let w = if wu == Unit::Percent { w.value / 100 } else { w.value }; let inv = |v: Rational| -(v - 255) * w + v * -(w - 1); Ok(Value::rgba( inv(rgba.red), inv(rgba.green), inv(rgba.blue), rgba.alpha, )) } (value, weight) => { Err(Error::badargs(&["color", "percentage"], &[&value, &weight])) } }); } fn int_value(v: Rational) -> Value { Value::scalar(v.to_integer()) } fn to_int(v: Value) -> Result<Rational, Error> { match v { Value::Numeric(v, Unit::Percent, _) => Ok(v.value * 255 / 100), Value::Numeric(v, ..) => Ok(v.value), v => Err(Error::badarg("number", &v)), } } fn to_rational(v: Value) -> Result<Rational, Error> { match v { Value::Numeric(num, ..) => Ok(num.value), v => Err(Error::badarg("number", &v)), } } #[cfg(test)] mod test { use variablescope::test::do_evaluate; #[test] fn test_high() { assert_eq!("white", do_evaluate(&[], b"rgb(150%, 300, 256);")); } #[test] fn test_low() { assert_eq!("black", do_evaluate(&[], b"rgb(-3, -2%, 0);")); } #[test] fn test_mid() { assert_eq!("gray", do_evaluate(&[], b"rgb(50%, 255/2, 25% + 25);")); } #[test] fn test_named() { assert_eq!("gray", do_evaluate(&[], b"rgb(50%, 255/2, 25% + 25);")); } }
use proconio::input; fn main() { input! { n: usize, h: [u32; n], }; let max = h.iter().copied().max().unwrap(); let ans = h.iter().position(|&x| x == max).unwrap() + 1; println!("{}", ans); }
use std::{ fmt::{self, Display}, marker::PhantomData, ptr::NonNull, }; use crate::{ pointer_trait::{AsMutPtr, AsPtr, CanTransmuteElement, GetPointerKind, PK_MutReference}, sabi_types::RRef, }; /// Equivalent to `&'a mut T`, /// which allows a few more operations without causing Undefined Behavior. /// /// # Purpose /// /// This type is used as the `&mut self` parameter in abi_stable trait objects /// because it can be soundly transmuted /// to point to other smaller but compatible types, then back to the original type. /// /// This crate is tested with [miri] to detect bugs in unsafe code, /// which implements the [Stacked Borrows model]. /// Because that model forbids `&mut T` to `&mut ()` to `&mut T` transmutes /// (when `T` isn't zero-sized), /// it required defining `RMut` to allow a mutable-reference-like type that can be transmuted. /// /// # Example /// /// This example demonstrates how a simple `&mut dyn Any`-like type can be implemented. /// /// ```rust /// use abi_stable::{marker_type::ErasedObject, std_types::UTypeId, RMut}; /// /// fn main() { /// let mut value = WithTypeId::new(5u32); /// let mut clone = value.clone(); /// let mut erased = value.erase(); /// /// assert_eq!(WithTypeId::downcast::<i32>(erased.reborrow()), None); /// assert_eq!(WithTypeId::downcast::<bool>(erased.reborrow()), None); /// assert_eq!( /// WithTypeId::downcast::<u32>(erased.reborrow()), /// Some(&mut clone) /// ); /// } /// /// // `#[repr(C))]` with a trailing `T` field is required for soundly transmuting from /// // `RMut<'a, WithTypeId<T>>` to `RMut<'a, WithTypeId<ErasedObject>>`. /// #[repr(C)] /// #[derive(Debug, PartialEq, Clone)] /// struct WithTypeId<T> { /// type_id: UTypeId, /// value: T, /// } /// /// impl<T> WithTypeId<T> { /// pub fn new(value: T) -> Self /// where /// T: 'static, /// { /// Self { /// type_id: UTypeId::new::<T>(), /// value, /// } /// } /// /// pub fn erase(&mut self) -> RMut<'_, WithTypeId<ErasedObject>> { /// unsafe { RMut::new(self).transmute::<WithTypeId<ErasedObject>>() } /// } /// } /// /// impl WithTypeId<ErasedObject> { /// pub fn downcast<T>(this: RMut<'_, Self>) -> Option<&mut WithTypeId<T>> /// where /// T: 'static, /// { /// if this.get().type_id == UTypeId::new::<T>() { /// // safety: we checked that type parameter was `T` /// unsafe { Some(this.transmute_into_mut::<WithTypeId<T>>()) } /// } else { /// None /// } /// } /// } /// /// /// ``` /// /// <span id="type-prefix-exp"></span> /// # Type Prefix /// /// A type parameter `U` is considered a prefix of `T` in all of these cases: /// /// - `U` is a zero-sized type with an alignment equal or lower than `T` /// /// - `U` is a `#[repr(transparent)]` wrapper over `T` /// /// - `U` and `T` are both `#[repr(C)]` structs, /// in which `T` starts with the fields of `U` in the same order, /// and `U` has an alignment equal to or lower than `T`. /// /// Please note that it can be unsound to transmute a non-local /// type if it has private fields, /// since it may assume it was constructed in a particular way. /// /// [Stacked Borrows model]: /// https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md /// /// [miri]: https://github.com/rust-lang/miri /// #[repr(transparent)] #[derive(StableAbi)] #[sabi(bound(T:'a))] pub struct RMut<'a, T> { ref_: NonNull<T>, _marker: PhantomData<crate::utils::MutRef<'a, T>>, } impl<'a, T> Display for RMut<'a, T> where T: Display, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { Display::fmt(self.get(), f) } } unsafe impl<'a, T> Sync for RMut<'a, T> where &'a T: Sync {} unsafe impl<'a, T> Send for RMut<'a, T> where &'a T: Send {} shared_impls! { mod=static_ref_impls new_type=RMut['a][T], original_type=AAAA, deref_approach=(method = get), } impl<'a, T> RMut<'a, T> { /// Constructs this RMut from a mutable reference /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut foo = 3; /// let mut rmut = RMut::new(&mut foo); /// *rmut.get_mut() += 10; /// /// assert_eq!(*rmut.get(), 13); /// assert_eq!(foo, 13); /// /// ``` #[inline(always)] pub fn new(ref_: &'a mut T) -> Self { unsafe { Self { ref_: NonNull::new_unchecked(ref_), _marker: PhantomData, } } } /// Constructs this RMut from a raw pointer. /// /// # Safety /// /// You must ensure that the raw pointer is valid for the `'a` lifetime, /// points to a fully initialized and aligned `T`, /// and that this is the only active pointer to that value. /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut foo = 3u32; /// // safety: /// // `&mut foo` is casted to a pointer to a compatible type (`u32` to `i32`), /// // `rmut` is only used for the lifetime of foo, /// // and is the only active pointer to `foo` while it's used. /// let mut rmut = unsafe { RMut::from_raw((&mut foo) as *mut u32 as *mut i32) }; /// *rmut.get_mut() -= 4; /// /// assert_eq!(*rmut.get(), -1); /// assert_eq!(foo, !0); /// /// ``` #[inline(always)] pub const unsafe fn from_raw(ref_: *mut T) -> Self where T: 'a, { Self { ref_: unsafe { NonNull::new_unchecked(ref_) }, _marker: PhantomData, } } /// Reborrows this `RMut`, with a shorter lifetime. /// /// This allows passing an `RMut` to functions multiple times, /// but with a shorter lifetime argument. /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut foo = 3; /// let mut rmut = RMut::new(&mut foo); /// /// assert_eq!(mutate(rmut.reborrow()), 6); /// assert_eq!(mutate(rmut.reborrow()), 12); /// assert_eq!(mutate(rmut.reborrow()), 24); /// /// // last use of rmut, so it can be moved instead of being reborrowed. /// assert_eq!(mutate(rmut), 48); /// /// fn mutate(mut rmut: RMut<'_, u32>) -> u32 { /// *rmut.get_mut() *= 2; /// rmut.get_copy() /// } /// /// ``` #[inline(always)] pub fn reborrow(&mut self) -> RMut<'_, T> { RMut { ref_: self.ref_, _marker: PhantomData, } } /// Reborrows this `RMut` into a shared reference. /// /// Note that because the reference reborrows this `RMut<'a, T>` /// its lifetime argument is strictly smaller. /// To turn an `RMut<'a, T>` into a `&'a T` (with the same lifetime argument) /// you can use [`into_ref`](#method.into_ref). /// /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut val = 89; /// let rmut = RMut::new(&mut val); /// /// assert_eq!(rmut.get(), &89); /// /// ``` /// /// ### Lifetimes /// /// This demonstrates when `into_ref` works, but `get` doesn't. /// /// ```rust /// # use abi_stable::RMut; /// fn stuff<'a>(x: RMut<'a, i32>) -> &'a i32 { /// x.into_ref() /// } /// ``` /// /// This doesn't compile, because `get` reborrows `foo`. /// ```compile_fail /// # use abi_stable::RMut; /// fn stuff<'a>(foo: RMut<'a, i32>) -> &'a i32 { /// foo.get() /// } /// ``` #[inline(always)] pub const fn get(&self) -> &T { unsafe { crate::utils::deref!(self.ref_.as_ptr()) } } /// Copies the value that this `RMut` points to. /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut val = "hello"; /// let mut rmut = RMut::new(&mut val); /// /// *rmut.get_mut() = "world"; /// /// assert_eq!(rmut.get_copy(), "world"); /// /// ``` #[inline(always)] pub const fn get_copy(&self) -> T where T: Copy, { unsafe { *(self.ref_.as_ptr() as *const T) } } /// Converts this `RMut<'a, T>` into a `&'a T` /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut val = 89; /// /// assert_eq!(mutate(RMut::new(&mut val)), &44); /// /// fn mutate(mut rmut: RMut<'_, u32>) -> &u32 { /// *rmut.get_mut() /= 2; /// rmut.into_ref() /// } /// /// ``` /// #[inline(always)] pub const fn into_ref(self) -> &'a T { unsafe { crate::utils::deref!(self.ref_.as_ptr()) } } /// Reborrows this `RMut` into a mutable reference. /// /// Note that because the mutable reference reborrows this `RMut<'a, T>` /// its lifetime argument is strictly smaller. /// To turn an `RMut<'a, T>` into a `&'a mut T` (with the same lifetime argument) /// you can use [`into_mut`](#method.into_mut). /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut val = 89; /// let mut rmut = RMut::new(&mut val); /// /// assert_eq!(rmut.get_mut(), &mut 89); /// /// *rmut.get_mut() += 10; /// /// assert_eq!(rmut.get_mut(), &mut 99); /// /// ``` /// /// ### Lifetimes /// /// This demonstrates when `into_mut` works, but `get_mut` doesn't. /// /// ```rust /// # use abi_stable::RMut; /// fn stuff<'a>(x: RMut<'a, i32>) -> &'a mut i32 { /// x.into_mut() /// } /// ``` /// /// This doesn't compile, because `get_mut` reborrows `foo`. /// ```compile_fail /// # use abi_stable::RMut; /// fn stuff<'a>(mut foo: RMut<'a, i32>) -> &'a mut i32 { /// foo.get_mut() /// } /// ``` #[inline(always)] pub fn get_mut(&mut self) -> &mut T { unsafe { &mut *self.ref_.as_ptr() } } /// Converts this `RMut<'a, T>` into a `&'a mut T` /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut val = 13; /// /// let rmut = RMut::new(&mut val); /// /// assert_eq!(rmut.get(), &13); /// /// *rmut.into_mut() += 8; /// /// assert_eq!(val, 21); /// /// ``` #[inline(always)] pub fn into_mut(self) -> &'a mut T { unsafe { &mut *self.ref_.as_ptr() } } /// Reborrows this `RMut` as a const raw pointer. /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut val = 34; /// let rmut = RMut::new(&mut val); /// /// unsafe { /// assert_eq!(*rmut.as_ptr(), 34); /// } /// ``` #[inline] pub const fn as_ptr(&self) -> *const T { self.ref_.as_ptr() } /// Reborrows this `RMut` as a mutable raw pointer. /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut val = 34; /// let mut rmut = RMut::new(&mut val); /// /// unsafe { /// rmut.as_mut_ptr().write(7); /// /// *rmut.as_mut_ptr() *= 2; /// /// assert_eq!(val, 14); /// } /// ``` #[inline] pub fn as_mut_ptr(&mut self) -> *mut T { self.ref_.as_ptr() } /// Converts this `RMut<'a, T>` into a `*mut T` /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut val = 89; /// let rmut = RMut::new(&mut val); /// /// unsafe { /// let ptr = rmut.into_raw(); /// /// ptr.write(27); /// /// *ptr += 2; /// /// assert_eq!(val, 29); /// } /// ``` #[inline] pub const fn into_raw(self) -> *mut T { self.ref_.as_ptr() } /// Transmutes this `RMut<'a, T>` to a `*mut U`. /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut val = Direction::Up; /// let rmut = RMut::new(&mut val); /// /// assert_eq!(rmut.get(), &Direction::Up); /// /// let ptr = rmut.transmute_into_raw::<u8>(); /// /// unsafe { /// assert_eq!(*ptr, 2); /// *ptr = 3; /// } /// /// assert_eq!(val, Direction::Down); /// /// #[repr(u8)] /// #[derive(Debug, PartialEq)] /// enum Direction { /// Left = 0, /// Right = 1, /// Up = 2, /// Down = 3, /// } /// /// ``` #[inline(always)] pub const fn transmute_into_raw<U>(self) -> *mut U { self.ref_.as_ptr() as *mut U } /// Transmutes this `RMut<'a, T>` to a `&'a mut U`. /// /// # Safety /// /// Either of these must be the case: /// /// - [`U` is a prefix of `T`](#type-prefix-exp) /// /// - `RMut<'a, U>` was the original type of this `RMut<'a, T>`. /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut val = 13u8; /// let rmut = RMut::new(&mut val); /// /// assert_eq!(rmut.get(), &13); /// /// unsafe { /// *rmut.transmute_into_mut::<i8>() = -1; /// } /// /// assert_eq!(val, 255); /// /// ``` #[inline(always)] pub unsafe fn transmute_into_mut<U>(self) -> &'a mut U where U: 'a, { unsafe { &mut *(self.ref_.as_ptr() as *mut U) } } /// Transmutes this `RMut<'a, T>` to a `RMut<'a,U>`. /// /// # Safety /// /// Either of these must be the case: /// /// - [`U` is a prefix of `T`](#type-prefix-exp) /// /// - `RMut<'a, U>` was the original type of this `RMut<'a, T>`. /// /// # Example /// /// ```rust /// use abi_stable::RMut; /// /// let mut val: [u32; 3] = [2, 3, 0]; /// let mut rmut = RMut::new(&mut val); /// /// unsafe { /// // safety: /// // it's sound to transmute mutable references of arrays into shorter arrays. /// // /// // The `.reborrow()` prevents the `rmut` from being consumed. /// compute_next(rmut.reborrow().transmute::<[u32; 2]>()); /// assert_eq!(rmut.get_copy(), [3, 5, 0]); /// /// compute_next(rmut.reborrow().transmute::<[u32; 2]>()); /// assert_eq!(rmut.get_copy(), [5, 8, 0]); /// /// // last use of `rmut`, so no need to reborrow /// compute_next(rmut.transmute::<[u32; 2]>()); /// } /// /// assert_eq!(val, [8, 13, 0]); /// /// fn compute_next(rmut: RMut<'_, [u32; 2]>) { /// let [v0, v1] = rmut.into_mut(); /// let next = *v0 + *v1; /// *v0 = std::mem::replace(v1, next); /// } /// ``` #[inline(always)] pub const unsafe fn transmute<U>(self) -> RMut<'a, U> where U: 'a, { unsafe { RMut::from_raw(self.ref_.as_ptr() as *mut U) } } /// Reborrows this `RMut<'a, T>` into an `RRef<'_, T>` /// /// # Example /// /// ```rust /// use abi_stable::{RMut, RRef}; /// /// let mut val = 77; /// let rmut = RMut::new(&mut val); /// /// for _ in 0..10 { /// assertion(rmut.as_rref()); /// } /// /// fn assertion(rref: RRef<'_, u32>) { /// assert_eq!(rref.get_copy(), 77); /// } /// ``` #[inline(always)] #[allow(clippy::needless_lifetimes)] pub const fn as_rref<'r>(&'r self) -> RRef<'r, T> { unsafe { RRef::from_raw(self.ref_.as_ptr()) } } /// Converts this `RMut<'a, T>` to an `RRef<'_, T>` /// /// # Example /// /// ```rust /// use abi_stable::{RMut, RRef}; /// /// let mut val = 0; /// let rmut = RMut::new(&mut val); /// /// assertion(rmut.into_rref()); /// /// fn assertion(rref: RRef<'_, u32>) { /// assert_eq!(rref.get_copy(), 0); /// } /// ``` #[inline(always)] pub const fn into_rref(self) -> RRef<'a, T> { unsafe { RRef::from_raw(self.ref_.as_ptr()) } } } unsafe impl<'a, T> AsPtr for RMut<'a, T> { #[inline(always)] fn as_ptr(&self) -> *const T { self.ref_.as_ptr() as *const T } #[inline(always)] fn as_rref(&self) -> RRef<'_, T> { unsafe { RRef::from_raw(self.ref_.as_ptr() as *const T) } } } unsafe impl<'a, T> AsMutPtr for RMut<'a, T> { #[inline(always)] fn as_mut_ptr(&mut self) -> *mut T { self.ref_.as_ptr() } #[inline(always)] fn as_rmut(&mut self) -> RMut<'_, T> { self.reborrow() } } unsafe impl<'a, T> GetPointerKind for RMut<'a, T> { type Kind = PK_MutReference; type PtrTarget = T; } unsafe impl<'a, T, U> CanTransmuteElement<U> for RMut<'a, T> where U: 'a, { type TransmutedPtr = RMut<'a, U>; #[inline(always)] unsafe fn transmute_element_(self) -> Self::TransmutedPtr { unsafe { self.transmute() } } } #[cfg(test)] mod tests { use super::*; #[test] fn construction_test() { unsafe { let val: *mut i32 = &mut 3; let mut rmut = RMut::from_raw(val); *rmut.get_mut() += 5; assert_eq!(rmut.get_copy(), 8); } { let val = &mut 3; let mut rmut = RMut::new(val); *rmut.get_mut() += 5; assert_eq!(rmut.get_copy(), 8); } } #[test] fn access() { let mut num = 5; let mut mutref = RMut::new(&mut num); assert_eq!(*mutref.get_mut(), 5); *mutref.get_mut() = 21; assert_eq!(*mutref.get(), 21); assert_eq!(mutref.get_copy(), 21); assert_eq!(*mutref.reborrow().into_ref(), 21); *mutref.reborrow().into_mut() = 34; unsafe { assert_eq!(*mutref.as_ptr(), 34); *mutref.as_mut_ptr() = 55; assert_eq!(*mutref.reborrow().into_raw(), 55); *mutref.reborrow().into_raw() = 89; } assert_eq!(num, 89); } #[test] fn transmutes() { let mut num = 0u8; unsafe { let ptr = RMut::new(&mut num).transmute_into_raw::<Enum>(); assert_eq!(*ptr, Enum::Foo); ptr.write(Enum::Bar); assert_eq!(*ptr, Enum::Bar); assert_eq!(num, 1); } unsafe { let mref = RMut::new(&mut num).transmute_into_mut::<Enum>(); assert_eq!(*mref, Enum::Bar); *mref = Enum::Qux; assert_eq!(*mref, Enum::Qux); assert_eq!(num, 2); } unsafe { let mut rmut = RMut::new(&mut num).transmute::<Enum>(); assert_eq!(rmut, RMut::new(&mut Enum::Qux)); *rmut.get_mut() = Enum::Foo; assert_eq!(*rmut.get(), Enum::Foo); assert_eq!(num, 0); } unsafe { let mut rmut: RMut<'_, Enum> = RMut::new(&mut num).transmute_element_(); assert_eq!(rmut, RMut::new(&mut Enum::Foo)); *rmut.get_mut() = Enum::Bar; assert_eq!(*rmut.get(), Enum::Bar); assert_eq!(num, 1); } } #[test] fn as_rtype_test() { let mut num = 0u8; let mut rmut = RMut::new(&mut num); assert_eq!(rmut.as_rref(), RRef::new(&0)); assert_eq!(rmut.reborrow().into_rref(), RRef::new(&0)); assert_eq!(rmut.as_rmut(), RMut::new(&mut 0)); } #[derive(Debug, PartialEq)] #[repr(u8)] enum Enum { Foo = 0, Bar = 1, Qux = 2, } }
use std::path::Path; use thiserror::Error; pub trait Vad { fn reset(&mut self) -> Result<(), VadError>; fn is_someone_talking(&mut self, audio: &[i16]) -> Result<bool, VadError>; } #[cfg(feature = "snowboy")] pub struct SnowboyVad { vad: rsnowboy::SnowboyVad, } #[cfg(feature = "snowboy")] impl SnowboyVad { pub fn new(res_path: &Path) -> Result<Self, VadError> { let vad = rsnowboy::SnowboyVad::new(res_path.to_str().ok_or(VadError::NotUnicode)?); Ok(Self { vad }) } } #[cfg(feature = "snowboy")] impl Vad for SnowboyVad { fn reset(&mut self) -> Result<(), VadError> { self.vad.reset(); Ok(()) } fn is_someone_talking(&mut self, audio: &[i16]) -> Result<bool, VadError> { let vad_val = self .vad .run_short_array(&audio[0] as *const i16, audio.len() as i32, false); if vad_val == -1 { // Maybe whe should do something worse with this is (return a result) log::error!("Something happened in the Vad"); Err(VadError::Unknown) } else { Ok(vad_val == 0) } } } #[cfg(feature = "webrtc_vad")] pub struct WebRtcVad { vad: webrtc_vad::Vad, } #[cfg(feature = "webrtc_vad")] impl WebRtcVad { pub fn new() -> Self { Self { vad: webrtc_vad::Vad::new_with_rate(webrtc_vad::SampleRate::Rate16kHz), } } } #[cfg(feature = "webrtc_vad")] impl Vad for WebRtcVad { fn reset(&mut self) -> Result<(), VadError> { self.vad.reset(); Ok(()) } fn is_someone_talking(&mut self, audio: &[i16]) -> Result<bool, VadError> { self.vad .is_voice_segment(audio) .map_err(|_| VadError::InvalidFrameLength) } } #[derive(Error, Debug)] pub enum VadError { #[error("Something happened in the Vad")] Unknown, #[error("Input was not unicode")] NotUnicode, #[error("Invalid frame length")] InvalidFrameLength, }
/// Parse a URL from a string to a Url type /// /// The `parse` method from the url crate validates and parses a `&str` into a /// `Url` struct. The input string may be mafromed so this method returns /// `Result<Url, ParseError>` /// /// Once the URL has been parsed, it can be used with all of the methods on the /// `Url` type. /// /// The URL in this code parses successfully, but swapping it out for a malformed /// URL will print a message containing an expalanation of what went wrong. /// use errors::*; use url::{ Url, Host, Origin, Position}; pub fn run_parse() -> Result<()> { let s = "https://github.com/rust-lang/rust/issues?labels=E-easy&state=open"; let parsed = Url::parse(s)?; println!("The path part of the URL is: {}", parsed.path()); Ok(()) } /// Create a base URL by removing path segments pub fn run_base_url() -> Result<()> { let full = "https://github.com/rust-lang/cargo?asdf"; let url = Url::parse(full)?; let base = base_url(url)?; assert_eq!(base.as_str(), "https://github.com/"); println!("base url: {}", base); Ok(()) } fn base_url(mut url: Url) -> Result<Url> { // Clear path segments, which are `rust-lang`, `cargo`. match url.path_segments_mut() { Ok(mut path) => { path.clear(); } Err(_) => { return Err(Error::from_kind(ErrorKind::CannotBeABase)); } } // Clear query parameters. url.set_query(None); Ok(url) } /// Create a new url from a base URL /// The `join` method creates a new URL from a base and relateiv path pub fn run_join() -> Result<()> { let path = "/rust-lang/cargo"; let gh = build_github_url(path)?; assert_eq!(gh.as_str(), "https://github.com/rust-lang/cargo"); println!("The joined RUL is: {}", gh); Ok(()) } fn build_github_url(path: &str) -> Result<Url> { // Hardcoded in our program. Caller's path will be joined to this. const GITHUB: &'static str = "https://github.com"; let base = Url::parse(GITHUB).expect("hardcoded URL is known to be valid"); let joined = base.join(path)?; Ok(joined) } /// Extract the URL origin (schema/host/port) /// /// The `Url` struct exposes various methods to extract infomation about the RUL it represents /// pub fn run_exposes() -> Result<()>{ let s = "ftp://rust-lang.org/examples"; let url = Url::parse(s)?; assert_eq!(url.scheme(), "ftp"); assert_eq!(url.host(), Some(Host::Domain("rust-lang.org"))); assert_eq!(url.port_or_known_default(), Some(21)); println!("url: {}", s); println!("url scheme: {:?}", url.scheme()); println!("url host: {:?}", url.host().unwrap()); println!("url port: {:?}", url.port_or_known_default()); Ok(()) } /// The same thing can be obtained using the `origin` method as well pub fn run_origin() -> Result<()> { let s = "ftp://rust-lang.org/examples"; let url = Url::parse(s)?; let expected_scheme = "ftp".to_owned(); let expected_host = Host::Domain("rust-lang.org".to_owned()); let expected_port = 21; let expected = Origin::Tuple(expected_scheme, expected_host, expected_port); let origin = url.origin(); assert_eq!(origin, expected); println!("The origin is as expeceted!"); println!("origin: {:?}", expected); Ok(()) } /// Remove fragment identifiers and query pairs from a URL /// ///Parses `Url` and slices it with `url::Position` to strip unneeded URL parts /// pub fn run_positon() -> Result<()> { let url = "https://github.com/rust-lang/rust/issues?labels=E-easy&state=open"; let parsed = Url::parse(url)?; println!("url: {:?}", url); println!("parsed: {:?}", parsed); let cleaned: &str = &parsed[..Position::AfterPath]; println!("cleaned: {}", cleaned); Ok(()) }
// https://docs.rs/assert_cmd/0.11.1/assert_cmd/ // https://docs.rs/predicates/1.0.1/predicates/ use std::process::Command; use assert_cmd::prelude::*; use predicates::prelude::*; #[test] fn errors_when_no_reference() { let mut cmd = Command::cargo_bin("henry_commentary_cargo").unwrap(); cmd.assert() .failure(); } macro_rules! gets_commentary { ($($name:ident: $value:expr,)*) => { $( #[test] fn $name() { let (book, chapter_verse, commentary) = $value; let mut cmd = Command::cargo_bin("henry_commentary_cargo").unwrap(); cmd.arg(book) .arg(chapter_verse); cmd.assert() .success() .stdout(predicate::str::contains(commentary)); } )* } } gets_commentary! { genesis: ("Genesis", "1:1", "God the Father Almighty is the Maker"), joshua: ("Joshua", "1:1", "Honour is here put upon Joshua"), job: ("Job", "1:1", "Concerning Job we are here told"), psalms: ("Psalms", "150:1", "We are here, with the greatest earnestness imaginable, excited"), isaiah: ("Isaiah", "1:1", "The name of the prophet, Isaiah, or Jesahiahu"), mark: ("Mark", "5:5", "an instance of Christ's dispossessing"), acts: ("Acts of the Apostles", "1:1", "Theophilus is put in mind"), jude: ("Jude", "1:1", "We have an account of the penman of this epistle, Jude"), revelation: ("Revelation", "1:1", "It is the revelation"), high_verse: ("Psalms", "119:170", "He calls his prayer his cry, which denotes the fervency and vehemence"), }
// error-pattern:>> cannot be applied to type `port[int]` fn main() { let p1: port[int] = port(); let p2: port[int] = port(); let x = p1 >> p2; }
use crate::{FunctionCtx, Backend}; use lowlang_syntax as syntax; impl<'a, 't, 'l, B: Backend> FunctionCtx<'a, 't, 'l, B> { pub fn trans_stmt(&mut self, stmt: &syntax::Stmt<'t>) { match stmt { syntax::Stmt::Assign(place, value) => { let place = self.trans_place(place); self.trans_value(place, value); }, syntax::Stmt::Nop => {}, } } }
// -*- rust -*- fn main() { let v: vec[int] = [10, 20]; assert (v.(0) == 10); assert (v.(1) == 20); let x: int = 0; assert (v.(x) == 10); assert (v.(x + 1) == 20); x = x + 1; assert (v.(x) == 20); assert (v.(x - 1) == 10); }
pub mod barriers; pub mod controller_collector_context; pub mod global; pub mod mutator_context; pub mod plan_constraints; pub mod tracelocal; pub mod transitive_closure; pub use self::global::AllocationSemantics; pub use self::global::CopyContext; pub use self::global::Plan; pub use self::mutator_context::Mutator; pub use self::mutator_context::MutatorContext; pub use self::plan_constraints::PlanConstraints; pub use self::tracelocal::TraceLocal; pub use self::transitive_closure::TransitiveClosure; pub mod gencopy; pub mod nogc; pub mod semispace;
#[path = "float_to_binary_1/with_float.rs"] pub mod with_float; // `without_float_errors_badarg` in unit tests
// 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 { super::{asset::Asset, cache::Cache}, failure::{format_err, Error, ResultExt}, fidl::endpoints::create_proxy, fidl_fuchsia_io as io, fidl_fuchsia_mem as mem, fidl_fuchsia_pkg::{FontResolverMarker, UpdatePolicy}, fuchsia_component::client::connect_to_service, fuchsia_url::pkg_url::PkgUrl, fuchsia_zircon as zx, futures::lock::Mutex, io_util, std::{ collections::BTreeMap, fs::File, path::{Path, PathBuf}, }, }; /// Get `VMO` handle to the [`Asset`] at `path`. /// TODO(seancuff): Use a typed error instead. fn load_asset_to_vmo(path: &Path) -> Result<mem::Buffer, Error> { let file = File::open(path)?; let vmo = fdio::get_vmo_copy_from_file(&file)?; let size = file.metadata()?.len(); Ok(mem::Buffer { vmo, size }) } /// Stores the relationship between [`Asset`] paths and IDs. /// Should be initialized by [`FontService`]. /// /// `path_to_id_map` and `id_to_path_map` form a bidirectional map, so this relation holds: /// ``` /// assert_eq!(self.path_to_id_map.get(&path), Some(&id)); /// assert_eq!(self.id_to_path_map.get(&id), Some(&path)); /// ``` pub struct Collection { /// Maps [`Asset`] path to ID. path_to_id_map: BTreeMap<PathBuf, u32>, /// Inverse of `path_to_id_map`. id_to_path_map: BTreeMap<u32, PathBuf>, /// Maps asset paths to package URLs. path_to_url_map: BTreeMap<PathBuf, PkgUrl>, /// Maps asset paths to previously-resolved directory handles. path_to_dir_map: Mutex<BTreeMap<PathBuf, io::DirectoryProxy>>, /// Next ID to assign, autoincremented from 0. next_id: u32, cache: Mutex<Cache>, } const CACHE_SIZE_BYTES: u64 = 4_000_000; impl Collection { pub fn new() -> Collection { Collection { path_to_id_map: BTreeMap::new(), id_to_path_map: BTreeMap::new(), path_to_url_map: BTreeMap::new(), path_to_dir_map: Mutex::new(BTreeMap::new()), next_id: 0, cache: Mutex::new(Cache::new(CACHE_SIZE_BYTES)), } } /// Add the [`Asset`] found at `path` to the collection, store its package URL if provided, /// and return the asset's ID. /// If `path` is already in the collection, return the existing ID. pub fn add_or_get_asset_id(&mut self, path: &Path, package_url: Option<&PkgUrl>) -> u32 { if let Some(id) = self.path_to_id_map.get(&path.to_path_buf()) { return *id; } let id = self.next_id; self.id_to_path_map.insert(id, path.to_path_buf()); self.path_to_id_map.insert(path.to_path_buf(), id); if let Some(url) = package_url { self.path_to_url_map.insert(path.to_path_buf(), url.clone()); } self.next_id += 1; id } /// Get a `Buffer` holding the `Vmo` for the [`Asset`] corresponding to `id`, using the cache /// if possible. pub async fn get_asset(&self, id: u32) -> Result<mem::Buffer, Error> { if let Some(path) = self.id_to_path_map.get(&id) { let mut cache_lock = self.cache.lock().await; let buf = match cache_lock.get(id) { Some(cached) => cached.buffer, None => { let buffer = if path.exists() { load_asset_to_vmo(path).with_context(|_| { format!("Failed to load {}.", path.to_string_lossy()) })? } else { self.get_ephemeral_asset(path).await? }; cache_lock.push(Asset { id, buffer }).buffer } }; return Ok(buf); } Err(format_err!("No asset found with id {}", id)) } async fn get_ephemeral_asset(&self, path_buf: &PathBuf) -> Result<mem::Buffer, Error> { let filename = path_buf.as_path().file_name().ok_or(format_err!( "Path '{}' does not contain a valid filename.", path_buf.to_string_lossy() ))?; // Get cached directory if it is cached let mut cache_lock = self.path_to_dir_map.lock().await; let directory_proxy = match cache_lock.get(path_buf) { Some(dir_proxy) => dir_proxy, None => { let url = self.path_to_url_map.get(path_buf).ok_or(format_err!( "No asset found with path {}", path_buf.to_string_lossy() ))?; // Get directory handle from FontResolver let font_resolver = connect_to_service::<FontResolverMarker>()?; let mut update_policy = UpdatePolicy { fetch_if_absent: true, allow_old_versions: false }; let (dir_proxy, dir_request) = create_proxy::<io::DirectoryMarker>()?; let status = font_resolver .resolve(&url.to_string(), &mut update_policy, dir_request) .await?; zx::Status::ok(status)?; // Cache directory handle cache_lock.insert(path_buf.to_path_buf(), dir_proxy); cache_lock.get(path_buf).unwrap() // Safe because just inserted } }; let file_proxy = io_util::open_file(directory_proxy, Path::new(&filename), io::OPEN_RIGHT_READABLE)?; drop(cache_lock); let (status, buffer) = file_proxy.get_buffer(io::VMO_FLAG_READ).await?; zx::Status::ok(status)?; let buffer = *buffer .ok_or(format_err!("Failed to get buffer for {}.", filename.to_string_lossy()))?; Ok(buffer) } }
#![allow(clippy::comparison_chain)] #![allow(clippy::collapsible_if)] use std::cmp::Reverse; use std::cmp::{max, min}; use std::collections::{BTreeSet, HashMap, HashSet}; use std::fmt::Debug; use itertools::Itertools; use whiteread::parse_line; const ten97: usize = 1000_000_007; /// 2の逆元 mod ten97.割りたいときに使う const inv2ten97: u128 = 500_000_004; fn main() { let (n, k): (usize, usize) = parse_line().unwrap(); let ookisa = 5001; let mut heimen: Vec<Vec<isize>> = vec![vec![0; ookisa]; ookisa]; for _ in 0..n { let (a, b): (usize, usize) = parse_line().unwrap(); heimen[a][b] += 1; } // x方向に走査 for x in 1..ookisa { for y in 0..ookisa { heimen[x][y] += heimen[x - 1][y]; } } // y方向に走査 for x in 0..ookisa { for y in 1..ookisa { heimen[x][y] += heimen[x][y - 1]; } } // for i in 0..10 { // for j in 0..10 { // print!("{} ", heimen[i][j]); // } // println!(); // } let mut ans = 0; for x in 0..ookisa - k - 1 { for y in 0..ookisa - k - 1 { ans = ans.max( heimen[x + k + 1][y + k + 1] + heimen[x][y] - heimen[x + k + 1][y] - heimen[x][y + k + 1], ); } } println!("{}", ans); }
pub use ::libnx::UsbCommsInterfaceInfo; use std::sync::atomic::{AtomicBool, Ordering}; use os; #[derive(Debug)] pub struct Handle(()); static INITIALIZED: AtomicBool = AtomicBool::new(false); impl Drop for Handle { fn drop(&mut self) { if INITIALIZED.swap(false, Ordering::SeqCst) { unsafe { ::libnx::usbCommsExit() }; } } } impl Handle { pub fn new() -> Option<os::Result<Handle>> { if !INITIALIZED.swap(true, Ordering::SeqCst) { let res = unsafe { ::libnx::usbCommsInitialize() }; match res { 0 => Some(Ok(Handle(()))), err => Some(Err(err)), } } else { None } } pub fn new_ex(infos: &[UsbCommsInterfaceInfo]) -> Option<os::Result<Handle>> { let num_interfaces = infos.len() as u32; let infos_ptr = infos as *const _ as *const _; if !INITIALIZED.swap(true, Ordering::SeqCst) { let res = unsafe { ::libnx::usbCommsInitializeEx(num_interfaces, infos_ptr) }; match res { 0 => Some(Ok(Handle(()))), err => Some(Err(err)), } } else { None } } pub fn read_ex(&mut self, buffer: &mut [u8], interface: u32) -> usize { let buff_ptr = buffer as *mut _ as *mut _; let size = buffer.len(); unsafe { ::libnx::usbCommsReadEx(buff_ptr, size, interface) } } pub fn read(&mut self, buffer: &mut [u8]) -> usize { let buff_ptr = buffer as *mut _ as *mut _; let size = buffer.len(); unsafe { ::libnx::usbCommsRead(buff_ptr, size) } } pub fn write_ex(&mut self, buffer: &[u8], interface: u32) -> usize { let buff_ptr = buffer as *const _ as *const _; let size = buffer.len(); unsafe { ::libnx::usbCommsWriteEx(buff_ptr, size, interface) } } pub fn write(&mut self, buffer: &[u8]) -> usize { let buff_ptr = buffer as *const _ as *const _; let size = buffer.len(); unsafe { ::libnx::usbCommsWrite(buff_ptr, size) } } }
// Average of Levels in Binary Tree // https://leetcode.com/explore/challenge/card/march-leetcoding-challenge-2021/588/week-1-march-1st-march-7th/3661/ use crate::tree::TreeNode; pub struct Solution; use std::{cell::RefCell, rc::Rc}; impl Solution { fn visit( acc: &mut Vec<(f64, usize)>, node: &Option<Rc<RefCell<TreeNode>>>, level: usize, ) { if let &Some(ref inner) = node { let cell = inner.borrow(); if level == acc.len() { acc.push((cell.val as f64, 1)); } else { let (sum, count) = acc[level]; acc[level] = (sum + cell.val as f64, count + 1); } Solution::visit(acc, &cell.right, level + 1); Solution::visit(acc, &cell.left, level + 1); } } pub fn average_of_levels(root: Option<Rc<RefCell<TreeNode>>>) -> Vec<f64> { let mut acc = Vec::new(); Self::visit(&mut acc, &root, 0); acc.iter().map(|(sum, count)| sum / *count as f64).collect() } } #[cfg(test)] mod tests { use super::*; use crate::tree::*; #[test] fn example1() { assert_eq!( Solution::average_of_levels(node( 3, leaf(9), node(20, leaf(15), leaf(7)) )), vec![3.0, 14.5, 11.0], ); } }
use vec3::*; use util::*; use onb::*; use hitable::*; pub fn random_cosine_direction(rng: &mut Rng) -> Vec3<f64> { let r1 = rng.rand64(); let r2 = rng.rand64(); let z = (1.-r2).sqrt(); let phi = 2.*PI*r1; let x = phi.cos()*2.*r2.sqrt(); let y = phi.sin()*2.*r2.sqrt(); return Vec3::new(x,y,z); } #[inline] pub fn random_to_sphere(rng: &mut Rng, radius: f64, distance_squared: f64) -> Vec3<f64> { let r1 = rng.rand64(); let r2 = rng.rand64(); let z = 1. + r2*((1.-radius*radius/distance_squared).sqrt() - 1.); let phi = 2.*PI*r1; let x = phi.cos() * (1.-z*z).sqrt(); let y = phi.sin() * (1.-z*z).sqrt(); return Vec3::new(x, y, z); } pub trait Pdf: fmt::Debug { fn value(&self, rng: &mut Rng, direction: &Vec3<f64>) -> f64; fn generate(&self, rng: &mut Rng) -> Vec3<f64>; } #[derive(Debug)] pub struct CosinePdf { uvw: Onb, } impl CosinePdf { pub fn new(w: &Vec3<f64>) -> CosinePdf { CosinePdf { uvw: Onb::new_from_w(w) } } } impl Pdf for CosinePdf { fn value(&self, rng: &mut Rng, direction: &Vec3<f64>) -> f64 { let cosine = dot(&direction.unit_vector(), &self.uvw.w()); if cosine > 0. { return cosine/PI; } else { return 0. } } fn generate(&self, rng: &mut Rng) -> Vec3<f64> { return self.uvw.local_vec(&random_cosine_direction(rng)); } } #[derive(Debug, new)] pub struct HitablePdf<'a> { o: Vec3<f64>, hitable: &'a Hitable, } impl<'a> Pdf for HitablePdf<'a> { fn value(&self, rng: &mut Rng, direction: &Vec3<f64>) -> f64 { return self.hitable.pdf_value(rng, &self.o, direction); } fn generate(&self, rng: &mut Rng) -> Vec3<f64> { return self.hitable.random(rng, &self.o); } } #[derive(Debug, new)] pub struct MixturePdf<'a, 'b> { pdf0: &'a Pdf, pdf1: &'b Pdf, } impl<'a, 'b> Pdf for MixturePdf<'a, 'b> { fn value(&self, rng: &mut Rng, direction: &Vec3<f64>) -> f64 { return 0.5 * self.pdf0.value(rng, direction) + 0.5 * self.pdf1.value(rng, direction); } fn generate(&self, rng: &mut Rng) -> Vec3<f64> { if rng.rand64() < 0.5 { return self.pdf0.generate(rng); } else { return self.pdf1.generate(rng); } } }
include!("common.in"); fn main() { init_async_rt(); async_rt::task::block_on(tcp_echo()); }
// 参考: https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8 macro_rules! read_value { ($iter:expr, ( $($t:tt),* )) => { ( $(read_value!($iter, $t)),* ) }; ($iter:expr, [ $t:tt ; $len:expr ]) => { (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>() }; ($iter:expr, chars) => { read_value!($iter, String).chars().collect::<Vec<char>>() }; ($iter:expr, usize1) => { read_value!($iter, usize) - 1 }; ($iter:expr, $t:ty) => { $iter.next().unwrap().parse::<$t>().expect("Parse error") }; } macro_rules! input_inner { ($iter:expr) => {}; ($iter:expr, ) => {}; ($iter:expr, $var:ident : $t:tt $($r:tt)*) => { let $var = read_value!($iter, $t); input_inner!{$iter $($r)*} }; } macro_rules! input { (source = $s:expr, $($r:tt)*) => { let mut iter = $s.split_whitespace(); input_inner!{iter, $($r)*} }; ($($r:tt)*) => { let mut s = { use std::io::Read; let mut s = String::new(); std::io::stdin().read_to_string(&mut s).unwrap(); s }; let mut iter = s.split_whitespace(); input_inner!{iter, $($r)*} }; } fn main() { input! { cs: chars }; let cs_len = cs.len(); if cs_len < 4 { println!("0"); return; } let i64_cs: Vec<i64> = { let mut i64_cs: Vec<i64> = Vec::new(); for i in &cs { i64_cs.push(*i as i64 - 48); } i64_cs }; let mut target_count = 0; for digit_count in 4..(cs_len + 1) { for start_index in 0..(cs_len - digit_count + 1) { // start_index変える let mut target_num = 0; for i in 0..digit_count { target_num += i64_cs[start_index + i] * i64::pow(10, (digit_count - (i + 1)) as u32); // 各桁の数字足す } if target_num % 2019 == 0 { target_count += 1; } } } println!("{}", target_count); }
use super::component_prelude::*; #[derive(Default)] pub struct Tile; impl Component for Tile { type Storage = NullStorage<Self>; }
/// Return value when reading a slice with `CLob::read_slice()` or `NCLob::read_slice()`. /// /// Both methods allow specifying the `offset` and the `length` of the requested slice. /// /// * `CLob::read_slice()` interprets `offset` and `length` as numbers of bytes, applied to the /// HANA-internally used CESU8-encoding, where a unicode codepoint needs between 1 and 6 bytes. /// /// If the specified boundaries of the slice do not coincide with the /// begin or end of a unicode-codepoint, then it will begin and/or end with a byte /// sequence that cannot be converted into UTF-8, the unicode-encoding used by rust's `String`. /// `CharLobSlice::prefix` and/or `CharLobSlice::postfix` then contain these 1-5 extra bytes. /// /// * `NCLob::read_slice()` interprets `offset` and `length` as numbers of unicode characters, /// where the following rule is applied: /// /// * a unicode codepoint in BMP-0 (which is represented as 1, 2, or 3 bytes) counts as 1 /// /// * a unicode codepoint in BMP-1 (which is represented as a pair of two surrogates, /// each of which is a 3-byte sequence) counts as 2. /// /// If the specified boundaries of the slice do not coincide with the /// begin or end of a unicode-codepoint, i.e. if the slice begins with a second surrogate or ends /// with a first surrogate, then /// `CharLobSlice::prefix` and/or `CharLobSlice::postfix` will contain these 3 extra bytes. #[derive(Clone, Debug)] pub struct CharLobSlice { /// If relevant, contains bytes at the begin of the slice from an incomplete unicode-codepoint. pub prefix: Option<Vec<u8>>, /// The main part of the slice. pub data: String, /// If relevant, contains bytes at the end of the slice from an incomplete unicode-codepoint. pub postfix: Option<Vec<u8>>, }
use std::collections::HashSet; use legion::*; #[derive(Clone, Copy, Debug, PartialEq)] struct Pos(f32, f32, f32); #[derive(Clone, Copy, Debug, PartialEq)] struct Rot(f32, f32, f32); #[derive(Clone, Copy, Debug, PartialEq)] struct Scale(f32, f32, f32); #[derive(Clone, Copy, Debug, PartialEq)] struct Vel(f32, f32, f32); #[derive(Clone, Copy, Debug, PartialEq)] struct Accel(f32, f32, f32); #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] struct Model(u32); #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] struct Static; #[test] fn insert() { let mut world = World::default(); let components = vec![(4f32, 5u64, 6u16), (4f32, 5u64, 6u16)]; let entities = world.extend(components); assert_eq!(2, entities.len()); } #[test] fn get_component() { let mut world = World::default(); let components = vec![ (Pos(1., 2., 3.), Rot(0.1, 0.2, 0.3)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), ]; let mut entities: Vec<Entity> = Vec::new(); for e in world.extend(components.clone()) { entities.push(*e); } for (i, e) in entities.iter().enumerate() { match world.entry_ref(*e).unwrap().get_component() { Ok(x) => assert_eq!(components.get(i).map(|(x, _)| x), Some(&x as &Pos)), Err(_) => assert_eq!(components.get(i).map(|(x, _)| x), None), } match world.entry_ref(*e).unwrap().get_component() { Ok(x) => assert_eq!(components.get(i).map(|(_, x)| x), Some(&x as &Rot)), Err(_) => assert_eq!(components.get(i).map(|(_, x)| x), None), } } } #[test] fn get_component_wrong_type() { let mut world = World::default(); let entity = *world.extend(vec![(0f64,)]).get(0).unwrap(); assert!(world .entry_ref(entity) .unwrap() .get_component::<i32>() .is_err()); } #[test] fn remove() { let mut world = World::default(); let components = vec![ (Pos(1., 2., 3.), Rot(0.1, 0.2, 0.3)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), ]; let mut entities: Vec<Entity> = Vec::new(); for e in world.extend(components) { entities.push(*e); } for e in entities.iter() { assert_eq!(true, world.contains(*e)); } for e in entities.iter() { world.remove(*e); assert_eq!(false, world.contains(*e)); } } #[test] fn delete_all() { let mut world = World::default(); let components = vec![ (Pos(1., 2., 3.), Rot(0.1, 0.2, 0.3)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), ]; let mut entities: Vec<Entity> = Vec::new(); for e in world.extend(components) { entities.push(*e); } // Check that the entity allocator knows about the entities for e in entities.iter() { assert_eq!(true, world.contains(*e)); } // Check that the entities are in storage let mut query = <(Read<Pos>, Read<Rot>)>::query(); assert_eq!(2, query.iter(&world).count()); world.clear(); // Check that the entity allocator no longer knows about the entities for e in entities.iter() { assert_eq!(false, world.contains(*e)); } // Check that the entities are removed from storage let mut query = <(Read<Pos>, Read<Rot>)>::query(); assert_eq!(0, query.iter(&world).count()); } #[test] fn delete_last() { let mut world = World::default(); let components = vec![ (Pos(1., 2., 3.), Rot(0.1, 0.2, 0.3)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), ]; let mut entities: Vec<Entity> = Vec::new(); for e in world.extend(components.clone()) { entities.push(*e); } let last = *entities.last().unwrap(); world.remove(last); assert_eq!(false, world.contains(last)); for (i, e) in entities.iter().take(entities.len() - 1).enumerate() { assert_eq!(true, world.contains(*e)); match world.entry_ref(*e).unwrap().get_component() { Ok(x) => assert_eq!(components.get(i).map(|(x, _)| x), Some(&x as &Pos)), Err(_) => assert_eq!(components.get(i).map(|(x, _)| x), None), } match world.entry_ref(*e).unwrap().get_component() { Ok(x) => assert_eq!(components.get(i).map(|(_, x)| x), Some(&x as &Rot)), Err(_) => assert_eq!(components.get(i).map(|(_, x)| x), None), } } } #[test] fn delete_first() { let mut world = World::default(); let components = vec![ (Pos(1., 2., 3.), Rot(0.1, 0.2, 0.3)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), ]; let mut entities: Vec<Entity> = Vec::new(); for e in world.extend(components.clone()) { entities.push(*e); } let first = *entities.first().unwrap(); world.remove(first); assert_eq!(false, world.contains(first)); for (i, e) in entities.iter().skip(1).enumerate() { assert_eq!(true, world.contains(*e)); match world.entry_ref(*e).unwrap().get_component() { Ok(x) => assert_eq!(components.get(i + 1).map(|(x, _)| x), Some(&x as &Pos)), Err(_) => assert_eq!(components.get(i + 1).map(|(x, _)| x), None), } match world.entry_ref(*e).unwrap().get_component() { Ok(x) => assert_eq!(components.get(i + 1).map(|(_, x)| x), Some(&x as &Rot)), Err(_) => assert_eq!(components.get(i + 1).map(|(_, x)| x), None), } } } #[test] fn merge() { let mut world_1 = World::default(); let mut world_2 = World::default(); let components = vec![ (Pos(1., 2., 3.), Rot(0.1, 0.2, 0.3)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), ]; let mut world_1_entities: Vec<Entity> = Vec::new(); for e in world_1.extend(components.clone()) { world_1_entities.push(*e); } let mut world_2_entities: Vec<Entity> = Vec::new(); for e in world_2.extend(components.clone()) { world_2_entities.push(*e); } world_1.move_from(&mut world_2, &any()); for (i, e) in world_2_entities.iter().enumerate() { assert!(world_1.contains(*e)); let (pos, rot) = components.get(i).unwrap(); assert_eq!( pos, &world_1.entry(*e).unwrap().get_component().unwrap() as &Pos ); assert_eq!( rot, &world_1.entry(*e).unwrap().get_component().unwrap() as &Rot ); } } #[test] fn mutate_add_component() { let mut world = World::default(); let components = vec![ (Pos(1., 2., 3.), Rot(0.1, 0.2, 0.3)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), ]; let entities = world.extend(components).to_vec(); let mut query_without_scale = <(Read<Pos>, Read<Rot>)>::query(); let mut query_with_scale = <(Read<Pos>, Read<Rot>, Read<Scale>)>::query(); assert_eq!(3, query_without_scale.iter(&world).count()); assert_eq!(0, query_with_scale.iter(&world).count()); world .entry(entities[1]) .unwrap() .add_component(Scale(0.5, 0.5, 0.5)); assert_eq!(3, query_without_scale.iter(&world).count()); assert_eq!(1, query_with_scale.iter(&world).count()); } #[test] fn mutate_remove_component() { let mut world = World::default(); let components = vec![ (Pos(1., 2., 3.), Rot(0.1, 0.2, 0.3)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), ]; let entities = world.extend(components).to_vec(); let mut query_without_rot = Read::<Pos>::query().filter(!component::<Rot>()); let mut query_with_rot = <(Read<Pos>, Read<Rot>)>::query(); assert_eq!(0, query_without_rot.iter(&world).count()); assert_eq!(3, query_with_rot.iter(&world).count()); world.entry(entities[1]).unwrap().remove_component::<Rot>(); assert_eq!(1, query_without_rot.iter(&world).count()); assert_eq!(2, query_with_rot.iter(&world).count()); } #[test] #[cfg(feature = "crossbeam-events")] fn delete_entities_on_drop() { let mut world = World::default(); let (tx, rx) = crossbeam_channel::unbounded::<legion::world::Event>(); let components = vec![(Pos(1., 2., 3.), Rot(0.1, 0.2, 0.3))]; // Insert the data and store resulting entities in a HashSet let mut entities = HashSet::new(); for entity in world.extend(components) { entities.insert(*entity); } world.subscribe(tx, any()); //ManuallyDrop::drop(&mut world); std::mem::drop(world); for e in rx { println!("{:?}", e); if let legion::world::Event::EntityRemoved(entity, _arch_id) = e { assert!(entities.remove(&entity)); } } // Verify that no extra entities are included assert!(entities.is_empty()); } // This test repeatedly creates a world with new entities and drops it, reproducing // https://github.com/TomGillen/legion/issues/92 #[test] fn lots_of_deletes() { for _ in 0..10000 { let components = vec![ (Pos(1., 2., 3.), Rot(0.1, 0.2, 0.3)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), ]; let mut world = World::default(); world.extend(components).to_vec(); } } #[test] fn iter_entities() { let mut world = World::default(); let components = vec![ (Pos(1., 2., 3.), Rot(0.1, 0.2, 0.3)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), (Pos(4., 5., 6.), Rot(0.4, 0.5, 0.6)), ]; // Insert the data and store resulting entities in a HashSet let mut entities = HashSet::new(); for entity in world.extend(components) { entities.insert(*entity); } // Verify that all entities in iter_entities() are included let mut all = Entity::query(); for entity in all.iter(&world) { assert!(entities.remove(entity)); } // Verify that no extra entities are included assert!(entities.is_empty()); }
use super::*; #[derive(Clone)] pub struct TypeSpec(pub Row); impl TypeSpec { pub fn blob(&self) -> Blob { self.0.blob(0) } }
#![allow(dead_code)] struct ComplexRefs<'a> { int_ref: &'a i32, unsigned_ref: &'a u32, str_ref: &'a str } fn main() { // initialize 3 integers let a : i32 = -423; let c : i32 = 2321; let d : u32 = 5; let str_ref : &str = "hahaha"; let cr : ComplexRefs = ComplexRefs { int_ref: &a, unsigned_ref: &d, str_ref: str_ref }; let e; { let r = cr; e = three_refs(&a, &c, &r); } println!("{}", e); } // I would like to return a reference now // Compiler tells me that it expects a lifetime signature! // Error message is very clear: // = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `a`, `_c`, or one of `cr`'s 2 lifetimes fn three_refs<'a, 'b>(a: &'a i32, _c: &'a i32, cr: &'b ComplexRefs<'a>) -> &'a i32 { if *a > 5 { cr.int_ref } else { a } }
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] pub const CERTIFICATE_HASH_LENGTH: u32 = 20u32; pub const EAPCODE_Failure: u32 = 4u32; pub const EAPCODE_Request: u32 = 1u32; pub const EAPCODE_Response: u32 = 2u32; pub const EAPCODE_Success: u32 = 3u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EAPHOST_AUTH_INFO { pub status: EAPHOST_AUTH_STATUS, pub dwErrorCode: u32, pub dwReasonCode: u32, } impl EAPHOST_AUTH_INFO {} impl ::core::default::Default for EAPHOST_AUTH_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EAPHOST_AUTH_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAPHOST_AUTH_INFO").field("status", &self.status).field("dwErrorCode", &self.dwErrorCode).field("dwReasonCode", &self.dwReasonCode).finish() } } impl ::core::cmp::PartialEq for EAPHOST_AUTH_INFO { fn eq(&self, other: &Self) -> bool { self.status == other.status && self.dwErrorCode == other.dwErrorCode && self.dwReasonCode == other.dwReasonCode } } impl ::core::cmp::Eq for EAPHOST_AUTH_INFO {} unsafe impl ::windows::core::Abi for EAPHOST_AUTH_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 EAPHOST_AUTH_STATUS(pub i32); pub const EapHostInvalidSession: EAPHOST_AUTH_STATUS = EAPHOST_AUTH_STATUS(0i32); pub const EapHostAuthNotStarted: EAPHOST_AUTH_STATUS = EAPHOST_AUTH_STATUS(1i32); pub const EapHostAuthIdentityExchange: EAPHOST_AUTH_STATUS = EAPHOST_AUTH_STATUS(2i32); pub const EapHostAuthNegotiatingType: EAPHOST_AUTH_STATUS = EAPHOST_AUTH_STATUS(3i32); pub const EapHostAuthInProgress: EAPHOST_AUTH_STATUS = EAPHOST_AUTH_STATUS(4i32); pub const EapHostAuthSucceeded: EAPHOST_AUTH_STATUS = EAPHOST_AUTH_STATUS(5i32); pub const EapHostAuthFailed: EAPHOST_AUTH_STATUS = EAPHOST_AUTH_STATUS(6i32); impl ::core::convert::From<i32> for EAPHOST_AUTH_STATUS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EAPHOST_AUTH_STATUS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAPHOST_IDENTITY_UI_PARAMS { pub eapMethodType: EAP_METHOD_TYPE, pub dwFlags: u32, pub dwSizeofConnectionData: u32, pub pConnectionData: *mut u8, pub dwSizeofUserData: u32, pub pUserData: *mut u8, pub dwSizeofUserDataOut: u32, pub pUserDataOut: *mut u8, pub pwszIdentity: super::super::Foundation::PWSTR, pub dwError: u32, pub pEapError: *mut EAP_ERROR, } #[cfg(feature = "Win32_Foundation")] impl EAPHOST_IDENTITY_UI_PARAMS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAPHOST_IDENTITY_UI_PARAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAPHOST_IDENTITY_UI_PARAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAPHOST_IDENTITY_UI_PARAMS") .field("eapMethodType", &self.eapMethodType) .field("dwFlags", &self.dwFlags) .field("dwSizeofConnectionData", &self.dwSizeofConnectionData) .field("pConnectionData", &self.pConnectionData) .field("dwSizeofUserData", &self.dwSizeofUserData) .field("pUserData", &self.pUserData) .field("dwSizeofUserDataOut", &self.dwSizeofUserDataOut) .field("pUserDataOut", &self.pUserDataOut) .field("pwszIdentity", &self.pwszIdentity) .field("dwError", &self.dwError) .field("pEapError", &self.pEapError) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAPHOST_IDENTITY_UI_PARAMS { fn eq(&self, other: &Self) -> bool { self.eapMethodType == other.eapMethodType && self.dwFlags == other.dwFlags && self.dwSizeofConnectionData == other.dwSizeofConnectionData && self.pConnectionData == other.pConnectionData && self.dwSizeofUserData == other.dwSizeofUserData && self.pUserData == other.pUserData && self.dwSizeofUserDataOut == other.dwSizeofUserDataOut && self.pUserDataOut == other.pUserDataOut && self.pwszIdentity == other.pwszIdentity && self.dwError == other.dwError && self.pEapError == other.pEapError } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAPHOST_IDENTITY_UI_PARAMS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAPHOST_IDENTITY_UI_PARAMS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAPHOST_INTERACTIVE_UI_PARAMS { pub dwSizeofContextData: u32, pub pContextData: *mut u8, pub dwSizeofInteractiveUIData: u32, pub pInteractiveUIData: *mut u8, pub dwError: u32, pub pEapError: *mut EAP_ERROR, } #[cfg(feature = "Win32_Foundation")] impl EAPHOST_INTERACTIVE_UI_PARAMS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAPHOST_INTERACTIVE_UI_PARAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAPHOST_INTERACTIVE_UI_PARAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAPHOST_INTERACTIVE_UI_PARAMS") .field("dwSizeofContextData", &self.dwSizeofContextData) .field("pContextData", &self.pContextData) .field("dwSizeofInteractiveUIData", &self.dwSizeofInteractiveUIData) .field("pInteractiveUIData", &self.pInteractiveUIData) .field("dwError", &self.dwError) .field("pEapError", &self.pEapError) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAPHOST_INTERACTIVE_UI_PARAMS { fn eq(&self, other: &Self) -> bool { self.dwSizeofContextData == other.dwSizeofContextData && self.pContextData == other.pContextData && self.dwSizeofInteractiveUIData == other.dwSizeofInteractiveUIData && self.pInteractiveUIData == other.pInteractiveUIData && self.dwError == other.dwError && self.pEapError == other.pEapError } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAPHOST_INTERACTIVE_UI_PARAMS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAPHOST_INTERACTIVE_UI_PARAMS { type Abi = Self; } pub const EAPHOST_METHOD_API_VERSION: u32 = 1u32; pub const EAPHOST_PEER_API_VERSION: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EAP_ATTRIBUTE { pub eaType: EAP_ATTRIBUTE_TYPE, pub dwLength: u32, pub pValue: *mut u8, } impl EAP_ATTRIBUTE {} impl ::core::default::Default for EAP_ATTRIBUTE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EAP_ATTRIBUTE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_ATTRIBUTE").field("eaType", &self.eaType).field("dwLength", &self.dwLength).field("pValue", &self.pValue).finish() } } impl ::core::cmp::PartialEq for EAP_ATTRIBUTE { fn eq(&self, other: &Self) -> bool { self.eaType == other.eaType && self.dwLength == other.dwLength && self.pValue == other.pValue } } impl ::core::cmp::Eq for EAP_ATTRIBUTE {} unsafe impl ::windows::core::Abi for EAP_ATTRIBUTE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EAP_ATTRIBUTES { pub dwNumberOfAttributes: u32, pub pAttribs: *mut EAP_ATTRIBUTE, } impl EAP_ATTRIBUTES {} impl ::core::default::Default for EAP_ATTRIBUTES { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EAP_ATTRIBUTES { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_ATTRIBUTES").field("dwNumberOfAttributes", &self.dwNumberOfAttributes).field("pAttribs", &self.pAttribs).finish() } } impl ::core::cmp::PartialEq for EAP_ATTRIBUTES { fn eq(&self, other: &Self) -> bool { self.dwNumberOfAttributes == other.dwNumberOfAttributes && self.pAttribs == other.pAttribs } } impl ::core::cmp::Eq for EAP_ATTRIBUTES {} unsafe impl ::windows::core::Abi for EAP_ATTRIBUTES { 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 EAP_ATTRIBUTE_TYPE(pub i32); pub const eatMinimum: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(0i32); pub const eatUserName: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(1i32); pub const eatUserPassword: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(2i32); pub const eatMD5CHAPPassword: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(3i32); pub const eatNASIPAddress: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(4i32); pub const eatNASPort: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(5i32); pub const eatServiceType: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(6i32); pub const eatFramedProtocol: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(7i32); pub const eatFramedIPAddress: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8i32); pub const eatFramedIPNetmask: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(9i32); pub const eatFramedRouting: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(10i32); pub const eatFilterId: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(11i32); pub const eatFramedMTU: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(12i32); pub const eatFramedCompression: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(13i32); pub const eatLoginIPHost: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(14i32); pub const eatLoginService: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(15i32); pub const eatLoginTCPPort: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(16i32); pub const eatUnassigned17: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(17i32); pub const eatReplyMessage: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(18i32); pub const eatCallbackNumber: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(19i32); pub const eatCallbackId: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(20i32); pub const eatUnassigned21: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(21i32); pub const eatFramedRoute: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(22i32); pub const eatFramedIPXNetwork: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(23i32); pub const eatState: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(24i32); pub const eatClass: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(25i32); pub const eatVendorSpecific: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(26i32); pub const eatSessionTimeout: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(27i32); pub const eatIdleTimeout: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(28i32); pub const eatTerminationAction: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(29i32); pub const eatCalledStationId: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(30i32); pub const eatCallingStationId: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(31i32); pub const eatNASIdentifier: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(32i32); pub const eatProxyState: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(33i32); pub const eatLoginLATService: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(34i32); pub const eatLoginLATNode: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(35i32); pub const eatLoginLATGroup: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(36i32); pub const eatFramedAppleTalkLink: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(37i32); pub const eatFramedAppleTalkNetwork: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(38i32); pub const eatFramedAppleTalkZone: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(39i32); pub const eatAcctStatusType: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(40i32); pub const eatAcctDelayTime: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(41i32); pub const eatAcctInputOctets: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(42i32); pub const eatAcctOutputOctets: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(43i32); pub const eatAcctSessionId: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(44i32); pub const eatAcctAuthentic: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(45i32); pub const eatAcctSessionTime: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(46i32); pub const eatAcctInputPackets: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(47i32); pub const eatAcctOutputPackets: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(48i32); pub const eatAcctTerminateCause: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(49i32); pub const eatAcctMultiSessionId: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(50i32); pub const eatAcctLinkCount: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(51i32); pub const eatAcctEventTimeStamp: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(55i32); pub const eatMD5CHAPChallenge: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(60i32); pub const eatNASPortType: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(61i32); pub const eatPortLimit: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(62i32); pub const eatLoginLATPort: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(63i32); pub const eatTunnelType: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(64i32); pub const eatTunnelMediumType: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(65i32); pub const eatTunnelClientEndpoint: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(66i32); pub const eatTunnelServerEndpoint: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(67i32); pub const eatARAPPassword: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(70i32); pub const eatARAPFeatures: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(71i32); pub const eatARAPZoneAccess: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(72i32); pub const eatARAPSecurity: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(73i32); pub const eatARAPSecurityData: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(74i32); pub const eatPasswordRetry: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(75i32); pub const eatPrompt: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(76i32); pub const eatConnectInfo: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(77i32); pub const eatConfigurationToken: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(78i32); pub const eatEAPMessage: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(79i32); pub const eatSignature: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(80i32); pub const eatARAPChallengeResponse: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(84i32); pub const eatAcctInterimInterval: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(85i32); pub const eatNASIPv6Address: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(95i32); pub const eatFramedInterfaceId: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(96i32); pub const eatFramedIPv6Prefix: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(97i32); pub const eatLoginIPv6Host: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(98i32); pub const eatFramedIPv6Route: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(99i32); pub const eatFramedIPv6Pool: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(100i32); pub const eatARAPGuestLogon: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8096i32); pub const eatCertificateOID: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8097i32); pub const eatEAPConfiguration: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8098i32); pub const eatPEAPEmbeddedEAPTypeId: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8099i32); pub const eatPEAPFastRoamedSession: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8100i32); pub const eatFastRoamedSession: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8100i32); pub const eatEAPTLV: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8102i32); pub const eatCredentialsChanged: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8103i32); pub const eatInnerEapMethodType: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8104i32); pub const eatClearTextPassword: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8107i32); pub const eatQuarantineSoH: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8150i32); pub const eatCertificateThumbprint: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(8250i32); pub const eatPeerId: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(9000i32); pub const eatServerId: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(9001i32); pub const eatMethodId: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(9002i32); pub const eatEMSK: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(9003i32); pub const eatSessionId: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(9004i32); pub const eatReserved: EAP_ATTRIBUTE_TYPE = EAP_ATTRIBUTE_TYPE(-1i32); impl ::core::convert::From<i32> for EAP_ATTRIBUTE_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EAP_ATTRIBUTE_TYPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EAP_AUTHENTICATOR_METHOD_ROUTINES { pub dwSizeInBytes: u32, pub pEapType: *mut EAP_METHOD_TYPE, pub EapMethodAuthenticatorInitialize: isize, pub EapMethodAuthenticatorBeginSession: isize, pub EapMethodAuthenticatorUpdateInnerMethodParams: isize, pub EapMethodAuthenticatorReceivePacket: isize, pub EapMethodAuthenticatorSendPacket: isize, pub EapMethodAuthenticatorGetAttributes: isize, pub EapMethodAuthenticatorSetAttributes: isize, pub EapMethodAuthenticatorGetResult: isize, pub EapMethodAuthenticatorEndSession: isize, pub EapMethodAuthenticatorShutdown: isize, } impl EAP_AUTHENTICATOR_METHOD_ROUTINES {} impl ::core::default::Default for EAP_AUTHENTICATOR_METHOD_ROUTINES { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EAP_AUTHENTICATOR_METHOD_ROUTINES { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_AUTHENTICATOR_METHOD_ROUTINES") .field("dwSizeInBytes", &self.dwSizeInBytes) .field("pEapType", &self.pEapType) .field("EapMethodAuthenticatorInitialize", &self.EapMethodAuthenticatorInitialize) .field("EapMethodAuthenticatorBeginSession", &self.EapMethodAuthenticatorBeginSession) .field("EapMethodAuthenticatorUpdateInnerMethodParams", &self.EapMethodAuthenticatorUpdateInnerMethodParams) .field("EapMethodAuthenticatorReceivePacket", &self.EapMethodAuthenticatorReceivePacket) .field("EapMethodAuthenticatorSendPacket", &self.EapMethodAuthenticatorSendPacket) .field("EapMethodAuthenticatorGetAttributes", &self.EapMethodAuthenticatorGetAttributes) .field("EapMethodAuthenticatorSetAttributes", &self.EapMethodAuthenticatorSetAttributes) .field("EapMethodAuthenticatorGetResult", &self.EapMethodAuthenticatorGetResult) .field("EapMethodAuthenticatorEndSession", &self.EapMethodAuthenticatorEndSession) .field("EapMethodAuthenticatorShutdown", &self.EapMethodAuthenticatorShutdown) .finish() } } impl ::core::cmp::PartialEq for EAP_AUTHENTICATOR_METHOD_ROUTINES { fn eq(&self, other: &Self) -> bool { self.dwSizeInBytes == other.dwSizeInBytes && self.pEapType == other.pEapType && self.EapMethodAuthenticatorInitialize == other.EapMethodAuthenticatorInitialize && self.EapMethodAuthenticatorBeginSession == other.EapMethodAuthenticatorBeginSession && self.EapMethodAuthenticatorUpdateInnerMethodParams == other.EapMethodAuthenticatorUpdateInnerMethodParams && self.EapMethodAuthenticatorReceivePacket == other.EapMethodAuthenticatorReceivePacket && self.EapMethodAuthenticatorSendPacket == other.EapMethodAuthenticatorSendPacket && self.EapMethodAuthenticatorGetAttributes == other.EapMethodAuthenticatorGetAttributes && self.EapMethodAuthenticatorSetAttributes == other.EapMethodAuthenticatorSetAttributes && self.EapMethodAuthenticatorGetResult == other.EapMethodAuthenticatorGetResult && self.EapMethodAuthenticatorEndSession == other.EapMethodAuthenticatorEndSession && self.EapMethodAuthenticatorShutdown == other.EapMethodAuthenticatorShutdown } } impl ::core::cmp::Eq for EAP_AUTHENTICATOR_METHOD_ROUTINES {} unsafe impl ::windows::core::Abi for EAP_AUTHENTICATOR_METHOD_ROUTINES { 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 EAP_AUTHENTICATOR_SEND_TIMEOUT(pub i32); pub const EAP_AUTHENTICATOR_SEND_TIMEOUT_NONE: EAP_AUTHENTICATOR_SEND_TIMEOUT = EAP_AUTHENTICATOR_SEND_TIMEOUT(0i32); pub const EAP_AUTHENTICATOR_SEND_TIMEOUT_BASIC: EAP_AUTHENTICATOR_SEND_TIMEOUT = EAP_AUTHENTICATOR_SEND_TIMEOUT(1i32); pub const EAP_AUTHENTICATOR_SEND_TIMEOUT_INTERACTIVE: EAP_AUTHENTICATOR_SEND_TIMEOUT = EAP_AUTHENTICATOR_SEND_TIMEOUT(2i32); impl ::core::convert::From<i32> for EAP_AUTHENTICATOR_SEND_TIMEOUT { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EAP_AUTHENTICATOR_SEND_TIMEOUT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_CONFIG_INPUT_FIELD_ARRAY { pub dwVersion: u32, pub dwNumberOfFields: u32, pub pFields: *mut EAP_CONFIG_INPUT_FIELD_DATA, } #[cfg(feature = "Win32_Foundation")] impl EAP_CONFIG_INPUT_FIELD_ARRAY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_CONFIG_INPUT_FIELD_ARRAY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAP_CONFIG_INPUT_FIELD_ARRAY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_CONFIG_INPUT_FIELD_ARRAY").field("dwVersion", &self.dwVersion).field("dwNumberOfFields", &self.dwNumberOfFields).field("pFields", &self.pFields).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_CONFIG_INPUT_FIELD_ARRAY { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.dwNumberOfFields == other.dwNumberOfFields && self.pFields == other.pFields } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_CONFIG_INPUT_FIELD_ARRAY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_CONFIG_INPUT_FIELD_ARRAY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_CONFIG_INPUT_FIELD_DATA { pub dwSize: u32, pub Type: EAP_CONFIG_INPUT_FIELD_TYPE, pub dwFlagProps: u32, pub pwszLabel: super::super::Foundation::PWSTR, pub pwszData: super::super::Foundation::PWSTR, pub dwMinDataLength: u32, pub dwMaxDataLength: u32, } #[cfg(feature = "Win32_Foundation")] impl EAP_CONFIG_INPUT_FIELD_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_CONFIG_INPUT_FIELD_DATA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAP_CONFIG_INPUT_FIELD_DATA { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_CONFIG_INPUT_FIELD_DATA") .field("dwSize", &self.dwSize) .field("Type", &self.Type) .field("dwFlagProps", &self.dwFlagProps) .field("pwszLabel", &self.pwszLabel) .field("pwszData", &self.pwszData) .field("dwMinDataLength", &self.dwMinDataLength) .field("dwMaxDataLength", &self.dwMaxDataLength) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_CONFIG_INPUT_FIELD_DATA { fn eq(&self, other: &Self) -> bool { self.dwSize == other.dwSize && self.Type == other.Type && self.dwFlagProps == other.dwFlagProps && self.pwszLabel == other.pwszLabel && self.pwszData == other.pwszData && self.dwMinDataLength == other.dwMinDataLength && self.dwMaxDataLength == other.dwMaxDataLength } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_CONFIG_INPUT_FIELD_DATA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_CONFIG_INPUT_FIELD_DATA { type Abi = Self; } pub const EAP_CONFIG_INPUT_FIELD_PROPS_DEFAULT: u32 = 0u32; pub const EAP_CONFIG_INPUT_FIELD_PROPS_NON_DISPLAYABLE: u32 = 1u32; pub const EAP_CONFIG_INPUT_FIELD_PROPS_NON_PERSIST: u32 = 2u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct EAP_CONFIG_INPUT_FIELD_TYPE(pub i32); pub const EapConfigInputUsername: EAP_CONFIG_INPUT_FIELD_TYPE = EAP_CONFIG_INPUT_FIELD_TYPE(0i32); pub const EapConfigInputPassword: EAP_CONFIG_INPUT_FIELD_TYPE = EAP_CONFIG_INPUT_FIELD_TYPE(1i32); pub const EapConfigInputNetworkUsername: EAP_CONFIG_INPUT_FIELD_TYPE = EAP_CONFIG_INPUT_FIELD_TYPE(2i32); pub const EapConfigInputNetworkPassword: EAP_CONFIG_INPUT_FIELD_TYPE = EAP_CONFIG_INPUT_FIELD_TYPE(3i32); pub const EapConfigInputPin: EAP_CONFIG_INPUT_FIELD_TYPE = EAP_CONFIG_INPUT_FIELD_TYPE(4i32); pub const EapConfigInputPSK: EAP_CONFIG_INPUT_FIELD_TYPE = EAP_CONFIG_INPUT_FIELD_TYPE(5i32); pub const EapConfigInputEdit: EAP_CONFIG_INPUT_FIELD_TYPE = EAP_CONFIG_INPUT_FIELD_TYPE(6i32); pub const EapConfigSmartCardUsername: EAP_CONFIG_INPUT_FIELD_TYPE = EAP_CONFIG_INPUT_FIELD_TYPE(7i32); pub const EapConfigSmartCardError: EAP_CONFIG_INPUT_FIELD_TYPE = EAP_CONFIG_INPUT_FIELD_TYPE(8i32); impl ::core::convert::From<i32> for EAP_CONFIG_INPUT_FIELD_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EAP_CONFIG_INPUT_FIELD_TYPE { type Abi = Self; } pub const EAP_CREDENTIAL_VERSION: u32 = 1u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_CRED_EXPIRY_REQ { pub curCreds: EAP_CONFIG_INPUT_FIELD_ARRAY, pub newCreds: EAP_CONFIG_INPUT_FIELD_ARRAY, } #[cfg(feature = "Win32_Foundation")] impl EAP_CRED_EXPIRY_REQ {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_CRED_EXPIRY_REQ { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAP_CRED_EXPIRY_REQ { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_CRED_EXPIRY_REQ").field("curCreds", &self.curCreds).field("newCreds", &self.newCreds).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_CRED_EXPIRY_REQ { fn eq(&self, other: &Self) -> bool { self.curCreds == other.curCreds && self.newCreds == other.newCreds } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_CRED_EXPIRY_REQ {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_CRED_EXPIRY_REQ { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_ERROR { pub dwWinError: u32, pub r#type: EAP_METHOD_TYPE, pub dwReasonCode: u32, pub rootCauseGuid: ::windows::core::GUID, pub repairGuid: ::windows::core::GUID, pub helpLinkGuid: ::windows::core::GUID, pub pRootCauseString: super::super::Foundation::PWSTR, pub pRepairString: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl EAP_ERROR {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_ERROR { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAP_ERROR { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_ERROR") .field("dwWinError", &self.dwWinError) .field("r#type", &self.r#type) .field("dwReasonCode", &self.dwReasonCode) .field("rootCauseGuid", &self.rootCauseGuid) .field("repairGuid", &self.repairGuid) .field("helpLinkGuid", &self.helpLinkGuid) .field("pRootCauseString", &self.pRootCauseString) .field("pRepairString", &self.pRepairString) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_ERROR { fn eq(&self, other: &Self) -> bool { self.dwWinError == other.dwWinError && self.r#type == other.r#type && self.dwReasonCode == other.dwReasonCode && self.rootCauseGuid == other.rootCauseGuid && self.repairGuid == other.repairGuid && self.helpLinkGuid == other.helpLinkGuid && self.pRootCauseString == other.pRootCauseString && self.pRepairString == other.pRepairString } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_ERROR {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_ERROR { type Abi = Self; } pub const EAP_E_AUTHENTICATION_FAILED: u32 = 2151809045u32; pub const EAP_E_CERT_STORE_INACCESSIBLE: u32 = 2151809040u32; pub const EAP_E_EAPHOST_EAPQEC_INACCESSIBLE: u32 = 2151809043u32; pub const EAP_E_EAPHOST_FIRST: i32 = -2143158272i32; pub const EAP_E_EAPHOST_IDENTITY_UNKNOWN: u32 = 2151809044u32; pub const EAP_E_EAPHOST_LAST: i32 = -2143158017i32; pub const EAP_E_EAPHOST_METHOD_INVALID_PACKET: u32 = 2151809047u32; pub const EAP_E_EAPHOST_METHOD_NOT_INSTALLED: u32 = 2151809041u32; pub const EAP_E_EAPHOST_METHOD_OPERATION_NOT_SUPPORTED: u32 = 2151809056u32; pub const EAP_E_EAPHOST_REMOTE_INVALID_PACKET: u32 = 2151809048u32; pub const EAP_E_EAPHOST_THIRDPARTY_METHOD_HOST_RESET: u32 = 2151809042u32; pub const EAP_E_EAPHOST_XML_MALFORMED: u32 = 2151809049u32; pub const EAP_E_METHOD_CONFIG_DOES_NOT_SUPPORT_SSO: u32 = 2151809050u32; pub const EAP_E_NO_SMART_CARD_READER: u32 = 2151809299u32; pub const EAP_E_SERVER_CERT_EXPIRED: u32 = 2151809538u32; pub const EAP_E_SERVER_CERT_INVALID: u32 = 2151809537u32; pub const EAP_E_SERVER_CERT_NOT_FOUND: u32 = 2151809536u32; pub const EAP_E_SERVER_CERT_OTHER_ERROR: u32 = 2151809540u32; pub const EAP_E_SERVER_CERT_REVOKED: u32 = 2151809539u32; pub const EAP_E_SERVER_FIRST: i32 = -2143157760i32; pub const EAP_E_SERVER_LAST: i32 = -2143157505i32; pub const EAP_E_SERVER_ROOT_CERT_FIRST: i32 = -2143157248i32; pub const EAP_E_SERVER_ROOT_CERT_INVALID: u32 = 2151810049u32; pub const EAP_E_SERVER_ROOT_CERT_LAST: i32 = -2143156993i32; pub const EAP_E_SERVER_ROOT_CERT_NAME_REQUIRED: u32 = 2151810054u32; pub const EAP_E_SERVER_ROOT_CERT_NOT_FOUND: u32 = 2151810048u32; pub const EAP_E_SIM_NOT_VALID: u32 = 2151810304u32; pub const EAP_E_USER_CERT_EXPIRED: u32 = 2151809282u32; pub const EAP_E_USER_CERT_INVALID: u32 = 2151809281u32; pub const EAP_E_USER_CERT_NOT_FOUND: u32 = 2151809280u32; pub const EAP_E_USER_CERT_OTHER_ERROR: u32 = 2151809284u32; pub const EAP_E_USER_CERT_REJECTED: u32 = 2151809285u32; pub const EAP_E_USER_CERT_REVOKED: u32 = 2151809283u32; pub const EAP_E_USER_CREDENTIALS_REJECTED: u32 = 2151809297u32; pub const EAP_E_USER_FIRST: i32 = -2143158016i32; pub const EAP_E_USER_LAST: i32 = -2143157761i32; pub const EAP_E_USER_NAME_PASSWORD_REJECTED: u32 = 2151809298u32; pub const EAP_E_USER_ROOT_CERT_EXPIRED: u32 = 2151809794u32; pub const EAP_E_USER_ROOT_CERT_FIRST: i32 = -2143157504i32; pub const EAP_E_USER_ROOT_CERT_INVALID: u32 = 2151809793u32; pub const EAP_E_USER_ROOT_CERT_LAST: i32 = -2143157249i32; pub const EAP_E_USER_ROOT_CERT_NOT_FOUND: u32 = 2151809792u32; pub const EAP_FLAG_CONFG_READONLY: u32 = 524288u32; pub const EAP_FLAG_FULL_AUTH: u32 = 4096u32; pub const EAP_FLAG_GUEST_ACCESS: u32 = 64u32; pub const EAP_FLAG_LOGON: u32 = 4u32; pub const EAP_FLAG_MACHINE_AUTH: u32 = 32u32; pub const EAP_FLAG_NON_INTERACTIVE: u32 = 2u32; pub const EAP_FLAG_ONLY_EAP_TLS: u32 = 16777216u32; pub const EAP_FLAG_PREFER_ALT_CREDENTIALS: u32 = 8192u32; pub const EAP_FLAG_PREVIEW: u32 = 8u32; pub const EAP_FLAG_PRE_LOGON: u32 = 131072u32; pub const EAP_FLAG_RESUME_FROM_HIBERNATE: u32 = 512u32; pub const EAP_FLAG_Reserved1: u32 = 1u32; pub const EAP_FLAG_Reserved2: u32 = 16u32; pub const EAP_FLAG_Reserved3: u32 = 128u32; pub const EAP_FLAG_Reserved4: u32 = 256u32; pub const EAP_FLAG_Reserved5: u32 = 1024u32; pub const EAP_FLAG_Reserved6: u32 = 2048u32; pub const EAP_FLAG_Reserved7: u32 = 16384u32; pub const EAP_FLAG_Reserved8: u32 = 1048576u32; pub const EAP_FLAG_Reserved9: u32 = 4194304u32; pub const EAP_FLAG_SERVER_VALIDATION_REQUIRED: u32 = 33554432u32; pub const EAP_FLAG_SUPRESS_UI: u32 = 65536u32; pub const EAP_FLAG_USER_AUTH: u32 = 262144u32; pub const EAP_FLAG_VPN: u32 = 8388608u32; pub const EAP_GROUP_MASK: i32 = 65280i32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_INTERACTIVE_UI_DATA { pub dwVersion: u32, pub dwSize: u32, pub dwDataType: EAP_INTERACTIVE_UI_DATA_TYPE, pub cbUiData: u32, pub pbUiData: EAP_UI_DATA_FORMAT, } #[cfg(feature = "Win32_Foundation")] impl EAP_INTERACTIVE_UI_DATA {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_INTERACTIVE_UI_DATA { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_INTERACTIVE_UI_DATA { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_INTERACTIVE_UI_DATA {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_INTERACTIVE_UI_DATA { 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 EAP_INTERACTIVE_UI_DATA_TYPE(pub i32); pub const EapCredReq: EAP_INTERACTIVE_UI_DATA_TYPE = EAP_INTERACTIVE_UI_DATA_TYPE(0i32); pub const EapCredResp: EAP_INTERACTIVE_UI_DATA_TYPE = EAP_INTERACTIVE_UI_DATA_TYPE(1i32); pub const EapCredExpiryReq: EAP_INTERACTIVE_UI_DATA_TYPE = EAP_INTERACTIVE_UI_DATA_TYPE(2i32); pub const EapCredExpiryResp: EAP_INTERACTIVE_UI_DATA_TYPE = EAP_INTERACTIVE_UI_DATA_TYPE(3i32); pub const EapCredLogonReq: EAP_INTERACTIVE_UI_DATA_TYPE = EAP_INTERACTIVE_UI_DATA_TYPE(4i32); pub const EapCredLogonResp: EAP_INTERACTIVE_UI_DATA_TYPE = EAP_INTERACTIVE_UI_DATA_TYPE(5i32); impl ::core::convert::From<i32> for EAP_INTERACTIVE_UI_DATA_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EAP_INTERACTIVE_UI_DATA_TYPE { type Abi = Self; } pub const EAP_INTERACTIVE_UI_DATA_VERSION: u32 = 1u32; pub const EAP_INVALID_PACKET: u32 = 2151809048u32; pub const EAP_I_EAPHOST_EAP_NEGOTIATION_FAILED: u32 = 1078067222u32; pub const EAP_I_EAPHOST_FIRST: i32 = -2143158272i32; pub const EAP_I_EAPHOST_LAST: i32 = -2143158017i32; pub const EAP_I_USER_ACCOUNT_OTHER_ERROR: u32 = 1078067472u32; pub const EAP_I_USER_FIRST: i32 = 1078067456i32; pub const EAP_I_USER_LAST: i32 = 1078067711i32; pub const EAP_METHOD_AUTHENTICATOR_CONFIG_IS_IDENTITY_PRIVACY: 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 EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION(pub i32); pub const EAP_METHOD_AUTHENTICATOR_RESPONSE_DISCARD: EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION = EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION(0i32); pub const EAP_METHOD_AUTHENTICATOR_RESPONSE_SEND: EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION = EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION(1i32); pub const EAP_METHOD_AUTHENTICATOR_RESPONSE_RESULT: EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION = EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION(2i32); pub const EAP_METHOD_AUTHENTICATOR_RESPONSE_RESPOND: EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION = EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION(3i32); pub const EAP_METHOD_AUTHENTICATOR_RESPONSE_AUTHENTICATE: EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION = EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION(4i32); pub const EAP_METHOD_AUTHENTICATOR_RESPONSE_HANDLE_IDENTITY: EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION = EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION(5i32); impl ::core::convert::From<i32> for EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EAP_METHOD_AUTHENTICATOR_RESPONSE_ACTION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_METHOD_AUTHENTICATOR_RESULT { pub fIsSuccess: super::super::Foundation::BOOL, pub dwFailureReason: u32, pub pAuthAttribs: *mut EAP_ATTRIBUTES, } #[cfg(feature = "Win32_Foundation")] impl EAP_METHOD_AUTHENTICATOR_RESULT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_METHOD_AUTHENTICATOR_RESULT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAP_METHOD_AUTHENTICATOR_RESULT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_METHOD_AUTHENTICATOR_RESULT").field("fIsSuccess", &self.fIsSuccess).field("dwFailureReason", &self.dwFailureReason).field("pAuthAttribs", &self.pAuthAttribs).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_METHOD_AUTHENTICATOR_RESULT { fn eq(&self, other: &Self) -> bool { self.fIsSuccess == other.fIsSuccess && self.dwFailureReason == other.dwFailureReason && self.pAuthAttribs == other.pAuthAttribs } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_METHOD_AUTHENTICATOR_RESULT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_METHOD_AUTHENTICATOR_RESULT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_METHOD_INFO { pub eaptype: EAP_METHOD_TYPE, pub pwszAuthorName: super::super::Foundation::PWSTR, pub pwszFriendlyName: super::super::Foundation::PWSTR, pub eapProperties: u32, pub pInnerMethodInfo: *mut EAP_METHOD_INFO, } #[cfg(feature = "Win32_Foundation")] impl EAP_METHOD_INFO {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_METHOD_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAP_METHOD_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_METHOD_INFO").field("eaptype", &self.eaptype).field("pwszAuthorName", &self.pwszAuthorName).field("pwszFriendlyName", &self.pwszFriendlyName).field("eapProperties", &self.eapProperties).field("pInnerMethodInfo", &self.pInnerMethodInfo).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_METHOD_INFO { fn eq(&self, other: &Self) -> bool { self.eaptype == other.eaptype && self.pwszAuthorName == other.pwszAuthorName && self.pwszFriendlyName == other.pwszFriendlyName && self.eapProperties == other.eapProperties && self.pInnerMethodInfo == other.pInnerMethodInfo } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_METHOD_INFO {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_METHOD_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_METHOD_INFO_ARRAY { pub dwNumberOfMethods: u32, pub pEapMethods: *mut EAP_METHOD_INFO, } #[cfg(feature = "Win32_Foundation")] impl EAP_METHOD_INFO_ARRAY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_METHOD_INFO_ARRAY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAP_METHOD_INFO_ARRAY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_METHOD_INFO_ARRAY").field("dwNumberOfMethods", &self.dwNumberOfMethods).field("pEapMethods", &self.pEapMethods).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_METHOD_INFO_ARRAY { fn eq(&self, other: &Self) -> bool { self.dwNumberOfMethods == other.dwNumberOfMethods && self.pEapMethods == other.pEapMethods } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_METHOD_INFO_ARRAY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_METHOD_INFO_ARRAY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_METHOD_INFO_ARRAY_EX { pub dwNumberOfMethods: u32, pub pEapMethods: *mut EAP_METHOD_INFO_EX, } #[cfg(feature = "Win32_Foundation")] impl EAP_METHOD_INFO_ARRAY_EX {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_METHOD_INFO_ARRAY_EX { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAP_METHOD_INFO_ARRAY_EX { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_METHOD_INFO_ARRAY_EX").field("dwNumberOfMethods", &self.dwNumberOfMethods).field("pEapMethods", &self.pEapMethods).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_METHOD_INFO_ARRAY_EX { fn eq(&self, other: &Self) -> bool { self.dwNumberOfMethods == other.dwNumberOfMethods && self.pEapMethods == other.pEapMethods } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_METHOD_INFO_ARRAY_EX {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_METHOD_INFO_ARRAY_EX { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_METHOD_INFO_EX { pub eaptype: EAP_METHOD_TYPE, pub pwszAuthorName: super::super::Foundation::PWSTR, pub pwszFriendlyName: super::super::Foundation::PWSTR, pub eapProperties: u32, pub pInnerMethodInfoArray: *mut EAP_METHOD_INFO_ARRAY_EX, } #[cfg(feature = "Win32_Foundation")] impl EAP_METHOD_INFO_EX {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_METHOD_INFO_EX { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAP_METHOD_INFO_EX { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_METHOD_INFO_EX").field("eaptype", &self.eaptype).field("pwszAuthorName", &self.pwszAuthorName).field("pwszFriendlyName", &self.pwszFriendlyName).field("eapProperties", &self.eapProperties).field("pInnerMethodInfoArray", &self.pInnerMethodInfoArray).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_METHOD_INFO_EX { fn eq(&self, other: &Self) -> bool { self.eaptype == other.eaptype && self.pwszAuthorName == other.pwszAuthorName && self.pwszFriendlyName == other.pwszFriendlyName && self.eapProperties == other.eapProperties && self.pInnerMethodInfoArray == other.pInnerMethodInfoArray } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_METHOD_INFO_EX {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_METHOD_INFO_EX { type Abi = Self; } pub const EAP_METHOD_INVALID_PACKET: u32 = 2151809047u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_METHOD_PROPERTY { pub eapMethodPropertyType: EAP_METHOD_PROPERTY_TYPE, pub eapMethodPropertyValueType: EAP_METHOD_PROPERTY_VALUE_TYPE, pub eapMethodPropertyValue: EAP_METHOD_PROPERTY_VALUE, } #[cfg(feature = "Win32_Foundation")] impl EAP_METHOD_PROPERTY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_METHOD_PROPERTY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_METHOD_PROPERTY { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_METHOD_PROPERTY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_METHOD_PROPERTY { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_METHOD_PROPERTY_ARRAY { pub dwNumberOfProperties: u32, pub pMethodProperty: *mut EAP_METHOD_PROPERTY, } #[cfg(feature = "Win32_Foundation")] impl EAP_METHOD_PROPERTY_ARRAY {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_METHOD_PROPERTY_ARRAY { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAP_METHOD_PROPERTY_ARRAY { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_METHOD_PROPERTY_ARRAY").field("dwNumberOfProperties", &self.dwNumberOfProperties).field("pMethodProperty", &self.pMethodProperty).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_METHOD_PROPERTY_ARRAY { fn eq(&self, other: &Self) -> bool { self.dwNumberOfProperties == other.dwNumberOfProperties && self.pMethodProperty == other.pMethodProperty } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_METHOD_PROPERTY_ARRAY {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_METHOD_PROPERTY_ARRAY { 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 EAP_METHOD_PROPERTY_TYPE(pub i32); pub const emptPropCipherSuiteNegotiation: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(0i32); pub const emptPropMutualAuth: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(1i32); pub const emptPropIntegrity: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(2i32); pub const emptPropReplayProtection: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(3i32); pub const emptPropConfidentiality: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(4i32); pub const emptPropKeyDerivation: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(5i32); pub const emptPropKeyStrength64: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(6i32); pub const emptPropKeyStrength128: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(7i32); pub const emptPropKeyStrength256: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(8i32); pub const emptPropKeyStrength512: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(9i32); pub const emptPropKeyStrength1024: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(10i32); pub const emptPropDictionaryAttackResistance: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(11i32); pub const emptPropFastReconnect: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(12i32); pub const emptPropCryptoBinding: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(13i32); pub const emptPropSessionIndependence: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(14i32); pub const emptPropFragmentation: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(15i32); pub const emptPropChannelBinding: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(16i32); pub const emptPropNap: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(17i32); pub const emptPropStandalone: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(18i32); pub const emptPropMppeEncryption: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(19i32); pub const emptPropTunnelMethod: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(20i32); pub const emptPropSupportsConfig: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(21i32); pub const emptPropCertifiedMethod: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(22i32); pub const emptPropHiddenMethod: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(23i32); pub const emptPropMachineAuth: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(24i32); pub const emptPropUserAuth: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(25i32); pub const emptPropIdentityPrivacy: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(26i32); pub const emptPropMethodChaining: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(27i32); pub const emptPropSharedStateEquivalence: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(28i32); pub const emptLegacyMethodPropertyFlag: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(31i32); pub const emptPropVendorSpecific: EAP_METHOD_PROPERTY_TYPE = EAP_METHOD_PROPERTY_TYPE(255i32); impl ::core::convert::From<i32> for EAP_METHOD_PROPERTY_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EAP_METHOD_PROPERTY_TYPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union EAP_METHOD_PROPERTY_VALUE { pub empvBool: EAP_METHOD_PROPERTY_VALUE_BOOL, pub empvDword: EAP_METHOD_PROPERTY_VALUE_DWORD, pub empvString: EAP_METHOD_PROPERTY_VALUE_STRING, } #[cfg(feature = "Win32_Foundation")] impl EAP_METHOD_PROPERTY_VALUE {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_METHOD_PROPERTY_VALUE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_METHOD_PROPERTY_VALUE { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_METHOD_PROPERTY_VALUE {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_METHOD_PROPERTY_VALUE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EAP_METHOD_PROPERTY_VALUE_BOOL { pub length: u32, pub value: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl EAP_METHOD_PROPERTY_VALUE_BOOL {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_METHOD_PROPERTY_VALUE_BOOL { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EAP_METHOD_PROPERTY_VALUE_BOOL { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_METHOD_PROPERTY_VALUE_BOOL").field("length", &self.length).field("value", &self.value).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_METHOD_PROPERTY_VALUE_BOOL { fn eq(&self, other: &Self) -> bool { self.length == other.length && self.value == other.value } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_METHOD_PROPERTY_VALUE_BOOL {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_METHOD_PROPERTY_VALUE_BOOL { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EAP_METHOD_PROPERTY_VALUE_DWORD { pub length: u32, pub value: u32, } impl EAP_METHOD_PROPERTY_VALUE_DWORD {} impl ::core::default::Default for EAP_METHOD_PROPERTY_VALUE_DWORD { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EAP_METHOD_PROPERTY_VALUE_DWORD { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_METHOD_PROPERTY_VALUE_DWORD").field("length", &self.length).field("value", &self.value).finish() } } impl ::core::cmp::PartialEq for EAP_METHOD_PROPERTY_VALUE_DWORD { fn eq(&self, other: &Self) -> bool { self.length == other.length && self.value == other.value } } impl ::core::cmp::Eq for EAP_METHOD_PROPERTY_VALUE_DWORD {} unsafe impl ::windows::core::Abi for EAP_METHOD_PROPERTY_VALUE_DWORD { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EAP_METHOD_PROPERTY_VALUE_STRING { pub length: u32, pub value: *mut u8, } impl EAP_METHOD_PROPERTY_VALUE_STRING {} impl ::core::default::Default for EAP_METHOD_PROPERTY_VALUE_STRING { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EAP_METHOD_PROPERTY_VALUE_STRING { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_METHOD_PROPERTY_VALUE_STRING").field("length", &self.length).field("value", &self.value).finish() } } impl ::core::cmp::PartialEq for EAP_METHOD_PROPERTY_VALUE_STRING { fn eq(&self, other: &Self) -> bool { self.length == other.length && self.value == other.value } } impl ::core::cmp::Eq for EAP_METHOD_PROPERTY_VALUE_STRING {} unsafe impl ::windows::core::Abi for EAP_METHOD_PROPERTY_VALUE_STRING { 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 EAP_METHOD_PROPERTY_VALUE_TYPE(pub i32); pub const empvtBool: EAP_METHOD_PROPERTY_VALUE_TYPE = EAP_METHOD_PROPERTY_VALUE_TYPE(0i32); pub const empvtDword: EAP_METHOD_PROPERTY_VALUE_TYPE = EAP_METHOD_PROPERTY_VALUE_TYPE(1i32); pub const empvtString: EAP_METHOD_PROPERTY_VALUE_TYPE = EAP_METHOD_PROPERTY_VALUE_TYPE(2i32); impl ::core::convert::From<i32> for EAP_METHOD_PROPERTY_VALUE_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EAP_METHOD_PROPERTY_VALUE_TYPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EAP_METHOD_TYPE { pub eapType: EAP_TYPE, pub dwAuthorId: u32, } impl EAP_METHOD_TYPE {} impl ::core::default::Default for EAP_METHOD_TYPE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EAP_METHOD_TYPE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_METHOD_TYPE").field("eapType", &self.eapType).field("dwAuthorId", &self.dwAuthorId).finish() } } impl ::core::cmp::PartialEq for EAP_METHOD_TYPE { fn eq(&self, other: &Self) -> bool { self.eapType == other.eapType && self.dwAuthorId == other.dwAuthorId } } impl ::core::cmp::Eq for EAP_METHOD_TYPE {} unsafe impl ::windows::core::Abi for EAP_METHOD_TYPE { type Abi = Self; } pub const EAP_PEER_FLAG_GUEST_ACCESS: u32 = 64u32; pub const EAP_PEER_FLAG_HEALTH_STATE_CHANGE: u32 = 32768u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EAP_PEER_METHOD_ROUTINES { pub dwVersion: u32, pub pEapType: *mut EAP_TYPE, pub EapPeerInitialize: isize, pub EapPeerGetIdentity: isize, pub EapPeerBeginSession: isize, pub EapPeerSetCredentials: isize, pub EapPeerProcessRequestPacket: isize, pub EapPeerGetResponsePacket: isize, pub EapPeerGetResult: isize, pub EapPeerGetUIContext: isize, pub EapPeerSetUIContext: isize, pub EapPeerGetResponseAttributes: isize, pub EapPeerSetResponseAttributes: isize, pub EapPeerEndSession: isize, pub EapPeerShutdown: isize, } impl EAP_PEER_METHOD_ROUTINES {} impl ::core::default::Default for EAP_PEER_METHOD_ROUTINES { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EAP_PEER_METHOD_ROUTINES { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_PEER_METHOD_ROUTINES") .field("dwVersion", &self.dwVersion) .field("pEapType", &self.pEapType) .field("EapPeerInitialize", &self.EapPeerInitialize) .field("EapPeerGetIdentity", &self.EapPeerGetIdentity) .field("EapPeerBeginSession", &self.EapPeerBeginSession) .field("EapPeerSetCredentials", &self.EapPeerSetCredentials) .field("EapPeerProcessRequestPacket", &self.EapPeerProcessRequestPacket) .field("EapPeerGetResponsePacket", &self.EapPeerGetResponsePacket) .field("EapPeerGetResult", &self.EapPeerGetResult) .field("EapPeerGetUIContext", &self.EapPeerGetUIContext) .field("EapPeerSetUIContext", &self.EapPeerSetUIContext) .field("EapPeerGetResponseAttributes", &self.EapPeerGetResponseAttributes) .field("EapPeerSetResponseAttributes", &self.EapPeerSetResponseAttributes) .field("EapPeerEndSession", &self.EapPeerEndSession) .field("EapPeerShutdown", &self.EapPeerShutdown) .finish() } } impl ::core::cmp::PartialEq for EAP_PEER_METHOD_ROUTINES { fn eq(&self, other: &Self) -> bool { self.dwVersion == other.dwVersion && self.pEapType == other.pEapType && self.EapPeerInitialize == other.EapPeerInitialize && self.EapPeerGetIdentity == other.EapPeerGetIdentity && self.EapPeerBeginSession == other.EapPeerBeginSession && self.EapPeerSetCredentials == other.EapPeerSetCredentials && self.EapPeerProcessRequestPacket == other.EapPeerProcessRequestPacket && self.EapPeerGetResponsePacket == other.EapPeerGetResponsePacket && self.EapPeerGetResult == other.EapPeerGetResult && self.EapPeerGetUIContext == other.EapPeerGetUIContext && self.EapPeerSetUIContext == other.EapPeerSetUIContext && self.EapPeerGetResponseAttributes == other.EapPeerGetResponseAttributes && self.EapPeerSetResponseAttributes == other.EapPeerSetResponseAttributes && self.EapPeerEndSession == other.EapPeerEndSession && self.EapPeerShutdown == other.EapPeerShutdown } } impl ::core::cmp::Eq for EAP_PEER_METHOD_ROUTINES {} unsafe impl ::windows::core::Abi for EAP_PEER_METHOD_ROUTINES { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EAP_TYPE { pub r#type: u8, pub dwVendorId: u32, pub dwVendorType: u32, } impl EAP_TYPE {} impl ::core::default::Default for EAP_TYPE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EAP_TYPE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EAP_TYPE").field("r#type", &self.r#type).field("dwVendorId", &self.dwVendorId).field("dwVendorType", &self.dwVendorType).finish() } } impl ::core::cmp::PartialEq for EAP_TYPE { fn eq(&self, other: &Self) -> bool { self.r#type == other.r#type && self.dwVendorId == other.dwVendorId && self.dwVendorType == other.dwVendorType } } impl ::core::cmp::Eq for EAP_TYPE {} unsafe impl ::windows::core::Abi for EAP_TYPE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union EAP_UI_DATA_FORMAT { pub credData: *mut EAP_CONFIG_INPUT_FIELD_ARRAY, pub credExpiryData: *mut EAP_CRED_EXPIRY_REQ, pub credLogonData: *mut EAP_CONFIG_INPUT_FIELD_ARRAY, } #[cfg(feature = "Win32_Foundation")] impl EAP_UI_DATA_FORMAT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EAP_UI_DATA_FORMAT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EAP_UI_DATA_FORMAT { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EAP_UI_DATA_FORMAT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EAP_UI_DATA_FORMAT { type Abi = Self; } pub const EAP_UI_INPUT_FIELD_PROPS_DEFAULT: u32 = 0u32; pub const EAP_UI_INPUT_FIELD_PROPS_NON_DISPLAYABLE: u32 = 1u32; pub const EAP_UI_INPUT_FIELD_PROPS_NON_PERSIST: u32 = 2u32; pub const EAP_UI_INPUT_FIELD_PROPS_READ_ONLY: u32 = 4u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EapCertificateCredential { pub certHash: [u8; 20], pub password: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl EapCertificateCredential {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EapCertificateCredential { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EapCertificateCredential { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EapCertificateCredential").field("certHash", &self.certHash).field("password", &self.password).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EapCertificateCredential { fn eq(&self, other: &Self) -> bool { self.certHash == other.certHash && self.password == other.password } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EapCertificateCredential {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EapCertificateCredential { 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 EapCode(pub i32); pub const EapCodeMinimum: EapCode = EapCode(1i32); pub const EapCodeRequest: EapCode = EapCode(1i32); pub const EapCodeResponse: EapCode = EapCode(2i32); pub const EapCodeSuccess: EapCode = EapCode(3i32); pub const EapCodeFailure: EapCode = EapCode(4i32); pub const EapCodeMaximum: EapCode = EapCode(4i32); impl ::core::convert::From<i32> for EapCode { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EapCode { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EapCredential { pub credType: EapCredentialType, pub credData: EapCredentialTypeData, } #[cfg(feature = "Win32_Foundation")] impl EapCredential {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EapCredential { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EapCredential { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EapCredential {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EapCredential { 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 EapCredentialType(pub i32); pub const EAP_EMPTY_CREDENTIAL: EapCredentialType = EapCredentialType(0i32); pub const EAP_USERNAME_PASSWORD_CREDENTIAL: EapCredentialType = EapCredentialType(1i32); pub const EAP_WINLOGON_CREDENTIAL: EapCredentialType = EapCredentialType(2i32); pub const EAP_CERTIFICATE_CREDENTIAL: EapCredentialType = EapCredentialType(3i32); pub const EAP_SIM_CREDENTIAL: EapCredentialType = EapCredentialType(4i32); impl ::core::convert::From<i32> for EapCredentialType { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EapCredentialType { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub union EapCredentialTypeData { pub username_password: EapUsernamePasswordCredential, pub certificate: EapCertificateCredential, pub sim: EapSimCredential, } #[cfg(feature = "Win32_Foundation")] impl EapCredentialTypeData {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EapCredentialTypeData { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EapCredentialTypeData { fn eq(&self, _other: &Self) -> bool { unimplemented!() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EapCredentialTypeData {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EapCredentialTypeData { 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 EapHostPeerAuthParams(pub i32); pub const EapHostPeerAuthStatus: EapHostPeerAuthParams = EapHostPeerAuthParams(1i32); pub const EapHostPeerIdentity: EapHostPeerAuthParams = EapHostPeerAuthParams(2i32); pub const EapHostPeerIdentityExtendedInfo: EapHostPeerAuthParams = EapHostPeerAuthParams(3i32); pub const EapHostNapInfo: EapHostPeerAuthParams = EapHostPeerAuthParams(4i32); impl ::core::convert::From<i32> for EapHostPeerAuthParams { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EapHostPeerAuthParams { type Abi = Self; } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerBeginSession<'a, Param1: ::windows::core::IntoParam<'a, EAP_METHOD_TYPE>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>( dwflags: u32, eaptype: Param1, pattributearray: *const EAP_ATTRIBUTES, htokenimpersonateuser: Param3, dwsizeofconnectiondata: u32, pconnectiondata: *const u8, dwsizeofuserdata: u32, puserdata: *const u8, dwmaxsendpacketsize: u32, pconnectionid: *const ::windows::core::GUID, func: ::core::option::Option<NotificationHandler>, pcontextdata: *mut ::core::ffi::c_void, psessionid: *mut u32, ppeaperror: *mut *mut EAP_ERROR, ) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerBeginSession(dwflags: u32, eaptype: EAP_METHOD_TYPE, pattributearray: *const EAP_ATTRIBUTES, htokenimpersonateuser: super::super::Foundation::HANDLE, dwsizeofconnectiondata: u32, pconnectiondata: *const u8, dwsizeofuserdata: u32, puserdata: *const u8, dwmaxsendpacketsize: u32, pconnectionid: *const ::windows::core::GUID, func: ::windows::core::RawPtr, pcontextdata: *mut ::core::ffi::c_void, psessionid: *mut u32, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerBeginSession( ::core::mem::transmute(dwflags), eaptype.into_param().abi(), ::core::mem::transmute(pattributearray), htokenimpersonateuser.into_param().abi(), ::core::mem::transmute(dwsizeofconnectiondata), ::core::mem::transmute(pconnectiondata), ::core::mem::transmute(dwsizeofuserdata), ::core::mem::transmute(puserdata), ::core::mem::transmute(dwmaxsendpacketsize), ::core::mem::transmute(pconnectionid), ::core::mem::transmute(func), ::core::mem::transmute(pcontextdata), ::core::mem::transmute(psessionid), ::core::mem::transmute(ppeaperror), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerClearConnection(pconnectionid: *mut ::windows::core::GUID, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerClearConnection(pconnectionid: *mut ::windows::core::GUID, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerClearConnection(::core::mem::transmute(pconnectionid), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_Foundation"))] #[inline] pub unsafe fn EapHostPeerConfigBlob2Xml<'a, Param1: ::windows::core::IntoParam<'a, EAP_METHOD_TYPE>>(dwflags: u32, eapmethodtype: Param1, dwsizeofconfigin: u32, pconfigin: *const u8, ppconfigdoc: *mut ::core::option::Option<super::super::Data::Xml::MsXml::IXMLDOMDocument2>, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerConfigBlob2Xml(dwflags: u32, eapmethodtype: EAP_METHOD_TYPE, dwsizeofconfigin: u32, pconfigin: *const u8, ppconfigdoc: *mut ::windows::core::RawPtr, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerConfigBlob2Xml(::core::mem::transmute(dwflags), eapmethodtype.into_param().abi(), ::core::mem::transmute(dwsizeofconfigin), ::core::mem::transmute(pconfigin), ::core::mem::transmute(ppconfigdoc), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_Foundation"))] #[inline] pub unsafe fn EapHostPeerConfigXml2Blob<'a, Param1: ::windows::core::IntoParam<'a, super::super::Data::Xml::MsXml::IXMLDOMNode>>(dwflags: u32, pconfigdoc: Param1, pdwsizeofconfigout: *mut u32, ppconfigout: *mut *mut u8, peapmethodtype: *mut EAP_METHOD_TYPE, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerConfigXml2Blob(dwflags: u32, pconfigdoc: ::windows::core::RawPtr, pdwsizeofconfigout: *mut u32, ppconfigout: *mut *mut u8, peapmethodtype: *mut EAP_METHOD_TYPE, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerConfigXml2Blob(::core::mem::transmute(dwflags), pconfigdoc.into_param().abi(), ::core::mem::transmute(pdwsizeofconfigout), ::core::mem::transmute(ppconfigout), ::core::mem::transmute(peapmethodtype), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_Foundation"))] #[inline] pub unsafe fn EapHostPeerCredentialsXml2Blob<'a, Param1: ::windows::core::IntoParam<'a, super::super::Data::Xml::MsXml::IXMLDOMNode>>(dwflags: u32, pcredentialsdoc: Param1, dwsizeofconfigin: u32, pconfigin: *const u8, pdwsizeofcredentialsout: *mut u32, ppcredentialsout: *mut *mut u8, peapmethodtype: *mut EAP_METHOD_TYPE, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerCredentialsXml2Blob(dwflags: u32, pcredentialsdoc: ::windows::core::RawPtr, dwsizeofconfigin: u32, pconfigin: *const u8, pdwsizeofcredentialsout: *mut u32, ppcredentialsout: *mut *mut u8, peapmethodtype: *mut EAP_METHOD_TYPE, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerCredentialsXml2Blob( ::core::mem::transmute(dwflags), pcredentialsdoc.into_param().abi(), ::core::mem::transmute(dwsizeofconfigin), ::core::mem::transmute(pconfigin), ::core::mem::transmute(pdwsizeofcredentialsout), ::core::mem::transmute(ppcredentialsout), ::core::mem::transmute(peapmethodtype), ::core::mem::transmute(ppeaperror), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerEndSession(sessionhandle: u32, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerEndSession(sessionhandle: u32, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerEndSession(::core::mem::transmute(sessionhandle), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerFreeEapError(peaperror: *mut EAP_ERROR) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerFreeEapError(peaperror: *mut EAP_ERROR); } ::core::mem::transmute(EapHostPeerFreeEapError(::core::mem::transmute(peaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerFreeErrorMemory(peaperror: *mut EAP_ERROR) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerFreeErrorMemory(peaperror: *mut EAP_ERROR); } ::core::mem::transmute(EapHostPeerFreeErrorMemory(::core::mem::transmute(peaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EapHostPeerFreeMemory(pdata: *mut u8) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerFreeMemory(pdata: *mut u8); } ::core::mem::transmute(EapHostPeerFreeMemory(::core::mem::transmute(pdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EapHostPeerFreeRuntimeMemory(pdata: *mut u8) { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerFreeRuntimeMemory(pdata: *mut u8); } ::core::mem::transmute(EapHostPeerFreeRuntimeMemory(::core::mem::transmute(pdata))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerGetAuthStatus(sessionhandle: u32, authparam: EapHostPeerAuthParams, pcbauthdata: *mut u32, ppauthdata: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerGetAuthStatus(sessionhandle: u32, authparam: EapHostPeerAuthParams, pcbauthdata: *mut u32, ppauthdata: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerGetAuthStatus(::core::mem::transmute(sessionhandle), ::core::mem::transmute(authparam), ::core::mem::transmute(pcbauthdata), ::core::mem::transmute(ppauthdata), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerGetDataToUnplumbCredentials(pconnectionidthatlastsavedcreds: *mut ::windows::core::GUID, phcredentialimpersonationtoken: *mut isize, sessionhandle: u32, ppeaperror: *mut *mut EAP_ERROR, fsavetocredman: *mut super::super::Foundation::BOOL) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerGetDataToUnplumbCredentials(pconnectionidthatlastsavedcreds: *mut ::windows::core::GUID, phcredentialimpersonationtoken: *mut isize, sessionhandle: u32, ppeaperror: *mut *mut EAP_ERROR, fsavetocredman: *mut super::super::Foundation::BOOL) -> u32; } ::core::mem::transmute(EapHostPeerGetDataToUnplumbCredentials(::core::mem::transmute(pconnectionidthatlastsavedcreds), ::core::mem::transmute(phcredentialimpersonationtoken), ::core::mem::transmute(sessionhandle), ::core::mem::transmute(ppeaperror), ::core::mem::transmute(fsavetocredman))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerGetEncryptedPassword<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(dwsizeofpassword: u32, szpassword: Param1, ppszencpassword: *mut super::super::Foundation::PWSTR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerGetEncryptedPassword(dwsizeofpassword: u32, szpassword: super::super::Foundation::PWSTR, ppszencpassword: *mut super::super::Foundation::PWSTR) -> u32; } ::core::mem::transmute(EapHostPeerGetEncryptedPassword(::core::mem::transmute(dwsizeofpassword), szpassword.into_param().abi(), ::core::mem::transmute(ppszencpassword))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerGetIdentity<'a, Param2: ::windows::core::IntoParam<'a, EAP_METHOD_TYPE>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>( dwversion: u32, dwflags: u32, eapmethodtype: Param2, dwsizeofconnectiondata: u32, pconnectiondata: *const u8, dwsizeofuserdata: u32, puserdata: *const u8, htokenimpersonateuser: Param7, pfinvokeui: *mut super::super::Foundation::BOOL, pdwsizeofuserdataout: *mut u32, ppuserdataout: *mut *mut u8, ppwszidentity: *mut super::super::Foundation::PWSTR, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut u8, ) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerGetIdentity(dwversion: u32, dwflags: u32, eapmethodtype: EAP_METHOD_TYPE, dwsizeofconnectiondata: u32, pconnectiondata: *const u8, dwsizeofuserdata: u32, puserdata: *const u8, htokenimpersonateuser: super::super::Foundation::HANDLE, pfinvokeui: *mut super::super::Foundation::BOOL, pdwsizeofuserdataout: *mut u32, ppuserdataout: *mut *mut u8, ppwszidentity: *mut super::super::Foundation::PWSTR, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut u8) -> u32; } ::core::mem::transmute(EapHostPeerGetIdentity( ::core::mem::transmute(dwversion), ::core::mem::transmute(dwflags), eapmethodtype.into_param().abi(), ::core::mem::transmute(dwsizeofconnectiondata), ::core::mem::transmute(pconnectiondata), ::core::mem::transmute(dwsizeofuserdata), ::core::mem::transmute(puserdata), htokenimpersonateuser.into_param().abi(), ::core::mem::transmute(pfinvokeui), ::core::mem::transmute(pdwsizeofuserdataout), ::core::mem::transmute(ppuserdataout), ::core::mem::transmute(ppwszidentity), ::core::mem::transmute(ppeaperror), ::core::mem::transmute(ppvreserved), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerGetMethodProperties<'a, Param2: ::windows::core::IntoParam<'a, EAP_METHOD_TYPE>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>>(dwversion: u32, dwflags: u32, eapmethodtype: Param2, huserimpersonationtoken: Param3, dweapconndatasize: u32, pbeapconndata: *const u8, dwuserdatasize: u32, pbuserdata: *const u8, pmethodpropertyarray: *mut EAP_METHOD_PROPERTY_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerGetMethodProperties(dwversion: u32, dwflags: u32, eapmethodtype: EAP_METHOD_TYPE, huserimpersonationtoken: super::super::Foundation::HANDLE, dweapconndatasize: u32, pbeapconndata: *const u8, dwuserdatasize: u32, pbuserdata: *const u8, pmethodpropertyarray: *mut EAP_METHOD_PROPERTY_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerGetMethodProperties( ::core::mem::transmute(dwversion), ::core::mem::transmute(dwflags), eapmethodtype.into_param().abi(), huserimpersonationtoken.into_param().abi(), ::core::mem::transmute(dweapconndatasize), ::core::mem::transmute(pbeapconndata), ::core::mem::transmute(dwuserdatasize), ::core::mem::transmute(pbuserdata), ::core::mem::transmute(pmethodpropertyarray), ::core::mem::transmute(ppeaperror), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerGetMethods(peapmethodinfoarray: *mut EAP_METHOD_INFO_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerGetMethods(peapmethodinfoarray: *mut EAP_METHOD_INFO_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerGetMethods(::core::mem::transmute(peapmethodinfoarray), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerGetResponseAttributes(sessionhandle: u32, pattribs: *mut EAP_ATTRIBUTES, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerGetResponseAttributes(sessionhandle: u32, pattribs: *mut EAP_ATTRIBUTES, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerGetResponseAttributes(::core::mem::transmute(sessionhandle), ::core::mem::transmute(pattribs), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerGetResult(sessionhandle: u32, reason: EapHostPeerMethodResultReason, ppresult: *mut EapHostPeerMethodResult, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerGetResult(sessionhandle: u32, reason: EapHostPeerMethodResultReason, ppresult: *mut EapHostPeerMethodResult, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerGetResult(::core::mem::transmute(sessionhandle), ::core::mem::transmute(reason), ::core::mem::transmute(ppresult), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerGetSendPacket(sessionhandle: u32, pcbsendpacket: *mut u32, ppsendpacket: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerGetSendPacket(sessionhandle: u32, pcbsendpacket: *mut u32, ppsendpacket: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerGetSendPacket(::core::mem::transmute(sessionhandle), ::core::mem::transmute(pcbsendpacket), ::core::mem::transmute(ppsendpacket), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerGetUIContext(sessionhandle: u32, pdwsizeofuicontextdata: *mut u32, ppuicontextdata: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerGetUIContext(sessionhandle: u32, pdwsizeofuicontextdata: *mut u32, ppuicontextdata: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerGetUIContext(::core::mem::transmute(sessionhandle), ::core::mem::transmute(pdwsizeofuicontextdata), ::core::mem::transmute(ppuicontextdata), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EapHostPeerInitialize() -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerInitialize() -> u32; } ::core::mem::transmute(EapHostPeerInitialize()) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerInvokeConfigUI<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>, Param2: ::windows::core::IntoParam<'a, EAP_METHOD_TYPE>>(hwndparent: Param0, dwflags: u32, eapmethodtype: Param2, dwsizeofconfigin: u32, pconfigin: *const u8, pdwsizeofconfigout: *mut u32, ppconfigout: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerInvokeConfigUI(hwndparent: super::super::Foundation::HWND, dwflags: u32, eapmethodtype: EAP_METHOD_TYPE, dwsizeofconfigin: u32, pconfigin: *const u8, pdwsizeofconfigout: *mut u32, ppconfigout: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerInvokeConfigUI( hwndparent.into_param().abi(), ::core::mem::transmute(dwflags), eapmethodtype.into_param().abi(), ::core::mem::transmute(dwsizeofconfigin), ::core::mem::transmute(pconfigin), ::core::mem::transmute(pdwsizeofconfigout), ::core::mem::transmute(ppconfigout), ::core::mem::transmute(ppeaperror), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerInvokeIdentityUI<'a, Param1: ::windows::core::IntoParam<'a, EAP_METHOD_TYPE>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>( dwversion: u32, eapmethodtype: Param1, dwflags: u32, hwndparent: Param3, dwsizeofconnectiondata: u32, pconnectiondata: *const u8, dwsizeofuserdata: u32, puserdata: *const u8, pdwsizeofuserdataout: *mut u32, ppuserdataout: *mut *mut u8, ppwszidentity: *mut super::super::Foundation::PWSTR, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut ::core::ffi::c_void, ) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerInvokeIdentityUI(dwversion: u32, eapmethodtype: EAP_METHOD_TYPE, dwflags: u32, hwndparent: super::super::Foundation::HWND, dwsizeofconnectiondata: u32, pconnectiondata: *const u8, dwsizeofuserdata: u32, puserdata: *const u8, pdwsizeofuserdataout: *mut u32, ppuserdataout: *mut *mut u8, ppwszidentity: *mut super::super::Foundation::PWSTR, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut ::core::ffi::c_void) -> u32; } ::core::mem::transmute(EapHostPeerInvokeIdentityUI( ::core::mem::transmute(dwversion), eapmethodtype.into_param().abi(), ::core::mem::transmute(dwflags), hwndparent.into_param().abi(), ::core::mem::transmute(dwsizeofconnectiondata), ::core::mem::transmute(pconnectiondata), ::core::mem::transmute(dwsizeofuserdata), ::core::mem::transmute(puserdata), ::core::mem::transmute(pdwsizeofuserdataout), ::core::mem::transmute(ppuserdataout), ::core::mem::transmute(ppwszidentity), ::core::mem::transmute(ppeaperror), ::core::mem::transmute(ppvreserved), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerInvokeInteractiveUI<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwndparent: Param0, dwsizeofuicontextdata: u32, puicontextdata: *const u8, pdwsizeofdatafrominteractiveui: *mut u32, ppdatafrominteractiveui: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerInvokeInteractiveUI(hwndparent: super::super::Foundation::HWND, dwsizeofuicontextdata: u32, puicontextdata: *const u8, pdwsizeofdatafrominteractiveui: *mut u32, ppdatafrominteractiveui: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerInvokeInteractiveUI(hwndparent.into_param().abi(), ::core::mem::transmute(dwsizeofuicontextdata), ::core::mem::transmute(puicontextdata), ::core::mem::transmute(pdwsizeofdatafrominteractiveui), ::core::mem::transmute(ppdatafrominteractiveui), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EapHostPeerMethodResult { pub fIsSuccess: super::super::Foundation::BOOL, pub dwFailureReasonCode: u32, pub fSaveConnectionData: super::super::Foundation::BOOL, pub dwSizeofConnectionData: u32, pub pConnectionData: *mut u8, pub fSaveUserData: super::super::Foundation::BOOL, pub dwSizeofUserData: u32, pub pUserData: *mut u8, pub pAttribArray: *mut EAP_ATTRIBUTES, pub isolationState: ISOLATION_STATE, pub pEapMethodInfo: *mut EAP_METHOD_INFO, pub pEapError: *mut EAP_ERROR, } #[cfg(feature = "Win32_Foundation")] impl EapHostPeerMethodResult {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EapHostPeerMethodResult { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EapHostPeerMethodResult { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EapHostPeerMethodResult") .field("fIsSuccess", &self.fIsSuccess) .field("dwFailureReasonCode", &self.dwFailureReasonCode) .field("fSaveConnectionData", &self.fSaveConnectionData) .field("dwSizeofConnectionData", &self.dwSizeofConnectionData) .field("pConnectionData", &self.pConnectionData) .field("fSaveUserData", &self.fSaveUserData) .field("dwSizeofUserData", &self.dwSizeofUserData) .field("pUserData", &self.pUserData) .field("pAttribArray", &self.pAttribArray) .field("isolationState", &self.isolationState) .field("pEapMethodInfo", &self.pEapMethodInfo) .field("pEapError", &self.pEapError) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EapHostPeerMethodResult { fn eq(&self, other: &Self) -> bool { self.fIsSuccess == other.fIsSuccess && self.dwFailureReasonCode == other.dwFailureReasonCode && self.fSaveConnectionData == other.fSaveConnectionData && self.dwSizeofConnectionData == other.dwSizeofConnectionData && self.pConnectionData == other.pConnectionData && self.fSaveUserData == other.fSaveUserData && self.dwSizeofUserData == other.dwSizeofUserData && self.pUserData == other.pUserData && self.pAttribArray == other.pAttribArray && self.isolationState == other.isolationState && self.pEapMethodInfo == other.pEapMethodInfo && self.pEapError == other.pEapError } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EapHostPeerMethodResult {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EapHostPeerMethodResult { 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 EapHostPeerMethodResultReason(pub i32); pub const EapHostPeerMethodResultAltSuccessReceived: EapHostPeerMethodResultReason = EapHostPeerMethodResultReason(1i32); pub const EapHostPeerMethodResultTimeout: EapHostPeerMethodResultReason = EapHostPeerMethodResultReason(2i32); pub const EapHostPeerMethodResultFromMethod: EapHostPeerMethodResultReason = EapHostPeerMethodResultReason(3i32); impl ::core::convert::From<i32> for EapHostPeerMethodResultReason { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EapHostPeerMethodResultReason { type Abi = Self; } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerProcessReceivedPacket(sessionhandle: u32, cbreceivepacket: u32, preceivepacket: *const u8, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerProcessReceivedPacket(sessionhandle: u32, cbreceivepacket: u32, preceivepacket: *const u8, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerProcessReceivedPacket(::core::mem::transmute(sessionhandle), ::core::mem::transmute(cbreceivepacket), ::core::mem::transmute(preceivepacket), ::core::mem::transmute(peapoutput), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerQueryCredentialInputFields<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, EAP_METHOD_TYPE>>(huserimpersonationtoken: Param0, eapmethodtype: Param1, dwflags: u32, dweapconndatasize: u32, pbeapconndata: *const u8, peapconfiginputfieldarray: *mut EAP_CONFIG_INPUT_FIELD_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerQueryCredentialInputFields(huserimpersonationtoken: super::super::Foundation::HANDLE, eapmethodtype: EAP_METHOD_TYPE, dwflags: u32, dweapconndatasize: u32, pbeapconndata: *const u8, peapconfiginputfieldarray: *mut EAP_CONFIG_INPUT_FIELD_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerQueryCredentialInputFields( huserimpersonationtoken.into_param().abi(), eapmethodtype.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(dweapconndatasize), ::core::mem::transmute(pbeapconndata), ::core::mem::transmute(peapconfiginputfieldarray), ::core::mem::transmute(ppeaperror), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerQueryInteractiveUIInputFields(dwversion: u32, dwflags: u32, dwsizeofuicontextdata: u32, puicontextdata: *const u8, peapinteractiveuidata: *mut EAP_INTERACTIVE_UI_DATA, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut ::core::ffi::c_void) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerQueryInteractiveUIInputFields(dwversion: u32, dwflags: u32, dwsizeofuicontextdata: u32, puicontextdata: *const u8, peapinteractiveuidata: *mut EAP_INTERACTIVE_UI_DATA, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut ::core::ffi::c_void) -> u32; } ::core::mem::transmute(EapHostPeerQueryInteractiveUIInputFields( ::core::mem::transmute(dwversion), ::core::mem::transmute(dwflags), ::core::mem::transmute(dwsizeofuicontextdata), ::core::mem::transmute(puicontextdata), ::core::mem::transmute(peapinteractiveuidata), ::core::mem::transmute(ppeaperror), ::core::mem::transmute(ppvreserved), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerQueryUIBlobFromInteractiveUIInputFields(dwversion: u32, dwflags: u32, dwsizeofuicontextdata: u32, puicontextdata: *const u8, peapinteractiveuidata: *const EAP_INTERACTIVE_UI_DATA, pdwsizeofdatafrominteractiveui: *mut u32, ppdatafrominteractiveui: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut ::core::ffi::c_void) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerQueryUIBlobFromInteractiveUIInputFields(dwversion: u32, dwflags: u32, dwsizeofuicontextdata: u32, puicontextdata: *const u8, peapinteractiveuidata: *const EAP_INTERACTIVE_UI_DATA, pdwsizeofdatafrominteractiveui: *mut u32, ppdatafrominteractiveui: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut ::core::ffi::c_void) -> u32; } ::core::mem::transmute(EapHostPeerQueryUIBlobFromInteractiveUIInputFields( ::core::mem::transmute(dwversion), ::core::mem::transmute(dwflags), ::core::mem::transmute(dwsizeofuicontextdata), ::core::mem::transmute(puicontextdata), ::core::mem::transmute(peapinteractiveuidata), ::core::mem::transmute(pdwsizeofdatafrominteractiveui), ::core::mem::transmute(ppdatafrominteractiveui), ::core::mem::transmute(ppeaperror), ::core::mem::transmute(ppvreserved), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerQueryUserBlobFromCredentialInputFields<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HANDLE>, Param1: ::windows::core::IntoParam<'a, EAP_METHOD_TYPE>>(huserimpersonationtoken: Param0, eapmethodtype: Param1, dwflags: u32, dweapconndatasize: u32, pbeapconndata: *const u8, peapconfiginputfieldarray: *const EAP_CONFIG_INPUT_FIELD_ARRAY, pdwuserblobsize: *mut u32, ppbuserblob: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerQueryUserBlobFromCredentialInputFields(huserimpersonationtoken: super::super::Foundation::HANDLE, eapmethodtype: EAP_METHOD_TYPE, dwflags: u32, dweapconndatasize: u32, pbeapconndata: *const u8, peapconfiginputfieldarray: *const EAP_CONFIG_INPUT_FIELD_ARRAY, pdwuserblobsize: *mut u32, ppbuserblob: *mut *mut u8, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerQueryUserBlobFromCredentialInputFields( huserimpersonationtoken.into_param().abi(), eapmethodtype.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(dweapconndatasize), ::core::mem::transmute(pbeapconndata), ::core::mem::transmute(peapconfiginputfieldarray), ::core::mem::transmute(pdwuserblobsize), ::core::mem::transmute(ppbuserblob), ::core::mem::transmute(ppeaperror), )) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct EapHostPeerResponseAction(pub i32); pub const EapHostPeerResponseDiscard: EapHostPeerResponseAction = EapHostPeerResponseAction(0i32); pub const EapHostPeerResponseSend: EapHostPeerResponseAction = EapHostPeerResponseAction(1i32); pub const EapHostPeerResponseResult: EapHostPeerResponseAction = EapHostPeerResponseAction(2i32); pub const EapHostPeerResponseInvokeUi: EapHostPeerResponseAction = EapHostPeerResponseAction(3i32); pub const EapHostPeerResponseRespond: EapHostPeerResponseAction = EapHostPeerResponseAction(4i32); pub const EapHostPeerResponseStartAuthentication: EapHostPeerResponseAction = EapHostPeerResponseAction(5i32); pub const EapHostPeerResponseNone: EapHostPeerResponseAction = EapHostPeerResponseAction(6i32); impl ::core::convert::From<i32> for EapHostPeerResponseAction { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EapHostPeerResponseAction { type Abi = Self; } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerSetResponseAttributes(sessionhandle: u32, pattribs: *const EAP_ATTRIBUTES, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerSetResponseAttributes(sessionhandle: u32, pattribs: *const EAP_ATTRIBUTES, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerSetResponseAttributes(::core::mem::transmute(sessionhandle), ::core::mem::transmute(pattribs), ::core::mem::transmute(peapoutput), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn EapHostPeerSetUIContext(sessionhandle: u32, dwsizeofuicontextdata: u32, puicontextdata: *const u8, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32 { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerSetUIContext(sessionhandle: u32, dwsizeofuicontextdata: u32, puicontextdata: *const u8, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32; } ::core::mem::transmute(EapHostPeerSetUIContext(::core::mem::transmute(sessionhandle), ::core::mem::transmute(dwsizeofuicontextdata), ::core::mem::transmute(puicontextdata), ::core::mem::transmute(peapoutput), ::core::mem::transmute(ppeaperror))) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[inline] pub unsafe fn EapHostPeerUninitialize() { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn EapHostPeerUninitialize(); } ::core::mem::transmute(EapHostPeerUninitialize()) } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct EapPacket { pub Code: u8, pub Id: u8, pub Length: [u8; 2], pub Data: [u8; 1], } impl EapPacket {} impl ::core::default::Default for EapPacket { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for EapPacket { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EapPacket").field("Code", &self.Code).field("Id", &self.Id).field("Length", &self.Length).field("Data", &self.Data).finish() } } impl ::core::cmp::PartialEq for EapPacket { fn eq(&self, other: &Self) -> bool { self.Code == other.Code && self.Id == other.Id && self.Length == other.Length && self.Data == other.Data } } impl ::core::cmp::Eq for EapPacket {} unsafe impl ::windows::core::Abi for EapPacket { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EapPeerMethodOutput { pub action: EapPeerMethodResponseAction, pub fAllowNotifications: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl EapPeerMethodOutput {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EapPeerMethodOutput { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EapPeerMethodOutput { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EapPeerMethodOutput").field("action", &self.action).field("fAllowNotifications", &self.fAllowNotifications).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EapPeerMethodOutput { fn eq(&self, other: &Self) -> bool { self.action == other.action && self.fAllowNotifications == other.fAllowNotifications } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EapPeerMethodOutput {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EapPeerMethodOutput { 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 EapPeerMethodResponseAction(pub i32); pub const EapPeerMethodResponseActionDiscard: EapPeerMethodResponseAction = EapPeerMethodResponseAction(0i32); pub const EapPeerMethodResponseActionSend: EapPeerMethodResponseAction = EapPeerMethodResponseAction(1i32); pub const EapPeerMethodResponseActionResult: EapPeerMethodResponseAction = EapPeerMethodResponseAction(2i32); pub const EapPeerMethodResponseActionInvokeUI: EapPeerMethodResponseAction = EapPeerMethodResponseAction(3i32); pub const EapPeerMethodResponseActionRespond: EapPeerMethodResponseAction = EapPeerMethodResponseAction(4i32); pub const EapPeerMethodResponseActionNone: EapPeerMethodResponseAction = EapPeerMethodResponseAction(5i32); impl ::core::convert::From<i32> for EapPeerMethodResponseAction { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EapPeerMethodResponseAction { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EapPeerMethodResult { pub fIsSuccess: super::super::Foundation::BOOL, pub dwFailureReasonCode: u32, pub fSaveConnectionData: super::super::Foundation::BOOL, pub dwSizeofConnectionData: u32, pub pConnectionData: *mut u8, pub fSaveUserData: super::super::Foundation::BOOL, pub dwSizeofUserData: u32, pub pUserData: *mut u8, pub pAttribArray: *mut EAP_ATTRIBUTES, pub pEapError: *mut EAP_ERROR, pub pNgcKerbTicket: *mut NgcTicketContext, pub fSaveToCredMan: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl EapPeerMethodResult {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EapPeerMethodResult { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EapPeerMethodResult { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EapPeerMethodResult") .field("fIsSuccess", &self.fIsSuccess) .field("dwFailureReasonCode", &self.dwFailureReasonCode) .field("fSaveConnectionData", &self.fSaveConnectionData) .field("dwSizeofConnectionData", &self.dwSizeofConnectionData) .field("pConnectionData", &self.pConnectionData) .field("fSaveUserData", &self.fSaveUserData) .field("dwSizeofUserData", &self.dwSizeofUserData) .field("pUserData", &self.pUserData) .field("pAttribArray", &self.pAttribArray) .field("pEapError", &self.pEapError) .field("pNgcKerbTicket", &self.pNgcKerbTicket) .field("fSaveToCredMan", &self.fSaveToCredMan) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EapPeerMethodResult { fn eq(&self, other: &Self) -> bool { self.fIsSuccess == other.fIsSuccess && self.dwFailureReasonCode == other.dwFailureReasonCode && self.fSaveConnectionData == other.fSaveConnectionData && self.dwSizeofConnectionData == other.dwSizeofConnectionData && self.pConnectionData == other.pConnectionData && self.fSaveUserData == other.fSaveUserData && self.dwSizeofUserData == other.dwSizeofUserData && self.pUserData == other.pUserData && self.pAttribArray == other.pAttribArray && self.pEapError == other.pEapError && self.pNgcKerbTicket == other.pNgcKerbTicket && self.fSaveToCredMan == other.fSaveToCredMan } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EapPeerMethodResult {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EapPeerMethodResult { 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 EapPeerMethodResultReason(pub i32); pub const EapPeerMethodResultUnknown: EapPeerMethodResultReason = EapPeerMethodResultReason(1i32); pub const EapPeerMethodResultSuccess: EapPeerMethodResultReason = EapPeerMethodResultReason(2i32); pub const EapPeerMethodResultFailure: EapPeerMethodResultReason = EapPeerMethodResultReason(3i32); impl ::core::convert::From<i32> for EapPeerMethodResultReason { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for EapPeerMethodResultReason { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EapSimCredential { pub iccID: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl EapSimCredential {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EapSimCredential { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EapSimCredential { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EapSimCredential").field("iccID", &self.iccID).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EapSimCredential { fn eq(&self, other: &Self) -> bool { self.iccID == other.iccID } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EapSimCredential {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EapSimCredential { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct EapUsernamePasswordCredential { pub username: super::super::Foundation::PWSTR, pub password: super::super::Foundation::PWSTR, } #[cfg(feature = "Win32_Foundation")] impl EapUsernamePasswordCredential {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for EapUsernamePasswordCredential { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for EapUsernamePasswordCredential { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("EapUsernamePasswordCredential").field("username", &self.username).field("password", &self.password).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for EapUsernamePasswordCredential { fn eq(&self, other: &Self) -> bool { self.username == other.username && self.password == other.password } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for EapUsernamePasswordCredential {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for EapUsernamePasswordCredential { type Abi = Self; } pub const FACILITY_EAP_MESSAGE: u32 = 2114u32; pub const GUID_EapHost_Cause_CertStoreInaccessible: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000004); pub const GUID_EapHost_Cause_EapNegotiationFailed: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000001c); pub const GUID_EapHost_Cause_EapQecInaccessible: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000312); pub const GUID_EapHost_Cause_Generic_AuthFailure: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000104); pub const GUID_EapHost_Cause_IdentityUnknown: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000204); pub const GUID_EapHost_Cause_MethodDLLNotFound: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000001); pub const GUID_EapHost_Cause_MethodDoesNotSupportOperation: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000001e); pub const GUID_EapHost_Cause_Method_Config_Does_Not_Support_Sso: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xda18bd32_004f_41fa_ae08_0bc85e5845ac); pub const GUID_EapHost_Cause_No_SmartCardReader_Found: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000002b); pub const GUID_EapHost_Cause_Server_CertExpired: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000005); pub const GUID_EapHost_Cause_Server_CertInvalid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000006); pub const GUID_EapHost_Cause_Server_CertNotFound: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000007); pub const GUID_EapHost_Cause_Server_CertOtherError: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000108); pub const GUID_EapHost_Cause_Server_CertRevoked: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000008); pub const GUID_EapHost_Cause_Server_Root_CertNameRequired: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000012); pub const GUID_EapHost_Cause_Server_Root_CertNotFound: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000112); pub const GUID_EapHost_Cause_SimNotValid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000304); pub const GUID_EapHost_Cause_ThirdPartyMethod_Host_Reset: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000212); pub const GUID_EapHost_Cause_User_Account_OtherProblem: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000010e); pub const GUID_EapHost_Cause_User_CertExpired: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000009); pub const GUID_EapHost_Cause_User_CertInvalid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000000a); pub const GUID_EapHost_Cause_User_CertNotFound: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000000b); pub const GUID_EapHost_Cause_User_CertOtherError: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000000c); pub const GUID_EapHost_Cause_User_CertRejected: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000000d); pub const GUID_EapHost_Cause_User_CertRevoked: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000000e); pub const GUID_EapHost_Cause_User_CredsRejected: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000020e); pub const GUID_EapHost_Cause_User_Root_CertExpired: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000000f); pub const GUID_EapHost_Cause_User_Root_CertInvalid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000010); pub const GUID_EapHost_Cause_User_Root_CertNotFound: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000011); pub const GUID_EapHost_Cause_XmlMalformed: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000001d); pub const GUID_EapHost_Default: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x00000000_0000_0000_0000_000000000000); pub const GUID_EapHost_Help_ObtainingCerts: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf535eea3_1bdd_46ca_a2fc_a6655939b7e8); pub const GUID_EapHost_Help_Troubleshooting: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x33307acf_0698_41ba_b014_ea0a2eb8d0a8); pub const GUID_EapHost_Repair_ContactAdmin_AuthFailure: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000001f); pub const GUID_EapHost_Repair_ContactAdmin_CertNameAbsent: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000029); pub const GUID_EapHost_Repair_ContactAdmin_CertStoreInaccessible: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000024); pub const GUID_EapHost_Repair_ContactAdmin_IdentityUnknown: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000020); pub const GUID_EapHost_Repair_ContactAdmin_InvalidUserAccount: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000025); pub const GUID_EapHost_Repair_ContactAdmin_InvalidUserCert: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000002c); pub const GUID_EapHost_Repair_ContactAdmin_MethodNotFound: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000022); pub const GUID_EapHost_Repair_ContactAdmin_NegotiationFailed: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000021); pub const GUID_EapHost_Repair_ContactAdmin_NoSmartCardReader: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000002a); pub const GUID_EapHost_Repair_ContactAdmin_RootCertInvalid: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000026); pub const GUID_EapHost_Repair_ContactAdmin_RootCertNotFound: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000027); pub const GUID_EapHost_Repair_ContactAdmin_RootExpired: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000028); pub const GUID_EapHost_Repair_ContactSysadmin: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000002); pub const GUID_EapHost_Repair_Method_Not_Support_Sso: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000002d); pub const GUID_EapHost_Repair_No_ValidSim_Found: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000002e); pub const GUID_EapHost_Repair_RestartNap: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000023); pub const GUID_EapHost_Repair_Retry_Authentication: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000011b); pub const GUID_EapHost_Repair_Server_ClientSelectServerCert: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000018); pub const GUID_EapHost_Repair_User_AuthFailure: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d800000019); pub const GUID_EapHost_Repair_User_GetNewCert: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000001a); pub const GUID_EapHost_Repair_User_SelectValidCert: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9612fc67_6150_4209_a85e_a8d80000001b); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IAccountingProviderConfig(pub ::windows::core::IUnknown); impl IAccountingProviderConfig { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Initialize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszmachinename: Param0) -> ::windows::core::Result<usize> { let mut result__: <usize as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszmachinename.into_param().abi(), &mut result__).from_abi::<usize>(result__) } pub unsafe fn Uninitialize(&self, uconnectionparam: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(uconnectionparam)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Configure<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, uconnectionparam: usize, hwnd: Param1, dwflags: u32, ureserved1: usize, ureserved2: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(uconnectionparam), hwnd.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(ureserved1), ::core::mem::transmute(ureserved2)).ok() } pub unsafe fn Activate(&self, uconnectionparam: usize, ureserved1: usize, ureserved2: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(uconnectionparam), ::core::mem::transmute(ureserved1), ::core::mem::transmute(ureserved2)).ok() } pub unsafe fn Deactivate(&self, uconnectionparam: usize, ureserved1: usize, ureserved2: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(uconnectionparam), ::core::mem::transmute(ureserved1), ::core::mem::transmute(ureserved2)).ok() } } unsafe impl ::windows::core::Interface for IAccountingProviderConfig { type Vtable = IAccountingProviderConfig_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66a2db18_d706_11d0_a37b_00c04fc9da04); } impl ::core::convert::From<IAccountingProviderConfig> for ::windows::core::IUnknown { fn from(value: IAccountingProviderConfig) -> Self { value.0 } } impl ::core::convert::From<&IAccountingProviderConfig> for ::windows::core::IUnknown { fn from(value: &IAccountingProviderConfig) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IAccountingProviderConfig { 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 IAccountingProviderConfig { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IAccountingProviderConfig_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, pszmachinename: super::super::Foundation::PWSTR, puconnectionparam: *mut usize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uconnectionparam: usize) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, dwflags: u32, ureserved1: usize, ureserved2: usize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uconnectionparam: usize, ureserved1: usize, ureserved2: usize) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uconnectionparam: usize, ureserved1: usize, ureserved2: usize) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IAuthenticationProviderConfig(pub ::windows::core::IUnknown); impl IAuthenticationProviderConfig { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Initialize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszmachinename: Param0) -> ::windows::core::Result<usize> { let mut result__: <usize as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszmachinename.into_param().abi(), &mut result__).from_abi::<usize>(result__) } pub unsafe fn Uninitialize(&self, uconnectionparam: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(uconnectionparam)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Configure<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, uconnectionparam: usize, hwnd: Param1, dwflags: u32, ureserved1: usize, ureserved2: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(uconnectionparam), hwnd.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(ureserved1), ::core::mem::transmute(ureserved2)).ok() } pub unsafe fn Activate(&self, uconnectionparam: usize, ureserved1: usize, ureserved2: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)(::core::mem::transmute_copy(self), ::core::mem::transmute(uconnectionparam), ::core::mem::transmute(ureserved1), ::core::mem::transmute(ureserved2)).ok() } pub unsafe fn Deactivate(&self, uconnectionparam: usize, ureserved1: usize, ureserved2: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(uconnectionparam), ::core::mem::transmute(ureserved1), ::core::mem::transmute(ureserved2)).ok() } } unsafe impl ::windows::core::Interface for IAuthenticationProviderConfig { type Vtable = IAuthenticationProviderConfig_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66a2db17_d706_11d0_a37b_00c04fc9da04); } impl ::core::convert::From<IAuthenticationProviderConfig> for ::windows::core::IUnknown { fn from(value: IAuthenticationProviderConfig) -> Self { value.0 } } impl ::core::convert::From<&IAuthenticationProviderConfig> for ::windows::core::IUnknown { fn from(value: &IAuthenticationProviderConfig) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IAuthenticationProviderConfig { 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 IAuthenticationProviderConfig { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IAuthenticationProviderConfig_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, pszmachinename: super::super::Foundation::PWSTR, puconnectionparam: *mut usize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uconnectionparam: usize) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, dwflags: u32, ureserved1: usize, ureserved2: usize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uconnectionparam: usize, ureserved1: usize, ureserved2: usize) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, uconnectionparam: usize, ureserved1: usize, ureserved2: usize) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IEAPProviderConfig(pub ::windows::core::IUnknown); impl IEAPProviderConfig { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Initialize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszmachinename: Param0, dweaptypeid: u32) -> ::windows::core::Result<usize> { let mut result__: <usize as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszmachinename.into_param().abi(), ::core::mem::transmute(dweaptypeid), &mut result__).from_abi::<usize>(result__) } pub unsafe fn Uninitialize(&self, dweaptypeid: u32, uconnectionparam: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ServerInvokeConfigUI<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, dweaptypeid: u32, uconnectionparam: usize, hwnd: Param2, ureserved1: usize, ureserved2: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam), hwnd.into_param().abi(), ::core::mem::transmute(ureserved1), ::core::mem::transmute(ureserved2)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn RouterInvokeConfigUI<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, dweaptypeid: u32, uconnectionparam: usize, hwndparent: Param2, dwflags: u32, pconnectiondatain: *const u8, dwsizeofconnectiondatain: u32, ppconnectiondataout: *mut *mut u8, pdwsizeofconnectiondataout: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam), hwndparent.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pconnectiondatain), ::core::mem::transmute(dwsizeofconnectiondatain), ::core::mem::transmute(ppconnectiondataout), ::core::mem::transmute(pdwsizeofconnectiondataout), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn RouterInvokeCredentialsUI<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, dweaptypeid: u32, uconnectionparam: usize, hwndparent: Param2, dwflags: u32, pconnectiondatain: *const u8, dwsizeofconnectiondatain: u32, puserdatain: *const u8, dwsizeofuserdatain: u32, ppuserdataout: *mut *mut u8, pdwsizeofuserdataout: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam), hwndparent.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pconnectiondatain), ::core::mem::transmute(dwsizeofconnectiondatain), ::core::mem::transmute(puserdatain), ::core::mem::transmute(dwsizeofuserdatain), ::core::mem::transmute(ppuserdataout), ::core::mem::transmute(pdwsizeofuserdataout), ) .ok() } } unsafe impl ::windows::core::Interface for IEAPProviderConfig { type Vtable = IEAPProviderConfig_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66a2db19_d706_11d0_a37b_00c04fc9da04); } impl ::core::convert::From<IEAPProviderConfig> for ::windows::core::IUnknown { fn from(value: IEAPProviderConfig) -> Self { value.0 } } impl ::core::convert::From<&IEAPProviderConfig> for ::windows::core::IUnknown { fn from(value: &IEAPProviderConfig) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IEAPProviderConfig { 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 IEAPProviderConfig { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IEAPProviderConfig_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, pszmachinename: super::super::Foundation::PWSTR, dweaptypeid: u32, puconnectionparam: *mut usize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, ureserved1: usize, ureserved2: usize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize, hwndparent: super::super::Foundation::HWND, dwflags: u32, pconnectiondatain: *const u8, dwsizeofconnectiondatain: u32, ppconnectiondataout: *mut *mut u8, pdwsizeofconnectiondataout: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize, hwndparent: super::super::Foundation::HWND, dwflags: u32, pconnectiondatain: *const u8, dwsizeofconnectiondatain: u32, puserdatain: *const u8, dwsizeofuserdatain: u32, ppuserdataout: *mut *mut u8, pdwsizeofuserdataout: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IEAPProviderConfig2(pub ::windows::core::IUnknown); impl IEAPProviderConfig2 { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Initialize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszmachinename: Param0, dweaptypeid: u32) -> ::windows::core::Result<usize> { let mut result__: <usize as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszmachinename.into_param().abi(), ::core::mem::transmute(dweaptypeid), &mut result__).from_abi::<usize>(result__) } pub unsafe fn Uninitialize(&self, dweaptypeid: u32, uconnectionparam: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ServerInvokeConfigUI<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, dweaptypeid: u32, uconnectionparam: usize, hwnd: Param2, ureserved1: usize, ureserved2: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam), hwnd.into_param().abi(), ::core::mem::transmute(ureserved1), ::core::mem::transmute(ureserved2)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn RouterInvokeConfigUI<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, dweaptypeid: u32, uconnectionparam: usize, hwndparent: Param2, dwflags: u32, pconnectiondatain: *const u8, dwsizeofconnectiondatain: u32, ppconnectiondataout: *mut *mut u8, pdwsizeofconnectiondataout: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam), hwndparent.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pconnectiondatain), ::core::mem::transmute(dwsizeofconnectiondatain), ::core::mem::transmute(ppconnectiondataout), ::core::mem::transmute(pdwsizeofconnectiondataout), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn RouterInvokeCredentialsUI<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, dweaptypeid: u32, uconnectionparam: usize, hwndparent: Param2, dwflags: u32, pconnectiondatain: *const u8, dwsizeofconnectiondatain: u32, puserdatain: *const u8, dwsizeofuserdatain: u32, ppuserdataout: *mut *mut u8, pdwsizeofuserdataout: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam), hwndparent.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pconnectiondatain), ::core::mem::transmute(dwsizeofconnectiondatain), ::core::mem::transmute(puserdatain), ::core::mem::transmute(dwsizeofuserdatain), ::core::mem::transmute(ppuserdataout), ::core::mem::transmute(pdwsizeofuserdataout), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ServerInvokeConfigUI2<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, dweaptypeid: u32, uconnectionparam: usize, hwnd: Param2, pconfigdatain: *const u8, dwsizeofconfigdatain: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam), hwnd.into_param().abi(), ::core::mem::transmute(pconfigdatain), ::core::mem::transmute(dwsizeofconfigdatain), ::core::mem::transmute(ppconfigdataout), ::core::mem::transmute(pdwsizeofconfigdataout), ) .ok() } pub unsafe fn GetGlobalConfig(&self, dweaptypeid: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(ppconfigdataout), ::core::mem::transmute(pdwsizeofconfigdataout)).ok() } } unsafe impl ::windows::core::Interface for IEAPProviderConfig2 { type Vtable = IEAPProviderConfig2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd565917a_85c4_4466_856e_671c3742ea9a); } impl ::core::convert::From<IEAPProviderConfig2> for ::windows::core::IUnknown { fn from(value: IEAPProviderConfig2) -> Self { value.0 } } impl ::core::convert::From<&IEAPProviderConfig2> for ::windows::core::IUnknown { fn from(value: &IEAPProviderConfig2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IEAPProviderConfig2 { 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 IEAPProviderConfig2 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IEAPProviderConfig2> for IEAPProviderConfig { fn from(value: IEAPProviderConfig2) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IEAPProviderConfig2> for IEAPProviderConfig { fn from(value: &IEAPProviderConfig2) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IEAPProviderConfig> for IEAPProviderConfig2 { fn into_param(self) -> ::windows::core::Param<'a, IEAPProviderConfig> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IEAPProviderConfig> for &IEAPProviderConfig2 { fn into_param(self) -> ::windows::core::Param<'a, IEAPProviderConfig> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IEAPProviderConfig2_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, pszmachinename: super::super::Foundation::PWSTR, dweaptypeid: u32, puconnectionparam: *mut usize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, ureserved1: usize, ureserved2: usize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize, hwndparent: super::super::Foundation::HWND, dwflags: u32, pconnectiondatain: *const u8, dwsizeofconnectiondatain: u32, ppconnectiondataout: *mut *mut u8, pdwsizeofconnectiondataout: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize, hwndparent: super::super::Foundation::HWND, dwflags: u32, pconnectiondatain: *const u8, dwsizeofconnectiondatain: u32, puserdatain: *const u8, dwsizeofuserdatain: u32, ppuserdataout: *mut *mut u8, pdwsizeofuserdataout: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, pconfigdatain: *const u8, dwsizeofconfigdatain: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IEAPProviderConfig3(pub ::windows::core::IUnknown); impl IEAPProviderConfig3 { #[cfg(feature = "Win32_Foundation")] pub unsafe fn Initialize<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>>(&self, pszmachinename: Param0, dweaptypeid: u32) -> ::windows::core::Result<usize> { let mut result__: <usize as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszmachinename.into_param().abi(), ::core::mem::transmute(dweaptypeid), &mut result__).from_abi::<usize>(result__) } pub unsafe fn Uninitialize(&self, dweaptypeid: u32, uconnectionparam: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ServerInvokeConfigUI<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, dweaptypeid: u32, uconnectionparam: usize, hwnd: Param2, ureserved1: usize, ureserved2: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).5)(::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam), hwnd.into_param().abi(), ::core::mem::transmute(ureserved1), ::core::mem::transmute(ureserved2)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn RouterInvokeConfigUI<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, dweaptypeid: u32, uconnectionparam: usize, hwndparent: Param2, dwflags: u32, pconnectiondatain: *const u8, dwsizeofconnectiondatain: u32, ppconnectiondataout: *mut *mut u8, pdwsizeofconnectiondataout: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).6)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam), hwndparent.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pconnectiondatain), ::core::mem::transmute(dwsizeofconnectiondatain), ::core::mem::transmute(ppconnectiondataout), ::core::mem::transmute(pdwsizeofconnectiondataout), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn RouterInvokeCredentialsUI<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, dweaptypeid: u32, uconnectionparam: usize, hwndparent: Param2, dwflags: u32, pconnectiondatain: *const u8, dwsizeofconnectiondatain: u32, puserdatain: *const u8, dwsizeofuserdatain: u32, ppuserdataout: *mut *mut u8, pdwsizeofuserdataout: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam), hwndparent.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(pconnectiondatain), ::core::mem::transmute(dwsizeofconnectiondatain), ::core::mem::transmute(puserdatain), ::core::mem::transmute(dwsizeofuserdatain), ::core::mem::transmute(ppuserdataout), ::core::mem::transmute(pdwsizeofuserdataout), ) .ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ServerInvokeConfigUI2<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, dweaptypeid: u32, uconnectionparam: usize, hwnd: Param2, pconfigdatain: *const u8, dwsizeofconfigdatain: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam), hwnd.into_param().abi(), ::core::mem::transmute(pconfigdatain), ::core::mem::transmute(dwsizeofconfigdatain), ::core::mem::transmute(ppconfigdataout), ::core::mem::transmute(pdwsizeofconfigdataout), ) .ok() } pub unsafe fn GetGlobalConfig(&self, dweaptypeid: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(ppconfigdataout), ::core::mem::transmute(pdwsizeofconfigdataout)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ServerInvokeCertificateConfigUI<'a, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(&self, dweaptypeid: u32, uconnectionparam: usize, hwnd: Param2, pconfigdatain: *const u8, dwsizeofconfigdatain: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32, ureserved: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)( ::core::mem::transmute_copy(self), ::core::mem::transmute(dweaptypeid), ::core::mem::transmute(uconnectionparam), hwnd.into_param().abi(), ::core::mem::transmute(pconfigdatain), ::core::mem::transmute(dwsizeofconfigdatain), ::core::mem::transmute(ppconfigdataout), ::core::mem::transmute(pdwsizeofconfigdataout), ::core::mem::transmute(ureserved), ) .ok() } } unsafe impl ::windows::core::Interface for IEAPProviderConfig3 { type Vtable = IEAPProviderConfig3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xb78ecd12_68bb_4f86_9bf0_8438dd3be982); } impl ::core::convert::From<IEAPProviderConfig3> for ::windows::core::IUnknown { fn from(value: IEAPProviderConfig3) -> Self { value.0 } } impl ::core::convert::From<&IEAPProviderConfig3> for ::windows::core::IUnknown { fn from(value: &IEAPProviderConfig3) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IEAPProviderConfig3 { 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 IEAPProviderConfig3 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IEAPProviderConfig3> for IEAPProviderConfig2 { fn from(value: IEAPProviderConfig3) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IEAPProviderConfig3> for IEAPProviderConfig2 { fn from(value: &IEAPProviderConfig3) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IEAPProviderConfig2> for IEAPProviderConfig3 { fn into_param(self) -> ::windows::core::Param<'a, IEAPProviderConfig2> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IEAPProviderConfig2> for &IEAPProviderConfig3 { fn into_param(self) -> ::windows::core::Param<'a, IEAPProviderConfig2> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } impl ::core::convert::From<IEAPProviderConfig3> for IEAPProviderConfig { fn from(value: IEAPProviderConfig3) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IEAPProviderConfig3> for IEAPProviderConfig { fn from(value: &IEAPProviderConfig3) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IEAPProviderConfig> for IEAPProviderConfig3 { fn into_param(self) -> ::windows::core::Param<'a, IEAPProviderConfig> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IEAPProviderConfig> for &IEAPProviderConfig3 { fn into_param(self) -> ::windows::core::Param<'a, IEAPProviderConfig> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[repr(C)] #[doc(hidden)] pub struct IEAPProviderConfig3_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, pszmachinename: super::super::Foundation::PWSTR, dweaptypeid: u32, puconnectionparam: *mut usize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, ureserved1: usize, ureserved2: usize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize, hwndparent: super::super::Foundation::HWND, dwflags: u32, pconnectiondatain: *const u8, dwsizeofconnectiondatain: u32, ppconnectiondataout: *mut *mut u8, pdwsizeofconnectiondataout: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize, hwndparent: super::super::Foundation::HWND, dwflags: u32, pconnectiondatain: *const u8, dwsizeofconnectiondatain: u32, puserdatain: *const u8, dwsizeofuserdatain: u32, ppuserdataout: *mut *mut u8, pdwsizeofuserdataout: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, pconfigdatain: *const u8, dwsizeofconfigdatain: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, dweaptypeid: u32, uconnectionparam: usize, hwnd: super::super::Foundation::HWND, pconfigdatain: *const u8, dwsizeofconfigdatain: u32, ppconfigdataout: *mut *mut u8, pdwsizeofconfigdataout: *mut u32, ureserved: usize) -> ::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 IRouterProtocolConfig(pub ::windows::core::IUnknown); impl IRouterProtocolConfig { #[cfg(feature = "Win32_Foundation")] pub unsafe fn AddProtocol<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>, Param5: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(&self, pszmachinename: Param0, dwtransportid: u32, dwprotocolid: u32, hwnd: Param3, dwflags: u32, prouter: Param5, ureserved1: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).3)(::core::mem::transmute_copy(self), pszmachinename.into_param().abi(), ::core::mem::transmute(dwtransportid), ::core::mem::transmute(dwprotocolid), hwnd.into_param().abi(), ::core::mem::transmute(dwflags), prouter.into_param().abi(), ::core::mem::transmute(ureserved1)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn RemoveProtocol<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>, Param5: ::windows::core::IntoParam<'a, ::windows::core::IUnknown>>(&self, pszmachinename: Param0, dwtransportid: u32, dwprotocolid: u32, hwnd: Param3, dwflags: u32, prouter: Param5, ureserved1: usize) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).4)(::core::mem::transmute_copy(self), pszmachinename.into_param().abi(), ::core::mem::transmute(dwtransportid), ::core::mem::transmute(dwprotocolid), hwnd.into_param().abi(), ::core::mem::transmute(dwflags), prouter.into_param().abi(), ::core::mem::transmute(ureserved1)).ok() } } unsafe impl ::windows::core::Interface for IRouterProtocolConfig { type Vtable = IRouterProtocolConfig_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x66a2db16_d706_11d0_a37b_00c04fc9da04); } impl ::core::convert::From<IRouterProtocolConfig> for ::windows::core::IUnknown { fn from(value: IRouterProtocolConfig) -> Self { value.0 } } impl ::core::convert::From<&IRouterProtocolConfig> for ::windows::core::IUnknown { fn from(value: &IRouterProtocolConfig) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IRouterProtocolConfig { 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 IRouterProtocolConfig { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } #[repr(C)] #[doc(hidden)] pub struct IRouterProtocolConfig_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, pszmachinename: super::super::Foundation::PWSTR, dwtransportid: u32, dwprotocolid: u32, hwnd: super::super::Foundation::HWND, dwflags: u32, prouter: ::windows::core::RawPtr, ureserved1: usize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pszmachinename: super::super::Foundation::PWSTR, dwtransportid: u32, dwprotocolid: u32, hwnd: super::super::Foundation::HWND, dwflags: u32, prouter: ::windows::core::RawPtr, ureserved1: usize) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, ); #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct ISOLATION_STATE(pub i32); pub const ISOLATION_STATE_UNKNOWN: ISOLATION_STATE = ISOLATION_STATE(0i32); pub const ISOLATION_STATE_NOT_RESTRICTED: ISOLATION_STATE = ISOLATION_STATE(1i32); pub const ISOLATION_STATE_IN_PROBATION: ISOLATION_STATE = ISOLATION_STATE(2i32); pub const ISOLATION_STATE_RESTRICTED_ACCESS: ISOLATION_STATE = ISOLATION_STATE(3i32); impl ::core::convert::From<i32> for ISOLATION_STATE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for ISOLATION_STATE { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct LEGACY_IDENTITY_UI_PARAMS { pub eapType: u32, pub dwFlags: u32, pub dwSizeofConnectionData: u32, pub pConnectionData: *mut u8, pub dwSizeofUserData: u32, pub pUserData: *mut u8, pub dwSizeofUserDataOut: u32, pub pUserDataOut: *mut u8, pub pwszIdentity: super::super::Foundation::PWSTR, pub dwError: u32, } #[cfg(feature = "Win32_Foundation")] impl LEGACY_IDENTITY_UI_PARAMS {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for LEGACY_IDENTITY_UI_PARAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for LEGACY_IDENTITY_UI_PARAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("LEGACY_IDENTITY_UI_PARAMS") .field("eapType", &self.eapType) .field("dwFlags", &self.dwFlags) .field("dwSizeofConnectionData", &self.dwSizeofConnectionData) .field("pConnectionData", &self.pConnectionData) .field("dwSizeofUserData", &self.dwSizeofUserData) .field("pUserData", &self.pUserData) .field("dwSizeofUserDataOut", &self.dwSizeofUserDataOut) .field("pUserDataOut", &self.pUserDataOut) .field("pwszIdentity", &self.pwszIdentity) .field("dwError", &self.dwError) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for LEGACY_IDENTITY_UI_PARAMS { fn eq(&self, other: &Self) -> bool { self.eapType == other.eapType && self.dwFlags == other.dwFlags && self.dwSizeofConnectionData == other.dwSizeofConnectionData && self.pConnectionData == other.pConnectionData && self.dwSizeofUserData == other.dwSizeofUserData && self.pUserData == other.pUserData && self.dwSizeofUserDataOut == other.dwSizeofUserDataOut && self.pUserDataOut == other.pUserDataOut && self.pwszIdentity == other.pwszIdentity && self.dwError == other.dwError } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for LEGACY_IDENTITY_UI_PARAMS {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for LEGACY_IDENTITY_UI_PARAMS { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct LEGACY_INTERACTIVE_UI_PARAMS { pub eapType: u32, pub dwSizeofContextData: u32, pub pContextData: *mut u8, pub dwSizeofInteractiveUIData: u32, pub pInteractiveUIData: *mut u8, pub dwError: u32, } impl LEGACY_INTERACTIVE_UI_PARAMS {} impl ::core::default::Default for LEGACY_INTERACTIVE_UI_PARAMS { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for LEGACY_INTERACTIVE_UI_PARAMS { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("LEGACY_INTERACTIVE_UI_PARAMS") .field("eapType", &self.eapType) .field("dwSizeofContextData", &self.dwSizeofContextData) .field("pContextData", &self.pContextData) .field("dwSizeofInteractiveUIData", &self.dwSizeofInteractiveUIData) .field("pInteractiveUIData", &self.pInteractiveUIData) .field("dwError", &self.dwError) .finish() } } impl ::core::cmp::PartialEq for LEGACY_INTERACTIVE_UI_PARAMS { fn eq(&self, other: &Self) -> bool { self.eapType == other.eapType && self.dwSizeofContextData == other.dwSizeofContextData && self.pContextData == other.pContextData && self.dwSizeofInteractiveUIData == other.dwSizeofInteractiveUIData && self.pInteractiveUIData == other.pInteractiveUIData && self.dwError == other.dwError } } impl ::core::cmp::Eq for LEGACY_INTERACTIVE_UI_PARAMS {} unsafe impl ::windows::core::Abi for LEGACY_INTERACTIVE_UI_PARAMS { type Abi = Self; } pub const MAXEAPCODE: u32 = 4u32; pub const MAX_EAP_CONFIG_INPUT_FIELD_LENGTH: u32 = 256u32; pub const MAX_EAP_CONFIG_INPUT_FIELD_VALUE_LENGTH: u32 = 1024u32; pub const NCRYPT_PIN_CACHE_PIN_BYTE_LENGTH: u32 = 90u32; #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct NgcTicketContext { pub wszTicket: [u16; 45], pub hKey: usize, pub hImpersonateToken: super::super::Foundation::HANDLE, } #[cfg(feature = "Win32_Foundation")] impl NgcTicketContext {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for NgcTicketContext { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for NgcTicketContext { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("NgcTicketContext").field("wszTicket", &self.wszTicket).field("hKey", &self.hKey).field("hImpersonateToken", &self.hImpersonateToken).finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for NgcTicketContext { fn eq(&self, other: &Self) -> bool { self.wszTicket == other.wszTicket && self.hKey == other.hKey && self.hImpersonateToken == other.hImpersonateToken } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for NgcTicketContext {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for NgcTicketContext { type Abi = Self; } pub type NotificationHandler = unsafe extern "system" fn(connectionid: ::windows::core::GUID, pcontextdata: *mut ::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 PPP_EAP_ACTION(pub i32); pub const EAPACTION_NoAction: PPP_EAP_ACTION = PPP_EAP_ACTION(0i32); pub const EAPACTION_Authenticate: PPP_EAP_ACTION = PPP_EAP_ACTION(1i32); pub const EAPACTION_Done: PPP_EAP_ACTION = PPP_EAP_ACTION(2i32); pub const EAPACTION_SendAndDone: PPP_EAP_ACTION = PPP_EAP_ACTION(3i32); pub const EAPACTION_Send: PPP_EAP_ACTION = PPP_EAP_ACTION(4i32); pub const EAPACTION_SendWithTimeout: PPP_EAP_ACTION = PPP_EAP_ACTION(5i32); pub const EAPACTION_SendWithTimeoutInteractive: PPP_EAP_ACTION = PPP_EAP_ACTION(6i32); pub const EAPACTION_IndicateTLV: PPP_EAP_ACTION = PPP_EAP_ACTION(7i32); pub const EAPACTION_IndicateIdentity: PPP_EAP_ACTION = PPP_EAP_ACTION(8i32); impl ::core::convert::From<i32> for PPP_EAP_ACTION { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for PPP_EAP_ACTION { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PPP_EAP_INFO { pub dwSizeInBytes: u32, pub dwEapTypeId: u32, pub RasEapInitialize: isize, pub RasEapBegin: isize, pub RasEapEnd: isize, pub RasEapMakeMessage: isize, } impl PPP_EAP_INFO {} impl ::core::default::Default for PPP_EAP_INFO { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for PPP_EAP_INFO { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PPP_EAP_INFO") .field("dwSizeInBytes", &self.dwSizeInBytes) .field("dwEapTypeId", &self.dwEapTypeId) .field("RasEapInitialize", &self.RasEapInitialize) .field("RasEapBegin", &self.RasEapBegin) .field("RasEapEnd", &self.RasEapEnd) .field("RasEapMakeMessage", &self.RasEapMakeMessage) .finish() } } impl ::core::cmp::PartialEq for PPP_EAP_INFO { fn eq(&self, other: &Self) -> bool { self.dwSizeInBytes == other.dwSizeInBytes && self.dwEapTypeId == other.dwEapTypeId && self.RasEapInitialize == other.RasEapInitialize && self.RasEapBegin == other.RasEapBegin && self.RasEapEnd == other.RasEapEnd && self.RasEapMakeMessage == other.RasEapMakeMessage } } impl ::core::cmp::Eq for PPP_EAP_INFO {} unsafe impl ::windows::core::Abi for PPP_EAP_INFO { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct PPP_EAP_INPUT { pub dwSizeInBytes: u32, pub fFlags: u32, pub fAuthenticator: super::super::Foundation::BOOL, pub pwszIdentity: super::super::Foundation::PWSTR, pub pwszPassword: super::super::Foundation::PWSTR, pub bInitialId: u8, pub pUserAttributes: *mut RAS_AUTH_ATTRIBUTE, pub fAuthenticationComplete: super::super::Foundation::BOOL, pub dwAuthResultCode: u32, pub hTokenImpersonateUser: super::super::Foundation::HANDLE, pub fSuccessPacketReceived: super::super::Foundation::BOOL, pub fDataReceivedFromInteractiveUI: super::super::Foundation::BOOL, pub pDataFromInteractiveUI: *mut u8, pub dwSizeOfDataFromInteractiveUI: u32, pub pConnectionData: *mut u8, pub dwSizeOfConnectionData: u32, pub pUserData: *mut u8, pub dwSizeOfUserData: u32, pub hReserved: super::super::Foundation::HANDLE, pub guidConnectionId: ::windows::core::GUID, pub isVpn: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl PPP_EAP_INPUT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PPP_EAP_INPUT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for PPP_EAP_INPUT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PPP_EAP_INPUT") .field("dwSizeInBytes", &self.dwSizeInBytes) .field("fFlags", &self.fFlags) .field("fAuthenticator", &self.fAuthenticator) .field("pwszIdentity", &self.pwszIdentity) .field("pwszPassword", &self.pwszPassword) .field("bInitialId", &self.bInitialId) .field("pUserAttributes", &self.pUserAttributes) .field("fAuthenticationComplete", &self.fAuthenticationComplete) .field("dwAuthResultCode", &self.dwAuthResultCode) .field("hTokenImpersonateUser", &self.hTokenImpersonateUser) .field("fSuccessPacketReceived", &self.fSuccessPacketReceived) .field("fDataReceivedFromInteractiveUI", &self.fDataReceivedFromInteractiveUI) .field("pDataFromInteractiveUI", &self.pDataFromInteractiveUI) .field("dwSizeOfDataFromInteractiveUI", &self.dwSizeOfDataFromInteractiveUI) .field("pConnectionData", &self.pConnectionData) .field("dwSizeOfConnectionData", &self.dwSizeOfConnectionData) .field("pUserData", &self.pUserData) .field("dwSizeOfUserData", &self.dwSizeOfUserData) .field("hReserved", &self.hReserved) .field("guidConnectionId", &self.guidConnectionId) .field("isVpn", &self.isVpn) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PPP_EAP_INPUT { fn eq(&self, other: &Self) -> bool { self.dwSizeInBytes == other.dwSizeInBytes && self.fFlags == other.fFlags && self.fAuthenticator == other.fAuthenticator && self.pwszIdentity == other.pwszIdentity && self.pwszPassword == other.pwszPassword && self.bInitialId == other.bInitialId && self.pUserAttributes == other.pUserAttributes && self.fAuthenticationComplete == other.fAuthenticationComplete && self.dwAuthResultCode == other.dwAuthResultCode && self.hTokenImpersonateUser == other.hTokenImpersonateUser && self.fSuccessPacketReceived == other.fSuccessPacketReceived && self.fDataReceivedFromInteractiveUI == other.fDataReceivedFromInteractiveUI && self.pDataFromInteractiveUI == other.pDataFromInteractiveUI && self.dwSizeOfDataFromInteractiveUI == other.dwSizeOfDataFromInteractiveUI && self.pConnectionData == other.pConnectionData && self.dwSizeOfConnectionData == other.dwSizeOfConnectionData && self.pUserData == other.pUserData && self.dwSizeOfUserData == other.dwSizeOfUserData && self.hReserved == other.hReserved && self.guidConnectionId == other.guidConnectionId && self.isVpn == other.isVpn } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PPP_EAP_INPUT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PPP_EAP_INPUT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] #[cfg(feature = "Win32_Foundation")] pub struct PPP_EAP_OUTPUT { pub dwSizeInBytes: u32, pub Action: PPP_EAP_ACTION, pub dwAuthResultCode: u32, pub pUserAttributes: *mut RAS_AUTH_ATTRIBUTE, pub fInvokeInteractiveUI: super::super::Foundation::BOOL, pub pUIContextData: *mut u8, pub dwSizeOfUIContextData: u32, pub fSaveConnectionData: super::super::Foundation::BOOL, pub pConnectionData: *mut u8, pub dwSizeOfConnectionData: u32, pub fSaveUserData: super::super::Foundation::BOOL, pub pUserData: *mut u8, pub dwSizeOfUserData: u32, pub pNgcKerbTicket: *mut NgcTicketContext, pub fSaveToCredMan: super::super::Foundation::BOOL, } #[cfg(feature = "Win32_Foundation")] impl PPP_EAP_OUTPUT {} #[cfg(feature = "Win32_Foundation")] impl ::core::default::Default for PPP_EAP_OUTPUT { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } #[cfg(feature = "Win32_Foundation")] impl ::core::fmt::Debug for PPP_EAP_OUTPUT { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PPP_EAP_OUTPUT") .field("dwSizeInBytes", &self.dwSizeInBytes) .field("Action", &self.Action) .field("dwAuthResultCode", &self.dwAuthResultCode) .field("pUserAttributes", &self.pUserAttributes) .field("fInvokeInteractiveUI", &self.fInvokeInteractiveUI) .field("pUIContextData", &self.pUIContextData) .field("dwSizeOfUIContextData", &self.dwSizeOfUIContextData) .field("fSaveConnectionData", &self.fSaveConnectionData) .field("pConnectionData", &self.pConnectionData) .field("dwSizeOfConnectionData", &self.dwSizeOfConnectionData) .field("fSaveUserData", &self.fSaveUserData) .field("pUserData", &self.pUserData) .field("dwSizeOfUserData", &self.dwSizeOfUserData) .field("pNgcKerbTicket", &self.pNgcKerbTicket) .field("fSaveToCredMan", &self.fSaveToCredMan) .finish() } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::PartialEq for PPP_EAP_OUTPUT { fn eq(&self, other: &Self) -> bool { self.dwSizeInBytes == other.dwSizeInBytes && self.Action == other.Action && self.dwAuthResultCode == other.dwAuthResultCode && self.pUserAttributes == other.pUserAttributes && self.fInvokeInteractiveUI == other.fInvokeInteractiveUI && self.pUIContextData == other.pUIContextData && self.dwSizeOfUIContextData == other.dwSizeOfUIContextData && self.fSaveConnectionData == other.fSaveConnectionData && self.pConnectionData == other.pConnectionData && self.dwSizeOfConnectionData == other.dwSizeOfConnectionData && self.fSaveUserData == other.fSaveUserData && self.pUserData == other.pUserData && self.dwSizeOfUserData == other.dwSizeOfUserData && self.pNgcKerbTicket == other.pNgcKerbTicket && self.fSaveToCredMan == other.fSaveToCredMan } } #[cfg(feature = "Win32_Foundation")] impl ::core::cmp::Eq for PPP_EAP_OUTPUT {} #[cfg(feature = "Win32_Foundation")] unsafe impl ::windows::core::Abi for PPP_EAP_OUTPUT { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct PPP_EAP_PACKET { pub Code: u8, pub Id: u8, pub Length: [u8; 2], pub Data: [u8; 1], } impl PPP_EAP_PACKET {} impl ::core::default::Default for PPP_EAP_PACKET { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for PPP_EAP_PACKET { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("PPP_EAP_PACKET").field("Code", &self.Code).field("Id", &self.Id).field("Length", &self.Length).field("Data", &self.Data).finish() } } impl ::core::cmp::PartialEq for PPP_EAP_PACKET { fn eq(&self, other: &Self) -> bool { self.Code == other.Code && self.Id == other.Id && self.Length == other.Length && self.Data == other.Data } } impl ::core::cmp::Eq for PPP_EAP_PACKET {} unsafe impl ::windows::core::Abi for PPP_EAP_PACKET { type Abi = Self; } #[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)] #[repr(C)] pub struct RAS_AUTH_ATTRIBUTE { pub raaType: RAS_AUTH_ATTRIBUTE_TYPE, pub dwLength: u32, pub Value: *mut ::core::ffi::c_void, } impl RAS_AUTH_ATTRIBUTE {} impl ::core::default::Default for RAS_AUTH_ATTRIBUTE { fn default() -> Self { unsafe { ::core::mem::zeroed() } } } impl ::core::fmt::Debug for RAS_AUTH_ATTRIBUTE { fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { fmt.debug_struct("RAS_AUTH_ATTRIBUTE").field("raaType", &self.raaType).field("dwLength", &self.dwLength).field("Value", &self.Value).finish() } } impl ::core::cmp::PartialEq for RAS_AUTH_ATTRIBUTE { fn eq(&self, other: &Self) -> bool { self.raaType == other.raaType && self.dwLength == other.dwLength && self.Value == other.Value } } impl ::core::cmp::Eq for RAS_AUTH_ATTRIBUTE {} unsafe impl ::windows::core::Abi for RAS_AUTH_ATTRIBUTE { 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 RAS_AUTH_ATTRIBUTE_TYPE(pub i32); pub const raatMinimum: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(0i32); pub const raatUserName: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(1i32); pub const raatUserPassword: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(2i32); pub const raatMD5CHAPPassword: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(3i32); pub const raatNASIPAddress: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(4i32); pub const raatNASPort: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(5i32); pub const raatServiceType: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(6i32); pub const raatFramedProtocol: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(7i32); pub const raatFramedIPAddress: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(8i32); pub const raatFramedIPNetmask: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(9i32); pub const raatFramedRouting: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(10i32); pub const raatFilterId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(11i32); pub const raatFramedMTU: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(12i32); pub const raatFramedCompression: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(13i32); pub const raatLoginIPHost: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(14i32); pub const raatLoginService: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(15i32); pub const raatLoginTCPPort: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(16i32); pub const raatUnassigned17: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(17i32); pub const raatReplyMessage: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(18i32); pub const raatCallbackNumber: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(19i32); pub const raatCallbackId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(20i32); pub const raatUnassigned21: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(21i32); pub const raatFramedRoute: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(22i32); pub const raatFramedIPXNetwork: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(23i32); pub const raatState: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(24i32); pub const raatClass: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(25i32); pub const raatVendorSpecific: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(26i32); pub const raatSessionTimeout: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(27i32); pub const raatIdleTimeout: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(28i32); pub const raatTerminationAction: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(29i32); pub const raatCalledStationId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(30i32); pub const raatCallingStationId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(31i32); pub const raatNASIdentifier: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(32i32); pub const raatProxyState: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(33i32); pub const raatLoginLATService: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(34i32); pub const raatLoginLATNode: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(35i32); pub const raatLoginLATGroup: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(36i32); pub const raatFramedAppleTalkLink: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(37i32); pub const raatFramedAppleTalkNetwork: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(38i32); pub const raatFramedAppleTalkZone: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(39i32); pub const raatAcctStatusType: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(40i32); pub const raatAcctDelayTime: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(41i32); pub const raatAcctInputOctets: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(42i32); pub const raatAcctOutputOctets: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(43i32); pub const raatAcctSessionId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(44i32); pub const raatAcctAuthentic: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(45i32); pub const raatAcctSessionTime: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(46i32); pub const raatAcctInputPackets: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(47i32); pub const raatAcctOutputPackets: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(48i32); pub const raatAcctTerminateCause: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(49i32); pub const raatAcctMultiSessionId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(50i32); pub const raatAcctLinkCount: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(51i32); pub const raatAcctEventTimeStamp: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(55i32); pub const raatMD5CHAPChallenge: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(60i32); pub const raatNASPortType: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(61i32); pub const raatPortLimit: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(62i32); pub const raatLoginLATPort: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(63i32); pub const raatTunnelType: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(64i32); pub const raatTunnelMediumType: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(65i32); pub const raatTunnelClientEndpoint: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(66i32); pub const raatTunnelServerEndpoint: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(67i32); pub const raatARAPPassword: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(70i32); pub const raatARAPFeatures: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(71i32); pub const raatARAPZoneAccess: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(72i32); pub const raatARAPSecurity: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(73i32); pub const raatARAPSecurityData: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(74i32); pub const raatPasswordRetry: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(75i32); pub const raatPrompt: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(76i32); pub const raatConnectInfo: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(77i32); pub const raatConfigurationToken: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(78i32); pub const raatEAPMessage: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(79i32); pub const raatSignature: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(80i32); pub const raatARAPChallengeResponse: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(84i32); pub const raatAcctInterimInterval: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(85i32); pub const raatNASIPv6Address: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(95i32); pub const raatFramedInterfaceId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(96i32); pub const raatFramedIPv6Prefix: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(97i32); pub const raatLoginIPv6Host: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(98i32); pub const raatFramedIPv6Route: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(99i32); pub const raatFramedIPv6Pool: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(100i32); pub const raatARAPGuestLogon: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(8096i32); pub const raatCertificateOID: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(8097i32); pub const raatEAPConfiguration: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(8098i32); pub const raatPEAPEmbeddedEAPTypeId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(8099i32); pub const raatInnerEAPTypeId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(8099i32); pub const raatPEAPFastRoamedSession: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(8100i32); pub const raatFastRoamedSession: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(8100i32); pub const raatEAPTLV: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(8102i32); pub const raatCredentialsChanged: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(8103i32); pub const raatCertificateThumbprint: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(8250i32); pub const raatPeerId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(9000i32); pub const raatServerId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(9001i32); pub const raatMethodId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(9002i32); pub const raatEMSK: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(9003i32); pub const raatSessionId: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(9004i32); pub const raatReserved: RAS_AUTH_ATTRIBUTE_TYPE = RAS_AUTH_ATTRIBUTE_TYPE(-1i32); impl ::core::convert::From<i32> for RAS_AUTH_ATTRIBUTE_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for RAS_AUTH_ATTRIBUTE_TYPE { type Abi = Self; } pub const RAS_EAP_FLAG_8021X_AUTH: u32 = 128u32; pub const RAS_EAP_FLAG_ALTERNATIVE_USER_DB: u32 = 2048u32; pub const RAS_EAP_FLAG_CONFG_READONLY: u32 = 524288u32; pub const RAS_EAP_FLAG_FIRST_LINK: u32 = 16u32; pub const RAS_EAP_FLAG_GUEST_ACCESS: u32 = 64u32; pub const RAS_EAP_FLAG_HOSTED_IN_PEAP: u32 = 256u32; pub const RAS_EAP_FLAG_LOGON: u32 = 4u32; pub const RAS_EAP_FLAG_MACHINE_AUTH: u32 = 32u32; pub const RAS_EAP_FLAG_NON_INTERACTIVE: u32 = 2u32; pub const RAS_EAP_FLAG_PEAP_FORCE_FULL_AUTH: u32 = 4096u32; pub const RAS_EAP_FLAG_PEAP_UPFRONT: u32 = 1024u32; pub const RAS_EAP_FLAG_PREVIEW: u32 = 8u32; pub const RAS_EAP_FLAG_PRE_LOGON: u32 = 131072u32; pub const RAS_EAP_FLAG_RESERVED: u32 = 1048576u32; pub const RAS_EAP_FLAG_RESUME_FROM_HIBERNATE: u32 = 512u32; pub const RAS_EAP_FLAG_ROUTER: u32 = 1u32; pub const RAS_EAP_FLAG_SAVE_CREDMAN: u32 = 2097152u32; pub const RAS_EAP_FLAG_SERVER_VALIDATION_REQUIRED: u32 = 33554432u32; pub const RAS_EAP_ROLE_AUTHENTICATEE: u32 = 2u32; pub const RAS_EAP_ROLE_AUTHENTICATOR: u32 = 1u32; pub const RAS_EAP_ROLE_EXCLUDE_IN_EAP: u32 = 4u32; pub const RAS_EAP_ROLE_EXCLUDE_IN_PEAP: u32 = 8u32; pub const RAS_EAP_ROLE_EXCLUDE_IN_VPN: u32 = 16u32;
use std::fmt; use std::future::Future; use std::io; use std::io::{Read, SeekFrom, Write}; use std::pin::Pin; use std::sync::Arc; use std::task::{Context, Poll}; use actix::prelude::*; use chrono::DateTime; use fs2::FileExt; use indexmap::IndexMap; use serde::{Deserialize, Serialize}; use serde_json; use tokio::fs::File; use tokio::io::{AsyncBufReadExt, AsyncRead, AsyncReadExt, AsyncSeek, AsyncSeekExt, BufReader, ReadBuf, Take}; use tokio::sync::oneshot; use tokio_stream::wrappers::LinesStream; use crate::config::*; use crate::chunk_stream::*; use crate::datetime_ext::*; use crate::eit_feeder::*; use crate::error::Error; use crate::epg::*; use crate::filter::*; use crate::models::*; use crate::mpeg_ts_stream::*; use crate::tuner::*; use crate::command_util::{ spawn_pipeline, CommandPipeline, CommandPipelineOutput, CommandPipelineProcessModel, }; pub fn start( config: Arc<Config>, tuner_manager: Addr<TunerManager>, ) -> Addr<TimeshiftManager> { TimeshiftManager::new(config.clone(), tuner_manager).start() } // timeshift manager type TimeshiftLiveStream = MpegTsStream<String, ChunkStream<TimeshiftFileReader>>; type TimeshiftRecordStream = MpegTsStream<String, ChunkStream<Take<TimeshiftFileReader>>>; pub struct TimeshiftManager { config: Arc<Config>, tuner_manager: Addr<TunerManager>, recorders: IndexMap<String, Addr<TimeshiftRecorder>>, } impl TimeshiftManager { pub fn new(config: Arc<Config>, tuner_manager: Addr<TunerManager>) -> Self { TimeshiftManager { config, tuner_manager, recorders: IndexMap::new(), } } } impl Actor for TimeshiftManager { type Context = actix::Context<Self>; fn started(&mut self, _ctx: &mut Self::Context) { log::debug!("Started"); let mut recorders = IndexMap::new(); for (index, name) in self.config.timeshift.recorders.keys().enumerate() { let recorder = TimeshiftRecorder::new(index, name.clone(), self.config.clone()); recorders.insert(name.clone(), recorder.start()); } self.recorders = recorders; } fn stopped(&mut self, _ctx: &mut Self::Context) { log::debug!("Stopped"); } } #[derive(Message)] #[rtype(result = "Result<Vec<TimeshiftRecorderModel>, Error>")] pub struct QueryTimeshiftRecordersMessage; impl fmt::Display for QueryTimeshiftRecordersMessage { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "QueryTimeshiftRecorders") } } impl Handler<QueryTimeshiftRecordersMessage> for TimeshiftManager { type Result = ResponseFuture<Result<Vec<TimeshiftRecorderModel>, Error>>; fn handle( &mut self, msg: QueryTimeshiftRecordersMessage, _: &mut Self::Context, ) -> Self::Result { log::debug!("{}", msg); let mut futures = Vec::with_capacity(self.recorders.len()); for (index, recorder) in self.recorders.values().enumerate() { futures.push(recorder.send(QueryTimeshiftRecorderMessage { recorder: TimeshiftRecorderQuery::ByIndex(index), })); } Box::pin(async move { futures::future::join_all(futures) .await .into_iter() .flatten() .collect() }) } } macro_rules! impl_proxy_handler { ($msg:ident, $result:path) => { impl Handler<$msg> for TimeshiftManager { type Result = ResponseFuture<$result>; fn handle( &mut self, msg: $msg, _ctx: &mut Self::Context, ) -> Self::Result { log::debug!("{}", msg); let maybe_recorder = match msg.recorder { TimeshiftRecorderQuery::ByIndex(index) => { self.recorders .get_index(index) .map(|(_, recorder)| recorder.clone()) .ok_or(Error::RecordNotFound) } TimeshiftRecorderQuery::ByName(ref name) => { self.recorders .get(name) .cloned() .ok_or(Error::RecordNotFound) } }; Box::pin(async move { maybe_recorder?.send(msg).await? }) } } } } pub enum TimeshiftRecorderQuery { ByIndex(usize), ByName(String), } impl fmt::Display for TimeshiftRecorderQuery { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match *self { TimeshiftRecorderQuery::ByIndex(index) => write!(f, "index({})", index), TimeshiftRecorderQuery::ByName(ref name) => write!(f, "name({})", name), } } } #[derive(Message)] #[rtype(result = "Result<TimeshiftRecorderModel, Error>")] pub struct QueryTimeshiftRecorderMessage { pub recorder: TimeshiftRecorderQuery, } impl fmt::Display for QueryTimeshiftRecorderMessage { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "QueryTimeshiftRecorder: recorder={}", self.recorder) } } impl_proxy_handler!(QueryTimeshiftRecorderMessage, Result<TimeshiftRecorderModel, Error>); #[derive(Message)] #[rtype(result = "Result<Vec<TimeshiftRecordModel>, Error>")] pub struct QueryTimeshiftRecordsMessage { pub recorder: TimeshiftRecorderQuery, } impl fmt::Display for QueryTimeshiftRecordsMessage { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "QueryTimeshiftRecords: recoder={}", self.recorder) } } impl_proxy_handler!(QueryTimeshiftRecordsMessage, Result<Vec<TimeshiftRecordModel>, Error>); #[derive(Message)] #[rtype(result = "Result<TimeshiftRecordModel, Error>")] pub struct QueryTimeshiftRecordMessage { pub recorder: TimeshiftRecorderQuery, pub record_id: TimeshiftRecordId, } impl fmt::Display for QueryTimeshiftRecordMessage { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "QueryTimeshiftRecord: recoder={} record_id={}", self.recorder, self.record_id) } } impl_proxy_handler!(QueryTimeshiftRecordMessage, Result<TimeshiftRecordModel, Error>); #[derive(Message)] #[rtype(result = "Result<TimeshiftLiveStreamSource, Error>")] pub struct CreateTimeshiftLiveStreamSourceMessage { pub recorder: TimeshiftRecorderQuery, pub record_id: Option<TimeshiftRecordId>, } impl fmt::Display for CreateTimeshiftLiveStreamSourceMessage { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self.record_id { Some(id) => { write!(f, "CreateTimeshiftLiveStreamSource: recoder={} record_id={}", self.recorder, id) } None => { write!(f, "CreateTimeshiftLiveStreamSource: recorder={}", self.recorder) } } } } impl_proxy_handler!( CreateTimeshiftLiveStreamSourceMessage, Result<TimeshiftLiveStreamSource, Error>); #[derive(Message)] #[rtype(result = "Result<TimeshiftRecordStreamSource, Error>")] pub struct CreateTimeshiftRecordStreamSourceMessage { pub recorder: TimeshiftRecorderQuery, pub record_id: TimeshiftRecordId, pub start_pos: Option<u64>, } impl fmt::Display for CreateTimeshiftRecordStreamSourceMessage { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self.start_pos { Some(pos) => { write!(f, "CreateTimeshiftRecordStreamSource: \ recorder={} record_id={} start_pos={}", self.recorder, self.record_id, pos) } None => { write!(f, "CreateTimeshiftRecordStreamSource: recorder={} record_id={}", self.recorder, self.record_id) } } } } impl_proxy_handler!( CreateTimeshiftRecordStreamSourceMessage, Result<TimeshiftRecordStreamSource, Error>); impl Handler<NotifyServicesUpdatedMessage> for TimeshiftManager { type Result = (); fn handle( &mut self, msg: NotifyServicesUpdatedMessage, _ctx: &mut Self::Context, ) -> Self::Result { log::debug!("{}", msg); for (name, config) in self.config.clone().timeshift.recorders.iter() { let triple = ServiceTriple::from(config.service_triple.clone()); if msg.services.contains_key(&triple) { log::info!("{}: Service#{} is available, activate", name, triple); let service = msg.services[&triple].clone(); self.recorders[name].do_send(ActivateTimeshiftRecorderMessage { service, tuner_manager: self.tuner_manager.clone(), }); } else { log::warn!("{}: Service#{} is unavailable, deactivate", name, triple); self.recorders[name].do_send(DeactivateTimeshiftRecorderMessage); } } } } // recorder struct TimeshiftRecorder { index: usize, name: String, config: Arc<Config>, service: EpgService, records: IndexMap<TimeshiftRecordId, TimeshiftRecord>, points: Vec<TimeshiftPoint>, session: Option<TimeshiftRecorderSession>, } impl TimeshiftRecorder { fn new( index: usize, name: String, config: Arc<Config>, ) -> Self { let recorder_config = &config.timeshift.recorders[&name]; let service = EpgService { // dummy data nid: recorder_config.service_triple.0, tsid: recorder_config.service_triple.1, sid: recorder_config.service_triple.2, service_type: 0, logo_id: 0, remote_control_key_id: 0, name: "".to_string(), channel: EpgChannel { name: "".to_string(), channel_type: ChannelType::GR, channel: "".to_string(), extra_args: "".to_string(), services: vec![], excluded_services: vec![], }, }; let max_chunks = recorder_config.max_chunks(); TimeshiftRecorder { index, name, config, service, records: IndexMap::new(), points: Vec::with_capacity(max_chunks), session: None, } } fn config(&self) -> &TimeshiftRecorderConfig { &self.config.timeshift.recorders[&self.name] } fn load_data(&mut self) { match self.do_load_data() { Ok(n) => { if n == 0 { log::debug!("{}: No records saved", self.name); } else { log::info!("{}: Loaded {} records successfully", self.name, n); } } Err(err) => { log::warn!("{}: Failed to load saved data from {}: {}", self.name, self.config().data_file, err); } } } fn do_load_data(&mut self) -> Result<usize, Error> { // Read all bytes, then deserialize records, in order to reduce the lock time. let mut buf = Vec::with_capacity(4096 * 1_000); { let mut file = std::fs::File::open(&self.config().data_file)?; log::debug!("{}: Locking {} for read...", self.name, self.config().data_file); file.lock_shared()?; file.read_to_end(&mut buf)?; file.unlock()?; log::debug!("{}: Unlocked {}", self.name, self.config().data_file); } let data: TimeshiftRecorderData = serde_json::from_slice(&buf)?; if self.service.triple() == data.service.triple() && self.config().chunk_size == data.chunk_size && self.config().max_chunks() == data.max_chunks { self.records = data.records; self.points = data.points; // Don't remove the last item here. Ok(self.records.len()) } else { Ok(0) } } fn save_data(&self) { match self.do_save_data() { Ok(n) => { if n == 0 { log::debug!("{}: No records to save", self.name); } else { log::info!("{}: Saved {} records successfully", self.name, n); } } Err(err) => { log::error!("{}: Failed to save data into {}: {}", self.name, self.config().data_file, err); } } } fn do_save_data(&self) -> Result<usize, Error> { if self.records.is_empty() { return Ok(0); } let service = &self.service; let chunk_size = self.config().chunk_size; let max_chunks = self.config().max_chunks(); let records = &self.records; // The last item will be used as a sentinel and removed before recording starts. let points = &self.points; let data = TimeshiftRecorderDataForSave { service, chunk_size, max_chunks, records, points, }; // Serialize records, then write all bytes, in order to reduce the lock time. let buf = serde_json::to_vec(&data)?; { let mut file = std::fs::File::create(&self.config().data_file)?; log::debug!("{}: Locking {} for write...", self.name, self.config().data_file); file.lock_exclusive()?; file.write_all(&buf)?; file.unlock()?; log::debug!("{}: Unlocked {}", self.name, self.config().data_file); } Ok(data.records.len()) } fn deactivate(&mut self) { if self.session.is_some() { log::info!("{}: Deactivated", self.name); } else { log::warn!("{}: Deactivated, but inactive", self.name); } self.session = None; } fn create_live_stream_source( &self, record_id: Option<TimeshiftRecordId>, ) -> Result<TimeshiftLiveStreamSource, Error> { if self.points.len() < 2 { return Err(Error::RecordNotFound) } let name = self.name.clone(); let file = self.config().ts_file.clone(); let point = if let Some(id) = record_id { let record = self.records.get(&id).ok_or(Error::ProgramNotFound)?; record.start.clone() } else { self.points[0].clone() }; Ok(TimeshiftLiveStreamSource { name, file, point }) } fn create_record_stream_source( &self, record_id: TimeshiftRecordId, start_pos: Option<u64>, ) -> Result<TimeshiftRecordStreamSource, Error> { let record = self.records.get(&record_id).ok_or(Error::ProgramNotFound)?; record.create_record_stream_source(self.name.clone(), self.config(), start_pos) } fn handle_start_recording(&mut self) { log::info!("{}: Started recording", self.name); if let Some(point) = self.points.pop() { // remove the sentinel item if it exists log::debug!("{}: Removed the sentinel point {}", self.name, point); } } fn handle_stop_recording(&mut self, reset: bool) { log::info!("{}: Stopped recording", self.name); if reset { log::warn!("{}: Reset data", self.name); // TODO } } fn handle_chunk(&mut self, point: TimeshiftPoint) { self.maintain(); self.append_point(&point); self.save_data(); } fn maintain(&mut self) { if self.points.len() < self.config().max_chunks() { return; } self.invalidate_first_chunk(); self.purge_expired_records(); self.crop_record_to_be_overwritten(); } fn invalidate_first_chunk(&mut self) { assert!(self.points.len() == self.config().max_chunks()); let point = self.points.remove(0); let index = point.pos / (self.config().chunk_size as u64); log::debug!("{}: Chunk#{}: Invalidated", self.name, index); } // Purge records which ended recording before the first timestamp. // // A record which started recording before the timestamp and ended recording after the // timestamp it NOT purged. Because it has data in available chunks and can be provided // via Web endpoints for streaming. fn purge_expired_records(&mut self) { assert!(!self.points.is_empty()); let timestamp = self.points[0].timestamp; let n = self.records.values() .position(|record| record.end.timestamp > timestamp) .unwrap_or(self.records.len()); for (_, record) in self.records.drain(0..n) { // remove first n records log::info!("{}: {}: Purged: {}", self.name, record.id, record.program.name()); } } // Crop the beginning of a record to be overwritten. // // REMARKS // ------- // The mtime and ctime of a file that corresponds to the cropped record exposed onto a // timeshift-fs are not changed. That may cause issues in other applications. fn crop_record_to_be_overwritten(&mut self) { assert!(!self.points.is_empty()); let start = self.points[0].clone(); // Checking the first record is enough because old records have already been purged in // purge_expired_records(). if let Some((_, record)) = self.records.first_mut() { if record.start.timestamp < start.timestamp { record.start = start; log::info!("{}: {}: Cropped: {}", self.name, record.id, record.program.name()); } } } fn append_point(&mut self, point: &TimeshiftPoint) { let index = point.pos / (self.config().chunk_size as u64); assert!(point.pos % (self.config().chunk_size as u64) == 0); log::debug!("{}: Chunk#{}: Timestamp: {}", self.name, index, point.timestamp); self.points.push(point.clone()); assert!(self.points.len() <= self.config().max_chunks()); } fn handle_event_start( &mut self, quad: EventQuad, event: EitEvent, point: TimeshiftPoint, ) { // Multiple records for the same TV program may be created when the timeshift recording // restarts. Therefore, we use the recording start time instead of the start time in // the EPG data. let id = TimeshiftRecordId::from(point.timestamp.timestamp()); let mut program = EpgProgram::new(quad); program.update(&event); log::info!("{}: {}: Started: {}: {}", self.name, id, point, program.name()); self.records.insert(id, TimeshiftRecord::new(id, program, point)); } fn handle_event_update( &mut self, quad: EventQuad, event: EitEvent, point: TimeshiftPoint, ) { let mut program = EpgProgram::new(quad); program.update(&event); self.update_last_record(program, point, false); } fn handle_event_end( &mut self, quad: EventQuad, event: EitEvent, point: TimeshiftPoint, ) { let mut program = EpgProgram::new(quad); program.update(&event); self.update_last_record(program, point, true); } fn update_last_record( &mut self, program: EpgProgram, point: TimeshiftPoint, end: bool, ) { match self.records.values_mut().last() { Some(record) => { record.update(program, point, end); if end { log::debug!("{}: {}: Ended: {}: {}", self.name, record.id, record.end, record.program.name()); } else { log::debug!("{}: {}: Updated: {}: {}", self.name, record.id, record.end, record.program.name()); } } None => { log::warn!("{}: No record to update", self.name); } } } fn get_model(&self) -> TimeshiftRecorderModel { let now = Jst::now(); let start_time = if let Some(point) = self.points.iter().next() { point.timestamp.clone() } else { now.clone() }; let end_time = if let Some(point) = self.points.iter().last() { point.timestamp.clone() } else { now.clone() }; let (pipeline, recording) = match self.session { Some(ref session) => (session.pipeline.get_model(), true), _ => (vec![], false), }; TimeshiftRecorderModel { index: self.index, name: self.name.clone(), service: self.service.clone(), start_time, end_time, pipeline, recording, } } async fn activate( activation: TimeshiftActivation, ) -> Result<TimeshiftActivationResult, Error> { let config = &activation.config.timeshift.recorders[&activation.name]; let channel = &activation.service.channel; let user = TunerUser { info: TunerUserInfo::Recorder { name: format!("timeshift({})", activation.name), }, priority: config.priority.into(), }; let stream = activation.tuner_manager.send(StartStreamingMessage { channel: channel.clone(), user, }).await??; // stop_trigger must be created here in order to stop streaming when an error occurs. let stop_trigger = TunerStreamStopTrigger::new( stream.id(), activation.tuner_manager.clone().recipient()); let data = mustache::MapBuilder::new() .insert_str("channel_name", &channel.name) .insert("channel_type", &channel.channel_type)? .insert_str("channel", &channel.channel) .insert("sid", &activation.service.sid)? .build(); let mut builder = FilterPipelineBuilder::new(data); // NOTE // ---- // We always decode stream before recording in order to make it easy to support seeking. // It's impossible to decode stream started from any position in the record. Only streams // starting with PAT packets can be decoded. This means that we need to seek a PAT // packet before streaming and we cannot start streaming from a specific position that // is specified by the media player using a HTTP Range header. if !stream.is_decoded() { builder.add_decode_filter(&activation.config.filters.decode_filter)?; } let (mut cmds, _) = builder.build(); let data = mustache::MapBuilder::new() .insert("sid", &activation.service.sid)? .insert_str("file", &config.ts_file) .insert("chunk_size", &config.chunk_size)? .insert("num_chunks", &config.num_chunks)? .insert("start_pos", &activation.start_pos)? .build(); let template = mustache::compile_str(&activation.config.timeshift.command)?; cmds.push(template.render_data_to_string(&data)?); let mut pipeline = spawn_pipeline(cmds, stream.id())?; let (input, output) = pipeline.take_endpoints()?; actix::spawn(async move { let _ = stream.pipe(input).await; }); let session = TimeshiftRecorderSession { pipeline, _stop_trigger: stop_trigger, }; Ok(TimeshiftActivationResult { session, output }) } } impl Actor for TimeshiftRecorder { type Context = actix::Context<Self>; fn started(&mut self, _ctx: &mut Self::Context) { log::debug!("{}: Started", self.name); self.load_data(); } fn stopped(&mut self, _ctx: &mut Self::Context) { self.deactivate(); log::debug!("{}: Stopped", self.name); } } #[derive(Deserialize)] pub struct TimeshiftRecorderData { pub service: EpgService, pub chunk_size: usize, pub max_chunks: usize, pub records: IndexMap<TimeshiftRecordId, TimeshiftRecord>, pub points: Vec<TimeshiftPoint>, } #[derive(Serialize)] struct TimeshiftRecorderDataForSave<'a> { service: &'a EpgService, chunk_size: usize, max_chunks: usize, records: &'a IndexMap<TimeshiftRecordId, TimeshiftRecord>, points: &'a Vec<TimeshiftPoint>, } #[derive(Message)] #[rtype(result = "()")] struct NotifyServiceUpdatedMessage { service: EpgService, } impl Handler<NotifyServiceUpdatedMessage> for TimeshiftRecorder { type Result = (); fn handle( &mut self, msg: NotifyServiceUpdatedMessage, _ctx: &mut Self::Context, ) -> Self::Result { self.service = msg.service; } } #[derive(Message)] #[rtype(result = "()")] struct ActivateTimeshiftRecorderMessage { service: EpgService, tuner_manager: Addr<TunerManager>, } impl Handler<ActivateTimeshiftRecorderMessage> for TimeshiftRecorder { type Result = (); fn handle( &mut self, msg: ActivateTimeshiftRecorderMessage, ctx: &mut Self::Context, ) -> Self::Result { self.service = msg.service; if self.session.is_none() { log::info!("{}: Start activation", self.name); let activation = TimeshiftActivation { config: self.config.clone(), name: self.name.clone(), service: self.service.clone(), start_pos: self.points.last().map_or(0, |point| point.pos), tuner_manager: msg.tuner_manager.clone(), }; Self::activate(activation) .into_actor(self) .map(|result, this, ctx| { match result { Ok(result) => { log::debug!("{}: Activation finished successfully", this.name); this.session = Some(result.session); let reader = BufReader::new(result.output); Self::add_stream(LinesStream::new(reader.lines()), ctx); } Err(err) => { log::error!("{}: Activation failed: {}", this.name, err); } } }) .wait(ctx); // blocks until the activation finished } else { log::info!("{}: Already activated", self.name); } } } #[derive(Message)] #[rtype(result = "()")] struct DeactivateTimeshiftRecorderMessage; impl Handler<DeactivateTimeshiftRecorderMessage> for TimeshiftRecorder { type Result = (); fn handle( &mut self, _msg: DeactivateTimeshiftRecorderMessage, _ctx: &mut Self::Context, ) -> Self::Result { self.deactivate(); } } impl Handler<QueryTimeshiftRecorderMessage> for TimeshiftRecorder { type Result = MessageResult<QueryTimeshiftRecorderMessage>; fn handle( &mut self, _msg: QueryTimeshiftRecorderMessage, _ctx: &mut Self::Context, ) -> Self::Result { MessageResult(Ok(self.get_model())) } } impl Handler<QueryTimeshiftRecordsMessage> for TimeshiftRecorder { type Result = MessageResult<QueryTimeshiftRecordsMessage>; fn handle( &mut self, _msg: QueryTimeshiftRecordsMessage, _ctx: &mut Self::Context, ) -> Self::Result { let records: Vec<TimeshiftRecordModel> = self.records .values() .map(|record| record.get_model(self.config())) .collect(); MessageResult(Ok(records)) } } impl Handler<QueryTimeshiftRecordMessage> for TimeshiftRecorder { type Result = MessageResult<QueryTimeshiftRecordMessage>; fn handle( &mut self, msg: QueryTimeshiftRecordMessage, _: &mut Self::Context, ) -> Self::Result { let result = self.records .get(&msg.record_id) .map(|record| record.get_model(self.config())) .ok_or(Error::RecordNotFound); MessageResult(result) } } impl Handler<CreateTimeshiftLiveStreamSourceMessage> for TimeshiftRecorder { type Result = MessageResult<CreateTimeshiftLiveStreamSourceMessage>; fn handle( &mut self, msg: CreateTimeshiftLiveStreamSourceMessage, _ctx: &mut Self::Context, ) -> Self::Result { MessageResult(self.create_live_stream_source(msg.record_id)) } } impl Handler<CreateTimeshiftRecordStreamSourceMessage> for TimeshiftRecorder { type Result = MessageResult<CreateTimeshiftRecordStreamSourceMessage>; fn handle( &mut self, msg: CreateTimeshiftRecordStreamSourceMessage, _ctx: &mut Self::Context, ) -> Self::Result { MessageResult(self.create_record_stream_source(msg.record_id, msg.start_pos)) } } #[derive(Message)] #[rtype(result = "()")] pub struct NotifyTimeshiftRecordingPipelineBrokenMessage; impl Handler<NotifyTimeshiftRecordingPipelineBrokenMessage> for TimeshiftRecorder { type Result = (); fn handle( &mut self, _msg: NotifyTimeshiftRecordingPipelineBrokenMessage, _ctx: &mut Self::Context, ) -> Self::Result { self.deactivate(); // TODO: re-activate the recoder } } impl StreamHandler<io::Result<String>> for TimeshiftRecorder { fn handle(&mut self, line: io::Result<String>, _ctx: &mut actix::Context<Self>) { let json = match line { Ok(json) => json, Err(err) => { log::error!("{}: Failed reading output from the command pipeline: {}", self.name, err); return; } }; let msg = match serde_json::from_str::<TimeshiftRecorderMessage>(&json) { Ok(msg) => msg, Err(err) => { log::error!("{}: Failed parsing a JSON message: {}", self.name, err); return; } }; match msg { TimeshiftRecorderMessage::Start => { self.handle_start_recording(); } TimeshiftRecorderMessage::Stop(msg) => { self.handle_stop_recording(msg.reset); } TimeshiftRecorderMessage::Chunk(msg) => { self.handle_chunk(msg.chunk); } TimeshiftRecorderMessage::EventStart(msg) => { let quad = EventQuad::new( msg.original_network_id, msg.transport_stream_id, msg.service_id, msg.event.event_id); self.handle_event_start(quad, msg.event, msg.record); } TimeshiftRecorderMessage::EventUpdate(msg) => { let quad = EventQuad::new( msg.original_network_id, msg.transport_stream_id, msg.service_id, msg.event.event_id); self.handle_event_update(quad, msg.event, msg.record); } TimeshiftRecorderMessage::EventEnd(msg) => { let quad = EventQuad::new( msg.original_network_id, msg.transport_stream_id, msg.service_id, msg.event.event_id); self.handle_event_end(quad, msg.event, msg.record); } } } fn finished(&mut self, _ctx: &mut actix::Context<Self>) { log::info!("{}: Recoding pipeline broken, deactivate", self.name); self.deactivate(); } } #[derive(Deserialize)] #[serde(rename_all = "kebab-case")] #[serde(tag = "type", content = "data")] enum TimeshiftRecorderMessage { Start, Stop(TimeshiftRecorderStopMessage), Chunk(TimeshiftRecorderChunkMessage), EventStart(TimeshiftRecorderEventMessage), EventUpdate(TimeshiftRecorderEventMessage), EventEnd(TimeshiftRecorderEventMessage), } #[derive(Deserialize)] #[serde(rename_all = "camelCase")] struct TimeshiftRecorderStartMessage; #[derive(Deserialize)] #[serde(rename_all = "camelCase")] struct TimeshiftRecorderStopMessage { reset: bool, } #[derive(Deserialize)] #[serde(rename_all = "camelCase")] struct TimeshiftRecorderChunkMessage { chunk: TimeshiftPoint, } #[derive(Deserialize)] #[serde(rename_all = "camelCase")] struct TimeshiftRecorderEventMessage { original_network_id: NetworkId, transport_stream_id: TransportStreamId, service_id: ServiceId, event: EitEvent, record: TimeshiftPoint, } #[derive(Clone)] #[derive(Deserialize, Serialize)] pub struct TimeshiftPoint { #[serde(with = "serde_jst")] pub timestamp: DateTime<Jst>, pub pos: u64, } impl fmt::Display for TimeshiftPoint { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}@{}", self.timestamp, self.pos) } } struct TimeshiftRecorderSession { pipeline: CommandPipeline<TunerSubscriptionId>, _stop_trigger: TunerStreamStopTrigger, } struct TimeshiftActivation { config: Arc<Config>, name: String, service: EpgService, start_pos: u64, tuner_manager: Addr<TunerManager>, } struct TimeshiftActivationResult { session: TimeshiftRecorderSession, output: CommandPipelineOutput<TunerSubscriptionId>, } #[derive(Clone)] #[derive(Deserialize, Serialize)] pub struct TimeshiftRecord { pub id: TimeshiftRecordId, pub program: EpgProgram, pub start: TimeshiftPoint, pub end: TimeshiftPoint, #[serde(skip)] pub recording: bool, } impl TimeshiftRecord { fn new(id: TimeshiftRecordId, program: EpgProgram, point: TimeshiftPoint) -> Self { TimeshiftRecord { id, program, start: point.clone(), end: point.clone(), recording: true, } } fn update(&mut self, program: EpgProgram, point: TimeshiftPoint, end: bool) { self.program = program; self.end = point; if end { self.recording = false; } } pub fn create_record_stream_source( &self, recorder_name: String, config: &TimeshiftRecorderConfig, start_pos: Option<u64>, ) -> Result<TimeshiftRecordStreamSource, Error> { let file = config.ts_file.clone(); let file_size = config.max_file_size(); let id = self.id; let size = self.get_size(file_size); let (start, range) = if let Some(pos) = start_pos { ((self.start.pos + pos) % file_size, self.make_range(pos, size)?) } else { (self.start.pos, self.make_range(0, size)?) }; Ok(TimeshiftRecordStreamSource { recorder_name, file, id, start, range }) } fn get_model(&self, config: &TimeshiftRecorderConfig) -> TimeshiftRecordModel { TimeshiftRecordModel { id: self.id, program: self.program.clone(), start_time: self.start.timestamp.clone(), end_time: self.end.timestamp.clone(), size: self.get_size(config.max_file_size()), recording: self.recording, } } pub fn get_size(&self, file_size: u64) -> u64 { if self.end.pos < self.start.pos { file_size - self.start.pos + self.end.pos } else { self.end.pos - self.start.pos } } fn make_range(&self, first: u64, size: u64) -> Result<MpegTsStreamRange, Error> { if self.recording { MpegTsStreamRange::unbound(first, size) } else { MpegTsStreamRange::bound(first, size) } } } // 32 KiB, large enough for 10 ms buffering. const CHUNK_SIZE: usize = 4096 * 8; pub struct TimeshiftLiveStreamSource { name: String, file: String, point: TimeshiftPoint, } impl TimeshiftLiveStreamSource { pub async fn create_stream( self ) -> Result<(TimeshiftLiveStream, TimeshiftStreamStopTrigger), Error> { log::debug!("{}: Start live streaming from {}", self.name, self.point); let (mut reader, stop_trigger) = TimeshiftFileReader::open(&self.file) .await? .with_stop_trigger(); reader.set_position(self.point.pos).await?; let stream = ChunkStream::new(reader, CHUNK_SIZE); let id = format!("timeshift({})", self.name); Ok((MpegTsStream::new(id, stream).decoded(), stop_trigger)) } #[cfg(test)] pub fn new_for_test(name: &str) -> Self { TimeshiftLiveStreamSource { name: name.to_string(), file: "/dev/zero".to_string(), point: TimeshiftPoint { timestamp: Jst::now(), pos: 0, }, } } } pub struct TimeshiftRecordStreamSource { recorder_name: String, file: String, id: TimeshiftRecordId, start: u64, range: MpegTsStreamRange, } impl TimeshiftRecordStreamSource { pub async fn create_stream( self, accept_range: bool, ) -> Result<(TimeshiftRecordStream, TimeshiftStreamStopTrigger), Error> { log::debug!("{}: Start streaming {} bytes of {} from {}", self.recorder_name, self.range.bytes(), self.id, self.start); let (mut reader, stop_trigger) = TimeshiftFileReader::open(&self.file) .await? .with_stop_trigger(); reader.set_position(self.start).await?; let stream = ChunkStream::new(reader.take(self.range.bytes()), CHUNK_SIZE); let id = format!("timeshift({})/{}", self.recorder_name, self.id); if accept_range { Ok((MpegTsStream::with_range(id, stream, self.range).decoded(), stop_trigger)) } else { Ok((MpegTsStream::new(id, stream).decoded(), stop_trigger)) } } #[cfg(test)] pub fn new_for_test(recorder_name: &str) -> Self { TimeshiftRecordStreamSource { recorder_name: recorder_name.to_string(), file: "/dev/zero".to_string(), id: 1u32.into(), start: 0, range: MpegTsStreamRange::bound(0, 1).unwrap(), } } pub async fn read(&self, size: u32) -> Result<Vec<u8>, Error> { let mut reader = TimeshiftFileReader::open(&self.file).await?; reader.set_position(self.start).await?; let size = if (size as u64) < self.range.bytes() { size as usize } else { self.range.bytes() as usize }; let mut data = Vec::with_capacity(size); let _ = reader.take(size as u64).read_to_end(&mut data).await?; Ok(data) } } pub struct TimeshiftFileReader { state: TimeshiftFileReaderState, path: String, file: File, stop_signal: Option<oneshot::Receiver<()>>, } enum TimeshiftFileReaderState { Read, Seek, Wait, } impl TimeshiftFileReader { pub async fn open(path: &str) -> Result<Self, Error> { let reader = TimeshiftFileReader { state: TimeshiftFileReaderState::Read, path: path.to_string(), file: File::open(path).await?, stop_signal: None, }; Ok(reader) } fn with_stop_trigger( mut self ) -> (Self, TimeshiftStreamStopTrigger) { let (tx, rx) = oneshot::channel(); let stop_trigger = TimeshiftStreamStopTrigger(Some(tx)); self.stop_signal = Some(rx); (self, stop_trigger) } async fn set_position(&mut self, pos: u64) -> Result<(), Error> { let _ = self.file.seek(SeekFrom::Start(pos)).await; Ok(()) } } impl AsyncRead for TimeshiftFileReader { fn poll_read( mut self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut ReadBuf, ) -> Poll<io::Result<()>> { loop { if let Some(ref mut stop_signal) = self.stop_signal { if Pin::new(stop_signal).poll(cx).is_ready() { log::debug!("{}: Stopped reading", self.path); return Poll::Ready(Ok(())); } } match self.state { TimeshiftFileReaderState::Read => { let len = buf.filled().len(); match Pin::new(&mut self.file).poll_read(cx, buf) { Poll::Ready(Ok(_)) if buf.filled().len() == len => { self.state = TimeshiftFileReaderState::Seek; log::debug!("{}: EOF reached", self.path); } poll => { return poll; } } } TimeshiftFileReaderState::Seek => { match Pin::new(&mut self.file).start_seek(SeekFrom::Start(0)) { Ok(_) => { self.state = TimeshiftFileReaderState::Wait; log::debug!("{}: Seek to the beginning", self.path); } Err(err) => { return Poll::Ready(Err(err)); } } } TimeshiftFileReaderState::Wait => { match Pin::new(&mut self.file).poll_complete(cx) { Poll::Ready(Ok(pos)) => { assert!(pos == 0); self.state = TimeshiftFileReaderState::Read; log::debug!("{}: The seek completed, restart streaming", self.path); } Poll::Ready(Err(err)) => { return Poll::Ready(Err(err)); } Poll::Pending => { return Poll::Pending; } } } } } } } pub struct TimeshiftStreamStopTrigger(Option<oneshot::Sender<()>>); impl Drop for TimeshiftStreamStopTrigger { fn drop(&mut self) { let _ = self.0.take().unwrap().send(()); } } pub struct TimeshiftRecorderModel { pub index: usize, pub name: String, pub service: EpgService, pub start_time: DateTime<Jst>, pub end_time: DateTime<Jst>, pub pipeline: Vec<CommandPipelineProcessModel>, pub recording: bool, } pub struct TimeshiftRecordModel { pub id: TimeshiftRecordId, pub program: EpgProgram, pub start_time: DateTime<Jst>, pub end_time: DateTime<Jst>, pub size: u64, pub recording: bool, } #[cfg(test)] mod tests { use super::*; use chrono::TimeZone; use crate::datetime_ext::Jst; #[test] fn test_timeshift_record_purge_expired_records() { let mut recorder = TimeshiftRecorder { index: 0, name: "record".to_string(), config: create_config(), service: create_epg_service(), records: indexmap::indexmap!{ 1u32.into() => TimeshiftRecord { id: 1u32.into(), program: EpgProgram::new((0, 0, 0, 1).into()), start: TimeshiftPoint { timestamp: Jst.ymd(2021, 1, 1).and_hms(0, 0, 0), pos: 0, }, end: TimeshiftPoint { timestamp: Jst.ymd(2021, 1, 1).and_hms(0, 0, 0), pos: 0, }, recording: false, }, }, points: vec![ TimeshiftPoint { timestamp: Jst.ymd(2021, 1, 1).and_hms(0, 1, 0), pos: 0, }, ], session: None, }; recorder.purge_expired_records(); assert!(recorder.records.is_empty()); let mut recorder = TimeshiftRecorder { index: 0, name: "recorder".to_string(), config: create_config(), service: create_epg_service(), records: indexmap::indexmap!{ 1u32.into() => TimeshiftRecord { id: 1u32.into(), program: EpgProgram::new((0, 0, 0, 1).into()), start: TimeshiftPoint { timestamp: Jst.ymd(2021, 1, 1).and_hms(0, 0, 0), pos: 0, }, end: TimeshiftPoint { timestamp: Jst.ymd(2021, 1, 1).and_hms(0, 0, 0), pos: 0, }, recording: false, }, 2u32.into() => TimeshiftRecord { id: 2u32.into(), program: EpgProgram::new((0, 0, 0, 2).into()), start: TimeshiftPoint { timestamp: Jst.ymd(2021, 1, 1).and_hms(0, 0, 0), pos: 0, }, end: TimeshiftPoint { timestamp: Jst.ymd(2021, 1, 1).and_hms(0, 1, 0), pos: 0, }, recording: false, }, 3u32.into() => TimeshiftRecord { id: 3u32.into(), program: EpgProgram::new((0, 0, 0, 3).into()), start: TimeshiftPoint { timestamp: Jst.ymd(2021, 1, 1).and_hms(0, 0, 0), pos: 0, }, end: TimeshiftPoint { timestamp: Jst.ymd(2021, 1, 1).and_hms(0, 2, 0), pos: 0, }, recording: false, }, }, points: vec![ TimeshiftPoint { timestamp: Jst.ymd(2021, 1, 1).and_hms(0, 1, 0), pos: 0, }, ], session: None, }; recorder.purge_expired_records(); assert_eq!(recorder.records.len(), 1); assert_eq!(recorder.records[0].program.quad, (0, 0, 0, 3).into()); } fn create_config() -> Arc<Config> { Default::default() } fn create_epg_service() -> EpgService { EpgService { nid: 1.into(), tsid: 2.into(), sid: 3.into(), service_type: 1, logo_id: 0, remote_control_key_id: 0, name: "Service".to_string(), channel: EpgChannel { name: "ch".to_string(), channel_type: ChannelType::GR, channel: "ch".to_string(), extra_args: "".to_string(), services: vec![], excluded_services: vec![], } } } }
use declarative_dataflow::scheduling::{AsScheduler, RealtimeScheduler, SchedulingEvent}; use std::time::Duration; #[test] fn test_schedule_now() { let mut scheduler = RealtimeScheduler::new(); assert!(!scheduler.has_pending()); assert!(scheduler.until_next().is_none()); scheduler.event_after(Duration::from_secs(0), SchedulingEvent::Tick); assert!(scheduler.has_pending()); assert_eq!( scheduler.next().unwrap().schedule(), Some(SchedulingEvent::Tick) ); } #[test] fn test_schedule_after() { let mut scheduler = RealtimeScheduler::new(); scheduler.event_after(Duration::from_secs(2), SchedulingEvent::Tick); assert!(!scheduler.has_pending()); assert!(scheduler.next().is_none()); assert!(scheduler.until_next().is_some()); std::thread::sleep(scheduler.until_next().unwrap()); assert!(scheduler.has_pending()); assert_eq!( scheduler.next().unwrap().schedule(), Some(SchedulingEvent::Tick) ); assert!(scheduler.until_next().is_none()); }
use super::generator::Generator; use super::Ctx; pub enum FractalType { Mandelbrot(f32), Julia, } impl FractalType { pub fn as_f32(&self) -> f32 { match self { Self::Mandelbrot(v) => *v, Self::Julia => 3.0, } } } pub struct Renderer { pub generator: Generator, pub context: Ctx, pub precision: i32, pub zoom: f32, pub x_offset: f32, pub y_offset: f32, pub color_type: i32, pub start_time: std::time::Instant, pub automate: bool, pub fractal_type: FractalType, pub n: i32, } impl Renderer { pub fn new(context: Ctx) -> Self { Self { generator: Generator::new(), context, precision: 50, zoom: 1.0, x_offset: 0.0, y_offset: 0.0, color_type: 1, start_time: std::time::Instant::now(), automate: true, fractal_type: FractalType::Mandelbrot(1.0), n: 3, } } pub fn draw(&mut self) { let time = self.start_time.elapsed().as_secs_f32(); unsafe { let generator = &self.generator; generator.shader.useProgram(); generator.shader.setInt("maxIter", self.precision); generator.shader.setFloat("zoom", self.zoom); generator.shader.setFloat("xOffset", self.x_offset); generator.shader.setFloat("yOffset", self.y_offset); generator.shader.setInt("colorType", self.color_type); generator.shader.setInt("n", self.n); generator .shader .setFloat("algType", self.fractal_type.as_f32()); if self.automate { generator.shader.setFloat("time", time); } else { generator.shader.setFloat("time", 1.0); } gl::BindVertexArray(generator.VAO); gl::DrawArrays(gl::TRIANGLES, 0, generator.num_vertices); gl::BindVertexArray(0); } self.context.swap_buffers().expect("swap buffers"); } pub fn next_fractal_type(&mut self) { self.fractal_type = match self.fractal_type { FractalType::Julia => FractalType::Mandelbrot(1.0), FractalType::Mandelbrot(val) => match val as i32 { 1 => FractalType::Mandelbrot(2.0), 2 => FractalType::Julia, _ => FractalType::Mandelbrot(1.0), }, } } pub fn change_n(&mut self, inc: i32) { self.n += inc; if self.n < 3 { self.n = 3; } } pub fn switch_automation(&mut self) { self.automate = !self.automate; } pub fn next_color(&mut self) { if self.color_type == 6 { self.color_type = 1; } else { self.color_type += 1; } } pub fn augment_zoom(&mut self) { self.zoom += self.zoom; } pub fn diminish_zoom(&mut self) { if self.zoom > 1.0 { self.zoom -= self.zoom / 3.0; } } pub fn move_left(&mut self) { self.x_offset -= self.zoom / (self.zoom * self.zoom); } pub fn move_right(&mut self) { self.x_offset += self.zoom / (self.zoom * self.zoom); } pub fn move_up(&mut self) { self.y_offset += self.zoom / (self.zoom * self.zoom); } pub fn move_down(&mut self) { self.y_offset -= self.zoom / (self.zoom * self.zoom); } pub fn diminish_precision(&mut self) { if self.precision > 20 { self.precision -= 10; } } pub fn augment_precision(&mut self) { if self.precision < 5000 { self.precision += 10; } } }
extern crate ramp; use rand; pub use self::ramp::Int; use extra_ops::{ModPow, RandInt, ToStrRadix}; impl ModPow for Int { fn mod_pow(&self, exponent: &Self, modulus: &Self) -> Self { self.pow_mod(exponent, modulus) } } impl RandInt for Int { fn get_rand_below(max: &Self) -> Self { use self::ramp::RandomInt; rand::thread_rng().gen_uint_below(max) } } impl ToStrRadix for Int { fn to_str(&self, radix: u8) -> String { self.to_str_radix(radix, false) } }
use std::time::Duration; use source::Empty; use source::Source; use source::Zero; use Sample; #[derive(Debug)] enum MusicPlayerCommand { Play, Pause, Stop, NextTrack, } pub struct SourcesQueueController<S> { command_channel: std::sync::mpsc::Sender<MusicPlayerCommand>, sound_channel: std::sync::mpsc::Sender<Box<dyn Source<Item = S> + Send>>, } impl<S> SourcesQueueController<S> where S: Sample + Send + 'static, { /// Adds a new source to the end of the queue. #[inline] pub fn append<T>(&self, source: T) where T: Source<Item = S> + Send + 'static, { let _ = self.sound_channel.send(Box::new(source) as Box<_>); } pub fn pause(&self) { let _ = self.command_channel.send(MusicPlayerCommand::Pause); } pub fn play(&self) { let _ = self.command_channel.send(MusicPlayerCommand::Play); } pub fn next(&self) { let _ = self.command_channel.send(MusicPlayerCommand::NextTrack); } pub fn stop(&self) { let _ = self.command_channel.send(MusicPlayerCommand::Stop); } } pub fn queue2<S>(keep_alive_if_empty: bool) -> (SourcesQueueController<S>, SourcesQueue<S>) where S: Sample + Send + 'static, { let (cmd_tx, cmd_rx) = std::sync::mpsc::channel::<MusicPlayerCommand>(); let (source_tx, source_rx) = std::sync::mpsc::channel::<Box<dyn Source<Item = S> + Send>>(); let output = SourcesQueue { sound_queue: Vec::new(), current: Box::new(Empty::<S>::new()) as Box<_>, keep_alive_if_empty, command_channel: cmd_rx, sound_channel: source_rx, paused: false, }; let input = SourcesQueueController { command_channel: cmd_tx, sound_channel: source_tx, }; (input, output) } /// The input of the queue. pub struct SourcesQueue<S> { sound_queue: Vec<Box<dyn Source<Item = S> + Send>>, current: Box<dyn Source<Item = S> + Send>, keep_alive_if_empty: bool, command_channel: std::sync::mpsc::Receiver<MusicPlayerCommand>, sound_channel: std::sync::mpsc::Receiver<Box<dyn Source<Item = S> + Send>>, paused: bool, } impl<S> Source for SourcesQueue<S> where S: Sample + Send + 'static, { #[inline] fn current_frame_len(&self) -> Option<usize> { // This function is non-trivial because the boundary between two sounds in the queue should // be a frame boundary as well. // // The current sound is free to return `None` for `current_frame_len()`, in which case // we *should* return the number of samples remaining the current sound. // This can be estimated with `size_hint()`. // // If the `size_hint` is `None` as well, we are in the worst case scenario. To handle this // situation we force a frame to have a maximum number of samples indicate by this // constant. const THRESHOLD: usize = 512; // Try the current `current_frame_len`. if let Some(val) = self.current.current_frame_len() { if val != 0 { return Some(val); } } // Try the size hint. if let Some(val) = self.current.size_hint().1 { if val < THRESHOLD && val != 0 { return Some(val); } } // Otherwise we use the constant value. Some(THRESHOLD) } #[inline] fn channels(&self) -> u16 { self.current.channels() } #[inline] fn sample_rate(&self) -> u32 { self.current.sample_rate() } #[inline] fn total_duration(&self) -> Option<Duration> { None } } impl<S> Iterator for SourcesQueue<S> where S: Sample + Send + 'static, { type Item = S; #[inline] fn next(&mut self) -> Option<S> { loop { // Read command channel. self.read_command_channel(); // Read input channel. self.read_sound_channel(); if self.paused { return Some(S::zero_value()); } // Basic situation that will happen most of the time. if let Some(sample) = self.current.next() { return Some(sample); } // Since `self.current` has finished, we need to pick the next sound. // In order to avoid inlining this expensive operation, the code is in another function. if self.go_next().is_err() { return None; } } } #[inline] fn size_hint(&self) -> (usize, Option<usize>) { (self.current.size_hint().0, None) } } impl<S> SourcesQueue<S> where S: Sample + Send + 'static, { fn read_command_channel(&mut self) { // Read one command per sample. match self.command_channel.try_recv() { Ok(command) => self.handle_command(command), Err(_) => (), } } fn handle_command(&mut self, command: MusicPlayerCommand) { println!("Got command! {:?}", command); match command { MusicPlayerCommand::Play => { self.paused = false; } MusicPlayerCommand::Pause => { self.paused = true; } MusicPlayerCommand::NextTrack => { let _ = self.go_next(); } MusicPlayerCommand::Stop => { self.sound_queue.clear(); let _ = self.go_next(); } }; } fn read_sound_channel(&mut self) { match self.sound_channel.try_recv() { Ok(source) => self.sound_queue.push(source), Err(_) => (), } } // Called when `current` is empty and we must jump to the next element. // Returns `Ok` if the sound should continue playing, or an error if it should stop. // // This method is separate so that it is not inlined. fn go_next(&mut self) -> Result<(), ()> { let next = { if self.sound_queue.len() == 0 { if self.keep_alive_if_empty { // Play a short silence in order to avoid spinlocking. let silence = Zero::<S>::new(1, 44100); // TODO: meh Box::new(silence.take_duration(Duration::from_millis(10))) as Box<_> } else { return Err(()); } } else { self.sound_queue.remove(0) } }; self.current = next; Ok(()) } } #[cfg(test)] mod tests { use buffer::SamplesBuffer; use queue2; use source::Source; #[test] #[ignore] // FIXME: samples rate and channel not updated immediately after transition fn basic() { let (tx, mut rx) = queue2::queue2(false); tx.append(SamplesBuffer::new(1, 48000, vec![10i16, -10, 10, -10])); tx.append(SamplesBuffer::new(2, 96000, vec![5i16, 5, 5, 5])); assert_eq!(rx.channels(), 1); assert_eq!(rx.sample_rate(), 48000); assert_eq!(rx.next(), Some(10)); assert_eq!(rx.next(), Some(-10)); assert_eq!(rx.next(), Some(10)); assert_eq!(rx.next(), Some(-10)); assert_eq!(rx.channels(), 2); assert_eq!(rx.sample_rate(), 96000); assert_eq!(rx.next(), Some(5)); assert_eq!(rx.next(), Some(5)); assert_eq!(rx.next(), Some(5)); assert_eq!(rx.next(), Some(5)); assert_eq!(rx.next(), None); } #[test] fn immediate_end() { let (_, mut rx) = queue2::queue2::<i16>(false); assert_eq!(rx.next(), None); } #[test] fn keep_alive() { let (tx, mut rx) = queue2::queue2(true); tx.append(SamplesBuffer::new(1, 48000, vec![10i16, -10, 10, -10])); assert_eq!(rx.next(), Some(10)); assert_eq!(rx.next(), Some(-10)); assert_eq!(rx.next(), Some(10)); assert_eq!(rx.next(), Some(-10)); for _ in 0..100000 { assert_eq!(rx.next(), Some(0)); } } #[test] #[ignore] // TODO: not yet implemented fn no_delay_when_added() { let (tx, mut rx) = queue2::queue2(true); for _ in 0..500 { assert_eq!(rx.next(), Some(0)); } tx.append(SamplesBuffer::new(1, 48000, vec![10i16, -10, 10, -10])); assert_eq!(rx.next(), Some(10)); assert_eq!(rx.next(), Some(-10)); assert_eq!(rx.next(), Some(10)); assert_eq!(rx.next(), Some(-10)); } }
#![feature(plugin)] #![feature(test)] #![plugin(deuterium_plugin)] #[allow(plugin_as_library)] #[macro_use] extern crate deuterium_plugin; #[macro_use] extern crate deuterium_orm; extern crate time; extern crate deuterium; extern crate byteorder; extern crate num; #[macro_use] extern crate enum_primitive; extern crate postgres; extern crate r2d2; extern crate r2d2_postgres; extern crate test; use std::env; use deuterium::*; use deuterium_orm::*; use time::Timespec; use postgres::Connection; macro_rules! assert_sql { ($query:expr, $s:expr) => ( assert_eq!(&$query.to_final_sql(), $s) ) } enum_from_primitive! { #[derive(Clone, Debug, PartialEq)] pub enum Side { DarkSide, LightSide, } } deuterium_enum!(Side); deuterium_model! jedi { #[primary_key(id)] #[before_create(created_at)] #[before_save(updated_at)] pub struct Jedi { id: i32, name: String, force_level: i32, side: Side, created_at: Timespec, updated_at: Timespec } } impl Jedi { pub fn ordered() -> SelectQuery<(), LimitMany, Jedi> { Jedi::table().select_all().order_by(&Jedi::created_at_f()) } } fn created_at(token: &mut Jedi) { token.set_created_at(::time::get_time()); } fn updated_at(token: &mut Jedi) { token.set_updated_at(::time::get_time()); } fn setup_tables(cn: &Connection) { cn.batch_execute(r#" DROP TABLE IF EXISTS jedi CASCADE; CREATE TABLE jedi ( id serial PRIMARY KEY, name varchar(40) NOT NULL, force_level integer NOT NULL, side SMALLINT NOT NULL, created_at timestamptz DEFAULT CURRENT_TIMESTAMP NOT NULL, updated_at timestamptz DEFAULT CURRENT_TIMESTAMP NOT NULL ); INSERT INTO jedi (name, force_level, side) VALUES ('Luke Skywalker', 100, 1), ('Mace Windu', 90, 1), ('Obi-Wan Kenoby', 99, 1), ('Kit Fisto', 70, 1), ('Count Dooku', 99, 0), ('Darth Maul', 70, 0), ('Anakin Skywalker', 100, 0); "#).unwrap(); } fn setup_pg() -> adapter::postgres::PostgresPool { let connection_uri = match env::var("POSTGRES_CONNECTION") { Ok(val) => val, Err(_) => "postgres://localhost/jedi".to_string() }; let manager = r2d2_postgres::PostgresConnectionManager::new(&connection_uri[..], ::postgres::SslMode::None).unwrap(); let config = r2d2::Config::builder() .pool_size(5) .build(); let handler = Box::new(r2d2::NoopErrorHandler); r2d2::Pool::new(config, manager, handler).unwrap() } #[test] fn select() { let pool = setup_pg(); let cn = pool.get().unwrap(); setup_tables(&*cn); assert_eq!((query_models!( &Jedi::ordered().where_(Jedi::side_f().is(Side::LightSide)), &*cn, &[] )).len(), 4); let anakin = (query_model!( &Jedi::ordered().where_(Jedi::name_f().is("Anakin Skywalker".to_string())).first(), &*cn, &[] )).unwrap(); assert_eq!(anakin.get_force_level(), &100); assert_eq!(anakin.get_side(), &Side::DarkSide); } #[test] fn insert() { let pool = setup_pg(); let cn = pool.get().unwrap(); setup_tables(&*cn); let mut jedi = Jedi::empty(); jedi.set_name("Pants Olmos".to_string()); jedi.set_force_level(10); jedi.set_side(Side::DarkSide); assert_eq!(exec_pg!(&jedi.create_query(), &*cn, &[]), 1); let olmos = (query_model!( &Jedi::table().select_all().where_(Jedi::name_f().is("Pants Olmos".to_string())).first(), &*cn, &[] )).unwrap(); assert_eq!(olmos.get_name(), &"Pants Olmos".to_string()); assert_eq!(olmos.get_force_level(), &10); assert_eq!(olmos.get_side(), &Side::DarkSide); } #[test] fn update() { let pool = setup_pg(); let cn = pool.get().unwrap(); setup_tables(&*cn); let mut anakin = (query_model!( &Jedi::table().select_all().where_(Jedi::name_f().is("Anakin Skywalker".to_string())).first(), &*cn, &[] )).unwrap(); assert_eq!(anakin.get_side(), &Side::DarkSide); anakin.set_side(Side::LightSide); assert_eq!(exec_pg!(&anakin.update_query(), &*cn, &[]), 1); } #[test] fn delete() { let pool = setup_pg(); let cn = pool.get().unwrap(); setup_tables(&*cn); let mut darth = (query_model!( &Jedi::table().select_all().where_(Jedi::name_f().is("Darth Maul".to_string())).first(), &*cn, &[] )).unwrap(); assert_eq!(exec_pg!(&darth.delete_query(), &*cn, &[]), 1); }
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authorization_UI"))] #[inline] pub unsafe fn DSCreateISecurityInfoObject<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::LPARAM>>( pwszobjectpath: Param0, pwszobjectclass: Param1, dwflags: u32, ppsi: *mut ::core::option::Option<super::Authorization::UI::ISecurityInformation>, pfnreadsd: ::core::option::Option<PFNREADOBJECTSECURITY>, pfnwritesd: ::core::option::Option<PFNWRITEOBJECTSECURITY>, lpcontext: Param6, ) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DSCreateISecurityInfoObject(pwszobjectpath: super::super::Foundation::PWSTR, pwszobjectclass: super::super::Foundation::PWSTR, dwflags: u32, ppsi: *mut ::windows::core::RawPtr, pfnreadsd: ::windows::core::RawPtr, pfnwritesd: ::windows::core::RawPtr, lpcontext: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT; } DSCreateISecurityInfoObject(pwszobjectpath.into_param().abi(), pwszobjectclass.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(ppsi), ::core::mem::transmute(pfnreadsd), ::core::mem::transmute(pfnwritesd), lpcontext.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authorization_UI"))] #[inline] pub unsafe fn DSCreateISecurityInfoObjectEx<'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>, Param9: ::windows::core::IntoParam<'a, super::super::Foundation::LPARAM>>( pwszobjectpath: Param0, pwszobjectclass: Param1, pwszserver: Param2, pwszusername: Param3, pwszpassword: Param4, dwflags: u32, ppsi: *mut ::core::option::Option<super::Authorization::UI::ISecurityInformation>, pfnreadsd: ::core::option::Option<PFNREADOBJECTSECURITY>, pfnwritesd: ::core::option::Option<PFNWRITEOBJECTSECURITY>, lpcontext: Param9, ) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DSCreateISecurityInfoObjectEx(pwszobjectpath: super::super::Foundation::PWSTR, pwszobjectclass: super::super::Foundation::PWSTR, pwszserver: super::super::Foundation::PWSTR, pwszusername: super::super::Foundation::PWSTR, pwszpassword: super::super::Foundation::PWSTR, dwflags: u32, ppsi: *mut ::windows::core::RawPtr, pfnreadsd: ::windows::core::RawPtr, pfnwritesd: ::windows::core::RawPtr, lpcontext: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT; } DSCreateISecurityInfoObjectEx( pwszobjectpath.into_param().abi(), pwszobjectclass.into_param().abi(), pwszserver.into_param().abi(), pwszusername.into_param().abi(), pwszpassword.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(ppsi), ::core::mem::transmute(pfnreadsd), ::core::mem::transmute(pfnwritesd), lpcontext.into_param().abi(), ) .ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] #[inline] pub unsafe fn DSCreateSecurityPage<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param6: ::windows::core::IntoParam<'a, super::super::Foundation::LPARAM>>( pwszobjectpath: Param0, pwszobjectclass: Param1, dwflags: u32, phpage: *mut super::super::UI::Controls::HPROPSHEETPAGE, pfnreadsd: ::core::option::Option<PFNREADOBJECTSECURITY>, pfnwritesd: ::core::option::Option<PFNWRITEOBJECTSECURITY>, lpcontext: Param6, ) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DSCreateSecurityPage(pwszobjectpath: super::super::Foundation::PWSTR, pwszobjectclass: super::super::Foundation::PWSTR, dwflags: u32, phpage: *mut super::super::UI::Controls::HPROPSHEETPAGE, pfnreadsd: ::windows::core::RawPtr, pfnwritesd: ::windows::core::RawPtr, lpcontext: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT; } DSCreateSecurityPage(pwszobjectpath.into_param().abi(), pwszobjectclass.into_param().abi(), ::core::mem::transmute(dwflags), ::core::mem::transmute(phpage), ::core::mem::transmute(pfnreadsd), ::core::mem::transmute(pfnwritesd), lpcontext.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DSEditSecurity<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param4: ::windows::core::IntoParam<'a, super::super::Foundation::PWSTR>, Param7: ::windows::core::IntoParam<'a, super::super::Foundation::LPARAM>>( hwndowner: Param0, pwszobjectpath: Param1, pwszobjectclass: Param2, dwflags: u32, pwszcaption: Param4, pfnreadsd: ::core::option::Option<PFNREADOBJECTSECURITY>, pfnwritesd: ::core::option::Option<PFNWRITEOBJECTSECURITY>, lpcontext: Param7, ) -> ::windows::core::Result<()> { #[cfg(windows)] { #[link(name = "windows")] extern "system" { fn DSEditSecurity(hwndowner: super::super::Foundation::HWND, pwszobjectpath: super::super::Foundation::PWSTR, pwszobjectclass: super::super::Foundation::PWSTR, dwflags: u32, pwszcaption: super::super::Foundation::PWSTR, pfnreadsd: ::windows::core::RawPtr, pfnwritesd: ::windows::core::RawPtr, lpcontext: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT; } DSEditSecurity(hwndowner.into_param().abi(), pwszobjectpath.into_param().abi(), pwszobjectclass.into_param().abi(), ::core::mem::transmute(dwflags), pwszcaption.into_param().abi(), ::core::mem::transmute(pfnreadsd), ::core::mem::transmute(pfnwritesd), lpcontext.into_param().abi()).ok() } #[cfg(not(windows))] unimplemented!("Unsupported target OS"); } pub const DSSI_IS_ROOT: u32 = 16u32; pub const DSSI_NO_ACCESS_CHECK: u32 = 2u32; pub const DSSI_NO_EDIT_OWNER: u32 = 8u32; pub const DSSI_NO_EDIT_SACL: u32 = 4u32; pub const DSSI_NO_FILTER: u32 = 32u32; pub const DSSI_NO_READONLY_MESSAGE: u32 = 64u32; pub const DSSI_READ_ONLY: u32 = 1u32; #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authorization_UI"))] pub type PFNDSCREATEISECINFO = unsafe extern "system" fn(param0: super::super::Foundation::PWSTR, param1: super::super::Foundation::PWSTR, param2: u32, param3: *mut ::windows::core::RawPtr, param4: ::windows::core::RawPtr, param5: ::windows::core::RawPtr, param6: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT; #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authorization_UI"))] pub type PFNDSCREATEISECINFOEX = unsafe extern "system" fn(param0: super::super::Foundation::PWSTR, param1: super::super::Foundation::PWSTR, param2: super::super::Foundation::PWSTR, param3: super::super::Foundation::PWSTR, param4: super::super::Foundation::PWSTR, param5: u32, param6: *mut ::windows::core::RawPtr, param7: ::windows::core::RawPtr, param8: ::windows::core::RawPtr, param9: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT; #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] pub type PFNDSCREATESECPAGE = unsafe extern "system" fn(param0: super::super::Foundation::PWSTR, param1: super::super::Foundation::PWSTR, param2: u32, param3: *mut super::super::UI::Controls::HPROPSHEETPAGE, param4: ::windows::core::RawPtr, param5: ::windows::core::RawPtr, param6: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT; #[cfg(feature = "Win32_Foundation")] pub type PFNDSEDITSECURITY = unsafe extern "system" fn(param0: super::super::Foundation::HWND, param1: super::super::Foundation::PWSTR, param2: super::super::Foundation::PWSTR, param3: u32, param4: super::super::Foundation::PWSTR, param5: ::windows::core::RawPtr, param6: ::windows::core::RawPtr, param7: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT; #[cfg(feature = "Win32_Foundation")] pub type PFNREADOBJECTSECURITY = unsafe extern "system" fn(param0: super::super::Foundation::PWSTR, param1: u32, param2: *mut *mut super::SECURITY_DESCRIPTOR, param3: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT; #[cfg(feature = "Win32_Foundation")] pub type PFNWRITEOBJECTSECURITY = unsafe extern "system" fn(param0: super::super::Foundation::PWSTR, param1: u32, param2: *mut super::SECURITY_DESCRIPTOR, param3: super::super::Foundation::LPARAM) -> ::windows::core::HRESULT;
extern crate difference; extern crate cobalt; extern crate walkdir; use std::path::Path; use std::fs::{self, File}; use std::io::Read; use walkdir::WalkDir; fn run_test(name: &str) { let source = format!("tests/fixtures/{}/", name); let target = format!("tests/target/{}/", name); let dest = format!("tests/tmp/{}/", name); match cobalt::build(&Path::new(&source), &Path::new(&dest), "_layouts", "_posts") { Ok(_) => println!("Build successful"), Err(e) => panic!("Error: {}", e), } let walker = WalkDir::new(&target).into_iter(); // walk through fixture and created tmp directory and compare files for entry in walker.filter_map(|e| e.ok()).filter(|e| e.file_type().is_file()) { let relative = entry.path().to_str().unwrap().split(&target).last().unwrap(); let mut original = String::new(); File::open(entry.path()).unwrap().read_to_string(&mut original).unwrap(); println!("{:?}", &Path::new(&dest).join(&relative)); let mut created = String::new(); File::open(&Path::new(&dest).join(&relative)).unwrap().read_to_string(&mut created).unwrap(); difference::assert_diff(&original, &created, " ", 0); } // clean up fs::remove_dir_all(dest).unwrap(); } #[test] pub fn example() { run_test("example"); }
#[doc = r" Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Pin assign register 0. Assign movable functions U0_TXD, U0_RXD, U0_RTS, U0_CTS"] pub pinassign0: PINASSIGN0, #[doc = "0x04 - Pin assign register 1. Assign movable functions U0_SCLC, U1_TXD, U1_RXD"] pub pinassign1: PINASSIGN1, #[doc = "0x08 - Pin assign register 2. Assign movable functions U2_TXD, U2_RXD"] pub pinassign2: PINASSIGN2, #[doc = "0x0c - Pin assignregister 3. Assign movable function SPI0_SCK"] pub pinassign3: PINASSIGN3, #[doc = "0x10 - Pin assign register 4. Assign movable functions SPI0_MOSI, SPI0_MISO, SPI0_SSEL, SPI1_SCK"] pub pinassign4: PINASSIGN4, #[doc = "0x14 - Pin assign register 5. Assign movable functions SPI1_MOSI, SPI1_MISO, SPI1_SSEL, CTIN_0"] pub pinassign5: PINASSIGN5, #[doc = "0x18 - Pin assign register 6. Assign movable functions CTIN_1, CTIN_2, CTIN_3, CTOUT_0"] pub pinassign6: PINASSIGN6, #[doc = "0x1c - Pin assign egister 7. Assign movable functions CTOUT_1, CTOUT_2, CTOUT_3, I2C_SDA"] pub pinassign7: PINASSIGN7, #[doc = "0x20 - Pin assign register 8. Assign movable functions I2C_SCL, ACMP_O, CLKOUT, GPIO_INT_BMAT"] pub pinassign8: PINASSIGN8, _reserved0: [u8; 412usize], #[doc = "0x1c0 - Pin enable register 0. Enables fixed-pin functions ACMP_I0, ACMP_I1, SWCLK, SWDIO, XTALIN, XTALOUT, RESET, CLKIN, VDDCMP"] pub pinenable0: PINENABLE0, } #[doc = "Pin assign register 0. Assign movable functions U0_TXD, U0_RXD, U0_RTS, U0_CTS"] pub struct PINASSIGN0 { register: ::vcell::VolatileCell<u32>, } #[doc = "Pin assign register 0. Assign movable functions U0_TXD, U0_RXD, U0_RTS, U0_CTS"] pub mod pinassign0; #[doc = "Pin assign register 1. Assign movable functions U0_SCLC, U1_TXD, U1_RXD"] pub struct PINASSIGN1 { register: ::vcell::VolatileCell<u32>, } #[doc = "Pin assign register 1. Assign movable functions U0_SCLC, U1_TXD, U1_RXD"] pub mod pinassign1; #[doc = "Pin assign register 2. Assign movable functions U2_TXD, U2_RXD"] pub struct PINASSIGN2 { register: ::vcell::VolatileCell<u32>, } #[doc = "Pin assign register 2. Assign movable functions U2_TXD, U2_RXD"] pub mod pinassign2; #[doc = "Pin assignregister 3. Assign movable function SPI0_SCK"] pub struct PINASSIGN3 { register: ::vcell::VolatileCell<u32>, } #[doc = "Pin assignregister 3. Assign movable function SPI0_SCK"] pub mod pinassign3; #[doc = "Pin assign register 4. Assign movable functions SPI0_MOSI, SPI0_MISO, SPI0_SSEL, SPI1_SCK"] pub struct PINASSIGN4 { register: ::vcell::VolatileCell<u32>, } #[doc = "Pin assign register 4. Assign movable functions SPI0_MOSI, SPI0_MISO, SPI0_SSEL, SPI1_SCK"] pub mod pinassign4; #[doc = "Pin assign register 5. Assign movable functions SPI1_MOSI, SPI1_MISO, SPI1_SSEL, CTIN_0"] pub struct PINASSIGN5 { register: ::vcell::VolatileCell<u32>, } #[doc = "Pin assign register 5. Assign movable functions SPI1_MOSI, SPI1_MISO, SPI1_SSEL, CTIN_0"] pub mod pinassign5; #[doc = "Pin assign register 6. Assign movable functions CTIN_1, CTIN_2, CTIN_3, CTOUT_0"] pub struct PINASSIGN6 { register: ::vcell::VolatileCell<u32>, } #[doc = "Pin assign register 6. Assign movable functions CTIN_1, CTIN_2, CTIN_3, CTOUT_0"] pub mod pinassign6; #[doc = "Pin assign egister 7. Assign movable functions CTOUT_1, CTOUT_2, CTOUT_3, I2C_SDA"] pub struct PINASSIGN7 { register: ::vcell::VolatileCell<u32>, } #[doc = "Pin assign egister 7. Assign movable functions CTOUT_1, CTOUT_2, CTOUT_3, I2C_SDA"] pub mod pinassign7; #[doc = "Pin assign register 8. Assign movable functions I2C_SCL, ACMP_O, CLKOUT, GPIO_INT_BMAT"] pub struct PINASSIGN8 { register: ::vcell::VolatileCell<u32>, } #[doc = "Pin assign register 8. Assign movable functions I2C_SCL, ACMP_O, CLKOUT, GPIO_INT_BMAT"] pub mod pinassign8; #[doc = "Pin enable register 0. Enables fixed-pin functions ACMP_I0, ACMP_I1, SWCLK, SWDIO, XTALIN, XTALOUT, RESET, CLKIN, VDDCMP"] pub struct PINENABLE0 { register: ::vcell::VolatileCell<u32>, } #[doc = "Pin enable register 0. Enables fixed-pin functions ACMP_I0, ACMP_I1, SWCLK, SWDIO, XTALIN, XTALOUT, RESET, CLKIN, VDDCMP"] pub mod pinenable0;
use rand::{Rng, thread_rng}; use std::f64::consts::PI; const TAU: f64 = PI * 2.0; pub struct Synthesizer { voices: Vec<Voice>, } impl Synthesizer { pub fn new() -> Synthesizer { Synthesizer { voices: Vec::new(), } } pub fn voice(&mut self, voice: Voice) { self.voices.push(voice); } pub fn sample(&self, time: f64) -> f64 { self.voices.iter().map(|v| v.sample(time)).sum::<f64>() } } pub struct Voice { amplitude: f64, frequency: f64, kind: VoiceKind, } pub enum VoiceKind { Noise, Saw, Sine, Square, Triangle, } impl Voice { pub fn new() -> Voice { Voice { amplitude: 0.0, frequency: 0.0, kind: VoiceKind::Sine, } } pub fn amplitude(mut self, amplitude: f64) -> Voice { self.amplitude = amplitude; self } pub fn frequency(mut self, frequency: f64) -> Voice { self.frequency = frequency; self } pub fn kind(mut self, kind: VoiceKind) -> Voice { self.kind = kind; self } pub fn sample(&self, time: f64) -> f64 { let period = 1.0 / self.frequency; let t = time % period / period; use self::VoiceKind::*; let unscaled = match self.kind { Noise => thread_rng().gen::<f64>() * 2.0 - 1.0, Saw => if t < 0.5 { t * 2.0 } else { t * 2.0 - 2.0 }, Sine => (t * TAU).sin(), Square => if t < 0.5 { 1.0 } else { -1.0 }, Triangle => { let x = t * 4.0; if x < 1.0 { x } else if x < 3.0 { -x + 2.0 } else { x - 4.0 } } }; unscaled * self.amplitude } } #[cfg(test)] mod tests { use super::*; use std::f64::EPSILON; const DX: f64 = EPSILON * 2.0; // use float_cmp::{Ulps, ApproxEq}; use float_cmp::ApproxEq; fn approx_eq(a: f64, b: f64) -> bool { a.approx_eq(&b, DX, 2) } #[test] fn triangle() { let v = Voice::new().amplitude(1.0).frequency(1.0).kind(VoiceKind::Triangle); assert!(approx_eq(v.sample(0.000), 0.0), "v.sample(0.000): {}", v.sample(0.000)); assert!(approx_eq(v.sample(0.250), 1.0), "v.sample(0.250): {}", v.sample(0.250)); assert!(approx_eq(v.sample(0.500), 0.0), "v.sample(0.500): {}", v.sample(0.500)); assert!(approx_eq(v.sample(0.750), -1.0), "v.sample(0.750): {}", v.sample(0.750)); assert!(approx_eq(v.sample(1.000), 0.0), "v.sample(1.000): {}", v.sample(1.000)); assert!(approx_eq(v.sample(1.250), 1.0), "v.sample(1.250): {}", v.sample(1.250)); assert!(approx_eq(v.sample(1.500), 0.0), "v.sample(1.500): {}", v.sample(1.500)); assert!(approx_eq(v.sample(1.750), -1.0), "v.sample(1.750): {}", v.sample(1.750)); assert!(approx_eq(v.sample(2.000), 0.0), "v.sample(2.000): {}", v.sample(2.000)); } }
use std::process::{Child, Command}; use std::str; use n3_machine_ffi::{LocalQuery, Machine, NetError, Program, Query, Result, WorkHandler}; use n3_torch_ffi::{ProcessMachine as ProcessMachineTrait, PyMachine}; use crate::python::PyMachineBase; pub struct ProcessMachine { process: Option<Child>, handler: Option<WorkHandler>, query: Query, } impl ProcessMachine { pub unsafe fn try_new<T>(query: &Query) -> Vec<Box<dyn Machine>> where T: ProcessMachineTrait<Self> + 'static, { T::verify_query(query) .into_iter() .map(Self::new) .map(T::new) .map(PyMachineBase::new) .map(|x| x.into_box_trait()) .collect() } fn new(query: Query) -> Self { Self { process: None, handler: None, query, } } } impl PyMachine for ProcessMachine { fn is_running(&self) -> bool { self.process.is_some() } fn py_spawn(&mut self, program: &mut Program, handler: &WorkHandler) -> Result<()> { self.handler = Some(handler.clone()); // the machine's name program.machine = LocalQuery(&self.query).to_string(); // store the program into a file program.save()?; // spawn to new process let process = Command::new("n3-torchc") .arg(program.id.work.to_string()) .arg(program.id.primary.to_string()) .spawn() .map_err(NetError::from)?; self.process = Some(process); Ok(()) } fn py_terminate(&mut self) -> Result<()> { match self.process.take() { Some(process) => { let result = process.wait_with_output().map_err(NetError::from)?; if !result.status.success() { let handler = self.handler.as_ref().unwrap(); let msg = match str::from_utf8(&result.stderr) { Ok("") | Err(_) => "trap encountered", Ok(msg) => msg, }; handler.end_err(msg)?; } Ok(()) } None => Ok(()), } } }
/* * hurl (https://hurl.dev) * Copyright (C) 2020 Orange * * 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 super::ast::Template; #[derive(Clone, Debug, PartialEq, Eq)] pub enum Value { Number(String), String(Template), Boolean(bool), List { space0: String, elements: Vec<ListElement> }, Object { space0: String, elements: Vec<ObjectElement> }, Null {}, } impl Value { pub fn _type(&self) -> String { match self { Value::Number(_) => "number".to_string(), Value::Null {} => "null".to_string(), Value::Boolean(_) => "boolean".to_string(), Value::List { .. } => "list".to_string(), Value::Object { .. } => "object".to_string(), Value::String(_) => "string".to_string(), } } } #[derive(Clone, Debug, PartialEq, Eq)] pub struct ListElement { pub space0: String, pub value: Value, pub space1: String, } #[derive(Clone, Debug, PartialEq, Eq)] pub struct ObjectElement { pub space0: String, pub name: String, pub space1: String, pub space2: String, pub value: Value, pub space3: String, } #[cfg(test)] pub mod tests { use super::*; use super::super::ast::{Expr, TemplateElement, Variable, Whitespace}; use super::super::common::SourceInfo; pub fn person_value() -> Value { Value::Object { space0: "\n ".to_string(), elements: vec![ ObjectElement { space0: "".to_string(), name: "firstName".to_string(), space1: "".to_string(), space2: " ".to_string(), value: Value::String(Template { quotes: false, elements: vec![ TemplateElement::String { value: "John".to_string(), encoded: "John".to_string(), } ], source_info: SourceInfo::init(1, 1, 1, 1), }), space3: "\n".to_string(), }, ], } } pub fn hello_world_value() -> Value { // "hello\u0020{{name}}!" Value::String(Template { quotes: true, elements: vec![ TemplateElement::String { value: "Hello ".to_string(), encoded: "Hello\\u0020".to_string(), }, TemplateElement::Expression(Expr { space0: Whitespace { value: "".to_string(), source_info: SourceInfo::init(1, 15, 1, 15) }, variable: Variable { name: "name".to_string(), source_info: SourceInfo::init(1, 15, 1, 19) }, space1: Whitespace { value: "".to_string(), source_info: SourceInfo::init(1, 19, 1, 19) }, }), TemplateElement::String { value: "!".to_string(), encoded: "!".to_string(), }, ], source_info: SourceInfo::init(1, 2, 1, 22), }) } }
/* Project Euler Problem 4: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. */ fn main() { let mut l = 0; for x in 0..1000 { for y in 0..1000 { let z = x * y; let s: String = z.to_string(); let s_rev: String = s.chars().rev().collect(); if z > l && s == s_rev { l = z; } } } println!("{:?}", l); }
pub mod generator; use monster::Monster; use theme::Keyword; use std::collections::HashMap; pub struct Dungeon { pub rooms: Vec<Room>, /// Vector index is source, value[CompassPoint] is destination. Length is /// always equal to room count. passages: Vec<Passages>, } impl Dungeon { pub fn new(rooms: Vec<Room>) -> Dungeon { Dungeon { passages: vec![HashMap::new(); rooms.len()], rooms: rooms, } } pub fn first_room(&self) -> &Room { &self.rooms.first().expect("dungeon must have a room") } pub fn get_room_mut(&mut self, id: usize) -> &mut Room { &mut self.rooms[id] } pub fn get_room(&self, id: usize) -> &Room { &self.rooms[id] } pub fn get_adjacent(&self, origin: usize, cp: CompassPoint) -> Option<usize> { match self.passages[origin].get(&cp) { Some(&u) => Some(u), None => None, } } pub fn create_passage(&mut self, source: usize, dir: CompassPoint, destination: usize) { { let rooms_passages: &mut Passages = &mut self.passages[source]; rooms_passages.insert(dir, destination); } { let opposite_passages: &mut Passages = &mut self.passages[destination]; opposite_passages.insert(dir.opposite(), source); } } } #[derive(Clone, Serialize, Deserialize, Debug)] pub struct Room { // TODO: temporary, replace with real content pub keyword: Keyword, // TODO: environment: Environment, modifier: RoomMod pub monster: Option<Monster>, } impl Room { pub fn new(kw: &Keyword, monster: Option<Monster>) -> Room { Room { keyword: kw.clone(), monster, } } } #[derive(Clone, Copy, Eq, PartialEq, Hash)] pub enum CompassPoint { North, East, South, West, } impl CompassPoint { pub fn opposite(&self) -> CompassPoint { use CompassPoint::*; match self { &North => South, &East => West, &South => North, &West => East, } } } type Passages = HashMap<CompassPoint, usize>;
use constants::*; use utils::*; use types::*; use cipherstate::*; #[cfg(feature = "nightly")] use std::convert::TryFrom; #[cfg(not(feature = "nightly"))] use utils::TryFrom; use symmetricstate::*; use params::*; use error::{ErrorKind, Result, InitStage, StateProblem}; /// A state machine encompassing the handshake phase of a Noise session. /// /// **Note:** you are probably looking for [`NoiseBuilder`](struct.NoiseBuilder.html) to /// get started. /// /// See: http://noiseprotocol.org/noise.html#the-handshakestate-object pub struct HandshakeState { rng : Box<Random>, symmetricstate : SymmetricState, cipherstates: CipherStates, s: Toggle<Box<Dh>>, e: Toggle<Box<Dh>>, fixed_ephemeral: bool, rs: Toggle<[u8; MAXDHLEN]>, re: Toggle<[u8; MAXDHLEN]>, initiator: bool, params: NoiseParams, psks: [Option<[u8; PSKLEN]>; 10], my_turn: bool, message_patterns: MessagePatterns, } impl HandshakeState { #[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments))] pub fn new( rng: Box<Random>, cipherstate: CipherState, hasher: Box<Hash>, s : Toggle<Box<Dh>>, e : Toggle<Box<Dh>>, fixed_ephemeral: bool, rs: Toggle<[u8; MAXDHLEN]>, re: Toggle<[u8; MAXDHLEN]>, initiator: bool, params: NoiseParams, psks: [Option<[u8; PSKLEN]>; 10], prologue: &[u8], cipherstates: CipherStates) -> Result<HandshakeState> { if (s.is_on() && e.is_on() && s.pub_len() != e.pub_len()) || (s.is_on() && rs.is_on() && s.pub_len() > rs.len()) || (s.is_on() && re.is_on() && s.pub_len() > re.len()) { bail!(ErrorKind::Init(InitStage::ValidateKeyLengths)); } let tokens = HandshakeTokens::try_from(params.handshake.clone())?; let mut symmetricstate = SymmetricState::new(cipherstate, hasher); symmetricstate.initialize(&params.name); symmetricstate.mix_hash(prologue); let dh_len = s.pub_len(); if initiator { for token in tokens.premsg_pattern_i { match *token { Token::S => {assert!(s.is_on()); symmetricstate.mix_hash(s.pubkey());}, Token::E => {assert!(e.is_on()); symmetricstate.mix_hash(e.pubkey());}, _ => unreachable!() } } for token in tokens.premsg_pattern_r { match *token { Token::S => {assert!(rs.is_on()); symmetricstate.mix_hash(&rs[..dh_len]);}, Token::E => {assert!(re.is_on()); symmetricstate.mix_hash(&re[..dh_len]);}, _ => unreachable!() } } } else { for token in tokens.premsg_pattern_i { match *token { Token::S => {assert!(rs.is_on()); symmetricstate.mix_hash(&rs[..dh_len]);}, Token::E => {assert!(re.is_on()); symmetricstate.mix_hash(&re[..dh_len]);}, _ => unreachable!() } } for token in tokens.premsg_pattern_r { match *token { Token::S => {assert!(s.is_on()); symmetricstate.mix_hash(s.pubkey());}, Token::E => {assert!(e.is_on()); symmetricstate.mix_hash(e.pubkey());}, _ => unreachable!() } } } Ok(HandshakeState { rng: rng, symmetricstate: symmetricstate, cipherstates: cipherstates, s: s, e: e, fixed_ephemeral: fixed_ephemeral, rs: rs, re: re, initiator: initiator, params: params, psks: psks, my_turn: initiator, message_patterns: tokens.msg_patterns.into(), }) } fn dh_len(&self) -> usize { self.s.pub_len() } fn dh(&mut self, local_s: bool, remote_s: bool) -> Result<()> { if !((!local_s || self.s.is_on()) && ( local_s || self.e.is_on()) && (!remote_s || self.rs.is_on()) && ( remote_s || self.re.is_on())) { bail!(ErrorKind::State(StateProblem::MissingKeyMaterial)); } let dh_len = self.dh_len(); let mut dh_out = [0u8; MAXDHLEN]; match (local_s, remote_s) { (true, true ) => self.s.dh(&*self.rs, &mut dh_out), (true, false) => self.s.dh(&*self.re, &mut dh_out), (false, true ) => self.e.dh(&*self.rs, &mut dh_out), (false, false) => self.e.dh(&*self.re, &mut dh_out), } self.symmetricstate.mix_key(&dh_out[..dh_len]); Ok(()) } pub fn is_write_encrypted(&self) -> bool { self.symmetricstate.has_key() } pub fn write_handshake_message(&mut self, payload: &[u8], message: &mut [u8]) -> Result<usize> { if !self.my_turn { bail!(ErrorKind::State(StateProblem::NotTurnToWrite)); } let next_tokens = if !self.message_patterns.is_empty() { self.message_patterns.remove(0).unwrap() } else { bail!(ErrorKind::State(StateProblem::HandshakeAlreadyFinished)); }; let last = self.message_patterns.is_empty(); let mut byte_index = 0; for token in next_tokens.iter() { match *token { Token::E => { if byte_index + self.e.pub_len() > message.len() { bail!(ErrorKind::Input) } if !self.fixed_ephemeral { self.e.generate(&mut *self.rng); } { let pubkey = self.e.pubkey(); copy_memory(pubkey, &mut message[byte_index..]); byte_index += self.s.pub_len(); self.symmetricstate.mix_hash(pubkey); if self.params.handshake.is_psk() { self.symmetricstate.mix_key(pubkey); } } self.e.enable(); }, Token::S => { if !self.s.is_on() { bail!(ErrorKind::State(StateProblem::MissingKeyMaterial)); } if byte_index + self.s.pub_len() > message.len() { bail!(ErrorKind::Input) } byte_index += self.symmetricstate.encrypt_and_mix_hash( self.s.pubkey(), &mut message[byte_index..]); }, Token::Psk(n) => { match self.psks[n as usize] { Some(psk) => { self.symmetricstate.mix_key_and_hash(&psk); }, None => { bail!(ErrorKind::State(StateProblem::MissingPsk)); } } }, Token::Dhee => self.dh(false, false)?, Token::Dhes => self.dh(false, true )?, Token::Dhse => self.dh(true, false)?, Token::Dhss => self.dh(true, true )?, } } self.my_turn = false; if byte_index + payload.len() + TAGLEN > message.len() { bail!(ErrorKind::Input); } byte_index += self.symmetricstate.encrypt_and_mix_hash(payload, &mut message[byte_index..]); if byte_index > MAXMSGLEN { bail!(ErrorKind::Input); } if last { self.symmetricstate.split(&mut self.cipherstates.0, &mut self.cipherstates.1); } Ok(byte_index) } pub fn read_handshake_message(&mut self, message: &[u8], payload: &mut [u8]) -> Result<usize> { if message.len() > MAXMSGLEN { bail!(ErrorKind::Input); } let next_tokens = if self.message_patterns.len() > 0 { self.message_patterns.remove(0) } else { None }; let last = next_tokens.is_some() && self.message_patterns.is_empty(); let dh_len = self.dh_len(); let mut ptr = message; if let Some(tokens) = next_tokens { for token in tokens.iter() { match *token { Token::E => { self.re[..dh_len].copy_from_slice(&ptr[..dh_len]); ptr = &ptr[dh_len..]; self.symmetricstate.mix_hash(&self.re[..dh_len]); if self.params.handshake.is_psk() { self.symmetricstate.mix_key(&self.re[..dh_len]); } self.re.enable(); }, Token::S => { let data = if self.symmetricstate.has_key() { let temp = &ptr[..dh_len + TAGLEN]; ptr = &ptr[dh_len + TAGLEN..]; temp } else { let temp = &ptr[..dh_len]; ptr = &ptr[dh_len..]; temp }; self.symmetricstate.decrypt_and_mix_hash(data, &mut self.rs[..dh_len]).map_err(|_| ErrorKind::Decrypt)?; self.rs.enable(); }, Token::Psk(n) => { match self.psks[n as usize] { Some(psk) => { self.symmetricstate.mix_key_and_hash(&psk); }, None => { bail!(ErrorKind::State(StateProblem::MissingPsk)); } } }, Token::Dhee => self.dh(false, false)?, Token::Dhes => self.dh(true, false)?, Token::Dhse => self.dh(false, true)?, Token::Dhss => self.dh(true, true)?, } } } self.symmetricstate.decrypt_and_mix_hash(ptr, payload).map_err(|_| ErrorKind::Decrypt)?; self.my_turn = true; if last { self.symmetricstate.split(&mut self.cipherstates.0, &mut self.cipherstates.1); } let payload_len = if self.symmetricstate.has_key() { ptr.len() - TAGLEN } else { ptr.len() }; Ok(payload_len) } pub fn get_remote_static(&self) -> Option<&[u8; MAXDHLEN]> { self.rs.as_option_ref() } pub fn finish(self) -> Result<(CipherStates, HandshakeChoice)> { if self.is_finished() { Ok((self.cipherstates, self.params.handshake)) } else { bail!(ErrorKind::State(StateProblem::HandshakeNotFinished)); } } pub fn is_initiator(&self) -> bool { self.initiator } pub fn is_finished(&self) -> bool { self.message_patterns.is_empty() } }
#[derive(PartialEq, Debug)] pub enum KeypadDirection { Up, Down, Left, Right } pub fn char_to_keypad_direction(keypad_char: char) -> KeypadDirection { match keypad_char { 'U' => KeypadDirection::Up, 'D' => KeypadDirection::Down, 'L' => KeypadDirection::Left, 'R' => KeypadDirection::Right, _ => panic!("Invalid keypad char: {}. Expected 'U', 'D', 'L', or 'R'", keypad_char) } } /** 1 2 3 4 5 6 7 8 9 A B C D */ pub fn row_col_to_keypad_button(row: i32, col: i32) -> char { match (row, col) { (0, 2) => '1', (1, 1) => '2', (1, 2) => '3', (1, 3) => '4', (2, 0) => '5', (2, 1) => '6', (2, 2) => '7', (2, 3) => '8', (2, 4) => '9', (3, 1) => 'A', (3, 2) => 'B', (3, 3) => 'C', (4, 2) => 'D', (_, _) => panic!("Whoops!") } } /** * This function says if you can move up on a diagonal based keypad based on your current row and col */ pub fn can_move_up(row: i32, col: i32, max_row: i32, max_col: i32) -> bool { let mid = (max_row / 2 - col).abs(); return row - mid > 0; } pub fn can_move_down(row: i32, col: i32, max_row: i32, max_col: i32) -> bool { let mid = (max_row / 2 - col).abs(); return row + mid < max_row; } pub fn can_move_left(row: i32, col: i32, max_row: i32, max_col: i32) -> bool { let mid = (max_row / 2 - row).abs(); return col - mid > 0; } pub fn can_move_right(row: i32, col: i32, max_row: i32, max_col: i32) -> bool { let mid = (max_row / 2 - row).abs(); return col + mid < max_col; } pub fn day_2(input: String) { let mut row = 3; let mut col = 0; let MAX_ROW = 4; let MAX_COL = 4; let MIN_ROW = 0; let MIN_COL = 0; let split = input.split_whitespace().collect::<Vec<&str>>(); for sequence in &split { for (i, c) in sequence.chars().enumerate() { let keypad_direction = char_to_keypad_direction(c); match keypad_direction { KeypadDirection::Up => { if can_move_up(row, col, MAX_ROW, MAX_COL) { row -= 1; } }, KeypadDirection::Down => { if can_move_down(row, col, MAX_ROW, MAX_COL) { row += 1; } }, KeypadDirection::Left => { if can_move_left(row, col, MAX_ROW, MAX_COL) { col -= 1; } }, KeypadDirection::Right => { if can_move_right(row, col, MAX_ROW, MAX_COL) { col += 1; } } } } print!("{}", row_col_to_keypad_button(row, col)); } }
use rand::random; use hitable::{HitRecord, Hitable}; use material::Material; use ray::Ray; use vec3::{dot, Vec3}; //#[derive(Debug)] pub struct Sphere { pub center: Vec3, pub radius: f32, pub material: Box<dyn Material>, } impl Hitable for Sphere { fn hit(&self, r: &Ray, t_min: f32, t_max: f32, rec: &mut HitRecord) -> bool { let oc = *r.origin() - self.center; let a = dot(r.direction(), r.direction()); let b = dot(&oc, r.direction()); let c = dot(&oc, &oc) - self.radius * self.radius; let discriminant = b * b - a * c; if discriminant > 0.0 { let mut temp = (-b - (b * b - a * c).sqrt()) / a; if temp < t_max && temp > t_min { rec.t = temp; rec.p = r.point_at_parameter(rec.t); rec.normal = (rec.p - self.center) / self.radius; return true; } temp = (-b + (b * b - a * c).sqrt()) / a; if temp < t_max && temp > t_min { rec.t = temp; rec.p = r.point_at_parameter(rec.t); rec.normal = (rec.p - self.center) / self.radius; return true; } } false } } pub fn random_in_unit_sphere() -> Vec3 { let mut p = Vec3 { e: [5.0, 4.0, 3.0] }; while p.squared_length() > 1.0 { p = Vec3 { e: [random::<f32>(), random::<f32>(), random::<f32>()], } * 2.0 - Vec3 { e: [1.0, 1.0, 1.0] }; } p }
//! //! division.rs //! //! Created by Mitchell Nordine at 02:34AM on November 02, 2014. //! //! use num::{NumCast, FromPrimitive, ToPrimitive}; use std::ops::{Add, Sub}; use super::TimeSig; pub type NumDiv = i64; /// An enum with variants used to represent a musical division. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum Division { Bar, Minim, Beat, Quaver, SemiQuaver, ThirtySecond, SixtyFourth, OneHundredTwentyEighth, TwoHundredFiftySixth, FiveHundredTwelfth, OneThousandTwentyFourth, } const HIGHEST_ZOOM_STEP: u8 = 10; impl Division { pub fn from_isize<T: ToPrimitive>(num: T) -> Division { FromPrimitive::from_isize(num.to_isize().unwrap()).unwrap() } /// Convert to the equivalent duration as a number of Beats. pub fn beats(&self, ts: TimeSig) -> f64 { use num::Float; match *self { Division::Bar => ts.beats_per_bar(), _ => 2.0.powi(Division::Beat as i32 - *self as i32), } } /// Convert to the equivalent duration as a number of Bars. pub fn bars(&self, ts: TimeSig) -> f64 { match *self { Division::Bar => 1.0, _ => self.beats(ts) / ts.beats_per_bar(), } } /// Zoom into a higher resolution division by the number of steps given. pub fn zoom_in(&self, steps: u8) -> Option<Division> { let zoom_step = self.to_u8() + steps; if zoom_step <= HIGHEST_ZOOM_STEP { Some(NumCast::from(zoom_step).unwrap()) } else { None } } /// Zoom into a higher resolution division by the number of steps given. pub fn zoom_out(&self, steps: u8) -> Option<Division> { let current_zoom_step = self.to_u8(); if steps <= current_zoom_step { let zoom_step = current_zoom_step - steps; Some(NumCast::from(zoom_step).unwrap()) } else { None } } /// Convert a Division to its byte equivalent. pub fn to_u8(&self) -> u8 { ToPrimitive::to_u8(self).unwrap() } /// Convert a Division to its signed byte equivalent. pub fn to_i8(&self) -> i8 { ToPrimitive::to_i8(self).unwrap() } } impl NumCast for Division { fn from<T: ToPrimitive>(n: T) -> Option<Division> { Some(Division::from_isize(n.to_isize().unwrap())) } } impl FromPrimitive for Division { fn from_i64(n: i64) -> Option<Self> { Self::from_u64(n as u64) } fn from_u64(n: u64) -> Option<Self> { match n { 0 => Some(Division::Bar), 1 => Some(Division::Minim), 2 => Some(Division::Beat), 3 => Some(Division::Quaver), 4 => Some(Division::SemiQuaver), 5 => Some(Division::ThirtySecond), 6 => Some(Division::SixtyFourth), 7 => Some(Division::OneHundredTwentyEighth), 8 => Some(Division::TwoHundredFiftySixth), 9 => Some(Division::FiveHundredTwelfth), 10 => Some(Division::OneThousandTwentyFourth), _ => None, } } } impl ToPrimitive for Division { fn to_i64(&self) -> Option<i64> { self.to_u64().map(|n| n as i64) } fn to_u64(&self) -> Option<u64> { Some(match *self { Division::Bar => 0, Division::Minim => 1, Division::Beat => 2, Division::Quaver => 3, Division::SemiQuaver => 4, Division::ThirtySecond => 5, Division::SixtyFourth => 6, Division::OneHundredTwentyEighth => 7, Division::TwoHundredFiftySixth => 8, Division::FiveHundredTwelfth => 9, Division::OneThousandTwentyFourth => 10, }) } } impl Add<isize> for Division { type Output = isize; fn add(self, rhs: isize) -> isize { self.to_isize().unwrap() + rhs } } impl Sub<isize> for Division { type Output = isize; fn sub(self, rhs: isize) -> isize { self.to_isize().unwrap() - rhs } } /// The 'Division Type'. Used for handling 'Thirds'. /// Whole represents a Whole division, while TwoThirds represents two thirds of a division. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum DivType { Whole, TwoThirds, } impl DivType { pub fn from_isize<T: NumCast>(num: T) -> DivType { FromPrimitive::from_isize(num.to_isize().unwrap()).unwrap() } } impl NumCast for DivType { fn from<T: ToPrimitive>(n: T) -> Option<DivType> { Some(DivType::from_isize(n.to_isize().unwrap())) } } impl ::rand::Rand for DivType { fn rand<R: ::rand::Rng>(rng: &mut R) -> DivType { let rand: bool = rng.gen(); if rand { DivType::Whole } else { DivType::TwoThirds } } } impl FromPrimitive for DivType { fn from_i64(n: i64) -> Option<Self> { Self::from_u64(n as u64) } fn from_u64(n: u64) -> Option<Self> { match n { 0 => Some(DivType::Whole), 1 => Some(DivType::TwoThirds), _ => None, } } } impl ToPrimitive for DivType { fn to_i64(&self) -> Option<i64> { self.to_u64().map(|n| n as i64) } fn to_u64(&self) -> Option<u64> { Some(match self { &DivType::Whole => 0, &DivType::TwoThirds => 1, }) } } impl Add<isize> for DivType { type Output = isize; fn add(self, rhs: isize) -> isize { self.to_isize().unwrap() + rhs } } impl Sub<isize> for DivType { type Output = isize; fn sub(self, rhs: isize) -> isize { self.to_isize().unwrap() - rhs } }
use crate::MenmosFS; use super::{Error, Result}; impl MenmosFS { pub async fn release_impl(&self, ino: u64, is_writable: bool) -> Result<()> { log::info!("release i{}", ino); let mut buffers_guard = self.write_buffers.lock().await; if let Some(buffer) = buffers_guard.remove(&ino) { log::info!("flushing pending write buffer for {}", ino); self.flush_buffer(ino, buffer).await?; } let blob_id = self .inode_to_blobid .get(&ino) .await .ok_or(Error::NotFound)?; if is_writable { log::info!("start fsync {}", blob_id); self.client.fsync(&blob_id).await.map_err(|e| { log::error!("menmos fsync error: {}", e); Error::IOError })?; log::info!("fsync {} complete", blob_id); } Ok(()) } }
fn main() { panic!(" The use of the dinghy crate is deprecated, use cargo-dinghy instead. Install it with the following command: \t$ cargo install cargo-dinghy "); }
use super::*; pub struct Player<'a> { pub id: String, pub name: String, pub money: u32, pub nodes: Vec<&'a mut node::Node>, pub execs: Vec<exec::Exec>, } impl<'a> Player<'a> { pub fn new(id: String, name: String, money: u32) -> Player<'a> { let nodes: Vec<&'a mut node::Node> = Vec::new(); let execs: Vec<exec::Exec> = Vec::new(); Player { id, name, money, nodes, execs } } pub fn add_node(&mut self, node: &'a mut node::Node) { self.nodes.push(node); } pub fn remove_node(&mut self, node_id: &str) -> bool { let i_opt = self.nodes.iter().position( |n| n.id == node_id ); match i_opt { Some(i) => { self.nodes.remove(i); true }, None => false } } pub fn remove_exec(&mut self, exec_id: &str) -> bool { let i_opt = self.execs.iter().position( |e| e.id == exec_id ); match i_opt { Some(i) => { self.execs.remove(i); true }, None => false } } } #[cfg(test)] mod tests { use super::*; #[test] fn remove_node() { let mut obj = Player::new(String::from("1"), String::from("Egon"),0); let node = node::Node::new(&[1,1]); let id = node.id.to_string(); obj.nodes.push(&mut node); assert_eq!(obj.nodes.len(), 1); assert!( obj.remove_node(&id) ); assert_eq!(obj.nodes.len(), 0); assert!( !obj.remove_node(&id)); } #[test] fn remove_exec() { let mut obj = Player::new(String::from("1"), String::from("Egon"),0); let exec = exec::Exec::new("ID", "NAME"); obj.execs.push(exec); assert_eq!(obj.execs.len(), 1); assert!(obj.remove_exec("ID")); assert_eq!(obj.execs.len(), 0); assert!( !obj.remove_exec("ID") ); } }
use ::amethyst::controls::FlyControlTag; use ::amethyst::renderer::{camera::ActiveCamera, Camera}; use ::amethyst::shrev::EventChannel; use ::amethyst::core::*; use ::amethyst::ecs::*; use ::amethyst::input::*; use serde::Serialize; #[derive(new, Debug, Serialize, Deserialize)] pub struct NoClip<T> where T: BindingTypes, { pub toggle_action_key: T::Action, #[new(default)] #[serde(skip)] pub(crate) noclip_entity: Option<Entity>, #[new(default)] #[serde(skip)] pub(crate) previous_active_camera: Option<Entity>, #[new(default)] pub(crate) active: bool, } #[derive(Default, new, Serialize, Deserialize, Clone, Copy)] pub struct NoClipTag; impl Component for NoClipTag { type Storage = NullStorage<Self>; } /// Toggle the noclip camera. /// Spawns the noclip fly entity at the position of the current main camera. /// Forces the entity's camera to always be the primary one. /// When untoggling, deletes the entity and sets the main camera to whatever last one was set as primary. /// (including the one changed during the noclipping) #[derive(Debug)] pub struct NoClipToggleSystem<T> where T: BindingTypes, { event_reader: ReaderId<InputEvent<T>>, } impl<T> NoClipToggleSystem<T> where T: BindingTypes, { pub fn new(world: &mut World) -> Self { <Self as System>::SystemData::setup(world); let event_reader = world .fetch_mut::<EventChannel<InputEvent<T>>>() .register_reader(); NoClipToggleSystem { event_reader } } } impl<'a, T> System<'a> for NoClipToggleSystem<T> where T: BindingTypes, { type SystemData = ( Entities<'a>, Read<'a, EventChannel<InputEvent<T>>>, WriteStorage<'a, Transform>, WriteStorage<'a, FlyControlTag>, WriteStorage<'a, Camera>, Write<'a, ActiveCamera>, WriteExpect<'a, NoClip<T>>, WriteStorage<'a, NoClipTag>, ); fn run( &mut self, ( entities, events, mut transforms, mut fly_control_tags, mut cameras, mut active_camera, mut noclip_res, mut noclips, ): Self::SystemData, ) { if active_camera.entity != noclip_res.noclip_entity { noclip_res.previous_active_camera = active_camera.entity; } // TODO: AutoFov support for event in events.read(&mut self.event_reader) { match event { InputEvent::ActionPressed(key) => { if *key == noclip_res.toggle_action_key { if !noclip_res.active { // Enable noclip let entity = entities.create(); let transform = Transform::default(); // TODO: get global position of current main entity. transforms.insert(entity, transform).unwrap(); fly_control_tags.insert(entity, FlyControlTag).unwrap(); cameras .insert(entity, Camera::standard_3d(800.0, 600.0)) .unwrap(); // TODO: clone main camera if available. noclips.insert(entity, NoClipTag).unwrap(); active_camera.entity = Some(entity); noclip_res.noclip_entity = Some(entity); noclip_res.active = true; } else { // Disable noclip // get noclip entity if let Some(entity) = noclip_res.noclip_entity { if let Err(err) = entities.delete(entity) { error!("Noclip is enabled, but there is no noclip entity in the world! {}", err); } active_camera.entity = noclip_res.previous_active_camera.clone(); noclip_res.noclip_entity = None; } else { error!("Noclip is enabled, but there is no noclip entity in the world!"); } noclip_res.active = false; } } } _ => {} } } } }
use crate::AlfredError; use std::process::Command; #[derive(Debug)] pub struct BrowserActiveTabInfo { pub url: String, pub title: String, } const OSASCRIPT_OUTPUT_SPECIAL_SEPERATOR: &str = " fd850fc2e63511e79f720023dfdf24ec "; pub fn get() -> Result<BrowserActiveTabInfo, Box<dyn std::error::Error>> { debug!("Starting in browser_info::get"); let output = Command::new("osascript") .arg("-s") .arg("so") .arg("get-current-url.applescript") .output() .map_err(|e| AlfredError::OsascriptError(e.to_string()))?; if !output.status.success() { return Err(AlfredError::OsascriptError(output.status.to_string()).into()); } // Get output of above command let osascript_result = String::from_utf8(output.stdout)?; // let osascript_result = String::from(r#"{"file:///Users/alwc/Downloads/test.pdf fd850fc2e63511e79f720023dfdf24ec file:///Users/alwc/Downloads/test.pdf"}"#); // let osascript_result = String::from(r#"{"safari-resource :/ErrorPage.html fd850fc2e63511e79f720023dfdf24ec Failed to open page"}"#); debug!(" osascript_result: {}", osascript_result); // Extract theURL and theTitle from output (assumed they are separated // by ' fd850fc2e63511e79f720023dfdf24ec ' (note spaces)) let trim_chars: &[_] = &['{', '}', '\n']; let tab_info: Vec<&str> = osascript_result .trim_matches(trim_chars) .split(OSASCRIPT_OUTPUT_SPECIAL_SEPERATOR) .map(|s| s.trim().trim_matches('"').trim()) .collect(); assert_eq!(2, tab_info.len()); // If theTitle is missing use theURL for title as well. let tab_info = match (tab_info[0].is_empty(), tab_info[1].is_empty()) { (true, _) => Err("Cannot get browser's URL".into()), (false, true) => Ok(BrowserActiveTabInfo { url: tab_info[0].to_string(), title: tab_info[0].to_string(), }), _ => Ok(BrowserActiveTabInfo { url: tab_info[0].to_string(), title: tab_info[1].to_string(), }), }; debug!(" tab_info: {:?}", tab_info); tab_info }
// Copyright 2022 Datafuse Labs. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. use std::sync::Arc; use common_catalog::table_context::StageAttachment; use common_expression::DataBlock; use common_expression::DataSchemaRef; use common_expression::TableSchemaRef; use common_meta_app::principal::FileFormatOptions; use common_meta_types::MetaId; use common_pipeline_sources::input_formats::InputContext; use super::Plan; #[derive(Clone)] pub enum InsertInputSource { SelectPlan(Box<Plan>), // From outside streaming source with 'FORMAT <format_name>; // used in clickhouse handler only; StreamingWithFormat(String, usize, Option<Arc<InputContext>>), // From outside streaming source with 'FILE_FORMAT = (type=<type_name> ...) StreamingWithFileFormat(FileFormatOptions, usize, Option<Arc<InputContext>>), // From cloned String and format Values(String), // From stage Stage(Arc<StageAttachment>), } #[derive(Clone)] pub struct InsertValueBlock { pub block: DataBlock, } #[derive(Clone)] pub struct Insert { pub catalog: String, pub database: String, pub table: String, pub table_id: MetaId, pub schema: TableSchemaRef, pub overwrite: bool, pub source: InsertInputSource, } impl PartialEq for Insert { fn eq(&self, other: &Self) -> bool { self.catalog == other.catalog && self.database == other.database && self.table == other.table && self.schema == other.schema } } impl Insert { pub fn schema(&self) -> DataSchemaRef { Arc::new(self.schema.clone().into()) } pub fn has_select_plan(&self) -> bool { matches!(&self.source, InsertInputSource::SelectPlan(_)) } } impl std::fmt::Debug for Insert { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("Insert") .field("catalog", &self.catalog) .field("database", &self.database) .field("table", &self.table) .field("table_id", &self.table_id) .field("schema", &self.schema) .field("overwrite", &self.overwrite) .finish() } }
//! > winnow, making parsing a breeze //! //! `winnow` is a parser combinator library //! //! Quick links: //! - [List of combinators][crate::combinator] //! - [Tutorial][_tutorial::chapter_0] //! - [Special Topics][_topic] //! - [Discussions](https://github.com/winnow-rs/winnow/discussions) //! //! ## Aspirations //! //! `winnow` aims to be your "do everything" parser, much like people treat regular expressions. //! //! In roughly priority order: //! 1. Support writing parser declaratively while not getting in the way of imperative-style //! parsing when needed, working as an open-ended toolbox rather than a close-ended framework. //! 2. Flexible enough to be used for any application, including parsing binary data, strings, or //! separate lexing and parsing phases //! 3. Zero-cost abstractions, making it easy to write high performance parsers //! 4. Easy to use, making it trivial for one-off uses //! //! In addition: //! - Resilient maintainership, including //! - Willing to break compatibility rather than batching up breaking changes in large releases //! - Leverage feature flags to keep one active branch //! - We will support the last 6 months of rust releases (MSRV, currently 1.64.0) //! //! See also [Special Topic: Why winnow?][crate::_topic::why] //! //! ## Example //! //! Run //! ```console //! $ cargo add winnow //! ``` //! //! Then use it to parse: //! ```rust //! # #[cfg(feature = "alloc")] { #![doc = include_str!("../examples/css/parser.rs")] //! # } //! ``` //! //! See also the [Tutorial][_tutorial::chapter_0] and [Special Topics][_topic] #![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_cfg))] #![cfg_attr(docsrs, feature(extended_key_value_attributes))] #![cfg_attr(not(feature = "std"), no_std)] #![warn(missing_docs)] // BEGIN - Embark standard lints v6 for Rust 1.55+ // do not change or add/remove here, but one can add exceptions after this section // for more info see: <https://github.com/EmbarkStudios/rust-ecosystem/issues/59> // "-Dunsafe_code", #![warn(clippy::all)] #![warn(clippy::await_holding_lock)] #![warn(clippy::char_lit_as_u8)] #![warn(clippy::checked_conversions)] #![warn(clippy::dbg_macro)] #![warn(clippy::debug_assert_with_mut_call)] #![warn(clippy::doc_markdown)] #![warn(clippy::empty_enum)] #![warn(clippy::enum_glob_use)] #![warn(clippy::exit)] #![warn(clippy::expl_impl_clone_on_copy)] #![warn(clippy::explicit_deref_methods)] #![warn(clippy::explicit_into_iter_loop)] #![warn(clippy::fallible_impl_from)] #![warn(clippy::filter_map_next)] #![warn(clippy::flat_map_option)] #![warn(clippy::float_cmp_const)] #![warn(clippy::fn_params_excessive_bools)] #![warn(clippy::from_iter_instead_of_collect)] #![warn(clippy::if_let_mutex)] #![warn(clippy::implicit_clone)] #![warn(clippy::imprecise_flops)] #![warn(clippy::inefficient_to_string)] #![warn(clippy::invalid_upcast_comparisons)] #![warn(clippy::large_digit_groups)] #![warn(clippy::large_stack_arrays)] #![warn(clippy::large_types_passed_by_value)] #![warn(clippy::let_unit_value)] #![warn(clippy::linkedlist)] #![warn(clippy::lossy_float_literal)] #![warn(clippy::macro_use_imports)] #![warn(clippy::manual_ok_or)] #![warn(clippy::map_err_ignore)] #![warn(clippy::map_flatten)] #![warn(clippy::map_unwrap_or)] #![warn(clippy::match_on_vec_items)] #![warn(clippy::match_same_arms)] #![warn(clippy::match_wild_err_arm)] #![warn(clippy::match_wildcard_for_single_variants)] #![warn(clippy::mem_forget)] #![warn(clippy::mismatched_target_os)] #![warn(clippy::missing_enforced_import_renames)] #![warn(clippy::mut_mut)] #![warn(clippy::mutex_integer)] #![warn(clippy::needless_borrow)] #![warn(clippy::needless_continue)] #![warn(clippy::needless_for_each)] #![warn(clippy::option_option)] #![warn(clippy::path_buf_push_overwrite)] #![warn(clippy::ptr_as_ptr)] #![warn(clippy::rc_mutex)] #![warn(clippy::ref_option_ref)] #![warn(clippy::rest_pat_in_fully_bound_structs)] #![warn(clippy::same_functions_in_if_condition)] #![warn(clippy::semicolon_if_nothing_returned)] #![warn(clippy::single_match_else)] #![warn(clippy::string_add_assign)] #![warn(clippy::string_add)] #![warn(clippy::string_lit_as_bytes)] #![warn(clippy::string_to_string)] #![warn(clippy::todo)] #![warn(clippy::trait_duplication_in_bounds)] #![warn(clippy::unimplemented)] #![warn(clippy::unnested_or_patterns)] #![warn(clippy::unused_self)] #![warn(clippy::useless_transmute)] #![warn(clippy::verbose_file_reads)] #![warn(clippy::zero_sized_map_values)] #![warn(future_incompatible)] #![warn(nonstandard_style)] #![warn(rust_2018_idioms)] // END - Embark standard lints v6 for Rust 1.55+ #![allow(clippy::branches_sharing_code)] #![allow(clippy::collapsible_else_if)] #![allow(clippy::if_same_then_else)] #![allow(clippy::bool_assert_comparison)] #![allow(clippy::let_and_return)] #![allow(clippy::assertions_on_constants)] #![allow(clippy::map_unwrap_or)] #![allow(clippy::single_match_else)] #![allow(clippy::single_match)] #![allow(clippy::unnested_or_patterns)] #[cfg_attr(nightly, warn(rustdoc::missing_doc_code_examples))] #[cfg(feature = "alloc")] #[cfg_attr(test, macro_use)] extern crate alloc; #[cfg(doctest)] extern crate doc_comment; #[cfg(doctest)] doc_comment::doctest!("../README.md"); /// Lib module to re-export everything needed from `std` or `core`/`alloc`. This is how `serde` does /// it, albeit there it is not public. #[doc(hidden)] pub(crate) mod lib { /// `std` facade allowing `std`/`core` to be interchangeable. Reexports `alloc` crate optionally, /// as well as `core` or `std` #[cfg(not(feature = "std"))] /// internal std exports for no_std compatibility pub mod std { #[doc(hidden)] #[cfg(not(feature = "alloc"))] pub use core::borrow; #[cfg(feature = "alloc")] #[doc(hidden)] pub use alloc::{borrow, boxed, collections, string, vec}; #[doc(hidden)] pub use core::{cmp, convert, fmt, hash, iter, mem, ops, option, result, slice, str}; /// internal reproduction of std prelude #[doc(hidden)] pub mod prelude { pub use core::prelude as v1; } } #[cfg(feature = "std")] /// internal std exports for `no_std` compatibility pub mod std { #[doc(hidden)] pub use std::{ alloc, borrow, boxed, cmp, collections, convert, fmt, hash, iter, mem, ops, option, result, slice, str, string, vec, }; /// internal reproduction of std prelude #[doc(hidden)] pub mod prelude { pub use std::prelude as v1; } } } #[macro_use] mod macros; #[macro_use] pub mod error; mod parser; pub mod stream; pub mod ascii; pub mod binary; pub mod combinator; pub mod token; pub mod trace; #[cfg(feature = "unstable-doc")] pub mod _topic; #[cfg(feature = "unstable-doc")] pub mod _tutorial; /// Core concepts available for glob import /// /// Including /// - [`StreamIsPartial`][crate::stream::StreamIsPartial] /// - [`Parser`] /// /// ## Example /// /// ```rust /// use winnow::prelude::*; /// /// fn parse_data(input: &mut &str) -> PResult<u64> { /// // ... /// # winnow::ascii::dec_uint(input) /// } /// /// fn main() { /// let result = parse_data.parse("100"); /// assert_eq!(result, Ok(100)); /// } /// ``` pub mod prelude { pub use crate::stream::StreamIsPartial as _; pub use crate::IResult; pub use crate::PResult; pub use crate::Parser; } pub use error::IResult; pub use error::PResult; pub use parser::*; pub use stream::BStr; pub use stream::Bytes; pub use stream::Located; pub use stream::Partial; pub use stream::Stateful; pub use stream::Str;
// `collect` mengkonsumsi iterator dan mengembalikan data berupa array/vector fn main() { let data = [1, 2, 3, 4, 5]; let data_string = ['a', 'b', 'c', 'd']; simple_collect(&data); turbofish_collect(&data); make_string_collect(&data_string); } // simple `collect` dengan mengalikan 2 pada setiap angka // dengan fungsi `map` fn simple_collect(data: &[i32]) { let res: Vec<i32> = data.iter().map(|x| x * 2).collect(); println!("simple_collect: {:?}", res); } // hasilnya hampir sama dengan fungsi `simple_collect` // hanya saja hasil tipe kembalian ditaruh pada `collect` // atau biasa disebut `turbofish` fn turbofish_collect(data: &[i32]) { let res = data.iter().map(|x| x * 2).collect::<Vec<i32>>(); println!("turbofish_collect: {:?}", res); } fn make_string_collect(data: &[char]) { let res: String = data .iter() .map(|&x| x as u8) .map(|x| x as char) .collect(); println!("make_string_collect: {}", res); }
use super::component_prelude::*; #[derive(Default)] pub struct Goal; impl Component for Goal { type Storage = NullStorage<Self>; }
//! This module contains a DataFusion extension node to "split" a //! stream based on an expression. //! //! All rows for which the expression are true are sent to partition //! `0` and all other rows are sent to partition `1`. //! //! There are corresponding [`LogicalPlan`] ([`StreamSplitNode`]) and //! [`ExecutionPlan`] ([`StreamSplitExec`]) implementations, which are //! typically used as shown in the following diagram: //! //! //! ```text //! partition 0 partition 1 //! ▲ ▲ //! │ │ //! └────────────┬──────────┘ //! │ //! │ //! ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ //! StreamSplitExec │ //! │ expr //! ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ //! ▲ //! │ //! ┌────────────────────────┐ //! │ Union │ //! │ │ //! └────────────────────────┘ //! ▲ //! │ //! //! Other IOxScan code //! ┌────────────────────────┐ (Filter, Dedup, etc) //! │ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ ... //! │ StreamSplit │ │ //! │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ │ ▲ //! │ Extension │ │ //! └────────────────────────┘ │ //! ▲ ┌────────────────────────┐ //! │ │ TableProvider │ //! ┌────────────────────────┐ │ │ //! │ TableScan │ └────────────────────────┘ //! │ │ //! └────────────────────────┘ //! //! Execution Plan //! Logical Plan (Physical Plan) //! ``` use std::{ fmt::{self, Debug}, sync::Arc, }; use arrow::{ array::{as_boolean_array, Array, ArrayRef, BooleanArray}, compute::{self, filter_record_batch}, datatypes::SchemaRef, record_batch::RecordBatch, }; use datafusion::{ common::DFSchemaRef, error::{DataFusionError, Result}, execution::context::TaskContext, logical_expr::{Expr, LogicalPlan, UserDefinedLogicalNodeCore}, physical_expr::PhysicalSortRequirement, physical_plan::{ expressions::PhysicalSortExpr, metrics::{BaselineMetrics, ExecutionPlanMetricsSet, MetricsSet, RecordOutput}, ColumnarValue, DisplayAs, DisplayFormatType, Distribution, ExecutionPlan, Partitioning, PhysicalExpr, SendableRecordBatchStream, Statistics, }, scalar::ScalarValue, }; use datafusion_util::{watch::WatchedTask, AdapterStream}; use futures::StreamExt; use observability_deps::tracing::*; use parking_lot::Mutex; use tokio::sync::mpsc::Sender; /// Implements stream splitting described in `make_stream_split` /// /// The resulting execution plan always produces exactly split_exprs's length + 1 partitions: /// /// * partition i (i < split_exprs.len()) are the rows for which the `split_expr[i]` /// evaluates to true. If the rows are evaluated true for both `split_expr[i]` and /// `split_expr[j]`, where i < j, the rows will be sent to partition i. However, /// this will be mostly used in the use case of range expressions (e.g: [2 <= x, 2= x <= 5]) /// in which rows are only evaluated to true in at most one of the expressions. /// * partition n (n = partition split_exprs.len()) are the rows for which all split_exprs /// do not evaluate to true (e.g. Null or false) #[derive(Hash, PartialEq, Eq)] pub struct StreamSplitNode { input: LogicalPlan, split_exprs: Vec<Expr>, } impl StreamSplitNode { /// Create a new `StreamSplitNode` using `split_exprs` to divide the /// rows. All `split_exprs` must evaluate to a boolean otherwise a /// runtime error will occur. pub fn new(input: LogicalPlan, split_exprs: Vec<Expr>) -> Self { Self { input, split_exprs } } pub fn split_exprs(&self) -> &Vec<Expr> { &self.split_exprs } } impl Debug for StreamSplitNode { /// Use explain format for the Debug format. fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { self.fmt_for_explain(f) } } impl UserDefinedLogicalNodeCore for StreamSplitNode { fn name(&self) -> &str { "StreamSplit" } fn inputs(&self) -> Vec<&LogicalPlan> { vec![&self.input] } /// Schema is the same as the input schema fn schema(&self) -> &DFSchemaRef { self.input.schema() } fn expressions(&self) -> Vec<Expr> { self.split_exprs.clone() } fn fmt_for_explain(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{} split_expr={:?}", self.name(), self.split_exprs) } fn from_template(&self, exprs: &[Expr], inputs: &[LogicalPlan]) -> Self { assert_eq!(inputs.len(), 1, "StreamSplitNode: input sizes inconsistent"); Self { input: inputs[0].clone(), split_exprs: (*exprs).to_vec(), } } } /// Tracks the state of the physical operator enum State { New, Running { streams: Vec<Option<SendableRecordBatchStream>>, }, } /// Physical operator that implements steam splitting operation pub struct StreamSplitExec { state: Mutex<State>, input: Arc<dyn ExecutionPlan>, split_exprs: Vec<Arc<dyn PhysicalExpr>>, /// Execution metrics metrics: ExecutionPlanMetricsSet, } impl StreamSplitExec { pub fn new(input: Arc<dyn ExecutionPlan>, split_exprs: Vec<Arc<dyn PhysicalExpr>>) -> Self { let state = Mutex::new(State::New); Self { state, input, split_exprs, metrics: ExecutionPlanMetricsSet::new(), } } } impl Debug for StreamSplitExec { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "StreamSplitExec {:?}", self.split_exprs) } } impl ExecutionPlan for StreamSplitExec { fn as_any(&self) -> &(dyn std::any::Any + 'static) { self } fn schema(&self) -> SchemaRef { self.input.schema() } /// Always produces exactly two outputs fn output_partitioning(&self) -> Partitioning { Partitioning::UnknownPartitioning(self.split_exprs.len() + 1) } fn output_ordering(&self) -> Option<&[PhysicalSortExpr]> { self.input.output_ordering() } /// Always require a single input (eventually we might imagine /// running this on multiple partitions concurrently to compute /// the splits in parallel, but not now) fn required_input_distribution(&self) -> Vec<Distribution> { vec![Distribution::SinglePartition] } fn required_input_ordering(&self) -> Vec<Option<Vec<PhysicalSortRequirement>>> { // require that the output ordering of the child is preserved // (so that this node logically splits what was desired) let requirement = self .input .output_ordering() .map(PhysicalSortRequirement::from_sort_exprs); vec![requirement] } fn children(&self) -> Vec<Arc<dyn ExecutionPlan>> { vec![Arc::clone(&self.input)] } fn with_new_children( self: Arc<Self>, children: Vec<Arc<dyn ExecutionPlan>>, ) -> Result<Arc<dyn ExecutionPlan>> { match children.len() { 1 => Ok(Arc::new(Self::new( Arc::clone(&children[0]), self.split_exprs.clone(), ))), _ => Err(DataFusionError::Internal( "StreamSplitExec wrong number of children".to_string(), )), } } /// Stream split has multiple partitions from 0 to n /// Each partition i includes rows for which `split_exprs[i]` evaluate to true /// /// # Deadlock /// /// This will deadlock unless all partitions are consumed from /// concurrently. Failing to consume from one partition blocks the other /// partitions from progressing. fn execute( &self, partition: usize, context: Arc<TaskContext>, ) -> Result<SendableRecordBatchStream> { trace!(partition, "Start SplitExec::execute"); self.start_if_needed(context)?; let mut state = self.state.lock(); match &mut (*state) { State::New => panic!("should have been initialized"), State::Running { streams } => { assert!(partition < streams.len()); let stream = streams[partition].take().unwrap_or_else(|| { panic!("Error executing stream #{partition} of StreamSplitExec"); }); trace!(partition, "End SplitExec::execute"); Ok(stream) } } } fn metrics(&self) -> Option<MetricsSet> { Some(self.metrics.clone_inner()) } fn statistics(&self) -> Statistics { // For now, don't return any statistics (in the future we // could potentially estimate the output cardinalities) Statistics::default() } } impl DisplayAs for StreamSplitExec { fn fmt_as(&self, t: DisplayFormatType, f: &mut fmt::Formatter<'_>) -> fmt::Result { match t { DisplayFormatType::Default | DisplayFormatType::Verbose => { write!(f, "StreamSplitExec") } } } } impl StreamSplitExec { /// if in State::New, sets up the output running and sets self.state --> `Running` fn start_if_needed(&self, context: Arc<TaskContext>) -> Result<()> { let mut state = self.state.lock(); if matches!(*state, State::Running { .. }) { return Ok(()); } let num_input_streams = self.input.output_partitioning().partition_count(); assert_eq!( num_input_streams, 1, "need exactly one input partition for stream split exec" ); trace!("Setting up SplitStreamExec state"); let input_stream = self.input.execute(0, context)?; let split_exprs = self.split_exprs.clone(); let num_streams = split_exprs.len() + 1; let mut baseline_metrics = Vec::with_capacity(num_streams); let mut txs = Vec::with_capacity(num_streams); let mut rxs = Vec::with_capacity(num_streams); for i in 0..num_streams { baseline_metrics.push(BaselineMetrics::new(&self.metrics, i)); let (tx, rx) = tokio::sync::mpsc::channel(2); txs.push(tx); rxs.push(rx); } // launch the work on a different task, with a task to handle its output values let fut = split_the_stream(input_stream, split_exprs, txs.clone(), baseline_metrics); let handle = WatchedTask::new(fut, txs, "split"); let streams = rxs .into_iter() .map(|rx| { Some(AdapterStream::adapt( self.input.schema(), rx, Arc::clone(&handle), )) }) .collect::<Vec<_>>(); *state = State::Running { streams }; Ok(()) } } /// This function does the actual splitting: evaluates `split_exprs` on /// each input [`RecordBatch`], and then sends the rows to the correct /// output `tx[i]` async fn split_the_stream( mut input_stream: SendableRecordBatchStream, split_exprs: Vec<Arc<dyn PhysicalExpr>>, tx: Vec<Sender<Result<RecordBatch, DataFusionError>>>, baseline_metrics: Vec<BaselineMetrics>, ) -> std::result::Result<(), DataFusionError> { assert_eq!(split_exprs.len() + 1, tx.len()); assert_eq!(tx.len(), baseline_metrics.len()); let elapsed_computes = baseline_metrics .iter() .map(|b| b.elapsed_compute()) .collect::<Vec<_>>(); while let Some(batch) = input_stream.next().await { let batch = batch?; trace!(num_rows = batch.num_rows(), "Processing batch"); // All streams are not done yet let mut tx_done = tx.iter().map(|_| false).collect::<Vec<_>>(); // Get data from the current batch for each stream let mut remaining_indices: Option<ColumnarValue> = None; for i in 0..split_exprs.len() { let timer = elapsed_computes[i].timer(); let expr = &split_exprs[i]; // Compute indices that meets this expr let true_indices = expr.evaluate(&batch)?; // Indices that does not meet this expr let not_true_indices = negate(&true_indices)?; // Indices that do not meet all exprs if let Some(not_true) = remaining_indices { remaining_indices = Some( and(&not_true, &not_true_indices) .expect("Error computing combining negating indices"), ); } else { remaining_indices = Some(not_true_indices); }; // data that meets expr let true_batch = compute_batch(&batch, true_indices, false)?; timer.done(); // record output counts let true_batch = true_batch.record_output(&baseline_metrics[i]); // don't treat a hangup as an error, as it can also be caused // by a LIMIT operation where the entire stream is not // consumed) if let Err(e) = tx[i].send(Ok(true_batch)).await { debug!(%e, "Split tx[{}] hung up, ignoring", i); tx_done[i] = true; } } // last stream of data gets values that did not get routed to other streams let timer = elapsed_computes[elapsed_computes.len() - 1].timer(); let remaining_indices = remaining_indices.expect("The last set of indices of the split should have values"); let final_not_true_batch = compute_batch(&batch, remaining_indices, true)?; timer.done(); // record output counts let final_not_true_batch = final_not_true_batch.record_output(&baseline_metrics[elapsed_computes.len() - 1]); // don't treat a hangup as an error, as it can also be caused // by a LIMIT operation where the entire stream is not // consumed) if let Err(e) = tx[elapsed_computes.len() - 1] .send(Ok(final_not_true_batch)) .await { debug!(%e, "Split tx[{}] hung up, ignoring", elapsed_computes.len()-1); tx_done[elapsed_computes.len() - 1] = true; } if tx_done.iter().all(|x| *x) { debug!("All split tx ends have hung up, stopping loop"); return Ok(()); } } trace!("Splitting done successfully"); Ok(()) } fn compute_batch( input_batch: &RecordBatch, indices: ColumnarValue, last_batch: bool, ) -> Result<RecordBatch> { let batch = match indices { ColumnarValue::Array(indices) => { let indices = indices.as_any().downcast_ref::<BooleanArray>().unwrap(); // include null for last batch if last_batch && indices.null_count() > 0 { // since !Null --> Null, but we want all the // remaining rows, that are not in true_indicies, // transform any nulls into true for this one let mapped_indicies = indices.iter().map(|v| v.or(Some(true))).collect::<Vec<_>>(); filter_record_batch(input_batch, &BooleanArray::from(mapped_indicies)) } else { filter_record_batch(input_batch, indices) }? } ColumnarValue::Scalar(ScalarValue::Boolean(val)) => { let empty_record_batch = RecordBatch::new_empty(input_batch.schema()); match val { Some(true) => input_batch.clone(), Some(false) => empty_record_batch, _ => panic!("mismatched boolean values: {val:?}"), } } _ => { panic!("mismatched array types"); } }; Ok(batch) } /// compute the boolean compliment of the columnar value (which must be boolean) fn negate(v: &ColumnarValue) -> Result<ColumnarValue> { match v { ColumnarValue::Array(arr) => { let arr = arr.as_any().downcast_ref::<BooleanArray>().ok_or_else(|| { let msg = format!("Expected boolean array, but had type {:?}", arr.data_type()); DataFusionError::Internal(msg) })?; let neg_array = Arc::new(compute::not(arr)?) as ArrayRef; Ok(ColumnarValue::Array(neg_array)) } ColumnarValue::Scalar(val) => { if let ScalarValue::Boolean(v) = val { let not_v = v.map(|v| !v); Ok(ColumnarValue::Scalar(ScalarValue::Boolean(not_v))) } else { let msg = format!( "Expected boolean literal, but got type {:?}", val.get_datatype() ); Err(DataFusionError::Internal(msg)) } } } } fn and(left: &ColumnarValue, right: &ColumnarValue) -> Result<ColumnarValue> { match (left, right) { (ColumnarValue::Array(arr_left), ColumnarValue::Array(arr_right)) => { let arr_left = as_boolean_array(arr_left); let arr_right = as_boolean_array(arr_right); let and_array = Arc::new(compute::and(arr_left, arr_right)?) as ArrayRef; Ok(ColumnarValue::Array(and_array)) } (ColumnarValue::Scalar(val_left), ColumnarValue::Scalar(val_right)) => { if let (ScalarValue::Boolean(Some(v_left)), ScalarValue::Boolean(Some(v_right))) = (val_left, val_right) { let and_val = v_left & v_right; Ok(ColumnarValue::Scalar(ScalarValue::Boolean(Some(and_val)))) } else { let msg = format!( "Expected two boolean literals, but got type {:?} and type {:?}", val_left.get_datatype(), val_right.get_datatype() ); Err(DataFusionError::Internal(msg)) } } _ => { panic!("Expected either two boolean arrays or two boolean scalars, but had type {:?} and type {:?}", left.data_type(), right.data_type()); } } } #[cfg(test)] mod tests { use arrow::array::{Int64Array, StringArray}; use arrow_util::assert_batches_sorted_eq; use datafusion::{ physical_plan::memory::MemoryExec, prelude::{col, lit}, }; use datafusion_util::test_collect_partition; use crate::util::df_physical_expr; use super::*; #[tokio::test] async fn test_basic_split() { test_helpers::maybe_start_logging(); let batch0 = RecordBatch::try_from_iter(vec![ ( "int_col", Arc::new(Int64Array::from(vec![1, 2, 3])) as ArrayRef, ), ( "str_col", Arc::new(StringArray::from(vec!["one", "two", "three"])) as ArrayRef, ), ]) .unwrap(); let batch1 = RecordBatch::try_from_iter(vec![ ( "int_col", Arc::new(Int64Array::from(vec![4, -2])) as ArrayRef, ), ( "str_col", Arc::new(StringArray::from(vec!["four", "negative 2"])) as ArrayRef, ), ]) .unwrap(); let input = make_input(vec![vec![batch0, batch1]]); // int_col < 3 let split_expr = df_physical_expr(input.as_ref(), col("int_col").lt(lit(3))).unwrap(); let split_exec: Arc<dyn ExecutionPlan> = Arc::new(StreamSplitExec::new(input, vec![split_expr])); let output0 = test_collect_partition(Arc::clone(&split_exec), 0).await; let expected = vec![ "+---------+------------+", "| int_col | str_col |", "+---------+------------+", "| -2 | negative 2 |", "| 1 | one |", "| 2 | two |", "+---------+------------+", ]; assert_batches_sorted_eq!(&expected, &output0); let output1 = test_collect_partition(split_exec, 1).await; let expected = vec![ "+---------+---------+", "| int_col | str_col |", "+---------+---------+", "| 3 | three |", "| 4 | four |", "+---------+---------+", ]; assert_batches_sorted_eq!(&expected, &output1); } #[tokio::test] async fn test_basic_split_multi_exprs() { test_helpers::maybe_start_logging(); let batch0 = RecordBatch::try_from_iter(vec![ ( "int_col", Arc::new(Int64Array::from(vec![1, 2, 3])) as ArrayRef, ), ( "str_col", Arc::new(StringArray::from(vec!["one", "two", "three"])) as ArrayRef, ), ]) .unwrap(); let batch1 = RecordBatch::try_from_iter(vec![ ( "int_col", Arc::new(Int64Array::from(vec![4, -2])) as ArrayRef, ), ( "str_col", Arc::new(StringArray::from(vec!["four", "negative 2"])) as ArrayRef, ), ]) .unwrap(); let input = make_input(vec![vec![batch0, batch1]]); // int_col < 2 let split_expr1 = df_physical_expr(input.as_ref(), col("int_col").lt(lit::<i16>(2))).unwrap(); // 2 <= int_col < 3 let expr = col("int_col") .gt_eq(lit::<i16>(2)) .and(col("int_col").lt(lit::<i16>(3))); let split_expr2 = df_physical_expr(input.as_ref(), expr).unwrap(); let split_exec: Arc<dyn ExecutionPlan> = Arc::new(StreamSplitExec::new(input, vec![split_expr1, split_expr2])); let output0 = test_collect_partition(Arc::clone(&split_exec), 0).await; let expected = vec![ "+---------+------------+", "| int_col | str_col |", "+---------+------------+", "| -2 | negative 2 |", "| 1 | one |", "+---------+------------+", ]; assert_batches_sorted_eq!(&expected, &output0); let output1 = test_collect_partition(Arc::clone(&split_exec), 1).await; let expected = vec![ "+---------+---------+", "| int_col | str_col |", "+---------+---------+", "| 2 | two |", "+---------+---------+", ]; assert_batches_sorted_eq!(&expected, &output1); let output2 = test_collect_partition(split_exec, 2).await; let expected = vec![ "+---------+---------+", "| int_col | str_col |", "+---------+---------+", "| 3 | three |", "| 4 | four |", "+---------+---------+", ]; assert_batches_sorted_eq!(&expected, &output2); } #[tokio::test] async fn test_constant_split() { // test that it works with a constant expression test_helpers::maybe_start_logging(); let batch0 = RecordBatch::try_from_iter(vec![( "int_col", Arc::new(Int64Array::from(vec![1, 2, 3])) as ArrayRef, )]) .unwrap(); let input = make_input(vec![vec![batch0]]); // use `false` to send all outputs to second stream let split_expr = df_physical_expr(input.as_ref(), lit(false)).unwrap(); let split_exec: Arc<dyn ExecutionPlan> = Arc::new(StreamSplitExec::new(input, vec![split_expr])); let output0 = test_collect_partition(Arc::clone(&split_exec), 0).await; let expected = vec!["+---------+", "| int_col |", "+---------+", "+---------+"]; assert_batches_sorted_eq!(&expected, &output0); let output1 = test_collect_partition(split_exec, 1).await; let expected = vec![ "+---------+", "| int_col |", "+---------+", "| 1 |", "| 2 |", "| 3 |", "+---------+", ]; assert_batches_sorted_eq!(&expected, &output1); } #[tokio::test] async fn test_constant_split_multi_exprs() { // test that it works with a constant expression test_helpers::maybe_start_logging(); let batch0 = RecordBatch::try_from_iter(vec![( "int_col", Arc::new(Int64Array::from(vec![1, 2, 3])) as ArrayRef, )]) .unwrap(); // Test 1: 3 streams but all data is sent to the second one let input = make_input(vec![vec![batch0.clone()]]); // use `false` & `true` to send all outputs to second stream let split_expr1 = df_physical_expr(input.as_ref(), lit(false)).unwrap(); let split_expr2 = df_physical_expr(input.as_ref(), lit(true)).unwrap(); let split_exec: Arc<dyn ExecutionPlan> = Arc::new(StreamSplitExec::new(input, vec![split_expr1, split_expr2])); let output0 = test_collect_partition(Arc::clone(&split_exec), 0).await; let expected = vec!["+---------+", "| int_col |", "+---------+", "+---------+"]; assert_batches_sorted_eq!(&expected, &output0); let output1 = test_collect_partition(Arc::clone(&split_exec), 1).await; let expected = vec![ "+---------+", "| int_col |", "+---------+", "| 1 |", "| 2 |", "| 3 |", "+---------+", ]; assert_batches_sorted_eq!(&expected, &output1); let output2 = test_collect_partition(split_exec, 2).await; let expected = vec!["+---------+", "| int_col |", "+---------+", "+---------+"]; assert_batches_sorted_eq!(&expected, &output2); // ----------------------- // Test 2: 3 streams but all data is sent to the last one let input = make_input(vec![vec![batch0.clone()]]); // use `false` & `false` to send all outputs to third stream let split_expr1 = df_physical_expr(input.as_ref(), lit(false)).unwrap(); let split_expr2 = df_physical_expr(input.as_ref(), lit(false)).unwrap(); let split_exec: Arc<dyn ExecutionPlan> = Arc::new(StreamSplitExec::new(input, vec![split_expr1, split_expr2])); let output0 = test_collect_partition(Arc::clone(&split_exec), 0).await; let expected = vec!["+---------+", "| int_col |", "+---------+", "+---------+"]; assert_batches_sorted_eq!(&expected, &output0); let output1 = test_collect_partition(Arc::clone(&split_exec), 1).await; let expected = vec!["+---------+", "| int_col |", "+---------+", "+---------+"]; assert_batches_sorted_eq!(&expected, &output1); let output2 = test_collect_partition(Arc::clone(&split_exec), 2).await; let expected = vec![ "+---------+", "| int_col |", "+---------+", "| 1 |", "| 2 |", "| 3 |", "+---------+", ]; assert_batches_sorted_eq!(&expected, &output2); // ----------------------- // Test 3: 3 streams but all data is sent to the first let input = make_input(vec![vec![batch0]]); // use `true` & `false` to send all outputs to first stream let split_expr1 = df_physical_expr(input.as_ref(), lit(true)).unwrap(); let split_expr2 = df_physical_expr(input.as_ref(), lit(false)).unwrap(); let split_exec: Arc<dyn ExecutionPlan> = Arc::new(StreamSplitExec::new(input, vec![split_expr1, split_expr2])); let output0 = test_collect_partition(Arc::clone(&split_exec), 0).await; let expected = vec![ "+---------+", "| int_col |", "+---------+", "| 1 |", "| 2 |", "| 3 |", "+---------+", ]; assert_batches_sorted_eq!(&expected, &output0); let output1 = test_collect_partition(Arc::clone(&split_exec), 1).await; let expected = vec!["+---------+", "| int_col |", "+---------+", "+---------+"]; assert_batches_sorted_eq!(&expected, &output1); let output2 = test_collect_partition(Arc::clone(&split_exec), 2).await; let expected = vec!["+---------+", "| int_col |", "+---------+", "+---------+"]; assert_batches_sorted_eq!(&expected, &output2); } #[tokio::test] async fn test_nulls() { // test with null inputs (so rows evaluate to null) test_helpers::maybe_start_logging(); let batch0 = RecordBatch::try_from_iter(vec![( "int_col", Arc::new(Int64Array::from(vec![Some(1), None, Some(2), Some(3)])) as ArrayRef, )]) .unwrap(); let input = make_input(vec![vec![batch0]]); // int_col < 3 let split_expr = df_physical_expr(input.as_ref(), col("int_col").lt(lit(3))).unwrap(); let split_exec: Arc<dyn ExecutionPlan> = Arc::new(StreamSplitExec::new(input, vec![split_expr])); let output0 = test_collect_partition(Arc::clone(&split_exec), 0).await; let expected = vec![ "+---------+", "| int_col |", "+---------+", "| 1 |", "| 2 |", "+---------+", ]; assert_batches_sorted_eq!(&expected, &output0); let output1 = test_collect_partition(split_exec, 1).await; let expected = vec![ "+---------+", "| int_col |", "+---------+", "| |", "| 3 |", "+---------+", ]; assert_batches_sorted_eq!(&expected, &output1); } #[tokio::test] async fn test_nulls_multi_exprs() { // test with null inputs (so rows evaluate to null) test_helpers::maybe_start_logging(); let batch0 = RecordBatch::try_from_iter(vec![( "int_col", Arc::new(Int64Array::from(vec![Some(1), None, Some(2), Some(3)])) as ArrayRef, )]) .unwrap(); let input = make_input(vec![vec![batch0]]); // int_col < 2 let split_expr1 = df_physical_expr(input.as_ref(), col("int_col").lt(lit::<i16>(2))).unwrap(); // 2 <= int_col < 3 let expr = col("int_col") .gt_eq(lit::<i16>(2)) .and(col("int_col").lt(lit::<i16>(3))); let split_expr2 = df_physical_expr(input.as_ref(), expr).unwrap(); let split_exec: Arc<dyn ExecutionPlan> = Arc::new(StreamSplitExec::new(input, vec![split_expr1, split_expr2])); let output0 = test_collect_partition(Arc::clone(&split_exec), 0).await; let expected = vec![ "+---------+", "| int_col |", "+---------+", "| 1 |", "+---------+", ]; assert_batches_sorted_eq!(&expected, &output0); let output1 = test_collect_partition(Arc::clone(&split_exec), 1).await; let expected = vec![ "+---------+", "| int_col |", "+---------+", "| 2 |", "+---------+", ]; assert_batches_sorted_eq!(&expected, &output1); let output2 = test_collect_partition(split_exec, 2).await; let expected = vec![ "+---------+", "| int_col |", "+---------+", "| |", "| 3 |", "+---------+", ]; assert_batches_sorted_eq!(&expected, &output2); } #[tokio::test] #[should_panic(expected = "Expected boolean array, but had type Int64")] async fn test_non_bool() { // test non boolean expression (expect error) test_helpers::maybe_start_logging(); let batch0 = RecordBatch::try_from_iter(vec![( "int_col", Arc::new(Int64Array::from(vec![Some(1), None, Some(2), Some(3)])) as ArrayRef, )]) .unwrap(); let input = make_input(vec![vec![batch0]]); // int_col (not a boolean) let split_expr = df_physical_expr(input.as_ref(), col("int_col")).unwrap(); let split_exec: Arc<dyn ExecutionPlan> = Arc::new(StreamSplitExec::new(input, vec![split_expr])); test_collect_partition(split_exec, 0).await; } fn make_input(partitions: Vec<Vec<RecordBatch>>) -> Arc<dyn ExecutionPlan> { let schema = partitions .iter() .flat_map(|p| p.iter()) .map(|batch| batch.schema()) .next() .expect("must be at least one batch"); let projection = None; let input = MemoryExec::try_new(&partitions, schema, projection).expect("Created MemoryExec"); Arc::new(input) } }
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // run-pass // Tests that automatic coercions from &mut T to *mut T // allow borrows of T to expire immediately - essentially, that // they work identically to 'foo as *mut T' #![feature(nll)] struct SelfReference { self_reference: *mut SelfReference, } impl SelfReference { fn set_self_ref(&mut self) { self.self_reference = self; } } fn main() {}
use nalgebra::Scalar; use crate::Pose; pub mod resampling; #[derive(Clone, Debug)] pub struct ParticleFilter<N: Scalar> { pose: Vec<Pose<N>>, weights: Vec<N>, } // impl<N> StateFilter<N> for ParticleFilter<N> {}
fn main() { let username = "foo"; let username = "bar"; println!("This is it: {}", username); }
extern crate serde; extern crate serde_json; use decisionengine::datasource::applicationdata::ApplicationDataV1; use decisionengine::datasource::experian::ExperianV1_0; use decisionengine::datasource::experian::ExperianV1_1; use decisionengine::datasource::mocks::decisiondatafetcher::{MockedExperianV1_0Fetcher, MockedExperianV1_1Fetcher}; use decisionengine::nodes::EvalNode; use decisionengine::nodes::NodeResult; pub mod applicationdata; pub mod experian; pub mod mocks; pub struct DecisionDataInputNode { handler: Box<Fn(&mut DecisionDataset) -> NodeResult>, } impl EvalNode for DecisionDataInputNode { fn eval(&mut self, decision_dataset: &mut DecisionDataset) -> NodeResult { (self.handler)(decision_dataset) } } pub trait DecisionDataRequestHandler<T> { fn parse_node(path_parts: &mut Vec<&str>) -> DecisionDataInputNode; } pub struct DecisionDataset { application_data_v1: Option<ApplicationDataV1>, experian_v1_0: Option<ExperianV1_0>, experian_v1_0_fetcher: Box<DecisionDataFetcher<ApplicationDataV1, ExperianV1_0>>, experian_v1_1: Option<ExperianV1_1>, experian_v1_1_fetcher: Box<DecisionDataFetcher<ApplicationDataV1, ExperianV1_1>>, } trait DecisionDataFetcher<D, R> { fn fetch(&self, data: &D) -> R; } impl DecisionDataset { pub fn new(application_data: ApplicationDataV1) -> Self { DecisionDataset { application_data_v1: Some(application_data), experian_v1_0: None, experian_v1_0_fetcher: Box::from(MockedExperianV1_0Fetcher::test()), experian_v1_1: None, experian_v1_1_fetcher: Box::from(MockedExperianV1_1Fetcher::test()), } } pub fn get_empty() -> Self { DecisionDataset { application_data_v1: None, experian_v1_0: None, experian_v1_0_fetcher: Box::from(MockedExperianV1_0Fetcher::test()), experian_v1_1: None, experian_v1_1_fetcher: Box::from(MockedExperianV1_1Fetcher::test()), } } pub fn get_application_data_v1(&self) -> Option<&ApplicationDataV1> { self.application_data_v1.as_ref() } pub fn get_experian_v1_0(&mut self) -> Option<&ExperianV1_0> { if self.experian_v1_0.is_none() { self.experian_v1_0 = Some( self.experian_v1_0_fetcher .fetch(self.application_data_v1.as_ref().unwrap()), ) } self.experian_v1_0.as_ref() } pub fn get_experian_v1_1(&mut self) -> Option<&ExperianV1_1> { if self.experian_v1_1.is_none() { self.experian_v1_1 = Some( self.experian_v1_1_fetcher .fetch(self.application_data_v1.as_ref().unwrap()), ) } self.experian_v1_1.as_ref() } } pub fn deserialize_input_node(path: &str) -> (Box<EvalNode>, bool) { let mut path_parts: Vec<&str> = path.split(".").collect(); if path_parts.len() < 2 { panic!(format!("Input {} has length < 2", path)) } ( Box::from(match path_parts.remove(0) { "experian_v1_0" => ExperianV1_0::parse_node(&mut path_parts), "experian_v1_1" => ExperianV1_1::parse_node(&mut path_parts), "application_data_v1" => ApplicationDataV1::parse_node(&mut path_parts), _ => panic!(format!("Cannot parse input {}", path)), }), false, ) }
pub mod handlers; pub mod wheel; use crate::{ io, proto::{self, CommandKind, Event, EventKind, Rpc}, types::ErrorPayloadStack, Error, }; use crossbeam_channel as cc; /// An event or error sent from Discord #[derive(Debug)] pub enum DiscordMsg { Event(Event), Error(Error), } #[async_trait::async_trait] pub trait DiscordHandler: Send + Sync { /// Method called when an [`Event`] or [`Error`] is received from Discord async fn on_message(&self, msg: DiscordMsg); } /// Creates a task which receives raw frame buffers and deserializes them, and either /// notifying the awaiting oneshot for a command response, or in the case of events, /// broadcasting the event to pub(crate) fn handler_task( handler: Box<dyn DiscordHandler>, subscriptions: crate::Subscriptions, stx: cc::Sender<Option<Vec<u8>>>, mut rrx: tokio::sync::mpsc::Receiver<io::IoMsg>, state: crate::State, ) -> tokio::task::JoinHandle<()> { tokio::task::spawn(async move { tracing::debug!("starting handler loop"); let pop_nonce = |nonce: usize| -> Option<crate::NotifyItem> { let mut lock = state.notify_queue.lock(); lock.iter() .position(|item| item.nonce == nonce) .map(|position| lock.swap_remove(position)) }; // Shunt the user handler to a separate task so that we don't care about it blocking // when handling events let (user_tx, mut user_rx) = tokio::sync::mpsc::unbounded_channel(); let user_task = tokio::task::spawn(async move { while let Some(msg) = user_rx.recv().await { handler.on_message(msg).await; } }); macro_rules! user_send { ($msg:expr) => { if user_tx.send($msg).is_err() { tracing::warn!("user handler task has been dropped"); } }; } while let Some(io_msg) = rrx.recv().await { let msg = match io_msg { io::IoMsg::Disconnected(err) => { user_send!(DiscordMsg::Event(Event::Disconnected { reason: err })); continue; } io::IoMsg::Frame(frame) => process_frame(frame), }; match msg { Msg::Event(event) => { if let Event::Ready { .. } = &event { // Spawn a task that subscribes to all of the events // that the caller was interested in when we've finished // the handshake with Discord subscribe_task(subscriptions, stx.clone()); } user_send!(DiscordMsg::Event(event)); } Msg::Command { command, kind } => { use crate::proto::Command; // Some commands can also be turned into events for consistency match &command.inner { Command::Subscribe { evt } => { tracing::debug!(event = ?evt, "subscription succeeded"); continue; } Command::CreateLobby(lobby) => { user_send!(DiscordMsg::Event(Event::LobbyCreate(lobby.clone()))); } Command::ConnectToLobby(lobby) => { user_send!(DiscordMsg::Event(Event::LobbyConnect(lobby.clone()))); } _ => {} } match pop_nonce(command.nonce) { Some(ni) => { if ni .tx .send(if ni.cmd == kind { Ok(command.inner) } else { Err(Error::Discord(crate::DiscordErr::MismatchedResponse { expected: ni.cmd, actual: kind, nonce: command.nonce, })) }) .is_err() { tracing::warn!( cmd = ?kind, nonce = command.nonce, "command response dropped as receiver was closed", ); } } None => { tracing::warn!( cmd = ?command.inner, nonce = command.nonce, "received a command response with an unknown nonce", ); } } } Msg::Error { nonce, error, .. } => match nonce { Some(nonce) => match pop_nonce(nonce) { Some(ni) => { if let Err(err) = ni.tx.send(Err(error)) { tracing::warn!( error = ?err, nonce = nonce, "error result dropped as receiver was closed", ); } } None => { user_send!(DiscordMsg::Error(error)); } }, None => { user_send!(DiscordMsg::Error(error)); } }, } } drop(user_tx); let _ = user_task.await; }) } #[derive(Debug)] pub(crate) enum Msg { Command { command: proto::command::CommandFrame, kind: CommandKind, }, Event(Event), Error { nonce: Option<usize>, error: Error, }, } fn process_frame(data_buf: Vec<u8>) -> Msg { // Discord echoes back our requests with the same nonce they were sent // with, however for those echoes, the "evt" field is not set, other than // for the "ERROR" RPC type, so we attempt to deserialize those two // cases first so we can just ignore the echoes and move on to avoid // further complicating the deserialization of the RPCs we actually // care about #[derive(serde::Deserialize)] struct RawMsg { cmd: Option<CommandKind>, evt: Option<EventKind>, #[serde(deserialize_with = "crate::util::string::deserialize_opt")] nonce: Option<usize>, } let rm: RawMsg = match serde_json::from_slice(&data_buf) { Ok(f) => f, Err(e) => { tracing::warn!( "Failed to deserialize message: {} {}", e, std::str::from_utf8(&data_buf).unwrap(), ); return Msg::Error { nonce: None, error: Error::Json(e), }; } }; match rm.evt { Some(EventKind::Error) => { #[derive(serde::Deserialize)] struct ErrorMsg<'stack> { #[serde(borrow)] data: Option<ErrorPayloadStack<'stack>>, } match serde_json::from_slice::<ErrorMsg<'_>>(&data_buf) { Ok(em) => Msg::Error { nonce: rm.nonce, error: Error::Discord(crate::DiscordErr::Api(em.data.into())), }, Err(e) => Msg::Error { nonce: rm.nonce, error: Error::Discord(crate::DiscordErr::Api(crate::DiscordApiErr::Generic { code: None, message: Some(format!("failed to deserialize error: {}", e)), })), }, } } Some(_) => match serde_json::from_slice::<proto::event::EventFrame>(&data_buf) { Ok(event_frame) => Msg::Event(event_frame.inner), Err(e) => { tracing::warn!( "failed to deserialize event: {:?}", std::str::from_utf8(&data_buf) ); Msg::Error { nonce: rm.nonce, error: Error::Json(e), } } }, None => match serde_json::from_slice(&data_buf) { Ok(cmd_frame) => Msg::Command { command: cmd_frame, kind: rm .cmd .expect("successfully deserialized command with 'cmd' field"), }, Err(e) => { tracing::warn!( "failed to deserialize command: {:?}", std::str::from_utf8(&data_buf) ); Msg::Error { nonce: rm.nonce, error: Error::Json(e), } } }, } } fn subscribe_task(subs: crate::Subscriptions, stx: cc::Sender<Option<Vec<u8>>>) { tokio::task::spawn(async move { // Assume a max of 64KiB write size and just write all of the // subscriptions into a single buffer rather than n let mut buffer = Vec::with_capacity(1024); let mut nonce = 1usize; let mut push = |kind: EventKind| { #[cfg(target_pointer_width = "32")] let nunce = 0x10000000 | nonce; #[cfg(target_pointer_width = "64")] let nunce = 0x1000000000000000 | nonce; let _ = io::serialize_message( io::OpCode::Frame, &Rpc::<()> { cmd: CommandKind::Subscribe, evt: Some(kind), nonce: nunce.to_string(), args: None, }, &mut buffer, ); nonce += 1; }; let activity = if subs.contains(crate::Subscriptions::ACTIVITY) { [ EventKind::ActivityInvite, EventKind::ActivityJoin, EventKind::ActivityJoinRequest, EventKind::ActivitySpectate, ] .iter() } else { [].iter() }; let lobby = if subs.contains(crate::Subscriptions::LOBBY) { [ EventKind::LobbyDelete, EventKind::LobbyMemberConnect, EventKind::LobbyMemberDisconnect, EventKind::LobbyMemberUpdate, EventKind::LobbyMessage, EventKind::LobbyUpdate, EventKind::SpeakingStart, EventKind::SpeakingStop, ] .iter() } else { [].iter() }; let user = if subs.contains(crate::Subscriptions::USER) { [EventKind::CurrentUserUpdate].iter() } else { [].iter() }; let relations = if subs.contains(crate::Subscriptions::RELATIONSHIPS) { [EventKind::RelationshipUpdate].iter() } else { [].iter() }; activity .chain(lobby) .chain(user) .chain(relations) .for_each(|kind| { push(*kind); }); // Unlike EVERY other event, subscribing to OVERLAY_UPDATE requires // an argument... :facepalm: if subs.contains(crate::Subscriptions::OVERLAY) { #[cfg(target_pointer_width = "32")] let nunce = 0x10000000 | nonce; #[cfg(target_pointer_width = "64")] let nunce = 0x1000000000000000 | nonce; let _ = io::serialize_message( io::OpCode::Frame, &Rpc { cmd: CommandKind::Subscribe, evt: Some(EventKind::OverlayUpdate), nonce: nunce.to_string(), args: Some(crate::overlay::OverlayPidArgs::new()), }, &mut buffer, ); //nonce += 1; } if stx.send(Some(buffer)).is_err() { tracing::warn!("unable to send subscription RPCs to I/O task"); } }); }
use piston_window::{PistonWindow, WindowSettings}; use piston_window::{Context, G2d}; use piston_window::{rectangle, clear}; use piston_window::types::Color; use piston_window::color::{BLACK, WHITE}; use crate::ball::Ball; use crate::terrain::Terrain; const BLOCK_SIZE:f64 = 25.0; pub enum Col { White, } pub fn color(color: Col) -> Color { match color { Col::White => WHITE, } } pub fn clear_screen(g: &mut G2d) { clear(BLACK, g); } pub fn get_window(name: &str, width: u32, height: u32) -> PistonWindow { WindowSettings::new(name, [width, height]).exit_on_esc(true).build().unwrap() } pub fn draw_rectangle(color: Color, x: f64, y:f64, c: Context, g: &mut G2d) { rectangle(color, [x, y, BLOCK_SIZE, BLOCK_SIZE], c.transform, g); } impl Ball { pub fn draw(&self, color: Color, c: Context, g: &mut G2d) { draw_rectangle(color, f64::from(self.x), f64::from(self.y), c, g) } } impl Terrain { pub fn draw(&self, color: Color, c: Context, g: &mut G2d) { for w in (self.width_start..self.width+1).step_by(BLOCK_SIZE as usize) { draw_rectangle(color, f64::from(w), f64::from(self.height_start), c, g); draw_rectangle(color, f64::from(w), f64::from(self.height), c, g); } for h in (self.height_start..self.height+1).step_by(BLOCK_SIZE as usize) { draw_rectangle(color, f64::from(self.width_start), f64::from(h), c, g); draw_rectangle(color, f64::from(self.width), f64::from(h), c, g); } } }
// The MIT License (MIT) // // Copyright (c) 2015 FaultyRAM // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. use super::{ZWord, ZSWord}; pub fn eq(a: ZWord, b: ZWord) -> bool { (a as ZSWord) == (b as ZSWord) } pub fn gt(a: ZWord, b: ZWord) -> bool { (a as ZSWord) > (b as ZSWord) } pub fn lt(a: ZWord, b: ZWord) -> bool { (a as ZSWord) < (b as ZSWord) } pub fn ge(a: ZWord, b: ZWord) -> bool { (a as ZSWord) >= (b as ZSWord) } pub fn le(a: ZWord, b: ZWord) -> bool { (a as ZSWord) <= (b as ZSWord) } pub fn mul(a: ZWord, b: ZWord) -> ZSWord { (a as ZSWord).wrapping_mul(b as ZSWord) } pub fn add(a: ZWord, b: ZWord) -> ZSWord { (a as ZSWord).wrapping_add(b as ZSWord) } pub fn sub(a: ZWord, b: ZWord) -> ZSWord { (a as ZSWord).wrapping_sub(b as ZSWord) } pub fn div(a: ZWord, b: ZWord) -> Result<ZSWord, String> { if b == 0 { return Err(String::from("Division by zero")) } Ok((a as ZSWord).wrapping_div(b as ZSWord)) } pub fn rem(a: ZWord, b: ZWord) -> Result<ZSWord, String> { if b == 0 { return Err(String::from("Division by zero")) } Ok((a as ZSWord).wrapping_rem(b as ZSWord)) }
//! Locality-preserving maps between `(u32,u32)` and `u64`. //! //! The Hilbert space-filling curve and Z-Order are two maps between pairs of `u32` values and a //! single `u64` value with the property that locality in both elements of the pair results in //! locality in the larger value. Technically, the Z-Order does skip around a bit, but does so //! infrequently. //! //! The Z-Order is easily understood as interleaving the bits of the `(u32, u32)` pair into a `u64`, //! and de-interleaving the bits from the `u64` back to a `(u32, u32)` pair. The Hilbert curve is //! more complicated. /// Map between `(u32, u32)` and `u64`. pub trait Tangle { /// Maps a `(u32, u32)` pair to a `u64`. fn entangle(&self, (u32, u32)) -> u64; /// Maps a `u64` to a `(u32, u32)` pair. fn detangle(&self, u64) -> (u32, u32); } /// Tangles u32 pairs by interleaving their bits pub struct ZOrder { entangle: Vec<u16>, detangle: Vec<(u8, u8)>, } impl ZOrder { // creates a new ZOrder tangler pub fn new() -> ZOrder { let mut entangle = vec![0u16; 65536]; let mut detangle = vec![(0u8, 0u8); 65536]; for x in 0..256 { for y in 0..256 { let mut z = 0; for b in 0..8 { z += ((x >> b) & 0x01) << (2 * b); z += ((y >> b) & 0x01) << ((2 * b) + 1); } detangle[z] = (x as u8, y as u8); entangle[(x << 8) + y] = z as u16; } } ZOrder { entangle: entangle, detangle: detangle, } } } impl Tangle for ZOrder { // entangles byte at a time #[inline] fn entangle(&self, (x, y): (u32, u32)) -> u64 { let x = x as usize; let y = y as usize; ((self.entangle[(((x >> 0) % 256) << 8) + ((y >> 0) % 256)] as u64) << 0) + ((self.entangle[(((x >> 8) % 256) << 8) + ((y >> 8) % 256)] as u64) << 16) + ((self.entangle[(((x >> 16) % 256) << 8) + ((y >> 16) % 256)] as u64) << 32) + ((self.entangle[(((x >> 24) % 256) << 8) + ((y >> 24) % 256)] as u64) << 48) } // detangles byte at a time #[inline] fn detangle(&self, tangle: u64) -> (u32, u32) { let (x0,y0) = self.detangle[(tangle as usize >> 0) % 65536]; let (x1,y1) = self.detangle[(tangle as usize >> 16) % 65536]; let (x2,y2) = self.detangle[(tangle as usize >> 32) % 65536]; let (x3,y3) = self.detangle[(tangle as usize >> 48) % 65536]; (x0 as u32 + ((x1 as u32) << 8) + ((x2 as u32) << 16) + ((x3 as u32) << 24), y0 as u32 + ((y1 as u32) << 8) + ((y2 as u32) << 16) + ((y3 as u32) << 24)) } } /// Tangles u32 pairs along a Hilbert space-filling curve pub struct Hilbert { entangle: Vec<u16>, // entangle[x_byte << 16 + y_byte] -> tangle detangle: Vec<(u8, u8)>, // detangle[tangle] -> (x_byte, y_byte) rotation: Vec<u8>, // info on rotation, keyed per self.entangle } impl Hilbert { pub fn new() -> Hilbert { let mut entangle = Vec::new(); let mut detangle: Vec<_> = (0..65536).map(|_| (0u8, 0u8)).collect(); let mut rotation = Vec::new(); for x in (0u32..256) { for y in (0u32..256) { let entangled = Hilbert::bit_entangle(((x << 24), (y << 24) + (1 << 23))); entangle.push((entangled >> 48) as u16); detangle[(entangled >> 48) as usize] = (x as u8, y as u8); rotation.push(((entangled >> 44) & 0x0F) as u8); // note to self: math is hard. // rotation decode: lsbs // 0100 -N--> 0100 --> 0100 // 0100 -S--> 1000 --> 1110 // 0100 -F--> 1011 --> 1100 // 0100 -FS-> 0111 --> 0110 } } return Hilbert {entangle: entangle, detangle: detangle, rotation: rotation}; } // entangle operator implemented bitwise fn bit_entangle(mut pair: (u32, u32)) -> u64 { let mut result = 0u64; for log_s_rev in (0 .. 32) { let log_s = 31 - log_s_rev; let rx = (pair.0 >> log_s) & 1u32; let ry = (pair.1 >> log_s) & 1u32; result += (((3 * rx) ^ ry) as u64) << (2 * log_s); pair = Hilbert::bit_rotate(log_s, pair, rx, ry); } return result; } // detangle operator implemented bitwise fn bit_detangle(tangle: u64) -> (u32, u32) { let mut result = (0u32, 0u32); for log_s in (0 .. 32) { let shifted = ((tangle >> (2 * log_s)) & 3u64) as u32; let rx = (shifted >> 1) & 1u32; let ry = (shifted ^ rx) & 1u32; result = Hilbert::bit_rotate(log_s, result, rx, ry); result = (result.0 + (rx << log_s), result.1 + (ry << log_s)); } return result; } // rotation of pair based on residual bits rx and ry fn bit_rotate(logn: usize, pair: (u32, u32), rx: u32, ry: u32) -> (u32, u32) { if ry == 0 { if rx != 0 { let ::std::num::Wrapping(off) = (::std::num::Wrapping(1u32) << logn) - ::std::num::Wrapping(1u32); (off - pair.1, off - pair.0) } else { (pair.1, pair.0) } } else { pair } } } impl Tangle for Hilbert { // entangles byte at a time #[inline] fn entangle(&self, (mut x, mut y): (u32, u32)) -> u64 { let init_x = x; let init_y = y; let mut result = 0u64; for i in 0..4 { let x_byte = (x >> (24 - (8 * i))) as u8; let y_byte = (y >> (24 - (8 * i))) as u8; result = (result << 16) + self.entangle[(((x_byte as u16) << 8) + y_byte as u16) as usize] as u64; let rotation = self.rotation[(((x_byte as u16) << 8) + y_byte as u16) as usize]; if (rotation & 0x2) > 0 { let temp = x; x = y; y = temp; } if rotation == 12 || rotation == 6 { x = 0xFFFFFFFF - x; y = 0xFFFFFFFF - y } } debug_assert!(Hilbert::bit_entangle((init_x, init_y)) == result); return result; } // detangles byte at a time #[inline] fn detangle(&self, tangle: u64) -> (u32, u32) { let init_tangle = tangle; let mut result = (0u32, 0u32); for log_s in 0..4 { let shifted = (tangle >> (16 * log_s)) as u16; let (x_byte, y_byte) = self.detangle[shifted as usize]; let rotation = self.rotation[(((x_byte as u16) << 8) + y_byte as u16) as usize]; if rotation == 12 || rotation == 6 { result.0 = (1 << 8 * log_s) - result.0 - 1; result.1 = (1 << 8 * log_s) - result.1 - 1; } if (rotation & 0x2) > 0 { let temp = result.0; result.0 = result.1; result.1 = temp; } result.0 += (x_byte as u32) << (8 * log_s); result.1 += (y_byte as u32) << (8 * log_s); } debug_assert!(Hilbert::bit_detangle(init_tangle) == result); return result; } } pub struct BytewiseCached { hilbert: Hilbert, prev_hi: u64, prev_out: (u32, u32), prev_rot: (bool, bool), } impl BytewiseCached { #[inline(always)] pub fn detangle(&mut self, tangle: u64) -> (u32, u32) { let (mut x_byte, mut y_byte) = unsafe { *self.hilbert.detangle.get_unchecked(tangle as u16 as usize) }; // validate self.prev_rot, self.prev_out if self.prev_hi != (tangle >> 16) { self.prev_hi = tangle >> 16; // detangle with a bit set to see what happens to it let low = 255; //self.hilbert.entangle((0xF, 0)) as u16; let (x, y) = self.hilbert.detangle((self.prev_hi << 16) + low as u64); let value = (x as u8, y as u8); self.prev_rot = match value { (0x0F, 0x00) => (false, false), // nothing (0x00, 0x0F) => (true, false), // swapped (0xF0, 0xFF) => (false, true), // flipped (0xFF, 0xF0) => (true, true), // flipped & swapped val => panic!(format!("Found : ({:x}, {:x})", val.0, val.1)), }; self.prev_out = (x & 0xFFFFFF00, y & 0xFFFFFF00); } if self.prev_rot.1 { x_byte = 255 - x_byte; y_byte = 255 - y_byte; } if self.prev_rot.0 { let temp = x_byte; x_byte = y_byte; y_byte = temp; } return (self.prev_out.0 + x_byte as u32, self.prev_out.1 + y_byte as u32); } pub fn new() -> BytewiseCached { let mut result = BytewiseCached { hilbert: Hilbert::new(), prev_hi: 0xFFFFFFFFFFFFFFFF, prev_out: (0,0), prev_rot: (false, false), }; result.detangle(0); // ensures that we set the cached stuff correctly return result; } }
use clap::{App, Arg}; use iron_carrier::config::Config; use std::process::exit; #[tokio::main] async fn main() { let matches = App::new("Iron Carrier") .version("0.1") .author("Ilson Roberto Balliego Junior <ilson.balliego@gmail.com>") .about("Synchronize your files") .arg( Arg::with_name("config") .help("Sets the config file to use") .value_name("Config") .required(true) .takes_value(true), ) .arg( Arg::with_name("auto-exit") .help("Auto exit after sync") .long("auto-exit") .short("e"), ) .arg( Arg::with_name("v") .short("v") .multiple(true) .help("Sets the level of verbosity"), ) .get_matches(); let config = matches .value_of("config") .expect("You must provide a configuration path"); let verbosity = matches.occurrences_of("v") as usize; let auto_exit = matches.is_present("auto-exit"); stderrlog::new() .module(module_path!()) .verbosity(verbosity) .timestamp(stderrlog::Timestamp::Second) .init() .unwrap(); let config = match Config::new(config) { Ok(config) => config, Err(e) => { log::error!("{}", e); exit(-1) } }; let mut s = iron_carrier::sync::Synchronizer::new(config); if let Err(e) = s.start(auto_exit).await { log::error!("{}", e); exit(-1) }; }
use sqlx::Sqlite; use sqlx_test::test_type; test_type!(null( Sqlite, Option<i32>, "NULL" == None::<i32> )); test_type!(bool(Sqlite, bool, "FALSE" == false, "TRUE" == true)); test_type!(i32(Sqlite, i32, "94101" == 94101_i32)); test_type!(i64(Sqlite, i64, "9358295312" == 9358295312_i64)); // NOTE: This behavior can be surprising. Floating-point parameters are widening to double which can // result in strange rounding. test_type!(f32( Sqlite, f32, "3.1410000324249268" == 3.141f32 as f64 as f32 )); test_type!(f64( Sqlite, f64, "939399419.1225182" == 939399419.1225182_f64 )); test_type!(string( Sqlite, String, "'this is foo'" == "this is foo", "''" == "" )); test_type!(bytes( Sqlite, Vec<u8>, "X'DEADBEEF'" == vec![0xDE_u8, 0xAD, 0xBE, 0xEF], "X''" == Vec::<u8>::new(), "X'0000000052'" == vec![0_u8, 0, 0, 0, 0x52] ));
#[derive(Copy, Clone)] pub struct Decoder; impl toml_test_harness::Decoder for Decoder { fn name(&self) -> &str { "toml_edit" } fn decode(&self, data: &[u8]) -> Result<toml_test_harness::Decoded, toml_test_harness::Error> { let data = std::str::from_utf8(data).map_err(toml_test_harness::Error::new)?; let document = data .parse::<toml_edit::Document>() .map_err(toml_test_harness::Error::new)?; document_to_decoded(&document) } } fn document_to_decoded( value: &toml_edit::Document, ) -> Result<toml_test_harness::Decoded, toml_test_harness::Error> { table_to_decoded(value) } fn item_to_decoded( value: &toml_edit::Item, ) -> Result<toml_test_harness::Decoded, toml_test_harness::Error> { match value { toml_edit::Item::None => unreachable!("No nones"), toml_edit::Item::Value(v) => value_to_decoded(v), toml_edit::Item::Table(v) => table_to_decoded(v), toml_edit::Item::ArrayOfTables(v) => { let v: Result<_, toml_test_harness::Error> = v.iter().map(table_to_decoded).collect(); Ok(toml_test_harness::Decoded::Array(v?)) } } } fn value_to_decoded( value: &toml_edit::Value, ) -> Result<toml_test_harness::Decoded, toml_test_harness::Error> { match value { toml_edit::Value::Integer(v) => Ok(toml_test_harness::Decoded::Value( toml_test_harness::DecodedValue::from(*v.value()), )), toml_edit::Value::String(v) => Ok(toml_test_harness::Decoded::Value( toml_test_harness::DecodedValue::from(v.value()), )), toml_edit::Value::Float(v) => Ok(toml_test_harness::Decoded::Value( toml_test_harness::DecodedValue::from(*v.value()), )), toml_edit::Value::Datetime(v) => { let v = v.value(); let value = v.to_string(); let value = match (v.date.is_some(), v.time.is_some(), v.offset.is_some()) { (true, true, true) => toml_test_harness::DecodedValue::Datetime(value), (true, true, false) => toml_test_harness::DecodedValue::DatetimeLocal(value), (true, false, false) => toml_test_harness::DecodedValue::DateLocal(value), (false, true, false) => toml_test_harness::DecodedValue::TimeLocal(value), _ => unreachable!("Unsupported case"), }; Ok(toml_test_harness::Decoded::Value(value)) } toml_edit::Value::Boolean(v) => Ok(toml_test_harness::Decoded::Value( toml_test_harness::DecodedValue::from(*v.value()), )), toml_edit::Value::Array(v) => { let v: Result<_, toml_test_harness::Error> = v.iter().map(value_to_decoded).collect(); Ok(toml_test_harness::Decoded::Array(v?)) } toml_edit::Value::InlineTable(v) => inline_table_to_decoded(v), } } fn table_to_decoded( value: &toml_edit::Table, ) -> Result<toml_test_harness::Decoded, toml_test_harness::Error> { let table: Result<_, toml_test_harness::Error> = value .iter() .map(|(k, v)| { let k = k.to_owned(); let v = item_to_decoded(v)?; Ok((k, v)) }) .collect(); Ok(toml_test_harness::Decoded::Table(table?)) } fn inline_table_to_decoded( value: &toml_edit::InlineTable, ) -> Result<toml_test_harness::Decoded, toml_test_harness::Error> { let table: Result<_, toml_test_harness::Error> = value .iter() .map(|(k, v)| { let k = k.to_owned(); let v = value_to_decoded(v)?; Ok((k, v)) }) .collect(); Ok(toml_test_harness::Decoded::Table(table?)) }
#[derive(Debug, Clone, PartialEq)] pub enum Expr { Number(f64), Add(Box<Expr>, Box<Expr>), Sub(Box<Expr>, Box<Expr>), Mul(Box<Expr>, Box<Expr>), Div(Box<Expr>, Box<Expr>), Pow(Box<Expr>, Box<Expr>), } #[derive(Debug, Clone, PartialEq)] pub enum RuntimeError { ZeroDivision, } impl Expr { pub fn eval(&self) -> Result<f64, RuntimeError> { match self { Expr::Number(n) => Ok(*n), Expr::Add(a, b) => Ok(a.eval()? + b.eval()?), Expr::Sub(a, b) => Ok(a.eval()? - b.eval()?), Expr::Mul(a, b) => Ok(a.eval()? * b.eval()?), Expr::Div(a, b) => { let a = a.eval()?; let b = b.eval()?; if b == 0.0 { Err(RuntimeError::ZeroDivision) } else { Ok(a / b) } } Expr::Pow(a, b) => Ok(a.eval()?.powf(b.eval()?)), } } }
use crate::prelude::*; use std::os::raw::c_void; #[repr(C)] #[derive(Debug)] pub struct VkCopyDescriptorSet { pub sType: VkStructureType, pub pNext: *const c_void, pub srcSet: VkDescriptorSet, pub srcBinding: u32, pub srcArrayElement: u32, pub dstSet: VkDescriptorSet, pub dstBinding: u32, pub dstArrayElement: u32, pub descriptorCount: u32, }
// Copyright 2012 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 #![feature(non_exhaustive)] #[non_exhaustive] pub struct NormalStruct { pub first_field: u16, pub second_field: u16, } #[non_exhaustive] pub struct UnitStruct; #[non_exhaustive] pub struct TupleStruct (pub u16, pub u16); fn main() { let ns = NormalStruct { first_field: 640, second_field: 480 }; let NormalStruct { first_field, second_field } = ns; let ts = TupleStruct { 0: 340, 1: 480 }; let ts_constructor = TupleStruct(340, 480); let TupleStruct { 0: first, 1: second } = ts; let TupleStruct(first, second) = ts_constructor; let us = UnitStruct {}; let us_constructor = UnitStruct; let UnitStruct { } = us; }
use super::Material; use crate::{Color, Ray, Vec3}; pub struct Lambertian { albedo: Color, } impl Lambertian { pub fn new(albedo: Color) -> Self { Self { albedo } } } impl Material for Lambertian { fn scatter( &self, _ray: &crate::Ray, rec: &mut crate::HitRecord, attenuation: &mut Color, scattered: &mut crate::Ray, ) -> bool { let mut direction = rec.normal + Vec3::random_unit_vector(); if direction.approx_cero() { direction = rec.normal; } *scattered = Ray::new(rec.p, direction); *attenuation = self.albedo; true } }
//! phd is a small, easy-to-use Gopher server that tries to make //! serving up a Gopher site quick and painless. Best used for local //! development or low traffic Gopher sites. #![allow(unused_must_use)] #![warn(absolute_paths_not_starting_with_crate)] #![warn(explicit_outlives_requirements)] #![warn(unreachable_pub)] #![warn(deprecated_in_future)] #![warn(missing_docs)] #![allow(clippy::while_let_on_iterator)] pub mod color; pub mod gopher; pub mod request; pub mod server; pub use crate::request::Request; /// Alias for a generic Result type. pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;
use darling::ast::{Data, Style}; use proc_macro::TokenStream; use quote::quote; use syn::{Error, Type}; use crate::{ args, args::{RenameRuleExt, RenameTarget}, utils::{get_crate_name, get_rustdoc, visible_fn, GeneratorResult}, }; pub fn generate(object_args: &args::OneofObject) -> GeneratorResult<TokenStream> { let crate_name = get_crate_name(object_args.internal); let (impl_generics, ty_generics, where_clause) = object_args.generics.split_for_impl(); let ident = &object_args.ident; let desc = get_rustdoc(&object_args.attrs)? .map(|s| quote! { ::std::option::Option::Some(::std::string::ToString::to_string(#s)) }) .unwrap_or_else(|| quote! {::std::option::Option::None}); let inaccessible = object_args.inaccessible; let tags = object_args .tags .iter() .map(|tag| quote!(::std::string::ToString::to_string(#tag))) .collect::<Vec<_>>(); let gql_typename = if !object_args.name_type { let name = object_args .input_name .clone() .or_else(|| object_args.name.clone()) .unwrap_or_else(|| RenameTarget::Type.rename(ident.to_string())); quote!(::std::borrow::Cow::Borrowed(#name)) } else { quote!(<Self as #crate_name::TypeName>::type_name()) }; let s = match &object_args.data { Data::Enum(s) => s, _ => { return Err( Error::new_spanned(ident, "InputObject can only be applied to an enum.").into(), ) } }; let mut enum_names = Vec::new(); let mut schema_fields = Vec::new(); let mut parse_item = Vec::new(); let mut put_fields = Vec::new(); for variant in s { let enum_name = &variant.ident; let field_name = variant.name.clone().unwrap_or_else(|| { object_args .rename_fields .rename(enum_name.to_string(), RenameTarget::Field) }); let inaccessible = variant.inaccessible; let tags = variant .tags .iter() .map(|tag| quote!(::std::string::ToString::to_string(#tag))) .collect::<Vec<_>>(); let desc = get_rustdoc(&object_args.attrs)? .map(|s| quote! { ::std::option::Option::Some(::std::string::ToString::to_string(#s)) }) .unwrap_or_else(|| quote! {::std::option::Option::None}); let ty = match variant.fields.style { Style::Tuple if variant.fields.fields.len() == 1 => &variant.fields.fields[0], Style::Tuple => { return Err(Error::new_spanned( enum_name, "Only single value variants are supported", ) .into()) } Style::Unit => { return Err( Error::new_spanned(enum_name, "Empty variants are not supported").into(), ) } Style::Struct => { return Err(Error::new_spanned( enum_name, "Variants with named fields are not supported", ) .into()) } }; if let Type::Path(_) = ty { enum_names.push(enum_name); let secret = variant.secret; let visible = visible_fn(&variant.visible); schema_fields.push(quote! { fields.insert(::std::borrow::ToOwned::to_owned(#field_name), #crate_name::registry::MetaInputValue { name: ::std::string::ToString::to_string(#field_name), description: #desc, ty: <::std::option::Option<#ty> as #crate_name::InputType>::create_type_info(registry), default_value: ::std::option::Option::None, visible: #visible, inaccessible: #inaccessible, tags: ::std::vec![ #(#tags),* ], is_secret: #secret, }); }); let validators = variant .validator .clone() .unwrap_or_default() .create_validators( &crate_name, quote!(&value), Some(quote!(.map_err(#crate_name::InputValueError::propagate))), )?; parse_item.push(quote! { if obj.contains_key(#field_name) && obj.len() == 1 { let value = #crate_name::InputType::parse(obj.remove(#field_name)).map_err(#crate_name::InputValueError::propagate)?; #validators return ::std::result::Result::Ok(Self::#enum_name(value)); } }); put_fields.push(quote! { Self::#enum_name(value) => { map.insert(#crate_name::Name::new(#field_name), #crate_name::InputType::to_value(value)); } }); } else { return Err(Error::new_spanned(ty, "Invalid type").into()); } } let visible = visible_fn(&object_args.visible); let expanded = if object_args.concretes.is_empty() { quote! { impl #crate_name::InputType for #ident { type RawValueType = Self; fn type_name() -> ::std::borrow::Cow<'static, ::std::primitive::str> { #gql_typename } fn create_type_info(registry: &mut #crate_name::registry::Registry) -> ::std::string::String { registry.create_input_type::<Self, _>(#crate_name::registry::MetaTypeId::InputObject, |registry| #crate_name::registry::MetaType::InputObject { name: ::std::borrow::Cow::into_owned(#gql_typename), description: #desc, input_fields: { let mut fields = #crate_name::indexmap::IndexMap::new(); #(#schema_fields)* fields }, visible: #visible, inaccessible: #inaccessible, tags: ::std::vec![ #(#tags),* ], rust_typename: ::std::option::Option::Some(::std::any::type_name::<Self>()), oneof: true, }) } fn parse(value: ::std::option::Option<#crate_name::Value>) -> #crate_name::InputValueResult<Self> { if let ::std::option::Option::Some(#crate_name::Value::Object(mut obj)) = value { #(#parse_item)* ::std::result::Result::Err(#crate_name::InputValueError::expected_type(#crate_name::Value::Object(obj))) } else { ::std::result::Result::Err(#crate_name::InputValueError::expected_type(value.unwrap_or_default())) } } fn to_value(&self) -> #crate_name::Value { let mut map = #crate_name::indexmap::IndexMap::new(); match self { #(#put_fields)* } #crate_name::Value::Object(map) } fn federation_fields() -> ::std::option::Option<::std::string::String> { ::std::option::Option::None } fn as_raw_value(&self) -> ::std::option::Option<&Self::RawValueType> { ::std::option::Option::Some(self) } } impl #crate_name::InputObjectType for #ident {} impl #crate_name::OneofObjectType for #ident {} } } else { let mut code = Vec::new(); code.push(quote! { #[allow(clippy::all, clippy::pedantic)] impl #impl_generics #ident #ty_generics #where_clause { fn __internal_create_type_info(registry: &mut #crate_name::registry::Registry, name: &str) -> ::std::string::String where Self: #crate_name::InputType { registry.create_input_type::<Self, _>(#crate_name::registry::MetaTypeId::InputObject, |registry| #crate_name::registry::MetaType::InputObject { name: ::std::borrow::ToOwned::to_owned(name), description: #desc, input_fields: { let mut fields = #crate_name::indexmap::IndexMap::new(); #(#schema_fields)* fields }, visible: #visible, inaccessible: #inaccessible, tags: ::std::vec![ #(#tags),* ], rust_typename: ::std::option::Option::Some(::std::any::type_name::<Self>()), oneof: true, }) } fn __internal_parse(value: ::std::option::Option<#crate_name::Value>) -> #crate_name::InputValueResult<Self> where Self: #crate_name::InputType { if let ::std::option::Option::Some(#crate_name::Value::Object(mut obj)) = value { #(#parse_item)* ::std::result::Result::Err(#crate_name::InputValueError::expected_type(#crate_name::Value::Object(obj))) } else { ::std::result::Result::Err(#crate_name::InputValueError::expected_type(value.unwrap_or_default())) } } fn __internal_to_value(&self) -> #crate_name::Value where Self: #crate_name::InputType { let mut map = #crate_name::indexmap::IndexMap::new(); match self { #(#put_fields)* } #crate_name::Value::Object(map) } } }); for concrete in &object_args.concretes { let gql_typename = &concrete.name; let params = &concrete.params.0; let concrete_type = quote! { #ident<#(#params),*> }; let expanded = quote! { #[allow(clippy::all, clippy::pedantic)] impl #crate_name::InputType for #concrete_type { type RawValueType = Self; fn type_name() -> ::std::borrow::Cow<'static, ::std::primitive::str> { ::std::borrow::Cow::Borrowed(#gql_typename) } fn create_type_info(registry: &mut #crate_name::registry::Registry) -> ::std::string::String { Self::__internal_create_type_info(registry, #gql_typename) } fn parse(value: ::std::option::Option<#crate_name::Value>) -> #crate_name::InputValueResult<Self> { Self::__internal_parse(value) } fn to_value(&self) -> #crate_name::Value { self.__internal_to_value() } fn federation_fields() -> ::std::option::Option<::std::string::String> { ::std::option::Option::None } fn as_raw_value(&self) -> ::std::option::Option<&Self::RawValueType> { ::std::option::Option::Some(self) } } impl #crate_name::InputObjectType for #concrete_type {} impl #crate_name::OneofObjectType for #concrete_type {} }; code.push(expanded); } quote!(#(#code)*) }; Ok(expanded.into()) }
extern crate proconio; use proconio::input; fn main() { input! { a: f64, b: f64, c: f64, } let f = |t: f64| a * t + b * (c * t * std::f64::consts::PI).sin(); let mut l = 0.0; let mut r = 1000.0; for _ in 0..100 { let t = (l + r) / 2.0; if f(t) < 100.0 { l = t; } else { r = t; } } println!("{}", r); }
use std::io::{BufReader, Cursor, Read, Seek, SeekFrom}; use std::path::Path; use std::str; use cloud_storage::{Error, Object}; use uuid::Uuid; use crate::error::QuocoError; use crate::formats::{Hashes, Names, ReferenceFormat}; use crate::object::fs_source::LOCK_FILE_NAME; use crate::object::{Finish, Key, ObjectHash, ObjectId, ObjectSource, QuocoReader, QuocoWriter}; use crate::util::{bytes_to_hex_str, sha256}; use crate::{ReadSeek, Result}; use std::collections::hash_map::Keys; use std::time::SystemTime; const OBJECT_MIME_TYPE: &str = "application/octet-stream"; pub struct GoogleStorageObjectSource { names: Names, hashes: Hashes, bucket: String, key: Key, lock: bool, } impl GoogleStorageObjectSource { pub fn open(bucket: &str, config_path: &Path, key: &Key) -> Result<Self> { // Sort of a kludge std::env::set_var("SERVICE_ACCOUNT", config_path); Self::check_no_lock(bucket)?; Self::touch_lock(bucket)?; let mut source = GoogleStorageObjectSource { names: Names::default(), hashes: Hashes::default(), bucket: bucket.into(), key: *key, lock: true, }; Self::load_reference_formats(&mut source)?; Ok(source) } // pub async fn storage_hub(config_path: &Path) -> Result<Storage> { // // Get an ApplicationSecret instance by some means. It contains the `client_id` and // // `client_secret`, among other things. // let secret: yup_oauth2::ConsoleApplicationSecret = // serde_json::from_reader(BufReader::new(File::open(config_path)?))?; // // Instantiate the authenticator. It will choose a suitable authentication flow for you, // // unless you replace `None` with the desired Flow. // // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about // // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and // // retrieve them from storage. // let auth = yup_oauth2::InstalledFlowAuthenticator::builder( // secret // .installed // .expect("Couldn't load console application secret"), // yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect, // ) // .persist_tokens_to_disk(config_path.parent().unwrap().join("tokencache.json")) // .build() // .await?; // // Ok(Storage::new( // hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots()), // auth, // )) // } pub fn unlock(&mut self) -> Result<()> { self.delete(LOCK_FILE_NAME)?; self.lock = false; Ok(()) } // TODO: Work out naming/semantic division between this and check_no_lock fn check_lock(&self) -> Result<()> { if !self.lock { return Err(QuocoError::SessionDisposed); } Ok(()) } fn get_object_bytes(&self, name: &str) -> Result<Vec<u8>> { Object::download_sync(self.bucket.as_str(), name).map_err(QuocoError::from) } fn modify_unchecked(&self, name: &str, data: Vec<u8>) -> Result<()> { Object::create_sync(self.bucket.as_str(), data, name, OBJECT_MIME_TYPE)?; Ok(()) } fn modify_unchecked_reader<R: Read + Seek>(&self, name: &str, reader: &mut R) -> Result<()> { // Warning: This loads everything into memory before uploading. As far as I can tell, this // is a limitation of cloud_storage but I don't know if it's a limitation of Google's API. let data = Vec::new(); let mut writer = QuocoWriter::new(data, &self.key); std::io::copy(reader, &mut writer)?; self.modify_unchecked(name, writer.finish()?)?; Ok(()) } fn modify_object_unchecked_reader<R: Read + Seek>( &mut self, id: &ObjectId, reader: &mut R, ) -> Result<()> { self.hashes.insert(id, &sha256(reader)?); reader.seek(SeekFrom::Start(0))?; self.modify_unchecked_reader(&bytes_to_hex_str(id), reader) } fn delete(&self, name: &str) -> Result<()> { Object::delete_sync(self.bucket.as_str(), name)?; Ok(()) } fn with_name_exists(bucket: &str, name: &str) -> Result<bool> { match Object::read_sync(bucket, name) { Ok(_) => Ok(true), Err(err) => match err { Error::Google(ref response) => { if response.errors_has_reason(&cloud_storage::Reason::NotFound) { Ok(false) } else { Err(err.into()) } } _ => Err(err.into()), }, } } fn load_reference_formats(&mut self) -> Result<()> { let names_name = Names::specification().name; let hashes_name = Hashes::specification().name; if Self::with_name_exists(self.bucket.as_str(), names_name)? { // TODO: See if there's any way to make this mess cleaner self.names.load(&mut BufReader::new(&mut QuocoReader::new( &mut Cursor::new(self.get_object_bytes(names_name)?), &self.key, )))?; } if Self::with_name_exists(self.bucket.as_str(), hashes_name)? { self.hashes.load(&mut BufReader::new(&mut QuocoReader::new( &mut Cursor::new(self.get_object_bytes(hashes_name)?), &self.key, )))?; } Ok(()) } fn save_reference_format<F: ReferenceFormat>(&self, format: &F) -> Result<()> { let object_name = F::specification().name; let format_data = Cursor::new(Vec::new()); let mut writer = QuocoWriter::new(format_data, &self.key); format.save(&mut writer)?; self.modify_unchecked(object_name, writer.finish()?.into_inner())?; Ok(()) } fn touch_lock(bucket: &str) -> Result<()> { Object::create_sync(bucket, Vec::new(), LOCK_FILE_NAME, OBJECT_MIME_TYPE)?; Ok(()) } fn check_no_lock(bucket: &str) -> Result<()> { if let true = Self::with_name_exists(bucket, LOCK_FILE_NAME)? { return Err(QuocoError::SessionPathLocked(format!("gs://{}", bucket))); } Ok(()) } } impl ObjectSource for GoogleStorageObjectSource { fn object(&mut self, id: &ObjectId) -> Result<Box<dyn Read>> { self.check_lock()?; Ok(Box::new(QuocoReader::new( Cursor::new(self.get_object_bytes(&bytes_to_hex_str(id))?), &self.key, ))) } fn object_exists(&self, id: &ObjectId) -> Result<bool> { self.check_lock()?; Self::with_name_exists(self.bucket.as_str(), &bytes_to_hex_str(id)) } fn delete_object(&mut self, id: &ObjectId) -> Result<()> { self.check_lock()?; self.hashes.remove(id); self.names.remove(id); self.delete(&bytes_to_hex_str(id)) } fn create_object(&mut self, reader: &mut Box<dyn ReadSeek>) -> Result<ObjectId> { self.check_lock()?; let new_id = { let uuid = Uuid::new_v4(); *uuid.as_bytes() }; self.modify_object_unchecked_reader(&new_id, reader)?; Ok(new_id) } fn modify_object(&mut self, id: &ObjectId, reader: &mut Box<dyn ReadSeek>) -> Result<()> { self.check_lock()?; // TODO: Is it worth making an extra network call to check if the document doesn't exist? self.modify_object_unchecked_reader(id, reader) } fn object_hash(&self, id: &ObjectId) -> Result<Option<&ObjectHash>> { self.check_lock()?; Ok(self.hashes.get_hash(id)) } fn object_name(&self, id: &ObjectId) -> Result<Option<&String>> { self.check_lock()?; Ok(self.names.get_name(id)) } fn object_id_with_name(&self, name: &str) -> Result<Option<&ObjectId>> { self.check_lock()?; Ok(self.names.get_id(name)) } fn set_object_name(&mut self, id: &ObjectId, name: &str) -> Result<()> { self.check_lock()?; self.names.insert(id, name); Ok(()) } fn remove_object_name(&mut self, id: &ObjectId) -> Result<()> { self.check_lock()?; self.names.remove(id); Ok(()) } fn last_updated(&self) -> &SystemTime { &self.hashes.get_last_updated() } fn hashes_ids(&mut self) -> Keys<'_, ObjectId, ObjectHash> { self.hashes.get_ids() } fn names_ids(&mut self) -> Keys<'_, ObjectId, String> { self.names.get_ids() } fn flush(&mut self) -> Result<()> { self.check_lock()?; self.save_reference_format(&self.hashes)?; self.save_reference_format(&self.names)?; Ok(()) } } impl Drop for GoogleStorageObjectSource { fn drop(&mut self) { // TODO: Based on BufWriter's Drop impl, I think it might be an anti-pattern to do anything // that could raise errors in drop. Look into this and refactor accordingly. self.unlock() .expect("Failed to release lock. You may have to release it manually."); } }
use crate::prelude::*; use std::os::raw::c_char; use std::slice::Iter; pub struct VkNames { r_names: Vec<VkString>, c_names: Vec<*const c_char>, } impl VkNames { pub fn new(names: &[VkString]) -> Self { let local: Vec<VkString> = names.iter().map(|s| s.clone()).collect(); VkNames { c_names: local.iter().map(|s| s.as_ptr()).collect(), r_names: local, } } pub fn len(&self) -> usize { self.r_names.len() } pub fn iter(&self) -> Iter<'_, VkString> { self.r_names.iter() } pub fn c_names(&self) -> &Vec<*const c_char> { &self.c_names } }
extern crate rayon; mod structs; mod heuristics; pub use structs::{Dimension, PackInput, PackResult, PackErr, PackOptions, Bin}; pub use heuristics::{SortHeuristic, AreaSort, PerimeterSort, SideSort, WidthSort, HeightSort, SquarenessByAreaSort, SquarenessByPerimeterSort}; use self::structs::*; use self::heuristics::*; use std::cmp::{min, max}; use rayon::prelude::*; pub fn pack<'a>(rectangles: &[Dimension], options: &'a PackOptions) -> Result<Vec<PackResult<'a>>, PackErr> { if options.sort_heuristics.is_empty() { return Err(PackErr("No heuristics supplied")); }; let dimension_bigger_than_bin = |r: &Dimension| match options.bin_size.fits(r) { Fit::No => { true } Fit::Yes(flip) | Fit::Exact(flip) => flip && !options.flipping }; if rectangles.iter().any(dimension_bigger_than_bin) { return Err(PackErr("Some pieces do not fit bin size")); } let inputs = rectangles.iter().enumerate() .map(|(idx, dim)| { PackInput { id: idx as u32, dim: *dim } }).collect::<Vec<_>>(); let results: Vec<PackResult> = options.sort_heuristics.par_iter() .map(|&h| { let mut cloned = inputs.to_owned(); cloned.sort_unstable_by(|l, r| h.cmp(l, r)); let bins = pack_sorted(&cloned, options); PackResult { heuristics: h, bins } }) .collect::<Vec<_>>(); Ok(results) } fn pack_sorted(rectangles: &[PackInput], options: &PackOptions) -> Vec<Bin> { let mut bins: Vec<Bin> = vec![new_bin(options)]; let insert_fn: &'static Fn(&mut Bin, &Dimension, u32, &PackOptions) -> bool = if options.atlas_compact_steps == 0 { &try_insert } else { &try_insert_with_growth }; for &input in rectangles { let packed = bins.iter_mut().any(|bin| insert_fn(bin, &input.dim, input.id, options)); if !packed { let mut new_bin = new_bin(options); new_bin.insert(&input.dim, input.id, options.flipping); bins.push(new_bin); } } bins } fn new_bin(options: &PackOptions) -> Bin { if options.atlas_compact_steps == 0 { return Bin::new(&options.bin_size); } let size_divisor = u32::from(options.atlas_compact_steps) + 1; let div_side = |val: u32| { max(1, val / size_divisor) }; Bin::new(&Dimension::new(div_side(options.bin_size.w), div_side(options.bin_size.h))) } fn try_insert(bin: &mut Bin, rect: &Dimension, id: u32, options: &PackOptions) -> bool { bin.insert(rect, id, options.flipping) } fn try_insert_with_growth(bin: &mut Bin, rect: &Dimension, id: u32, options: &PackOptions) -> bool { let size_inc = |val: u32| { max(1, val / u32::from(options.atlas_compact_steps) + 1) }; let mut current_size = bin.size; while !bin.insert(rect, id, options.flipping) { if current_size.w >= options.bin_size.w && current_size.h >= options.bin_size.h { return false; } current_size = Dimension::new( min(current_size.w + size_inc(options.bin_size.w), options.bin_size.w), min(current_size.h + size_inc(options.bin_size.h), options.bin_size.h), ); if !bin.resize(current_size, options.flipping) { continue } } true }
use std::{default::Default, time::Duration}; /// Contains Config properties which will be used by a Server or Client #[derive(Clone, Debug)] pub struct ConnectionConfig { /// The duration to wait for communication from a remote host before /// initiating a disconnect pub disconnection_timeout_duration: Duration, /// The duration to wait before sending a heartbeat message to a remote /// host, if the host has not already sent another message within that time. pub heartbeat_interval: Duration, /// The duration to wait before sending a ping message to the remote host, /// in order to estimate RTT time pub ping_interval: Duration, /// Number of samples to measure RTT & Jitter by. A higher number will /// smooth out RTT measurements, but at the cost of responsiveness. pub rtt_sample_size: u16, } impl ConnectionConfig { /// Creates a new ConnectionConfig, used to initialize a Connection pub fn new( disconnection_timeout_duration: Duration, heartbeat_interval: Duration, ping_interval: Duration, rtt_sample_size: u16, ) -> Self { ConnectionConfig { disconnection_timeout_duration, heartbeat_interval, ping_interval, rtt_sample_size, } } } impl Default for ConnectionConfig { fn default() -> Self { Self { disconnection_timeout_duration: Duration::from_secs(10), heartbeat_interval: Duration::from_secs(4), ping_interval: Duration::from_secs(1), rtt_sample_size: 20, } } }
pub mod colors; pub mod camera; pub mod renderer; pub mod terrain; pub mod deferred; pub mod skybox;
use std::collections::HashMap; use crate::singleton::SingletonDS; use crate::datastore::{Read, Write}; use crate::error::*; use crate::key::Key; use crate::{Batch, Batching, Datastore, Txn, TxnDatastore}; use std::ops::{Deref, DerefMut}; #[derive(Debug, Default)] pub struct InnerDB(HashMap<Key, Vec<u8>>); pub type MapDatastore = SingletonDS<InnerDB>; pub type BasicTxn = HashMap<Key, Option<Vec<u8>>>; impl Deref for InnerDB { type Target = HashMap<Key, Vec<u8>>; fn deref(&self) -> &Self::Target { &(self.0) } } impl DerefMut for InnerDB { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } impl InnerDB { // do not need `RefCell` for in single thread, outside would not hold any ref for `HashMap` pub fn be_mutable(&self) -> &mut InnerDB { unsafe { let db = self as *const InnerDB as *mut InnerDB; &mut *db } } } impl Write for InnerDB { fn put(&self, key: Key, value: Vec<u8>) -> Result<()> { self.be_mutable().insert(key, value); Ok(()) } fn delete(&self, key: &Key) -> Result<()> { self.be_mutable().remove(key); Ok(()) } } impl Read for InnerDB { fn get(&self, key: &Key) -> Result<Vec<u8>> { (&**self) .get(key) .map(|v| v.to_owned()) .ok_or(DSError::NotFound(key.to_string())) } fn has(&self, key: &Key) -> Result<bool> { Ok(self.contains_key(key)) } fn get_size(&self, key: &Key) -> Result<usize> { (&**self) .get(key) .map(|v| v.len()) .ok_or(DSError::NotFound(key.to_string())) } } impl Datastore for InnerDB { fn sync(&self, _prefix: &Key) -> Result<()> { // do nothing Ok(()) } } impl Batching for InnerDB { type Txn = BasicTxn; fn batch(&self) -> Result<Self::Txn> { Ok(BasicTxn::default()) } fn commit(&self, txn: Self::Txn) -> Result<()> { for (k, v) in txn { match v { Some(d) => self.put(k, d)?, None => self.delete(&k)?, } } Ok(()) } } impl TxnDatastore for InnerDB { fn new_transaction(&self, _read_only: bool) -> Result<Self::Txn> { self.batch() } } impl Batch for BasicTxn { fn put(&mut self, key: Key, value: Vec<u8>) -> Result<()> { self.insert(key, Some(value)); Ok(()) } fn delete(&mut self, key: &Key) -> Result<()> { self.insert(key.clone(), None); Ok(()) } } impl Read for BasicTxn { fn get(&self, key: &Key) -> Result<Vec<u8>> { self.get(key) .ok_or(DSError::NotFound(key.to_string())) .and_then(|v| { v.as_ref() .cloned() .ok_or(DSError::NotFound(key.to_string())) }) } fn has(&self, key: &Key) -> Result<bool> { Ok(self.get(key).map(|v| v.is_some()).is_some()) } fn get_size(&self, key: &Key) -> Result<usize> { self.get(key) .ok_or(DSError::NotFound(key.to_string())) .and_then(|v| { v.as_ref() .map(|v| v.len()) .ok_or(DSError::NotFound(key.to_string())) }) } } impl Txn for BasicTxn { fn discard(&mut self) { self.clear(); } } pub fn new_map_datastore() -> MapDatastore { Default::default() }
//! Bundles the `cipher` module into a CBC-mode block cipher, which //! wraps and implements the `std::io::Read` and `std::io::Write` //! interfaces. //! //! # Example: //! ``` //! use std::fs; //! use std::io::{BufReader, Read, Write}; //! use tea::io::{Reader, Writer}; //! //! let tmp_dir = fs::TempDir::new("tea-reader-test-0").ok().unwrap(); //! let filename = tmp_dir.path().join("foo.txt"); //! //! { //! let f = fs::File::create(&filename).ok().unwrap(); //! let mut crypt_f = Writer::new(f, [1, 2, 3, 4], [5, 6]); //! crypt_f.write_all(b"Hello, world!").ok().unwrap(); //! crypt_f.close().ok().unwrap(); //! } //! { //! let f = fs::File::open(&filename).ok().unwrap(); //! let mut decrypt_f = Reader::new(BufReader::new(f), [1, 2, 3, 4], [5, 6]); //! let mut s: String = "".to_string(); //! decrypt_f.read_to_string(&mut s).ok().unwrap(); //! assert_eq!("Hello, world!", s); //! } //! ``` pub use self::reader::Reader; pub use self::writer::Writer; mod reader; mod writer;
// Copyright 2023 Datafuse Labs. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. use std::any::Any; use std::sync::Arc; use chrono::NaiveDateTime; use chrono::TimeZone; use chrono::Utc; use common_catalog::plan::DataSourcePlan; use common_catalog::plan::PartStatistics; use common_catalog::plan::Partitions; use common_catalog::plan::PushDownInfo; use common_catalog::table_args::TableArgs; use common_catalog::table_function::TableFunction; use common_exception::ErrorCode; use common_exception::Result; use common_expression::infer_schema_type; use common_expression::Column; use common_expression::DataBlock; use common_expression::Scalar; use common_expression::TableField; use common_expression::TableSchema; use common_meta_app::schema::TableIdent; use common_meta_app::schema::TableInfo; use common_meta_app::schema::TableMeta; use common_pipeline_core::Pipeline; use common_pipeline_sources::OneBlockSource; use common_storages_factory::Table; use common_storages_fuse::TableContext; pub struct UnnestTable { table_info: TableInfo, output: Column, } impl UnnestTable { pub fn create( database_name: &str, table_func_name: &str, table_id: u64, table_args: TableArgs, ) -> Result<Arc<dyn TableFunction>> { let args = table_args.expect_all_positioned(table_func_name, Some(1))?; let column = match &args[0] { Scalar::Array(column) => column.unnest(), Scalar::EmptyArray => Column::Null { len: 0 }, _ => { return Err(ErrorCode::BadArguments( "The argument of table function unnest should be an array", )); } }; let schema = TableSchema::new(vec![TableField::new( "unnest", infer_schema_type(&column.data_type().unnest())?, )]); let table_info = TableInfo { ident: TableIdent::new(table_id, 0), desc: format!("'{}'.'{}'", database_name, table_func_name), name: String::from(table_func_name), meta: TableMeta { schema: Arc::new(schema), engine: String::from(table_func_name), // Assuming that created_on is unnecessary for function table, // we could make created_on fixed to pass test_shuffle_action_try_into. created_on: Utc .from_utc_datetime(&NaiveDateTime::from_timestamp_opt(0, 0).unwrap()), updated_on: Utc .from_utc_datetime(&NaiveDateTime::from_timestamp_opt(0, 0).unwrap()), ..Default::default() }, ..Default::default() }; Ok(Arc::new(UnnestTable { table_info, output: column, })) } } impl TableFunction for UnnestTable { fn function_name(&self) -> &str { self.name() } fn as_table<'a>(self: Arc<Self>) -> Arc<dyn Table + 'a> where Self: 'a { self } } #[async_trait::async_trait] impl Table for UnnestTable { fn as_any(&self) -> &dyn Any { self } fn get_table_info(&self) -> &TableInfo { &self.table_info } async fn read_partitions( &self, _: Arc<dyn TableContext>, _: Option<PushDownInfo>, ) -> Result<(PartStatistics, Partitions)> { // dummy statistics Ok(( PartStatistics::new_exact(self.output.len(), self.output.memory_size(), 1, 1), Partitions::default(), )) } fn table_args(&self) -> Option<TableArgs> { Some(TableArgs::new_positioned(vec![Scalar::Array( self.output.clone(), )])) } fn read_data( &self, _ctx: Arc<dyn TableContext>, _plan: &DataSourcePlan, pipeline: &mut Pipeline, ) -> Result<()> { pipeline.add_source( |output| { OneBlockSource::create( output, DataBlock::new_from_columns(vec![self.output.clone()]), ) }, 1, )?; Ok(()) } }
pub const SCREEN_WIDTH : usize = 64; pub const SCREEN_HEIGHT : usize = 32; pub trait DisplayOutput { fn display_buffer (&mut self, buffer : &[u8 ; SCREEN_WIDTH/8 * SCREEN_HEIGHT]) ; } pub struct ScreenBuffer <'a> { pub packed_pixels : [u8 ; SCREEN_WIDTH/8 * SCREEN_HEIGHT], pub display_output : &'a mut (DisplayOutput + 'a) } impl <'a> ScreenBuffer <'a> { pub fn new (disp : &'a mut DisplayOutput) -> ScreenBuffer<'a> { ScreenBuffer { packed_pixels : [0 ; SCREEN_WIDTH/ 8 * SCREEN_HEIGHT], display_output : disp } } pub fn clear_screen(&mut self) { self.packed_pixels = [0; SCREEN_WIDTH/8 * SCREEN_HEIGHT]; self.display_output.display_buffer(&self.packed_pixels); } pub fn put_sprite(&mut self, x : u8,y : u8, sprite : &[u8]) -> bool { debug_log!("Got put request at {}, {} length {}.", x, y, sprite.len()); if x % 8 == 0 { return self.put_sprite_simple(x, y, sprite); } let mut collided = false; let mut needs_draw = false; let offset = x % 8; let high_mask = 0xFF << (8 - offset); let low_mask = !high_mask; for (row_count, row_pixels) in sprite.iter().enumerate() { let left_x_offset = (x as usize/8) % (SCREEN_WIDTH/8); let right_x_offset = (1 + x as usize/8) % (SCREEN_WIDTH/8); let y_offset = SCREEN_WIDTH/8 * ((y as usize + row_count) % SCREEN_HEIGHT); let left_pos = y_offset + left_x_offset; let right_pos = y_offset + right_x_offset; let left_packet = self.packed_pixels[left_pos]; let right_packet = self.packed_pixels[right_pos]; let top_bits = (left_packet & low_mask) << offset; let bottom_bits = (right_packet & high_mask) >> (8 - offset); let cur_pixels = top_bits + bottom_bits; let next_pixels = cur_pixels ^ row_pixels; if cur_pixels != next_pixels { self.packed_pixels[left_pos] = (next_pixels >> (offset)) | (left_packet & high_mask); self.packed_pixels[right_pos] = (next_pixels << (8 - offset)) | (right_packet & low_mask); collided = collided || (0 != (cur_pixels & !next_pixels)); needs_draw = true; } } if needs_draw { if cfg!(feature = "log_frames") { println!("Logging frame:"); for (idx, byte) in self.packed_pixels.into_iter().enumerate() { if idx % (SCREEN_WIDTH /8) == 0 { println!(); } for mask_num in 0 .. 8 { let mask = 1 << (7 - mask_num); let pval = if byte & mask != 0 { "1" } else { "0" }; print!("{}", pval); } } println!(); } self.display_output.display_buffer(&self.packed_pixels); } collided } fn put_sprite_simple(&mut self, x : u8, y : u8, sprite : &[u8]) -> bool { let mut collided = false; let mut needs_draw = false; for (row_count, row_pixels) in sprite.iter().enumerate() { let x_bonus = (x as usize)/8 % (SCREEN_WIDTH/8); let y_bonus = (((row_count + y as usize) % SCREEN_HEIGHT) * SCREEN_WIDTH/8) as usize; let cur_pos = x_bonus + y_bonus; let cur_pixels = self.packed_pixels[cur_pos]; let next_pixels = cur_pixels ^ row_pixels; if cur_pixels != next_pixels { self.packed_pixels[cur_pos] = next_pixels; collided = collided || (0 != (cur_pixels & !next_pixels)); needs_draw = true; } } if needs_draw { self.display_output.display_buffer(&self.packed_pixels); } collided } }
use std::sync::Arc; use std::time::Duration; use sourcerenderer_core::graphics::{ Backend, SwapchainError, }; use sourcerenderer_core::Platform; use super::drawable::View; use super::renderer_assets::{ RendererAssets, RendererTexture, }; use super::renderer_resources::RendererResources; use super::renderer_scene::RendererScene; use super::shader_manager::ShaderManager; use super::LateLatching; use crate::input::Input; use crate::ui::UIDrawData; pub struct SceneInfo<'a, B: Backend> { pub scene: &'a RendererScene<B>, pub views: &'a [View], pub active_view_index: usize, pub vertex_buffer: &'a Arc<B::Buffer>, pub index_buffer: &'a Arc<B::Buffer>, pub lightmap: Option<&'a RendererTexture<B>>, } #[derive(Debug, Clone)] pub struct ZeroTextures<'a, B: Backend> { pub zero_texture_view: &'a Arc<B::TextureView>, pub zero_texture_view_black: &'a Arc<B::TextureView>, } pub struct FrameInfo { pub frame: u64, pub delta: Duration, } pub struct RenderPassParameters<'a, P: Platform> { pub device: &'a <P::GraphicsBackend as Backend>::Device, pub scene: &'a SceneInfo<'a, P::GraphicsBackend>, pub shader_manager: &'a ShaderManager<P>, pub resources: &'a mut RendererResources<P::GraphicsBackend>, pub zero_textures: &'a ZeroTextures<'a, P::GraphicsBackend>, pub assets: &'a RendererAssets<P> } pub(super) trait RenderPath<P: Platform> { fn is_gpu_driven(&self) -> bool; fn write_occlusion_culling_results(&self, frame: u64, bitset: &mut Vec<u32>); fn on_swapchain_changed(&mut self, swapchain: &Arc<<P::GraphicsBackend as Backend>::Swapchain>); fn set_ui_data(&mut self, data: UIDrawData<P::GraphicsBackend>); fn render( &mut self, scene: &SceneInfo<P::GraphicsBackend>, zero_textures: &ZeroTextures<P::GraphicsBackend>, late_latching: Option<&dyn LateLatching<P::GraphicsBackend>>, input: &Input, frame_info: &FrameInfo, shader_manager: &ShaderManager<P>, assets: &RendererAssets<P>, ) -> Result<(), SwapchainError>; }
use cgl_math::{Vec2, Vec3, Vec4, barycentric}; use image::{Image, Color}; use shader::Shader; use model::{Model, Vertex}; pub struct Renderer { color: Image<Color>, zbuf: Image<f32>, } impl Renderer { pub fn with_dimensions(w: usize, h: usize) -> Self { Renderer { color: Image::with_dimensions(w, h), zbuf: Image::filled(w, h, ::std::f32::MIN), } } pub fn width(&self) -> usize { self.color.width } pub fn height(&self) -> usize { self.color.height } pub fn image(&self) -> &Image<Color> { &self.color } pub fn line(&mut self, t0: Vec3<isize>, t1: Vec3<isize>, color: Color) { self.color.line(t0.0, t0.1, t1.0, t1.1, color); } pub fn triangle(&mut self, t0: Vec3<isize>, t1: Vec3<isize>, t2: Vec3<isize>, color: Color) { let ((x0, y0), (x1, y1)) = self.clip(t0, t1, t2); for x in (x0..x1).chain(Some(x1)) { for y in (y0..y1).chain(Some(y1)) { let bc_screen = barycentric((t0.into(), t1.into(), t2.into()), Vec2(x as isize, y as isize)); if bc_screen.0 < 0.0 || bc_screen.1 < 0.0 || bc_screen.2 < 0.0 { continue; } let z = t0.2 as f32 * bc_screen.0 + t1.2 as f32 * bc_screen.1 + t2.2 as f32 * bc_screen.2; if self.zbuf[(x as usize, y as usize)] < z { self.zbuf[(x as usize, y as usize)] = z; self.color[(x as usize, y as usize)] = color; } } } } pub fn tri<S, V, U>(&mut self, shader: &S, uniform: &U, t0: V, t1: V, t2: V) where V: Vertex + ::std::fmt::Debug, S: Shader<V, U>, <S as Shader<V, U>>::VOut: ::std::fmt::Debug { macro_rules! apply_vertex { ($vin:ident => $t:ident $v:ident $w:ident) => { let mut t = Vec4::default(); let $v = shader.vertex($vin, uniform, &mut t); let t0 = t.retro_project(); let $t = Vec3(t0.0 as isize, t0.1 as isize, t0.2 as isize); let $w = t.3; } } apply_vertex!(t0 => t0 v0 w0); apply_vertex!(t1 => t1 v1 w1); apply_vertex!(t2 => t2 v2 w2); let ((x0, y0), (x1, y1)) = self.clip(t0, t1, t2); for x in (x0..x1).chain(Some(x1)) { for y in (y0..y1).chain(Some(y1)) { let bc_screen = barycentric((t0.into(), t1.into(), t2.into()), Vec2(x as isize, y as isize)); if bc_screen.0 < 0.0 || bc_screen.1 < 0.0 || bc_screen.2 < 0.0 { continue; } let w_point = 1.0 / bc_screen.dot(Vec3(1.0/w0, 1.0/w1, 1.0/w2)); let bc_clip = bc_screen / Vec3(w0, w1, w2) * w_point; // FIXME: Should this be bc_screen, or bc_clip? let z = bc_screen.dot(Vec3(t0.2 as f32, t1.2 as f32, t2.2 as f32)); if self.zbuf[(x as usize, y as usize)] < z { let vert = Vertex::interpolate(bc_clip, &v0, &v1, &v2); self.zbuf[(x as usize, y as usize)] = z; self.color[(x as usize, y as usize)] = shader.fragment(vert, uniform); } } } } pub fn model<S, V, U>(&mut self, shader: &S, uniform: &U, model: &Model<V>) where V: Vertex + Copy + ::std::fmt::Debug, S: Shader<V, U>, S::VOut: ::std::fmt::Debug { for tri in &model.triangles { self.tri(shader, uniform, model.vertices[tri[0] as usize], model.vertices[tri[1] as usize], model.vertices[tri[2] as usize]); } } fn clip(&self, t0: Vec3<isize>, t1: Vec3<isize>, t2: Vec3<isize>) -> ((isize, isize), (isize, isize)) { use std::cmp::{min, max}; let x0 = max(0, min(min(t0.0, min(t1.0, t2.0)), (self.width() - 1) as isize)); let x1 = max(0, min(max(t0.0, max(t1.0, t2.0)), (self.width() - 1) as isize)); let y0 = max(0, min(min(t0.1, min(t1.1, t2.1)), (self.height() - 1) as isize)); let y1 = max(0, min(max(t0.1, max(t1.1, t2.1)), (self.height() - 1) as isize)); ((x0, y0), (x1, y1)) } }
use P09; pub fn encode<T: Copy + PartialEq>(li: &Vec<T>) -> Vec<(usize, T)> { P09::pack(li).iter().map(|x| (x.len(), x[0])).collect() } #[cfg(test)] mod tests { use super::*; #[test] fn test_encode() { let li = vec![ 'a', 'a', 'a', 'a', 'b', 'c', 'c', 'a', 'a', 'd', 'e', 'e', 'e', 'e', ]; assert_eq!( encode(&li), vec![(4, 'a'), (1, 'b'), (2, 'c'), (2, 'a'), (1, 'd'), (4, 'e')] ); } #[test] fn test_encode_empty() { let li: Vec<i32> = vec![]; assert_eq!(encode(&li), vec![]); } }
extern crate paillier; #[cfg(not(feature="keygen"))] fn main() { println!("*** please run with 'keygen' feature ***") } #[cfg(feature="keygen")] fn main() { use paillier::*; // generate a fresh keypair let (ek, dk) = Paillier::keypair().keys(); // encrypt two values let c1 = Paillier::encrypt(&ek, &core::Plaintext::from(20)); let c2 = Paillier::encrypt(&ek, &core::Plaintext::from(30)); // add all of them together let c = Paillier::add(&ek, &c1, &c2); // multiply the sum by 2 let d = Paillier::mul(&ek, &c, &core::Plaintext::from(2)); // decrypt final result let m = Paillier::decrypt(&dk, &d); println!("decrypted total sum is {}", m); }
pub fn is_space_or_newline(c: char) -> bool { c.is_whitespace() || c == '\n' } pub fn is_alphanumeric(c: char) -> bool { c.is_alphanumeric() || c == '_' } pub fn is_operator(c: char) -> bool { ['+', '-', '/', '*', '^', '=', '>', '<', '&', '|'] .iter() .any(|&x| x == c) } pub fn is_allowed_for_types_and_functions(c: char) -> bool { is_alphanumeric(c) || ['.', ','].iter().any(|&x| x == c) } pub fn is_space_or_newline_or_comma(c: char) -> bool { is_space_or_newline(c) || c == ',' }
table! { player (date) { date -> Integer, playcount -> Integer, clear -> Integer, epg -> Integer, lpg -> Integer, egr -> Integer, lgr -> Integer, egd -> Integer, lgd -> Integer, ebd -> Integer, lbd -> Integer, epr -> Integer, lpr -> Integer, ems -> Integer, lms -> Integer, playtime -> Integer, } } #[derive(Queryable)] pub struct Player { pub date: i32, pub playcount: i32, pub clear: i32, pub epg: i32, pub lpg: i32, pub egr: i32, pub lgr: i32, pub egd: i32, pub lgd: i32, pub ebd: i32, pub lbd: i32, pub epr: i32, pub lpr: i32, pub ems: i32, pub lms: i32, pub playtime: i32, }
use crate::message::Message; pub trait Game { fn update(&mut self, message: Message); }
#![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 FOREIGN_STATUS(pub i32); pub const MQ_STATUS_FOREIGN: FOREIGN_STATUS = FOREIGN_STATUS(0i32); pub const MQ_STATUS_NOT_FOREIGN: FOREIGN_STATUS = FOREIGN_STATUS(1i32); pub const MQ_STATUS_UNKNOWN: FOREIGN_STATUS = FOREIGN_STATUS(2i32); impl ::core::convert::From<i32> for FOREIGN_STATUS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for FOREIGN_STATUS { type Abi = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSMQApplication(pub ::windows::core::IUnknown); impl IMSMQApplication { #[cfg(feature = "Win32_Foundation")] pub unsafe fn MachineIdOfMachineName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, machinename: 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).7)(::core::mem::transmute_copy(self), machinename.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } } unsafe impl ::windows::core::Interface for IMSMQApplication { type Vtable = IMSMQApplication_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e085_dccd_11d0_aa4b_0060970debae); } impl ::core::convert::From<IMSMQApplication> for ::windows::core::IUnknown { fn from(value: IMSMQApplication) -> Self { value.0 } } impl ::core::convert::From<&IMSMQApplication> for ::windows::core::IUnknown { fn from(value: &IMSMQApplication) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQApplication { 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 IMSMQApplication { 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<IMSMQApplication> for super::Com::IDispatch { fn from(value: IMSMQApplication) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQApplication> for super::Com::IDispatch { fn from(value: &IMSMQApplication) -> 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 IMSMQApplication { 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 &IMSMQApplication { 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 IMSMQApplication_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, machinename: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pbstrguid: *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 IMSMQApplication2(pub ::windows::core::IUnknown); impl IMSMQApplication2 { 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_Foundation")] pub unsafe fn MachineIdOfMachineName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, machinename: 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).7)(::core::mem::transmute_copy(self), machinename.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn RegisterCertificate(&self, flags: *const super::Com::VARIANT, externalcertificate: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(flags), ::core::mem::transmute(externalcertificate)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MachineNameOfMachineId<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrguid: 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).9)(::core::mem::transmute_copy(self), bstrguid.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn MSMQVersionMajor(&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 MSMQVersionMinor(&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 MSMQVersionBuild(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn IsDsEnabled(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQApplication2 { type Vtable = IMSMQApplication2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x12a30900_7300_11d2_b0e6_00e02c074f6b); } impl ::core::convert::From<IMSMQApplication2> for ::windows::core::IUnknown { fn from(value: IMSMQApplication2) -> Self { value.0 } } impl ::core::convert::From<&IMSMQApplication2> for ::windows::core::IUnknown { fn from(value: &IMSMQApplication2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQApplication2 { 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 IMSMQApplication2 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IMSMQApplication2> for IMSMQApplication { fn from(value: IMSMQApplication2) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IMSMQApplication2> for IMSMQApplication { fn from(value: &IMSMQApplication2) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQApplication> for IMSMQApplication2 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQApplication> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQApplication> for &IMSMQApplication2 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQApplication> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IMSMQApplication2> for super::Com::IDispatch { fn from(value: IMSMQApplication2) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQApplication2> for super::Com::IDispatch { fn from(value: &IMSMQApplication2) -> 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 IMSMQApplication2 { 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 &IMSMQApplication2 { 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 IMSMQApplication2_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, machinename: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pbstrguid: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, flags: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, externalcertificate: *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, bstrguid: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pbstrmachinename: *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, psmsmqversionmajor: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psmsmqversionminor: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psmsmqversionbuild: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pfisdsenabled: *mut i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::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 IMSMQApplication3(pub ::windows::core::IUnknown); impl IMSMQApplication3 { 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_Foundation")] pub unsafe fn MachineIdOfMachineName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, machinename: 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).7)(::core::mem::transmute_copy(self), machinename.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn RegisterCertificate(&self, flags: *const super::Com::VARIANT, externalcertificate: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(flags), ::core::mem::transmute(externalcertificate)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MachineNameOfMachineId<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrguid: 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).9)(::core::mem::transmute_copy(self), bstrguid.into_param().abi(), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn MSMQVersionMajor(&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 MSMQVersionMinor(&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 MSMQVersionBuild(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn IsDsEnabled(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ActiveQueues(&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).15)(::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 PrivateQueues(&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).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn DirectoryServiceServer(&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).17)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn IsConnected(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn BytesInAllQueues(&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).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetMachine<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrmachine: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), bstrmachine.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Machine(&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).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn Connect(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Disconnect(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Tidy(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IMSMQApplication3 { type Vtable = IMSMQApplication3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b1f_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQApplication3> for ::windows::core::IUnknown { fn from(value: IMSMQApplication3) -> Self { value.0 } } impl ::core::convert::From<&IMSMQApplication3> for ::windows::core::IUnknown { fn from(value: &IMSMQApplication3) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQApplication3 { 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 IMSMQApplication3 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IMSMQApplication3> for IMSMQApplication2 { fn from(value: IMSMQApplication3) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IMSMQApplication3> for IMSMQApplication2 { fn from(value: &IMSMQApplication3) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQApplication2> for IMSMQApplication3 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQApplication2> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQApplication2> for &IMSMQApplication3 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQApplication2> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } impl ::core::convert::From<IMSMQApplication3> for IMSMQApplication { fn from(value: IMSMQApplication3) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IMSMQApplication3> for IMSMQApplication { fn from(value: &IMSMQApplication3) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQApplication> for IMSMQApplication3 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQApplication> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQApplication> for &IMSMQApplication3 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQApplication> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IMSMQApplication3> for super::Com::IDispatch { fn from(value: IMSMQApplication3) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQApplication3> for super::Com::IDispatch { fn from(value: &IMSMQApplication3) -> 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 IMSMQApplication3 { 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 &IMSMQApplication3 { 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 IMSMQApplication3_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, machinename: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pbstrguid: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, flags: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, externalcertificate: *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, bstrguid: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>, pbstrmachinename: *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, psmsmqversionmajor: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psmsmqversionminor: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psmsmqversionbuild: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pfisdsenabled: *mut i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvactivequeues: *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, pvprivatequeues: *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, pbstrdirectoryserviceserver: *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, pfisconnected: *mut i16) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvbytesinallqueues: *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, bstrmachine: ::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, pbstrmachine: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, 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 IMSMQCollection(pub ::windows::core::IUnknown); impl IMSMQCollection { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Item(&self, index: *const super::Com::VARIANT) -> ::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), ::core::mem::transmute(index), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn Count(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } 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).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<::windows::core::IUnknown>(result__) } } unsafe impl ::windows::core::Interface for IMSMQCollection { type Vtable = IMSMQCollection_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0188ac2f_ecb3_4173_9779_635ca2039c72); } impl ::core::convert::From<IMSMQCollection> for ::windows::core::IUnknown { fn from(value: IMSMQCollection) -> Self { value.0 } } impl ::core::convert::From<&IMSMQCollection> for ::windows::core::IUnknown { fn from(value: &IMSMQCollection) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQCollection { 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 IMSMQCollection { 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<IMSMQCollection> for super::Com::IDispatch { fn from(value: IMSMQCollection) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQCollection> for super::Com::IDispatch { fn from(value: &IMSMQCollection) -> 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 IMSMQCollection { 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 &IMSMQCollection { 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 IMSMQCollection_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, index: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, pvarret: *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, pcount: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppunk: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSMQCoordinatedTransactionDispenser(pub ::windows::core::IUnknown); impl IMSMQCoordinatedTransactionDispenser { pub unsafe fn BeginTransaction(&self) -> ::windows::core::Result<IMSMQTransaction> { let mut result__: <IMSMQTransaction as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQTransaction>(result__) } } unsafe impl ::windows::core::Interface for IMSMQCoordinatedTransactionDispenser { type Vtable = IMSMQCoordinatedTransactionDispenser_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e081_dccd_11d0_aa4b_0060970debae); } impl ::core::convert::From<IMSMQCoordinatedTransactionDispenser> for ::windows::core::IUnknown { fn from(value: IMSMQCoordinatedTransactionDispenser) -> Self { value.0 } } impl ::core::convert::From<&IMSMQCoordinatedTransactionDispenser> for ::windows::core::IUnknown { fn from(value: &IMSMQCoordinatedTransactionDispenser) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQCoordinatedTransactionDispenser { 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 IMSMQCoordinatedTransactionDispenser { 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<IMSMQCoordinatedTransactionDispenser> for super::Com::IDispatch { fn from(value: IMSMQCoordinatedTransactionDispenser) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQCoordinatedTransactionDispenser> for super::Com::IDispatch { fn from(value: &IMSMQCoordinatedTransactionDispenser) -> 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 IMSMQCoordinatedTransactionDispenser { 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 &IMSMQCoordinatedTransactionDispenser { 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 IMSMQCoordinatedTransactionDispenser_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, ptransaction: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSMQCoordinatedTransactionDispenser2(pub ::windows::core::IUnknown); impl IMSMQCoordinatedTransactionDispenser2 { pub unsafe fn BeginTransaction(&self) -> ::windows::core::Result<IMSMQTransaction2> { let mut result__: <IMSMQTransaction2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQTransaction2>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQCoordinatedTransactionDispenser2 { type Vtable = IMSMQCoordinatedTransactionDispenser2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b10_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQCoordinatedTransactionDispenser2> for ::windows::core::IUnknown { fn from(value: IMSMQCoordinatedTransactionDispenser2) -> Self { value.0 } } impl ::core::convert::From<&IMSMQCoordinatedTransactionDispenser2> for ::windows::core::IUnknown { fn from(value: &IMSMQCoordinatedTransactionDispenser2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQCoordinatedTransactionDispenser2 { 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 IMSMQCoordinatedTransactionDispenser2 { 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<IMSMQCoordinatedTransactionDispenser2> for super::Com::IDispatch { fn from(value: IMSMQCoordinatedTransactionDispenser2) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQCoordinatedTransactionDispenser2> for super::Com::IDispatch { fn from(value: &IMSMQCoordinatedTransactionDispenser2) -> 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 IMSMQCoordinatedTransactionDispenser2 { 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 &IMSMQCoordinatedTransactionDispenser2 { 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 IMSMQCoordinatedTransactionDispenser2_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, ptransaction: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::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 IMSMQCoordinatedTransactionDispenser3(pub ::windows::core::IUnknown); impl IMSMQCoordinatedTransactionDispenser3 { pub unsafe fn BeginTransaction(&self) -> ::windows::core::Result<IMSMQTransaction3> { let mut result__: <IMSMQTransaction3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQTransaction3>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQCoordinatedTransactionDispenser3 { type Vtable = IMSMQCoordinatedTransactionDispenser3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b14_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQCoordinatedTransactionDispenser3> for ::windows::core::IUnknown { fn from(value: IMSMQCoordinatedTransactionDispenser3) -> Self { value.0 } } impl ::core::convert::From<&IMSMQCoordinatedTransactionDispenser3> for ::windows::core::IUnknown { fn from(value: &IMSMQCoordinatedTransactionDispenser3) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQCoordinatedTransactionDispenser3 { 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 IMSMQCoordinatedTransactionDispenser3 { 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<IMSMQCoordinatedTransactionDispenser3> for super::Com::IDispatch { fn from(value: IMSMQCoordinatedTransactionDispenser3) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQCoordinatedTransactionDispenser3> for super::Com::IDispatch { fn from(value: &IMSMQCoordinatedTransactionDispenser3) -> 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 IMSMQCoordinatedTransactionDispenser3 { 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 &IMSMQCoordinatedTransactionDispenser3 { 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 IMSMQCoordinatedTransactionDispenser3_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, ptransaction: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::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 IMSMQDestination(pub ::windows::core::IUnknown); impl IMSMQDestination { pub unsafe fn Open(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Close(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn IsOpen(&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__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn IADs(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn putref_IADs<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, piads: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), piads.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&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).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetADsPath<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstradspath: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), bstradspath.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PathName(&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).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPathName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrpathname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrpathname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FormatName(&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 SetFormatName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrformatname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), bstrformatname.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Destinations(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn putref_Destinations<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, pdestinations: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), pdestinations.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQDestination { type Vtable = IMSMQDestination_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b16_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQDestination> for ::windows::core::IUnknown { fn from(value: IMSMQDestination) -> Self { value.0 } } impl ::core::convert::From<&IMSMQDestination> for ::windows::core::IUnknown { fn from(value: &IMSMQDestination) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQDestination { 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 IMSMQDestination { 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<IMSMQDestination> for super::Com::IDispatch { fn from(value: IMSMQDestination) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQDestination> for super::Com::IDispatch { fn from(value: &IMSMQDestination) -> 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 IMSMQDestination { 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 &IMSMQDestination { 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 IMSMQDestination_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pfisopen: *mut i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppiads: *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, piads: ::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, pbstradspath: *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, bstradspath: ::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, pbstrpathname: *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, bstrpathname: ::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, pbstrformatname: *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, bstrformatname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppdestinations: *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, pdestinations: ::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, ppcolproperties: *mut ::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 IMSMQEvent(pub ::windows::core::IUnknown); impl IMSMQEvent {} unsafe impl ::windows::core::Interface for IMSMQEvent { type Vtable = IMSMQEvent_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e077_dccd_11d0_aa4b_0060970debae); } impl ::core::convert::From<IMSMQEvent> for ::windows::core::IUnknown { fn from(value: IMSMQEvent) -> Self { value.0 } } impl ::core::convert::From<&IMSMQEvent> for ::windows::core::IUnknown { fn from(value: &IMSMQEvent) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQEvent { 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 IMSMQEvent { 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<IMSMQEvent> for super::Com::IDispatch { fn from(value: IMSMQEvent) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQEvent> for super::Com::IDispatch { fn from(value: &IMSMQEvent) -> 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 IMSMQEvent { 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 &IMSMQEvent { 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 IMSMQEvent_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 IMSMQEvent2(pub ::windows::core::IUnknown); impl IMSMQEvent2 { 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 Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch 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::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQEvent2 { type Vtable = IMSMQEvent2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b12_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQEvent2> for ::windows::core::IUnknown { fn from(value: IMSMQEvent2) -> Self { value.0 } } impl ::core::convert::From<&IMSMQEvent2> for ::windows::core::IUnknown { fn from(value: &IMSMQEvent2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQEvent2 { 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 IMSMQEvent2 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IMSMQEvent2> for IMSMQEvent { fn from(value: IMSMQEvent2) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IMSMQEvent2> for IMSMQEvent { fn from(value: &IMSMQEvent2) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQEvent> for IMSMQEvent2 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQEvent> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQEvent> for &IMSMQEvent2 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQEvent> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IMSMQEvent2> for super::Com::IDispatch { fn from(value: IMSMQEvent2) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQEvent2> for super::Com::IDispatch { fn from(value: &IMSMQEvent2) -> 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 IMSMQEvent2 { 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 &IMSMQEvent2 { 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 IMSMQEvent2_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, ppcolproperties: *mut ::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 IMSMQEvent3(pub ::windows::core::IUnknown); impl IMSMQEvent3 { 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 Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch 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::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQEvent3 { type Vtable = IMSMQEvent3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b1c_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQEvent3> for ::windows::core::IUnknown { fn from(value: IMSMQEvent3) -> Self { value.0 } } impl ::core::convert::From<&IMSMQEvent3> for ::windows::core::IUnknown { fn from(value: &IMSMQEvent3) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQEvent3 { 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 IMSMQEvent3 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IMSMQEvent3> for IMSMQEvent2 { fn from(value: IMSMQEvent3) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IMSMQEvent3> for IMSMQEvent2 { fn from(value: &IMSMQEvent3) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQEvent2> for IMSMQEvent3 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQEvent2> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQEvent2> for &IMSMQEvent3 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQEvent2> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } impl ::core::convert::From<IMSMQEvent3> for IMSMQEvent { fn from(value: IMSMQEvent3) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IMSMQEvent3> for IMSMQEvent { fn from(value: &IMSMQEvent3) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQEvent> for IMSMQEvent3 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQEvent> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQEvent> for &IMSMQEvent3 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQEvent> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IMSMQEvent3> for super::Com::IDispatch { fn from(value: IMSMQEvent3) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQEvent3> for super::Com::IDispatch { fn from(value: &IMSMQEvent3) -> 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 IMSMQEvent3 { 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 &IMSMQEvent3 { 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 IMSMQEvent3_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, ppcolproperties: *mut ::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 IMSMQManagement(pub ::windows::core::IUnknown); impl IMSMQManagement { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Init(&self, machine: *const super::Com::VARIANT, pathname: *const super::Com::VARIANT, formatname: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(machine), ::core::mem::transmute(pathname), ::core::mem::transmute(formatname)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FormatName(&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__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Machine(&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 MessageCount(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn ForeignStatus(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn QueueType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(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).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn TransactionalStatus(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::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 BytesInQueue(&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).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } } unsafe impl ::windows::core::Interface for IMSMQManagement { type Vtable = IMSMQManagement_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xbe5f0241_e489_4957_8cc4_a452fcf3e23e); } impl ::core::convert::From<IMSMQManagement> for ::windows::core::IUnknown { fn from(value: IMSMQManagement) -> Self { value.0 } } impl ::core::convert::From<&IMSMQManagement> for ::windows::core::IUnknown { fn from(value: &IMSMQManagement) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQManagement { 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 IMSMQManagement { 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<IMSMQManagement> for super::Com::IDispatch { fn from(value: IMSMQManagement) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQManagement> for super::Com::IDispatch { fn from(value: &IMSMQManagement) -> 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 IMSMQManagement { 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 &IMSMQManagement { 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 IMSMQManagement_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, machine: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, pathname: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, formatname: *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, pbstrformatname: *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, pbstrmachine: *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, plmessagecount: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plforeignstatus: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plqueuetype: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pfislocal: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pltransactionalstatus: *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, pvbytesinqueue: *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, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSMQMessage(pub ::windows::core::IUnknown); impl IMSMQMessage { pub unsafe fn Class(&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 PrivLevel(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetPrivLevel(&self, lprivlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(lprivlevel)).ok() } pub unsafe fn AuthLevel(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAuthLevel(&self, lauthlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(lauthlevel)).ok() } pub unsafe fn IsAuthenticated(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn Delivery(&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 SetDelivery(&self, ldelivery: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(ldelivery)).ok() } pub unsafe fn Trace(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetTrace(&self, ltrace: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), ::core::mem::transmute(ltrace)).ok() } pub unsafe fn Priority(&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 SetPriority(&self, lpriority: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lpriority)).ok() } pub unsafe fn Journal(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetJournal(&self, ljournal: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(ljournal)).ok() } pub unsafe fn ResponseQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo> { let mut result__: <IMSMQQueueInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo>(result__) } pub unsafe fn putref_ResponseQueueInfo<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo>>(&self, pqinforesponse: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), pqinforesponse.into_param().abi()).ok() } pub unsafe fn AppSpecific(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAppSpecific(&self, lappspecific: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(lappspecific)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SourceMachineGuid(&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).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn BodyLength(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::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 Body(&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).27)(::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 SetBody<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varbody: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), varbody.into_param().abi()).ok() } pub unsafe fn AdminQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo> { let mut result__: <IMSMQQueueInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo>(result__) } pub unsafe fn putref_AdminQueueInfo<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo>>(&self, pqinfoadmin: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), pqinfoadmin.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Id(&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).31)(::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 CorrelationId(&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).32)(::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 SetCorrelationId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varmsgid: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), varmsgid.into_param().abi()).ok() } pub unsafe fn Ack(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAck(&self, lack: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), ::core::mem::transmute(lack)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Label(&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).36)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlabel: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), bstrlabel.into_param().abi()).ok() } pub unsafe fn MaxTimeToReachQueue(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxTimeToReachQueue(&self, lmaxtimetoreachqueue: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), ::core::mem::transmute(lmaxtimetoreachqueue)).ok() } pub unsafe fn MaxTimeToReceive(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxTimeToReceive(&self, lmaxtimetoreceive: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).41)(::core::mem::transmute_copy(self), ::core::mem::transmute(lmaxtimetoreceive)).ok() } pub unsafe fn HashAlgorithm(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetHashAlgorithm(&self, lhashalg: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).43)(::core::mem::transmute_copy(self), ::core::mem::transmute(lhashalg)).ok() } pub unsafe fn EncryptAlgorithm(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).44)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetEncryptAlgorithm(&self, lencryptalg: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).45)(::core::mem::transmute_copy(self), ::core::mem::transmute(lencryptalg)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SentTime(&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).46)(::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 ArrivedTime(&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).47)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn DestinationQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo> { let mut result__: <IMSMQQueueInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).48)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SenderCertificate(&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).49)(::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 SetSenderCertificate<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsendercert: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).50)(::core::mem::transmute_copy(self), varsendercert.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SenderId(&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).51)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn SenderIdType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).52)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetSenderIdType(&self, lsenderidtype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).53)(::core::mem::transmute_copy(self), ::core::mem::transmute(lsenderidtype)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Send<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueue>>(&self, destinationqueue: Param0, transaction: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).54)(::core::mem::transmute_copy(self), destinationqueue.into_param().abi(), ::core::mem::transmute(transaction)).ok() } pub unsafe fn AttachCurrentSecurityContext(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).55)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IMSMQMessage { type Vtable = IMSMQMessage_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e074_dccd_11d0_aa4b_0060970debae); } impl ::core::convert::From<IMSMQMessage> for ::windows::core::IUnknown { fn from(value: IMSMQMessage) -> Self { value.0 } } impl ::core::convert::From<&IMSMQMessage> for ::windows::core::IUnknown { fn from(value: &IMSMQMessage) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQMessage { 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 IMSMQMessage { 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<IMSMQMessage> for super::Com::IDispatch { fn from(value: IMSMQMessage) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQMessage> for super::Com::IDispatch { fn from(value: &IMSMQMessage) -> 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 IMSMQMessage { 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 &IMSMQMessage { 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 IMSMQMessage_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, plclass: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plprivlevel: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lprivlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plauthlevel: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lauthlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisauthenticated: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pldelivery: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ldelivery: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pltrace: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ltrace: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plpriority: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lpriority: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pljournal: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ljournal: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinforesponse: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinforesponse: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plappspecific: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lappspecific: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrguidsrcmachine: *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, pcbbody: *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, pvarbody: *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, varbody: ::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, ppqinfoadmin: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinfoadmin: ::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, pvarmsgid: *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, pvarmsgid: *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, varmsgid: ::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, plack: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lack: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrlabel: *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, bstrlabel: ::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, plmaxtimetoreachqueue: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lmaxtimetoreachqueue: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plmaxtimetoreceive: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lmaxtimetoreceive: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plhashalg: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lhashalg: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plencryptalg: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lencryptalg: 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, pvarsenttime: *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, plarrivedtime: *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, ppqinfodest: *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, pvarsendercert: *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, varsendercert: ::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, pvarsenderid: *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, plsenderidtype: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lsenderidtype: 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, destinationqueue: ::windows::core::RawPtr, transaction: *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, 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 IMSMQMessage2(pub ::windows::core::IUnknown); impl IMSMQMessage2 { pub unsafe fn Class(&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 PrivLevel(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetPrivLevel(&self, lprivlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(lprivlevel)).ok() } pub unsafe fn AuthLevel(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAuthLevel(&self, lauthlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(lauthlevel)).ok() } pub unsafe fn IsAuthenticated(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn Delivery(&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 SetDelivery(&self, ldelivery: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(ldelivery)).ok() } pub unsafe fn Trace(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetTrace(&self, ltrace: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), ::core::mem::transmute(ltrace)).ok() } pub unsafe fn Priority(&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 SetPriority(&self, lpriority: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lpriority)).ok() } pub unsafe fn Journal(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetJournal(&self, ljournal: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(ljournal)).ok() } pub unsafe fn ResponseQueueInfo_v1(&self) -> ::windows::core::Result<IMSMQQueueInfo> { let mut result__: <IMSMQQueueInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo>(result__) } pub unsafe fn putref_ResponseQueueInfo_v1<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo>>(&self, pqinforesponse: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), pqinforesponse.into_param().abi()).ok() } pub unsafe fn AppSpecific(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAppSpecific(&self, lappspecific: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(lappspecific)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SourceMachineGuid(&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).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn BodyLength(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::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 Body(&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).27)(::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 SetBody<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varbody: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), varbody.into_param().abi()).ok() } pub unsafe fn AdminQueueInfo_v1(&self) -> ::windows::core::Result<IMSMQQueueInfo> { let mut result__: <IMSMQQueueInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo>(result__) } pub unsafe fn putref_AdminQueueInfo_v1<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo>>(&self, pqinfoadmin: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), pqinfoadmin.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Id(&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).31)(::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 CorrelationId(&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).32)(::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 SetCorrelationId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varmsgid: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), varmsgid.into_param().abi()).ok() } pub unsafe fn Ack(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAck(&self, lack: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), ::core::mem::transmute(lack)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Label(&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).36)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlabel: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), bstrlabel.into_param().abi()).ok() } pub unsafe fn MaxTimeToReachQueue(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxTimeToReachQueue(&self, lmaxtimetoreachqueue: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), ::core::mem::transmute(lmaxtimetoreachqueue)).ok() } pub unsafe fn MaxTimeToReceive(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxTimeToReceive(&self, lmaxtimetoreceive: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).41)(::core::mem::transmute_copy(self), ::core::mem::transmute(lmaxtimetoreceive)).ok() } pub unsafe fn HashAlgorithm(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetHashAlgorithm(&self, lhashalg: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).43)(::core::mem::transmute_copy(self), ::core::mem::transmute(lhashalg)).ok() } pub unsafe fn EncryptAlgorithm(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).44)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetEncryptAlgorithm(&self, lencryptalg: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).45)(::core::mem::transmute_copy(self), ::core::mem::transmute(lencryptalg)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SentTime(&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).46)(::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 ArrivedTime(&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).47)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn DestinationQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo2> { let mut result__: <IMSMQQueueInfo2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).48)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo2>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SenderCertificate(&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).49)(::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 SetSenderCertificate<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsendercert: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).50)(::core::mem::transmute_copy(self), varsendercert.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SenderId(&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).51)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn SenderIdType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).52)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetSenderIdType(&self, lsenderidtype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).53)(::core::mem::transmute_copy(self), ::core::mem::transmute(lsenderidtype)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Send<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueue2>>(&self, destinationqueue: Param0, transaction: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).54)(::core::mem::transmute_copy(self), destinationqueue.into_param().abi(), ::core::mem::transmute(transaction)).ok() } pub unsafe fn AttachCurrentSecurityContext(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).55)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SenderVersion(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).56)(::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 Extension(&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).57)(::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 SetExtension<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varextension: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).58)(::core::mem::transmute_copy(self), varextension.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ConnectorTypeGuid(&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).59)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetConnectorTypeGuid<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrguidconnectortype: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).60)(::core::mem::transmute_copy(self), bstrguidconnectortype.into_param().abi()).ok() } pub unsafe fn TransactionStatusQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo2> { let mut result__: <IMSMQQueueInfo2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).61)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo2>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn DestinationSymmetricKey(&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).62)(::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 SetDestinationSymmetricKey<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, vardestsymmkey: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).63)(::core::mem::transmute_copy(self), vardestsymmkey.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Signature(&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).64)(::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 SetSignature<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsignature: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).65)(::core::mem::transmute_copy(self), varsignature.into_param().abi()).ok() } pub unsafe fn AuthenticationProviderType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).66)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAuthenticationProviderType(&self, lauthprovtype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).67)(::core::mem::transmute_copy(self), ::core::mem::transmute(lauthprovtype)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn AuthenticationProviderName(&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).68)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetAuthenticationProviderName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrauthprovname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).69)(::core::mem::transmute_copy(self), bstrauthprovname.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetSenderId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsenderid: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).70)(::core::mem::transmute_copy(self), varsenderid.into_param().abi()).ok() } pub unsafe fn MsgClass(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).71)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMsgClass(&self, lmsgclass: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).72)(::core::mem::transmute_copy(self), ::core::mem::transmute(lmsgclass)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).73)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn TransactionId(&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).74)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn IsFirstInTransaction(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).75)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn IsLastInTransaction(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).76)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn ResponseQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo2> { let mut result__: <IMSMQQueueInfo2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).77)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo2>(result__) } pub unsafe fn putref_ResponseQueueInfo<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo2>>(&self, pqinforesponse: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).78)(::core::mem::transmute_copy(self), pqinforesponse.into_param().abi()).ok() } pub unsafe fn AdminQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo2> { let mut result__: <IMSMQQueueInfo2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).79)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo2>(result__) } pub unsafe fn putref_AdminQueueInfo<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo2>>(&self, pqinfoadmin: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).80)(::core::mem::transmute_copy(self), pqinfoadmin.into_param().abi()).ok() } pub unsafe fn ReceivedAuthenticationLevel(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).81)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } } unsafe impl ::windows::core::Interface for IMSMQMessage2 { type Vtable = IMSMQMessage2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd9933be0_a567_11d2_b0f3_00e02c074f6b); } impl ::core::convert::From<IMSMQMessage2> for ::windows::core::IUnknown { fn from(value: IMSMQMessage2) -> Self { value.0 } } impl ::core::convert::From<&IMSMQMessage2> for ::windows::core::IUnknown { fn from(value: &IMSMQMessage2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQMessage2 { 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 IMSMQMessage2 { 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<IMSMQMessage2> for super::Com::IDispatch { fn from(value: IMSMQMessage2) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQMessage2> for super::Com::IDispatch { fn from(value: &IMSMQMessage2) -> 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 IMSMQMessage2 { 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 &IMSMQMessage2 { 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 IMSMQMessage2_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, plclass: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plprivlevel: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lprivlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plauthlevel: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lauthlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisauthenticated: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pldelivery: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ldelivery: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pltrace: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ltrace: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plpriority: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lpriority: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pljournal: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ljournal: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinforesponse: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinforesponse: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plappspecific: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lappspecific: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrguidsrcmachine: *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, pcbbody: *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, pvarbody: *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, varbody: ::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, ppqinfoadmin: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinfoadmin: ::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, pvarmsgid: *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, pvarmsgid: *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, varmsgid: ::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, plack: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lack: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrlabel: *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, bstrlabel: ::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, plmaxtimetoreachqueue: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lmaxtimetoreachqueue: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plmaxtimetoreceive: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lmaxtimetoreceive: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plhashalg: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lhashalg: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plencryptalg: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lencryptalg: 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, pvarsenttime: *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, plarrivedtime: *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, ppqinfodest: *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, pvarsendercert: *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, varsendercert: ::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, pvarsenderid: *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, plsenderidtype: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lsenderidtype: 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, destinationqueue: ::windows::core::RawPtr, transaction: *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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plsenderversion: *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, pvarextension: *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, varextension: ::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, pbstrguidconnectortype: *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, bstrguidconnectortype: ::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, ppqinfoxactstatus: *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, pvardestsymmkey: *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, vardestsymmkey: ::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, pvarsignature: *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, varsignature: ::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, plauthprovtype: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lauthprovtype: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrauthprovname: *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, bstrauthprovname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, varsenderid: ::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, plmsgclass: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lmsgclass: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvarxactid: *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, pisfirstinxact: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pislastinxact: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinforesponse: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinforesponse: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfoadmin: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinfoadmin: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psreceivedauthenticationlevel: *mut i16) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSMQMessage3(pub ::windows::core::IUnknown); impl IMSMQMessage3 { pub unsafe fn Class(&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 PrivLevel(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetPrivLevel(&self, lprivlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(lprivlevel)).ok() } pub unsafe fn AuthLevel(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAuthLevel(&self, lauthlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(lauthlevel)).ok() } pub unsafe fn IsAuthenticated(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn Delivery(&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 SetDelivery(&self, ldelivery: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(ldelivery)).ok() } pub unsafe fn Trace(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetTrace(&self, ltrace: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), ::core::mem::transmute(ltrace)).ok() } pub unsafe fn Priority(&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 SetPriority(&self, lpriority: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lpriority)).ok() } pub unsafe fn Journal(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetJournal(&self, ljournal: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(ljournal)).ok() } pub unsafe fn ResponseQueueInfo_v1(&self) -> ::windows::core::Result<IMSMQQueueInfo> { let mut result__: <IMSMQQueueInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo>(result__) } pub unsafe fn putref_ResponseQueueInfo_v1<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo>>(&self, pqinforesponse: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), pqinforesponse.into_param().abi()).ok() } pub unsafe fn AppSpecific(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAppSpecific(&self, lappspecific: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(lappspecific)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SourceMachineGuid(&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).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn BodyLength(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::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 Body(&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).27)(::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 SetBody<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varbody: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), varbody.into_param().abi()).ok() } pub unsafe fn AdminQueueInfo_v1(&self) -> ::windows::core::Result<IMSMQQueueInfo> { let mut result__: <IMSMQQueueInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo>(result__) } pub unsafe fn putref_AdminQueueInfo_v1<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo>>(&self, pqinfoadmin: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), pqinfoadmin.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Id(&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).31)(::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 CorrelationId(&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).32)(::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 SetCorrelationId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varmsgid: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), varmsgid.into_param().abi()).ok() } pub unsafe fn Ack(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAck(&self, lack: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), ::core::mem::transmute(lack)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Label(&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).36)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlabel: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), bstrlabel.into_param().abi()).ok() } pub unsafe fn MaxTimeToReachQueue(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxTimeToReachQueue(&self, lmaxtimetoreachqueue: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), ::core::mem::transmute(lmaxtimetoreachqueue)).ok() } pub unsafe fn MaxTimeToReceive(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxTimeToReceive(&self, lmaxtimetoreceive: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).41)(::core::mem::transmute_copy(self), ::core::mem::transmute(lmaxtimetoreceive)).ok() } pub unsafe fn HashAlgorithm(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetHashAlgorithm(&self, lhashalg: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).43)(::core::mem::transmute_copy(self), ::core::mem::transmute(lhashalg)).ok() } pub unsafe fn EncryptAlgorithm(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).44)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetEncryptAlgorithm(&self, lencryptalg: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).45)(::core::mem::transmute_copy(self), ::core::mem::transmute(lencryptalg)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SentTime(&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).46)(::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 ArrivedTime(&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).47)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn DestinationQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo3> { let mut result__: <IMSMQQueueInfo3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).48)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SenderCertificate(&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).49)(::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 SetSenderCertificate<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsendercert: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).50)(::core::mem::transmute_copy(self), varsendercert.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SenderId(&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).51)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn SenderIdType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).52)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetSenderIdType(&self, lsenderidtype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).53)(::core::mem::transmute_copy(self), ::core::mem::transmute(lsenderidtype)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Send<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, destinationqueue: Param0, transaction: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).54)(::core::mem::transmute_copy(self), destinationqueue.into_param().abi(), ::core::mem::transmute(transaction)).ok() } pub unsafe fn AttachCurrentSecurityContext(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).55)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SenderVersion(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).56)(::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 Extension(&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).57)(::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 SetExtension<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varextension: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).58)(::core::mem::transmute_copy(self), varextension.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ConnectorTypeGuid(&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).59)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetConnectorTypeGuid<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrguidconnectortype: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).60)(::core::mem::transmute_copy(self), bstrguidconnectortype.into_param().abi()).ok() } pub unsafe fn TransactionStatusQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo3> { let mut result__: <IMSMQQueueInfo3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).61)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn DestinationSymmetricKey(&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).62)(::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 SetDestinationSymmetricKey<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, vardestsymmkey: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).63)(::core::mem::transmute_copy(self), vardestsymmkey.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Signature(&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).64)(::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 SetSignature<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsignature: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).65)(::core::mem::transmute_copy(self), varsignature.into_param().abi()).ok() } pub unsafe fn AuthenticationProviderType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).66)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAuthenticationProviderType(&self, lauthprovtype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).67)(::core::mem::transmute_copy(self), ::core::mem::transmute(lauthprovtype)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn AuthenticationProviderName(&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).68)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetAuthenticationProviderName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrauthprovname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).69)(::core::mem::transmute_copy(self), bstrauthprovname.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetSenderId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsenderid: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).70)(::core::mem::transmute_copy(self), varsenderid.into_param().abi()).ok() } pub unsafe fn MsgClass(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).71)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMsgClass(&self, lmsgclass: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).72)(::core::mem::transmute_copy(self), ::core::mem::transmute(lmsgclass)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).73)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn TransactionId(&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).74)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn IsFirstInTransaction(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).75)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn IsLastInTransaction(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).76)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn ResponseQueueInfo_v2(&self) -> ::windows::core::Result<IMSMQQueueInfo2> { let mut result__: <IMSMQQueueInfo2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).77)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo2>(result__) } pub unsafe fn putref_ResponseQueueInfo_v2<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo2>>(&self, pqinforesponse: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).78)(::core::mem::transmute_copy(self), pqinforesponse.into_param().abi()).ok() } pub unsafe fn AdminQueueInfo_v2(&self) -> ::windows::core::Result<IMSMQQueueInfo2> { let mut result__: <IMSMQQueueInfo2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).79)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo2>(result__) } pub unsafe fn putref_AdminQueueInfo_v2<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo2>>(&self, pqinfoadmin: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).80)(::core::mem::transmute_copy(self), pqinfoadmin.into_param().abi()).ok() } pub unsafe fn ReceivedAuthenticationLevel(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).81)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn ResponseQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo3> { let mut result__: <IMSMQQueueInfo3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).82)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo3>(result__) } pub unsafe fn putref_ResponseQueueInfo<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo3>>(&self, pqinforesponse: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).83)(::core::mem::transmute_copy(self), pqinforesponse.into_param().abi()).ok() } pub unsafe fn AdminQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo3> { let mut result__: <IMSMQQueueInfo3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).84)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo3>(result__) } pub unsafe fn putref_AdminQueueInfo<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo3>>(&self, pqinfoadmin: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).85)(::core::mem::transmute_copy(self), pqinfoadmin.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn ResponseDestination(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).86)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn putref_ResponseDestination<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, pdestresponse: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).87)(::core::mem::transmute_copy(self), pdestresponse.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Destination(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).88)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn LookupId(&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).89)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn IsAuthenticated2(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).90)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn IsFirstInTransaction2(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).91)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn IsLastInTransaction2(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).92)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn AttachCurrentSecurityContext2(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).93)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SoapEnvelope(&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).94)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn CompoundMessage(&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).95)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSoapHeader<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrsoapheader: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).96)(::core::mem::transmute_copy(self), bstrsoapheader.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSoapBody<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrsoapbody: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).97)(::core::mem::transmute_copy(self), bstrsoapbody.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IMSMQMessage3 { type Vtable = IMSMQMessage3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b1a_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQMessage3> for ::windows::core::IUnknown { fn from(value: IMSMQMessage3) -> Self { value.0 } } impl ::core::convert::From<&IMSMQMessage3> for ::windows::core::IUnknown { fn from(value: &IMSMQMessage3) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQMessage3 { 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 IMSMQMessage3 { 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<IMSMQMessage3> for super::Com::IDispatch { fn from(value: IMSMQMessage3) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQMessage3> for super::Com::IDispatch { fn from(value: &IMSMQMessage3) -> 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 IMSMQMessage3 { 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 &IMSMQMessage3 { 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 IMSMQMessage3_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, plclass: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plprivlevel: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lprivlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plauthlevel: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lauthlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisauthenticated: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pldelivery: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ldelivery: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pltrace: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ltrace: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plpriority: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lpriority: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pljournal: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ljournal: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinforesponse: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinforesponse: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plappspecific: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lappspecific: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrguidsrcmachine: *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, pcbbody: *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, pvarbody: *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, varbody: ::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, ppqinfoadmin: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinfoadmin: ::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, pvarmsgid: *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, pvarmsgid: *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, varmsgid: ::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, plack: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lack: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrlabel: *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, bstrlabel: ::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, plmaxtimetoreachqueue: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lmaxtimetoreachqueue: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plmaxtimetoreceive: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lmaxtimetoreceive: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plhashalg: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lhashalg: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plencryptalg: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lencryptalg: 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, pvarsenttime: *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, plarrivedtime: *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, ppqinfodest: *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, pvarsendercert: *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, varsendercert: ::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, pvarsenderid: *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, plsenderidtype: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lsenderidtype: 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, destinationqueue: ::windows::core::RawPtr, transaction: *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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plsenderversion: *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, pvarextension: *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, varextension: ::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, pbstrguidconnectortype: *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, bstrguidconnectortype: ::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, ppqinfoxactstatus: *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, pvardestsymmkey: *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, vardestsymmkey: ::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, pvarsignature: *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, varsignature: ::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, plauthprovtype: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lauthprovtype: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrauthprovname: *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, bstrauthprovname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, varsenderid: ::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, plmsgclass: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lmsgclass: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvarxactid: *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, pisfirstinxact: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pislastinxact: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinforesponse: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinforesponse: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfoadmin: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinfoadmin: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psreceivedauthenticationlevel: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinforesponse: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinforesponse: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfoadmin: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinfoadmin: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppdestresponse: *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, pdestresponse: ::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, ppdestdestination: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvarlookupid: *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, pisauthenticated: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisfirstinxact: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pislastinxact: *mut i16) -> ::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, pbstrsoapenvelope: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvarcompoundmessage: *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, bstrsoapheader: ::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, bstrsoapbody: ::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 IMSMQMessage4(pub ::windows::core::IUnknown); impl IMSMQMessage4 { pub unsafe fn Class(&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 PrivLevel(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetPrivLevel(&self, lprivlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(lprivlevel)).ok() } pub unsafe fn AuthLevel(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAuthLevel(&self, lauthlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), ::core::mem::transmute(lauthlevel)).ok() } pub unsafe fn IsAuthenticated(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn Delivery(&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 SetDelivery(&self, ldelivery: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(ldelivery)).ok() } pub unsafe fn Trace(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetTrace(&self, ltrace: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), ::core::mem::transmute(ltrace)).ok() } pub unsafe fn Priority(&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 SetPriority(&self, lpriority: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lpriority)).ok() } pub unsafe fn Journal(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetJournal(&self, ljournal: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(ljournal)).ok() } pub unsafe fn ResponseQueueInfo_v1(&self) -> ::windows::core::Result<IMSMQQueueInfo> { let mut result__: <IMSMQQueueInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo>(result__) } pub unsafe fn putref_ResponseQueueInfo_v1<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo>>(&self, pqinforesponse: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), pqinforesponse.into_param().abi()).ok() } pub unsafe fn AppSpecific(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAppSpecific(&self, lappspecific: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(lappspecific)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SourceMachineGuid(&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).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } pub unsafe fn BodyLength(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).26)(::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 Body(&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).27)(::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 SetBody<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varbody: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), varbody.into_param().abi()).ok() } pub unsafe fn AdminQueueInfo_v1(&self) -> ::windows::core::Result<IMSMQQueueInfo> { let mut result__: <IMSMQQueueInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo>(result__) } pub unsafe fn putref_AdminQueueInfo_v1<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo>>(&self, pqinfoadmin: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), pqinfoadmin.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Id(&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).31)(::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 CorrelationId(&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).32)(::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 SetCorrelationId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varmsgid: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), varmsgid.into_param().abi()).ok() } pub unsafe fn Ack(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAck(&self, lack: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), ::core::mem::transmute(lack)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Label(&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).36)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlabel: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self), bstrlabel.into_param().abi()).ok() } pub unsafe fn MaxTimeToReachQueue(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxTimeToReachQueue(&self, lmaxtimetoreachqueue: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), ::core::mem::transmute(lmaxtimetoreachqueue)).ok() } pub unsafe fn MaxTimeToReceive(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMaxTimeToReceive(&self, lmaxtimetoreceive: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).41)(::core::mem::transmute_copy(self), ::core::mem::transmute(lmaxtimetoreceive)).ok() } pub unsafe fn HashAlgorithm(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetHashAlgorithm(&self, lhashalg: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).43)(::core::mem::transmute_copy(self), ::core::mem::transmute(lhashalg)).ok() } pub unsafe fn EncryptAlgorithm(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).44)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetEncryptAlgorithm(&self, lencryptalg: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).45)(::core::mem::transmute_copy(self), ::core::mem::transmute(lencryptalg)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SentTime(&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).46)(::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 ArrivedTime(&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).47)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn DestinationQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo4> { let mut result__: <IMSMQQueueInfo4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).48)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SenderCertificate(&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).49)(::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 SetSenderCertificate<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsendercert: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).50)(::core::mem::transmute_copy(self), varsendercert.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SenderId(&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).51)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn SenderIdType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).52)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetSenderIdType(&self, lsenderidtype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).53)(::core::mem::transmute_copy(self), ::core::mem::transmute(lsenderidtype)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Send<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, destinationqueue: Param0, transaction: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).54)(::core::mem::transmute_copy(self), destinationqueue.into_param().abi(), ::core::mem::transmute(transaction)).ok() } pub unsafe fn AttachCurrentSecurityContext(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).55)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn SenderVersion(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).56)(::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 Extension(&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).57)(::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 SetExtension<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varextension: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).58)(::core::mem::transmute_copy(self), varextension.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ConnectorTypeGuid(&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).59)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetConnectorTypeGuid<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrguidconnectortype: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).60)(::core::mem::transmute_copy(self), bstrguidconnectortype.into_param().abi()).ok() } pub unsafe fn TransactionStatusQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo4> { let mut result__: <IMSMQQueueInfo4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).61)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn DestinationSymmetricKey(&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).62)(::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 SetDestinationSymmetricKey<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, vardestsymmkey: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).63)(::core::mem::transmute_copy(self), vardestsymmkey.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Signature(&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).64)(::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 SetSignature<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsignature: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).65)(::core::mem::transmute_copy(self), varsignature.into_param().abi()).ok() } pub unsafe fn AuthenticationProviderType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).66)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAuthenticationProviderType(&self, lauthprovtype: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).67)(::core::mem::transmute_copy(self), ::core::mem::transmute(lauthprovtype)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn AuthenticationProviderName(&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).68)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetAuthenticationProviderName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrauthprovname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).69)(::core::mem::transmute_copy(self), bstrauthprovname.into_param().abi()).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn SetSenderId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsenderid: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).70)(::core::mem::transmute_copy(self), varsenderid.into_param().abi()).ok() } pub unsafe fn MsgClass(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).71)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetMsgClass(&self, lmsgclass: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).72)(::core::mem::transmute_copy(self), ::core::mem::transmute(lmsgclass)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).73)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn TransactionId(&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).74)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn IsFirstInTransaction(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).75)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn IsLastInTransaction(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).76)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn ResponseQueueInfo_v2(&self) -> ::windows::core::Result<IMSMQQueueInfo2> { let mut result__: <IMSMQQueueInfo2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).77)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo2>(result__) } pub unsafe fn putref_ResponseQueueInfo_v2<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo2>>(&self, pqinforesponse: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).78)(::core::mem::transmute_copy(self), pqinforesponse.into_param().abi()).ok() } pub unsafe fn AdminQueueInfo_v2(&self) -> ::windows::core::Result<IMSMQQueueInfo2> { let mut result__: <IMSMQQueueInfo2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).79)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo2>(result__) } pub unsafe fn putref_AdminQueueInfo_v2<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo2>>(&self, pqinfoadmin: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).80)(::core::mem::transmute_copy(self), pqinfoadmin.into_param().abi()).ok() } pub unsafe fn ReceivedAuthenticationLevel(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).81)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn ResponseQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo4> { let mut result__: <IMSMQQueueInfo4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).82)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo4>(result__) } pub unsafe fn putref_ResponseQueueInfo<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo4>>(&self, pqinforesponse: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).83)(::core::mem::transmute_copy(self), pqinforesponse.into_param().abi()).ok() } pub unsafe fn AdminQueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo4> { let mut result__: <IMSMQQueueInfo4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).84)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo4>(result__) } pub unsafe fn putref_AdminQueueInfo<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueueInfo4>>(&self, pqinfoadmin: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).85)(::core::mem::transmute_copy(self), pqinfoadmin.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn ResponseDestination(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).86)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn putref_ResponseDestination<'a, Param0: ::windows::core::IntoParam<'a, super::Com::IDispatch>>(&self, pdestresponse: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).87)(::core::mem::transmute_copy(self), pdestresponse.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Destination(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).88)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn LookupId(&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).89)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn IsAuthenticated2(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).90)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn IsFirstInTransaction2(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).91)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn IsLastInTransaction2(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).92)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn AttachCurrentSecurityContext2(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).93)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SoapEnvelope(&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).94)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn CompoundMessage(&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).95)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSoapHeader<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrsoapheader: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).96)(::core::mem::transmute_copy(self), bstrsoapheader.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSoapBody<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrsoapbody: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).97)(::core::mem::transmute_copy(self), bstrsoapbody.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IMSMQMessage4 { type Vtable = IMSMQMessage4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b23_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQMessage4> for ::windows::core::IUnknown { fn from(value: IMSMQMessage4) -> Self { value.0 } } impl ::core::convert::From<&IMSMQMessage4> for ::windows::core::IUnknown { fn from(value: &IMSMQMessage4) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQMessage4 { 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 IMSMQMessage4 { 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<IMSMQMessage4> for super::Com::IDispatch { fn from(value: IMSMQMessage4) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQMessage4> for super::Com::IDispatch { fn from(value: &IMSMQMessage4) -> 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 IMSMQMessage4 { 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 &IMSMQMessage4 { 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 IMSMQMessage4_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, plclass: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plprivlevel: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lprivlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plauthlevel: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lauthlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisauthenticated: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pldelivery: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ldelivery: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pltrace: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ltrace: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plpriority: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lpriority: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pljournal: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ljournal: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinforesponse: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinforesponse: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plappspecific: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lappspecific: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrguidsrcmachine: *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, pcbbody: *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, pvarbody: *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, varbody: ::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, ppqinfoadmin: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinfoadmin: ::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, pvarmsgid: *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, pvarmsgid: *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, varmsgid: ::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, plack: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lack: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrlabel: *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, bstrlabel: ::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, plmaxtimetoreachqueue: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lmaxtimetoreachqueue: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plmaxtimetoreceive: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lmaxtimetoreceive: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plhashalg: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lhashalg: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plencryptalg: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lencryptalg: 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, pvarsenttime: *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, plarrivedtime: *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, ppqinfodest: *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, pvarsendercert: *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, varsendercert: ::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, pvarsenderid: *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, plsenderidtype: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lsenderidtype: 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, destinationqueue: ::windows::core::RawPtr, transaction: *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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plsenderversion: *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, pvarextension: *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, varextension: ::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, pbstrguidconnectortype: *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, bstrguidconnectortype: ::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, ppqinfoxactstatus: *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, pvardestsymmkey: *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, vardestsymmkey: ::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, pvarsignature: *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, varsignature: ::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, plauthprovtype: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lauthprovtype: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrauthprovname: *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, bstrauthprovname: ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, varsenderid: ::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, plmsgclass: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lmsgclass: i32) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvarxactid: *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, pisfirstinxact: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pislastinxact: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinforesponse: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinforesponse: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfoadmin: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinfoadmin: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, psreceivedauthenticationlevel: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinforesponse: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinforesponse: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfoadmin: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pqinfoadmin: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppdestresponse: *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, pdestresponse: ::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, ppdestdestination: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvarlookupid: *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, pisauthenticated: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisfirstinxact: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pislastinxact: *mut i16) -> ::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, pbstrsoapenvelope: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvarcompoundmessage: *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, bstrsoapheader: ::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, bstrsoapbody: ::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 IMSMQOutgoingQueueManagement(pub ::windows::core::IUnknown); impl IMSMQOutgoingQueueManagement { 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", feature = "Win32_System_Ole"))] pub unsafe fn Init(&self, machine: *const super::Com::VARIANT, pathname: *const super::Com::VARIANT, formatname: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(machine), ::core::mem::transmute(pathname), ::core::mem::transmute(formatname)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FormatName(&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__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Machine(&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 MessageCount(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn ForeignStatus(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn QueueType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(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).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn TransactionalStatus(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::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 BytesInQueue(&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).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn State(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::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 NextHops(&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).17)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn EodGetSendInfo(&self) -> ::windows::core::Result<IMSMQCollection> { let mut result__: <IMSMQCollection as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQCollection>(result__) } pub unsafe fn Resume(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Pause(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn EodResend(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IMSMQOutgoingQueueManagement { type Vtable = IMSMQOutgoingQueueManagement_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x64c478fb_f9b0_4695_8a7f_439ac94326d3); } impl ::core::convert::From<IMSMQOutgoingQueueManagement> for ::windows::core::IUnknown { fn from(value: IMSMQOutgoingQueueManagement) -> Self { value.0 } } impl ::core::convert::From<&IMSMQOutgoingQueueManagement> for ::windows::core::IUnknown { fn from(value: &IMSMQOutgoingQueueManagement) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQOutgoingQueueManagement { 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 IMSMQOutgoingQueueManagement { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IMSMQOutgoingQueueManagement> for IMSMQManagement { fn from(value: IMSMQOutgoingQueueManagement) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IMSMQOutgoingQueueManagement> for IMSMQManagement { fn from(value: &IMSMQOutgoingQueueManagement) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQManagement> for IMSMQOutgoingQueueManagement { fn into_param(self) -> ::windows::core::Param<'a, IMSMQManagement> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQManagement> for &IMSMQOutgoingQueueManagement { fn into_param(self) -> ::windows::core::Param<'a, IMSMQManagement> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IMSMQOutgoingQueueManagement> for super::Com::IDispatch { fn from(value: IMSMQOutgoingQueueManagement) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQOutgoingQueueManagement> for super::Com::IDispatch { fn from(value: &IMSMQOutgoingQueueManagement) -> 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 IMSMQOutgoingQueueManagement { 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 &IMSMQOutgoingQueueManagement { 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 IMSMQOutgoingQueueManagement_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, machine: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, pathname: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, formatname: *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, pbstrformatname: *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, pbstrmachine: *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, plmessagecount: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plforeignstatus: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plqueuetype: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pfislocal: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pltransactionalstatus: *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, pvbytesinqueue: *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, plstate: *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, pvnexthops: *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, ppcollection: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, 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 IMSMQPrivateDestination(pub ::windows::core::IUnknown); impl IMSMQPrivateDestination { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Handle(&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 SetHandle<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varhandle: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), varhandle.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IMSMQPrivateDestination { type Vtable = IMSMQPrivateDestination_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b17_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQPrivateDestination> for ::windows::core::IUnknown { fn from(value: IMSMQPrivateDestination) -> Self { value.0 } } impl ::core::convert::From<&IMSMQPrivateDestination> for ::windows::core::IUnknown { fn from(value: &IMSMQPrivateDestination) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQPrivateDestination { 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 IMSMQPrivateDestination { 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<IMSMQPrivateDestination> for super::Com::IDispatch { fn from(value: IMSMQPrivateDestination) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQPrivateDestination> for super::Com::IDispatch { fn from(value: &IMSMQPrivateDestination) -> 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 IMSMQPrivateDestination { 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 &IMSMQPrivateDestination { 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 IMSMQPrivateDestination_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, pvarhandle: *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, varhandle: ::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 IMSMQPrivateEvent(pub ::windows::core::IUnknown); impl IMSMQPrivateEvent { pub unsafe fn Hwnd(&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 FireArrivedEvent<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueue>>(&self, pq: Param0, msgcursor: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), pq.into_param().abi(), ::core::mem::transmute(msgcursor)).ok() } pub unsafe fn FireArrivedErrorEvent<'a, Param0: ::windows::core::IntoParam<'a, IMSMQQueue>>(&self, pq: Param0, hrstatus: ::windows::core::HRESULT, msgcursor: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), pq.into_param().abi(), ::core::mem::transmute(hrstatus), ::core::mem::transmute(msgcursor)).ok() } } unsafe impl ::windows::core::Interface for IMSMQPrivateEvent { type Vtable = IMSMQPrivateEvent_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7ab3341_c9d3_11d1_bb47_0080c7c5a2c0); } impl ::core::convert::From<IMSMQPrivateEvent> for ::windows::core::IUnknown { fn from(value: IMSMQPrivateEvent) -> Self { value.0 } } impl ::core::convert::From<&IMSMQPrivateEvent> for ::windows::core::IUnknown { fn from(value: &IMSMQPrivateEvent) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQPrivateEvent { 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 IMSMQPrivateEvent { 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<IMSMQPrivateEvent> for super::Com::IDispatch { fn from(value: IMSMQPrivateEvent) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQPrivateEvent> for super::Com::IDispatch { fn from(value: &IMSMQPrivateEvent) -> 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 IMSMQPrivateEvent { 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 &IMSMQPrivateEvent { 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 IMSMQPrivateEvent_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, phwnd: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pq: ::windows::core::RawPtr, msgcursor: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pq: ::windows::core::RawPtr, hrstatus: ::windows::core::HRESULT, msgcursor: i32) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSMQQuery(pub ::windows::core::IUnknown); impl IMSMQQuery { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn LookupQueue(&self, queueguid: *const super::Com::VARIANT, servicetypeguid: *const super::Com::VARIANT, label: *const super::Com::VARIANT, createtime: *const super::Com::VARIANT, modifytime: *const super::Com::VARIANT, relservicetype: *const super::Com::VARIANT, rellabel: *const super::Com::VARIANT, relcreatetime: *const super::Com::VARIANT, relmodifytime: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQQueueInfos> { let mut result__: <IMSMQQueueInfos as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)( ::core::mem::transmute_copy(self), ::core::mem::transmute(queueguid), ::core::mem::transmute(servicetypeguid), ::core::mem::transmute(label), ::core::mem::transmute(createtime), ::core::mem::transmute(modifytime), ::core::mem::transmute(relservicetype), ::core::mem::transmute(rellabel), ::core::mem::transmute(relcreatetime), ::core::mem::transmute(relmodifytime), &mut result__, ) .from_abi::<IMSMQQueueInfos>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQuery { type Vtable = IMSMQQuery_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e072_dccd_11d0_aa4b_0060970debae); } impl ::core::convert::From<IMSMQQuery> for ::windows::core::IUnknown { fn from(value: IMSMQQuery) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQuery> for ::windows::core::IUnknown { fn from(value: &IMSMQQuery) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQuery { 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 IMSMQQuery { 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<IMSMQQuery> for super::Com::IDispatch { fn from(value: IMSMQQuery) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQuery> for super::Com::IDispatch { fn from(value: &IMSMQQuery) -> 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 IMSMQQuery { 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 &IMSMQQuery { 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 IMSMQQuery_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, queueguid: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, servicetypeguid: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, label: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, createtime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, modifytime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relservicetype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, rellabel: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relcreatetime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relmodifytime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppqinfos: *mut ::windows::core::RawPtr, ) -> ::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 IMSMQQuery2(pub ::windows::core::IUnknown); impl IMSMQQuery2 { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn LookupQueue(&self, queueguid: *const super::Com::VARIANT, servicetypeguid: *const super::Com::VARIANT, label: *const super::Com::VARIANT, createtime: *const super::Com::VARIANT, modifytime: *const super::Com::VARIANT, relservicetype: *const super::Com::VARIANT, rellabel: *const super::Com::VARIANT, relcreatetime: *const super::Com::VARIANT, relmodifytime: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQQueueInfos2> { let mut result__: <IMSMQQueueInfos2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)( ::core::mem::transmute_copy(self), ::core::mem::transmute(queueguid), ::core::mem::transmute(servicetypeguid), ::core::mem::transmute(label), ::core::mem::transmute(createtime), ::core::mem::transmute(modifytime), ::core::mem::transmute(relservicetype), ::core::mem::transmute(rellabel), ::core::mem::transmute(relcreatetime), ::core::mem::transmute(relmodifytime), &mut result__, ) .from_abi::<IMSMQQueueInfos2>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQuery2 { type Vtable = IMSMQQuery2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b0e_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQQuery2> for ::windows::core::IUnknown { fn from(value: IMSMQQuery2) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQuery2> for ::windows::core::IUnknown { fn from(value: &IMSMQQuery2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQuery2 { 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 IMSMQQuery2 { 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<IMSMQQuery2> for super::Com::IDispatch { fn from(value: IMSMQQuery2) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQuery2> for super::Com::IDispatch { fn from(value: &IMSMQQuery2) -> 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 IMSMQQuery2 { 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 &IMSMQQuery2 { 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 IMSMQQuery2_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, queueguid: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, servicetypeguid: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, label: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, createtime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, modifytime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relservicetype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, rellabel: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relcreatetime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relmodifytime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppqinfos: *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_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::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 IMSMQQuery3(pub ::windows::core::IUnknown); impl IMSMQQuery3 { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn LookupQueue_v2(&self, queueguid: *const super::Com::VARIANT, servicetypeguid: *const super::Com::VARIANT, label: *const super::Com::VARIANT, createtime: *const super::Com::VARIANT, modifytime: *const super::Com::VARIANT, relservicetype: *const super::Com::VARIANT, rellabel: *const super::Com::VARIANT, relcreatetime: *const super::Com::VARIANT, relmodifytime: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQQueueInfos3> { let mut result__: <IMSMQQueueInfos3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)( ::core::mem::transmute_copy(self), ::core::mem::transmute(queueguid), ::core::mem::transmute(servicetypeguid), ::core::mem::transmute(label), ::core::mem::transmute(createtime), ::core::mem::transmute(modifytime), ::core::mem::transmute(relservicetype), ::core::mem::transmute(rellabel), ::core::mem::transmute(relcreatetime), ::core::mem::transmute(relmodifytime), &mut result__, ) .from_abi::<IMSMQQueueInfos3>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn LookupQueue( &self, queueguid: *const super::Com::VARIANT, servicetypeguid: *const super::Com::VARIANT, label: *const super::Com::VARIANT, createtime: *const super::Com::VARIANT, modifytime: *const super::Com::VARIANT, relservicetype: *const super::Com::VARIANT, rellabel: *const super::Com::VARIANT, relcreatetime: *const super::Com::VARIANT, relmodifytime: *const super::Com::VARIANT, multicastaddress: *const super::Com::VARIANT, relmulticastaddress: *const super::Com::VARIANT, ) -> ::windows::core::Result<IMSMQQueueInfos3> { let mut result__: <IMSMQQueueInfos3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)( ::core::mem::transmute_copy(self), ::core::mem::transmute(queueguid), ::core::mem::transmute(servicetypeguid), ::core::mem::transmute(label), ::core::mem::transmute(createtime), ::core::mem::transmute(modifytime), ::core::mem::transmute(relservicetype), ::core::mem::transmute(rellabel), ::core::mem::transmute(relcreatetime), ::core::mem::transmute(relmodifytime), ::core::mem::transmute(multicastaddress), ::core::mem::transmute(relmulticastaddress), &mut result__, ) .from_abi::<IMSMQQueueInfos3>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQuery3 { type Vtable = IMSMQQuery3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b19_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQQuery3> for ::windows::core::IUnknown { fn from(value: IMSMQQuery3) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQuery3> for ::windows::core::IUnknown { fn from(value: &IMSMQQuery3) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQuery3 { 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 IMSMQQuery3 { 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<IMSMQQuery3> for super::Com::IDispatch { fn from(value: IMSMQQuery3) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQuery3> for super::Com::IDispatch { fn from(value: &IMSMQQuery3) -> 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 IMSMQQuery3 { 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 &IMSMQQuery3 { 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 IMSMQQuery3_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, queueguid: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, servicetypeguid: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, label: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, createtime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, modifytime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relservicetype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, rellabel: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relcreatetime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relmodifytime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppqinfos: *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_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, queueguid: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, servicetypeguid: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, label: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, createtime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, modifytime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relservicetype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, rellabel: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relcreatetime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relmodifytime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, multicastaddress: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relmulticastaddress: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppqinfos: *mut ::windows::core::RawPtr, ) -> ::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 IMSMQQuery4(pub ::windows::core::IUnknown); impl IMSMQQuery4 { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn LookupQueue_v2(&self, queueguid: *const super::Com::VARIANT, servicetypeguid: *const super::Com::VARIANT, label: *const super::Com::VARIANT, createtime: *const super::Com::VARIANT, modifytime: *const super::Com::VARIANT, relservicetype: *const super::Com::VARIANT, rellabel: *const super::Com::VARIANT, relcreatetime: *const super::Com::VARIANT, relmodifytime: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQQueueInfos4> { let mut result__: <IMSMQQueueInfos4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)( ::core::mem::transmute_copy(self), ::core::mem::transmute(queueguid), ::core::mem::transmute(servicetypeguid), ::core::mem::transmute(label), ::core::mem::transmute(createtime), ::core::mem::transmute(modifytime), ::core::mem::transmute(relservicetype), ::core::mem::transmute(rellabel), ::core::mem::transmute(relcreatetime), ::core::mem::transmute(relmodifytime), &mut result__, ) .from_abi::<IMSMQQueueInfos4>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn LookupQueue( &self, queueguid: *const super::Com::VARIANT, servicetypeguid: *const super::Com::VARIANT, label: *const super::Com::VARIANT, createtime: *const super::Com::VARIANT, modifytime: *const super::Com::VARIANT, relservicetype: *const super::Com::VARIANT, rellabel: *const super::Com::VARIANT, relcreatetime: *const super::Com::VARIANT, relmodifytime: *const super::Com::VARIANT, multicastaddress: *const super::Com::VARIANT, relmulticastaddress: *const super::Com::VARIANT, ) -> ::windows::core::Result<IMSMQQueueInfos4> { let mut result__: <IMSMQQueueInfos4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)( ::core::mem::transmute_copy(self), ::core::mem::transmute(queueguid), ::core::mem::transmute(servicetypeguid), ::core::mem::transmute(label), ::core::mem::transmute(createtime), ::core::mem::transmute(modifytime), ::core::mem::transmute(relservicetype), ::core::mem::transmute(rellabel), ::core::mem::transmute(relcreatetime), ::core::mem::transmute(relmodifytime), ::core::mem::transmute(multicastaddress), ::core::mem::transmute(relmulticastaddress), &mut result__, ) .from_abi::<IMSMQQueueInfos4>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQuery4 { type Vtable = IMSMQQuery4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b24_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQQuery4> for ::windows::core::IUnknown { fn from(value: IMSMQQuery4) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQuery4> for ::windows::core::IUnknown { fn from(value: &IMSMQQuery4) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQuery4 { 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 IMSMQQuery4 { 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<IMSMQQuery4> for super::Com::IDispatch { fn from(value: IMSMQQuery4) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQuery4> for super::Com::IDispatch { fn from(value: &IMSMQQuery4) -> 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 IMSMQQuery4 { 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 &IMSMQQuery4 { 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 IMSMQQuery4_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, queueguid: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, servicetypeguid: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, label: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, createtime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, modifytime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relservicetype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, rellabel: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relcreatetime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relmodifytime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppqinfos: *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_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn( this: ::windows::core::RawPtr, queueguid: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, servicetypeguid: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, label: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, createtime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, modifytime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relservicetype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, rellabel: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relcreatetime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relmodifytime: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, multicastaddress: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, relmulticastaddress: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppqinfos: *mut ::windows::core::RawPtr, ) -> ::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 IMSMQQueue(pub ::windows::core::IUnknown); impl IMSMQQueue { pub unsafe fn Access(&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 ShareMode(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn QueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo> { let mut result__: <IMSMQQueueInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo>(result__) } pub unsafe fn Handle(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn IsOpen(&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 Close(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Receive(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Peek(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn EnableNotification<'a, Param0: ::windows::core::IntoParam<'a, IMSMQEvent>>(&self, event: Param0, cursor: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), event.into_param().abi(), ::core::mem::transmute(cursor), ::core::mem::transmute(receivetimeout)).ok() } pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveCurrent(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekNext(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekCurrent(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQueue { type Vtable = IMSMQQueue_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e076_dccd_11d0_aa4b_0060970debae); } impl ::core::convert::From<IMSMQQueue> for ::windows::core::IUnknown { fn from(value: IMSMQQueue) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueue> for ::windows::core::IUnknown { fn from(value: &IMSMQQueue) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueue { 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 IMSMQQueue { 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<IMSMQQueue> for super::Com::IDispatch { fn from(value: IMSMQQueue) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueue> for super::Com::IDispatch { fn from(value: &IMSMQQueue) -> 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 IMSMQQueue { 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 &IMSMQQueue { 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 IMSMQQueue_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, placcess: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plsharemode: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plhandle: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisopen: *mut i16) -> ::windows::core::HRESULT, 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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, event: ::windows::core::RawPtr, cursor: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *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, 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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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 IMSMQQueue2(pub ::windows::core::IUnknown); impl IMSMQQueue2 { pub unsafe fn Access(&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 ShareMode(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn QueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo2> { let mut result__: <IMSMQQueueInfo2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo2>(result__) } pub unsafe fn Handle(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn IsOpen(&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 Close(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Receive_v1(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Peek_v1(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn EnableNotification<'a, Param0: ::windows::core::IntoParam<'a, IMSMQEvent2>>(&self, event: Param0, cursor: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), event.into_param().abi(), ::core::mem::transmute(cursor), ::core::mem::transmute(receivetimeout)).ok() } pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveCurrent_v1(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekNext_v1(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekCurrent_v1(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Receive(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage2> { let mut result__: <IMSMQMessage2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage2>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Peek(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage2> { let mut result__: <IMSMQMessage2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage2>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveCurrent(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage2> { let mut result__: <IMSMQMessage2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage2>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekNext(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage2> { let mut result__: <IMSMQMessage2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage2>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekCurrent(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage2> { let mut result__: <IMSMQMessage2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage2>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQueue2 { type Vtable = IMSMQQueue2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xef0574e0_06d8_11d3_b100_00e02c074f6b); } impl ::core::convert::From<IMSMQQueue2> for ::windows::core::IUnknown { fn from(value: IMSMQQueue2) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueue2> for ::windows::core::IUnknown { fn from(value: &IMSMQQueue2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueue2 { 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 IMSMQQueue2 { 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<IMSMQQueue2> for super::Com::IDispatch { fn from(value: IMSMQQueue2) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueue2> for super::Com::IDispatch { fn from(value: &IMSMQQueue2) -> 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 IMSMQQueue2 { 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 &IMSMQQueue2 { 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 IMSMQQueue2_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, placcess: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plsharemode: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plhandle: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisopen: *mut i16) -> ::windows::core::HRESULT, 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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, event: ::windows::core::RawPtr, cursor: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *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, 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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *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_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::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 IMSMQQueue3(pub ::windows::core::IUnknown); impl IMSMQQueue3 { pub unsafe fn Access(&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 ShareMode(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn QueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo3> { let mut result__: <IMSMQQueueInfo3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo3>(result__) } pub unsafe fn Handle(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn IsOpen(&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 Close(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Receive_v1(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Peek_v1(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn EnableNotification<'a, Param0: ::windows::core::IntoParam<'a, IMSMQEvent3>>(&self, event: Param0, cursor: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), event.into_param().abi(), ::core::mem::transmute(cursor), ::core::mem::transmute(receivetimeout)).ok() } pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveCurrent_v1(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekNext_v1(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekCurrent_v1(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Receive(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Peek(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveCurrent(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekNext(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekCurrent(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Handle2(&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).26)(::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 ReceiveByLookupId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveNextByLookupId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceivePreviousByLookupId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveFirstByLookupId(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveLastByLookupId(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekByLookupId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekNextByLookupId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekPreviousByLookupId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekFirstByLookupId(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekLastByLookupId(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage3> { let mut result__: <IMSMQMessage3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage3>(result__) } pub unsafe fn Purge(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn IsOpen2(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQueue3 { type Vtable = IMSMQQueue3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b1b_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQQueue3> for ::windows::core::IUnknown { fn from(value: IMSMQQueue3) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueue3> for ::windows::core::IUnknown { fn from(value: &IMSMQQueue3) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueue3 { 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 IMSMQQueue3 { 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<IMSMQQueue3> for super::Com::IDispatch { fn from(value: IMSMQQueue3) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueue3> for super::Com::IDispatch { fn from(value: &IMSMQQueue3) -> 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 IMSMQQueue3 { 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 &IMSMQQueue3 { 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 IMSMQQueue3_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, placcess: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plsharemode: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plhandle: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisopen: *mut i16) -> ::windows::core::HRESULT, 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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, event: ::windows::core::RawPtr, cursor: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *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, 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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *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_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvarhandle: *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, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisopen: *mut i16) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSMQQueue4(pub ::windows::core::IUnknown); impl IMSMQQueue4 { pub unsafe fn Access(&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 ShareMode(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn QueueInfo(&self) -> ::windows::core::Result<IMSMQQueueInfo4> { let mut result__: <IMSMQQueueInfo4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo4>(result__) } pub unsafe fn Handle(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn IsOpen(&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 Close(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Receive_v1(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Peek_v1(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn EnableNotification<'a, Param0: ::windows::core::IntoParam<'a, IMSMQEvent3>>(&self, event: Param0, cursor: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), event.into_param().abi(), ::core::mem::transmute(cursor), ::core::mem::transmute(receivetimeout)).ok() } pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveCurrent_v1(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).17)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekNext_v1(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekCurrent_v1(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage> { let mut result__: <IMSMQMessage as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), &mut result__).from_abi::<IMSMQMessage>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Receive(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Peek(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).21)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveCurrent(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekNext(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekCurrent(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, receivetimeout: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(receivetimeout), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).25)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Handle2(&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).26)(::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 ReceiveByLookupId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveNextByLookupId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceivePreviousByLookupId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).29)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveFirstByLookupId(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveLastByLookupId(&self, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).31)(::core::mem::transmute_copy(self), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekByLookupId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekNextByLookupId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekPreviousByLookupId<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekFirstByLookupId(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn PeekLastByLookupId(&self, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } pub unsafe fn Purge(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).37)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn IsOpen2(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ReceiveByLookupIdAllowPeek<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, lookupid: Param0, transaction: *const super::Com::VARIANT, wantdestinationqueue: *const super::Com::VARIANT, wantbody: *const super::Com::VARIANT, wantconnectortype: *const super::Com::VARIANT) -> ::windows::core::Result<IMSMQMessage4> { let mut result__: <IMSMQMessage4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).39)(::core::mem::transmute_copy(self), lookupid.into_param().abi(), ::core::mem::transmute(transaction), ::core::mem::transmute(wantdestinationqueue), ::core::mem::transmute(wantbody), ::core::mem::transmute(wantconnectortype), &mut result__).from_abi::<IMSMQMessage4>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQueue4 { type Vtable = IMSMQQueue4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b20_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQQueue4> for ::windows::core::IUnknown { fn from(value: IMSMQQueue4) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueue4> for ::windows::core::IUnknown { fn from(value: &IMSMQQueue4) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueue4 { 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 IMSMQQueue4 { 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<IMSMQQueue4> for super::Com::IDispatch { fn from(value: IMSMQQueue4) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueue4> for super::Com::IDispatch { fn from(value: &IMSMQQueue4) -> 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 IMSMQQueue4 { 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 &IMSMQQueue4 { 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 IMSMQQueue4_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, placcess: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plsharemode: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfo: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plhandle: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisopen: *mut i16) -> ::windows::core::HRESULT, 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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, event: ::windows::core::RawPtr, cursor: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *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, 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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, receivetimeout: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *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_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvarhandle: *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, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole")))] usize, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisopen: *mut i16) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lookupid: ::core::mem::ManuallyDrop<super::Com::VARIANT>, transaction: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantdestinationqueue: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantbody: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, wantconnectortype: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, ppmsg: *mut ::windows::core::RawPtr) -> ::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 IMSMQQueueInfo(pub ::windows::core::IUnknown); impl IMSMQQueueInfo { #[cfg(feature = "Win32_Foundation")] pub unsafe fn QueueGuid(&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 ServiceTypeGuid(&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__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServiceTypeGuid<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrguidservicetype: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), bstrguidservicetype.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Label(&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__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlabel: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), bstrlabel.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PathName(&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).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPathName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrpathname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), bstrpathname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FormatName(&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).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetFormatName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrformatname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrformatname.into_param().abi()).ok() } pub unsafe fn IsTransactional(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn PrivLevel(&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 SetPrivLevel(&self, lprivlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lprivlevel)).ok() } pub unsafe fn Journal(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetJournal(&self, ljournal: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(ljournal)).ok() } pub unsafe fn Quota(&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 SetQuota(&self, lquota: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(lquota)).ok() } pub unsafe fn BasePriority(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetBasePriority(&self, lbasepriority: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(lbasepriority)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn CreateTime(&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).25)(::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 ModifyTime(&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).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn Authenticate(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAuthenticate(&self, lauthenticate: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), ::core::mem::transmute(lauthenticate)).ok() } pub unsafe fn JournalQuota(&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 SetJournalQuota(&self, ljournalquota: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), ::core::mem::transmute(ljournalquota)).ok() } pub unsafe fn IsWorldReadable(&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__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Create(&self, istransactional: *const super::Com::VARIANT, isworldreadable: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), ::core::mem::transmute(istransactional), ::core::mem::transmute(isworldreadable)).ok() } pub unsafe fn Delete(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Open(&self, access: i32, sharemode: i32) -> ::windows::core::Result<IMSMQQueue> { let mut result__: <IMSMQQueue as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), ::core::mem::transmute(access), ::core::mem::transmute(sharemode), &mut result__).from_abi::<IMSMQQueue>(result__) } pub unsafe fn Refresh(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Update(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self)).ok() } } unsafe impl ::windows::core::Interface for IMSMQQueueInfo { type Vtable = IMSMQQueueInfo_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e07b_dccd_11d0_aa4b_0060970debae); } impl ::core::convert::From<IMSMQQueueInfo> for ::windows::core::IUnknown { fn from(value: IMSMQQueueInfo) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueueInfo> for ::windows::core::IUnknown { fn from(value: &IMSMQQueueInfo) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueueInfo { 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 IMSMQQueueInfo { 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<IMSMQQueueInfo> for super::Com::IDispatch { fn from(value: IMSMQQueueInfo) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueueInfo> for super::Com::IDispatch { fn from(value: &IMSMQQueueInfo) -> 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 IMSMQQueueInfo { 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 &IMSMQQueueInfo { 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 IMSMQQueueInfo_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, pbstrguidqueue: *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, pbstrguidservicetype: *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, bstrguidservicetype: ::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, pbstrlabel: *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, bstrlabel: ::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, pbstrpathname: *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, bstrpathname: ::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, pbstrformatname: *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, bstrformatname: ::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, pistransactional: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plprivlevel: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lprivlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pljournal: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ljournal: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plquota: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lquota: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plbasepriority: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lbasepriority: 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, pvarcreatetime: *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, pvarmodifytime: *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, plauthenticate: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lauthenticate: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pljournalquota: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ljournalquota: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisworldreadable: *mut i16) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, istransactional: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, isworldreadable: *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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, access: i32, sharemode: i32, ppq: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSMQQueueInfo2(pub ::windows::core::IUnknown); impl IMSMQQueueInfo2 { #[cfg(feature = "Win32_Foundation")] pub unsafe fn QueueGuid(&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 ServiceTypeGuid(&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__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServiceTypeGuid<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrguidservicetype: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), bstrguidservicetype.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Label(&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__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlabel: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), bstrlabel.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PathName(&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).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPathName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrpathname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), bstrpathname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FormatName(&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).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetFormatName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrformatname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrformatname.into_param().abi()).ok() } pub unsafe fn IsTransactional(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn PrivLevel(&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 SetPrivLevel(&self, lprivlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lprivlevel)).ok() } pub unsafe fn Journal(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetJournal(&self, ljournal: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(ljournal)).ok() } pub unsafe fn Quota(&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 SetQuota(&self, lquota: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(lquota)).ok() } pub unsafe fn BasePriority(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetBasePriority(&self, lbasepriority: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(lbasepriority)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn CreateTime(&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).25)(::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 ModifyTime(&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).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn Authenticate(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAuthenticate(&self, lauthenticate: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), ::core::mem::transmute(lauthenticate)).ok() } pub unsafe fn JournalQuota(&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 SetJournalQuota(&self, ljournalquota: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), ::core::mem::transmute(ljournalquota)).ok() } pub unsafe fn IsWorldReadable(&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__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Create(&self, istransactional: *const super::Com::VARIANT, isworldreadable: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), ::core::mem::transmute(istransactional), ::core::mem::transmute(isworldreadable)).ok() } pub unsafe fn Delete(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Open(&self, access: i32, sharemode: i32) -> ::windows::core::Result<IMSMQQueue2> { let mut result__: <IMSMQQueue2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), ::core::mem::transmute(access), ::core::mem::transmute(sharemode), &mut result__).from_abi::<IMSMQQueue2>(result__) } pub unsafe fn Refresh(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Update(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PathNameDNS(&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).37)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Security(&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).39)(::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 SetSecurity<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsecurity: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), varsecurity.into_param().abi()).ok() } } unsafe impl ::windows::core::Interface for IMSMQQueueInfo2 { type Vtable = IMSMQQueueInfo2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfd174a80_89cf_11d2_b0f2_00e02c074f6b); } impl ::core::convert::From<IMSMQQueueInfo2> for ::windows::core::IUnknown { fn from(value: IMSMQQueueInfo2) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueueInfo2> for ::windows::core::IUnknown { fn from(value: &IMSMQQueueInfo2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueueInfo2 { 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 IMSMQQueueInfo2 { 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<IMSMQQueueInfo2> for super::Com::IDispatch { fn from(value: IMSMQQueueInfo2) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueueInfo2> for super::Com::IDispatch { fn from(value: &IMSMQQueueInfo2) -> 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 IMSMQQueueInfo2 { 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 &IMSMQQueueInfo2 { 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 IMSMQQueueInfo2_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, pbstrguidqueue: *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, pbstrguidservicetype: *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, bstrguidservicetype: ::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, pbstrlabel: *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, bstrlabel: ::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, pbstrpathname: *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, bstrpathname: ::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, pbstrformatname: *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, bstrformatname: ::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, pistransactional: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plprivlevel: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lprivlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pljournal: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ljournal: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plquota: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lquota: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plbasepriority: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lbasepriority: 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, pvarcreatetime: *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, pvarmodifytime: *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, plauthenticate: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lauthenticate: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pljournalquota: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ljournalquota: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisworldreadable: *mut i16) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, istransactional: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, isworldreadable: *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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, access: i32, sharemode: i32, ppq: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrpathnamedns: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvarsecurity: *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, varsecurity: ::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 IMSMQQueueInfo3(pub ::windows::core::IUnknown); impl IMSMQQueueInfo3 { #[cfg(feature = "Win32_Foundation")] pub unsafe fn QueueGuid(&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 ServiceTypeGuid(&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__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServiceTypeGuid<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrguidservicetype: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), bstrguidservicetype.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Label(&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__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlabel: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), bstrlabel.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PathName(&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).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPathName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrpathname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), bstrpathname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FormatName(&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).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetFormatName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrformatname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrformatname.into_param().abi()).ok() } pub unsafe fn IsTransactional(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn PrivLevel(&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 SetPrivLevel(&self, lprivlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lprivlevel)).ok() } pub unsafe fn Journal(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetJournal(&self, ljournal: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(ljournal)).ok() } pub unsafe fn Quota(&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 SetQuota(&self, lquota: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(lquota)).ok() } pub unsafe fn BasePriority(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetBasePriority(&self, lbasepriority: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(lbasepriority)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn CreateTime(&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).25)(::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 ModifyTime(&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).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn Authenticate(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAuthenticate(&self, lauthenticate: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), ::core::mem::transmute(lauthenticate)).ok() } pub unsafe fn JournalQuota(&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 SetJournalQuota(&self, ljournalquota: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), ::core::mem::transmute(ljournalquota)).ok() } pub unsafe fn IsWorldReadable(&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__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Create(&self, istransactional: *const super::Com::VARIANT, isworldreadable: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), ::core::mem::transmute(istransactional), ::core::mem::transmute(isworldreadable)).ok() } pub unsafe fn Delete(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Open(&self, access: i32, sharemode: i32) -> ::windows::core::Result<IMSMQQueue3> { let mut result__: <IMSMQQueue3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), ::core::mem::transmute(access), ::core::mem::transmute(sharemode), &mut result__).from_abi::<IMSMQQueue3>(result__) } pub unsafe fn Refresh(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Update(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PathNameDNS(&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).37)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Security(&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).39)(::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 SetSecurity<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsecurity: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), varsecurity.into_param().abi()).ok() } pub unsafe fn IsTransactional2(&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 IsWorldReadable2(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MulticastAddress(&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).43)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetMulticastAddress<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrmulticastaddress: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).44)(::core::mem::transmute_copy(self), bstrmulticastaddress.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&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).45)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQueueInfo3 { type Vtable = IMSMQQueueInfo3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b1d_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQQueueInfo3> for ::windows::core::IUnknown { fn from(value: IMSMQQueueInfo3) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueueInfo3> for ::windows::core::IUnknown { fn from(value: &IMSMQQueueInfo3) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueueInfo3 { 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 IMSMQQueueInfo3 { 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<IMSMQQueueInfo3> for super::Com::IDispatch { fn from(value: IMSMQQueueInfo3) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueueInfo3> for super::Com::IDispatch { fn from(value: &IMSMQQueueInfo3) -> 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 IMSMQQueueInfo3 { 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 &IMSMQQueueInfo3 { 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 IMSMQQueueInfo3_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, pbstrguidqueue: *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, pbstrguidservicetype: *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, bstrguidservicetype: ::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, pbstrlabel: *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, bstrlabel: ::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, pbstrpathname: *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, bstrpathname: ::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, pbstrformatname: *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, bstrformatname: ::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, pistransactional: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plprivlevel: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lprivlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pljournal: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ljournal: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plquota: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lquota: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plbasepriority: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lbasepriority: 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, pvarcreatetime: *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, pvarmodifytime: *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, plauthenticate: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lauthenticate: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pljournalquota: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ljournalquota: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisworldreadable: *mut i16) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, istransactional: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, isworldreadable: *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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, access: i32, sharemode: i32, ppq: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrpathnamedns: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvarsecurity: *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, varsecurity: ::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, pistransactional: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisworldreadable: *mut i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrmulticastaddress: *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, bstrmulticastaddress: ::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, pbstradspath: *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 IMSMQQueueInfo4(pub ::windows::core::IUnknown); impl IMSMQQueueInfo4 { #[cfg(feature = "Win32_Foundation")] pub unsafe fn QueueGuid(&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 ServiceTypeGuid(&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__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetServiceTypeGuid<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrguidservicetype: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), bstrguidservicetype.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Label(&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__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLabel<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrlabel: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), bstrlabel.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PathName(&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).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetPathName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrpathname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).13)(::core::mem::transmute_copy(self), bstrpathname.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FormatName(&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).14)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetFormatName<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrformatname: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).15)(::core::mem::transmute_copy(self), bstrformatname.into_param().abi()).ok() } pub unsafe fn IsTransactional(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn PrivLevel(&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 SetPrivLevel(&self, lprivlevel: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).18)(::core::mem::transmute_copy(self), ::core::mem::transmute(lprivlevel)).ok() } pub unsafe fn Journal(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).19)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetJournal(&self, ljournal: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).20)(::core::mem::transmute_copy(self), ::core::mem::transmute(ljournal)).ok() } pub unsafe fn Quota(&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 SetQuota(&self, lquota: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).22)(::core::mem::transmute_copy(self), ::core::mem::transmute(lquota)).ok() } pub unsafe fn BasePriority(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).23)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetBasePriority(&self, lbasepriority: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).24)(::core::mem::transmute_copy(self), ::core::mem::transmute(lbasepriority)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn CreateTime(&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).25)(::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 ModifyTime(&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).26)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn Authenticate(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).27)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn SetAuthenticate(&self, lauthenticate: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).28)(::core::mem::transmute_copy(self), ::core::mem::transmute(lauthenticate)).ok() } pub unsafe fn JournalQuota(&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 SetJournalQuota(&self, ljournalquota: i32) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).30)(::core::mem::transmute_copy(self), ::core::mem::transmute(ljournalquota)).ok() } pub unsafe fn IsWorldReadable(&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__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Create(&self, istransactional: *const super::Com::VARIANT, isworldreadable: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).32)(::core::mem::transmute_copy(self), ::core::mem::transmute(istransactional), ::core::mem::transmute(isworldreadable)).ok() } pub unsafe fn Delete(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).33)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Open(&self, access: i32, sharemode: i32) -> ::windows::core::Result<IMSMQQueue4> { let mut result__: <IMSMQQueue4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).34)(::core::mem::transmute_copy(self), ::core::mem::transmute(access), ::core::mem::transmute(sharemode), &mut result__).from_abi::<IMSMQQueue4>(result__) } pub unsafe fn Refresh(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).35)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Update(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).36)(::core::mem::transmute_copy(self)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn PathNameDNS(&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).37)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).38)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Security(&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).39)(::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 SetSecurity<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, varsecurity: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).40)(::core::mem::transmute_copy(self), varsecurity.into_param().abi()).ok() } pub unsafe fn IsTransactional2(&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 IsWorldReadable2(&self) -> ::windows::core::Result<i16> { let mut result__: <i16 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).42)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn MulticastAddress(&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).43)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetMulticastAddress<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BSTR>>(&self, bstrmulticastaddress: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).44)(::core::mem::transmute_copy(self), bstrmulticastaddress.into_param().abi()).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn ADsPath(&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).45)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::super::Foundation::BSTR>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQueueInfo4 { type Vtable = IMSMQQueueInfo4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b21_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQQueueInfo4> for ::windows::core::IUnknown { fn from(value: IMSMQQueueInfo4) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueueInfo4> for ::windows::core::IUnknown { fn from(value: &IMSMQQueueInfo4) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueueInfo4 { 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 IMSMQQueueInfo4 { 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<IMSMQQueueInfo4> for super::Com::IDispatch { fn from(value: IMSMQQueueInfo4) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueueInfo4> for super::Com::IDispatch { fn from(value: &IMSMQQueueInfo4) -> 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 IMSMQQueueInfo4 { 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 &IMSMQQueueInfo4 { 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 IMSMQQueueInfo4_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, pbstrguidqueue: *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, pbstrguidservicetype: *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, bstrguidservicetype: ::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, pbstrlabel: *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, bstrlabel: ::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, pbstrpathname: *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, bstrpathname: ::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, pbstrformatname: *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, bstrformatname: ::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, pistransactional: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plprivlevel: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lprivlevel: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pljournal: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ljournal: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plquota: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lquota: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plbasepriority: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lbasepriority: 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, pvarcreatetime: *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, pvarmodifytime: *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, plauthenticate: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, lauthenticate: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pljournalquota: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ljournalquota: i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisworldreadable: *mut i16) -> ::windows::core::HRESULT, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, istransactional: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, isworldreadable: *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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, access: i32, sharemode: i32, ppq: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrpathnamedns: *mut ::core::mem::ManuallyDrop<super::super::Foundation::BSTR>) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_Foundation"))] usize, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvarsecurity: *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, varsecurity: ::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, pistransactional: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pisworldreadable: *mut i16) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pbstrmulticastaddress: *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, bstrmulticastaddress: ::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, pbstradspath: *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 IMSMQQueueInfos(pub ::windows::core::IUnknown); impl IMSMQQueueInfos { pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Next(&self) -> ::windows::core::Result<IMSMQQueueInfo> { let mut result__: <IMSMQQueueInfo as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQueueInfos { type Vtable = IMSMQQueueInfos_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e07d_dccd_11d0_aa4b_0060970debae); } impl ::core::convert::From<IMSMQQueueInfos> for ::windows::core::IUnknown { fn from(value: IMSMQQueueInfos) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueueInfos> for ::windows::core::IUnknown { fn from(value: &IMSMQQueueInfos) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueueInfos { 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 IMSMQQueueInfos { 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<IMSMQQueueInfos> for super::Com::IDispatch { fn from(value: IMSMQQueueInfos) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueueInfos> for super::Com::IDispatch { fn from(value: &IMSMQQueueInfos) -> 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 IMSMQQueueInfos { 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 &IMSMQQueueInfos { 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 IMSMQQueueInfos_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfonext: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSMQQueueInfos2(pub ::windows::core::IUnknown); impl IMSMQQueueInfos2 { pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Next(&self) -> ::windows::core::Result<IMSMQQueueInfo2> { let mut result__: <IMSMQQueueInfo2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo2>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQueueInfos2 { type Vtable = IMSMQQueueInfos2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b0f_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQQueueInfos2> for ::windows::core::IUnknown { fn from(value: IMSMQQueueInfos2) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueueInfos2> for ::windows::core::IUnknown { fn from(value: &IMSMQQueueInfos2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueueInfos2 { 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 IMSMQQueueInfos2 { 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<IMSMQQueueInfos2> for super::Com::IDispatch { fn from(value: IMSMQQueueInfos2) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueueInfos2> for super::Com::IDispatch { fn from(value: &IMSMQQueueInfos2) -> 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 IMSMQQueueInfos2 { 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 &IMSMQQueueInfos2 { 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 IMSMQQueueInfos2_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfonext: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::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 IMSMQQueueInfos3(pub ::windows::core::IUnknown); impl IMSMQQueueInfos3 { pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Next(&self) -> ::windows::core::Result<IMSMQQueueInfo3> { let mut result__: <IMSMQQueueInfo3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo3>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQueueInfos3 { type Vtable = IMSMQQueueInfos3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b1e_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQQueueInfos3> for ::windows::core::IUnknown { fn from(value: IMSMQQueueInfos3) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueueInfos3> for ::windows::core::IUnknown { fn from(value: &IMSMQQueueInfos3) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueueInfos3 { 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 IMSMQQueueInfos3 { 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<IMSMQQueueInfos3> for super::Com::IDispatch { fn from(value: IMSMQQueueInfos3) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueueInfos3> for super::Com::IDispatch { fn from(value: &IMSMQQueueInfos3) -> 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 IMSMQQueueInfos3 { 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 &IMSMQQueueInfos3 { 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 IMSMQQueueInfos3_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfonext: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::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 IMSMQQueueInfos4(pub ::windows::core::IUnknown); impl IMSMQQueueInfos4 { pub unsafe fn Reset(&self) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self)).ok() } pub unsafe fn Next(&self) -> ::windows::core::Result<IMSMQQueueInfo4> { let mut result__: <IMSMQQueueInfo4 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQQueueInfo4>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQueueInfos4 { type Vtable = IMSMQQueueInfos4_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b22_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQQueueInfos4> for ::windows::core::IUnknown { fn from(value: IMSMQQueueInfos4) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueueInfos4> for ::windows::core::IUnknown { fn from(value: &IMSMQQueueInfos4) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueueInfos4 { 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 IMSMQQueueInfos4 { 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<IMSMQQueueInfos4> for super::Com::IDispatch { fn from(value: IMSMQQueueInfos4) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueueInfos4> for super::Com::IDispatch { fn from(value: &IMSMQQueueInfos4) -> 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 IMSMQQueueInfos4 { 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 &IMSMQQueueInfos4 { 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 IMSMQQueueInfos4_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, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppqinfonext: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::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 IMSMQQueueManagement(pub ::windows::core::IUnknown); impl IMSMQQueueManagement { 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", feature = "Win32_System_Ole"))] pub unsafe fn Init(&self, machine: *const super::Com::VARIANT, pathname: *const super::Com::VARIANT, formatname: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), ::core::mem::transmute(machine), ::core::mem::transmute(pathname), ::core::mem::transmute(formatname)).ok() } #[cfg(feature = "Win32_Foundation")] pub unsafe fn FormatName(&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__) } #[cfg(feature = "Win32_Foundation")] pub unsafe fn Machine(&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 MessageCount(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn ForeignStatus(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } pub unsafe fn QueueType(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(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).13)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i16>(result__) } pub unsafe fn TransactionalStatus(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).14)(::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 BytesInQueue(&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).15)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } pub unsafe fn JournalMessageCount(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).16)(::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 BytesInJournal(&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).17)(::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 EodGetReceiveInfo(&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).18)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } } unsafe impl ::windows::core::Interface for IMSMQQueueManagement { type Vtable = IMSMQQueueManagement_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x7fbe7759_5760_444d_b8a5_5e7ab9a84cce); } impl ::core::convert::From<IMSMQQueueManagement> for ::windows::core::IUnknown { fn from(value: IMSMQQueueManagement) -> Self { value.0 } } impl ::core::convert::From<&IMSMQQueueManagement> for ::windows::core::IUnknown { fn from(value: &IMSMQQueueManagement) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQQueueManagement { 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 IMSMQQueueManagement { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IMSMQQueueManagement> for IMSMQManagement { fn from(value: IMSMQQueueManagement) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IMSMQQueueManagement> for IMSMQManagement { fn from(value: &IMSMQQueueManagement) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQManagement> for IMSMQQueueManagement { fn into_param(self) -> ::windows::core::Param<'a, IMSMQManagement> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQManagement> for &IMSMQQueueManagement { fn into_param(self) -> ::windows::core::Param<'a, IMSMQManagement> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IMSMQQueueManagement> for super::Com::IDispatch { fn from(value: IMSMQQueueManagement) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQQueueManagement> for super::Com::IDispatch { fn from(value: &IMSMQQueueManagement) -> 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 IMSMQQueueManagement { 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 &IMSMQQueueManagement { 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 IMSMQQueueManagement_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, machine: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, pathname: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, formatname: *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, pbstrformatname: *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, pbstrmachine: *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, plmessagecount: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plforeignstatus: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, plqueuetype: *mut i32) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pfislocal: *mut i16) -> ::windows::core::HRESULT, pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pltransactionalstatus: *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, pvbytesinqueue: *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, pljournalmessagecount: *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, pvbytesinjournal: *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, pvcollection: *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, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSMQTransaction(pub ::windows::core::IUnknown); impl IMSMQTransaction { pub unsafe fn Transaction(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Commit(&self, fretaining: *const super::Com::VARIANT, grftc: *const super::Com::VARIANT, grfrm: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(fretaining), ::core::mem::transmute(grftc), ::core::mem::transmute(grfrm)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Abort(&self, fretaining: *const super::Com::VARIANT, fasync: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(fretaining), ::core::mem::transmute(fasync)).ok() } } unsafe impl ::windows::core::Interface for IMSMQTransaction { type Vtable = IMSMQTransaction_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e07f_dccd_11d0_aa4b_0060970debae); } impl ::core::convert::From<IMSMQTransaction> for ::windows::core::IUnknown { fn from(value: IMSMQTransaction) -> Self { value.0 } } impl ::core::convert::From<&IMSMQTransaction> for ::windows::core::IUnknown { fn from(value: &IMSMQTransaction) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQTransaction { 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 IMSMQTransaction { 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<IMSMQTransaction> for super::Com::IDispatch { fn from(value: IMSMQTransaction) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQTransaction> for super::Com::IDispatch { fn from(value: &IMSMQTransaction) -> 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 IMSMQTransaction { 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 &IMSMQTransaction { 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 IMSMQTransaction_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, pltransaction: *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, fretaining: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, grftc: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, grfrm: *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, fretaining: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, fasync: *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 IMSMQTransaction2(pub ::windows::core::IUnknown); impl IMSMQTransaction2 { 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() } pub unsafe fn Transaction(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Commit(&self, fretaining: *const super::Com::VARIANT, grftc: *const super::Com::VARIANT, grfrm: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(fretaining), ::core::mem::transmute(grftc), ::core::mem::transmute(grfrm)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Abort(&self, fretaining: *const super::Com::VARIANT, fasync: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(fretaining), ::core::mem::transmute(fasync)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn InitNew<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, vartransaction: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), vartransaction.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQTransaction2 { type Vtable = IMSMQTransaction2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x2ce0c5b0_6e67_11d2_b0e6_00e02c074f6b); } impl ::core::convert::From<IMSMQTransaction2> for ::windows::core::IUnknown { fn from(value: IMSMQTransaction2) -> Self { value.0 } } impl ::core::convert::From<&IMSMQTransaction2> for ::windows::core::IUnknown { fn from(value: &IMSMQTransaction2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQTransaction2 { 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 IMSMQTransaction2 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IMSMQTransaction2> for IMSMQTransaction { fn from(value: IMSMQTransaction2) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IMSMQTransaction2> for IMSMQTransaction { fn from(value: &IMSMQTransaction2) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQTransaction> for IMSMQTransaction2 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQTransaction> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQTransaction> for &IMSMQTransaction2 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQTransaction> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IMSMQTransaction2> for super::Com::IDispatch { fn from(value: IMSMQTransaction2) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQTransaction2> for super::Com::IDispatch { fn from(value: &IMSMQTransaction2) -> 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 IMSMQTransaction2 { 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 &IMSMQTransaction2 { 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 IMSMQTransaction2_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, pltransaction: *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, fretaining: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, grftc: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, grfrm: *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, fretaining: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, fasync: *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, vartransaction: ::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_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::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 IMSMQTransaction3(pub ::windows::core::IUnknown); impl IMSMQTransaction3 { 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() } pub unsafe fn Transaction(&self) -> ::windows::core::Result<i32> { let mut result__: <i32 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<i32>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Commit(&self, fretaining: *const super::Com::VARIANT, grftc: *const super::Com::VARIANT, grfrm: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), ::core::mem::transmute(fretaining), ::core::mem::transmute(grftc), ::core::mem::transmute(grfrm)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn Abort(&self, fretaining: *const super::Com::VARIANT, fasync: *const super::Com::VARIANT) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).9)(::core::mem::transmute_copy(self), ::core::mem::transmute(fretaining), ::core::mem::transmute(fasync)).ok() } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn InitNew<'a, Param0: ::windows::core::IntoParam<'a, super::Com::VARIANT>>(&self, vartransaction: Param0) -> ::windows::core::Result<()> { (::windows::core::Interface::vtable(self).10)(::core::mem::transmute_copy(self), vartransaction.into_param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).11)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe fn ITransaction(&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).12)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::VARIANT>(result__) } } unsafe impl ::windows::core::Interface for IMSMQTransaction3 { type Vtable = IMSMQTransaction3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b13_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQTransaction3> for ::windows::core::IUnknown { fn from(value: IMSMQTransaction3) -> Self { value.0 } } impl ::core::convert::From<&IMSMQTransaction3> for ::windows::core::IUnknown { fn from(value: &IMSMQTransaction3) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQTransaction3 { 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 IMSMQTransaction3 { fn into_param(self) -> ::windows::core::Param<'a, ::windows::core::IUnknown> { ::windows::core::Param::Borrowed(&self.0) } } impl ::core::convert::From<IMSMQTransaction3> for IMSMQTransaction2 { fn from(value: IMSMQTransaction3) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IMSMQTransaction3> for IMSMQTransaction2 { fn from(value: &IMSMQTransaction3) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQTransaction2> for IMSMQTransaction3 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQTransaction2> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQTransaction2> for &IMSMQTransaction3 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQTransaction2> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } impl ::core::convert::From<IMSMQTransaction3> for IMSMQTransaction { fn from(value: IMSMQTransaction3) -> Self { unsafe { ::core::mem::transmute(value) } } } impl ::core::convert::From<&IMSMQTransaction3> for IMSMQTransaction { fn from(value: &IMSMQTransaction3) -> Self { ::core::convert::From::from(::core::clone::Clone::clone(value)) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQTransaction> for IMSMQTransaction3 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQTransaction> { ::windows::core::Param::Owned(unsafe { ::core::mem::transmute(self) }) } } impl<'a> ::windows::core::IntoParam<'a, IMSMQTransaction> for &IMSMQTransaction3 { fn into_param(self) -> ::windows::core::Param<'a, IMSMQTransaction> { ::windows::core::Param::Borrowed(unsafe { ::core::mem::transmute(self) }) } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<IMSMQTransaction3> for super::Com::IDispatch { fn from(value: IMSMQTransaction3) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQTransaction3> for super::Com::IDispatch { fn from(value: &IMSMQTransaction3) -> 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 IMSMQTransaction3 { 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 &IMSMQTransaction3 { 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 IMSMQTransaction3_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, pltransaction: *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, fretaining: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, grftc: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, grfrm: *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, fretaining: *const ::core::mem::ManuallyDrop<super::Com::VARIANT>, fasync: *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, vartransaction: ::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_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, pvaritransaction: *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, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSMQTransactionDispenser(pub ::windows::core::IUnknown); impl IMSMQTransactionDispenser { pub unsafe fn BeginTransaction(&self) -> ::windows::core::Result<IMSMQTransaction> { let mut result__: <IMSMQTransaction as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQTransaction>(result__) } } unsafe impl ::windows::core::Interface for IMSMQTransactionDispenser { type Vtable = IMSMQTransactionDispenser_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e083_dccd_11d0_aa4b_0060970debae); } impl ::core::convert::From<IMSMQTransactionDispenser> for ::windows::core::IUnknown { fn from(value: IMSMQTransactionDispenser) -> Self { value.0 } } impl ::core::convert::From<&IMSMQTransactionDispenser> for ::windows::core::IUnknown { fn from(value: &IMSMQTransactionDispenser) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQTransactionDispenser { 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 IMSMQTransactionDispenser { 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<IMSMQTransactionDispenser> for super::Com::IDispatch { fn from(value: IMSMQTransactionDispenser) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQTransactionDispenser> for super::Com::IDispatch { fn from(value: &IMSMQTransactionDispenser) -> 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 IMSMQTransactionDispenser { 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 &IMSMQTransactionDispenser { 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 IMSMQTransactionDispenser_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, ptransaction: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, ); #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct IMSMQTransactionDispenser2(pub ::windows::core::IUnknown); impl IMSMQTransactionDispenser2 { pub unsafe fn BeginTransaction(&self) -> ::windows::core::Result<IMSMQTransaction2> { let mut result__: <IMSMQTransaction2 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQTransaction2>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQTransactionDispenser2 { type Vtable = IMSMQTransactionDispenser2_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b11_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQTransactionDispenser2> for ::windows::core::IUnknown { fn from(value: IMSMQTransactionDispenser2) -> Self { value.0 } } impl ::core::convert::From<&IMSMQTransactionDispenser2> for ::windows::core::IUnknown { fn from(value: &IMSMQTransactionDispenser2) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQTransactionDispenser2 { 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 IMSMQTransactionDispenser2 { 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<IMSMQTransactionDispenser2> for super::Com::IDispatch { fn from(value: IMSMQTransactionDispenser2) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQTransactionDispenser2> for super::Com::IDispatch { fn from(value: &IMSMQTransactionDispenser2) -> 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 IMSMQTransactionDispenser2 { 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 &IMSMQTransactionDispenser2 { 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 IMSMQTransactionDispenser2_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, ptransaction: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::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 IMSMQTransactionDispenser3(pub ::windows::core::IUnknown); impl IMSMQTransactionDispenser3 { pub unsafe fn BeginTransaction(&self) -> ::windows::core::Result<IMSMQTransaction3> { let mut result__: <IMSMQTransaction3 as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).7)(::core::mem::transmute_copy(self), &mut result__).from_abi::<IMSMQTransaction3>(result__) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Properties(&self) -> ::windows::core::Result<super::Com::IDispatch> { let mut result__: <super::Com::IDispatch as ::windows::core::Abi>::Abi = ::core::mem::zeroed(); (::windows::core::Interface::vtable(self).8)(::core::mem::transmute_copy(self), &mut result__).from_abi::<super::Com::IDispatch>(result__) } } unsafe impl ::windows::core::Interface for IMSMQTransactionDispenser3 { type Vtable = IMSMQTransactionDispenser3_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b15_2168_11d3_898c_00e02c074f6b); } impl ::core::convert::From<IMSMQTransactionDispenser3> for ::windows::core::IUnknown { fn from(value: IMSMQTransactionDispenser3) -> Self { value.0 } } impl ::core::convert::From<&IMSMQTransactionDispenser3> for ::windows::core::IUnknown { fn from(value: &IMSMQTransactionDispenser3) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for IMSMQTransactionDispenser3 { 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 IMSMQTransactionDispenser3 { 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<IMSMQTransactionDispenser3> for super::Com::IDispatch { fn from(value: IMSMQTransactionDispenser3) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&IMSMQTransactionDispenser3> for super::Com::IDispatch { fn from(value: &IMSMQTransactionDispenser3) -> 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 IMSMQTransactionDispenser3 { 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 &IMSMQTransactionDispenser3 { 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 IMSMQTransactionDispenser3_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, ptransaction: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(feature = "Win32_System_Com")] pub unsafe extern "system" fn(this: ::windows::core::RawPtr, ppcolproperties: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT, #[cfg(not(feature = "Win32_System_Com"))] usize, ); pub const LONG_LIVED: u32 = 4294967294u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MQACCESS(pub i32); pub const MQ_RECEIVE_ACCESS: MQACCESS = MQACCESS(1i32); pub const MQ_SEND_ACCESS: MQACCESS = MQACCESS(2i32); pub const MQ_PEEK_ACCESS: MQACCESS = MQACCESS(32i32); pub const MQ_ADMIN_ACCESS: MQACCESS = MQACCESS(128i32); impl ::core::convert::From<i32> for MQACCESS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQACCESS { 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 MQAUTHENTICATE(pub i32); pub const MQ_AUTHENTICATE_NONE: MQAUTHENTICATE = MQAUTHENTICATE(0i32); pub const MQ_AUTHENTICATE: MQAUTHENTICATE = MQAUTHENTICATE(1i32); impl ::core::convert::From<i32> for MQAUTHENTICATE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQAUTHENTICATE { 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 MQCALG(pub i32); pub const MQMSG_CALG_MD2: MQCALG = MQCALG(32769i32); pub const MQMSG_CALG_MD4: MQCALG = MQCALG(32770i32); pub const MQMSG_CALG_MD5: MQCALG = MQCALG(32771i32); pub const MQMSG_CALG_SHA: MQCALG = MQCALG(32772i32); pub const MQMSG_CALG_SHA1: MQCALG = MQCALG(32772i32); pub const MQMSG_CALG_MAC: MQCALG = MQCALG(32773i32); pub const MQMSG_CALG_RSA_SIGN: MQCALG = MQCALG(9216i32); pub const MQMSG_CALG_DSS_SIGN: MQCALG = MQCALG(8704i32); pub const MQMSG_CALG_RSA_KEYX: MQCALG = MQCALG(41984i32); pub const MQMSG_CALG_DES: MQCALG = MQCALG(26113i32); pub const MQMSG_CALG_RC2: MQCALG = MQCALG(26114i32); pub const MQMSG_CALG_RC4: MQCALG = MQCALG(26625i32); pub const MQMSG_CALG_SEAL: MQCALG = MQCALG(26626i32); impl ::core::convert::From<i32> for MQCALG { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQCALG { 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 MQCERT_REGISTER(pub i32); pub const MQCERT_REGISTER_ALWAYS: MQCERT_REGISTER = MQCERT_REGISTER(1i32); pub const MQCERT_REGISTER_IF_NOT_EXIST: MQCERT_REGISTER = MQCERT_REGISTER(2i32); impl ::core::convert::From<i32> for MQCERT_REGISTER { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQCERT_REGISTER { 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 MQDEFAULT(pub i32); pub const DEFAULT_M_PRIORITY: MQDEFAULT = MQDEFAULT(3i32); pub const DEFAULT_M_DELIVERY: MQDEFAULT = MQDEFAULT(0i32); pub const DEFAULT_M_ACKNOWLEDGE: MQDEFAULT = MQDEFAULT(0i32); pub const DEFAULT_M_JOURNAL: MQDEFAULT = MQDEFAULT(0i32); pub const DEFAULT_M_APPSPECIFIC: MQDEFAULT = MQDEFAULT(0i32); pub const DEFAULT_M_PRIV_LEVEL: MQDEFAULT = MQDEFAULT(0i32); pub const DEFAULT_M_AUTH_LEVEL: MQDEFAULT = MQDEFAULT(0i32); pub const DEFAULT_M_SENDERID_TYPE: MQDEFAULT = MQDEFAULT(1i32); pub const DEFAULT_Q_JOURNAL: MQDEFAULT = MQDEFAULT(0i32); pub const DEFAULT_Q_BASEPRIORITY: MQDEFAULT = MQDEFAULT(0i32); pub const DEFAULT_Q_QUOTA: MQDEFAULT = MQDEFAULT(-1i32); pub const DEFAULT_Q_JOURNAL_QUOTA: MQDEFAULT = MQDEFAULT(-1i32); pub const DEFAULT_Q_TRANSACTION: MQDEFAULT = MQDEFAULT(0i32); pub const DEFAULT_Q_AUTHENTICATE: MQDEFAULT = MQDEFAULT(0i32); pub const DEFAULT_Q_PRIV_LEVEL: MQDEFAULT = MQDEFAULT(1i32); pub const DEFAULT_M_LOOKUPID: MQDEFAULT = MQDEFAULT(0i32); impl ::core::convert::From<i32> for MQDEFAULT { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQDEFAULT { 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 MQERROR(pub i32); pub const MQ_ERROR: MQERROR = MQERROR(-1072824319i32); pub const MQ_ERROR_PROPERTY: MQERROR = MQERROR(-1072824318i32); pub const MQ_ERROR_QUEUE_NOT_FOUND: MQERROR = MQERROR(-1072824317i32); pub const MQ_ERROR_QUEUE_NOT_ACTIVE: MQERROR = MQERROR(-1072824316i32); pub const MQ_ERROR_QUEUE_EXISTS: MQERROR = MQERROR(-1072824315i32); pub const MQ_ERROR_INVALID_PARAMETER: MQERROR = MQERROR(-1072824314i32); pub const MQ_ERROR_INVALID_HANDLE: MQERROR = MQERROR(-1072824313i32); pub const MQ_ERROR_OPERATION_CANCELLED: MQERROR = MQERROR(-1072824312i32); pub const MQ_ERROR_SHARING_VIOLATION: MQERROR = MQERROR(-1072824311i32); pub const MQ_ERROR_SERVICE_NOT_AVAILABLE: MQERROR = MQERROR(-1072824309i32); pub const MQ_ERROR_MACHINE_NOT_FOUND: MQERROR = MQERROR(-1072824307i32); pub const MQ_ERROR_ILLEGAL_SORT: MQERROR = MQERROR(-1072824304i32); pub const MQ_ERROR_ILLEGAL_USER: MQERROR = MQERROR(-1072824303i32); pub const MQ_ERROR_NO_DS: MQERROR = MQERROR(-1072824301i32); pub const MQ_ERROR_ILLEGAL_QUEUE_PATHNAME: MQERROR = MQERROR(-1072824300i32); pub const MQ_ERROR_ILLEGAL_PROPERTY_VALUE: MQERROR = MQERROR(-1072824296i32); pub const MQ_ERROR_ILLEGAL_PROPERTY_VT: MQERROR = MQERROR(-1072824295i32); pub const MQ_ERROR_BUFFER_OVERFLOW: MQERROR = MQERROR(-1072824294i32); pub const MQ_ERROR_IO_TIMEOUT: MQERROR = MQERROR(-1072824293i32); pub const MQ_ERROR_ILLEGAL_CURSOR_ACTION: MQERROR = MQERROR(-1072824292i32); pub const MQ_ERROR_MESSAGE_ALREADY_RECEIVED: MQERROR = MQERROR(-1072824291i32); pub const MQ_ERROR_ILLEGAL_FORMATNAME: MQERROR = MQERROR(-1072824290i32); pub const MQ_ERROR_FORMATNAME_BUFFER_TOO_SMALL: MQERROR = MQERROR(-1072824289i32); pub const MQ_ERROR_UNSUPPORTED_FORMATNAME_OPERATION: MQERROR = MQERROR(-1072824288i32); pub const MQ_ERROR_ILLEGAL_SECURITY_DESCRIPTOR: MQERROR = MQERROR(-1072824287i32); pub const MQ_ERROR_SENDERID_BUFFER_TOO_SMALL: MQERROR = MQERROR(-1072824286i32); pub const MQ_ERROR_SECURITY_DESCRIPTOR_TOO_SMALL: MQERROR = MQERROR(-1072824285i32); pub const MQ_ERROR_CANNOT_IMPERSONATE_CLIENT: MQERROR = MQERROR(-1072824284i32); pub const MQ_ERROR_ACCESS_DENIED: MQERROR = MQERROR(-1072824283i32); pub const MQ_ERROR_PRIVILEGE_NOT_HELD: MQERROR = MQERROR(-1072824282i32); pub const MQ_ERROR_INSUFFICIENT_RESOURCES: MQERROR = MQERROR(-1072824281i32); pub const MQ_ERROR_USER_BUFFER_TOO_SMALL: MQERROR = MQERROR(-1072824280i32); pub const MQ_ERROR_MESSAGE_STORAGE_FAILED: MQERROR = MQERROR(-1072824278i32); pub const MQ_ERROR_SENDER_CERT_BUFFER_TOO_SMALL: MQERROR = MQERROR(-1072824277i32); pub const MQ_ERROR_INVALID_CERTIFICATE: MQERROR = MQERROR(-1072824276i32); pub const MQ_ERROR_CORRUPTED_INTERNAL_CERTIFICATE: MQERROR = MQERROR(-1072824275i32); pub const MQ_ERROR_INTERNAL_USER_CERT_EXIST: MQERROR = MQERROR(-1072824274i32); pub const MQ_ERROR_NO_INTERNAL_USER_CERT: MQERROR = MQERROR(-1072824273i32); pub const MQ_ERROR_CORRUPTED_SECURITY_DATA: MQERROR = MQERROR(-1072824272i32); pub const MQ_ERROR_CORRUPTED_PERSONAL_CERT_STORE: MQERROR = MQERROR(-1072824271i32); pub const MQ_ERROR_COMPUTER_DOES_NOT_SUPPORT_ENCRYPTION: MQERROR = MQERROR(-1072824269i32); pub const MQ_ERROR_BAD_SECURITY_CONTEXT: MQERROR = MQERROR(-1072824267i32); pub const MQ_ERROR_COULD_NOT_GET_USER_SID: MQERROR = MQERROR(-1072824266i32); pub const MQ_ERROR_COULD_NOT_GET_ACCOUNT_INFO: MQERROR = MQERROR(-1072824265i32); pub const MQ_ERROR_ILLEGAL_MQCOLUMNS: MQERROR = MQERROR(-1072824264i32); pub const MQ_ERROR_ILLEGAL_PROPID: MQERROR = MQERROR(-1072824263i32); pub const MQ_ERROR_ILLEGAL_RELATION: MQERROR = MQERROR(-1072824262i32); pub const MQ_ERROR_ILLEGAL_PROPERTY_SIZE: MQERROR = MQERROR(-1072824261i32); pub const MQ_ERROR_ILLEGAL_RESTRICTION_PROPID: MQERROR = MQERROR(-1072824260i32); pub const MQ_ERROR_ILLEGAL_MQQUEUEPROPS: MQERROR = MQERROR(-1072824259i32); pub const MQ_ERROR_PROPERTY_NOTALLOWED: MQERROR = MQERROR(-1072824258i32); pub const MQ_ERROR_INSUFFICIENT_PROPERTIES: MQERROR = MQERROR(-1072824257i32); pub const MQ_ERROR_MACHINE_EXISTS: MQERROR = MQERROR(-1072824256i32); pub const MQ_ERROR_ILLEGAL_MQQMPROPS: MQERROR = MQERROR(-1072824255i32); pub const MQ_ERROR_DS_IS_FULL: MQERROR = MQERROR(-1072824254i32); pub const MQ_ERROR_DS_ERROR: MQERROR = MQERROR(-1072824253i32); pub const MQ_ERROR_INVALID_OWNER: MQERROR = MQERROR(-1072824252i32); pub const MQ_ERROR_UNSUPPORTED_ACCESS_MODE: MQERROR = MQERROR(-1072824251i32); pub const MQ_ERROR_RESULT_BUFFER_TOO_SMALL: MQERROR = MQERROR(-1072824250i32); pub const MQ_ERROR_DELETE_CN_IN_USE: MQERROR = MQERROR(-1072824248i32); pub const MQ_ERROR_NO_RESPONSE_FROM_OBJECT_SERVER: MQERROR = MQERROR(-1072824247i32); pub const MQ_ERROR_OBJECT_SERVER_NOT_AVAILABLE: MQERROR = MQERROR(-1072824246i32); pub const MQ_ERROR_QUEUE_NOT_AVAILABLE: MQERROR = MQERROR(-1072824245i32); pub const MQ_ERROR_DTC_CONNECT: MQERROR = MQERROR(-1072824244i32); pub const MQ_ERROR_TRANSACTION_IMPORT: MQERROR = MQERROR(-1072824242i32); pub const MQ_ERROR_TRANSACTION_USAGE: MQERROR = MQERROR(-1072824240i32); pub const MQ_ERROR_TRANSACTION_SEQUENCE: MQERROR = MQERROR(-1072824239i32); pub const MQ_ERROR_MISSING_CONNECTOR_TYPE: MQERROR = MQERROR(-1072824235i32); pub const MQ_ERROR_STALE_HANDLE: MQERROR = MQERROR(-1072824234i32); pub const MQ_ERROR_TRANSACTION_ENLIST: MQERROR = MQERROR(-1072824232i32); pub const MQ_ERROR_QUEUE_DELETED: MQERROR = MQERROR(-1072824230i32); pub const MQ_ERROR_ILLEGAL_CONTEXT: MQERROR = MQERROR(-1072824229i32); pub const MQ_ERROR_ILLEGAL_SORT_PROPID: MQERROR = MQERROR(-1072824228i32); pub const MQ_ERROR_LABEL_TOO_LONG: MQERROR = MQERROR(-1072824227i32); pub const MQ_ERROR_LABEL_BUFFER_TOO_SMALL: MQERROR = MQERROR(-1072824226i32); pub const MQ_ERROR_MQIS_SERVER_EMPTY: MQERROR = MQERROR(-1072824225i32); pub const MQ_ERROR_MQIS_READONLY_MODE: MQERROR = MQERROR(-1072824224i32); pub const MQ_ERROR_SYMM_KEY_BUFFER_TOO_SMALL: MQERROR = MQERROR(-1072824223i32); pub const MQ_ERROR_SIGNATURE_BUFFER_TOO_SMALL: MQERROR = MQERROR(-1072824222i32); pub const MQ_ERROR_PROV_NAME_BUFFER_TOO_SMALL: MQERROR = MQERROR(-1072824221i32); pub const MQ_ERROR_ILLEGAL_OPERATION: MQERROR = MQERROR(-1072824220i32); pub const MQ_ERROR_WRITE_NOT_ALLOWED: MQERROR = MQERROR(-1072824219i32); pub const MQ_ERROR_WKS_CANT_SERVE_CLIENT: MQERROR = MQERROR(-1072824218i32); pub const MQ_ERROR_DEPEND_WKS_LICENSE_OVERFLOW: MQERROR = MQERROR(-1072824217i32); pub const MQ_CORRUPTED_QUEUE_WAS_DELETED: MQERROR = MQERROR(-1072824216i32); pub const MQ_ERROR_REMOTE_MACHINE_NOT_AVAILABLE: MQERROR = MQERROR(-1072824215i32); pub const MQ_ERROR_UNSUPPORTED_OPERATION: MQERROR = MQERROR(-1072824214i32); pub const MQ_ERROR_ENCRYPTION_PROVIDER_NOT_SUPPORTED: MQERROR = MQERROR(-1072824213i32); pub const MQ_ERROR_CANNOT_SET_CRYPTO_SEC_DESCR: MQERROR = MQERROR(-1072824212i32); pub const MQ_ERROR_CERTIFICATE_NOT_PROVIDED: MQERROR = MQERROR(-1072824211i32); pub const MQ_ERROR_Q_DNS_PROPERTY_NOT_SUPPORTED: MQERROR = MQERROR(-1072824210i32); pub const MQ_ERROR_CANT_CREATE_CERT_STORE: MQERROR = MQERROR(-1072824209i32); pub const MQ_ERROR_CANNOT_CREATE_CERT_STORE: MQERROR = MQERROR(-1072824209i32); pub const MQ_ERROR_CANT_OPEN_CERT_STORE: MQERROR = MQERROR(-1072824208i32); pub const MQ_ERROR_CANNOT_OPEN_CERT_STORE: MQERROR = MQERROR(-1072824208i32); pub const MQ_ERROR_ILLEGAL_ENTERPRISE_OPERATION: MQERROR = MQERROR(-1072824207i32); pub const MQ_ERROR_CANNOT_GRANT_ADD_GUID: MQERROR = MQERROR(-1072824206i32); pub const MQ_ERROR_CANNOT_LOAD_MSMQOCM: MQERROR = MQERROR(-1072824205i32); pub const MQ_ERROR_NO_ENTRY_POINT_MSMQOCM: MQERROR = MQERROR(-1072824204i32); pub const MQ_ERROR_NO_MSMQ_SERVERS_ON_DC: MQERROR = MQERROR(-1072824203i32); pub const MQ_ERROR_CANNOT_JOIN_DOMAIN: MQERROR = MQERROR(-1072824202i32); pub const MQ_ERROR_CANNOT_CREATE_ON_GC: MQERROR = MQERROR(-1072824201i32); pub const MQ_ERROR_GUID_NOT_MATCHING: MQERROR = MQERROR(-1072824200i32); pub const MQ_ERROR_PUBLIC_KEY_NOT_FOUND: MQERROR = MQERROR(-1072824199i32); pub const MQ_ERROR_PUBLIC_KEY_DOES_NOT_EXIST: MQERROR = MQERROR(-1072824198i32); pub const MQ_ERROR_ILLEGAL_MQPRIVATEPROPS: MQERROR = MQERROR(-1072824197i32); pub const MQ_ERROR_NO_GC_IN_DOMAIN: MQERROR = MQERROR(-1072824196i32); pub const MQ_ERROR_NO_MSMQ_SERVERS_ON_GC: MQERROR = MQERROR(-1072824195i32); pub const MQ_ERROR_CANNOT_GET_DN: MQERROR = MQERROR(-1072824194i32); pub const MQ_ERROR_CANNOT_HASH_DATA_EX: MQERROR = MQERROR(-1072824193i32); pub const MQ_ERROR_CANNOT_SIGN_DATA_EX: MQERROR = MQERROR(-1072824192i32); pub const MQ_ERROR_CANNOT_CREATE_HASH_EX: MQERROR = MQERROR(-1072824191i32); pub const MQ_ERROR_FAIL_VERIFY_SIGNATURE_EX: MQERROR = MQERROR(-1072824190i32); pub const MQ_ERROR_CANNOT_DELETE_PSC_OBJECTS: MQERROR = MQERROR(-1072824189i32); pub const MQ_ERROR_NO_MQUSER_OU: MQERROR = MQERROR(-1072824188i32); pub const MQ_ERROR_CANNOT_LOAD_MQAD: MQERROR = MQERROR(-1072824187i32); pub const MQ_ERROR_CANNOT_LOAD_MQDSSRV: MQERROR = MQERROR(-1072824186i32); pub const MQ_ERROR_PROPERTIES_CONFLICT: MQERROR = MQERROR(-1072824185i32); pub const MQ_ERROR_MESSAGE_NOT_FOUND: MQERROR = MQERROR(-1072824184i32); pub const MQ_ERROR_CANT_RESOLVE_SITES: MQERROR = MQERROR(-1072824183i32); pub const MQ_ERROR_NOT_SUPPORTED_BY_DEPENDENT_CLIENTS: MQERROR = MQERROR(-1072824182i32); pub const MQ_ERROR_OPERATION_NOT_SUPPORTED_BY_REMOTE_COMPUTER: MQERROR = MQERROR(-1072824181i32); pub const MQ_ERROR_NOT_A_CORRECT_OBJECT_CLASS: MQERROR = MQERROR(-1072824180i32); pub const MQ_ERROR_MULTI_SORT_KEYS: MQERROR = MQERROR(-1072824179i32); pub const MQ_ERROR_GC_NEEDED: MQERROR = MQERROR(-1072824178i32); pub const MQ_ERROR_DS_BIND_ROOT_FOREST: MQERROR = MQERROR(-1072824177i32); pub const MQ_ERROR_DS_LOCAL_USER: MQERROR = MQERROR(-1072824176i32); pub const MQ_ERROR_Q_ADS_PROPERTY_NOT_SUPPORTED: MQERROR = MQERROR(-1072824175i32); pub const MQ_ERROR_BAD_XML_FORMAT: MQERROR = MQERROR(-1072824174i32); pub const MQ_ERROR_UNSUPPORTED_CLASS: MQERROR = MQERROR(-1072824173i32); pub const MQ_ERROR_UNINITIALIZED_OBJECT: MQERROR = MQERROR(-1072824172i32); pub const MQ_ERROR_CANNOT_CREATE_PSC_OBJECTS: MQERROR = MQERROR(-1072824171i32); pub const MQ_ERROR_CANNOT_UPDATE_PSC_OBJECTS: MQERROR = MQERROR(-1072824170i32); impl ::core::convert::From<i32> for MQERROR { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQERROR { 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 MQJOURNAL(pub i32); pub const MQ_JOURNAL_NONE: MQJOURNAL = MQJOURNAL(0i32); pub const MQ_JOURNAL: MQJOURNAL = MQJOURNAL(1i32); impl ::core::convert::From<i32> for MQJOURNAL { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQJOURNAL { 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 MQMAX(pub i32); pub const MQ_MAX_Q_NAME_LEN: MQMAX = MQMAX(124i32); pub const MQ_MAX_Q_LABEL_LEN: MQMAX = MQMAX(124i32); impl ::core::convert::From<i32> for MQMAX { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMAX { 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 MQMSGACKNOWLEDGEMENT(pub i32); pub const MQMSG_ACKNOWLEDGMENT_NONE: MQMSGACKNOWLEDGEMENT = MQMSGACKNOWLEDGEMENT(0i32); pub const MQMSG_ACKNOWLEDGMENT_POS_ARRIVAL: MQMSGACKNOWLEDGEMENT = MQMSGACKNOWLEDGEMENT(1i32); pub const MQMSG_ACKNOWLEDGMENT_POS_RECEIVE: MQMSGACKNOWLEDGEMENT = MQMSGACKNOWLEDGEMENT(2i32); pub const MQMSG_ACKNOWLEDGMENT_NEG_ARRIVAL: MQMSGACKNOWLEDGEMENT = MQMSGACKNOWLEDGEMENT(4i32); pub const MQMSG_ACKNOWLEDGMENT_NEG_RECEIVE: MQMSGACKNOWLEDGEMENT = MQMSGACKNOWLEDGEMENT(8i32); pub const MQMSG_ACKNOWLEDGMENT_NACK_REACH_QUEUE: MQMSGACKNOWLEDGEMENT = MQMSGACKNOWLEDGEMENT(4i32); pub const MQMSG_ACKNOWLEDGMENT_FULL_REACH_QUEUE: MQMSGACKNOWLEDGEMENT = MQMSGACKNOWLEDGEMENT(5i32); pub const MQMSG_ACKNOWLEDGMENT_NACK_RECEIVE: MQMSGACKNOWLEDGEMENT = MQMSGACKNOWLEDGEMENT(12i32); pub const MQMSG_ACKNOWLEDGMENT_FULL_RECEIVE: MQMSGACKNOWLEDGEMENT = MQMSGACKNOWLEDGEMENT(14i32); impl ::core::convert::From<i32> for MQMSGACKNOWLEDGEMENT { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMSGACKNOWLEDGEMENT { 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 MQMSGAUTHENTICATION(pub i32); pub const MQMSG_AUTHENTICATION_NOT_REQUESTED: MQMSGAUTHENTICATION = MQMSGAUTHENTICATION(0i32); pub const MQMSG_AUTHENTICATION_REQUESTED: MQMSGAUTHENTICATION = MQMSGAUTHENTICATION(1i32); pub const MQMSG_AUTHENTICATED_SIG10: MQMSGAUTHENTICATION = MQMSGAUTHENTICATION(1i32); pub const MQMSG_AUTHENTICATION_REQUESTED_EX: MQMSGAUTHENTICATION = MQMSGAUTHENTICATION(3i32); pub const MQMSG_AUTHENTICATED_SIG20: MQMSGAUTHENTICATION = MQMSGAUTHENTICATION(3i32); pub const MQMSG_AUTHENTICATED_SIG30: MQMSGAUTHENTICATION = MQMSGAUTHENTICATION(5i32); pub const MQMSG_AUTHENTICATED_SIGXML: MQMSGAUTHENTICATION = MQMSGAUTHENTICATION(9i32); impl ::core::convert::From<i32> for MQMSGAUTHENTICATION { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMSGAUTHENTICATION { 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 MQMSGAUTHLEVEL(pub i32); pub const MQMSG_AUTH_LEVEL_NONE: MQMSGAUTHLEVEL = MQMSGAUTHLEVEL(0i32); pub const MQMSG_AUTH_LEVEL_ALWAYS: MQMSGAUTHLEVEL = MQMSGAUTHLEVEL(1i32); pub const MQMSG_AUTH_LEVEL_MSMQ10: MQMSGAUTHLEVEL = MQMSGAUTHLEVEL(2i32); pub const MQMSG_AUTH_LEVEL_SIG10: MQMSGAUTHLEVEL = MQMSGAUTHLEVEL(2i32); pub const MQMSG_AUTH_LEVEL_MSMQ20: MQMSGAUTHLEVEL = MQMSGAUTHLEVEL(4i32); pub const MQMSG_AUTH_LEVEL_SIG20: MQMSGAUTHLEVEL = MQMSGAUTHLEVEL(4i32); pub const MQMSG_AUTH_LEVEL_SIG30: MQMSGAUTHLEVEL = MQMSGAUTHLEVEL(8i32); impl ::core::convert::From<i32> for MQMSGAUTHLEVEL { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMSGAUTHLEVEL { 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 MQMSGCLASS(pub i32); pub const MQMSG_CLASS_NORMAL: MQMSGCLASS = MQMSGCLASS(0i32); pub const MQMSG_CLASS_REPORT: MQMSGCLASS = MQMSGCLASS(1i32); pub const MQMSG_CLASS_ACK_REACH_QUEUE: MQMSGCLASS = MQMSGCLASS(2i32); pub const MQMSG_CLASS_ACK_RECEIVE: MQMSGCLASS = MQMSGCLASS(16384i32); pub const MQMSG_CLASS_NACK_BAD_DST_Q: MQMSGCLASS = MQMSGCLASS(32768i32); pub const MQMSG_CLASS_NACK_PURGED: MQMSGCLASS = MQMSGCLASS(32769i32); pub const MQMSG_CLASS_NACK_REACH_QUEUE_TIMEOUT: MQMSGCLASS = MQMSGCLASS(32770i32); pub const MQMSG_CLASS_NACK_Q_EXCEED_QUOTA: MQMSGCLASS = MQMSGCLASS(32771i32); pub const MQMSG_CLASS_NACK_ACCESS_DENIED: MQMSGCLASS = MQMSGCLASS(32772i32); pub const MQMSG_CLASS_NACK_HOP_COUNT_EXCEEDED: MQMSGCLASS = MQMSGCLASS(32773i32); pub const MQMSG_CLASS_NACK_BAD_SIGNATURE: MQMSGCLASS = MQMSGCLASS(32774i32); pub const MQMSG_CLASS_NACK_BAD_ENCRYPTION: MQMSGCLASS = MQMSGCLASS(32775i32); pub const MQMSG_CLASS_NACK_COULD_NOT_ENCRYPT: MQMSGCLASS = MQMSGCLASS(32776i32); pub const MQMSG_CLASS_NACK_NOT_TRANSACTIONAL_Q: MQMSGCLASS = MQMSGCLASS(32777i32); pub const MQMSG_CLASS_NACK_NOT_TRANSACTIONAL_MSG: MQMSGCLASS = MQMSGCLASS(32778i32); pub const MQMSG_CLASS_NACK_UNSUPPORTED_CRYPTO_PROVIDER: MQMSGCLASS = MQMSGCLASS(32779i32); pub const MQMSG_CLASS_NACK_SOURCE_COMPUTER_GUID_CHANGED: MQMSGCLASS = MQMSGCLASS(32780i32); pub const MQMSG_CLASS_NACK_Q_DELETED: MQMSGCLASS = MQMSGCLASS(49152i32); pub const MQMSG_CLASS_NACK_Q_PURGED: MQMSGCLASS = MQMSGCLASS(49153i32); pub const MQMSG_CLASS_NACK_RECEIVE_TIMEOUT: MQMSGCLASS = MQMSGCLASS(49154i32); pub const MQMSG_CLASS_NACK_RECEIVE_TIMEOUT_AT_SENDER: MQMSGCLASS = MQMSGCLASS(49155i32); impl ::core::convert::From<i32> for MQMSGCLASS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMSGCLASS { 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 MQMSGCURSOR(pub i32); pub const MQMSG_FIRST: MQMSGCURSOR = MQMSGCURSOR(0i32); pub const MQMSG_CURRENT: MQMSGCURSOR = MQMSGCURSOR(1i32); pub const MQMSG_NEXT: MQMSGCURSOR = MQMSGCURSOR(2i32); impl ::core::convert::From<i32> for MQMSGCURSOR { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMSGCURSOR { 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 MQMSGDELIVERY(pub i32); pub const MQMSG_DELIVERY_EXPRESS: MQMSGDELIVERY = MQMSGDELIVERY(0i32); pub const MQMSG_DELIVERY_RECOVERABLE: MQMSGDELIVERY = MQMSGDELIVERY(1i32); impl ::core::convert::From<i32> for MQMSGDELIVERY { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMSGDELIVERY { 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 MQMSGIDSIZE(pub i32); pub const MQMSG_MSGID_SIZE: MQMSGIDSIZE = MQMSGIDSIZE(20i32); pub const MQMSG_CORRELATIONID_SIZE: MQMSGIDSIZE = MQMSGIDSIZE(20i32); pub const MQMSG_XACTID_SIZE: MQMSGIDSIZE = MQMSGIDSIZE(20i32); impl ::core::convert::From<i32> for MQMSGIDSIZE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMSGIDSIZE { 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 MQMSGJOURNAL(pub i32); pub const MQMSG_JOURNAL_NONE: MQMSGJOURNAL = MQMSGJOURNAL(0i32); pub const MQMSG_DEADLETTER: MQMSGJOURNAL = MQMSGJOURNAL(1i32); pub const MQMSG_JOURNAL: MQMSGJOURNAL = MQMSGJOURNAL(2i32); impl ::core::convert::From<i32> for MQMSGJOURNAL { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMSGJOURNAL { 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 MQMSGMAX(pub i32); pub const MQ_MAX_MSG_LABEL_LEN: MQMSGMAX = MQMSGMAX(249i32); impl ::core::convert::From<i32> for MQMSGMAX { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMSGMAX { 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 MQMSGPRIVLEVEL(pub i32); pub const MQMSG_PRIV_LEVEL_NONE: MQMSGPRIVLEVEL = MQMSGPRIVLEVEL(0i32); pub const MQMSG_PRIV_LEVEL_BODY_BASE: MQMSGPRIVLEVEL = MQMSGPRIVLEVEL(1i32); pub const MQMSG_PRIV_LEVEL_BODY_ENHANCED: MQMSGPRIVLEVEL = MQMSGPRIVLEVEL(3i32); impl ::core::convert::From<i32> for MQMSGPRIVLEVEL { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMSGPRIVLEVEL { 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 MQMSGSENDERIDTYPE(pub i32); pub const MQMSG_SENDERID_TYPE_NONE: MQMSGSENDERIDTYPE = MQMSGSENDERIDTYPE(0i32); pub const MQMSG_SENDERID_TYPE_SID: MQMSGSENDERIDTYPE = MQMSGSENDERIDTYPE(1i32); impl ::core::convert::From<i32> for MQMSGSENDERIDTYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMSGSENDERIDTYPE { 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 MQMSGTRACE(pub i32); pub const MQMSG_TRACE_NONE: MQMSGTRACE = MQMSGTRACE(0i32); pub const MQMSG_SEND_ROUTE_TO_REPORT_QUEUE: MQMSGTRACE = MQMSGTRACE(1i32); impl ::core::convert::From<i32> for MQMSGTRACE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQMSGTRACE { type Abi = Self; } pub const MQMSG_AUTHENTICATED_QM_MESSAGE: u32 = 11u32; pub const MQMSG_FIRST_IN_XACT: u32 = 1u32; pub const MQMSG_LAST_IN_XACT: u32 = 1u32; pub const MQMSG_NOT_FIRST_IN_XACT: u32 = 0u32; pub const MQMSG_NOT_LAST_IN_XACT: u32 = 0u32; pub const MQMSG_PRIV_LEVEL_BODY_AES: u32 = 5u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MQPRIORITY(pub i32); pub const MQ_MIN_PRIORITY: MQPRIORITY = MQPRIORITY(0i32); pub const MQ_MAX_PRIORITY: MQPRIORITY = MQPRIORITY(7i32); impl ::core::convert::From<i32> for MQPRIORITY { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQPRIORITY { 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 MQPRIVLEVEL(pub i32); pub const MQ_PRIV_LEVEL_NONE: MQPRIVLEVEL = MQPRIVLEVEL(0i32); pub const MQ_PRIV_LEVEL_OPTIONAL: MQPRIVLEVEL = MQPRIVLEVEL(1i32); pub const MQ_PRIV_LEVEL_BODY: MQPRIVLEVEL = MQPRIVLEVEL(2i32); impl ::core::convert::From<i32> for MQPRIVLEVEL { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQPRIVLEVEL { type Abi = Self; } pub const MQSEC_CHANGE_QUEUE_PERMISSIONS: u32 = 262144u32; pub const MQSEC_DELETE_JOURNAL_MESSAGE: u32 = 8u32; pub const MQSEC_DELETE_MESSAGE: u32 = 1u32; pub const MQSEC_DELETE_QUEUE: u32 = 65536u32; pub const MQSEC_GET_QUEUE_PROPERTIES: u32 = 32u32; pub const MQSEC_PEEK_MESSAGE: u32 = 2u32; pub const MQSEC_QUEUE_GENERIC_EXECUTE: u32 = 0u32; pub const MQSEC_SET_QUEUE_PROPERTIES: u32 = 16u32; pub const MQSEC_TAKE_QUEUE_OWNERSHIP: u32 = 524288u32; pub const MQSEC_WRITE_MESSAGE: u32 = 4u32; #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)] #[repr(transparent)] pub struct MQSHARE(pub i32); pub const MQ_DENY_NONE: MQSHARE = MQSHARE(0i32); pub const MQ_DENY_RECEIVE_SHARE: MQSHARE = MQSHARE(1i32); impl ::core::convert::From<i32> for MQSHARE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQSHARE { 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 MQTRANSACTION(pub i32); pub const MQ_NO_TRANSACTION: MQTRANSACTION = MQTRANSACTION(0i32); pub const MQ_MTS_TRANSACTION: MQTRANSACTION = MQTRANSACTION(1i32); pub const MQ_XA_TRANSACTION: MQTRANSACTION = MQTRANSACTION(2i32); pub const MQ_SINGLE_MESSAGE: MQTRANSACTION = MQTRANSACTION(3i32); impl ::core::convert::From<i32> for MQTRANSACTION { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQTRANSACTION { 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 MQTRANSACTIONAL(pub i32); pub const MQ_TRANSACTIONAL_NONE: MQTRANSACTIONAL = MQTRANSACTIONAL(0i32); pub const MQ_TRANSACTIONAL: MQTRANSACTIONAL = MQTRANSACTIONAL(1i32); impl ::core::convert::From<i32> for MQTRANSACTIONAL { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQTRANSACTIONAL { 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 MQWARNING(pub i32); pub const MQ_INFORMATION_PROPERTY: MQWARNING = MQWARNING(1074659329i32); pub const MQ_INFORMATION_ILLEGAL_PROPERTY: MQWARNING = MQWARNING(1074659330i32); pub const MQ_INFORMATION_PROPERTY_IGNORED: MQWARNING = MQWARNING(1074659331i32); pub const MQ_INFORMATION_UNSUPPORTED_PROPERTY: MQWARNING = MQWARNING(1074659332i32); pub const MQ_INFORMATION_DUPLICATE_PROPERTY: MQWARNING = MQWARNING(1074659333i32); pub const MQ_INFORMATION_OPERATION_PENDING: MQWARNING = MQWARNING(1074659334i32); pub const MQ_INFORMATION_FORMATNAME_BUFFER_TOO_SMALL: MQWARNING = MQWARNING(1074659337i32); pub const MQ_INFORMATION_INTERNAL_USER_CERT_EXIST: MQWARNING = MQWARNING(1074659338i32); pub const MQ_INFORMATION_OWNER_IGNORED: MQWARNING = MQWARNING(1074659339i32); impl ::core::convert::From<i32> for MQWARNING { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for MQWARNING { type Abi = Self; } pub const MQ_ACTION_PEEK_CURRENT: u32 = 2147483648u32; pub const MQ_ACTION_PEEK_NEXT: u32 = 2147483649u32; pub const MQ_ACTION_RECEIVE: u32 = 0u32; pub const MQ_ERROR_MESSAGE_LOCKED_UNDER_TRANSACTION: ::windows::core::HRESULT = ::windows::core::HRESULT(-1072824164i32 as _); pub const MQ_ERROR_MESSAGE_NOT_AUTHENTICATED: ::windows::core::HRESULT = ::windows::core::HRESULT(-1072824165i32 as _); pub const MQ_ERROR_RESOLVE_ADDRESS: ::windows::core::HRESULT = ::windows::core::HRESULT(-1072824167i32 as _); pub const MQ_ERROR_TOO_MANY_PROPERTIES: ::windows::core::HRESULT = ::windows::core::HRESULT(-1072824166i32 as _); pub const MQ_LOOKUP_PEEK_CURRENT: u32 = 1073741840u32; pub const MQ_LOOKUP_PEEK_FIRST: u32 = 1073741844u32; pub const MQ_LOOKUP_PEEK_LAST: u32 = 1073741848u32; pub const MQ_LOOKUP_PEEK_NEXT: u32 = 1073741841u32; pub const MQ_LOOKUP_PEEK_PREV: u32 = 1073741842u32; pub const MQ_LOOKUP_RECEIVE_ALLOW_PEEK: u32 = 1073742112u32; pub const MQ_LOOKUP_RECEIVE_CURRENT: u32 = 1073741856u32; pub const MQ_LOOKUP_RECEIVE_FIRST: u32 = 1073741860u32; pub const MQ_LOOKUP_RECEIVE_LAST: u32 = 1073741864u32; pub const MQ_LOOKUP_RECEIVE_NEXT: u32 = 1073741857u32; pub const MQ_LOOKUP_RECEIVE_PREV: u32 = 1073741858u32; pub const MQ_MOVE_ACCESS: u32 = 4u32; pub const MQ_OK: ::windows::core::HRESULT = ::windows::core::HRESULT(0i32 as _); pub const MSMQApplication: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e086_dccd_11d0_aa4b_0060970debae); pub const MSMQCollection: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf72b9031_2f0c_43e8_924e_e6052cdc493f); pub const MSMQCoordinatedTransactionDispenser: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e082_dccd_11d0_aa4b_0060970debae); pub const MSMQDestination: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeba96b18_2168_11d3_898c_00e02c074f6b); pub const MSMQEvent: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e07a_dccd_11d0_aa4b_0060970debae); pub const MSMQManagement: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x39ce96fe_f4c5_4484_a143_4c2d5d324229); pub const MSMQMessage: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e075_dccd_11d0_aa4b_0060970debae); pub const MSMQOutgoingQueueManagement: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0188401c_247a_4fed_99c6_bf14119d7055); pub const MSMQQuery: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e073_dccd_11d0_aa4b_0060970debae); pub const MSMQQueue: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e079_dccd_11d0_aa4b_0060970debae); pub const MSMQQueueInfo: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e07c_dccd_11d0_aa4b_0060970debae); pub const MSMQQueueInfos: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e07e_dccd_11d0_aa4b_0060970debae); pub const MSMQQueueManagement: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x33b6d07e_f27d_42fa_b2d7_bf82e11e9374); pub const MSMQTransaction: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e080_dccd_11d0_aa4b_0060970debae); pub const MSMQTransactionDispenser: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e084_dccd_11d0_aa4b_0060970debae); pub const PREQ: u32 = 4u32; pub const PRGE: u32 = 3u32; pub const PRGT: u32 = 2u32; pub const PRLE: u32 = 1u32; pub const PRLT: u32 = 0u32; pub const PRNE: u32 = 5u32; pub const PROPID_MGMT_MSMQ_ACTIVEQUEUES: u32 = 1u32; pub const PROPID_MGMT_MSMQ_BASE: u32 = 0u32; pub const PROPID_MGMT_MSMQ_BYTES_IN_ALL_QUEUES: u32 = 6u32; pub const PROPID_MGMT_MSMQ_CONNECTED: u32 = 4u32; pub const PROPID_MGMT_MSMQ_DSSERVER: u32 = 3u32; pub const PROPID_MGMT_MSMQ_PRIVATEQ: u32 = 2u32; pub const PROPID_MGMT_MSMQ_TYPE: u32 = 5u32; pub const PROPID_MGMT_QUEUE_BASE: u32 = 0u32; pub const PROPID_MGMT_QUEUE_BYTES_IN_JOURNAL: u32 = 10u32; pub const PROPID_MGMT_QUEUE_BYTES_IN_QUEUE: u32 = 8u32; pub const PROPID_MGMT_QUEUE_CONNECTION_HISTORY: u32 = 25u32; pub const PROPID_MGMT_QUEUE_EOD_FIRST_NON_ACK: u32 = 16u32; pub const PROPID_MGMT_QUEUE_EOD_LAST_ACK: u32 = 13u32; pub const PROPID_MGMT_QUEUE_EOD_LAST_ACK_COUNT: u32 = 15u32; pub const PROPID_MGMT_QUEUE_EOD_LAST_ACK_TIME: u32 = 14u32; pub const PROPID_MGMT_QUEUE_EOD_LAST_NON_ACK: u32 = 17u32; pub const PROPID_MGMT_QUEUE_EOD_NEXT_SEQ: u32 = 18u32; pub const PROPID_MGMT_QUEUE_EOD_NO_ACK_COUNT: u32 = 20u32; pub const PROPID_MGMT_QUEUE_EOD_NO_READ_COUNT: u32 = 19u32; pub const PROPID_MGMT_QUEUE_EOD_RESEND_COUNT: u32 = 23u32; pub const PROPID_MGMT_QUEUE_EOD_RESEND_INTERVAL: u32 = 22u32; pub const PROPID_MGMT_QUEUE_EOD_RESEND_TIME: u32 = 21u32; pub const PROPID_MGMT_QUEUE_EOD_SOURCE_INFO: u32 = 24u32; pub const PROPID_MGMT_QUEUE_FOREIGN: u32 = 6u32; pub const PROPID_MGMT_QUEUE_FORMATNAME: u32 = 2u32; pub const PROPID_MGMT_QUEUE_JOURNAL_MESSAGE_COUNT: u32 = 9u32; pub const PROPID_MGMT_QUEUE_JOURNAL_USED_QUOTA: u32 = 10u32; pub const PROPID_MGMT_QUEUE_LOCATION: u32 = 4u32; pub const PROPID_MGMT_QUEUE_MESSAGE_COUNT: u32 = 7u32; pub const PROPID_MGMT_QUEUE_NEXTHOPS: u32 = 12u32; pub const PROPID_MGMT_QUEUE_PATHNAME: u32 = 1u32; pub const PROPID_MGMT_QUEUE_STATE: u32 = 11u32; pub const PROPID_MGMT_QUEUE_SUBQUEUE_COUNT: u32 = 26u32; pub const PROPID_MGMT_QUEUE_SUBQUEUE_NAMES: u32 = 27u32; pub const PROPID_MGMT_QUEUE_TYPE: u32 = 3u32; pub const PROPID_MGMT_QUEUE_USED_QUOTA: u32 = 8u32; pub const PROPID_MGMT_QUEUE_XACT: u32 = 5u32; pub const PROPID_M_ABORT_COUNT: u32 = 69u32; pub const PROPID_M_ACKNOWLEDGE: u32 = 6u32; pub const PROPID_M_ADMIN_QUEUE: u32 = 17u32; pub const PROPID_M_ADMIN_QUEUE_LEN: u32 = 18u32; pub const PROPID_M_APPSPECIFIC: u32 = 8u32; pub const PROPID_M_ARRIVEDTIME: u32 = 32u32; pub const PROPID_M_AUTHENTICATED: u32 = 25u32; pub const PROPID_M_AUTHENTICATED_EX: u32 = 53u32; pub const PROPID_M_AUTH_LEVEL: u32 = 24u32; pub const PROPID_M_BASE: u32 = 0u32; pub const PROPID_M_BODY: u32 = 9u32; pub const PROPID_M_BODY_SIZE: u32 = 10u32; pub const PROPID_M_BODY_TYPE: u32 = 42u32; pub const PROPID_M_CLASS: u32 = 1u32; pub const PROPID_M_COMPOUND_MESSAGE: u32 = 63u32; pub const PROPID_M_COMPOUND_MESSAGE_SIZE: u32 = 64u32; pub const PROPID_M_CONNECTOR_TYPE: u32 = 38u32; pub const PROPID_M_CORRELATIONID: u32 = 3u32; pub const PROPID_M_CORRELATIONID_SIZE: u32 = 20u32; pub const PROPID_M_DEADLETTER_QUEUE: u32 = 67u32; pub const PROPID_M_DEADLETTER_QUEUE_LEN: u32 = 68u32; pub const PROPID_M_DELIVERY: u32 = 5u32; pub const PROPID_M_DEST_FORMAT_NAME: u32 = 58u32; pub const PROPID_M_DEST_FORMAT_NAME_LEN: u32 = 59u32; pub const PROPID_M_DEST_QUEUE: u32 = 33u32; pub const PROPID_M_DEST_QUEUE_LEN: u32 = 34u32; pub const PROPID_M_DEST_SYMM_KEY: u32 = 43u32; pub const PROPID_M_DEST_SYMM_KEY_LEN: u32 = 44u32; pub const PROPID_M_ENCRYPTION_ALG: u32 = 27u32; pub const PROPID_M_EXTENSION: u32 = 35u32; pub const PROPID_M_EXTENSION_LEN: u32 = 36u32; pub const PROPID_M_FIRST_IN_XACT: u32 = 50u32; pub const PROPID_M_HASH_ALG: u32 = 26u32; pub const PROPID_M_JOURNAL: u32 = 7u32; pub const PROPID_M_LABEL: u32 = 11u32; pub const PROPID_M_LABEL_LEN: u32 = 12u32; pub const PROPID_M_LAST_IN_XACT: u32 = 51u32; pub const PROPID_M_LAST_MOVE_TIME: u32 = 75u32; pub const PROPID_M_LOOKUPID: u32 = 60u32; pub const PROPID_M_MOVE_COUNT: u32 = 70u32; pub const PROPID_M_MSGID: u32 = 2u32; pub const PROPID_M_MSGID_SIZE: u32 = 20u32; pub const PROPID_M_PRIORITY: u32 = 4u32; pub const PROPID_M_PRIV_LEVEL: u32 = 23u32; pub const PROPID_M_PROV_NAME: u32 = 48u32; pub const PROPID_M_PROV_NAME_LEN: u32 = 49u32; pub const PROPID_M_PROV_TYPE: u32 = 47u32; pub const PROPID_M_RESP_FORMAT_NAME: u32 = 54u32; pub const PROPID_M_RESP_FORMAT_NAME_LEN: u32 = 55u32; pub const PROPID_M_RESP_QUEUE: u32 = 15u32; pub const PROPID_M_RESP_QUEUE_LEN: u32 = 16u32; pub const PROPID_M_SECURITY_CONTEXT: u32 = 37u32; pub const PROPID_M_SENDERID: u32 = 20u32; pub const PROPID_M_SENDERID_LEN: u32 = 21u32; pub const PROPID_M_SENDERID_TYPE: u32 = 22u32; pub const PROPID_M_SENDER_CERT: u32 = 28u32; pub const PROPID_M_SENDER_CERT_LEN: u32 = 29u32; pub const PROPID_M_SENTTIME: u32 = 31u32; pub const PROPID_M_SIGNATURE: u32 = 45u32; pub const PROPID_M_SIGNATURE_LEN: u32 = 46u32; pub const PROPID_M_SOAP_BODY: u32 = 66u32; pub const PROPID_M_SOAP_ENVELOPE: u32 = 61u32; pub const PROPID_M_SOAP_ENVELOPE_LEN: u32 = 62u32; pub const PROPID_M_SOAP_HEADER: u32 = 65u32; pub const PROPID_M_SRC_MACHINE_ID: u32 = 30u32; pub const PROPID_M_TIME_TO_BE_RECEIVED: u32 = 14u32; pub const PROPID_M_TIME_TO_REACH_QUEUE: u32 = 13u32; pub const PROPID_M_TRACE: u32 = 41u32; pub const PROPID_M_VERSION: u32 = 19u32; pub const PROPID_M_XACTID: u32 = 52u32; pub const PROPID_M_XACTID_SIZE: u32 = 20u32; pub const PROPID_M_XACT_STATUS_QUEUE: u32 = 39u32; pub const PROPID_M_XACT_STATUS_QUEUE_LEN: u32 = 40u32; pub const PROPID_PC_BASE: u32 = 5800u32; pub const PROPID_PC_DS_ENABLED: u32 = 5802u32; pub const PROPID_PC_VERSION: u32 = 5801u32; pub const PROPID_QM_BASE: u32 = 200u32; pub const PROPID_QM_CONNECTION: u32 = 204u32; pub const PROPID_QM_ENCRYPTION_PK: u32 = 205u32; pub const PROPID_QM_ENCRYPTION_PK_AES: u32 = 244u32; pub const PROPID_QM_ENCRYPTION_PK_BASE: u32 = 231u32; pub const PROPID_QM_ENCRYPTION_PK_ENHANCED: u32 = 232u32; pub const PROPID_QM_MACHINE_ID: u32 = 202u32; pub const PROPID_QM_PATHNAME: u32 = 203u32; pub const PROPID_QM_PATHNAME_DNS: u32 = 233u32; pub const PROPID_QM_SITE_ID: u32 = 201u32; pub const PROPID_Q_ADS_PATH: u32 = 126u32; pub const PROPID_Q_AUTHENTICATE: u32 = 111u32; pub const PROPID_Q_BASE: u32 = 100u32; pub const PROPID_Q_BASEPRIORITY: u32 = 106u32; pub const PROPID_Q_CREATE_TIME: u32 = 109u32; pub const PROPID_Q_INSTANCE: u32 = 101u32; pub const PROPID_Q_JOURNAL: u32 = 104u32; pub const PROPID_Q_JOURNAL_QUOTA: u32 = 107u32; pub const PROPID_Q_LABEL: u32 = 108u32; pub const PROPID_Q_MODIFY_TIME: u32 = 110u32; pub const PROPID_Q_MULTICAST_ADDRESS: u32 = 125u32; pub const PROPID_Q_PATHNAME: u32 = 103u32; pub const PROPID_Q_PATHNAME_DNS: u32 = 124u32; pub const PROPID_Q_PRIV_LEVEL: u32 = 112u32; pub const PROPID_Q_QUOTA: u32 = 105u32; pub const PROPID_Q_TRANSACTION: u32 = 113u32; pub const PROPID_Q_TYPE: u32 = 102u32; pub const QUERY_SORTASCEND: u32 = 0u32; pub const QUERY_SORTDESCEND: 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 QUEUE_STATE(pub i32); pub const MQ_QUEUE_STATE_LOCAL_CONNECTION: QUEUE_STATE = QUEUE_STATE(0i32); pub const MQ_QUEUE_STATE_DISCONNECTED: QUEUE_STATE = QUEUE_STATE(1i32); pub const MQ_QUEUE_STATE_WAITING: QUEUE_STATE = QUEUE_STATE(2i32); pub const MQ_QUEUE_STATE_NEEDVALIDATE: QUEUE_STATE = QUEUE_STATE(3i32); pub const MQ_QUEUE_STATE_ONHOLD: QUEUE_STATE = QUEUE_STATE(4i32); pub const MQ_QUEUE_STATE_NONACTIVE: QUEUE_STATE = QUEUE_STATE(5i32); pub const MQ_QUEUE_STATE_CONNECTED: QUEUE_STATE = QUEUE_STATE(6i32); pub const MQ_QUEUE_STATE_DISCONNECTING: QUEUE_STATE = QUEUE_STATE(7i32); pub const MQ_QUEUE_STATE_LOCKED: QUEUE_STATE = QUEUE_STATE(8i32); impl ::core::convert::From<i32> for QUEUE_STATE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for QUEUE_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 QUEUE_TYPE(pub i32); pub const MQ_TYPE_PUBLIC: QUEUE_TYPE = QUEUE_TYPE(0i32); pub const MQ_TYPE_PRIVATE: QUEUE_TYPE = QUEUE_TYPE(1i32); pub const MQ_TYPE_MACHINE: QUEUE_TYPE = QUEUE_TYPE(2i32); pub const MQ_TYPE_CONNECTOR: QUEUE_TYPE = QUEUE_TYPE(3i32); pub const MQ_TYPE_MULTICAST: QUEUE_TYPE = QUEUE_TYPE(4i32); impl ::core::convert::From<i32> for QUEUE_TYPE { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for QUEUE_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 RELOPS(pub i32); pub const REL_NOP: RELOPS = RELOPS(0i32); pub const REL_EQ: RELOPS = RELOPS(1i32); pub const REL_NEQ: RELOPS = RELOPS(2i32); pub const REL_LT: RELOPS = RELOPS(3i32); pub const REL_GT: RELOPS = RELOPS(4i32); pub const REL_LE: RELOPS = RELOPS(5i32); pub const REL_GE: RELOPS = RELOPS(6i32); impl ::core::convert::From<i32> for RELOPS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for RELOPS { 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 XACT_STATUS(pub i32); pub const MQ_XACT_STATUS_XACT: XACT_STATUS = XACT_STATUS(0i32); pub const MQ_XACT_STATUS_NOT_XACT: XACT_STATUS = XACT_STATUS(1i32); pub const MQ_XACT_STATUS_UNKNOWN: XACT_STATUS = XACT_STATUS(2i32); impl ::core::convert::From<i32> for XACT_STATUS { fn from(value: i32) -> Self { Self(value) } } unsafe impl ::windows::core::Abi for XACT_STATUS { type Abi = Self; } #[repr(transparent)] #[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: clone :: Clone, :: core :: fmt :: Debug)] pub struct _DMSMQEventEvents(pub ::windows::core::IUnknown); impl _DMSMQEventEvents {} unsafe impl ::windows::core::Interface for _DMSMQEventEvents { type Vtable = _DMSMQEventEvents_abi; const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7d6e078_dccd_11d0_aa4b_0060970debae); } impl ::core::convert::From<_DMSMQEventEvents> for ::windows::core::IUnknown { fn from(value: _DMSMQEventEvents) -> Self { value.0 } } impl ::core::convert::From<&_DMSMQEventEvents> for ::windows::core::IUnknown { fn from(value: &_DMSMQEventEvents) -> Self { value.0.clone() } } impl<'a> ::windows::core::IntoParam<'a, ::windows::core::IUnknown> for _DMSMQEventEvents { 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 _DMSMQEventEvents { 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<_DMSMQEventEvents> for super::Com::IDispatch { fn from(value: _DMSMQEventEvents) -> Self { unsafe { ::core::mem::transmute(value) } } } #[cfg(feature = "Win32_System_Com")] impl ::core::convert::From<&_DMSMQEventEvents> for super::Com::IDispatch { fn from(value: &_DMSMQEventEvents) -> 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 _DMSMQEventEvents { 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 &_DMSMQEventEvents { 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 _DMSMQEventEvents_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 = "dynamic")] extern crate pkg_config; #[cfg(any(feature = "static", feature = "static-fallback"))] extern crate cc; use std::env; use std::env::consts; use std::path::Path; fn main() { if let Ok(include_dir) = env::var("LCMS2_INCLUDE_DIR") { println!("cargo:include={}", include_dir); } if let Some(lib_dir) = env::var_os("LCMS2_LIB_DIR") { let lib_dir = Path::new(&lib_dir); let dylib_name = format!("{}lcms2{}", consts::DLL_PREFIX, consts::DLL_SUFFIX); if lib_dir.join(dylib_name).exists() || lib_dir.join("liblcms2.a").exists() || lib_dir.join("lcms2.lib").exists() { println!("cargo:rustc-link-search=native={}", lib_dir.display()); println!("cargo:rustc-link-lib=lcms2"); return; } } let requires_static_only = cfg!(feature = "static") || env::var("LCMS2_STATIC").is_ok(); if requires_static_only || (!configure_pkg_config() && cfg!(feature = "static-fallback")) { compile_static(); } } #[cfg(feature = "dynamic")] fn configure_pkg_config() -> bool { match pkg_config::probe_library("lcms2") { Ok(info) => { for path in info.include_paths { println!("cargo:include={}", path.display()); } true }, Err(err) => { println!("cargo:warning=pkg_config failed ({}). Falling back to static build.", err); false }, } } #[cfg(not(feature = "dynamic"))] fn configure_pkg_config() -> bool { false } #[cfg(not(any(feature = "static", feature = "static-fallback")))] fn compile_static() { println!("cargo:warning='static' feature of lcms2-sys is disabled, so the library won't be built, and probably won't work at all"); println!("cargo:rustc-link-lib=lcms2"); } #[cfg(any(feature = "static", feature = "static-fallback"))] fn compile_static() { cc::Build::new() .include("vendor/include") .file("vendor/src/cmsalpha.c") .file("vendor/src/cmscam02.c") .file("vendor/src/cmscgats.c") .file("vendor/src/cmscnvrt.c") .file("vendor/src/cmserr.c") .file("vendor/src/cmsgamma.c") .file("vendor/src/cmsgmt.c") .file("vendor/src/cmshalf.c") .file("vendor/src/cmsintrp.c") .file("vendor/src/cmsio0.c") .file("vendor/src/cmsio1.c") .file("vendor/src/cmslut.c") .file("vendor/src/cmsmd5.c") .file("vendor/src/cmsmtrx.c") .file("vendor/src/cmsnamed.c") .file("vendor/src/cmsopt.c") .file("vendor/src/cmspack.c") .file("vendor/src/cmspcs.c") .file("vendor/src/cmsplugin.c") .file("vendor/src/cmsps2.c") .file("vendor/src/cmssamp.c") .file("vendor/src/cmssm.c") .file("vendor/src/cmstypes.c") .file("vendor/src/cmsvirt.c") .file("vendor/src/cmswtpnt.c") .file("vendor/src/cmsxform.c") .compile("liblcms2.a"); println!("cargo:include={}", dunce::canonicalize("vendor/include").unwrap().display()); }
use serde_json::to_string; use declarative_dataflow::{Uuid, Value}; use Value::{Aid, Bool, Instant, Number, String}; #[test] fn test_serialization() { assert_eq!( to_string(&Aid(":edge".to_string())).unwrap(), "{\"Aid\":\":edge\"}".to_string() ); assert_eq!( to_string(&String("foo".to_string())).unwrap(), "\"foo\"".to_string() ); assert_eq!(to_string(&Bool(true)).unwrap(), "true".to_string()); assert_eq!(to_string(&Number(44)).unwrap(), "44".to_string()); assert_eq!( to_string(&Instant(0)).unwrap(), "{\"Instant\":0}".to_string() ); let uuid = Value::Uuid(Uuid::parse_str("71828aae-4fc8-421b-82ca-68c5f4981d74").unwrap()); assert_eq!( to_string(&uuid).unwrap(), "{\"Uuid\":\"71828aae-4fc8-421b-82ca-68c5f4981d74\"}".to_string(), ); }
use std::{collections::HashSet, fmt::Display}; use async_trait::async_trait; use data_types::PartitionId; use super::PartitionsSubsetSource; /// A mock of [`PartitionsSubsetSource`], which returns based on subset inclusion. #[derive(Debug)] pub(crate) struct MockInclusionPartitionsSubsetSource { partitions: HashSet<PartitionId>, } impl MockInclusionPartitionsSubsetSource { #[cfg(test)] pub(crate) fn new(partitions: HashSet<PartitionId>) -> Self { Self { partitions } } } impl Display for MockInclusionPartitionsSubsetSource { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "mock") } } #[async_trait] impl PartitionsSubsetSource for MockInclusionPartitionsSubsetSource { async fn fetch(&self, partitions: &[PartitionId]) -> Vec<PartitionId> { partitions .iter() .filter(|p| self.partitions.contains(p)) .cloned() .collect() } } #[cfg(test)] mod tests { use assert_matches::assert_matches; use super::*; #[test] fn test_display() { assert_eq!( MockInclusionPartitionsSubsetSource::new(HashSet::default()).to_string(), "mock", ) } #[tokio::test] async fn test_fetch() { let p_1 = PartitionId::new(1); let p_2 = PartitionId::new(2); let p_3 = PartitionId::new(3); let set = HashSet::from([p_1, p_2]); let source = MockInclusionPartitionsSubsetSource::new(set); // subset containing 1 assert_matches!( source.fetch(&[p_1]).await[..], [subset] if subset == p_1 ); // subset containing multiple assert_matches!( source.fetch(&[p_1, p_2]).await[..], [subset_1, subset_2] if subset_1 == p_1 && subset_2 == p_2 ); // does not return not-included assert_matches!( source.fetch(&[p_1, p_3]).await[..], [subset] if subset == p_1 ); // None included = empty assert_matches!(source.fetch(&[p_3]).await[..], []); } }