pub fn query_interface<TTarget: ComInterface + ?Sized>(this: &Self)
        -> ComResult<ComRc<TTarget>>
    {
        // Get the IUnknown interface.
        let iunk = this.as_iunknown();

        // Try every type system.
        //
        // From Rust side we don't really care which type system we end up with.
        // Both of these work for Rust calls.
        //
        // We'll try RawTypeSystem first because that has a better chance of
        // providing lower overhead calls.
        if let Ok(itf) = iunk.query_interface_ts::<RawTypeSystem, TTarget>() {
            return Ok(itf);
        }
        if let Ok(itf) = iunk.query_interface_ts::<AutomationTypeSystem, TTarget>() {
            return Ok(itf);
        }

        // If we got here, none of the query interfaces we invoked returned
        // anything.
        Err(ComError::E_NOINTERFACE)
    }
/// Query interface on the ComItf.
Query interface on the ComItf.
Query interface on the ComItf .
pub fn query_interface<TTarget: ComInterface + ?Sized>(this: &Self)
        -> ComResult<ComRc<TTarget>>
    {
        // Get the IUnknown interface.
        let iunk = this.as_iunknown();
        // Try every type system.
        //
        // From Rust side we don't really care which type system we end up with.
        // Both of these work for Rust calls.
        //
        // We'll try RawTypeSystem first because that has a better chance of
        // providing lower overhead calls.
        if let Ok(itf) = iunk.query_interface_ts::<RawTypeSystem, TTarget>() {
            return Ok(itf);
        }
        if let Ok(itf) = iunk.query_interface_ts::<AutomationTypeSystem, TTarget>() {
            return Ok(itf);
        }
        // If we got here, none of the query interfaces we invoked returned
        // anything.
        Err(ComError::E_NOINTERFACE)
    }
pub fn query_interface < TTarget : ComInterface + ? Sized > ( this : & Self ) -> ComResult < ComRc < TTarget > > { // Get the IUnknown interface. let iunk = this . as_iunknown ( ) ; // Try every type system. // // From Rust side we don't really care which type system we end up with. // Both of these work for Rust calls. // // We'll try RawTypeSystem first because that has a better chance of // providing lower overhead calls. if let Ok ( itf ) = iunk . query_interface_ts :: < RawTypeSystem , TTarget > ( ) { return Ok ( itf ) ; } if let Ok ( itf ) = iunk . query_interface_ts :: < AutomationTypeSystem , TTarget > ( ) { return Ok ( itf ) ; } // If we got here, none of the query interfaces we invoked returned // anything. Err ( ComError :: E_NOINTERFACE ) }
Query interface on the ComItf.
Query interface on the ComItf .
this
&Self
this
&Self