#[doc = "*Required features: `\"Win32_System_Antimalware\"`, `\"implement\"`*"]
pub trait IAmsiStream_Impl: Sized {
    fn GetAttribute(&self, attribute: AMSI_ATTRIBUTE, datasize: u32, data: *mut u8, retdata: *mut u32) -> ::windows::core::Result<()>;
    fn Read(&self, position: u64, size: u32, buffer: *mut u8, readsize: *mut u32) -> ::windows::core::Result<()>;
}
impl ::windows::core::RuntimeName for IAmsiStream {}
impl IAmsiStream_Vtbl {
    pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAmsiStream_Impl, const OFFSET: isize>() -> IAmsiStream_Vtbl {
        unsafe extern "system" fn GetAttribute<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAmsiStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, attribute: AMSI_ATTRIBUTE, datasize: u32, data: *mut u8, retdata: *mut u32) -> ::windows::core::HRESULT {
            let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
            let this = (*this).get_impl();
            this.GetAttribute(::core::mem::transmute_copy(&attribute), ::core::mem::transmute_copy(&datasize), ::core::mem::transmute_copy(&data), ::core::mem::transmute_copy(&retdata)).into()
        }
        unsafe extern "system" fn Read<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAmsiStream_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, position: u64, size: u32, buffer: *mut u8, readsize: *mut u32) -> ::windows::core::HRESULT {
            let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
            let this = (*this).get_impl();
            this.Read(::core::mem::transmute_copy(&position), ::core::mem::transmute_copy(&size), ::core::mem::transmute_copy(&buffer), ::core::mem::transmute_copy(&readsize)).into()
        }
        Self {
            base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
            GetAttribute: GetAttribute::<Identity, Impl, OFFSET>,
            Read: Read::<Identity, Impl, OFFSET>,
        }
    }
    pub fn matches(iid: &windows::core::GUID) -> bool {
        iid == &<IAmsiStream as ::windows::core::ComInterface>::IID
    }
}
#[doc = "*Required features: `\"Win32_System_Antimalware\"`, `\"implement\"`*"]
pub trait IAntimalware_Impl: Sized {
    fn Scan(&self, stream: ::core::option::Option<&IAmsiStream>, result: *mut AMSI_RESULT, provider: *mut ::core::option::Option<IAntimalwareProvider>) -> ::windows::core::Result<()>;
    fn CloseSession(&self, session: u64);
}
impl ::windows::core::RuntimeName for IAntimalware {}
impl IAntimalware_Vtbl {
    pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalware_Impl, const OFFSET: isize>() -> IAntimalware_Vtbl {
        unsafe extern "system" fn Scan<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalware_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, stream: *mut ::core::ffi::c_void, result: *mut AMSI_RESULT, provider: *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();
            this.Scan(::windows::core::from_raw_borrowed(&stream), ::core::mem::transmute_copy(&result), ::core::mem::transmute_copy(&provider)).into()
        }
        unsafe extern "system" fn CloseSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalware_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, session: u64) {
            let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
            let this = (*this).get_impl();
            this.CloseSession(::core::mem::transmute_copy(&session))
        }
        Self {
            base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
            Scan: Scan::<Identity, Impl, OFFSET>,
            CloseSession: CloseSession::<Identity, Impl, OFFSET>,
        }
    }
    pub fn matches(iid: &windows::core::GUID) -> bool {
        iid == &<IAntimalware as ::windows::core::ComInterface>::IID
    }
}
#[doc = "*Required features: `\"Win32_System_Antimalware\"`, `\"implement\"`*"]
pub trait IAntimalware2_Impl: Sized + IAntimalware_Impl {
    fn Notify(&self, buffer: *const ::core::ffi::c_void, length: u32, contentname: &::windows::core::PCWSTR, appname: &::windows::core::PCWSTR) -> ::windows::core::Result<AMSI_RESULT>;
}
impl ::windows::core::RuntimeName for IAntimalware2 {}
impl IAntimalware2_Vtbl {
    pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalware2_Impl, const OFFSET: isize>() -> IAntimalware2_Vtbl {
        unsafe extern "system" fn Notify<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalware2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, buffer: *const ::core::ffi::c_void, length: u32, contentname: ::windows::core::PCWSTR, appname: ::windows::core::PCWSTR, presult: *mut AMSI_RESULT) -> ::windows::core::HRESULT {
            let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
            let this = (*this).get_impl();
            match this.Notify(::core::mem::transmute_copy(&buffer), ::core::mem::transmute_copy(&length), ::core::mem::transmute(&contentname), ::core::mem::transmute(&appname)) {
                ::core::result::Result::Ok(ok__) => {
                    ::core::ptr::write(presult, ::core::mem::transmute(ok__));
                    ::windows::core::HRESULT(0)
                }
                ::core::result::Result::Err(err) => err.into(),
            }
        }
        Self { base__: IAntimalware_Vtbl::new::<Identity, Impl, OFFSET>(), Notify: Notify::<Identity, Impl, OFFSET> }
    }
    pub fn matches(iid: &windows::core::GUID) -> bool {
        iid == &<IAntimalware2 as ::windows::core::ComInterface>::IID || iid == &<IAntimalware as ::windows::core::ComInterface>::IID
    }
}
#[doc = "*Required features: `\"Win32_System_Antimalware\"`, `\"implement\"`*"]
pub trait IAntimalwareProvider_Impl: Sized {
    fn Scan(&self, stream: ::core::option::Option<&IAmsiStream>) -> ::windows::core::Result<AMSI_RESULT>;
    fn CloseSession(&self, session: u64);
    fn DisplayName(&self) -> ::windows::core::Result<::windows::core::PWSTR>;
}
impl ::windows::core::RuntimeName for IAntimalwareProvider {}
impl IAntimalwareProvider_Vtbl {
    pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalwareProvider_Impl, const OFFSET: isize>() -> IAntimalwareProvider_Vtbl {
        unsafe extern "system" fn Scan<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalwareProvider_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, stream: *mut ::core::ffi::c_void, result: *mut AMSI_RESULT) -> ::windows::core::HRESULT {
            let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
            let this = (*this).get_impl();
            match this.Scan(::windows::core::from_raw_borrowed(&stream)) {
                ::core::result::Result::Ok(ok__) => {
                    ::core::ptr::write(result, ::core::mem::transmute(ok__));
                    ::windows::core::HRESULT(0)
                }
                ::core::result::Result::Err(err) => err.into(),
            }
        }
        unsafe extern "system" fn CloseSession<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalwareProvider_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, session: u64) {
            let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
            let this = (*this).get_impl();
            this.CloseSession(::core::mem::transmute_copy(&session))
        }
        unsafe extern "system" fn DisplayName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalwareProvider_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, displayname: *mut ::windows::core::PWSTR) -> ::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(),
            }
        }
        Self {
            base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
            Scan: Scan::<Identity, Impl, OFFSET>,
            CloseSession: CloseSession::<Identity, Impl, OFFSET>,
            DisplayName: DisplayName::<Identity, Impl, OFFSET>,
        }
    }
    pub fn matches(iid: &windows::core::GUID) -> bool {
        iid == &<IAntimalwareProvider as ::windows::core::ComInterface>::IID
    }
}
#[doc = "*Required features: `\"Win32_System_Antimalware\"`, `\"implement\"`*"]
pub trait IAntimalwareProvider2_Impl: Sized + IAntimalwareProvider_Impl {
    fn Notify(&self, buffer: *const ::core::ffi::c_void, length: u32, contentname: &::windows::core::PCWSTR, appname: &::windows::core::PCWSTR) -> ::windows::core::Result<AMSI_RESULT>;
}
impl ::windows::core::RuntimeName for IAntimalwareProvider2 {}
impl IAntimalwareProvider2_Vtbl {
    pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalwareProvider2_Impl, const OFFSET: isize>() -> IAntimalwareProvider2_Vtbl {
        unsafe extern "system" fn Notify<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalwareProvider2_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, buffer: *const ::core::ffi::c_void, length: u32, contentname: ::windows::core::PCWSTR, appname: ::windows::core::PCWSTR, presult: *mut AMSI_RESULT) -> ::windows::core::HRESULT {
            let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
            let this = (*this).get_impl();
            match this.Notify(::core::mem::transmute_copy(&buffer), ::core::mem::transmute_copy(&length), ::core::mem::transmute(&contentname), ::core::mem::transmute(&appname)) {
                ::core::result::Result::Ok(ok__) => {
                    ::core::ptr::write(presult, ::core::mem::transmute(ok__));
                    ::windows::core::HRESULT(0)
                }
                ::core::result::Result::Err(err) => err.into(),
            }
        }
        Self { base__: IAntimalwareProvider_Vtbl::new::<Identity, Impl, OFFSET>(), Notify: Notify::<Identity, Impl, OFFSET> }
    }
    pub fn matches(iid: &windows::core::GUID) -> bool {
        iid == &<IAntimalwareProvider2 as ::windows::core::ComInterface>::IID || iid == &<IAntimalwareProvider as ::windows::core::ComInterface>::IID
    }
}
#[doc = "*Required features: `\"Win32_System_Antimalware\"`, `\"Win32_Foundation\"`, `\"implement\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub trait IAntimalwareUacProvider_Impl: Sized {
    fn UacScan(&self, context: *const AMSI_UAC_REQUEST_CONTEXT) -> ::windows::core::Result<AMSI_RESULT>;
    fn DisplayName(&self) -> ::windows::core::Result<::windows::core::PWSTR>;
}
#[cfg(feature = "Win32_Foundation")]
impl ::windows::core::RuntimeName for IAntimalwareUacProvider {}
#[cfg(feature = "Win32_Foundation")]
impl IAntimalwareUacProvider_Vtbl {
    pub const fn new<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalwareUacProvider_Impl, const OFFSET: isize>() -> IAntimalwareUacProvider_Vtbl {
        unsafe extern "system" fn UacScan<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalwareUacProvider_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, context: *const AMSI_UAC_REQUEST_CONTEXT, result: *mut AMSI_RESULT) -> ::windows::core::HRESULT {
            let this = (this as *const *const ()).offset(OFFSET) as *const Identity;
            let this = (*this).get_impl();
            match this.UacScan(::core::mem::transmute_copy(&context)) {
                ::core::result::Result::Ok(ok__) => {
                    ::core::ptr::write(result, ::core::mem::transmute(ok__));
                    ::windows::core::HRESULT(0)
                }
                ::core::result::Result::Err(err) => err.into(),
            }
        }
        unsafe extern "system" fn DisplayName<Identity: ::windows::core::IUnknownImpl<Impl = Impl>, Impl: IAntimalwareUacProvider_Impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, displayname: *mut ::windows::core::PWSTR) -> ::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(),
            }
        }
        Self {
            base__: ::windows::core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
            UacScan: UacScan::<Identity, Impl, OFFSET>,
            DisplayName: DisplayName::<Identity, Impl, OFFSET>,
        }
    }
    pub fn matches(iid: &windows::core::GUID) -> bool {
        iid == &<IAntimalwareUacProvider as ::windows::core::ComInterface>::IID
    }
}
