| 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 unsafe fn matches(iid: *const ::windows_core::GUID) -> bool { |
| *iid == <IAmsiStream as ::windows_core::ComInterface>::IID |
| } |
| } |
| 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 unsafe fn matches(iid: *const ::windows_core::GUID) -> bool { |
| *iid == <IAntimalware as ::windows_core::ComInterface>::IID |
| } |
| } |
| 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 unsafe fn matches(iid: *const ::windows_core::GUID) -> bool { |
| *iid == <IAntimalware2 as ::windows_core::ComInterface>::IID || *iid == <IAntimalware as ::windows_core::ComInterface>::IID |
| } |
| } |
| 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 unsafe fn matches(iid: *const ::windows_core::GUID) -> bool { |
| *iid == <IAntimalwareProvider as ::windows_core::ComInterface>::IID |
| } |
| } |
| 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 unsafe fn matches(iid: *const ::windows_core::GUID) -> bool { |
| *iid == <IAntimalwareProvider2 as ::windows_core::ComInterface>::IID || *iid == <IAntimalwareProvider as ::windows_core::ComInterface>::IID |
| } |
| } |
| #[doc = "Required features: `\"Win32_Foundation\"`"] |
| #[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 unsafe fn matches(iid: *const ::windows_core::GUID) -> bool { |
| *iid == <IAntimalwareUacProvider as ::windows_core::ComInterface>::IID |
| } |
| } |