pub trait IAppointmentParticipant_Impl: Sized {
fn DisplayName(&self) -> windows_core::Result<windows_core::HSTRING>;
fn SetDisplayName(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>;
fn Address(&self) -> windows_core::Result<windows_core::HSTRING>;
fn SetAddress(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>;
}
impl windows_core::RuntimeName for IAppointmentParticipant {
const NAME: &'static str = "Windows.ApplicationModel.Appointments.IAppointmentParticipant";
}
impl IAppointmentParticipant_Vtbl {
pub const fn new<Identity: windows_core::IUnknownImpl, const OFFSET: isize>() -> IAppointmentParticipant_Vtbl
where
Identity: IAppointmentParticipant_Impl,
{
unsafe extern "system" fn DisplayName<Identity: windows_core::IUnknownImpl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut core::mem::MaybeUninit<windows_core::HSTRING>) -> windows_core::HRESULT
where
Identity: IAppointmentParticipant_Impl,
{
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IAppointmentParticipant_Impl::DisplayName(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
unsafe extern "system" fn SetDisplayName<Identity: windows_core::IUnknownImpl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: core::mem::MaybeUninit<windows_core::HSTRING>) -> windows_core::HRESULT
where
Identity: IAppointmentParticipant_Impl,
{
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IAppointmentParticipant_Impl::SetDisplayName(this, core::mem::transmute(&value)).into()
}
unsafe extern "system" fn Address<Identity: windows_core::IUnknownImpl, const OFFSET: isize>(this: *mut core::ffi::c_void, result__: *mut core::mem::MaybeUninit<windows_core::HSTRING>) -> windows_core::HRESULT
where
Identity: IAppointmentParticipant_Impl,
{
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IAppointmentParticipant_Impl::Address(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
unsafe extern "system" fn SetAddress<Identity: windows_core::IUnknownImpl, const OFFSET: isize>(this: *mut core::ffi::c_void, value: core::mem::MaybeUninit<windows_core::HSTRING>) -> windows_core::HRESULT
where
Identity: IAppointmentParticipant_Impl,
{
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IAppointmentParticipant_Impl::SetAddress(this, core::mem::transmute(&value)).into()
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IAppointmentParticipant, OFFSET>(),
DisplayName: DisplayName::<Identity, OFFSET>,
SetDisplayName: SetDisplayName::<Identity, OFFSET>,
Address: Address::<Identity, OFFSET>,
SetAddress: SetAddress::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IAppointmentParticipant as windows_core::Interface>::IID
}
}