use super::*;
#[repr(transparent)]
#[derive(Clone, PartialEq, Eq)]
pub struct IActivationFactory(IInspectable);
impl IActivationFactory {
pub fn activate_instance<I: Interface>(&self) -> Result<I> {
unsafe {
let mut object = None;
(self.vtable().6)(core::mem::transmute_copy(self), &mut object).and_some(object)?.cast()
}
}
}
#[repr(C)]
pub struct IActivationFactory_abi(
pub unsafe extern "system" fn(this: RawPtr, iid: &GUID, interface: *mut RawPtr) -> HRESULT,
pub unsafe extern "system" fn(this: RawPtr) -> u32,
pub unsafe extern "system" fn(this: RawPtr) -> u32,
pub unsafe extern "system" fn(this: RawPtr, count: *mut u32, values: *mut *mut GUID) -> HRESULT,
pub unsafe extern "system" fn(this: RawPtr, value: *mut RawPtr) -> HRESULT,
pub unsafe extern "system" fn(this: RawPtr, value: *mut i32) -> HRESULT,
pub unsafe extern "system" fn(this: RawPtr, object: &mut Option<IInspectable>) -> HRESULT, );
unsafe impl Interface for IActivationFactory {
type Vtable = IActivationFactory_abi;
const IID: GUID = GUID::from_u128(0x00000035_0000_0000_c000_000000000046);
}
impl core::fmt::Debug for IActivationFactory {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_tuple("IActivationFactory").field(&self.0).finish()
}
}