blob: 6f847770e4f052b1b6e06bd4ba30d460fac686d8 [file] [log] [blame]
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait IDynamicPortMapping_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn ExternalIPAddress(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn RemoteHost(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn ExternalPort(&self) -> ::windows::core::Result<i32>;
fn Protocol(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn InternalPort(&self) -> ::windows::core::Result<i32>;
fn InternalClient(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn Enabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn Description(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn LeaseDuration(&self) -> ::windows::core::Result<i32>;
fn RenewLease(&self, lleasedurationdesired: i32) -> ::windows::core::Result<i32>;
fn EditInternalClient(&self, bstrinternalclient: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Enable(&self, vb: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn EditDescription(&self, bstrdescription: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn EditInternalPort(&self, linternalport: i32) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for IDynamicPortMapping {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl IDynamicPortMapping_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>() -> IDynamicPortMapping_Vtbl {
unsafe extern "system" fn ExternalIPAddress<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ExternalIPAddress() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RemoteHost<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RemoteHost() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ExternalPort<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ExternalPort() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Protocol<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Protocol() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn InternalPort<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.InternalPort() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn InternalClient<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.InternalClient() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Enabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Enabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Description<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Description() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn LeaseDuration<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.LeaseDuration() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RenewLease<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lleasedurationdesired: i32, pleasedurationreturned: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RenewLease(::core::mem::transmute_copy(&lleasedurationdesired)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pleasedurationreturned, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn EditInternalClient<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrinternalclient: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EditInternalClient(::core::mem::transmute(&bstrinternalclient)).into()
}
unsafe extern "system" fn Enable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, vb: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Enable(::core::mem::transmute_copy(&vb)).into()
}
unsafe extern "system" fn EditDescription<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrdescription: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EditDescription(::core::mem::transmute(&bstrdescription)).into()
}
unsafe extern "system" fn EditInternalPort<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, linternalport: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EditInternalPort(::core::mem::transmute_copy(&linternalport)).into()
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
ExternalIPAddress: ExternalIPAddress::<Identity, Impl, OFFSET>,
RemoteHost: RemoteHost::<Identity, Impl, OFFSET>,
ExternalPort: ExternalPort::<Identity, Impl, OFFSET>,
Protocol: Protocol::<Identity, Impl, OFFSET>,
InternalPort: InternalPort::<Identity, Impl, OFFSET>,
InternalClient: InternalClient::<Identity, Impl, OFFSET>,
Enabled: Enabled::<Identity, Impl, OFFSET>,
Description: Description::<Identity, Impl, OFFSET>,
LeaseDuration: LeaseDuration::<Identity, Impl, OFFSET>,
RenewLease: RenewLease::<Identity, Impl, OFFSET>,
EditInternalClient: EditInternalClient::<Identity, Impl, OFFSET>,
Enable: Enable::<Identity, Impl, OFFSET>,
EditDescription: EditDescription::<Identity, Impl, OFFSET>,
EditInternalPort: EditInternalPort::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDynamicPortMapping as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait IDynamicPortMappingCollection_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
fn get_Item(&self, bstrremotehost: &::windows::core::BSTR, lexternalport: i32, bstrprotocol: &::windows::core::BSTR) -> ::windows::core::Result<IDynamicPortMapping>;
fn Count(&self) -> ::windows::core::Result<i32>;
fn Remove(&self, bstrremotehost: &::windows::core::BSTR, lexternalport: i32, bstrprotocol: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Add(&self, bstrremotehost: &::windows::core::BSTR, lexternalport: i32, bstrprotocol: &::windows::core::BSTR, linternalport: i32, bstrinternalclient: &::windows::core::BSTR, benabled: super::super::Foundation::VARIANT_BOOL, bstrdescription: &::windows::core::BSTR, lleaseduration: i32) -> ::windows::core::Result<IDynamicPortMapping>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for IDynamicPortMappingCollection {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl IDynamicPortMappingCollection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMappingCollection_Impl, const OFFSET: isize>() -> IDynamicPortMappingCollection_Vtbl {
unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMappingCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this._NewEnum() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn get_Item<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMappingCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrremotehost: ::std::mem::MaybeUninit<::windows::core::BSTR>, lexternalport: i32, bstrprotocol: ::std::mem::MaybeUninit<::windows::core::BSTR>, ppdpm: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_Item(::core::mem::transmute(&bstrremotehost), ::core::mem::transmute_copy(&lexternalport), ::core::mem::transmute(&bstrprotocol)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppdpm, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Count<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMappingCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Count() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Remove<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMappingCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrremotehost: ::std::mem::MaybeUninit<::windows::core::BSTR>, lexternalport: i32, bstrprotocol: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Remove(::core::mem::transmute(&bstrremotehost), ::core::mem::transmute_copy(&lexternalport), ::core::mem::transmute(&bstrprotocol)).into()
}
unsafe extern "system" fn Add<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IDynamicPortMappingCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrremotehost: ::std::mem::MaybeUninit<::windows::core::BSTR>, lexternalport: i32, bstrprotocol: ::std::mem::MaybeUninit<::windows::core::BSTR>, linternalport: i32, bstrinternalclient: ::std::mem::MaybeUninit<::windows::core::BSTR>, benabled: super::super::Foundation::VARIANT_BOOL, bstrdescription: ::std::mem::MaybeUninit<::windows::core::BSTR>, lleaseduration: i32, ppdpm: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Add(::core::mem::transmute(&bstrremotehost), ::core::mem::transmute_copy(&lexternalport), ::core::mem::transmute(&bstrprotocol), ::core::mem::transmute_copy(&linternalport), ::core::mem::transmute(&bstrinternalclient), ::core::mem::transmute_copy(&benabled), ::core::mem::transmute(&bstrdescription), ::core::mem::transmute_copy(&lleaseduration)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppdpm, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
_NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
get_Item: get_Item::<Identity, Impl, OFFSET>,
Count: Count::<Identity, Impl, OFFSET>,
Remove: Remove::<Identity, Impl, OFFSET>,
Add: Add::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IDynamicPortMappingCollection as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"implement\"`*"]
pub trait IEnumNetConnection_Impl: Sized {
fn Next(&self, celt: u32, rgelt: *mut ::core::option::Option<INetConnection>, pceltfetched: *mut u32) -> ::windows::core::Result<()>;
fn Skip(&self, celt: u32) -> ::windows::core::Result<()>;
fn Reset(&self) -> ::windows::core::Result<()>;
fn Clone(&self) -> ::windows::core::Result<IEnumNetConnection>;
}
impl ::windows::core::RuntimeName for IEnumNetConnection {}
impl IEnumNetConnection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetConnection_Impl, const OFFSET: isize>() -> IEnumNetConnection_Vtbl {
unsafe extern "system" fn Next<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32, rgelt: *mut *mut ::core::ffi::c_void, pceltfetched: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Next(::core::mem::transmute_copy(&celt), ::core::mem::transmute_copy(&rgelt), ::core::mem::transmute_copy(&pceltfetched)).into()
}
unsafe extern "system" fn Skip<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Skip(::core::mem::transmute_copy(&celt)).into()
}
unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reset().into()
}
unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppenum: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Clone() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppenum, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Next: Next::<Identity, Impl, OFFSET>,
Skip: Skip::<Identity, Impl, OFFSET>,
Reset: Reset::<Identity, Impl, OFFSET>,
Clone: Clone::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IEnumNetConnection as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait IEnumNetSharingEveryConnection_Impl: Sized {
fn Next(&self, celt: u32, rgvar: *mut super::super::System::Com::VARIANT, pceltfetched: *mut u32) -> ::windows::core::Result<()>;
fn Skip(&self, celt: u32) -> ::windows::core::Result<()>;
fn Reset(&self) -> ::windows::core::Result<()>;
fn Clone(&self) -> ::windows::core::Result<IEnumNetSharingEveryConnection>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for IEnumNetSharingEveryConnection {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl IEnumNetSharingEveryConnection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingEveryConnection_Impl, const OFFSET: isize>() -> IEnumNetSharingEveryConnection_Vtbl {
unsafe extern "system" fn Next<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingEveryConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32, rgvar: *mut super::super::System::Com::VARIANT, pceltfetched: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Next(::core::mem::transmute_copy(&celt), ::core::mem::transmute_copy(&rgvar), ::core::mem::transmute_copy(&pceltfetched)).into()
}
unsafe extern "system" fn Skip<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingEveryConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Skip(::core::mem::transmute_copy(&celt)).into()
}
unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingEveryConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reset().into()
}
unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingEveryConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppenum: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Clone() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppenum, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Next: Next::<Identity, Impl, OFFSET>,
Skip: Skip::<Identity, Impl, OFFSET>,
Reset: Reset::<Identity, Impl, OFFSET>,
Clone: Clone::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IEnumNetSharingEveryConnection as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait IEnumNetSharingPortMapping_Impl: Sized {
fn Next(&self, celt: u32, rgvar: *mut super::super::System::Com::VARIANT, pceltfetched: *mut u32) -> ::windows::core::Result<()>;
fn Skip(&self, celt: u32) -> ::windows::core::Result<()>;
fn Reset(&self) -> ::windows::core::Result<()>;
fn Clone(&self) -> ::windows::core::Result<IEnumNetSharingPortMapping>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for IEnumNetSharingPortMapping {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl IEnumNetSharingPortMapping_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPortMapping_Impl, const OFFSET: isize>() -> IEnumNetSharingPortMapping_Vtbl {
unsafe extern "system" fn Next<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32, rgvar: *mut super::super::System::Com::VARIANT, pceltfetched: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Next(::core::mem::transmute_copy(&celt), ::core::mem::transmute_copy(&rgvar), ::core::mem::transmute_copy(&pceltfetched)).into()
}
unsafe extern "system" fn Skip<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Skip(::core::mem::transmute_copy(&celt)).into()
}
unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reset().into()
}
unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppenum: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Clone() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppenum, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Next: Next::<Identity, Impl, OFFSET>,
Skip: Skip::<Identity, Impl, OFFSET>,
Reset: Reset::<Identity, Impl, OFFSET>,
Clone: Clone::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IEnumNetSharingPortMapping as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait IEnumNetSharingPrivateConnection_Impl: Sized {
fn Next(&self, celt: u32, rgvar: *mut super::super::System::Com::VARIANT, pceltfetched: *mut u32) -> ::windows::core::Result<()>;
fn Skip(&self, celt: u32) -> ::windows::core::Result<()>;
fn Reset(&self) -> ::windows::core::Result<()>;
fn Clone(&self) -> ::windows::core::Result<IEnumNetSharingPrivateConnection>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for IEnumNetSharingPrivateConnection {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl IEnumNetSharingPrivateConnection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPrivateConnection_Impl, const OFFSET: isize>() -> IEnumNetSharingPrivateConnection_Vtbl {
unsafe extern "system" fn Next<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPrivateConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32, rgvar: *mut super::super::System::Com::VARIANT, pceltfetched: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Next(::core::mem::transmute_copy(&celt), ::core::mem::transmute_copy(&rgvar), ::core::mem::transmute_copy(&pceltfetched)).into()
}
unsafe extern "system" fn Skip<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPrivateConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Skip(::core::mem::transmute_copy(&celt)).into()
}
unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPrivateConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reset().into()
}
unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPrivateConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppenum: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Clone() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppenum, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Next: Next::<Identity, Impl, OFFSET>,
Skip: Skip::<Identity, Impl, OFFSET>,
Reset: Reset::<Identity, Impl, OFFSET>,
Clone: Clone::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IEnumNetSharingPrivateConnection as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait IEnumNetSharingPublicConnection_Impl: Sized {
fn Next(&self, celt: u32, rgvar: *mut super::super::System::Com::VARIANT, pceltfetched: *mut u32) -> ::windows::core::Result<()>;
fn Skip(&self, celt: u32) -> ::windows::core::Result<()>;
fn Reset(&self) -> ::windows::core::Result<()>;
fn Clone(&self) -> ::windows::core::Result<IEnumNetSharingPublicConnection>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for IEnumNetSharingPublicConnection {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl IEnumNetSharingPublicConnection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPublicConnection_Impl, const OFFSET: isize>() -> IEnumNetSharingPublicConnection_Vtbl {
unsafe extern "system" fn Next<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPublicConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32, rgvar: *mut super::super::System::Com::VARIANT, pceltfetched: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Next(::core::mem::transmute_copy(&celt), ::core::mem::transmute_copy(&rgvar), ::core::mem::transmute_copy(&pceltfetched)).into()
}
unsafe extern "system" fn Skip<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPublicConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, celt: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Skip(::core::mem::transmute_copy(&celt)).into()
}
unsafe extern "system" fn Reset<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPublicConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Reset().into()
}
unsafe extern "system" fn Clone<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IEnumNetSharingPublicConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppenum: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Clone() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppenum, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Next: Next::<Identity, Impl, OFFSET>,
Skip: Skip::<Identity, Impl, OFFSET>,
Reset: Reset::<Identity, Impl, OFFSET>,
Clone: Clone::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IEnumNetSharingPublicConnection as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INATEventManager_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn SetExternalIPAddressCallback(&self, punk: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
fn SetNumberOfEntriesCallback(&self, punk: ::core::option::Option<&::windows::core::IUnknown>) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INATEventManager {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INATEventManager_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INATEventManager_Impl, const OFFSET: isize>() -> INATEventManager_Vtbl {
unsafe extern "system" fn SetExternalIPAddressCallback<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INATEventManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, punk: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetExternalIPAddressCallback(::windows::core::from_raw_borrowed(&punk)).into()
}
unsafe extern "system" fn SetNumberOfEntriesCallback<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INATEventManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, punk: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetNumberOfEntriesCallback(::windows::core::from_raw_borrowed(&punk)).into()
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
SetExternalIPAddressCallback: SetExternalIPAddressCallback::<Identity, Impl, OFFSET>,
SetNumberOfEntriesCallback: SetNumberOfEntriesCallback::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INATEventManager as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"implement\"`*"]
pub trait INATExternalIPAddressCallback_Impl: Sized {
fn NewExternalIPAddress(&self, bstrnewexternalipaddress: &::windows::core::BSTR) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for INATExternalIPAddressCallback {}
impl INATExternalIPAddressCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INATExternalIPAddressCallback_Impl, const OFFSET: isize>() -> INATExternalIPAddressCallback_Vtbl {
unsafe extern "system" fn NewExternalIPAddress<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INATExternalIPAddressCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrnewexternalipaddress: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NewExternalIPAddress(::core::mem::transmute(&bstrnewexternalipaddress)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), NewExternalIPAddress: NewExternalIPAddress::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INATExternalIPAddressCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"implement\"`*"]
pub trait INATNumberOfEntriesCallback_Impl: Sized {
fn NewNumberOfEntries(&self, lnewnumberofentries: i32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for INATNumberOfEntriesCallback {}
impl INATNumberOfEntriesCallback_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INATNumberOfEntriesCallback_Impl, const OFFSET: isize>() -> INATNumberOfEntriesCallback_Vtbl {
unsafe extern "system" fn NewNumberOfEntries<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INATNumberOfEntriesCallback_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lnewnumberofentries: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.NewNumberOfEntries(::core::mem::transmute_copy(&lnewnumberofentries)).into()
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), NewNumberOfEntries: NewNumberOfEntries::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INATNumberOfEntriesCallback as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"implement\"`*"]
pub trait INetConnection_Impl: Sized {
fn Connect(&self) -> ::windows::core::Result<()>;
fn Disconnect(&self) -> ::windows::core::Result<()>;
fn Delete(&self) -> ::windows::core::Result<()>;
fn Duplicate(&self, pszwduplicatename: &::windows::core::PCWSTR) -> ::windows::core::Result<INetConnection>;
fn GetProperties(&self) -> ::windows::core::Result<*mut NETCON_PROPERTIES>;
fn GetUiObjectClassId(&self) -> ::windows::core::Result<::windows::core::GUID>;
fn Rename(&self, pszwnewname: &::windows::core::PCWSTR) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for INetConnection {}
impl INetConnection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnection_Impl, const OFFSET: isize>() -> INetConnection_Vtbl {
unsafe extern "system" fn Connect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Connect().into()
}
unsafe extern "system" fn Disconnect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Disconnect().into()
}
unsafe extern "system" fn Delete<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Delete().into()
}
unsafe extern "system" fn Duplicate<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszwduplicatename: ::windows::core::PCWSTR, ppcon: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Duplicate(::core::mem::transmute(&pszwduplicatename)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppcon, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetProperties<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppprops: *mut *mut NETCON_PROPERTIES) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProperties() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppprops, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetUiObjectClassId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pclsid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetUiObjectClassId() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pclsid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Rename<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pszwnewname: ::windows::core::PCWSTR) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Rename(::core::mem::transmute(&pszwnewname)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Connect: Connect::<Identity, Impl, OFFSET>,
Disconnect: Disconnect::<Identity, Impl, OFFSET>,
Delete: Delete::<Identity, Impl, OFFSET>,
Duplicate: Duplicate::<Identity, Impl, OFFSET>,
GetProperties: GetProperties::<Identity, Impl, OFFSET>,
GetUiObjectClassId: GetUiObjectClassId::<Identity, Impl, OFFSET>,
Rename: Rename::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetConnection as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait INetConnectionConnectUi_Impl: Sized {
fn SetConnection(&self, pcon: ::core::option::Option<&INetConnection>) -> ::windows::core::Result<()>;
fn Connect(&self, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> ::windows::core::Result<()>;
fn Disconnect(&self, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> ::windows::core::Result<()>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for INetConnectionConnectUi {}
#[cfg(feature = "Win32_Foundation")]
impl INetConnectionConnectUi_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionConnectUi_Impl, const OFFSET: isize>() -> INetConnectionConnectUi_Vtbl {
unsafe extern "system" fn SetConnection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionConnectUi_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pcon: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetConnection(::windows::core::from_raw_borrowed(&pcon)).into()
}
unsafe extern "system" fn Connect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionConnectUi_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Connect(::core::mem::transmute_copy(&hwndparent), ::core::mem::transmute_copy(&dwflags)).into()
}
unsafe extern "system" fn Disconnect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionConnectUi_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, hwndparent: super::super::Foundation::HWND, dwflags: u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Disconnect(::core::mem::transmute_copy(&hwndparent), ::core::mem::transmute_copy(&dwflags)).into()
}
Self {
base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
SetConnection: SetConnection::<Identity, Impl, OFFSET>,
Connect: Connect::<Identity, Impl, OFFSET>,
Disconnect: Disconnect::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetConnectionConnectUi as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"implement\"`*"]
pub trait INetConnectionManager_Impl: Sized {
fn EnumConnections(&self, flags: NETCONMGR_ENUM_FLAGS) -> ::windows::core::Result<IEnumNetConnection>;
}
impl ::windows::core::RuntimeName for INetConnectionManager {}
impl INetConnectionManager_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionManager_Impl, const OFFSET: isize>() -> INetConnectionManager_Vtbl {
unsafe extern "system" fn EnumConnections<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, flags: NETCONMGR_ENUM_FLAGS, ppenum: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EnumConnections(::core::mem::transmute_copy(&flags)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppenum, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self { base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(), EnumConnections: EnumConnections::<Identity, Impl, OFFSET> }
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetConnectionManager as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetConnectionProps_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Guid(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn Name(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn DeviceName(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn Status(&self) -> ::windows::core::Result<NETCON_STATUS>;
fn MediaType(&self) -> ::windows::core::Result<NETCON_MEDIATYPE>;
fn Characteristics(&self) -> ::windows::core::Result<u32>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetConnectionProps {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetConnectionProps_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionProps_Impl, const OFFSET: isize>() -> INetConnectionProps_Vtbl {
unsafe extern "system" fn Guid<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbstrguid: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Guid() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbstrguid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Name<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbstrname: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Name() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbstrname, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn DeviceName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbstrdevicename: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.DeviceName() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbstrdevicename, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Status<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pstatus: *mut NETCON_STATUS) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Status() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pstatus, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn MediaType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pmediatype: *mut NETCON_MEDIATYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.MediaType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pmediatype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Characteristics<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetConnectionProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwflags: *mut u32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Characteristics() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwflags, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Guid: Guid::<Identity, Impl, OFFSET>,
Name: Name::<Identity, Impl, OFFSET>,
DeviceName: DeviceName::<Identity, Impl, OFFSET>,
Status: Status::<Identity, Impl, OFFSET>,
MediaType: MediaType::<Identity, Impl, OFFSET>,
Characteristics: Characteristics::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetConnectionProps as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwAuthorizedApplication_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Name(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetName(&self, name: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn ProcessImageFileName(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetProcessImageFileName(&self, imagefilename: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn IpVersion(&self) -> ::windows::core::Result<NET_FW_IP_VERSION>;
fn SetIpVersion(&self, ipversion: NET_FW_IP_VERSION) -> ::windows::core::Result<()>;
fn Scope(&self) -> ::windows::core::Result<NET_FW_SCOPE>;
fn SetScope(&self, scope: NET_FW_SCOPE) -> ::windows::core::Result<()>;
fn RemoteAddresses(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetRemoteAddresses(&self, remoteaddrs: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Enabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwAuthorizedApplication {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwAuthorizedApplication_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>() -> INetFwAuthorizedApplication_Vtbl {
unsafe extern "system" fn Name<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, name: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Name() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(name, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, name: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetName(::core::mem::transmute(&name)).into()
}
unsafe extern "system" fn ProcessImageFileName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, imagefilename: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ProcessImageFileName() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(imagefilename, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetProcessImageFileName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, imagefilename: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProcessImageFileName(::core::mem::transmute(&imagefilename)).into()
}
unsafe extern "system" fn IpVersion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ipversion: *mut NET_FW_IP_VERSION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IpVersion() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ipversion, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetIpVersion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ipversion: NET_FW_IP_VERSION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIpVersion(::core::mem::transmute_copy(&ipversion)).into()
}
unsafe extern "system" fn Scope<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, scope: *mut NET_FW_SCOPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Scope() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(scope, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetScope<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, scope: NET_FW_SCOPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetScope(::core::mem::transmute_copy(&scope)).into()
}
unsafe extern "system" fn RemoteAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, remoteaddrs: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RemoteAddresses() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(remoteaddrs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRemoteAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, remoteaddrs: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRemoteAddresses(::core::mem::transmute(&remoteaddrs)).into()
}
unsafe extern "system" fn Enabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Enabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(enabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplication_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetEnabled(::core::mem::transmute_copy(&enabled)).into()
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Name: Name::<Identity, Impl, OFFSET>,
SetName: SetName::<Identity, Impl, OFFSET>,
ProcessImageFileName: ProcessImageFileName::<Identity, Impl, OFFSET>,
SetProcessImageFileName: SetProcessImageFileName::<Identity, Impl, OFFSET>,
IpVersion: IpVersion::<Identity, Impl, OFFSET>,
SetIpVersion: SetIpVersion::<Identity, Impl, OFFSET>,
Scope: Scope::<Identity, Impl, OFFSET>,
SetScope: SetScope::<Identity, Impl, OFFSET>,
RemoteAddresses: RemoteAddresses::<Identity, Impl, OFFSET>,
SetRemoteAddresses: SetRemoteAddresses::<Identity, Impl, OFFSET>,
Enabled: Enabled::<Identity, Impl, OFFSET>,
SetEnabled: SetEnabled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwAuthorizedApplication as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwAuthorizedApplications_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Count(&self) -> ::windows::core::Result<i32>;
fn Add(&self, app: ::core::option::Option<&INetFwAuthorizedApplication>) -> ::windows::core::Result<()>;
fn Remove(&self, imagefilename: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Item(&self, imagefilename: &::windows::core::BSTR) -> ::windows::core::Result<INetFwAuthorizedApplication>;
fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwAuthorizedApplications {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwAuthorizedApplications_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplications_Impl, const OFFSET: isize>() -> INetFwAuthorizedApplications_Vtbl {
unsafe extern "system" fn Count<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplications_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, count: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Count() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(count, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Add<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplications_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, app: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Add(::windows::core::from_raw_borrowed(&app)).into()
}
unsafe extern "system" fn Remove<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplications_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, imagefilename: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Remove(::core::mem::transmute(&imagefilename)).into()
}
unsafe extern "system" fn Item<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplications_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, imagefilename: ::std::mem::MaybeUninit<::windows::core::BSTR>, app: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Item(::core::mem::transmute(&imagefilename)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(app, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwAuthorizedApplications_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, newenum: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this._NewEnum() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(newenum, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Count: Count::<Identity, Impl, OFFSET>,
Add: Add::<Identity, Impl, OFFSET>,
Remove: Remove::<Identity, Impl, OFFSET>,
Item: Item::<Identity, Impl, OFFSET>,
_NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwAuthorizedApplications as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwIcmpSettings_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn AllowOutboundDestinationUnreachable(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetAllowOutboundDestinationUnreachable(&self, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn AllowRedirect(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetAllowRedirect(&self, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn AllowInboundEchoRequest(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetAllowInboundEchoRequest(&self, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn AllowOutboundTimeExceeded(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetAllowOutboundTimeExceeded(&self, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn AllowOutboundParameterProblem(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetAllowOutboundParameterProblem(&self, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn AllowOutboundSourceQuench(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetAllowOutboundSourceQuench(&self, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn AllowInboundRouterRequest(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetAllowInboundRouterRequest(&self, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn AllowInboundTimestampRequest(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetAllowInboundTimestampRequest(&self, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn AllowInboundMaskRequest(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetAllowInboundMaskRequest(&self, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn AllowOutboundPacketTooBig(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetAllowOutboundPacketTooBig(&self, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwIcmpSettings {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwIcmpSettings_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>() -> INetFwIcmpSettings_Vtbl {
unsafe extern "system" fn AllowOutboundDestinationUnreachable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AllowOutboundDestinationUnreachable() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(allow, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAllowOutboundDestinationUnreachable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllowOutboundDestinationUnreachable(::core::mem::transmute_copy(&allow)).into()
}
unsafe extern "system" fn AllowRedirect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AllowRedirect() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(allow, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAllowRedirect<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllowRedirect(::core::mem::transmute_copy(&allow)).into()
}
unsafe extern "system" fn AllowInboundEchoRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AllowInboundEchoRequest() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(allow, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAllowInboundEchoRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllowInboundEchoRequest(::core::mem::transmute_copy(&allow)).into()
}
unsafe extern "system" fn AllowOutboundTimeExceeded<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AllowOutboundTimeExceeded() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(allow, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAllowOutboundTimeExceeded<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllowOutboundTimeExceeded(::core::mem::transmute_copy(&allow)).into()
}
unsafe extern "system" fn AllowOutboundParameterProblem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AllowOutboundParameterProblem() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(allow, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAllowOutboundParameterProblem<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllowOutboundParameterProblem(::core::mem::transmute_copy(&allow)).into()
}
unsafe extern "system" fn AllowOutboundSourceQuench<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AllowOutboundSourceQuench() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(allow, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAllowOutboundSourceQuench<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllowOutboundSourceQuench(::core::mem::transmute_copy(&allow)).into()
}
unsafe extern "system" fn AllowInboundRouterRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AllowInboundRouterRequest() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(allow, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAllowInboundRouterRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllowInboundRouterRequest(::core::mem::transmute_copy(&allow)).into()
}
unsafe extern "system" fn AllowInboundTimestampRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AllowInboundTimestampRequest() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(allow, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAllowInboundTimestampRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllowInboundTimestampRequest(::core::mem::transmute_copy(&allow)).into()
}
unsafe extern "system" fn AllowInboundMaskRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AllowInboundMaskRequest() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(allow, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAllowInboundMaskRequest<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllowInboundMaskRequest(::core::mem::transmute_copy(&allow)).into()
}
unsafe extern "system" fn AllowOutboundPacketTooBig<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AllowOutboundPacketTooBig() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(allow, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAllowOutboundPacketTooBig<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwIcmpSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, allow: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAllowOutboundPacketTooBig(::core::mem::transmute_copy(&allow)).into()
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
AllowOutboundDestinationUnreachable: AllowOutboundDestinationUnreachable::<Identity, Impl, OFFSET>,
SetAllowOutboundDestinationUnreachable: SetAllowOutboundDestinationUnreachable::<Identity, Impl, OFFSET>,
AllowRedirect: AllowRedirect::<Identity, Impl, OFFSET>,
SetAllowRedirect: SetAllowRedirect::<Identity, Impl, OFFSET>,
AllowInboundEchoRequest: AllowInboundEchoRequest::<Identity, Impl, OFFSET>,
SetAllowInboundEchoRequest: SetAllowInboundEchoRequest::<Identity, Impl, OFFSET>,
AllowOutboundTimeExceeded: AllowOutboundTimeExceeded::<Identity, Impl, OFFSET>,
SetAllowOutboundTimeExceeded: SetAllowOutboundTimeExceeded::<Identity, Impl, OFFSET>,
AllowOutboundParameterProblem: AllowOutboundParameterProblem::<Identity, Impl, OFFSET>,
SetAllowOutboundParameterProblem: SetAllowOutboundParameterProblem::<Identity, Impl, OFFSET>,
AllowOutboundSourceQuench: AllowOutboundSourceQuench::<Identity, Impl, OFFSET>,
SetAllowOutboundSourceQuench: SetAllowOutboundSourceQuench::<Identity, Impl, OFFSET>,
AllowInboundRouterRequest: AllowInboundRouterRequest::<Identity, Impl, OFFSET>,
SetAllowInboundRouterRequest: SetAllowInboundRouterRequest::<Identity, Impl, OFFSET>,
AllowInboundTimestampRequest: AllowInboundTimestampRequest::<Identity, Impl, OFFSET>,
SetAllowInboundTimestampRequest: SetAllowInboundTimestampRequest::<Identity, Impl, OFFSET>,
AllowInboundMaskRequest: AllowInboundMaskRequest::<Identity, Impl, OFFSET>,
SetAllowInboundMaskRequest: SetAllowInboundMaskRequest::<Identity, Impl, OFFSET>,
AllowOutboundPacketTooBig: AllowOutboundPacketTooBig::<Identity, Impl, OFFSET>,
SetAllowOutboundPacketTooBig: SetAllowOutboundPacketTooBig::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwIcmpSettings as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwMgr_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn LocalPolicy(&self) -> ::windows::core::Result<INetFwPolicy>;
fn CurrentProfileType(&self) -> ::windows::core::Result<NET_FW_PROFILE_TYPE>;
fn RestoreDefaults(&self) -> ::windows::core::Result<()>;
fn IsPortAllowed(&self, imagefilename: &::windows::core::BSTR, ipversion: NET_FW_IP_VERSION, portnumber: i32, localaddress: &::windows::core::BSTR, ipprotocol: NET_FW_IP_PROTOCOL, allowed: *mut super::super::System::Com::VARIANT, restricted: *mut super::super::System::Com::VARIANT) -> ::windows::core::Result<()>;
fn IsIcmpTypeAllowed(&self, ipversion: NET_FW_IP_VERSION, localaddress: &::windows::core::BSTR, r#type: u8, allowed: *mut super::super::System::Com::VARIANT, restricted: *mut super::super::System::Com::VARIANT) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwMgr {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwMgr_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwMgr_Impl, const OFFSET: isize>() -> INetFwMgr_Vtbl {
unsafe extern "system" fn LocalPolicy<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwMgr_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, localpolicy: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.LocalPolicy() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(localpolicy, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn CurrentProfileType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwMgr_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: *mut NET_FW_PROFILE_TYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CurrentProfileType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(profiletype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RestoreDefaults<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwMgr_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RestoreDefaults().into()
}
unsafe extern "system" fn IsPortAllowed<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwMgr_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, imagefilename: ::std::mem::MaybeUninit<::windows::core::BSTR>, ipversion: NET_FW_IP_VERSION, portnumber: i32, localaddress: ::std::mem::MaybeUninit<::windows::core::BSTR>, ipprotocol: NET_FW_IP_PROTOCOL, allowed: *mut super::super::System::Com::VARIANT, restricted: *mut super::super::System::Com::VARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsPortAllowed(::core::mem::transmute(&imagefilename), ::core::mem::transmute_copy(&ipversion), ::core::mem::transmute_copy(&portnumber), ::core::mem::transmute(&localaddress), ::core::mem::transmute_copy(&ipprotocol), ::core::mem::transmute_copy(&allowed), ::core::mem::transmute_copy(&restricted)).into()
}
unsafe extern "system" fn IsIcmpTypeAllowed<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwMgr_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ipversion: NET_FW_IP_VERSION, localaddress: ::std::mem::MaybeUninit<::windows::core::BSTR>, r#type: u8, allowed: *mut super::super::System::Com::VARIANT, restricted: *mut super::super::System::Com::VARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.IsIcmpTypeAllowed(::core::mem::transmute_copy(&ipversion), ::core::mem::transmute(&localaddress), ::core::mem::transmute_copy(&r#type), ::core::mem::transmute_copy(&allowed), ::core::mem::transmute_copy(&restricted)).into()
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
LocalPolicy: LocalPolicy::<Identity, Impl, OFFSET>,
CurrentProfileType: CurrentProfileType::<Identity, Impl, OFFSET>,
RestoreDefaults: RestoreDefaults::<Identity, Impl, OFFSET>,
IsPortAllowed: IsPortAllowed::<Identity, Impl, OFFSET>,
IsIcmpTypeAllowed: IsIcmpTypeAllowed::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwMgr as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwOpenPort_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Name(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetName(&self, name: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn IpVersion(&self) -> ::windows::core::Result<NET_FW_IP_VERSION>;
fn SetIpVersion(&self, ipversion: NET_FW_IP_VERSION) -> ::windows::core::Result<()>;
fn Protocol(&self) -> ::windows::core::Result<NET_FW_IP_PROTOCOL>;
fn SetProtocol(&self, ipprotocol: NET_FW_IP_PROTOCOL) -> ::windows::core::Result<()>;
fn Port(&self) -> ::windows::core::Result<i32>;
fn SetPort(&self, portnumber: i32) -> ::windows::core::Result<()>;
fn Scope(&self) -> ::windows::core::Result<NET_FW_SCOPE>;
fn SetScope(&self, scope: NET_FW_SCOPE) -> ::windows::core::Result<()>;
fn RemoteAddresses(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetRemoteAddresses(&self, remoteaddrs: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Enabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn BuiltIn(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwOpenPort {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwOpenPort_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>() -> INetFwOpenPort_Vtbl {
unsafe extern "system" fn Name<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, name: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Name() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(name, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, name: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetName(::core::mem::transmute(&name)).into()
}
unsafe extern "system" fn IpVersion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ipversion: *mut NET_FW_IP_VERSION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IpVersion() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ipversion, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetIpVersion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ipversion: NET_FW_IP_VERSION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIpVersion(::core::mem::transmute_copy(&ipversion)).into()
}
unsafe extern "system" fn Protocol<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ipprotocol: *mut NET_FW_IP_PROTOCOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Protocol() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ipprotocol, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetProtocol<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ipprotocol: NET_FW_IP_PROTOCOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProtocol(::core::mem::transmute_copy(&ipprotocol)).into()
}
unsafe extern "system" fn Port<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, portnumber: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Port() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(portnumber, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetPort<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, portnumber: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetPort(::core::mem::transmute_copy(&portnumber)).into()
}
unsafe extern "system" fn Scope<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, scope: *mut NET_FW_SCOPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Scope() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(scope, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetScope<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, scope: NET_FW_SCOPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetScope(::core::mem::transmute_copy(&scope)).into()
}
unsafe extern "system" fn RemoteAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, remoteaddrs: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RemoteAddresses() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(remoteaddrs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRemoteAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, remoteaddrs: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRemoteAddresses(::core::mem::transmute(&remoteaddrs)).into()
}
unsafe extern "system" fn Enabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Enabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(enabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetEnabled(::core::mem::transmute_copy(&enabled)).into()
}
unsafe extern "system" fn BuiltIn<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPort_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, builtin: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.BuiltIn() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(builtin, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Name: Name::<Identity, Impl, OFFSET>,
SetName: SetName::<Identity, Impl, OFFSET>,
IpVersion: IpVersion::<Identity, Impl, OFFSET>,
SetIpVersion: SetIpVersion::<Identity, Impl, OFFSET>,
Protocol: Protocol::<Identity, Impl, OFFSET>,
SetProtocol: SetProtocol::<Identity, Impl, OFFSET>,
Port: Port::<Identity, Impl, OFFSET>,
SetPort: SetPort::<Identity, Impl, OFFSET>,
Scope: Scope::<Identity, Impl, OFFSET>,
SetScope: SetScope::<Identity, Impl, OFFSET>,
RemoteAddresses: RemoteAddresses::<Identity, Impl, OFFSET>,
SetRemoteAddresses: SetRemoteAddresses::<Identity, Impl, OFFSET>,
Enabled: Enabled::<Identity, Impl, OFFSET>,
SetEnabled: SetEnabled::<Identity, Impl, OFFSET>,
BuiltIn: BuiltIn::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwOpenPort as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwOpenPorts_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Count(&self) -> ::windows::core::Result<i32>;
fn Add(&self, port: ::core::option::Option<&INetFwOpenPort>) -> ::windows::core::Result<()>;
fn Remove(&self, portnumber: i32, ipprotocol: NET_FW_IP_PROTOCOL) -> ::windows::core::Result<()>;
fn Item(&self, portnumber: i32, ipprotocol: NET_FW_IP_PROTOCOL) -> ::windows::core::Result<INetFwOpenPort>;
fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwOpenPorts {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwOpenPorts_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPorts_Impl, const OFFSET: isize>() -> INetFwOpenPorts_Vtbl {
unsafe extern "system" fn Count<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPorts_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, count: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Count() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(count, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Add<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPorts_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, port: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Add(::windows::core::from_raw_borrowed(&port)).into()
}
unsafe extern "system" fn Remove<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPorts_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, portnumber: i32, ipprotocol: NET_FW_IP_PROTOCOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Remove(::core::mem::transmute_copy(&portnumber), ::core::mem::transmute_copy(&ipprotocol)).into()
}
unsafe extern "system" fn Item<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPorts_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, portnumber: i32, ipprotocol: NET_FW_IP_PROTOCOL, openport: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Item(::core::mem::transmute_copy(&portnumber), ::core::mem::transmute_copy(&ipprotocol)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(openport, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwOpenPorts_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, newenum: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this._NewEnum() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(newenum, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Count: Count::<Identity, Impl, OFFSET>,
Add: Add::<Identity, Impl, OFFSET>,
Remove: Remove::<Identity, Impl, OFFSET>,
Item: Item::<Identity, Impl, OFFSET>,
_NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwOpenPorts as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwPolicy_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn CurrentProfile(&self) -> ::windows::core::Result<INetFwProfile>;
fn GetProfileByType(&self, profiletype: NET_FW_PROFILE_TYPE) -> ::windows::core::Result<INetFwProfile>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwPolicy {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwPolicy_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy_Impl, const OFFSET: isize>() -> INetFwPolicy_Vtbl {
unsafe extern "system" fn CurrentProfile<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profile: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CurrentProfile() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(profile, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GetProfileByType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE, profile: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GetProfileByType(::core::mem::transmute_copy(&profiletype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(profile, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
CurrentProfile: CurrentProfile::<Identity, Impl, OFFSET>,
GetProfileByType: GetProfileByType::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwPolicy as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwPolicy2_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn CurrentProfileTypes(&self) -> ::windows::core::Result<i32>;
fn get_FirewallEnabled(&self, profiletype: NET_FW_PROFILE_TYPE2) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn put_FirewallEnabled(&self, profiletype: NET_FW_PROFILE_TYPE2, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn get_ExcludedInterfaces(&self, profiletype: NET_FW_PROFILE_TYPE2) -> ::windows::core::Result<super::super::System::Com::VARIANT>;
fn put_ExcludedInterfaces(&self, profiletype: NET_FW_PROFILE_TYPE2, interfaces: &super::super::System::Com::VARIANT) -> ::windows::core::Result<()>;
fn get_BlockAllInboundTraffic(&self, profiletype: NET_FW_PROFILE_TYPE2) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn put_BlockAllInboundTraffic(&self, profiletype: NET_FW_PROFILE_TYPE2, block: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn get_NotificationsDisabled(&self, profiletype: NET_FW_PROFILE_TYPE2) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn put_NotificationsDisabled(&self, profiletype: NET_FW_PROFILE_TYPE2, disabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn get_UnicastResponsesToMulticastBroadcastDisabled(&self, profiletype: NET_FW_PROFILE_TYPE2) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn put_UnicastResponsesToMulticastBroadcastDisabled(&self, profiletype: NET_FW_PROFILE_TYPE2, disabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn Rules(&self) -> ::windows::core::Result<INetFwRules>;
fn ServiceRestriction(&self) -> ::windows::core::Result<INetFwServiceRestriction>;
fn EnableRuleGroup(&self, profiletypesbitmask: i32, group: &::windows::core::BSTR, enable: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn IsRuleGroupEnabled(&self, profiletypesbitmask: i32, group: &::windows::core::BSTR) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn RestoreLocalFirewallDefaults(&self) -> ::windows::core::Result<()>;
fn get_DefaultInboundAction(&self, profiletype: NET_FW_PROFILE_TYPE2) -> ::windows::core::Result<NET_FW_ACTION>;
fn put_DefaultInboundAction(&self, profiletype: NET_FW_PROFILE_TYPE2, action: NET_FW_ACTION) -> ::windows::core::Result<()>;
fn get_DefaultOutboundAction(&self, profiletype: NET_FW_PROFILE_TYPE2) -> ::windows::core::Result<NET_FW_ACTION>;
fn put_DefaultOutboundAction(&self, profiletype: NET_FW_PROFILE_TYPE2, action: NET_FW_ACTION) -> ::windows::core::Result<()>;
fn get_IsRuleGroupCurrentlyEnabled(&self, group: &::windows::core::BSTR) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn LocalPolicyModifyState(&self) -> ::windows::core::Result<NET_FW_MODIFY_STATE>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwPolicy2 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwPolicy2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>() -> INetFwPolicy2_Vtbl {
unsafe extern "system" fn CurrentProfileTypes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletypesbitmask: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.CurrentProfileTypes() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(profiletypesbitmask, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn get_FirewallEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, enabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_FirewallEnabled(::core::mem::transmute_copy(&profiletype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(enabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn put_FirewallEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.put_FirewallEnabled(::core::mem::transmute_copy(&profiletype), ::core::mem::transmute_copy(&enabled)).into()
}
unsafe extern "system" fn get_ExcludedInterfaces<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, interfaces: *mut super::super::System::Com::VARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_ExcludedInterfaces(::core::mem::transmute_copy(&profiletype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(interfaces, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn put_ExcludedInterfaces<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, interfaces: super::super::System::Com::VARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.put_ExcludedInterfaces(::core::mem::transmute_copy(&profiletype), ::core::mem::transmute(&interfaces)).into()
}
unsafe extern "system" fn get_BlockAllInboundTraffic<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, block: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_BlockAllInboundTraffic(::core::mem::transmute_copy(&profiletype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(block, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn put_BlockAllInboundTraffic<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, block: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.put_BlockAllInboundTraffic(::core::mem::transmute_copy(&profiletype), ::core::mem::transmute_copy(&block)).into()
}
unsafe extern "system" fn get_NotificationsDisabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, disabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_NotificationsDisabled(::core::mem::transmute_copy(&profiletype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(disabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn put_NotificationsDisabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, disabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.put_NotificationsDisabled(::core::mem::transmute_copy(&profiletype), ::core::mem::transmute_copy(&disabled)).into()
}
unsafe extern "system" fn get_UnicastResponsesToMulticastBroadcastDisabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, disabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_UnicastResponsesToMulticastBroadcastDisabled(::core::mem::transmute_copy(&profiletype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(disabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn put_UnicastResponsesToMulticastBroadcastDisabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, disabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.put_UnicastResponsesToMulticastBroadcastDisabled(::core::mem::transmute_copy(&profiletype), ::core::mem::transmute_copy(&disabled)).into()
}
unsafe extern "system" fn Rules<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, rules: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Rules() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(rules, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ServiceRestriction<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, servicerestriction: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ServiceRestriction() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(servicerestriction, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn EnableRuleGroup<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletypesbitmask: i32, group: ::std::mem::MaybeUninit<::windows::core::BSTR>, enable: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EnableRuleGroup(::core::mem::transmute_copy(&profiletypesbitmask), ::core::mem::transmute(&group), ::core::mem::transmute_copy(&enable)).into()
}
unsafe extern "system" fn IsRuleGroupEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletypesbitmask: i32, group: ::std::mem::MaybeUninit<::windows::core::BSTR>, enabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IsRuleGroupEnabled(::core::mem::transmute_copy(&profiletypesbitmask), ::core::mem::transmute(&group)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(enabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RestoreLocalFirewallDefaults<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RestoreLocalFirewallDefaults().into()
}
unsafe extern "system" fn get_DefaultInboundAction<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, action: *mut NET_FW_ACTION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_DefaultInboundAction(::core::mem::transmute_copy(&profiletype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(action, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn put_DefaultInboundAction<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, action: NET_FW_ACTION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.put_DefaultInboundAction(::core::mem::transmute_copy(&profiletype), ::core::mem::transmute_copy(&action)).into()
}
unsafe extern "system" fn get_DefaultOutboundAction<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, action: *mut NET_FW_ACTION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_DefaultOutboundAction(::core::mem::transmute_copy(&profiletype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(action, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn put_DefaultOutboundAction<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletype: NET_FW_PROFILE_TYPE2, action: NET_FW_ACTION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.put_DefaultOutboundAction(::core::mem::transmute_copy(&profiletype), ::core::mem::transmute_copy(&action)).into()
}
unsafe extern "system" fn get_IsRuleGroupCurrentlyEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, group: ::std::mem::MaybeUninit<::windows::core::BSTR>, enabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_IsRuleGroupCurrentlyEnabled(::core::mem::transmute(&group)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(enabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn LocalPolicyModifyState<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwPolicy2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, modifystate: *mut NET_FW_MODIFY_STATE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.LocalPolicyModifyState() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(modifystate, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
CurrentProfileTypes: CurrentProfileTypes::<Identity, Impl, OFFSET>,
get_FirewallEnabled: get_FirewallEnabled::<Identity, Impl, OFFSET>,
put_FirewallEnabled: put_FirewallEnabled::<Identity, Impl, OFFSET>,
get_ExcludedInterfaces: get_ExcludedInterfaces::<Identity, Impl, OFFSET>,
put_ExcludedInterfaces: put_ExcludedInterfaces::<Identity, Impl, OFFSET>,
get_BlockAllInboundTraffic: get_BlockAllInboundTraffic::<Identity, Impl, OFFSET>,
put_BlockAllInboundTraffic: put_BlockAllInboundTraffic::<Identity, Impl, OFFSET>,
get_NotificationsDisabled: get_NotificationsDisabled::<Identity, Impl, OFFSET>,
put_NotificationsDisabled: put_NotificationsDisabled::<Identity, Impl, OFFSET>,
get_UnicastResponsesToMulticastBroadcastDisabled: get_UnicastResponsesToMulticastBroadcastDisabled::<Identity, Impl, OFFSET>,
put_UnicastResponsesToMulticastBroadcastDisabled: put_UnicastResponsesToMulticastBroadcastDisabled::<Identity, Impl, OFFSET>,
Rules: Rules::<Identity, Impl, OFFSET>,
ServiceRestriction: ServiceRestriction::<Identity, Impl, OFFSET>,
EnableRuleGroup: EnableRuleGroup::<Identity, Impl, OFFSET>,
IsRuleGroupEnabled: IsRuleGroupEnabled::<Identity, Impl, OFFSET>,
RestoreLocalFirewallDefaults: RestoreLocalFirewallDefaults::<Identity, Impl, OFFSET>,
get_DefaultInboundAction: get_DefaultInboundAction::<Identity, Impl, OFFSET>,
put_DefaultInboundAction: put_DefaultInboundAction::<Identity, Impl, OFFSET>,
get_DefaultOutboundAction: get_DefaultOutboundAction::<Identity, Impl, OFFSET>,
put_DefaultOutboundAction: put_DefaultOutboundAction::<Identity, Impl, OFFSET>,
get_IsRuleGroupCurrentlyEnabled: get_IsRuleGroupCurrentlyEnabled::<Identity, Impl, OFFSET>,
LocalPolicyModifyState: LocalPolicyModifyState::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwPolicy2 as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwProduct_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn RuleCategories(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT>;
fn SetRuleCategories(&self, rulecategories: &super::super::System::Com::VARIANT) -> ::windows::core::Result<()>;
fn DisplayName(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetDisplayName(&self, displayname: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn PathToSignedProductExe(&self) -> ::windows::core::Result<::windows::core::BSTR>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwProduct {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwProduct_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProduct_Impl, const OFFSET: isize>() -> INetFwProduct_Vtbl {
unsafe extern "system" fn RuleCategories<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProduct_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, rulecategories: *mut super::super::System::Com::VARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RuleCategories() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(rulecategories, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRuleCategories<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProduct_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, rulecategories: super::super::System::Com::VARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRuleCategories(::core::mem::transmute(&rulecategories)).into()
}
unsafe extern "system" fn DisplayName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProduct_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, displayname: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.DisplayName() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(displayname, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetDisplayName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProduct_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, displayname: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDisplayName(::core::mem::transmute(&displayname)).into()
}
unsafe extern "system" fn PathToSignedProductExe<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProduct_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, path: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.PathToSignedProductExe() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(path, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
RuleCategories: RuleCategories::<Identity, Impl, OFFSET>,
SetRuleCategories: SetRuleCategories::<Identity, Impl, OFFSET>,
DisplayName: DisplayName::<Identity, Impl, OFFSET>,
SetDisplayName: SetDisplayName::<Identity, Impl, OFFSET>,
PathToSignedProductExe: PathToSignedProductExe::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwProduct as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwProducts_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Count(&self) -> ::windows::core::Result<i32>;
fn Register(&self, product: ::core::option::Option<&INetFwProduct>) -> ::windows::core::Result<::windows::core::IUnknown>;
fn Item(&self, index: i32) -> ::windows::core::Result<INetFwProduct>;
fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwProducts {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwProducts_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProducts_Impl, const OFFSET: isize>() -> INetFwProducts_Vtbl {
unsafe extern "system" fn Count<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProducts_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, count: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Count() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(count, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Register<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProducts_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, product: *mut ::core::ffi::c_void, registration: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Register(::windows::core::from_raw_borrowed(&product)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(registration, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Item<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProducts_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: i32, product: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Item(::core::mem::transmute_copy(&index)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(product, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProducts_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, newenum: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this._NewEnum() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(newenum, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Count: Count::<Identity, Impl, OFFSET>,
Register: Register::<Identity, Impl, OFFSET>,
Item: Item::<Identity, Impl, OFFSET>,
_NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwProducts as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwProfile_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Type(&self) -> ::windows::core::Result<NET_FW_PROFILE_TYPE>;
fn FirewallEnabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetFirewallEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn ExceptionsNotAllowed(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetExceptionsNotAllowed(&self, notallowed: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn NotificationsDisabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetNotificationsDisabled(&self, disabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn UnicastResponsesToMulticastBroadcastDisabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetUnicastResponsesToMulticastBroadcastDisabled(&self, disabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn RemoteAdminSettings(&self) -> ::windows::core::Result<INetFwRemoteAdminSettings>;
fn IcmpSettings(&self) -> ::windows::core::Result<INetFwIcmpSettings>;
fn GloballyOpenPorts(&self) -> ::windows::core::Result<INetFwOpenPorts>;
fn Services(&self) -> ::windows::core::Result<INetFwServices>;
fn AuthorizedApplications(&self) -> ::windows::core::Result<INetFwAuthorizedApplications>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwProfile {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwProfile_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>() -> INetFwProfile_Vtbl {
unsafe extern "system" fn Type<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, r#type: *mut NET_FW_PROFILE_TYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Type() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(r#type, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn FirewallEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.FirewallEnabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(enabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetFirewallEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetFirewallEnabled(::core::mem::transmute_copy(&enabled)).into()
}
unsafe extern "system" fn ExceptionsNotAllowed<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, notallowed: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ExceptionsNotAllowed() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(notallowed, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetExceptionsNotAllowed<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, notallowed: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetExceptionsNotAllowed(::core::mem::transmute_copy(&notallowed)).into()
}
unsafe extern "system" fn NotificationsDisabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, disabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.NotificationsDisabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(disabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetNotificationsDisabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, disabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetNotificationsDisabled(::core::mem::transmute_copy(&disabled)).into()
}
unsafe extern "system" fn UnicastResponsesToMulticastBroadcastDisabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, disabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.UnicastResponsesToMulticastBroadcastDisabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(disabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetUnicastResponsesToMulticastBroadcastDisabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, disabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetUnicastResponsesToMulticastBroadcastDisabled(::core::mem::transmute_copy(&disabled)).into()
}
unsafe extern "system" fn RemoteAdminSettings<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, remoteadminsettings: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RemoteAdminSettings() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(remoteadminsettings, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IcmpSettings<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, icmpsettings: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IcmpSettings() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(icmpsettings, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn GloballyOpenPorts<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, openports: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GloballyOpenPorts() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(openports, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Services<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, services: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Services() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(services, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AuthorizedApplications<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwProfile_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, apps: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AuthorizedApplications() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(apps, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Type: Type::<Identity, Impl, OFFSET>,
FirewallEnabled: FirewallEnabled::<Identity, Impl, OFFSET>,
SetFirewallEnabled: SetFirewallEnabled::<Identity, Impl, OFFSET>,
ExceptionsNotAllowed: ExceptionsNotAllowed::<Identity, Impl, OFFSET>,
SetExceptionsNotAllowed: SetExceptionsNotAllowed::<Identity, Impl, OFFSET>,
NotificationsDisabled: NotificationsDisabled::<Identity, Impl, OFFSET>,
SetNotificationsDisabled: SetNotificationsDisabled::<Identity, Impl, OFFSET>,
UnicastResponsesToMulticastBroadcastDisabled: UnicastResponsesToMulticastBroadcastDisabled::<Identity, Impl, OFFSET>,
SetUnicastResponsesToMulticastBroadcastDisabled: SetUnicastResponsesToMulticastBroadcastDisabled::<Identity, Impl, OFFSET>,
RemoteAdminSettings: RemoteAdminSettings::<Identity, Impl, OFFSET>,
IcmpSettings: IcmpSettings::<Identity, Impl, OFFSET>,
GloballyOpenPorts: GloballyOpenPorts::<Identity, Impl, OFFSET>,
Services: Services::<Identity, Impl, OFFSET>,
AuthorizedApplications: AuthorizedApplications::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwProfile as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwRemoteAdminSettings_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn IpVersion(&self) -> ::windows::core::Result<NET_FW_IP_VERSION>;
fn SetIpVersion(&self, ipversion: NET_FW_IP_VERSION) -> ::windows::core::Result<()>;
fn Scope(&self) -> ::windows::core::Result<NET_FW_SCOPE>;
fn SetScope(&self, scope: NET_FW_SCOPE) -> ::windows::core::Result<()>;
fn RemoteAddresses(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetRemoteAddresses(&self, remoteaddrs: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Enabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwRemoteAdminSettings {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwRemoteAdminSettings_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRemoteAdminSettings_Impl, const OFFSET: isize>() -> INetFwRemoteAdminSettings_Vtbl {
unsafe extern "system" fn IpVersion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRemoteAdminSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ipversion: *mut NET_FW_IP_VERSION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IpVersion() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ipversion, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetIpVersion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRemoteAdminSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ipversion: NET_FW_IP_VERSION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIpVersion(::core::mem::transmute_copy(&ipversion)).into()
}
unsafe extern "system" fn Scope<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRemoteAdminSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, scope: *mut NET_FW_SCOPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Scope() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(scope, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetScope<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRemoteAdminSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, scope: NET_FW_SCOPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetScope(::core::mem::transmute_copy(&scope)).into()
}
unsafe extern "system" fn RemoteAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRemoteAdminSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, remoteaddrs: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RemoteAddresses() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(remoteaddrs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRemoteAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRemoteAdminSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, remoteaddrs: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRemoteAddresses(::core::mem::transmute(&remoteaddrs)).into()
}
unsafe extern "system" fn Enabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRemoteAdminSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Enabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(enabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRemoteAdminSettings_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetEnabled(::core::mem::transmute_copy(&enabled)).into()
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
IpVersion: IpVersion::<Identity, Impl, OFFSET>,
SetIpVersion: SetIpVersion::<Identity, Impl, OFFSET>,
Scope: Scope::<Identity, Impl, OFFSET>,
SetScope: SetScope::<Identity, Impl, OFFSET>,
RemoteAddresses: RemoteAddresses::<Identity, Impl, OFFSET>,
SetRemoteAddresses: SetRemoteAddresses::<Identity, Impl, OFFSET>,
Enabled: Enabled::<Identity, Impl, OFFSET>,
SetEnabled: SetEnabled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwRemoteAdminSettings as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwRule_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Name(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetName(&self, name: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Description(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetDescription(&self, desc: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn ApplicationName(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetApplicationName(&self, imagefilename: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn ServiceName(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetServiceName(&self, servicename: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Protocol(&self) -> ::windows::core::Result<i32>;
fn SetProtocol(&self, protocol: i32) -> ::windows::core::Result<()>;
fn LocalPorts(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetLocalPorts(&self, portnumbers: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn RemotePorts(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetRemotePorts(&self, portnumbers: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn LocalAddresses(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetLocalAddresses(&self, localaddrs: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn RemoteAddresses(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetRemoteAddresses(&self, remoteaddrs: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn IcmpTypesAndCodes(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetIcmpTypesAndCodes(&self, icmptypesandcodes: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Direction(&self) -> ::windows::core::Result<NET_FW_RULE_DIRECTION>;
fn SetDirection(&self, dir: NET_FW_RULE_DIRECTION) -> ::windows::core::Result<()>;
fn Interfaces(&self) -> ::windows::core::Result<super::super::System::Com::VARIANT>;
fn SetInterfaces(&self, interfaces: &super::super::System::Com::VARIANT) -> ::windows::core::Result<()>;
fn InterfaceTypes(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetInterfaceTypes(&self, interfacetypes: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Enabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn Grouping(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetGrouping(&self, context: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Profiles(&self) -> ::windows::core::Result<i32>;
fn SetProfiles(&self, profiletypesbitmask: i32) -> ::windows::core::Result<()>;
fn EdgeTraversal(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetEdgeTraversal(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn Action(&self) -> ::windows::core::Result<NET_FW_ACTION>;
fn SetAction(&self, action: NET_FW_ACTION) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwRule {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwRule_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>() -> INetFwRule_Vtbl {
unsafe extern "system" fn Name<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, name: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Name() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(name, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, name: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetName(::core::mem::transmute(&name)).into()
}
unsafe extern "system" fn Description<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, desc: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Description() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(desc, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetDescription<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, desc: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDescription(::core::mem::transmute(&desc)).into()
}
unsafe extern "system" fn ApplicationName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, imagefilename: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ApplicationName() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(imagefilename, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetApplicationName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, imagefilename: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetApplicationName(::core::mem::transmute(&imagefilename)).into()
}
unsafe extern "system" fn ServiceName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, servicename: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ServiceName() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(servicename, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetServiceName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, servicename: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetServiceName(::core::mem::transmute(&servicename)).into()
}
unsafe extern "system" fn Protocol<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, protocol: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Protocol() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(protocol, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetProtocol<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, protocol: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProtocol(::core::mem::transmute_copy(&protocol)).into()
}
unsafe extern "system" fn LocalPorts<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, portnumbers: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.LocalPorts() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(portnumbers, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetLocalPorts<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, portnumbers: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLocalPorts(::core::mem::transmute(&portnumbers)).into()
}
unsafe extern "system" fn RemotePorts<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, portnumbers: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RemotePorts() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(portnumbers, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRemotePorts<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, portnumbers: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRemotePorts(::core::mem::transmute(&portnumbers)).into()
}
unsafe extern "system" fn LocalAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, localaddrs: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.LocalAddresses() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(localaddrs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetLocalAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, localaddrs: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLocalAddresses(::core::mem::transmute(&localaddrs)).into()
}
unsafe extern "system" fn RemoteAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, remoteaddrs: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RemoteAddresses() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(remoteaddrs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRemoteAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, remoteaddrs: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRemoteAddresses(::core::mem::transmute(&remoteaddrs)).into()
}
unsafe extern "system" fn IcmpTypesAndCodes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, icmptypesandcodes: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IcmpTypesAndCodes() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(icmptypesandcodes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetIcmpTypesAndCodes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, icmptypesandcodes: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIcmpTypesAndCodes(::core::mem::transmute(&icmptypesandcodes)).into()
}
unsafe extern "system" fn Direction<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dir: *mut NET_FW_RULE_DIRECTION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Direction() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(dir, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetDirection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, dir: NET_FW_RULE_DIRECTION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetDirection(::core::mem::transmute_copy(&dir)).into()
}
unsafe extern "system" fn Interfaces<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, interfaces: *mut super::super::System::Com::VARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Interfaces() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(interfaces, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetInterfaces<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, interfaces: super::super::System::Com::VARIANT) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetInterfaces(::core::mem::transmute(&interfaces)).into()
}
unsafe extern "system" fn InterfaceTypes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, interfacetypes: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.InterfaceTypes() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(interfacetypes, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetInterfaceTypes<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, interfacetypes: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetInterfaceTypes(::core::mem::transmute(&interfacetypes)).into()
}
unsafe extern "system" fn Enabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Enabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(enabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetEnabled(::core::mem::transmute_copy(&enabled)).into()
}
unsafe extern "system" fn Grouping<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, context: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Grouping() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(context, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetGrouping<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, context: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetGrouping(::core::mem::transmute(&context)).into()
}
unsafe extern "system" fn Profiles<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletypesbitmask: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Profiles() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(profiletypesbitmask, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetProfiles<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, profiletypesbitmask: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetProfiles(::core::mem::transmute_copy(&profiletypesbitmask)).into()
}
unsafe extern "system" fn EdgeTraversal<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EdgeTraversal() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(enabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetEdgeTraversal<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetEdgeTraversal(::core::mem::transmute_copy(&enabled)).into()
}
unsafe extern "system" fn Action<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, action: *mut NET_FW_ACTION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Action() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(action, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAction<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, action: NET_FW_ACTION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetAction(::core::mem::transmute_copy(&action)).into()
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Name: Name::<Identity, Impl, OFFSET>,
SetName: SetName::<Identity, Impl, OFFSET>,
Description: Description::<Identity, Impl, OFFSET>,
SetDescription: SetDescription::<Identity, Impl, OFFSET>,
ApplicationName: ApplicationName::<Identity, Impl, OFFSET>,
SetApplicationName: SetApplicationName::<Identity, Impl, OFFSET>,
ServiceName: ServiceName::<Identity, Impl, OFFSET>,
SetServiceName: SetServiceName::<Identity, Impl, OFFSET>,
Protocol: Protocol::<Identity, Impl, OFFSET>,
SetProtocol: SetProtocol::<Identity, Impl, OFFSET>,
LocalPorts: LocalPorts::<Identity, Impl, OFFSET>,
SetLocalPorts: SetLocalPorts::<Identity, Impl, OFFSET>,
RemotePorts: RemotePorts::<Identity, Impl, OFFSET>,
SetRemotePorts: SetRemotePorts::<Identity, Impl, OFFSET>,
LocalAddresses: LocalAddresses::<Identity, Impl, OFFSET>,
SetLocalAddresses: SetLocalAddresses::<Identity, Impl, OFFSET>,
RemoteAddresses: RemoteAddresses::<Identity, Impl, OFFSET>,
SetRemoteAddresses: SetRemoteAddresses::<Identity, Impl, OFFSET>,
IcmpTypesAndCodes: IcmpTypesAndCodes::<Identity, Impl, OFFSET>,
SetIcmpTypesAndCodes: SetIcmpTypesAndCodes::<Identity, Impl, OFFSET>,
Direction: Direction::<Identity, Impl, OFFSET>,
SetDirection: SetDirection::<Identity, Impl, OFFSET>,
Interfaces: Interfaces::<Identity, Impl, OFFSET>,
SetInterfaces: SetInterfaces::<Identity, Impl, OFFSET>,
InterfaceTypes: InterfaceTypes::<Identity, Impl, OFFSET>,
SetInterfaceTypes: SetInterfaceTypes::<Identity, Impl, OFFSET>,
Enabled: Enabled::<Identity, Impl, OFFSET>,
SetEnabled: SetEnabled::<Identity, Impl, OFFSET>,
Grouping: Grouping::<Identity, Impl, OFFSET>,
SetGrouping: SetGrouping::<Identity, Impl, OFFSET>,
Profiles: Profiles::<Identity, Impl, OFFSET>,
SetProfiles: SetProfiles::<Identity, Impl, OFFSET>,
EdgeTraversal: EdgeTraversal::<Identity, Impl, OFFSET>,
SetEdgeTraversal: SetEdgeTraversal::<Identity, Impl, OFFSET>,
Action: Action::<Identity, Impl, OFFSET>,
SetAction: SetAction::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwRule as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwRule2_Impl: Sized + INetFwRule_Impl {
fn EdgeTraversalOptions(&self) -> ::windows::core::Result<i32>;
fn SetEdgeTraversalOptions(&self, loptions: i32) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwRule2 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwRule2_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule2_Impl, const OFFSET: isize>() -> INetFwRule2_Vtbl {
unsafe extern "system" fn EdgeTraversalOptions<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, loptions: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EdgeTraversalOptions() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(loptions, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetEdgeTraversalOptions<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, loptions: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetEdgeTraversalOptions(::core::mem::transmute_copy(&loptions)).into()
}
Self {
base__: INetFwRule_Vtbl::new::<Identity, Impl, OFFSET>(),
EdgeTraversalOptions: EdgeTraversalOptions::<Identity, Impl, OFFSET>,
SetEdgeTraversalOptions: SetEdgeTraversalOptions::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwRule2 as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID || iid == &<INetFwRule as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwRule3_Impl: Sized + INetFwRule2_Impl {
fn LocalAppPackageId(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetLocalAppPackageId(&self, wszpackageid: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn LocalUserOwner(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetLocalUserOwner(&self, wszuserowner: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn LocalUserAuthorizedList(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetLocalUserAuthorizedList(&self, wszuserauthlist: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn RemoteUserAuthorizedList(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetRemoteUserAuthorizedList(&self, wszuserauthlist: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn RemoteMachineAuthorizedList(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetRemoteMachineAuthorizedList(&self, wszuserauthlist: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn SecureFlags(&self) -> ::windows::core::Result<i32>;
fn SetSecureFlags(&self, loptions: i32) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwRule3 {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwRule3_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>() -> INetFwRule3_Vtbl {
unsafe extern "system" fn LocalAppPackageId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wszpackageid: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.LocalAppPackageId() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(wszpackageid, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetLocalAppPackageId<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wszpackageid: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLocalAppPackageId(::core::mem::transmute(&wszpackageid)).into()
}
unsafe extern "system" fn LocalUserOwner<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wszuserowner: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.LocalUserOwner() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(wszuserowner, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetLocalUserOwner<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wszuserowner: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLocalUserOwner(::core::mem::transmute(&wszuserowner)).into()
}
unsafe extern "system" fn LocalUserAuthorizedList<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wszuserauthlist: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.LocalUserAuthorizedList() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(wszuserauthlist, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetLocalUserAuthorizedList<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wszuserauthlist: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetLocalUserAuthorizedList(::core::mem::transmute(&wszuserauthlist)).into()
}
unsafe extern "system" fn RemoteUserAuthorizedList<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wszuserauthlist: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RemoteUserAuthorizedList() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(wszuserauthlist, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRemoteUserAuthorizedList<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wszuserauthlist: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRemoteUserAuthorizedList(::core::mem::transmute(&wszuserauthlist)).into()
}
unsafe extern "system" fn RemoteMachineAuthorizedList<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wszuserauthlist: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RemoteMachineAuthorizedList() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(wszuserauthlist, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRemoteMachineAuthorizedList<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, wszuserauthlist: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRemoteMachineAuthorizedList(::core::mem::transmute(&wszuserauthlist)).into()
}
unsafe extern "system" fn SecureFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, loptions: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.SecureFlags() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(loptions, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetSecureFlags<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRule3_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, loptions: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetSecureFlags(::core::mem::transmute_copy(&loptions)).into()
}
Self {
base__: INetFwRule2_Vtbl::new::<Identity, Impl, OFFSET>(),
LocalAppPackageId: LocalAppPackageId::<Identity, Impl, OFFSET>,
SetLocalAppPackageId: SetLocalAppPackageId::<Identity, Impl, OFFSET>,
LocalUserOwner: LocalUserOwner::<Identity, Impl, OFFSET>,
SetLocalUserOwner: SetLocalUserOwner::<Identity, Impl, OFFSET>,
LocalUserAuthorizedList: LocalUserAuthorizedList::<Identity, Impl, OFFSET>,
SetLocalUserAuthorizedList: SetLocalUserAuthorizedList::<Identity, Impl, OFFSET>,
RemoteUserAuthorizedList: RemoteUserAuthorizedList::<Identity, Impl, OFFSET>,
SetRemoteUserAuthorizedList: SetRemoteUserAuthorizedList::<Identity, Impl, OFFSET>,
RemoteMachineAuthorizedList: RemoteMachineAuthorizedList::<Identity, Impl, OFFSET>,
SetRemoteMachineAuthorizedList: SetRemoteMachineAuthorizedList::<Identity, Impl, OFFSET>,
SecureFlags: SecureFlags::<Identity, Impl, OFFSET>,
SetSecureFlags: SetSecureFlags::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwRule3 as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID || iid == &<INetFwRule as ::windows::core::ComInterface>::IID || iid == &<INetFwRule2 as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwRules_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Count(&self) -> ::windows::core::Result<i32>;
fn Add(&self, rule: ::core::option::Option<&INetFwRule>) -> ::windows::core::Result<()>;
fn Remove(&self, name: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Item(&self, name: &::windows::core::BSTR) -> ::windows::core::Result<INetFwRule>;
fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwRules {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwRules_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRules_Impl, const OFFSET: isize>() -> INetFwRules_Vtbl {
unsafe extern "system" fn Count<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRules_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, count: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Count() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(count, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Add<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRules_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, rule: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Add(::windows::core::from_raw_borrowed(&rule)).into()
}
unsafe extern "system" fn Remove<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRules_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, name: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Remove(::core::mem::transmute(&name)).into()
}
unsafe extern "system" fn Item<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRules_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, name: ::std::mem::MaybeUninit<::windows::core::BSTR>, rule: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Item(::core::mem::transmute(&name)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(rule, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwRules_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, newenum: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this._NewEnum() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(newenum, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Count: Count::<Identity, Impl, OFFSET>,
Add: Add::<Identity, Impl, OFFSET>,
Remove: Remove::<Identity, Impl, OFFSET>,
Item: Item::<Identity, Impl, OFFSET>,
_NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwRules as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwService_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Name(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn Type(&self) -> ::windows::core::Result<NET_FW_SERVICE_TYPE>;
fn Customized(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn IpVersion(&self) -> ::windows::core::Result<NET_FW_IP_VERSION>;
fn SetIpVersion(&self, ipversion: NET_FW_IP_VERSION) -> ::windows::core::Result<()>;
fn Scope(&self) -> ::windows::core::Result<NET_FW_SCOPE>;
fn SetScope(&self, scope: NET_FW_SCOPE) -> ::windows::core::Result<()>;
fn RemoteAddresses(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn SetRemoteAddresses(&self, remoteaddrs: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Enabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SetEnabled(&self, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn GloballyOpenPorts(&self) -> ::windows::core::Result<INetFwOpenPorts>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwService {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwService_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>() -> INetFwService_Vtbl {
unsafe extern "system" fn Name<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, name: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Name() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(name, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Type<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, r#type: *mut NET_FW_SERVICE_TYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Type() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(r#type, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Customized<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, customized: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Customized() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(customized, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IpVersion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ipversion: *mut NET_FW_IP_VERSION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IpVersion() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ipversion, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetIpVersion<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ipversion: NET_FW_IP_VERSION) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetIpVersion(::core::mem::transmute_copy(&ipversion)).into()
}
unsafe extern "system" fn Scope<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, scope: *mut NET_FW_SCOPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Scope() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(scope, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetScope<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, scope: NET_FW_SCOPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetScope(::core::mem::transmute_copy(&scope)).into()
}
unsafe extern "system" fn RemoteAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, remoteaddrs: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.RemoteAddresses() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(remoteaddrs, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetRemoteAddresses<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, remoteaddrs: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetRemoteAddresses(::core::mem::transmute(&remoteaddrs)).into()
}
unsafe extern "system" fn Enabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Enabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(enabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SetEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, enabled: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.SetEnabled(::core::mem::transmute_copy(&enabled)).into()
}
unsafe extern "system" fn GloballyOpenPorts<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwService_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, openports: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.GloballyOpenPorts() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(openports, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Name: Name::<Identity, Impl, OFFSET>,
Type: Type::<Identity, Impl, OFFSET>,
Customized: Customized::<Identity, Impl, OFFSET>,
IpVersion: IpVersion::<Identity, Impl, OFFSET>,
SetIpVersion: SetIpVersion::<Identity, Impl, OFFSET>,
Scope: Scope::<Identity, Impl, OFFSET>,
SetScope: SetScope::<Identity, Impl, OFFSET>,
RemoteAddresses: RemoteAddresses::<Identity, Impl, OFFSET>,
SetRemoteAddresses: SetRemoteAddresses::<Identity, Impl, OFFSET>,
Enabled: Enabled::<Identity, Impl, OFFSET>,
SetEnabled: SetEnabled::<Identity, Impl, OFFSET>,
GloballyOpenPorts: GloballyOpenPorts::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwService as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwServiceRestriction_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn RestrictService(&self, servicename: &::windows::core::BSTR, appname: &::windows::core::BSTR, restrictservice: super::super::Foundation::VARIANT_BOOL, servicesidrestricted: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn ServiceRestricted(&self, servicename: &::windows::core::BSTR, appname: &::windows::core::BSTR) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn Rules(&self) -> ::windows::core::Result<INetFwRules>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwServiceRestriction {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwServiceRestriction_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwServiceRestriction_Impl, const OFFSET: isize>() -> INetFwServiceRestriction_Vtbl {
unsafe extern "system" fn RestrictService<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwServiceRestriction_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, servicename: ::std::mem::MaybeUninit<::windows::core::BSTR>, appname: ::std::mem::MaybeUninit<::windows::core::BSTR>, restrictservice: super::super::Foundation::VARIANT_BOOL, servicesidrestricted: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RestrictService(::core::mem::transmute(&servicename), ::core::mem::transmute(&appname), ::core::mem::transmute_copy(&restrictservice), ::core::mem::transmute_copy(&servicesidrestricted)).into()
}
unsafe extern "system" fn ServiceRestricted<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwServiceRestriction_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, servicename: ::std::mem::MaybeUninit<::windows::core::BSTR>, appname: ::std::mem::MaybeUninit<::windows::core::BSTR>, servicerestricted: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ServiceRestricted(::core::mem::transmute(&servicename), ::core::mem::transmute(&appname)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(servicerestricted, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Rules<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwServiceRestriction_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, rules: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Rules() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(rules, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
RestrictService: RestrictService::<Identity, Impl, OFFSET>,
ServiceRestricted: ServiceRestricted::<Identity, Impl, OFFSET>,
Rules: Rules::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwServiceRestriction as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetFwServices_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Count(&self) -> ::windows::core::Result<i32>;
fn Item(&self, svctype: NET_FW_SERVICE_TYPE) -> ::windows::core::Result<INetFwService>;
fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetFwServices {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetFwServices_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwServices_Impl, const OFFSET: isize>() -> INetFwServices_Vtbl {
unsafe extern "system" fn Count<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwServices_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, count: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Count() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(count, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Item<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwServices_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, svctype: NET_FW_SERVICE_TYPE, service: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Item(::core::mem::transmute_copy(&svctype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(service, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetFwServices_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, newenum: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this._NewEnum() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(newenum, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Count: Count::<Identity, Impl, OFFSET>,
Item: Item::<Identity, Impl, OFFSET>,
_NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetFwServices as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetSharingConfiguration_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn SharingEnabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn SharingConnectionType(&self) -> ::windows::core::Result<SHARINGCONNECTIONTYPE>;
fn DisableSharing(&self) -> ::windows::core::Result<()>;
fn EnableSharing(&self, r#type: SHARINGCONNECTIONTYPE) -> ::windows::core::Result<()>;
fn InternetFirewallEnabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn DisableInternetFirewall(&self) -> ::windows::core::Result<()>;
fn EnableInternetFirewall(&self) -> ::windows::core::Result<()>;
fn get_EnumPortMappings(&self, flags: SHARINGCONNECTION_ENUM_FLAGS) -> ::windows::core::Result<INetSharingPortMappingCollection>;
fn AddPortMapping(&self, bstrname: &::windows::core::BSTR, ucipprotocol: u8, usexternalport: u16, usinternalport: u16, dwoptions: u32, bstrtargetnameoripaddress: &::windows::core::BSTR, etargettype: ICS_TARGETTYPE) -> ::windows::core::Result<INetSharingPortMapping>;
fn RemovePortMapping(&self, pmapping: ::core::option::Option<&INetSharingPortMapping>) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetSharingConfiguration {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetSharingConfiguration_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingConfiguration_Impl, const OFFSET: isize>() -> INetSharingConfiguration_Vtbl {
unsafe extern "system" fn SharingEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingConfiguration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.SharingEnabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbenabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn SharingConnectionType<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingConfiguration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ptype: *mut SHARINGCONNECTIONTYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.SharingConnectionType() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ptype, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn DisableSharing<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingConfiguration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DisableSharing().into()
}
unsafe extern "system" fn EnableSharing<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingConfiguration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, r#type: SHARINGCONNECTIONTYPE) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EnableSharing(::core::mem::transmute_copy(&r#type)).into()
}
unsafe extern "system" fn InternetFirewallEnabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingConfiguration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbenabled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.InternetFirewallEnabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbenabled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn DisableInternetFirewall<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingConfiguration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.DisableInternetFirewall().into()
}
unsafe extern "system" fn EnableInternetFirewall<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingConfiguration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EnableInternetFirewall().into()
}
unsafe extern "system" fn get_EnumPortMappings<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingConfiguration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, flags: SHARINGCONNECTION_ENUM_FLAGS, ppcoll: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_EnumPortMappings(::core::mem::transmute_copy(&flags)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppcoll, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn AddPortMapping<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingConfiguration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrname: ::std::mem::MaybeUninit<::windows::core::BSTR>, ucipprotocol: u8, usexternalport: u16, usinternalport: u16, dwoptions: u32, bstrtargetnameoripaddress: ::std::mem::MaybeUninit<::windows::core::BSTR>, etargettype: ICS_TARGETTYPE, ppmapping: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.AddPortMapping(::core::mem::transmute(&bstrname), ::core::mem::transmute_copy(&ucipprotocol), ::core::mem::transmute_copy(&usexternalport), ::core::mem::transmute_copy(&usinternalport), ::core::mem::transmute_copy(&dwoptions), ::core::mem::transmute(&bstrtargetnameoripaddress), ::core::mem::transmute_copy(&etargettype)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppmapping, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn RemovePortMapping<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingConfiguration_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pmapping: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.RemovePortMapping(::windows::core::from_raw_borrowed(&pmapping)).into()
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
SharingEnabled: SharingEnabled::<Identity, Impl, OFFSET>,
SharingConnectionType: SharingConnectionType::<Identity, Impl, OFFSET>,
DisableSharing: DisableSharing::<Identity, Impl, OFFSET>,
EnableSharing: EnableSharing::<Identity, Impl, OFFSET>,
InternetFirewallEnabled: InternetFirewallEnabled::<Identity, Impl, OFFSET>,
DisableInternetFirewall: DisableInternetFirewall::<Identity, Impl, OFFSET>,
EnableInternetFirewall: EnableInternetFirewall::<Identity, Impl, OFFSET>,
get_EnumPortMappings: get_EnumPortMappings::<Identity, Impl, OFFSET>,
AddPortMapping: AddPortMapping::<Identity, Impl, OFFSET>,
RemovePortMapping: RemovePortMapping::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetSharingConfiguration as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetSharingEveryConnectionCollection_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
fn Count(&self) -> ::windows::core::Result<i32>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetSharingEveryConnectionCollection {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetSharingEveryConnectionCollection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingEveryConnectionCollection_Impl, const OFFSET: isize>() -> INetSharingEveryConnectionCollection_Vtbl {
unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingEveryConnectionCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this._NewEnum() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Count<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingEveryConnectionCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Count() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
_NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
Count: Count::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetSharingEveryConnectionCollection as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetSharingManager_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn SharingInstalled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn get_EnumPublicConnections(&self, flags: SHARINGCONNECTION_ENUM_FLAGS) -> ::windows::core::Result<INetSharingPublicConnectionCollection>;
fn get_EnumPrivateConnections(&self, flags: SHARINGCONNECTION_ENUM_FLAGS) -> ::windows::core::Result<INetSharingPrivateConnectionCollection>;
fn get_INetSharingConfigurationForINetConnection(&self, pnetconnection: ::core::option::Option<&INetConnection>) -> ::windows::core::Result<INetSharingConfiguration>;
fn EnumEveryConnection(&self) -> ::windows::core::Result<INetSharingEveryConnectionCollection>;
fn get_NetConnectionProps(&self, pnetconnection: ::core::option::Option<&INetConnection>) -> ::windows::core::Result<INetConnectionProps>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetSharingManager {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetSharingManager_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingManager_Impl, const OFFSET: isize>() -> INetSharingManager_Vtbl {
unsafe extern "system" fn SharingInstalled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbinstalled: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.SharingInstalled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbinstalled, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn get_EnumPublicConnections<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, flags: SHARINGCONNECTION_ENUM_FLAGS, ppcoll: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_EnumPublicConnections(::core::mem::transmute_copy(&flags)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppcoll, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn get_EnumPrivateConnections<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, flags: SHARINGCONNECTION_ENUM_FLAGS, ppcoll: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_EnumPrivateConnections(::core::mem::transmute_copy(&flags)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppcoll, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn get_INetSharingConfigurationForINetConnection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pnetconnection: *mut ::core::ffi::c_void, ppnetsharingconfiguration: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_INetSharingConfigurationForINetConnection(::windows::core::from_raw_borrowed(&pnetconnection)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppnetsharingconfiguration, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn EnumEveryConnection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppcoll: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.EnumEveryConnection() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppcoll, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn get_NetConnectionProps<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingManager_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pnetconnection: *mut ::core::ffi::c_void, ppprops: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_NetConnectionProps(::windows::core::from_raw_borrowed(&pnetconnection)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppprops, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
SharingInstalled: SharingInstalled::<Identity, Impl, OFFSET>,
get_EnumPublicConnections: get_EnumPublicConnections::<Identity, Impl, OFFSET>,
get_EnumPrivateConnections: get_EnumPrivateConnections::<Identity, Impl, OFFSET>,
get_INetSharingConfigurationForINetConnection: get_INetSharingConfigurationForINetConnection::<Identity, Impl, OFFSET>,
EnumEveryConnection: EnumEveryConnection::<Identity, Impl, OFFSET>,
get_NetConnectionProps: get_NetConnectionProps::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetSharingManager as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetSharingPortMapping_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Disable(&self) -> ::windows::core::Result<()>;
fn Enable(&self) -> ::windows::core::Result<()>;
fn Properties(&self) -> ::windows::core::Result<INetSharingPortMappingProps>;
fn Delete(&self) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetSharingPortMapping {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetSharingPortMapping_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMapping_Impl, const OFFSET: isize>() -> INetSharingPortMapping_Vtbl {
unsafe extern "system" fn Disable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Disable().into()
}
unsafe extern "system" fn Enable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Enable().into()
}
unsafe extern "system" fn Properties<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppnspmp: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Properties() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppnspmp, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Delete<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Delete().into()
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Disable: Disable::<Identity, Impl, OFFSET>,
Enable: Enable::<Identity, Impl, OFFSET>,
Properties: Properties::<Identity, Impl, OFFSET>,
Delete: Delete::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetSharingPortMapping as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetSharingPortMappingCollection_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
fn Count(&self) -> ::windows::core::Result<i32>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetSharingPortMappingCollection {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetSharingPortMappingCollection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMappingCollection_Impl, const OFFSET: isize>() -> INetSharingPortMappingCollection_Vtbl {
unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMappingCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this._NewEnum() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Count<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMappingCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Count() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
_NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
Count: Count::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetSharingPortMappingCollection as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetSharingPortMappingProps_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn Name(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn IPProtocol(&self) -> ::windows::core::Result<u8>;
fn ExternalPort(&self) -> ::windows::core::Result<i32>;
fn InternalPort(&self) -> ::windows::core::Result<i32>;
fn Options(&self) -> ::windows::core::Result<i32>;
fn TargetName(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn TargetIPAddress(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn Enabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetSharingPortMappingProps {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetSharingPortMappingProps_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMappingProps_Impl, const OFFSET: isize>() -> INetSharingPortMappingProps_Vtbl {
unsafe extern "system" fn Name<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMappingProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbstrname: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Name() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbstrname, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn IPProtocol<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMappingProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pucipprot: *mut u8) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.IPProtocol() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pucipprot, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ExternalPort<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMappingProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pusport: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ExternalPort() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pusport, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn InternalPort<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMappingProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pusport: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.InternalPort() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pusport, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Options<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMappingProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pdwoptions: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Options() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pdwoptions, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn TargetName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMappingProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbstrtargetname: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.TargetName() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbstrtargetname, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn TargetIPAddress<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMappingProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbstrtargetipaddress: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.TargetIPAddress() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbstrtargetipaddress, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Enabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPortMappingProps_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pbool: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Enabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pbool, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
Name: Name::<Identity, Impl, OFFSET>,
IPProtocol: IPProtocol::<Identity, Impl, OFFSET>,
ExternalPort: ExternalPort::<Identity, Impl, OFFSET>,
InternalPort: InternalPort::<Identity, Impl, OFFSET>,
Options: Options::<Identity, Impl, OFFSET>,
TargetName: TargetName::<Identity, Impl, OFFSET>,
TargetIPAddress: TargetIPAddress::<Identity, Impl, OFFSET>,
Enabled: Enabled::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetSharingPortMappingProps as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetSharingPrivateConnectionCollection_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
fn Count(&self) -> ::windows::core::Result<i32>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetSharingPrivateConnectionCollection {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetSharingPrivateConnectionCollection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPrivateConnectionCollection_Impl, const OFFSET: isize>() -> INetSharingPrivateConnectionCollection_Vtbl {
unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPrivateConnectionCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this._NewEnum() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Count<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPrivateConnectionCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Count() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
_NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
Count: Count::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetSharingPrivateConnectionCollection as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait INetSharingPublicConnectionCollection_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
fn Count(&self) -> ::windows::core::Result<i32>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for INetSharingPublicConnectionCollection {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl INetSharingPublicConnectionCollection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPublicConnectionCollection_Impl, const OFFSET: isize>() -> INetSharingPublicConnectionCollection_Vtbl {
unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPublicConnectionCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this._NewEnum() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Count<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: INetSharingPublicConnectionCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Count() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
_NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
Count: Count::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<INetSharingPublicConnectionCollection as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait IStaticPortMapping_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn ExternalIPAddress(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn ExternalPort(&self) -> ::windows::core::Result<i32>;
fn InternalPort(&self) -> ::windows::core::Result<i32>;
fn Protocol(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn InternalClient(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn Enabled(&self) -> ::windows::core::Result<super::super::Foundation::VARIANT_BOOL>;
fn Description(&self) -> ::windows::core::Result<::windows::core::BSTR>;
fn EditInternalClient(&self, bstrinternalclient: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Enable(&self, vb: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::Result<()>;
fn EditDescription(&self, bstrdescription: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn EditInternalPort(&self, linternalport: i32) -> ::windows::core::Result<()>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for IStaticPortMapping {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl IStaticPortMapping_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMapping_Impl, const OFFSET: isize>() -> IStaticPortMapping_Vtbl {
unsafe extern "system" fn ExternalIPAddress<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ExternalIPAddress() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn ExternalPort<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.ExternalPort() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn InternalPort<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.InternalPort() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Protocol<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Protocol() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn InternalClient<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.InternalClient() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Enabled<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Enabled() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Description<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Description() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn EditInternalClient<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrinternalclient: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EditInternalClient(::core::mem::transmute(&bstrinternalclient)).into()
}
unsafe extern "system" fn Enable<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, vb: super::super::Foundation::VARIANT_BOOL) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Enable(::core::mem::transmute_copy(&vb)).into()
}
unsafe extern "system" fn EditDescription<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, bstrdescription: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EditDescription(::core::mem::transmute(&bstrdescription)).into()
}
unsafe extern "system" fn EditInternalPort<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMapping_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, linternalport: i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.EditInternalPort(::core::mem::transmute_copy(&linternalport)).into()
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
ExternalIPAddress: ExternalIPAddress::<Identity, Impl, OFFSET>,
ExternalPort: ExternalPort::<Identity, Impl, OFFSET>,
InternalPort: InternalPort::<Identity, Impl, OFFSET>,
Protocol: Protocol::<Identity, Impl, OFFSET>,
InternalClient: InternalClient::<Identity, Impl, OFFSET>,
Enabled: Enabled::<Identity, Impl, OFFSET>,
Description: Description::<Identity, Impl, OFFSET>,
EditInternalClient: EditInternalClient::<Identity, Impl, OFFSET>,
Enable: Enable::<Identity, Impl, OFFSET>,
EditDescription: EditDescription::<Identity, Impl, OFFSET>,
EditInternalPort: EditInternalPort::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IStaticPortMapping as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait IStaticPortMappingCollection_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn _NewEnum(&self) -> ::windows::core::Result<::windows::core::IUnknown>;
fn get_Item(&self, lexternalport: i32, bstrprotocol: &::windows::core::BSTR) -> ::windows::core::Result<IStaticPortMapping>;
fn Count(&self) -> ::windows::core::Result<i32>;
fn Remove(&self, lexternalport: i32, bstrprotocol: &::windows::core::BSTR) -> ::windows::core::Result<()>;
fn Add(&self, lexternalport: i32, bstrprotocol: &::windows::core::BSTR, linternalport: i32, bstrinternalclient: &::windows::core::BSTR, benabled: super::super::Foundation::VARIANT_BOOL, bstrdescription: &::windows::core::BSTR) -> ::windows::core::Result<IStaticPortMapping>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for IStaticPortMappingCollection {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl IStaticPortMappingCollection_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMappingCollection_Impl, const OFFSET: isize>() -> IStaticPortMappingCollection_Vtbl {
unsafe extern "system" fn _NewEnum<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMappingCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this._NewEnum() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn get_Item<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMappingCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lexternalport: i32, bstrprotocol: ::std::mem::MaybeUninit<::windows::core::BSTR>, ppspm: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.get_Item(::core::mem::transmute_copy(&lexternalport), ::core::mem::transmute(&bstrprotocol)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppspm, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Count<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMappingCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, pval: *mut i32) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Count() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(pval, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn Remove<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMappingCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lexternalport: i32, bstrprotocol: ::std::mem::MaybeUninit<::windows::core::BSTR>) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
this.Remove(::core::mem::transmute_copy(&lexternalport), ::core::mem::transmute(&bstrprotocol)).into()
}
unsafe extern "system" fn Add<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IStaticPortMappingCollection_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, lexternalport: i32, bstrprotocol: ::std::mem::MaybeUninit<::windows::core::BSTR>, linternalport: i32, bstrinternalclient: ::std::mem::MaybeUninit<::windows::core::BSTR>, benabled: super::super::Foundation::VARIANT_BOOL, bstrdescription: ::std::mem::MaybeUninit<::windows::core::BSTR>, ppspm: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.Add(::core::mem::transmute_copy(&lexternalport), ::core::mem::transmute(&bstrprotocol), ::core::mem::transmute_copy(&linternalport), ::core::mem::transmute(&bstrinternalclient), ::core::mem::transmute_copy(&benabled), ::core::mem::transmute(&bstrdescription)) {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppspm, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
_NewEnum: _NewEnum::<Identity, Impl, OFFSET>,
get_Item: get_Item::<Identity, Impl, OFFSET>,
Count: Count::<Identity, Impl, OFFSET>,
Remove: Remove::<Identity, Impl, OFFSET>,
Add: Add::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IStaticPortMappingCollection as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}
#[doc = "*Required features: `\"Win32_NetworkManagement_WindowsFirewall\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"implement\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
pub trait IUPnPNAT_Impl: Sized + super::super::System::Com::IDispatch_Impl {
fn StaticPortMappingCollection(&self) -> ::windows::core::Result<IStaticPortMappingCollection>;
fn DynamicPortMappingCollection(&self) -> ::windows::core::Result<IDynamicPortMappingCollection>;
fn NATEventManager(&self) -> ::windows::core::Result<INATEventManager>;
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl ::windows::core::RuntimeName for IUPnPNAT {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))]
impl IUPnPNAT_Vtbl {
pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IUPnPNAT_Impl, const OFFSET: isize>() -> IUPnPNAT_Vtbl {
unsafe extern "system" fn StaticPortMappingCollection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IUPnPNAT_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppspms: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.StaticPortMappingCollection() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppspms, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn DynamicPortMappingCollection<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IUPnPNAT_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppdpms: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.DynamicPortMappingCollection() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppdpms, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
unsafe extern "system" fn NATEventManager<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IUPnPNAT_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, ppnem: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT {
let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
let this = (*this).get_impl();
match this.NATEventManager() {
::core::result::Result::Ok(ok__) => {
::core::ptr::write(ppnem, ::core::mem::transmute(ok__));
::windows::core::HRESULT(0)
}
::core::result::Result::Err(err) => err.into(),
}
}
Self {
base__: super::super::System::Com::IDispatch_Vtbl::new::<Identity, Impl, OFFSET>(),
StaticPortMappingCollection: StaticPortMappingCollection::<Identity, Impl, OFFSET>,
DynamicPortMappingCollection: DynamicPortMappingCollection::<Identity, Impl, OFFSET>,
NATEventManager: NATEventManager::<Identity, Impl, OFFSET>,
}
}
pub fn matches(iid: &windows::core::GUID) -> bool {
iid == &<IUPnPNAT as ::windows::core::ComInterface>::IID || iid == &<super::super::System::Com::IDispatch as ::windows::core::ComInterface>::IID
}
}