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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.