#![allow(
non_snake_case,
non_upper_case_globals,
non_camel_case_types,
dead_code,
clippy::all
)]
windows_core::imp::define_interface!(
IIsoSessionError,
IIsoSessionError_Vtbl,
0x39e104da_6f4b_5fe8_a63f_f28fd8c3d606
);
impl windows_core::RuntimeType for IIsoSessionError {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionError {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionError";
}
pub trait IIsoSessionError_Impl: windows_core::IUnknownImpl {
fn Code(&self) -> windows_core::Result<windows_core::HRESULT>;
fn IsError(&self) -> windows_core::Result<bool>;
fn Message(&self) -> windows_core::Result<windows_core::HSTRING>;
fn Remediation(&self) -> windows_core::Result<windows_core::HSTRING>;
}
impl IIsoSessionError_Vtbl {
pub const fn new<Identity: IIsoSessionError_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Code<Identity: IIsoSessionError_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut windows_core::HRESULT,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionError_Impl::Code(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsError<Identity: IIsoSessionError_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionError_Impl::IsError(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Message<Identity: IIsoSessionError_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionError_Impl::Message(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 Remediation<
Identity: IIsoSessionError_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionError_Impl::Remediation(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IIsoSessionError, OFFSET>(),
Code: Code::<Identity, OFFSET>,
IsError: IsError::<Identity, OFFSET>,
Message: Message::<Identity, OFFSET>,
Remediation: Remediation::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionError as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionError_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Code: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows_core::HRESULT,
) -> windows_core::HRESULT,
pub IsError:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub Message: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub Remediation: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IIsoSessionErrorPreview2,
IIsoSessionErrorPreview2_Vtbl,
0xd01fc5cc_fdfc_513a_9045_235932a03212
);
impl windows_core::RuntimeType for IIsoSessionErrorPreview2 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionErrorPreview2 {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionErrorPreview2";
}
pub trait IIsoSessionErrorPreview2_Impl: windows_core::IUnknownImpl {
fn Diagnostics(&self) -> windows_core::Result<windows_core::HSTRING>;
fn FailingStage(&self) -> windows_core::Result<windows_core::HSTRING>;
fn UnderlyingError(&self) -> windows_core::Result<windows_core::HRESULT>;
}
impl IIsoSessionErrorPreview2_Vtbl {
pub const fn new<Identity: IIsoSessionErrorPreview2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Diagnostics<
Identity: IIsoSessionErrorPreview2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionErrorPreview2_Impl::Diagnostics(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 FailingStage<
Identity: IIsoSessionErrorPreview2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionErrorPreview2_Impl::FailingStage(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 UnderlyingError<
Identity: IIsoSessionErrorPreview2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut windows_core::HRESULT,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionErrorPreview2_Impl::UnderlyingError(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<
Identity,
IIsoSessionErrorPreview2,
OFFSET,
>(),
Diagnostics: Diagnostics::<Identity, OFFSET>,
FailingStage: FailingStage::<Identity, OFFSET>,
UnderlyingError: UnderlyingError::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionErrorPreview2 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionErrorPreview2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Diagnostics: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub FailingStage: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub UnderlyingError: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut windows_core::HRESULT,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IIsoSessionErrorPreview3,
IIsoSessionErrorPreview3_Vtbl,
0xa81bc040_b534_5786_986e_9530bd12e588
);
impl windows_core::RuntimeType for IIsoSessionErrorPreview3 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionErrorPreview3 {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionErrorPreview3";
}
pub trait IIsoSessionErrorPreview3_Impl: windows_core::IUnknownImpl {
fn Format(&self) -> windows_core::Result<windows_core::HSTRING>;
}
impl IIsoSessionErrorPreview3_Vtbl {
pub const fn new<Identity: IIsoSessionErrorPreview3_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Format<
Identity: IIsoSessionErrorPreview3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionErrorPreview3_Impl::Format(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<
Identity,
IIsoSessionErrorPreview3,
OFFSET,
>(),
Format: Format::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionErrorPreview3 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionErrorPreview3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Format: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IIsoSessionOps,
IIsoSessionOps_Vtbl,
0xabe3e450_1dd6_5c8f_88d1_f5522b785b96
);
impl windows_core::RuntimeType for IIsoSessionOps {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionOps {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionOps";
}
pub trait IIsoSessionOps_Impl: windows_core::IUnknownImpl {
fn BehaviorVersion(&self) -> windows_core::Result<i32>;
fn AddUserAsync(
&self,
optEnterpriseAccountName: &windows_core::HSTRING,
optWamToken: &windows_core::HSTRING,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionUserResult>>;
fn GetFeatureLevel(&self, feature: IsoSessionFeature) -> windows_core::Result<i32>;
fn RemoveUserAsync(
&self,
agentUserName: &windows_core::HSTRING,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionResult>>;
fn RunProcessWithOptionsAsync(
&self,
agentUserName: &windows_core::HSTRING,
processPath: &windows_core::HSTRING,
arguments: &windows_core::HSTRING,
options: windows_core::Ref<'_, IsoSessionProcessOptions>,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionProcessResult>>;
fn StartSessionAsync(
&self,
agentUserName: &windows_core::HSTRING,
optWamToken: &windows_core::HSTRING,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionResult>>;
fn StopSessionAsync(
&self,
agentUserName: &windows_core::HSTRING,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionResult>>;
}
impl IIsoSessionOps_Vtbl {
pub const fn new<Identity: IIsoSessionOps_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn BehaviorVersion<
Identity: IIsoSessionOps_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut i32,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOps_Impl::BehaviorVersion(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddUserAsync<
Identity: IIsoSessionOps_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
optenterpriseaccountname: *mut core::ffi::c_void,
optwamtoken: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOps_Impl::AddUserAsync(
this,
core::mem::transmute(&optenterpriseaccountname),
core::mem::transmute(&optwamtoken),
) {
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 GetFeatureLevel<
Identity: IIsoSessionOps_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
feature: IsoSessionFeature,
result__: *mut i32,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOps_Impl::GetFeatureLevel(this, feature) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RemoveUserAsync<
Identity: IIsoSessionOps_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
agentusername: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOps_Impl::RemoveUserAsync(
this,
core::mem::transmute(&agentusername),
) {
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 RunProcessWithOptionsAsync<
Identity: IIsoSessionOps_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
agentusername: *mut core::ffi::c_void,
processpath: *mut core::ffi::c_void,
arguments: *mut core::ffi::c_void,
options: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOps_Impl::RunProcessWithOptionsAsync(
this,
core::mem::transmute(&agentusername),
core::mem::transmute(&processpath),
core::mem::transmute(&arguments),
core::mem::transmute_copy(&options),
) {
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 StartSessionAsync<
Identity: IIsoSessionOps_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
agentusername: *mut core::ffi::c_void,
optwamtoken: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOps_Impl::StartSessionAsync(
this,
core::mem::transmute(&agentusername),
core::mem::transmute(&optwamtoken),
) {
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 StopSessionAsync<
Identity: IIsoSessionOps_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
agentusername: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOps_Impl::StopSessionAsync(
this,
core::mem::transmute(&agentusername),
) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IIsoSessionOps, OFFSET>(),
BehaviorVersion: BehaviorVersion::<Identity, OFFSET>,
AddUserAsync: AddUserAsync::<Identity, OFFSET>,
GetFeatureLevel: GetFeatureLevel::<Identity, OFFSET>,
RemoveUserAsync: RemoveUserAsync::<Identity, OFFSET>,
RunProcessWithOptionsAsync: RunProcessWithOptionsAsync::<Identity, OFFSET>,
StartSessionAsync: StartSessionAsync::<Identity, OFFSET>,
StopSessionAsync: StopSessionAsync::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionOps as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionOps_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub BehaviorVersion:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub AddUserAsync: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub GetFeatureLevel: unsafe extern "system" fn(
*mut core::ffi::c_void,
IsoSessionFeature,
*mut i32,
) -> windows_core::HRESULT,
pub RemoveUserAsync: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub RunProcessWithOptionsAsync: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub StartSessionAsync: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub StopSessionAsync: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IIsoSessionOpsPreview2,
IIsoSessionOpsPreview2_Vtbl,
0x2e26214d_02c1_5dc5_9ce7_f9a41cddd5b1
);
impl windows_core::RuntimeType for IIsoSessionOpsPreview2 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionOpsPreview2 {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionOpsPreview2";
}
pub trait IIsoSessionOpsPreview2_Impl: windows_core::IUnknownImpl {
fn AddUserAsync2(
&self,
optAppId: &windows_core::HSTRING,
optEnterpriseAccountName: &windows_core::HSTRING,
optWamToken: &windows_core::HSTRING,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionUserResult>>;
}
impl IIsoSessionOpsPreview2_Vtbl {
pub const fn new<Identity: IIsoSessionOpsPreview2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn AddUserAsync2<
Identity: IIsoSessionOpsPreview2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
optappid: *mut core::ffi::c_void,
optenterpriseaccountname: *mut core::ffi::c_void,
optwamtoken: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOpsPreview2_Impl::AddUserAsync2(
this,
core::mem::transmute(&optappid),
core::mem::transmute(&optenterpriseaccountname),
core::mem::transmute(&optwamtoken),
) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IIsoSessionOpsPreview2, OFFSET>(
),
AddUserAsync2: AddUserAsync2::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionOpsPreview2 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionOpsPreview2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AddUserAsync2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IIsoSessionOpsPreview3,
IIsoSessionOpsPreview3_Vtbl,
0x142b6655_e129_570d_902f_c20483662239
);
impl windows_core::RuntimeType for IIsoSessionOpsPreview3 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionOpsPreview3 {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionOpsPreview3";
}
pub trait IIsoSessionOpsPreview3_Impl: windows_core::IUnknownImpl {
fn IsLocalAgentUserSupported(&self) -> windows_core::Result<bool>;
fn IsEnterpriseAgentUserSupported(&self) -> windows_core::Result<bool>;
fn IsAppScopedRegistrationSupported(&self) -> windows_core::Result<bool>;
}
impl IIsoSessionOpsPreview3_Vtbl {
pub const fn new<Identity: IIsoSessionOpsPreview3_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn IsLocalAgentUserSupported<
Identity: IIsoSessionOpsPreview3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOpsPreview3_Impl::IsLocalAgentUserSupported(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsEnterpriseAgentUserSupported<
Identity: IIsoSessionOpsPreview3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOpsPreview3_Impl::IsEnterpriseAgentUserSupported(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn IsAppScopedRegistrationSupported<
Identity: IIsoSessionOpsPreview3_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOpsPreview3_Impl::IsAppScopedRegistrationSupported(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IIsoSessionOpsPreview3, OFFSET>(
),
IsLocalAgentUserSupported: IsLocalAgentUserSupported::<Identity, OFFSET>,
IsEnterpriseAgentUserSupported: IsEnterpriseAgentUserSupported::<Identity, OFFSET>,
IsAppScopedRegistrationSupported: IsAppScopedRegistrationSupported::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionOpsPreview3 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionOpsPreview3_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsLocalAgentUserSupported:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub IsEnterpriseAgentUserSupported:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub IsAppScopedRegistrationSupported:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IIsoSessionOpsPreview4,
IIsoSessionOpsPreview4_Vtbl,
0x4d27018c_d1b8_5cdb_9e41_97635fbb59fd
);
impl windows_core::RuntimeType for IIsoSessionOpsPreview4 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionOpsPreview4 {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionOpsPreview4";
}
pub trait IIsoSessionOpsPreview4_Impl: windows_core::IUnknownImpl {
fn IsDeducedEnterpriseAgentUserSupported(&self) -> windows_core::Result<bool>;
fn AddUserAsync3(
&self,
optAppId: &windows_core::HSTRING,
parentWindowId: &windows::UI::WindowId,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionUserResult>>;
fn StartSessionAsync2(
&self,
agentUserName: &windows_core::HSTRING,
parentWindowId: &windows::UI::WindowId,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionResult>>;
}
impl IIsoSessionOpsPreview4_Vtbl {
pub const fn new<Identity: IIsoSessionOpsPreview4_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn IsDeducedEnterpriseAgentUserSupported<
Identity: IIsoSessionOpsPreview4_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOpsPreview4_Impl::IsDeducedEnterpriseAgentUserSupported(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn AddUserAsync3<
Identity: IIsoSessionOpsPreview4_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
optappid: *mut core::ffi::c_void,
parentwindowid: windows::UI::WindowId,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOpsPreview4_Impl::AddUserAsync3(
this,
core::mem::transmute(&optappid),
core::mem::transmute(&parentwindowid),
) {
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 StartSessionAsync2<
Identity: IIsoSessionOpsPreview4_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
agentusername: *mut core::ffi::c_void,
parentwindowid: windows::UI::WindowId,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionOpsPreview4_Impl::StartSessionAsync2(
this,
core::mem::transmute(&agentusername),
core::mem::transmute(&parentwindowid),
) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IIsoSessionOpsPreview4, OFFSET>(
),
IsDeducedEnterpriseAgentUserSupported: IsDeducedEnterpriseAgentUserSupported::<
Identity,
OFFSET,
>,
AddUserAsync3: AddUserAsync3::<Identity, OFFSET>,
StartSessionAsync2: StartSessionAsync2::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionOpsPreview4 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionOpsPreview4_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsDeducedEnterpriseAgentUserSupported:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub AddUserAsync3: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows::UI::WindowId,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub StartSessionAsync2: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
windows::UI::WindowId,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IIsoSessionProcess,
IIsoSessionProcess_Vtbl,
0x1cccc074_ce04_527c_8b2f_d367930af570
);
impl windows_core::RuntimeType for IIsoSessionProcess {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionProcess {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionProcess";
}
pub trait IIsoSessionProcess_Impl: windows_core::IUnknownImpl {
fn ErrorHandle(&self) -> windows_core::Result<u64>;
fn ExitCode(&self) -> windows_core::Result<i32>;
fn InputHandle(&self) -> windows_core::Result<u64>;
fn OutputHandle(&self) -> windows_core::Result<u64>;
fn CloseStandardInput(&self) -> windows_core::Result<()>;
fn ResizeConsole(&self, columns: u16, rows: u16) -> windows_core::Result<()>;
fn SendCtrlClose(&self) -> windows_core::Result<()>;
fn Terminate(&self) -> windows_core::Result<()>;
fn WaitForExit(&self, timeoutMs: u32) -> windows_core::Result<i32>;
}
impl IIsoSessionProcess_Vtbl {
pub const fn new<Identity: IIsoSessionProcess_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn ErrorHandle<
Identity: IIsoSessionProcess_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut u64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcess_Impl::ErrorHandle(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn ExitCode<
Identity: IIsoSessionProcess_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut i32,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcess_Impl::ExitCode(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn InputHandle<
Identity: IIsoSessionProcess_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut u64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcess_Impl::InputHandle(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn OutputHandle<
Identity: IIsoSessionProcess_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut u64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcess_Impl::OutputHandle(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn CloseStandardInput<
Identity: IIsoSessionProcess_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);
IIsoSessionProcess_Impl::CloseStandardInput(this).into()
}
}
unsafe extern "system" fn ResizeConsole<
Identity: IIsoSessionProcess_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
columns: u16,
rows: u16,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IIsoSessionProcess_Impl::ResizeConsole(this, columns, rows).into()
}
}
unsafe extern "system" fn SendCtrlClose<
Identity: IIsoSessionProcess_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);
IIsoSessionProcess_Impl::SendCtrlClose(this).into()
}
}
unsafe extern "system" fn Terminate<
Identity: IIsoSessionProcess_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);
IIsoSessionProcess_Impl::Terminate(this).into()
}
}
unsafe extern "system" fn WaitForExit<
Identity: IIsoSessionProcess_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
timeoutms: u32,
result__: *mut i32,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcess_Impl::WaitForExit(this, timeoutms) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IIsoSessionProcess, OFFSET>(),
ErrorHandle: ErrorHandle::<Identity, OFFSET>,
ExitCode: ExitCode::<Identity, OFFSET>,
InputHandle: InputHandle::<Identity, OFFSET>,
OutputHandle: OutputHandle::<Identity, OFFSET>,
CloseStandardInput: CloseStandardInput::<Identity, OFFSET>,
ResizeConsole: ResizeConsole::<Identity, OFFSET>,
SendCtrlClose: SendCtrlClose::<Identity, OFFSET>,
Terminate: Terminate::<Identity, OFFSET>,
WaitForExit: WaitForExit::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionProcess as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionProcess_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub ErrorHandle:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub ExitCode:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
pub InputHandle:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub OutputHandle:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
pub CloseStandardInput:
unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub ResizeConsole:
unsafe extern "system" fn(*mut core::ffi::c_void, u16, u16) -> windows_core::HRESULT,
pub SendCtrlClose: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub Terminate: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
pub WaitForExit:
unsafe extern "system" fn(*mut core::ffi::c_void, u32, *mut i32) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IIsoSessionProcessOptions,
IIsoSessionProcessOptions_Vtbl,
0x20e0f2f6_3b48_5f60_b97c_e856754ded74
);
impl windows_core::RuntimeType for IIsoSessionProcessOptions {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionProcessOptions {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionProcessOptions";
}
pub trait IIsoSessionProcessOptions_Impl: windows_core::IUnknownImpl {
fn Environment(
&self,
) -> windows_core::Result<windows_collections::IMap<windows_core::HSTRING, windows_core::HSTRING>>;
fn InteractiveConsole(&self) -> windows_core::Result<bool>;
fn SetInteractiveConsole(&self, value: bool) -> windows_core::Result<()>;
fn RedirectStandardError(&self) -> windows_core::Result<bool>;
fn SetRedirectStandardError(&self, value: bool) -> windows_core::Result<()>;
fn RedirectStandardInput(&self) -> windows_core::Result<bool>;
fn SetRedirectStandardInput(&self, value: bool) -> windows_core::Result<()>;
fn RedirectStandardOutput(&self) -> windows_core::Result<bool>;
fn SetRedirectStandardOutput(&self, value: bool) -> windows_core::Result<()>;
fn TimeoutMilliseconds(&self) -> windows_core::Result<u32>;
fn SetTimeoutMilliseconds(&self, value: u32) -> windows_core::Result<()>;
fn WorkingDirectory(&self) -> windows_core::Result<windows_core::HSTRING>;
fn SetWorkingDirectory(&self, value: &windows_core::HSTRING) -> windows_core::Result<()>;
}
impl IIsoSessionProcessOptions_Vtbl {
pub const fn new<Identity: IIsoSessionProcessOptions_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Environment<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcessOptions_Impl::Environment(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 InteractiveConsole<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcessOptions_Impl::InteractiveConsole(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetInteractiveConsole<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IIsoSessionProcessOptions_Impl::SetInteractiveConsole(this, value).into()
}
}
unsafe extern "system" fn RedirectStandardError<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcessOptions_Impl::RedirectStandardError(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRedirectStandardError<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IIsoSessionProcessOptions_Impl::SetRedirectStandardError(this, value).into()
}
}
unsafe extern "system" fn RedirectStandardInput<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcessOptions_Impl::RedirectStandardInput(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRedirectStandardInput<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IIsoSessionProcessOptions_Impl::SetRedirectStandardInput(this, value).into()
}
}
unsafe extern "system" fn RedirectStandardOutput<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcessOptions_Impl::RedirectStandardOutput(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetRedirectStandardOutput<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IIsoSessionProcessOptions_Impl::SetRedirectStandardOutput(this, value).into()
}
}
unsafe extern "system" fn TimeoutMilliseconds<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut u32,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcessOptions_Impl::TimeoutMilliseconds(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn SetTimeoutMilliseconds<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: u32,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IIsoSessionProcessOptions_Impl::SetTimeoutMilliseconds(this, value).into()
}
}
unsafe extern "system" fn WorkingDirectory<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcessOptions_Impl::WorkingDirectory(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 SetWorkingDirectory<
Identity: IIsoSessionProcessOptions_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
value: *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IIsoSessionProcessOptions_Impl::SetWorkingDirectory(
this,
core::mem::transmute(&value),
)
.into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<
Identity,
IIsoSessionProcessOptions,
OFFSET,
>(),
Environment: Environment::<Identity, OFFSET>,
InteractiveConsole: InteractiveConsole::<Identity, OFFSET>,
SetInteractiveConsole: SetInteractiveConsole::<Identity, OFFSET>,
RedirectStandardError: RedirectStandardError::<Identity, OFFSET>,
SetRedirectStandardError: SetRedirectStandardError::<Identity, OFFSET>,
RedirectStandardInput: RedirectStandardInput::<Identity, OFFSET>,
SetRedirectStandardInput: SetRedirectStandardInput::<Identity, OFFSET>,
RedirectStandardOutput: RedirectStandardOutput::<Identity, OFFSET>,
SetRedirectStandardOutput: SetRedirectStandardOutput::<Identity, OFFSET>,
TimeoutMilliseconds: TimeoutMilliseconds::<Identity, OFFSET>,
SetTimeoutMilliseconds: SetTimeoutMilliseconds::<Identity, OFFSET>,
WorkingDirectory: WorkingDirectory::<Identity, OFFSET>,
SetWorkingDirectory: SetWorkingDirectory::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionProcessOptions as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionProcessOptions_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Environment: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub InteractiveConsole:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetInteractiveConsole:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub RedirectStandardError:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetRedirectStandardError:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub RedirectStandardInput:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetRedirectStandardInput:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub RedirectStandardOutput:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub SetRedirectStandardOutput:
unsafe extern "system" fn(*mut core::ffi::c_void, bool) -> windows_core::HRESULT,
pub TimeoutMilliseconds:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
pub SetTimeoutMilliseconds:
unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
pub WorkingDirectory: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub SetWorkingDirectory: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IIsoSessionProcessPreview2,
IIsoSessionProcessPreview2_Vtbl,
0xeb6a3efa_736d_5301_a241_6d36eda0905a
);
impl windows_core::RuntimeType for IIsoSessionProcessPreview2 {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionProcessPreview2 {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionProcessPreview2";
}
pub trait IIsoSessionProcessPreview2_Impl: windows_core::IUnknownImpl {
fn IsRunning(&self) -> windows_core::Result<bool>;
fn Exited(
&self,
handler: windows_core::Ref<
'_,
windows::Foundation::TypedEventHandler<IsoSessionProcess, windows_core::IInspectable>,
>,
) -> windows_core::Result<i64>;
fn RemoveExited(&self, token: i64) -> windows_core::Result<()>;
}
impl IIsoSessionProcessPreview2_Vtbl {
pub const fn new<Identity: IIsoSessionProcessPreview2_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn IsRunning<
Identity: IIsoSessionProcessPreview2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut bool,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcessPreview2_Impl::IsRunning(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn Exited<
Identity: IIsoSessionProcessPreview2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
handler: *mut core::ffi::c_void,
result__: *mut i64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcessPreview2_Impl::Exited(
this,
core::mem::transmute_copy(&handler),
) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
unsafe extern "system" fn RemoveExited<
Identity: IIsoSessionProcessPreview2_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
token: i64,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IIsoSessionProcessPreview2_Impl::RemoveExited(this, token).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<
Identity,
IIsoSessionProcessPreview2,
OFFSET,
>(),
IsRunning: IsRunning::<Identity, OFFSET>,
Exited: Exited::<Identity, OFFSET>,
RemoveExited: RemoveExited::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionProcessPreview2 as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionProcessPreview2_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub IsRunning:
unsafe extern "system" fn(*mut core::ffi::c_void, *mut bool) -> windows_core::HRESULT,
pub Exited: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut core::ffi::c_void,
*mut i64,
) -> windows_core::HRESULT,
pub RemoveExited:
unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IIsoSessionProcessResult,
IIsoSessionProcessResult_Vtbl,
0x30c5f8a5_efb8_5872_b8f9_be625090b9ba
);
impl windows_core::RuntimeType for IIsoSessionProcessResult {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionProcessResult {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionProcessResult";
}
pub trait IIsoSessionProcessResult_Impl: windows_core::IUnknownImpl {
fn Error(&self) -> windows_core::Result<IsoSessionError>;
fn Process(&self) -> windows_core::Result<IsoSessionProcess>;
}
impl IIsoSessionProcessResult_Vtbl {
pub const fn new<Identity: IIsoSessionProcessResult_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Error<
Identity: IIsoSessionProcessResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcessResult_Impl::Error(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 Process<
Identity: IIsoSessionProcessResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionProcessResult_Impl::Process(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<
Identity,
IIsoSessionProcessResult,
OFFSET,
>(),
Error: Error::<Identity, OFFSET>,
Process: Process::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionProcessResult as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionProcessResult_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Error: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub Process: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IIsoSessionResult,
IIsoSessionResult_Vtbl,
0xc0f5de66_c487_571c_87a0_13a0854a7db0
);
impl windows_core::RuntimeType for IIsoSessionResult {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionResult {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionResult";
}
pub trait IIsoSessionResult_Impl: windows_core::IUnknownImpl {
fn Error(&self) -> windows_core::Result<IsoSessionError>;
}
impl IIsoSessionResult_Vtbl {
pub const fn new<Identity: IIsoSessionResult_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn Error<Identity: IIsoSessionResult_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionResult_Impl::Error(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IIsoSessionResult, OFFSET>(),
Error: Error::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionResult as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionResult_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub Error: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
windows_core::imp::define_interface!(
IIsoSessionUserResult,
IIsoSessionUserResult_Vtbl,
0x8733fb07_cce2_5483_95a7_0a68cbd7641a
);
impl windows_core::RuntimeType for IIsoSessionUserResult {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_interface::<Self>();
}
impl windows_core::RuntimeName for IIsoSessionUserResult {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IIsoSessionUserResult";
}
pub trait IIsoSessionUserResult_Impl: windows_core::IUnknownImpl {
fn AgentUserName(&self) -> windows_core::Result<windows_core::HSTRING>;
fn AgentUserSid(&self) -> windows_core::Result<windows_core::HSTRING>;
fn EphemeralWorkspacePath(&self) -> windows_core::Result<windows_core::HSTRING>;
fn Error(&self) -> windows_core::Result<IsoSessionError>;
}
impl IIsoSessionUserResult_Vtbl {
pub const fn new<Identity: IIsoSessionUserResult_Impl, const OFFSET: isize>() -> Self {
unsafe extern "system" fn AgentUserName<
Identity: IIsoSessionUserResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionUserResult_Impl::AgentUserName(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 AgentUserSid<
Identity: IIsoSessionUserResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionUserResult_Impl::AgentUserSid(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 EphemeralWorkspacePath<
Identity: IIsoSessionUserResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionUserResult_Impl::EphemeralWorkspacePath(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 Error<
Identity: IIsoSessionUserResult_Impl,
const OFFSET: isize,
>(
this: *mut core::ffi::c_void,
result__: *mut *mut core::ffi::c_void,
) -> windows_core::HRESULT {
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IIsoSessionUserResult_Impl::Error(this) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
core::mem::forget(ok__);
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IIsoSessionUserResult, OFFSET>(
),
AgentUserName: AgentUserName::<Identity, OFFSET>,
AgentUserSid: AgentUserSid::<Identity, OFFSET>,
EphemeralWorkspacePath: EphemeralWorkspacePath::<Identity, OFFSET>,
Error: Error::<Identity, OFFSET>,
}
}
pub fn matches(iid: &windows_core::GUID) -> bool {
iid == &<IIsoSessionUserResult as windows_core::Interface>::IID
}
}
#[repr(C)]
#[doc(hidden)]
pub struct IIsoSessionUserResult_Vtbl {
pub base__: windows_core::IInspectable_Vtbl,
pub AgentUserName: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub AgentUserSid: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub EphemeralWorkspacePath: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
pub Error: unsafe extern "system" fn(
*mut core::ffi::c_void,
*mut *mut core::ffi::c_void,
) -> windows_core::HRESULT,
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IsoSessionError(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
IsoSessionError,
windows_core::IUnknown,
windows_core::IInspectable
);
impl IsoSessionError {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<
R,
F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>,
>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<
IsoSessionError,
windows_core::imp::IGenericFactory,
> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn Code(&self) -> windows_core::Result<windows_core::HRESULT> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Code)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn IsError(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsError)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn Message(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Message)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| core::mem::transmute(result__))
}
}
pub fn Remediation(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Remediation)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| core::mem::transmute(result__))
}
}
pub fn Diagnostics(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IIsoSessionErrorPreview2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Diagnostics)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| core::mem::transmute(result__))
}
}
pub fn FailingStage(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IIsoSessionErrorPreview2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).FailingStage)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| core::mem::transmute(result__))
}
}
pub fn UnderlyingError(&self) -> windows_core::Result<windows_core::HRESULT> {
let this = &windows_core::Interface::cast::<IIsoSessionErrorPreview2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).UnderlyingError)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn Format(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = &windows_core::Interface::cast::<IIsoSessionErrorPreview3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Format)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| core::mem::transmute(result__))
}
}
}
impl windows_core::RuntimeType for IsoSessionError {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IIsoSessionError>();
}
unsafe impl windows_core::Interface for IsoSessionError {
type Vtable = <IIsoSessionError as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IIsoSessionError as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for IsoSessionError {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IsoSessionError";
}
unsafe impl Send for IsoSessionError {}
unsafe impl Sync for IsoSessionError {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct IsoSessionFeature(pub i32);
impl IsoSessionFeature {
pub const Unknown: Self = Self(0i32);
pub const LocalAgentUser: Self = Self(1i32);
pub const EnterpriseAgentUser: Self = Self(2i32);
pub const AppScopedRegistration: Self = Self(3i32);
pub const DeducedEnterpriseAgentUser: Self = Self(4i32);
}
impl windows_core::TypeKind for IsoSessionFeature {
type TypeKind = windows_core::CopyType;
}
impl windows_core::RuntimeType for IsoSessionFeature {
const SIGNATURE: windows_core::imp::ConstBuffer = windows_core::imp::ConstBuffer::from_slice(
b"enum(Windows.AI.IsolationSession.Preview.IsoSessionFeature;i4)",
);
}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IsoSessionOps(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
IsoSessionOps,
windows_core::IUnknown,
windows_core::IInspectable
);
impl IsoSessionOps {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<
R,
F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>,
>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<
IsoSessionOps,
windows_core::imp::IGenericFactory,
> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn BehaviorVersion(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).BehaviorVersion)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn AddUserAsync(
&self,
optenterpriseaccountname: &windows_core::HSTRING,
optwamtoken: &windows_core::HSTRING,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionUserResult>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AddUserAsync)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(optenterpriseaccountname),
core::mem::transmute_copy(optwamtoken),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn GetFeatureLevel(&self, feature: IsoSessionFeature) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).GetFeatureLevel)(
windows_core::Interface::as_raw(this),
feature,
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveUserAsync(
&self,
agentusername: &windows_core::HSTRING,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionResult>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RemoveUserAsync)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(agentusername),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn RunProcessWithOptionsAsync<P3>(
&self,
agentusername: &windows_core::HSTRING,
processpath: &windows_core::HSTRING,
arguments: &windows_core::HSTRING,
options: P3,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionProcessResult>>
where
P3: windows_core::Param<IsoSessionProcessOptions>,
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RunProcessWithOptionsAsync)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(agentusername),
core::mem::transmute_copy(processpath),
core::mem::transmute_copy(arguments),
options.param().abi(),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn StartSessionAsync(
&self,
agentusername: &windows_core::HSTRING,
optwamtoken: &windows_core::HSTRING,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionResult>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).StartSessionAsync)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(agentusername),
core::mem::transmute_copy(optwamtoken),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn StopSessionAsync(
&self,
agentusername: &windows_core::HSTRING,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionResult>> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).StopSessionAsync)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(agentusername),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn AddUserAsync2(
&self,
optappid: &windows_core::HSTRING,
optenterpriseaccountname: &windows_core::HSTRING,
optwamtoken: &windows_core::HSTRING,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionUserResult>> {
let this = &windows_core::Interface::cast::<IIsoSessionOpsPreview2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AddUserAsync2)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(optappid),
core::mem::transmute_copy(optenterpriseaccountname),
core::mem::transmute_copy(optwamtoken),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn IsLocalAgentUserSupported(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IIsoSessionOpsPreview3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsLocalAgentUserSupported)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn IsEnterpriseAgentUserSupported(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IIsoSessionOpsPreview3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsEnterpriseAgentUserSupported)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn IsAppScopedRegistrationSupported(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IIsoSessionOpsPreview3>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsAppScopedRegistrationSupported)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn IsDeducedEnterpriseAgentUserSupported(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IIsoSessionOpsPreview4>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsDeducedEnterpriseAgentUserSupported)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn AddUserAsync3(
&self,
optappid: &windows_core::HSTRING,
parentwindowid: windows::UI::WindowId,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionUserResult>> {
let this = &windows_core::Interface::cast::<IIsoSessionOpsPreview4>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AddUserAsync3)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(optappid),
parentwindowid,
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn StartSessionAsync2(
&self,
agentusername: &windows_core::HSTRING,
parentwindowid: windows::UI::WindowId,
) -> windows_core::Result<windows_future::IAsyncOperation<IsoSessionResult>> {
let this = &windows_core::Interface::cast::<IIsoSessionOpsPreview4>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).StartSessionAsync2)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(agentusername),
parentwindowid,
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for IsoSessionOps {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IIsoSessionOps>();
}
unsafe impl windows_core::Interface for IsoSessionOps {
type Vtable = <IIsoSessionOps as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IIsoSessionOps as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for IsoSessionOps {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IsoSessionOps";
}
unsafe impl Send for IsoSessionOps {}
unsafe impl Sync for IsoSessionOps {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IsoSessionProcess(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
IsoSessionProcess,
windows_core::IUnknown,
windows_core::IInspectable
);
windows_core::imp::required_hierarchy!(IsoSessionProcess, windows::Foundation::IClosable);
impl IsoSessionProcess {
pub fn Close(&self) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<windows::Foundation::IClosable>(self)?;
unsafe {
(windows_core::Interface::vtable(this).Close)(windows_core::Interface::as_raw(this))
.ok()
}
}
pub fn ErrorHandle(&self) -> windows_core::Result<u64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ErrorHandle)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn ExitCode(&self) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).ExitCode)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn InputHandle(&self) -> windows_core::Result<u64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).InputHandle)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn OutputHandle(&self) -> windows_core::Result<u64> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).OutputHandle)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn CloseStandardInput(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).CloseStandardInput)(
windows_core::Interface::as_raw(this),
)
.ok()
}
}
pub fn ResizeConsole(&self, columns: u16, rows: u16) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).ResizeConsole)(
windows_core::Interface::as_raw(this),
columns,
rows,
)
.ok()
}
}
pub fn SendCtrlClose(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SendCtrlClose)(windows_core::Interface::as_raw(
this,
))
.ok()
}
}
pub fn Terminate(&self) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).Terminate)(windows_core::Interface::as_raw(this))
.ok()
}
}
pub fn WaitForExit(&self, timeoutms: u32) -> windows_core::Result<i32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).WaitForExit)(
windows_core::Interface::as_raw(this),
timeoutms,
&mut result__,
)
.map(|| result__)
}
}
pub fn IsRunning(&self) -> windows_core::Result<bool> {
let this = &windows_core::Interface::cast::<IIsoSessionProcessPreview2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).IsRunning)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn Exited<P0>(&self, handler: P0) -> windows_core::Result<i64>
where
P0: windows_core::Param<
windows::Foundation::TypedEventHandler<IsoSessionProcess, windows_core::IInspectable>,
>,
{
let this = &windows_core::Interface::cast::<IIsoSessionProcessPreview2>(self)?;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Exited)(
windows_core::Interface::as_raw(this),
handler.param().abi(),
&mut result__,
)
.map(|| result__)
}
}
pub fn RemoveExited(&self, token: i64) -> windows_core::Result<()> {
let this = &windows_core::Interface::cast::<IIsoSessionProcessPreview2>(self)?;
unsafe {
(windows_core::Interface::vtable(this).RemoveExited)(
windows_core::Interface::as_raw(this),
token,
)
.ok()
}
}
}
impl windows_core::RuntimeType for IsoSessionProcess {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IIsoSessionProcess>();
}
unsafe impl windows_core::Interface for IsoSessionProcess {
type Vtable = <IIsoSessionProcess as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IIsoSessionProcess as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for IsoSessionProcess {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IsoSessionProcess";
}
unsafe impl Send for IsoSessionProcess {}
unsafe impl Sync for IsoSessionProcess {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IsoSessionProcessOptions(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
IsoSessionProcessOptions,
windows_core::IUnknown,
windows_core::IInspectable
);
impl IsoSessionProcessOptions {
pub fn new() -> windows_core::Result<Self> {
Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
}
fn IActivationFactory<
R,
F: FnOnce(&windows_core::imp::IGenericFactory) -> windows_core::Result<R>,
>(
callback: F,
) -> windows_core::Result<R> {
static SHARED: windows_core::imp::FactoryCache<
IsoSessionProcessOptions,
windows_core::imp::IGenericFactory,
> = windows_core::imp::FactoryCache::new();
SHARED.call(callback)
}
pub fn Environment(
&self,
) -> windows_core::Result<windows_collections::IMap<windows_core::HSTRING, windows_core::HSTRING>>
{
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Environment)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn InteractiveConsole(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).InteractiveConsole)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetInteractiveConsole(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetInteractiveConsole)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RedirectStandardError(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RedirectStandardError)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetRedirectStandardError(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetRedirectStandardError)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RedirectStandardInput(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RedirectStandardInput)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetRedirectStandardInput(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetRedirectStandardInput)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn RedirectStandardOutput(&self) -> windows_core::Result<bool> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).RedirectStandardOutput)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetRedirectStandardOutput(&self, value: bool) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetRedirectStandardOutput)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn TimeoutMilliseconds(&self) -> windows_core::Result<u32> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).TimeoutMilliseconds)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| result__)
}
}
pub fn SetTimeoutMilliseconds(&self, value: u32) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetTimeoutMilliseconds)(
windows_core::Interface::as_raw(this),
value,
)
.ok()
}
}
pub fn WorkingDirectory(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).WorkingDirectory)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| core::mem::transmute(result__))
}
}
pub fn SetWorkingDirectory(&self, value: &windows_core::HSTRING) -> windows_core::Result<()> {
let this = self;
unsafe {
(windows_core::Interface::vtable(this).SetWorkingDirectory)(
windows_core::Interface::as_raw(this),
core::mem::transmute_copy(value),
)
.ok()
}
}
}
impl windows_core::RuntimeType for IsoSessionProcessOptions {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IIsoSessionProcessOptions>();
}
unsafe impl windows_core::Interface for IsoSessionProcessOptions {
type Vtable = <IIsoSessionProcessOptions as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IIsoSessionProcessOptions as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for IsoSessionProcessOptions {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IsoSessionProcessOptions";
}
unsafe impl Send for IsoSessionProcessOptions {}
unsafe impl Sync for IsoSessionProcessOptions {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IsoSessionProcessResult(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
IsoSessionProcessResult,
windows_core::IUnknown,
windows_core::IInspectable
);
impl IsoSessionProcessResult {
pub fn Error(&self) -> windows_core::Result<IsoSessionError> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Error)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
pub fn Process(&self) -> windows_core::Result<IsoSessionProcess> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Process)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for IsoSessionProcessResult {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IIsoSessionProcessResult>();
}
unsafe impl windows_core::Interface for IsoSessionProcessResult {
type Vtable = <IIsoSessionProcessResult as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IIsoSessionProcessResult as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for IsoSessionProcessResult {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IsoSessionProcessResult";
}
unsafe impl Send for IsoSessionProcessResult {}
unsafe impl Sync for IsoSessionProcessResult {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IsoSessionResult(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
IsoSessionResult,
windows_core::IUnknown,
windows_core::IInspectable
);
impl IsoSessionResult {
pub fn Error(&self) -> windows_core::Result<IsoSessionError> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Error)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for IsoSessionResult {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IIsoSessionResult>();
}
unsafe impl windows_core::Interface for IsoSessionResult {
type Vtable = <IIsoSessionResult as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IIsoSessionResult as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for IsoSessionResult {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IsoSessionResult";
}
unsafe impl Send for IsoSessionResult {}
unsafe impl Sync for IsoSessionResult {}
#[repr(transparent)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct IsoSessionUserResult(windows_core::IUnknown);
windows_core::imp::interface_hierarchy!(
IsoSessionUserResult,
windows_core::IUnknown,
windows_core::IInspectable
);
impl IsoSessionUserResult {
pub fn AgentUserName(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AgentUserName)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| core::mem::transmute(result__))
}
}
pub fn AgentUserSid(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).AgentUserSid)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| core::mem::transmute(result__))
}
}
pub fn EphemeralWorkspacePath(&self) -> windows_core::Result<windows_core::HSTRING> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).EphemeralWorkspacePath)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.map(|| core::mem::transmute(result__))
}
}
pub fn Error(&self) -> windows_core::Result<IsoSessionError> {
let this = self;
unsafe {
let mut result__ = core::mem::zeroed();
(windows_core::Interface::vtable(this).Error)(
windows_core::Interface::as_raw(this),
&mut result__,
)
.and_then(|| windows_core::Type::from_abi(result__))
}
}
}
impl windows_core::RuntimeType for IsoSessionUserResult {
const SIGNATURE: windows_core::imp::ConstBuffer =
windows_core::imp::ConstBuffer::for_class::<Self, IIsoSessionUserResult>();
}
unsafe impl windows_core::Interface for IsoSessionUserResult {
type Vtable = <IIsoSessionUserResult as windows_core::Interface>::Vtable;
const IID: windows_core::GUID = <IIsoSessionUserResult as windows_core::Interface>::IID;
}
impl windows_core::RuntimeName for IsoSessionUserResult {
const NAME: &'static str = "Windows.AI.IsolationSession.Preview.IsoSessionUserResult";
}
unsafe impl Send for IsoSessionUserResult {}
unsafe impl Sync for IsoSessionUserResult {}