Struct intercom::ComRc
[−]
[src]
pub struct ComRc<T: CoClass> { /* fields omitted */ }
Reference counted handle to the ComBox
data.
Provides a safe way to handle the unsafe ComBox
values.
Methods
impl<T> ComRc<T> where
T: CoClass,
[src]
T: CoClass,
pub fn new(value: T) -> ComRc<T>
[src]
Creates a new reference counted COM object.
pub fn as_ptr(this: &Self) -> RawComPtr
[src]
Acquires a raw COM pointer to the object.
pub fn into_raw(this: Self) -> RawComPtr
[src]
Converts the ComRc into a raw COM pointer. Prevents the ref count being decremented as the ComRc goes out of scope.
pub unsafe fn query_interface(this: &Self, iid: &GUID) -> ComResult<RawComPtr>
[src]
Performs a query interface operation.
The operation assumes the COM object has the IUnknown virtual table pointer at the start of the data. It also assumes the output pointer points to a valid data that the interface can be written into.
As the query interface results in a new reference to the COM object in the out parameter, this operation ends up incrementing the reference count. The receiver of the interface must call release on the COM object when the interface is not needed anymore.