// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Security_Isolation_H #define WINRT_Windows_Security_Isolation_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Security.Isolation.2.h" namespace winrt::impl { template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment::Id() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment::StartProcessSilentlyAsync(param::hstring const& hostExePath, param::hstring const& arguments, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentActivator const& activator) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->StartProcessSilentlyAsync(*(void**)(&hostExePath), *(void**)(&arguments), static_cast(activator), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StartProcessSilentlyAsync(*(void**)(&hostExePath), *(void**)(&arguments), static_cast(activator), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment::StartProcessSilentlyAsync(param::hstring const& hostExePath, param::hstring const& arguments, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentActivator const& activator, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->StartProcessSilentlyWithTelemetryAsync(*(void**)(&hostExePath), *(void**)(&arguments), static_cast(activator), *(void**)(&telemetryParameters), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StartProcessSilentlyWithTelemetryAsync(*(void**)(&hostExePath), *(void**)(&arguments), static_cast(activator), *(void**)(&telemetryParameters), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment::ShareFolderAsync(param::hstring const& hostFolder, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderRequestOptions const& requestOptions) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ShareFolderAsync(*(void**)(&hostFolder), *(void**)(&requestOptions), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShareFolderAsync(*(void**)(&hostFolder), *(void**)(&requestOptions), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment::ShareFolderAsync(param::hstring const& hostFolder, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderRequestOptions const& requestOptions, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ShareFolderWithTelemetryAsync(*(void**)(&hostFolder), *(void**)(&requestOptions), *(void**)(&telemetryParameters), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShareFolderWithTelemetryAsync(*(void**)(&hostFolder), *(void**)(&requestOptions), *(void**)(&telemetryParameters), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment::LaunchFileWithUIAsync(param::hstring const& appExePath, param::hstring const& argumentsTemplate, param::hstring const& filePath) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LaunchFileWithUIAsync(*(void**)(&appExePath), *(void**)(&argumentsTemplate), *(void**)(&filePath), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchFileWithUIAsync(*(void**)(&appExePath), *(void**)(&argumentsTemplate), *(void**)(&filePath), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment::LaunchFileWithUIAsync(param::hstring const& appExePath, param::hstring const& argumentsTemplate, param::hstring const& filePath, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LaunchFileWithUIAndTelemetryAsync(*(void**)(&appExePath), *(void**)(&argumentsTemplate), *(void**)(&filePath), *(void**)(&telemetryParameters), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchFileWithUIAndTelemetryAsync(*(void**)(&appExePath), *(void**)(&argumentsTemplate), *(void**)(&filePath), *(void**)(&telemetryParameters), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment::TerminateAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TerminateAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TerminateAsync(&operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment::TerminateAsync(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TerminateWithTelemetryAsync(*(void**)(&telemetryParameters), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TerminateWithTelemetryAsync(*(void**)(&telemetryParameters), &operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment::RegisterMessageReceiver(winrt::guid const& receiverId, winrt::Windows::Security::Isolation::MessageReceivedCallback const& messageReceivedCallback) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RegisterMessageReceiver(impl::bind_in(receiverId), *(void**)(&messageReceivedCallback))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterMessageReceiver(impl::bind_in(receiverId), *(void**)(&messageReceivedCallback))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment::UnregisterMessageReceiver(winrt::guid const& receiverId) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->UnregisterMessageReceiver(impl::bind_in(receiverId))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UnregisterMessageReceiver(impl::bind_in(receiverId))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment2::PostMessageToReceiverAsync(winrt::guid const& receiverId, param::async_iterable const& message) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->PostMessageToReceiverAsync(impl::bind_in(receiverId), *(void**)(&message), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PostMessageToReceiverAsync(impl::bind_in(receiverId), *(void**)(&message), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment2::PostMessageToReceiverAsync(winrt::guid const& receiverId, param::async_iterable const& message, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->PostMessageToReceiverWithTelemetryAsync(impl::bind_in(receiverId), *(void**)(&message), *(void**)(&telemetryParameters), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PostMessageToReceiverWithTelemetryAsync(impl::bind_in(receiverId), *(void**)(&message), *(void**)(&telemetryParameters), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment3::GetUserInfo() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetUserInfo(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetUserInfo(&result)); } return winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentUserInfo{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment3::ShareFileAsync(param::hstring const& filePath, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFileRequestOptions const& options) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ShareFileAsync(*(void**)(&filePath), *(void**)(&options), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShareFileAsync(*(void**)(&filePath), *(void**)(&options), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment3::ShareFileAsync(param::hstring const& filePath, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFileRequestOptions const& options, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ShareFileWithTelemetryAsync(*(void**)(&filePath), *(void**)(&options), *(void**)(&telemetryParameters), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShareFileWithTelemetryAsync(*(void**)(&filePath), *(void**)(&options), *(void**)(&telemetryParameters), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment4::ChangePriority(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentCreationPriority const& Priority) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ChangePriority(static_cast(Priority))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ChangePriority(static_cast(Priority))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentCreateResult::Status() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentCreateResult::ExtendedError() const { winrt::hresult value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentCreateResult::Environment() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Environment(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Environment(&value)); } return winrt::Windows::Security::Isolation::IsolatedWindowsEnvironment{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentCreateResult2::ChangeCreationPriority(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentCreationPriority const& priority) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ChangeCreationPriority(static_cast(priority))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ChangeCreationPriority(static_cast(priority))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFactory::CreateAsync(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOptions const& options) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateAsync(*(void**)(&options), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateAsync(*(void**)(&options), &operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFactory::CreateAsync(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOptions const& options, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateWithTelemetryAsync(*(void**)(&options), *(void**)(&telemetryParameters), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithTelemetryAsync(*(void**)(&options), *(void**)(&telemetryParameters), &operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFactory::GetById(param::hstring const& environmentId) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetById(*(void**)(&environmentId), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetById(*(void**)(&environmentId), &result)); } return winrt::Windows::Security::Isolation::IsolatedWindowsEnvironment{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFactory::FindByOwnerId(param::hstring const& environmentOwnerId) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindByOwnerId(*(void**)(&environmentOwnerId), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindByOwnerId(*(void**)(&environmentOwnerId), &result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFile::Id() const { winrt::guid value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(put_abi(value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFile::HostPath() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_HostPath(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HostPath(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFile::Close() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Close()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Close()); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFile2::GuestPath() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_GuestPath(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GuestPath(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFile2::IsReadOnly() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsReadOnly(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsReadOnly(&value)); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentHostStatics::IsReady() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsReady(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsReady(&value)); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentHostStatics::HostErrors() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_HostErrors(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HostErrors(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentLaunchFileResult::Status() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentLaunchFileStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentLaunchFileResult::ExtendedError() const { winrt::hresult value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentLaunchFileResult::File() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_File(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_File(&value)); } return winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentFile{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::EnvironmentOwnerId() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_EnvironmentOwnerId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EnvironmentOwnerId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::EnvironmentOwnerId(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_EnvironmentOwnerId(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_EnvironmentOwnerId(*(void**)(&value))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::AllowedClipboardFormats() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentAllowedClipboardFormats value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AllowedClipboardFormats(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AllowedClipboardFormats(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::AllowedClipboardFormats(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentAllowedClipboardFormats const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AllowedClipboardFormats(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AllowedClipboardFormats(static_cast(value))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::ClipboardCopyPasteDirections() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentClipboardCopyPasteDirections value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ClipboardCopyPasteDirections(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ClipboardCopyPasteDirections(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::ClipboardCopyPasteDirections(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentClipboardCopyPasteDirections const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ClipboardCopyPasteDirections(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ClipboardCopyPasteDirections(static_cast(value))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::AvailablePrinters() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentAvailablePrinters value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AvailablePrinters(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AvailablePrinters(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::AvailablePrinters(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentAvailablePrinters const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AvailablePrinters(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AvailablePrinters(static_cast(value))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::SharedHostFolderPath() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SharedHostFolderPath(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SharedHostFolderPath(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::SharedFolderNameInEnvironment() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SharedFolderNameInEnvironment(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SharedFolderNameInEnvironment(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::ShareHostFolderForUntrustedItems(param::hstring const& SharedHostFolderPath, param::hstring const& ShareFolderNameInEnvironment) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ShareHostFolderForUntrustedItems(*(void**)(&SharedHostFolderPath), *(void**)(&ShareFolderNameInEnvironment))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShareHostFolderForUntrustedItems(*(void**)(&SharedHostFolderPath), *(void**)(&ShareFolderNameInEnvironment))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::PersistUserProfile() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PersistUserProfile(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PersistUserProfile(&value)); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::PersistUserProfile(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_PersistUserProfile(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PersistUserProfile(value)); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::AllowGraphicsHardwareAcceleration() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AllowGraphicsHardwareAcceleration(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AllowGraphicsHardwareAcceleration(&value)); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::AllowGraphicsHardwareAcceleration(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AllowGraphicsHardwareAcceleration(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AllowGraphicsHardwareAcceleration(value)); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::AllowCameraAndMicrophoneAccess() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AllowCameraAndMicrophoneAccess(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AllowCameraAndMicrophoneAccess(&value)); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions::AllowCameraAndMicrophoneAccess(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AllowCameraAndMicrophoneAccess(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AllowCameraAndMicrophoneAccess(value)); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions2::WindowAnnotationOverride() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_WindowAnnotationOverride(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WindowAnnotationOverride(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions2::WindowAnnotationOverride(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_WindowAnnotationOverride(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_WindowAnnotationOverride(*(void**)(&value))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions3::AllowedClipboardFormatsToEnvironment() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentAllowedClipboardFormats value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AllowedClipboardFormatsToEnvironment(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AllowedClipboardFormatsToEnvironment(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions3::AllowedClipboardFormatsToEnvironment(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentAllowedClipboardFormats const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AllowedClipboardFormatsToEnvironment(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AllowedClipboardFormatsToEnvironment(static_cast(value))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions3::AllowedClipboardFormatsToHost() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentAllowedClipboardFormats value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AllowedClipboardFormatsToHost(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AllowedClipboardFormatsToHost(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions3::AllowedClipboardFormatsToHost(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentAllowedClipboardFormats const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AllowedClipboardFormatsToHost(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AllowedClipboardFormatsToHost(static_cast(value))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions3::CreationPriority() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentCreationPriority value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CreationPriority(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CreationPriority(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions3::CreationPriority(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentCreationPriority const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_CreationPriority(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CreationPriority(static_cast(value))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationData::ShareableFolders() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ShareableFolders(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ShareableFolders(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationData::ProcessesRunnableAsSystem() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ProcessesRunnableAsSystem(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProcessesRunnableAsSystem(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationData::ProcessesRunnableAsUser() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ProcessesRunnableAsUser(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProcessesRunnableAsUser(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationData::ActivationFileExtensions() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ActivationFileExtensions(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ActivationFileExtensions(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationResult::Status() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationResult::ExtendedError() const { winrt::hresult value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationStatics::Register(param::hstring const& ownerName, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationData const& ownerRegistrationData) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Register(*(void**)(&ownerName), *(void**)(&ownerRegistrationData), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Register(*(void**)(&ownerName), *(void**)(&ownerRegistrationData), &result)); } return winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationResult{ result, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationStatics::Unregister(param::hstring const& ownerName) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Unregister(*(void**)(&ownerName))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Unregister(*(void**)(&ownerName))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentPostMessageResult::Status() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentPostMessageStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentPostMessageResult::ExtendedError() const { winrt::hresult value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentProcess::State() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentProcessState value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_State(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_State(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentProcess::ExitCode() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ExitCode(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExitCode(&value)); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentProcess::WaitForExit() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->WaitForExit()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WaitForExit()); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentProcess::WaitForExitWithTimeout(uint32_t timeoutMilliseconds) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->WaitForExitWithTimeout(timeoutMilliseconds)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WaitForExitWithTimeout(timeoutMilliseconds)); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentProcess::WaitForExitAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->WaitForExitAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WaitForExitAsync(&operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFileRequestOptions::AllowWrite() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AllowWrite(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AllowWrite(&value)); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFileRequestOptions::AllowWrite(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AllowWrite(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AllowWrite(value)); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFileResult::Status() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFileStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFileResult::ExtendedError() const { winrt::hresult value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFileResult::File() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_File(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_File(&value)); } return winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentFile{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFolderRequestOptions::AllowWrite() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AllowWrite(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AllowWrite(&value)); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFolderRequestOptions::AllowWrite(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AllowWrite(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AllowWrite(value)); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFolderResult::Status() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFolderResult::ExtendedError() const { winrt::hresult value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentStartProcessResult::Status() const { winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentStartProcessStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentStartProcessResult::ExtendedError() const { winrt::hresult value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentStartProcessResult::Process() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Process(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Process(&value)); } return winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentProcess{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentTelemetryParameters::CorrelationId() const { winrt::guid value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CorrelationId(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CorrelationId(put_abi(value))); } return value; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentTelemetryParameters::CorrelationId(winrt::guid const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_CorrelationId(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CorrelationId(impl::bind_in(value))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentUserInfo::EnvironmentUserSid() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_EnvironmentUserSid(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EnvironmentUserSid(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentUserInfo::EnvironmentUserName() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_EnvironmentUserName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EnvironmentUserName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentUserInfo::TryWaitForSignInAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryWaitForSignInAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryWaitForSignInAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentUserInfo2::TryWaitForSignInWithProgressAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryWaitForSignInWithProgressAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryWaitForSignInWithProgressAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsHostMessengerStatics::PostMessageToReceiver(winrt::guid const& receiverId, param::vector_view const& message) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->PostMessageToReceiver(impl::bind_in(receiverId), *(void**)(&message))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PostMessageToReceiver(impl::bind_in(receiverId), *(void**)(&message))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsHostMessengerStatics::GetFileId(param::hstring const& filePath) const { winrt::guid result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetFileId(*(void**)(&filePath), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetFileId(*(void**)(&filePath), put_abi(result))); } return result; } template auto consume_Windows_Security_Isolation_IIsolatedWindowsHostMessengerStatics2::RegisterHostMessageReceiver(winrt::guid const& receiverId, winrt::Windows::Security::Isolation::HostMessageReceivedCallback const& hostMessageReceivedCallback) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RegisterHostMessageReceiver(impl::bind_in(receiverId), *(void**)(&hostMessageReceivedCallback))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterHostMessageReceiver(impl::bind_in(receiverId), *(void**)(&hostMessageReceivedCallback))); } } template auto consume_Windows_Security_Isolation_IIsolatedWindowsHostMessengerStatics2::UnregisterHostMessageReceiver(winrt::guid const& receiverId) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->UnregisterHostMessageReceiver(impl::bind_in(receiverId))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UnregisterHostMessageReceiver(impl::bind_in(receiverId))); } } template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(winrt::guid receiverId, void* message) noexcept final try { (*this)(*reinterpret_cast(&receiverId), *reinterpret_cast const*>(&message)); return 0; } catch (...) { return to_hresult(); } }; template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(winrt::guid receiverId, void* message) noexcept final try { (*this)(*reinterpret_cast(&receiverId), *reinterpret_cast const*>(&message)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StartProcessSilentlyAsync(void* hostExePath, void* arguments, int32_t activator, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().StartProcessSilentlyAsync(*reinterpret_cast(&hostExePath), *reinterpret_cast(&arguments), *reinterpret_cast(&activator))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StartProcessSilentlyWithTelemetryAsync(void* hostExePath, void* arguments, int32_t activator, void* telemetryParameters, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().StartProcessSilentlyAsync(*reinterpret_cast(&hostExePath), *reinterpret_cast(&arguments), *reinterpret_cast(&activator), *reinterpret_cast(&telemetryParameters))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShareFolderAsync(void* hostFolder, void* requestOptions, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().ShareFolderAsync(*reinterpret_cast(&hostFolder), *reinterpret_cast(&requestOptions))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShareFolderWithTelemetryAsync(void* hostFolder, void* requestOptions, void* telemetryParameters, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().ShareFolderAsync(*reinterpret_cast(&hostFolder), *reinterpret_cast(&requestOptions), *reinterpret_cast(&telemetryParameters))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchFileWithUIAsync(void* appExePath, void* argumentsTemplate, void* filePath, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchFileWithUIAsync(*reinterpret_cast(&appExePath), *reinterpret_cast(&argumentsTemplate), *reinterpret_cast(&filePath))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchFileWithUIAndTelemetryAsync(void* appExePath, void* argumentsTemplate, void* filePath, void* telemetryParameters, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchFileWithUIAsync(*reinterpret_cast(&appExePath), *reinterpret_cast(&argumentsTemplate), *reinterpret_cast(&filePath), *reinterpret_cast(&telemetryParameters))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TerminateAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().TerminateAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TerminateWithTelemetryAsync(void* telemetryParameters, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().TerminateAsync(*reinterpret_cast(&telemetryParameters))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RegisterMessageReceiver(winrt::guid receiverId, void* messageReceivedCallback) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterMessageReceiver(*reinterpret_cast(&receiverId), *reinterpret_cast(&messageReceivedCallback)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UnregisterMessageReceiver(winrt::guid receiverId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UnregisterMessageReceiver(*reinterpret_cast(&receiverId)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall PostMessageToReceiverAsync(winrt::guid receiverId, void* message, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().PostMessageToReceiverAsync(*reinterpret_cast(&receiverId), *reinterpret_cast const*>(&message))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PostMessageToReceiverWithTelemetryAsync(winrt::guid receiverId, void* message, void* telemetryParameters, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().PostMessageToReceiverAsync(*reinterpret_cast(&receiverId), *reinterpret_cast const*>(&message), *reinterpret_cast(&telemetryParameters))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetUserInfo(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetUserInfo()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShareFileAsync(void* filePath, void* options, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().ShareFileAsync(*reinterpret_cast(&filePath), *reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShareFileWithTelemetryAsync(void* filePath, void* options, void* telemetryParameters, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().ShareFileAsync(*reinterpret_cast(&filePath), *reinterpret_cast(&options), *reinterpret_cast(&telemetryParameters))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ChangePriority(int32_t Priority) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ChangePriority(*reinterpret_cast(&Priority)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedError()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Environment(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Environment()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ChangeCreationPriority(int32_t priority) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ChangeCreationPriority(*reinterpret_cast(&priority)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateAsync(void* options, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateAsync(*reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithTelemetryAsync(void* options, void* telemetryParameters, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateAsync(*reinterpret_cast(&options), *reinterpret_cast(&telemetryParameters))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetById(void* environmentId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetById(*reinterpret_cast(&environmentId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindByOwnerId(void* environmentOwnerId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().FindByOwnerId(*reinterpret_cast(&environmentOwnerId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HostPath(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HostPath()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Close() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Close(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_GuestPath(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GuestPath()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsReadOnly(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsReadOnly()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsReady(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsReady()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HostErrors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().HostErrors()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedError()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_File(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().File()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_EnvironmentOwnerId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EnvironmentOwnerId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_EnvironmentOwnerId(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnvironmentOwnerId(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AllowedClipboardFormats(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowedClipboardFormats()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowedClipboardFormats(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowedClipboardFormats(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ClipboardCopyPasteDirections(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClipboardCopyPasteDirections()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ClipboardCopyPasteDirections(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClipboardCopyPasteDirections(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AvailablePrinters(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AvailablePrinters()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AvailablePrinters(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AvailablePrinters(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SharedHostFolderPath(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SharedHostFolderPath()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SharedFolderNameInEnvironment(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SharedFolderNameInEnvironment()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShareHostFolderForUntrustedItems(void* SharedHostFolderPath, void* ShareFolderNameInEnvironment) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShareHostFolderForUntrustedItems(*reinterpret_cast(&SharedHostFolderPath), *reinterpret_cast(&ShareFolderNameInEnvironment)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PersistUserProfile(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PersistUserProfile()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PersistUserProfile(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PersistUserProfile(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AllowGraphicsHardwareAcceleration(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowGraphicsHardwareAcceleration()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowGraphicsHardwareAcceleration(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowGraphicsHardwareAcceleration(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AllowCameraAndMicrophoneAccess(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowCameraAndMicrophoneAccess()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowCameraAndMicrophoneAccess(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowCameraAndMicrophoneAccess(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WindowAnnotationOverride(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WindowAnnotationOverride()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_WindowAnnotationOverride(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().WindowAnnotationOverride(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AllowedClipboardFormatsToEnvironment(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowedClipboardFormatsToEnvironment()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowedClipboardFormatsToEnvironment(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowedClipboardFormatsToEnvironment(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AllowedClipboardFormatsToHost(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowedClipboardFormatsToHost()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowedClipboardFormatsToHost(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowedClipboardFormatsToHost(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CreationPriority(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreationPriority()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CreationPriority(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CreationPriority(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ShareableFolders(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ShareableFolders()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProcessesRunnableAsSystem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ProcessesRunnableAsSystem()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProcessesRunnableAsUser(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ProcessesRunnableAsUser()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ActivationFileExtensions(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ActivationFileExtensions()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedError()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Register(void* ownerName, void* ownerRegistrationData, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Register(*reinterpret_cast(&ownerName), *reinterpret_cast(&ownerRegistrationData))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Unregister(void* ownerName) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Unregister(*reinterpret_cast(&ownerName)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedError()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_State(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExitCode(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExitCode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall WaitForExit() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().WaitForExit(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall WaitForExitWithTimeout(uint32_t timeoutMilliseconds) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().WaitForExitWithTimeout(timeoutMilliseconds); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall WaitForExitAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().WaitForExitAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AllowWrite(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowWrite()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowWrite(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowWrite(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedError()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_File(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().File()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AllowWrite(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowWrite()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowWrite(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowWrite(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedError()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedError()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Process(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Process()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CorrelationId(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CorrelationId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CorrelationId(winrt::guid value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CorrelationId(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_EnvironmentUserSid(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EnvironmentUserSid()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EnvironmentUserName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EnvironmentUserName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryWaitForSignInAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().TryWaitForSignInAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryWaitForSignInWithProgressAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().TryWaitForSignInWithProgressAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall PostMessageToReceiver(winrt::guid receiverId, void* message) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PostMessageToReceiver(*reinterpret_cast(&receiverId), *reinterpret_cast const*>(&message)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFileId(void* filePath, winrt::guid* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetFileId(*reinterpret_cast(&filePath))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RegisterHostMessageReceiver(winrt::guid receiverId, void* hostMessageReceivedCallback) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterHostMessageReceiver(*reinterpret_cast(&receiverId), *reinterpret_cast(&hostMessageReceivedCallback)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UnregisterHostMessageReceiver(winrt::guid receiverId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UnregisterHostMessageReceiver(*reinterpret_cast(&receiverId)); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Security::Isolation { constexpr auto operator|(IsolatedWindowsEnvironmentAllowedClipboardFormats const left, IsolatedWindowsEnvironmentAllowedClipboardFormats const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(IsolatedWindowsEnvironmentAllowedClipboardFormats& left, IsolatedWindowsEnvironmentAllowedClipboardFormats const right) noexcept { left = left | right; return left; } constexpr auto operator&(IsolatedWindowsEnvironmentAllowedClipboardFormats const left, IsolatedWindowsEnvironmentAllowedClipboardFormats const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(IsolatedWindowsEnvironmentAllowedClipboardFormats& left, IsolatedWindowsEnvironmentAllowedClipboardFormats const right) noexcept { left = left & right; return left; } constexpr auto operator~(IsolatedWindowsEnvironmentAllowedClipboardFormats const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(IsolatedWindowsEnvironmentAllowedClipboardFormats const left, IsolatedWindowsEnvironmentAllowedClipboardFormats const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(IsolatedWindowsEnvironmentAllowedClipboardFormats& left, IsolatedWindowsEnvironmentAllowedClipboardFormats const right) noexcept { left = left ^ right; return left; } constexpr auto operator|(IsolatedWindowsEnvironmentAvailablePrinters const left, IsolatedWindowsEnvironmentAvailablePrinters const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(IsolatedWindowsEnvironmentAvailablePrinters& left, IsolatedWindowsEnvironmentAvailablePrinters const right) noexcept { left = left | right; return left; } constexpr auto operator&(IsolatedWindowsEnvironmentAvailablePrinters const left, IsolatedWindowsEnvironmentAvailablePrinters const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(IsolatedWindowsEnvironmentAvailablePrinters& left, IsolatedWindowsEnvironmentAvailablePrinters const right) noexcept { left = left & right; return left; } constexpr auto operator~(IsolatedWindowsEnvironmentAvailablePrinters const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(IsolatedWindowsEnvironmentAvailablePrinters const left, IsolatedWindowsEnvironmentAvailablePrinters const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(IsolatedWindowsEnvironmentAvailablePrinters& left, IsolatedWindowsEnvironmentAvailablePrinters const right) noexcept { left = left ^ right; return left; } constexpr auto operator|(IsolatedWindowsEnvironmentClipboardCopyPasteDirections const left, IsolatedWindowsEnvironmentClipboardCopyPasteDirections const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(IsolatedWindowsEnvironmentClipboardCopyPasteDirections& left, IsolatedWindowsEnvironmentClipboardCopyPasteDirections const right) noexcept { left = left | right; return left; } constexpr auto operator&(IsolatedWindowsEnvironmentClipboardCopyPasteDirections const left, IsolatedWindowsEnvironmentClipboardCopyPasteDirections const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(IsolatedWindowsEnvironmentClipboardCopyPasteDirections& left, IsolatedWindowsEnvironmentClipboardCopyPasteDirections const right) noexcept { left = left & right; return left; } constexpr auto operator~(IsolatedWindowsEnvironmentClipboardCopyPasteDirections const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(IsolatedWindowsEnvironmentClipboardCopyPasteDirections const left, IsolatedWindowsEnvironmentClipboardCopyPasteDirections const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(IsolatedWindowsEnvironmentClipboardCopyPasteDirections& left, IsolatedWindowsEnvironmentClipboardCopyPasteDirections const right) noexcept { left = left ^ right; return left; } inline auto IsolatedWindowsEnvironment::CreateAsync(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOptions const& options) { return impl::call_factory([&](IIsolatedWindowsEnvironmentFactory const& f) { return f.CreateAsync(options); }); } inline auto IsolatedWindowsEnvironment::CreateAsync(winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOptions const& options, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) { return impl::call_factory([&](IIsolatedWindowsEnvironmentFactory const& f) { return f.CreateAsync(options, telemetryParameters); }); } inline auto IsolatedWindowsEnvironment::GetById(param::hstring const& environmentId) { return impl::call_factory([&](IIsolatedWindowsEnvironmentFactory const& f) { return f.GetById(environmentId); }); } inline auto IsolatedWindowsEnvironment::FindByOwnerId(param::hstring const& environmentOwnerId) { return impl::call_factory([&](IIsolatedWindowsEnvironmentFactory const& f) { return f.FindByOwnerId(environmentOwnerId); }); } inline auto IsolatedWindowsEnvironmentHost::IsReady() { return impl::call_factory_cast([](IIsolatedWindowsEnvironmentHostStatics const& f) { return f.IsReady(); }); } inline auto IsolatedWindowsEnvironmentHost::HostErrors() { return impl::call_factory_cast(*)(IIsolatedWindowsEnvironmentHostStatics const&), IsolatedWindowsEnvironmentHost, IIsolatedWindowsEnvironmentHostStatics>([](IIsolatedWindowsEnvironmentHostStatics const& f) { return f.HostErrors(); }); } inline IsolatedWindowsEnvironmentOptions::IsolatedWindowsEnvironmentOptions() : IsolatedWindowsEnvironmentOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto IsolatedWindowsEnvironmentOwnerRegistration::Register(param::hstring const& ownerName, winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationData const& ownerRegistrationData) { return impl::call_factory([&](IIsolatedWindowsEnvironmentOwnerRegistrationStatics const& f) { return f.Register(ownerName, ownerRegistrationData); }); } inline auto IsolatedWindowsEnvironmentOwnerRegistration::Unregister(param::hstring const& ownerName) { impl::call_factory([&](IIsolatedWindowsEnvironmentOwnerRegistrationStatics const& f) { return f.Unregister(ownerName); }); } inline IsolatedWindowsEnvironmentOwnerRegistrationData::IsolatedWindowsEnvironmentOwnerRegistrationData() : IsolatedWindowsEnvironmentOwnerRegistrationData(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline IsolatedWindowsEnvironmentShareFileRequestOptions::IsolatedWindowsEnvironmentShareFileRequestOptions() : IsolatedWindowsEnvironmentShareFileRequestOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline IsolatedWindowsEnvironmentShareFolderRequestOptions::IsolatedWindowsEnvironmentShareFolderRequestOptions() : IsolatedWindowsEnvironmentShareFolderRequestOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline IsolatedWindowsEnvironmentTelemetryParameters::IsolatedWindowsEnvironmentTelemetryParameters() : IsolatedWindowsEnvironmentTelemetryParameters(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto IsolatedWindowsHostMessenger::PostMessageToReceiver(winrt::guid const& receiverId, param::vector_view const& message) { impl::call_factory([&](IIsolatedWindowsHostMessengerStatics const& f) { return f.PostMessageToReceiver(receiverId, message); }); } inline auto IsolatedWindowsHostMessenger::GetFileId(param::hstring const& filePath) { return impl::call_factory([&](IIsolatedWindowsHostMessengerStatics const& f) { return f.GetFileId(filePath); }); } inline auto IsolatedWindowsHostMessenger::RegisterHostMessageReceiver(winrt::guid const& receiverId, winrt::Windows::Security::Isolation::HostMessageReceivedCallback const& hostMessageReceivedCallback) { impl::call_factory([&](IIsolatedWindowsHostMessengerStatics2 const& f) { return f.RegisterHostMessageReceiver(receiverId, hostMessageReceivedCallback); }); } inline auto IsolatedWindowsHostMessenger::UnregisterHostMessageReceiver(winrt::guid const& receiverId) { impl::call_factory([&](IIsolatedWindowsHostMessengerStatics2 const& f) { return f.UnregisterHostMessageReceiver(receiverId); }); } template HostMessageReceivedCallback::HostMessageReceivedCallback(L handler) : HostMessageReceivedCallback(impl::make_delegate(std::forward(handler))) { } template HostMessageReceivedCallback::HostMessageReceivedCallback(F* handler) : HostMessageReceivedCallback([=](auto&&... args) { return handler(args...); }) { } template HostMessageReceivedCallback::HostMessageReceivedCallback(O* object, M method) : HostMessageReceivedCallback([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template HostMessageReceivedCallback::HostMessageReceivedCallback(com_ptr&& object, M method) : HostMessageReceivedCallback([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template HostMessageReceivedCallback::HostMessageReceivedCallback(weak_ref&& object, LM&& lambda_or_method) : HostMessageReceivedCallback([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template HostMessageReceivedCallback::HostMessageReceivedCallback(std::shared_ptr&& object, M method) : HostMessageReceivedCallback([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template HostMessageReceivedCallback::HostMessageReceivedCallback(std::weak_ptr&& object, LM&& lambda_or_method) : HostMessageReceivedCallback([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto HostMessageReceivedCallback::operator()(winrt::guid const& receiverId, param::vector_view const& message) const { check_hresult((*(impl::abi_t**)this)->Invoke(impl::bind_in(receiverId), *(void**)(&message))); } template MessageReceivedCallback::MessageReceivedCallback(L handler) : MessageReceivedCallback(impl::make_delegate(std::forward(handler))) { } template MessageReceivedCallback::MessageReceivedCallback(F* handler) : MessageReceivedCallback([=](auto&&... args) { return handler(args...); }) { } template MessageReceivedCallback::MessageReceivedCallback(O* object, M method) : MessageReceivedCallback([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template MessageReceivedCallback::MessageReceivedCallback(com_ptr&& object, M method) : MessageReceivedCallback([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template MessageReceivedCallback::MessageReceivedCallback(weak_ref&& object, LM&& lambda_or_method) : MessageReceivedCallback([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template MessageReceivedCallback::MessageReceivedCallback(std::shared_ptr&& object, M method) : MessageReceivedCallback([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template MessageReceivedCallback::MessageReceivedCallback(std::weak_ptr&& object, LM&& lambda_or_method) : MessageReceivedCallback([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto MessageReceivedCallback::operator()(winrt::guid const& receiverId, param::vector_view const& message) const { check_hresult((*(impl::abi_t**)this)->Invoke(impl::bind_in(receiverId), *(void**)(&message))); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif