unsafe fn as_comitf<I: ComInterface + ?Sized>(&self) -> ComItf<I>
    where
        T: HasInterface<I>,
    {
        let (automation_ptr, raw_ptr) = {
            let vtbl = &self.as_ref().vtable_list;

            let automation_ptr = match I::iid(TypeSystemName::Automation) {
                Some(iid) => match <T as ComClass>::query_interface(&vtbl, iid) {
                    Ok(itf) => itf,
                    Err(_) => ::std::ptr::null_mut(),
                },
                None => ::std::ptr::null_mut(),
            };

            let raw_ptr = match I::iid(TypeSystemName::Raw) {
                Some(iid) => match <T as ComClass>::query_interface(&vtbl, iid) {
                    Ok(itf) => itf,
                    Err(_) => ::std::ptr::null_mut(),
                },
                None => ::std::ptr::null_mut(),
            };

            (automation_ptr, raw_ptr)
        };

        ComItf::maybe_new(
            raw::InterfacePtr::new(automation_ptr),
            raw::InterfacePtr::new(raw_ptr),
        )
        .expect("Intercom failed to create interface pointers")
    }
/// Acquires a ComItf for this struct.
///
/// # Safety
///
/// The ComItf must not outlive the current instance without invoking
/// `add_ref`.
Acquires a ComItf for this struct.
Acquires a ComItf for this struct .
unsafe fn as_comitf<I: ComInterface + ?Sized>(&self) -> ComItf<I>
    where
        T: HasInterface<I>,
    {
        let (automation_ptr, raw_ptr) = {
            let vtbl = &self.as_ref().vtable_list;
            let automation_ptr = match I::iid(TypeSystemName::Automation) {
                Some(iid) => match <T as ComClass>::query_interface(&vtbl, iid) {
                    Ok(itf) => itf,
                    Err(_) => ::std::ptr::null_mut(),
                },
                None => ::std::ptr::null_mut(),
            };
            let raw_ptr = match I::iid(TypeSystemName::Raw) {
                Some(iid) => match <T as ComClass>::query_interface(&vtbl, iid) {
                    Ok(itf) => itf,
                    Err(_) => ::std::ptr::null_mut(),
                },
                None => ::std::ptr::null_mut(),
            };
            (automation_ptr, raw_ptr)
        };
        ComItf::maybe_new(
            raw::InterfacePtr::new(automation_ptr),
            raw::InterfacePtr::new(raw_ptr),
        )
        .expect("Intercom failed to create interface pointers")
    }
unsafe fn as_comitf < I : ComInterface + ? Sized > ( & self ) -> ComItf < I > where T : HasInterface < I > , { let ( automation_ptr , raw_ptr ) = { let vtbl = & self . as_ref ( ) . vtable_list ; let automation_ptr = match I :: iid ( TypeSystemName :: Automation ) { Some ( iid ) => match < T as ComClass > :: query_interface ( & vtbl , iid ) { Ok ( itf ) => itf , Err ( _ ) => :: std :: ptr :: null_mut ( ) , } , None => :: std :: ptr :: null_mut ( ) , } ; let raw_ptr = match I :: iid ( TypeSystemName :: Raw ) { Some ( iid ) => match < T as ComClass > :: query_interface ( & vtbl , iid ) { Ok ( itf ) => itf , Err ( _ ) => :: std :: ptr :: null_mut ( ) , } , None => :: std :: ptr :: null_mut ( ) , } ; ( automation_ptr , raw_ptr ) } ; ComItf :: maybe_new ( raw :: InterfacePtr :: new ( automation_ptr ) , raw :: InterfacePtr :: new ( raw_ptr ) , ) . expect ( " " ) }
Acquires a ComItf for this struct.
Acquires a ComItf for this struct .
&self
&self
safety
The ComItf must not outlive the current instance without invoking
`add_ref`.
The ComItf must not outlive the current instance without invoking ` add_ref ` .