#[cfg(feature = "ServiceFabric_FabricTypes")]
#[inline]
pub unsafe fn FabricDecryptText<P0>(
encryptedtext: P0,
certstorelocation: super::FabricTypes::FABRIC_X509_STORE_LOCATION,
) -> windows_core::Result<IFabricStringResult>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("" "C" fn FabricDecryptText(encryptedtext : windows_core::PCWSTR, certstorelocation : super::FabricTypes::FABRIC_X509_STORE_LOCATION, decryptedtext : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricDecryptText(
encryptedtext.param().abi(),
certstorelocation,
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn FabricDecryptValue<P0>(
encryptedvalue: P0,
) -> windows_core::Result<IFabricStringResult>
where
P0: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("" "C" fn FabricDecryptValue(encryptedvalue : windows_core::PCWSTR, decryptedvalue : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricDecryptValue(encryptedvalue.param().abi(), &mut result__)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
#[inline]
pub unsafe fn FabricEncryptText<P0, P1, P2, P4>(
text: P0,
certthumbprint: P1,
certstorename: P2,
certstorelocation: super::FabricTypes::FABRIC_X509_STORE_LOCATION,
algorithmoid: P4,
) -> windows_core::Result<IFabricStringResult>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<windows_core::PCWSTR>,
P4: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("" "C" fn FabricEncryptText(text : windows_core::PCWSTR, certthumbprint : windows_core::PCWSTR, certstorename : windows_core::PCWSTR, certstorelocation : super::FabricTypes::FABRIC_X509_STORE_LOCATION, algorithmoid : windows_core::PCWSTR, encryptedvalue : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricEncryptText(
text.param().abi(),
certthumbprint.param().abi(),
certstorename.param().abi(),
certstorelocation,
algorithmoid.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn FabricEncryptText2<P0, P1, P2>(
text: P0,
certfilepath: P1,
algorithmoid: P2,
) -> windows_core::Result<IFabricStringResult>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("" "C" fn FabricEncryptText2(text : windows_core::PCWSTR, certfilepath : windows_core::PCWSTR, algorithmoid : windows_core::PCWSTR, encryptedvalue : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricEncryptText2(
text.param().abi(),
certfilepath.param().abi(),
algorithmoid.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn FabricEncryptValue<P0, P1, P2>(
certthumbprint: P0,
certstorename: P1,
text: P2,
) -> windows_core::Result<IFabricStringResult>
where
P0: windows_core::Param<windows_core::PCWSTR>,
P1: windows_core::Param<windows_core::PCWSTR>,
P2: windows_core::Param<windows_core::PCWSTR>,
{
windows_core::link!("" "C" fn FabricEncryptValue(certthumbprint : windows_core::PCWSTR, certstorename : windows_core::PCWSTR, text : windows_core::PCWSTR, encryptedvalue : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricEncryptValue(
certthumbprint.param().abi(),
certstorename.param().abi(),
text.param().abi(),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
#[inline]
pub unsafe fn FabricGetLastErrorMessage() -> windows_core::Result<IFabricStringResult> {
windows_core::link!("" "C" fn FabricGetLastErrorMessage(message : *mut *mut core::ffi::c_void) -> windows_core::HRESULT);
unsafe {
let mut result__ = core::mem::zeroed();
FabricGetLastErrorMessage(&mut result__)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
windows_core::imp::define_interface!(
IFabricAsyncOperationCallback,
IFabricAsyncOperationCallback_Vtbl,
0x86f08d7e_14dd_4575_8489_b1d5d679029c
);
windows_core::imp::interface_hierarchy!(IFabricAsyncOperationCallback, windows_core::IUnknown);
impl IFabricAsyncOperationCallback {
pub unsafe fn Invoke<P0>(&self, context: P0)
where
P0: windows_core::Param<IFabricAsyncOperationContext>,
{
unsafe {
(windows_core::Interface::vtable(self).Invoke)(
windows_core::Interface::as_raw(self),
context.param().abi(),
);
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricAsyncOperationCallback_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub Invoke: unsafe extern "system" fn(*mut core::ffi::c_void, *mut core::ffi::c_void),
}
unsafe impl Send for IFabricAsyncOperationCallback {}
unsafe impl Sync for IFabricAsyncOperationCallback {}
pub trait IFabricAsyncOperationCallback_Impl: windows_core::IUnknownImpl {
fn Invoke(&self, context: windows_core::Ref<IFabricAsyncOperationContext>);
}
impl IFabricAsyncOperationCallback_Vtbl {
pub const fn new<Identity: IFabricAsyncOperationCallback_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Invoke<
Identity: IFabricAsyncOperationCallback_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
context: *mut core::ffi::c_void,
) {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricAsyncOperationCallback_Impl::Invoke(
this,
core::mem::transmute_copy(&context),
);
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
Invoke: Invoke::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricAsyncOperationCallback as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricAsyncOperationCallback {}
windows_core::imp::define_interface!(
IFabricAsyncOperationContext,
IFabricAsyncOperationContext_Vtbl,
0x841720bf_c9e8_4e6f_9c3f_6b7f4ac73bcd
);
windows_core::imp::interface_hierarchy!(IFabricAsyncOperationContext, windows_core::IUnknown);
impl IFabricAsyncOperationContext {
pub unsafe fn IsCompleted(&self) -> bool {
unsafe {
(windows_core::Interface::vtable(self).IsCompleted)(windows_core::Interface::as_raw(
self,
))
}
}
pub unsafe fn CompletedSynchronously(&self) -> bool {
unsafe {
(windows_core::Interface::vtable(self).CompletedSynchronously)(
windows_core::Interface::as_raw(self),
)
}
}
pub unsafe fn get_Callback(&self) -> windows_core::Result<IFabricAsyncOperationCallback> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).get_Callback)(
windows_core::Interface::as_raw(self),
&mut result__,
)
.and_then(|| windows_core::imp::Type::from_abi(result__))
}
}
pub unsafe fn Cancel(&self) -> windows_core::HRESULT {
unsafe {
(windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricAsyncOperationContext_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub IsCompleted: unsafe extern "system" fn(*mut core::ffi::c_void) -> bool,
pub CompletedSynchronously: unsafe extern "system" fn(*mut core::ffi::c_void) -> bool,
pub get_Callback: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub Cancel: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricAsyncOperationContext {}
unsafe impl Sync for IFabricAsyncOperationContext {}
pub trait IFabricAsyncOperationContext_Impl: windows_core::IUnknownImpl {
fn IsCompleted(&self) -> bool;
fn CompletedSynchronously(&self) -> bool;
fn get_Callback(&self) -> windows_core::Result<IFabricAsyncOperationCallback>;
fn Cancel(&self) -> windows_core::Result<()>;
}
impl IFabricAsyncOperationContext_Vtbl {
pub const fn new<Identity: IFabricAsyncOperationContext_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn IsCompleted<
Identity: IFabricAsyncOperationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> bool {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricAsyncOperationContext_Impl::IsCompleted(this)
}
}
unsafe extern "system" fn CompletedSynchronously<
Identity: IFabricAsyncOperationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> bool {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricAsyncOperationContext_Impl::CompletedSynchronously(this)
}
}
unsafe extern "system" fn get_Callback<
Identity: IFabricAsyncOperationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
callback: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricAsyncOperationContext_Impl::get_Callback(this) {
Ok(ok__) => {
callback.write(core::mem::transmute(ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Cancel<
Identity: IFabricAsyncOperationContext_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricAsyncOperationContext_Impl::Cancel(this).into()
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
IsCompleted: IsCompleted::<Identity, OFFSET>,
CompletedSynchronously: CompletedSynchronously::<Identity, OFFSET>,
get_Callback: get_Callback::<Identity, OFFSET>,
Cancel: Cancel::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricAsyncOperationContext as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricAsyncOperationContext {}
windows_core::imp::define_interface!(
IFabricGetReplicatorStatusResult,
IFabricGetReplicatorStatusResult_Vtbl,
0x30e10c61_a710_4f99_a623_bb1403265186
);
windows_core::imp::interface_hierarchy!(IFabricGetReplicatorStatusResult, windows_core::IUnknown);
impl IFabricGetReplicatorStatusResult {
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub unsafe fn get_ReplicatorStatus(
&self,
) -> *const super::FabricTypes::FABRIC_REPLICATOR_STATUS_QUERY_RESULT {
unsafe {
(windows_core::Interface::vtable(self).get_ReplicatorStatus)(
windows_core::Interface::as_raw(self),
)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricGetReplicatorStatusResult_Vtbl { pub base__ : windows_core::IUnknown_Vtbl , # [cfg (feature = "ServiceFabric_FabricTypes")] pub get_ReplicatorStatus : unsafe extern "system" fn (* mut core::ffi::c_void ,) -> * const super::FabricTypes::FABRIC_REPLICATOR_STATUS_QUERY_RESULT , # [cfg (not (feature = "ServiceFabric_FabricTypes"))] get_ReplicatorStatus : usize , }
unsafe impl Send for IFabricGetReplicatorStatusResult {}
unsafe impl Sync for IFabricGetReplicatorStatusResult {}
#[cfg(feature = "ServiceFabric_FabricTypes")]
pub trait IFabricGetReplicatorStatusResult_Impl: windows_core::IUnknownImpl {
fn get_ReplicatorStatus(
&self,
) -> *const super::FabricTypes::FABRIC_REPLICATOR_STATUS_QUERY_RESULT;
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl IFabricGetReplicatorStatusResult_Vtbl {
pub const fn new<Identity: IFabricGetReplicatorStatusResult_Impl, const OFFSET: isize>() -> Self
{
unsafe extern "system" fn get_ReplicatorStatus<
Identity: IFabricGetReplicatorStatusResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> *const super::FabricTypes::FABRIC_REPLICATOR_STATUS_QUERY_RESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricGetReplicatorStatusResult_Impl::get_ReplicatorStatus(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_ReplicatorStatus: get_ReplicatorStatus::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricGetReplicatorStatusResult as windows_core::Interface>::IID
}
}
#[cfg(feature = "ServiceFabric_FabricTypes")]
impl windows_core::RuntimeName for IFabricGetReplicatorStatusResult {}
windows_core::imp::define_interface!(
IFabricStringListResult,
IFabricStringListResult_Vtbl,
0xafab1c53_757b_4b0e_8b7e_237aeee6bfe9
);
windows_core::imp::interface_hierarchy!(IFabricStringListResult, windows_core::IUnknown);
impl IFabricStringListResult {
pub unsafe fn GetStrings(
&self,
itemcount: *mut u32,
) -> windows_core::Result<*mut windows_core::PCWSTR> {
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(self).GetStrings)(
windows_core::Interface::as_raw(self),
itemcount as _,
&mut result__,
)
.map(|| result__)
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStringListResult_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub GetStrings: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut u32,
*mut *mut windows_core::PCWSTR,
) -> windows_core::HRESULT,
}
unsafe impl Send for IFabricStringListResult {}
unsafe impl Sync for IFabricStringListResult {}
pub trait IFabricStringListResult_Impl: windows_core::IUnknownImpl {
fn GetStrings(&self, itemcount: *mut u32) -> windows_core::Result<*mut windows_core::PCWSTR>;
}
impl IFabricStringListResult_Vtbl {
pub const fn new<Identity: IFabricStringListResult_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn GetStrings<
Identity: IFabricStringListResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
itemcount: *mut u32,
buffereditems: *mut *mut windows_core::PCWSTR,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IFabricStringListResult_Impl::GetStrings(
this,
core::mem::transmute_copy(&itemcount),
) {
Ok(ok__) => {
buffereditems.write(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
GetStrings: GetStrings::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStringListResult as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricStringListResult {}
windows_core::imp::define_interface!(
IFabricStringResult,
IFabricStringResult_Vtbl,
0x4ae69614_7d0f_4cd4_b836_23017000d132
);
windows_core::imp::interface_hierarchy!(IFabricStringResult, windows_core::IUnknown);
impl IFabricStringResult {
pub unsafe fn get_String(&self) -> windows_core::PCWSTR {
unsafe {
(windows_core::Interface::vtable(self).get_String)(windows_core::Interface::as_raw(
self,
))
}
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IFabricStringResult_Vtbl {
pub base__: windows_core::IUnknown_Vtbl,
pub get_String: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::PCWSTR,
}
unsafe impl Send for IFabricStringResult {}
unsafe impl Sync for IFabricStringResult {}
pub trait IFabricStringResult_Impl: windows_core::IUnknownImpl {
fn get_String(&self) -> windows_core::PCWSTR;
}
impl IFabricStringResult_Vtbl {
pub const fn new<Identity: IFabricStringResult_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn get_String<
Identity: IFabricStringResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
) -> windows_core::PCWSTR {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IFabricStringResult_Impl::get_String(this)
}
}
Self {
base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
get_String: get_String::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IFabricStringResult as windows_core::Interface>::IID
}
}
impl windows_core::RuntimeName for IFabricStringResult {}