Trait com_scrape_types::Unknown
source · pub trait Unknown {
// Required methods
unsafe fn query_interface(
this: *mut Self,
iid: &Guid
) -> Option<*mut c_void>;
unsafe fn add_ref(this: *mut Self) -> usize;
unsafe fn release(this: *mut Self) -> usize;
}
Expand description
Implemented by interfaces that derive from the IUnknown
interface (or an equivalent thereof).
Represents the base interface that all COM objects must implement and from which all COM
interfaces must derive. Corresponds to the IUnknown
interface. Includes functionality for
reference counting (add_ref
and release
and for
dynamically casting between interface types (query_interface
).
All interface types generated by com-scrape
will implement this trait.
Required Methods§
sourceunsafe fn query_interface(this: *mut Self, iid: &Guid) -> Option<*mut c_void>
unsafe fn query_interface(this: *mut Self, iid: &Guid) -> Option<*mut c_void>
Checks if an object implements the interface corresponding to the given GUID, and if so, returns a corresponding interface pointer for the object and increments the object’s reference count.
Object Safety§
This trait is not object safe.