// C++/WinRT v2.0.190620.2

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#ifndef WINRT_Windows_Security_Isolation_H
#define WINRT_Windows_Security_Isolation_H
#include "base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers.");
#include "impl/Windows.Foundation.2.h"
#include "impl/Windows.Foundation.Collections.2.h"
#include "impl/Windows.Security.Isolation.2.h"
namespace winrt::impl
{
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment<D>::Id() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment)->get_Id(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment<D>::StartProcessSilentlyAsync(param::hstring const& hostExePath, param::hstring const& arguments, Windows::Security::Isolation::IsolatedWindowsEnvironmentActivator const& activator) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment)->StartProcessSilentlyAsync(*(void**)(&hostExePath), *(void**)(&arguments), static_cast<int32_t>(activator), &operation));
        return Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentStartProcessResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment<D>::StartProcessSilentlyAsync(param::hstring const& hostExePath, param::hstring const& arguments, Windows::Security::Isolation::IsolatedWindowsEnvironmentActivator const& activator, Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment)->StartProcessSilentlyWithTelemetryAsync(*(void**)(&hostExePath), *(void**)(&arguments), static_cast<int32_t>(activator), *(void**)(&telemetryParameters), &operation));
        return Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentStartProcessResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment<D>::ShareFolderAsync(param::hstring const& hostFolder, Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderRequestOptions const& requestOptions) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment)->ShareFolderAsync(*(void**)(&hostFolder), *(void**)(&requestOptions), &operation));
        return Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment<D>::ShareFolderAsync(param::hstring const& hostFolder, Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderRequestOptions const& requestOptions, Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment)->ShareFolderWithTelemetryAsync(*(void**)(&hostFolder), *(void**)(&requestOptions), *(void**)(&telemetryParameters), &operation));
        return Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment<D>::LaunchFileWithUIAsync(param::hstring const& appExePath, param::hstring const& argumentsTemplate, param::hstring const& filePath) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment)->LaunchFileWithUIAsync(*(void**)(&appExePath), *(void**)(&argumentsTemplate), *(void**)(&filePath), &operation));
        return Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentLaunchFileResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment<D>::LaunchFileWithUIAsync(param::hstring const& appExePath, param::hstring const& argumentsTemplate, param::hstring const& filePath, Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment)->LaunchFileWithUIAndTelemetryAsync(*(void**)(&appExePath), *(void**)(&argumentsTemplate), *(void**)(&filePath), *(void**)(&telemetryParameters), &operation));
        return Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentLaunchFileResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment<D>::TerminateAsync() const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment)->TerminateAsync(&operation));
        return Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment<D>::TerminateAsync(Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment)->TerminateWithTelemetryAsync(*(void**)(&telemetryParameters), &operation));
        return Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment<D>::RegisterMessageReceiver(winrt::guid const& receiverId, Windows::Security::Isolation::MessageReceivedCallback const& messageReceivedCallback) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment)->RegisterMessageReceiver(impl::bind_in(receiverId), *(void**)(&messageReceivedCallback)));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment<D>::UnregisterMessageReceiver(winrt::guid const& receiverId) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment)->UnregisterMessageReceiver(impl::bind_in(receiverId)));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment2<D>::PostMessageToReceiverAsync(winrt::guid const& receiverId, param::async_iterable<Windows::Foundation::IInspectable> const& message) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment2)->PostMessageToReceiverAsync(impl::bind_in(receiverId), *(void**)(&message), &operation));
        return Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentPostMessageResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironment2<D>::PostMessageToReceiverAsync(winrt::guid const& receiverId, param::async_iterable<Windows::Foundation::IInspectable> const& message, Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironment2)->PostMessageToReceiverWithTelemetryAsync(impl::bind_in(receiverId), *(void**)(&message), *(void**)(&telemetryParameters), &operation));
        return Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentPostMessageResult>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentCreateResult<D>::Status() const
    {
        Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateStatus value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentCreateResult)->get_Status(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentCreateResult<D>::ExtendedError() const
    {
        winrt::hresult value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentCreateResult)->get_ExtendedError(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentCreateResult<D>::Environment() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentCreateResult)->get_Environment(&value));
        return Windows::Security::Isolation::IsolatedWindowsEnvironment{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFactory<D>::CreateAsync(Windows::Security::Isolation::IsolatedWindowsEnvironmentOptions const& options) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentFactory)->CreateAsync(*(void**)(&options), &operation));
        return Windows::Foundation::IAsyncOperationWithProgress<Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateResult, Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateProgress>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFactory<D>::CreateAsync(Windows::Security::Isolation::IsolatedWindowsEnvironmentOptions const& options, Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters) const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentFactory)->CreateWithTelemetryAsync(*(void**)(&options), *(void**)(&telemetryParameters), &operation));
        return Windows::Foundation::IAsyncOperationWithProgress<Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateResult, Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateProgress>{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFactory<D>::GetById(param::hstring const& environmentId) const
    {
        void* result{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentFactory)->GetById(*(void**)(&environmentId), &result));
        return Windows::Security::Isolation::IsolatedWindowsEnvironment{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFactory<D>::FindByOwnerId(param::hstring const& environmentOwnerId) const
    {
        void* result{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentFactory)->FindByOwnerId(*(void**)(&environmentOwnerId), &result));
        return Windows::Foundation::Collections::IVectorView<Windows::Security::Isolation::IsolatedWindowsEnvironment>{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFile<D>::Id() const
    {
        winrt::guid value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentFile)->get_Id(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFile<D>::HostPath() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentFile)->get_HostPath(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentFile<D>::Close() const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentFile)->Close());
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentHostStatics<D>::IsReady() const
    {
        bool value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentHostStatics)->get_IsReady(&value));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentHostStatics<D>::HostErrors() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentHostStatics)->get_HostErrors(&value));
        return Windows::Foundation::Collections::IVectorView<Windows::Security::Isolation::IsolatedWindowsEnvironmentHostError>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentLaunchFileResult<D>::Status() const
    {
        Windows::Security::Isolation::IsolatedWindowsEnvironmentLaunchFileStatus value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentLaunchFileResult)->get_Status(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentLaunchFileResult<D>::ExtendedError() const
    {
        winrt::hresult value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentLaunchFileResult)->get_ExtendedError(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentLaunchFileResult<D>::File() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentLaunchFileResult)->get_File(&value));
        return Windows::Security::Isolation::IsolatedWindowsEnvironmentFile{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::EnvironmentOwnerId() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->get_EnvironmentOwnerId(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::EnvironmentOwnerId(param::hstring const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->put_EnvironmentOwnerId(*(void**)(&value)));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::AllowedClipboardFormats() const
    {
        Windows::Security::Isolation::IsolatedWindowsEnvironmentAllowedClipboardFormats value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->get_AllowedClipboardFormats(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::AllowedClipboardFormats(Windows::Security::Isolation::IsolatedWindowsEnvironmentAllowedClipboardFormats const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->put_AllowedClipboardFormats(static_cast<uint32_t>(value)));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::ClipboardCopyPasteDirections() const
    {
        Windows::Security::Isolation::IsolatedWindowsEnvironmentClipboardCopyPasteDirections value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->get_ClipboardCopyPasteDirections(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::ClipboardCopyPasteDirections(Windows::Security::Isolation::IsolatedWindowsEnvironmentClipboardCopyPasteDirections const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->put_ClipboardCopyPasteDirections(static_cast<uint32_t>(value)));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::AvailablePrinters() const
    {
        Windows::Security::Isolation::IsolatedWindowsEnvironmentAvailablePrinters value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->get_AvailablePrinters(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::AvailablePrinters(Windows::Security::Isolation::IsolatedWindowsEnvironmentAvailablePrinters const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->put_AvailablePrinters(static_cast<uint32_t>(value)));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::SharedHostFolderPath() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->get_SharedHostFolderPath(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::SharedFolderNameInEnvironment() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->get_SharedFolderNameInEnvironment(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::ShareHostFolderForUntrustedItems(param::hstring const& SharedHostFolderPath, param::hstring const& ShareFolderNameInEnvironment) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->ShareHostFolderForUntrustedItems(*(void**)(&SharedHostFolderPath), *(void**)(&ShareFolderNameInEnvironment)));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::PersistUserProfile() const
    {
        bool value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->get_PersistUserProfile(&value));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::PersistUserProfile(bool value) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->put_PersistUserProfile(value));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::AllowGraphicsHardwareAcceleration() const
    {
        bool value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->get_AllowGraphicsHardwareAcceleration(&value));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::AllowGraphicsHardwareAcceleration(bool value) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->put_AllowGraphicsHardwareAcceleration(value));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::AllowCameraAndMicrophoneAccess() const
    {
        bool value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->get_AllowCameraAndMicrophoneAccess(&value));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOptions<D>::AllowCameraAndMicrophoneAccess(bool value) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions)->put_AllowCameraAndMicrophoneAccess(value));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationData<D>::ShareableFolders() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationData)->get_ShareableFolders(&value));
        return Windows::Foundation::Collections::IVector<hstring>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationData<D>::ProcessesRunnableAsSystem() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationData)->get_ProcessesRunnableAsSystem(&value));
        return Windows::Foundation::Collections::IVector<hstring>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationData<D>::ProcessesRunnableAsUser() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationData)->get_ProcessesRunnableAsUser(&value));
        return Windows::Foundation::Collections::IVector<hstring>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationData<D>::ActivationFileExtensions() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationData)->get_ActivationFileExtensions(&value));
        return Windows::Foundation::Collections::IVector<hstring>{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationResult<D>::Status() const
    {
        Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationStatus value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationResult)->get_Status(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationResult<D>::ExtendedError() const
    {
        winrt::hresult value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationResult)->get_ExtendedError(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationStatics<D>::Register(param::hstring const& ownerName, Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationData const& ownerRegistrationData) const
    {
        void* result{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationStatics)->Register(*(void**)(&ownerName), *(void**)(&ownerRegistrationData), &result));
        return Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationResult{ result, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentOwnerRegistrationStatics<D>::Unregister(param::hstring const& ownerName) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationStatics)->Unregister(*(void**)(&ownerName)));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentPostMessageResult<D>::Status() const
    {
        Windows::Security::Isolation::IsolatedWindowsEnvironmentPostMessageStatus value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentPostMessageResult)->get_Status(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentPostMessageResult<D>::ExtendedError() const
    {
        winrt::hresult value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentPostMessageResult)->get_ExtendedError(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentProcess<D>::State() const
    {
        Windows::Security::Isolation::IsolatedWindowsEnvironmentProcessState value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentProcess)->get_State(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentProcess<D>::ExitCode() const
    {
        uint32_t value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentProcess)->get_ExitCode(&value));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentProcess<D>::WaitForExit() const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentProcess)->WaitForExit());
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentProcess<D>::WaitForExitWithTimeout(uint32_t timeoutMilliseconds) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentProcess)->WaitForExitWithTimeout(timeoutMilliseconds));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentProcess<D>::WaitForExitAsync() const
    {
        void* operation{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentProcess)->WaitForExitAsync(&operation));
        return Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFolderRequestOptions<D>::AllowWrite() const
    {
        bool value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentShareFolderRequestOptions)->get_AllowWrite(&value));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFolderRequestOptions<D>::AllowWrite(bool value) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentShareFolderRequestOptions)->put_AllowWrite(value));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFolderResult<D>::Status() const
    {
        Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderStatus value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentShareFolderResult)->get_Status(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentShareFolderResult<D>::ExtendedError() const
    {
        winrt::hresult value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentShareFolderResult)->get_ExtendedError(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentStartProcessResult<D>::Status() const
    {
        Windows::Security::Isolation::IsolatedWindowsEnvironmentStartProcessStatus value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentStartProcessResult)->get_Status(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentStartProcessResult<D>::ExtendedError() const
    {
        winrt::hresult value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentStartProcessResult)->get_ExtendedError(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentStartProcessResult<D>::Process() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentStartProcessResult)->get_Process(&value));
        return Windows::Security::Isolation::IsolatedWindowsEnvironmentProcess{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentTelemetryParameters<D>::CorrelationId() const
    {
        winrt::guid value;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentTelemetryParameters)->get_CorrelationId(put_abi(value)));
        return value;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsEnvironmentTelemetryParameters<D>::CorrelationId(winrt::guid const& value) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsEnvironmentTelemetryParameters)->put_CorrelationId(impl::bind_in(value)));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsHostMessengerStatics<D>::PostMessageToReceiver(winrt::guid const& receiverId, param::vector_view<Windows::Foundation::IInspectable> const& message) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics)->PostMessageToReceiver(impl::bind_in(receiverId), *(void**)(&message)));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsHostMessengerStatics<D>::GetFileId(param::hstring const& filePath) const
    {
        winrt::guid result;
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics)->GetFileId(*(void**)(&filePath), put_abi(result)));
        return result;
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsHostMessengerStatics2<D>::RegisterHostMessageReceiver(winrt::guid const& receiverId, Windows::Security::Isolation::HostMessageReceivedCallback const& hostMessageReceivedCallback) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics2)->RegisterHostMessageReceiver(impl::bind_in(receiverId), *(void**)(&hostMessageReceivedCallback)));
    }
    template <typename D> auto consume_Windows_Security_Isolation_IIsolatedWindowsHostMessengerStatics2<D>::UnregisterHostMessageReceiver(winrt::guid const& receiverId) const
    {
        check_hresult(WINRT_IMPL_SHIM(Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics2)->UnregisterHostMessageReceiver(impl::bind_in(receiverId)));
    }
    template <typename H> struct delegate<Windows::Security::Isolation::HostMessageReceivedCallback, H> : implements_delegate<Windows::Security::Isolation::HostMessageReceivedCallback, H>
    {
        delegate(H&& handler) : implements_delegate<Windows::Security::Isolation::HostMessageReceivedCallback, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(winrt::guid receiverId, void* message) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::guid const*>(&receiverId), *reinterpret_cast<Windows::Foundation::Collections::IVectorView<Windows::Foundation::IInspectable> const*>(&message));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename H> struct delegate<Windows::Security::Isolation::MessageReceivedCallback, H> : implements_delegate<Windows::Security::Isolation::MessageReceivedCallback, H>
    {
        delegate(H&& handler) : implements_delegate<Windows::Security::Isolation::MessageReceivedCallback, H>(std::forward<H>(handler)) {}

        int32_t __stdcall Invoke(winrt::guid receiverId, void* message) noexcept final try
        {
            (*this)(*reinterpret_cast<winrt::guid const*>(&receiverId), *reinterpret_cast<Windows::Foundation::Collections::IVectorView<Windows::Foundation::IInspectable> const*>(&message));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironment> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironment>
    {
        int32_t __stdcall get_Id(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(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<Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentStartProcessResult>>(this->shim().StartProcessSilentlyAsync(*reinterpret_cast<hstring const*>(&hostExePath), *reinterpret_cast<hstring const*>(&arguments), *reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentActivator const*>(&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<Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentStartProcessResult>>(this->shim().StartProcessSilentlyAsync(*reinterpret_cast<hstring const*>(&hostExePath), *reinterpret_cast<hstring const*>(&arguments), *reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentActivator const*>(&activator), *reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const*>(&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<Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderResult>>(this->shim().ShareFolderAsync(*reinterpret_cast<hstring const*>(&hostFolder), *reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderRequestOptions const*>(&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<Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderResult>>(this->shim().ShareFolderAsync(*reinterpret_cast<hstring const*>(&hostFolder), *reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderRequestOptions const*>(&requestOptions), *reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const*>(&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<Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentLaunchFileResult>>(this->shim().LaunchFileWithUIAsync(*reinterpret_cast<hstring const*>(&appExePath), *reinterpret_cast<hstring const*>(&argumentsTemplate), *reinterpret_cast<hstring const*>(&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<Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentLaunchFileResult>>(this->shim().LaunchFileWithUIAsync(*reinterpret_cast<hstring const*>(&appExePath), *reinterpret_cast<hstring const*>(&argumentsTemplate), *reinterpret_cast<hstring const*>(&filePath), *reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const*>(&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<Windows::Foundation::IAsyncAction>(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<Windows::Foundation::IAsyncAction>(this->shim().TerminateAsync(*reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const*>(&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<winrt::guid const*>(&receiverId), *reinterpret_cast<Windows::Security::Isolation::MessageReceivedCallback const*>(&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<winrt::guid const*>(&receiverId));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironment2> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironment2>
    {
        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<Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentPostMessageResult>>(this->shim().PostMessageToReceiverAsync(*reinterpret_cast<winrt::guid const*>(&receiverId), *reinterpret_cast<Windows::Foundation::Collections::IIterable<Windows::Foundation::IInspectable> 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<Windows::Foundation::IAsyncOperation<Windows::Security::Isolation::IsolatedWindowsEnvironmentPostMessageResult>>(this->shim().PostMessageToReceiverAsync(*reinterpret_cast<winrt::guid const*>(&receiverId), *reinterpret_cast<Windows::Foundation::Collections::IIterable<Windows::Foundation::IInspectable> const*>(&message), *reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const*>(&telemetryParameters)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentCreateResult> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentCreateResult>
    {
        int32_t __stdcall get_Status(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateStatus>(this->shim().Status());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try
        {
            zero_abi<winrt::hresult>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::hresult>(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<Windows::Security::Isolation::IsolatedWindowsEnvironment>(this->shim().Environment());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentFactory> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentFactory>
    {
        int32_t __stdcall CreateAsync(void* options, void** operation) noexcept final try
        {
            clear_abi(operation);
            typename D::abi_guard guard(this->shim());
            *operation = detach_from<Windows::Foundation::IAsyncOperationWithProgress<Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateResult, Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateProgress>>(this->shim().CreateAsync(*reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentOptions const*>(&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<Windows::Foundation::IAsyncOperationWithProgress<Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateResult, Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateProgress>>(this->shim().CreateAsync(*reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentOptions const*>(&options), *reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const*>(&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<Windows::Security::Isolation::IsolatedWindowsEnvironment>(this->shim().GetById(*reinterpret_cast<hstring const*>(&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<Windows::Foundation::Collections::IVectorView<Windows::Security::Isolation::IsolatedWindowsEnvironment>>(this->shim().FindByOwnerId(*reinterpret_cast<hstring const*>(&environmentOwnerId)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentFile> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentFile>
    {
        int32_t __stdcall get_Id(winrt::guid* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::guid>(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<hstring>(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(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentHostStatics> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentHostStatics>
    {
        int32_t __stdcall get_IsReady(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(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<Windows::Foundation::Collections::IVectorView<Windows::Security::Isolation::IsolatedWindowsEnvironmentHostError>>(this->shim().HostErrors());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentLaunchFileResult> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentLaunchFileResult>
    {
        int32_t __stdcall get_Status(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Security::Isolation::IsolatedWindowsEnvironmentLaunchFileStatus>(this->shim().Status());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try
        {
            zero_abi<winrt::hresult>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::hresult>(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<Windows::Security::Isolation::IsolatedWindowsEnvironmentFile>(this->shim().File());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions>
    {
        int32_t __stdcall get_EnvironmentOwnerId(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(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<hstring const*>(&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<Windows::Security::Isolation::IsolatedWindowsEnvironmentAllowedClipboardFormats>(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<Windows::Security::Isolation::IsolatedWindowsEnvironmentAllowedClipboardFormats const*>(&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<Windows::Security::Isolation::IsolatedWindowsEnvironmentClipboardCopyPasteDirections>(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<Windows::Security::Isolation::IsolatedWindowsEnvironmentClipboardCopyPasteDirections const*>(&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<Windows::Security::Isolation::IsolatedWindowsEnvironmentAvailablePrinters>(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<Windows::Security::Isolation::IsolatedWindowsEnvironmentAvailablePrinters const*>(&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<hstring>(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<hstring>(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<hstring const*>(&SharedHostFolderPath), *reinterpret_cast<hstring const*>(&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<bool>(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<bool>(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<bool>(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(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationData> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationData>
    {
        int32_t __stdcall get_ShareableFolders(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Foundation::Collections::IVector<hstring>>(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<Windows::Foundation::Collections::IVector<hstring>>(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<Windows::Foundation::Collections::IVector<hstring>>(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<Windows::Foundation::Collections::IVector<hstring>>(this->shim().ActivationFileExtensions());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationResult> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationResult>
    {
        int32_t __stdcall get_Status(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationStatus>(this->shim().Status());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try
        {
            zero_abi<winrt::hresult>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::hresult>(this->shim().ExtendedError());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationStatics> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationStatics>
    {
        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<Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationResult>(this->shim().Register(*reinterpret_cast<hstring const*>(&ownerName), *reinterpret_cast<Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationData const*>(&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<hstring const*>(&ownerName));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentPostMessageResult> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentPostMessageResult>
    {
        int32_t __stdcall get_Status(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Security::Isolation::IsolatedWindowsEnvironmentPostMessageStatus>(this->shim().Status());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try
        {
            zero_abi<winrt::hresult>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::hresult>(this->shim().ExtendedError());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentProcess> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentProcess>
    {
        int32_t __stdcall get_State(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Security::Isolation::IsolatedWindowsEnvironmentProcessState>(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<uint32_t>(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<Windows::Foundation::IAsyncAction>(this->shim().WaitForExitAsync());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentShareFolderRequestOptions> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentShareFolderRequestOptions>
    {
        int32_t __stdcall get_AllowWrite(bool* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<bool>(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(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentShareFolderResult> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentShareFolderResult>
    {
        int32_t __stdcall get_Status(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderStatus>(this->shim().Status());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try
        {
            zero_abi<winrt::hresult>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::hresult>(this->shim().ExtendedError());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentStartProcessResult> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentStartProcessResult>
    {
        int32_t __stdcall get_Status(int32_t* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Security::Isolation::IsolatedWindowsEnvironmentStartProcessStatus>(this->shim().Status());
            return 0;
        }
        catch (...) { return to_hresult(); }
        int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try
        {
            zero_abi<winrt::hresult>(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::hresult>(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<Windows::Security::Isolation::IsolatedWindowsEnvironmentProcess>(this->shim().Process());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentTelemetryParameters> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsEnvironmentTelemetryParameters>
    {
        int32_t __stdcall get_CorrelationId(winrt::guid* value) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            *value = detach_from<winrt::guid>(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<winrt::guid const*>(&value));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics>
    {
        int32_t __stdcall PostMessageToReceiver(winrt::guid receiverId, void* message) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().PostMessageToReceiver(*reinterpret_cast<winrt::guid const*>(&receiverId), *reinterpret_cast<Windows::Foundation::Collections::IVectorView<Windows::Foundation::IInspectable> 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<winrt::guid>(this->shim().GetFileId(*reinterpret_cast<hstring const*>(&filePath)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics2> : produce_base<D, Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics2>
    {
        int32_t __stdcall RegisterHostMessageReceiver(winrt::guid receiverId, void* hostMessageReceivedCallback) noexcept final try
        {
            typename D::abi_guard guard(this->shim());
            this->shim().RegisterHostMessageReceiver(*reinterpret_cast<winrt::guid const*>(&receiverId), *reinterpret_cast<Windows::Security::Isolation::HostMessageReceivedCallback const*>(&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<winrt::guid const*>(&receiverId));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
}
namespace winrt::Windows::Security::Isolation
{
    constexpr auto operator|(IsolatedWindowsEnvironmentAllowedClipboardFormats const left, IsolatedWindowsEnvironmentAllowedClipboardFormats const right) noexcept
    {
        return static_cast<IsolatedWindowsEnvironmentAllowedClipboardFormats>(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<IsolatedWindowsEnvironmentAllowedClipboardFormats>(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<IsolatedWindowsEnvironmentAllowedClipboardFormats>(~impl::to_underlying_type(value));
    }
    constexpr auto operator^(IsolatedWindowsEnvironmentAllowedClipboardFormats const left, IsolatedWindowsEnvironmentAllowedClipboardFormats const right) noexcept
    {
        return static_cast<IsolatedWindowsEnvironmentAllowedClipboardFormats>(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<IsolatedWindowsEnvironmentAvailablePrinters>(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<IsolatedWindowsEnvironmentAvailablePrinters>(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<IsolatedWindowsEnvironmentAvailablePrinters>(~impl::to_underlying_type(value));
    }
    constexpr auto operator^(IsolatedWindowsEnvironmentAvailablePrinters const left, IsolatedWindowsEnvironmentAvailablePrinters const right) noexcept
    {
        return static_cast<IsolatedWindowsEnvironmentAvailablePrinters>(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<IsolatedWindowsEnvironmentClipboardCopyPasteDirections>(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<IsolatedWindowsEnvironmentClipboardCopyPasteDirections>(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<IsolatedWindowsEnvironmentClipboardCopyPasteDirections>(~impl::to_underlying_type(value));
    }
    constexpr auto operator^(IsolatedWindowsEnvironmentClipboardCopyPasteDirections const left, IsolatedWindowsEnvironmentClipboardCopyPasteDirections const right) noexcept
    {
        return static_cast<IsolatedWindowsEnvironmentClipboardCopyPasteDirections>(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(Windows::Security::Isolation::IsolatedWindowsEnvironmentOptions const& options)
    {
        return impl::call_factory<IsolatedWindowsEnvironment, Windows::Security::Isolation::IIsolatedWindowsEnvironmentFactory>([&](auto&& f) { return f.CreateAsync(options); });
    }
    inline auto IsolatedWindowsEnvironment::CreateAsync(Windows::Security::Isolation::IsolatedWindowsEnvironmentOptions const& options, Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters const& telemetryParameters)
    {
        return impl::call_factory<IsolatedWindowsEnvironment, Windows::Security::Isolation::IIsolatedWindowsEnvironmentFactory>([&](auto&& f) { return f.CreateAsync(options, telemetryParameters); });
    }
    inline auto IsolatedWindowsEnvironment::GetById(param::hstring const& environmentId)
    {
        return impl::call_factory<IsolatedWindowsEnvironment, Windows::Security::Isolation::IIsolatedWindowsEnvironmentFactory>([&](auto&& f) { return f.GetById(environmentId); });
    }
    inline auto IsolatedWindowsEnvironment::FindByOwnerId(param::hstring const& environmentOwnerId)
    {
        return impl::call_factory<IsolatedWindowsEnvironment, Windows::Security::Isolation::IIsolatedWindowsEnvironmentFactory>([&](auto&& f) { return f.FindByOwnerId(environmentOwnerId); });
    }
    inline auto IsolatedWindowsEnvironmentHost::IsReady()
    {
        return impl::call_factory<IsolatedWindowsEnvironmentHost, Windows::Security::Isolation::IIsolatedWindowsEnvironmentHostStatics>([&](auto&& f) { return f.IsReady(); });
    }
    inline auto IsolatedWindowsEnvironmentHost::HostErrors()
    {
        return impl::call_factory<IsolatedWindowsEnvironmentHost, Windows::Security::Isolation::IIsolatedWindowsEnvironmentHostStatics>([&](auto&& f) { return f.HostErrors(); });
    }
    inline IsolatedWindowsEnvironmentOptions::IsolatedWindowsEnvironmentOptions() :
        IsolatedWindowsEnvironmentOptions(impl::call_factory<IsolatedWindowsEnvironmentOptions>([](auto&& f) { return f.template ActivateInstance<IsolatedWindowsEnvironmentOptions>(); }))
    {
    }
    inline auto IsolatedWindowsEnvironmentOwnerRegistration::Register(param::hstring const& ownerName, Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationData const& ownerRegistrationData)
    {
        return impl::call_factory<IsolatedWindowsEnvironmentOwnerRegistration, Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationStatics>([&](auto&& f) { return f.Register(ownerName, ownerRegistrationData); });
    }
    inline auto IsolatedWindowsEnvironmentOwnerRegistration::Unregister(param::hstring const& ownerName)
    {
        impl::call_factory<IsolatedWindowsEnvironmentOwnerRegistration, Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationStatics>([&](auto&& f) { return f.Unregister(ownerName); });
    }
    inline IsolatedWindowsEnvironmentOwnerRegistrationData::IsolatedWindowsEnvironmentOwnerRegistrationData() :
        IsolatedWindowsEnvironmentOwnerRegistrationData(impl::call_factory<IsolatedWindowsEnvironmentOwnerRegistrationData>([](auto&& f) { return f.template ActivateInstance<IsolatedWindowsEnvironmentOwnerRegistrationData>(); }))
    {
    }
    inline IsolatedWindowsEnvironmentShareFolderRequestOptions::IsolatedWindowsEnvironmentShareFolderRequestOptions() :
        IsolatedWindowsEnvironmentShareFolderRequestOptions(impl::call_factory<IsolatedWindowsEnvironmentShareFolderRequestOptions>([](auto&& f) { return f.template ActivateInstance<IsolatedWindowsEnvironmentShareFolderRequestOptions>(); }))
    {
    }
    inline IsolatedWindowsEnvironmentTelemetryParameters::IsolatedWindowsEnvironmentTelemetryParameters() :
        IsolatedWindowsEnvironmentTelemetryParameters(impl::call_factory<IsolatedWindowsEnvironmentTelemetryParameters>([](auto&& f) { return f.template ActivateInstance<IsolatedWindowsEnvironmentTelemetryParameters>(); }))
    {
    }
    inline auto IsolatedWindowsHostMessenger::PostMessageToReceiver(winrt::guid const& receiverId, param::vector_view<Windows::Foundation::IInspectable> const& message)
    {
        impl::call_factory<IsolatedWindowsHostMessenger, Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics>([&](auto&& f) { return f.PostMessageToReceiver(receiverId, message); });
    }
    inline auto IsolatedWindowsHostMessenger::GetFileId(param::hstring const& filePath)
    {
        return impl::call_factory<IsolatedWindowsHostMessenger, Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics>([&](auto&& f) { return f.GetFileId(filePath); });
    }
    inline auto IsolatedWindowsHostMessenger::RegisterHostMessageReceiver(winrt::guid const& receiverId, Windows::Security::Isolation::HostMessageReceivedCallback const& hostMessageReceivedCallback)
    {
        impl::call_factory<IsolatedWindowsHostMessenger, Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics2>([&](auto&& f) { return f.RegisterHostMessageReceiver(receiverId, hostMessageReceivedCallback); });
    }
    inline auto IsolatedWindowsHostMessenger::UnregisterHostMessageReceiver(winrt::guid const& receiverId)
    {
        impl::call_factory<IsolatedWindowsHostMessenger, Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics2>([&](auto&& f) { return f.UnregisterHostMessageReceiver(receiverId); });
    }
    template <typename L> HostMessageReceivedCallback::HostMessageReceivedCallback(L handler) :
        HostMessageReceivedCallback(impl::make_delegate<HostMessageReceivedCallback>(std::forward<L>(handler)))
    {
    }
    template <typename F> HostMessageReceivedCallback::HostMessageReceivedCallback(F* handler) :
        HostMessageReceivedCallback([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> HostMessageReceivedCallback::HostMessageReceivedCallback(O* object, M method) :
        HostMessageReceivedCallback([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> HostMessageReceivedCallback::HostMessageReceivedCallback(com_ptr<O>&& object, M method) :
        HostMessageReceivedCallback([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename M> HostMessageReceivedCallback::HostMessageReceivedCallback(weak_ref<O>&& object, M method) :
        HostMessageReceivedCallback([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } })
    {
    }
    inline auto HostMessageReceivedCallback::operator()(winrt::guid const& receiverId, param::vector_view<Windows::Foundation::IInspectable> const& message) const
    {
        check_hresult((*(impl::abi_t<HostMessageReceivedCallback>**)this)->Invoke(impl::bind_in(receiverId), *(void**)(&message)));
    }
    template <typename L> MessageReceivedCallback::MessageReceivedCallback(L handler) :
        MessageReceivedCallback(impl::make_delegate<MessageReceivedCallback>(std::forward<L>(handler)))
    {
    }
    template <typename F> MessageReceivedCallback::MessageReceivedCallback(F* handler) :
        MessageReceivedCallback([=](auto&&... args) { return handler(args...); })
    {
    }
    template <typename O, typename M> MessageReceivedCallback::MessageReceivedCallback(O* object, M method) :
        MessageReceivedCallback([=](auto&&... args) { return ((*object).*(method))(args...); })
    {
    }
    template <typename O, typename M> MessageReceivedCallback::MessageReceivedCallback(com_ptr<O>&& object, M method) :
        MessageReceivedCallback([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
    {
    }
    template <typename O, typename M> MessageReceivedCallback::MessageReceivedCallback(weak_ref<O>&& object, M method) :
        MessageReceivedCallback([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } })
    {
    }
    inline auto MessageReceivedCallback::operator()(winrt::guid const& receiverId, param::vector_view<Windows::Foundation::IInspectable> const& message) const
    {
        check_hresult((*(impl::abi_t<MessageReceivedCallback>**)this)->Invoke(impl::bind_in(receiverId), *(void**)(&message)));
    }
}
namespace std
{
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironment> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironment> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironment2> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironment2> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentCreateResult> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentCreateResult> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentFactory> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentFactory> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentFile> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentFile> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentHostStatics> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentHostStatics> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentLaunchFileResult> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentLaunchFileResult> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentOptions> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationData> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationData> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationResult> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationResult> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationStatics> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentOwnerRegistrationStatics> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentPostMessageResult> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentPostMessageResult> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentProcess> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentProcess> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentShareFolderRequestOptions> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentShareFolderRequestOptions> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentShareFolderResult> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentShareFolderResult> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentStartProcessResult> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentStartProcessResult> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentTelemetryParameters> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsEnvironmentTelemetryParameters> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics2> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IIsolatedWindowsHostMessengerStatics2> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironment> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironment> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateResult> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentCreateResult> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentFile> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentFile> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentHost> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentHost> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentLaunchFileResult> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentLaunchFileResult> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOptions> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOptions> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistration> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistration> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationData> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationData> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationResult> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentOwnerRegistrationResult> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentPostMessageResult> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentPostMessageResult> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentProcess> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentProcess> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderRequestOptions> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderRequestOptions> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderResult> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentShareFolderResult> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentStartProcessResult> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentStartProcessResult> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsEnvironmentTelemetryParameters> {};
    template<> struct hash<winrt::Windows::Security::Isolation::IsolatedWindowsHostMessenger> : winrt::impl::hash_base<winrt::Windows::Security::Isolation::IsolatedWindowsHostMessenger> {};
}
#endif
