// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_System_H #define WINRT_Windows_System_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.ApplicationModel.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Windows.Storage.Search.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.System.Diagnostics.2.h" #include "winrt/impl/Windows.System.RemoteSystems.2.h" #include "winrt/impl/Windows.UI.Popups.2.h" #include "winrt/impl/Windows.UI.ViewManagement.2.h" #include "winrt/impl/Windows.System.2.h" namespace winrt::impl { template auto consume_Windows_System_IAppActivationResult::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_System_IAppActivationResult::AppResourceGroupInfo() 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_AppResourceGroupInfo(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppResourceGroupInfo(&value)); } return winrt::Windows::System::AppResourceGroupInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppDiagnosticInfo::AppInfo() 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_AppInfo(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppInfo(&value)); } return winrt::Windows::ApplicationModel::AppInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppDiagnosticInfo2::GetResourceGroups() 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->GetResourceGroups(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetResourceGroups(&result)); } return winrt::Windows::Foundation::Collections::IVector{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IAppDiagnosticInfo2::CreateResourceGroupWatcher() 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->CreateResourceGroupWatcher(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateResourceGroupWatcher(&result)); } return winrt::Windows::System::AppResourceGroupInfoWatcher{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IAppDiagnosticInfo3::LaunchAsync() 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->LaunchAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IAppDiagnosticInfoStatics::RequestInfoAsync() 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->RequestInfoAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestInfoAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IAppDiagnosticInfoStatics2::CreateWatcher() const { void* watcher{}; 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->CreateWatcher(&watcher)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWatcher(&watcher)); } return winrt::Windows::System::AppDiagnosticInfoWatcher{ watcher, take_ownership_from_abi }; } template auto consume_Windows_System_IAppDiagnosticInfoStatics2::RequestAccessAsync() 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->RequestAccessAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IAppDiagnosticInfoStatics2::RequestInfoForPackageAsync(param::hstring const& packageFamilyName) 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->RequestInfoForPackageAsync(*(void**)(&packageFamilyName), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestInfoForPackageAsync(*(void**)(&packageFamilyName), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IAppDiagnosticInfoStatics2::RequestInfoForAppAsync() 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->RequestInfoForAppAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestInfoForAppAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IAppDiagnosticInfoStatics2::RequestInfoForAppAsync(param::hstring const& appUserModelId) 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->RequestInfoForAppUserModelId(*(void**)(&appUserModelId), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestInfoForAppUserModelId(*(void**)(&appUserModelId), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::Added(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_Added(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Added(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::Added(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Added(handler)); } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::Added(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_Added(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Added(impl::bind_in(token)); } } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::Removed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_Removed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Removed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::Removed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Removed(handler)); } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::Removed(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_Removed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Removed(impl::bind_in(token)); } } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::EnumerationCompleted(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_EnumerationCompleted(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_EnumerationCompleted(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::EnumerationCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, EnumerationCompleted(handler)); } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::EnumerationCompleted(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_EnumerationCompleted(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_EnumerationCompleted(impl::bind_in(token)); } } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::Stopped(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_Stopped(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Stopped(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::Stopped(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Stopped(handler)); } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::Stopped(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_Stopped(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Stopped(impl::bind_in(token)); } } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::Status() const { winrt::Windows::System::AppDiagnosticInfoWatcherStatus 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_System_IAppDiagnosticInfoWatcher::Start() 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->Start()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Start()); } } template auto consume_Windows_System_IAppDiagnosticInfoWatcher::Stop() 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->Stop()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Stop()); } } template auto consume_Windows_System_IAppDiagnosticInfoWatcherEventArgs::AppDiagnosticInfo() 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_AppDiagnosticInfo(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppDiagnosticInfo(&value)); } return winrt::Windows::System::AppDiagnosticInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppExecutionStateChangeResult::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_System_IAppMemoryReport::PrivateCommitUsage() const { uint64_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_PrivateCommitUsage(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrivateCommitUsage(&value)); } return value; } template auto consume_Windows_System_IAppMemoryReport::PeakPrivateCommitUsage() const { uint64_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_PeakPrivateCommitUsage(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PeakPrivateCommitUsage(&value)); } return value; } template auto consume_Windows_System_IAppMemoryReport::TotalCommitUsage() const { uint64_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_TotalCommitUsage(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TotalCommitUsage(&value)); } return value; } template auto consume_Windows_System_IAppMemoryReport::TotalCommitLimit() const { uint64_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_TotalCommitLimit(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TotalCommitLimit(&value)); } return value; } template auto consume_Windows_System_IAppMemoryReport2::ExpectedTotalCommitLimit() const { uint64_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_ExpectedTotalCommitLimit(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExpectedTotalCommitLimit(&value)); } return value; } template auto consume_Windows_System_IAppMemoryUsageLimitChangingEventArgs::OldLimit() const { uint64_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_OldLimit(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_OldLimit(&value)); } return value; } template auto consume_Windows_System_IAppMemoryUsageLimitChangingEventArgs::NewLimit() const { uint64_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_NewLimit(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NewLimit(&value)); } return value; } template auto consume_Windows_System_IAppResourceGroupBackgroundTaskReport::TaskId() 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_TaskId(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TaskId(put_abi(value))); } return value; } template auto consume_Windows_System_IAppResourceGroupBackgroundTaskReport::Name() 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_Name(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Name(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupBackgroundTaskReport::Trigger() 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_Trigger(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Trigger(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupBackgroundTaskReport::EntryPoint() 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_EntryPoint(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EntryPoint(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupInfo::InstanceId() 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_InstanceId(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InstanceId(put_abi(value))); } return value; } template auto consume_Windows_System_IAppResourceGroupInfo::IsShared() 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_IsShared(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsShared(&value)); } return value; } template auto consume_Windows_System_IAppResourceGroupInfo::GetBackgroundTaskReports() 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->GetBackgroundTaskReports(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetBackgroundTaskReports(&result)); } return winrt::Windows::Foundation::Collections::IVector{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupInfo::GetMemoryReport() 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->GetMemoryReport(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetMemoryReport(&result)); } return winrt::Windows::System::AppResourceGroupMemoryReport{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupInfo::GetProcessDiagnosticInfos() 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->GetProcessDiagnosticInfos(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetProcessDiagnosticInfos(&result)); } return winrt::Windows::Foundation::Collections::IVector{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupInfo::GetStateReport() 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->GetStateReport(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetStateReport(&result)); } return winrt::Windows::System::AppResourceGroupStateReport{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupInfo2::StartSuspendAsync() 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->StartSuspendAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StartSuspendAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupInfo2::StartResumeAsync() 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->StartResumeAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StartResumeAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupInfo2::StartTerminateAsync() 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->StartTerminateAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StartTerminateAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::Added(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_Added(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Added(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::Added(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Added(handler)); } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::Added(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_Added(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Added(impl::bind_in(token)); } } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::Removed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_Removed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Removed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::Removed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Removed(handler)); } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::Removed(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_Removed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Removed(impl::bind_in(token)); } } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::EnumerationCompleted(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_EnumerationCompleted(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_EnumerationCompleted(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::EnumerationCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, EnumerationCompleted(handler)); } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::EnumerationCompleted(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_EnumerationCompleted(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_EnumerationCompleted(impl::bind_in(token)); } } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::Stopped(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_Stopped(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Stopped(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::Stopped(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Stopped(handler)); } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::Stopped(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_Stopped(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Stopped(impl::bind_in(token)); } } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::ExecutionStateChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_ExecutionStateChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ExecutionStateChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::ExecutionStateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ExecutionStateChanged(handler)); } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::ExecutionStateChanged(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_ExecutionStateChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ExecutionStateChanged(impl::bind_in(token)); } } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::Status() const { winrt::Windows::System::AppResourceGroupInfoWatcherStatus status{}; 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(&status))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&status))); } return status; } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::Start() 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->Start()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Start()); } } template auto consume_Windows_System_IAppResourceGroupInfoWatcher::Stop() 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->Stop()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Stop()); } } template auto consume_Windows_System_IAppResourceGroupInfoWatcherEventArgs::AppDiagnosticInfos() 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_AppDiagnosticInfos(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppDiagnosticInfos(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupInfoWatcherEventArgs::AppResourceGroupInfo() 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_AppResourceGroupInfo(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppResourceGroupInfo(&value)); } return winrt::Windows::System::AppResourceGroupInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupInfoWatcherExecutionStateChangedEventArgs::AppDiagnosticInfos() 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_AppDiagnosticInfos(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppDiagnosticInfos(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupInfoWatcherExecutionStateChangedEventArgs::AppResourceGroupInfo() 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_AppResourceGroupInfo(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppResourceGroupInfo(&value)); } return winrt::Windows::System::AppResourceGroupInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppResourceGroupMemoryReport::CommitUsageLimit() const { uint64_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_CommitUsageLimit(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CommitUsageLimit(&value)); } return value; } template auto consume_Windows_System_IAppResourceGroupMemoryReport::CommitUsageLevel() const { winrt::Windows::System::AppMemoryUsageLevel 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_CommitUsageLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CommitUsageLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_System_IAppResourceGroupMemoryReport::PrivateCommitUsage() const { uint64_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_PrivateCommitUsage(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrivateCommitUsage(&value)); } return value; } template auto consume_Windows_System_IAppResourceGroupMemoryReport::TotalCommitUsage() const { uint64_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_TotalCommitUsage(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TotalCommitUsage(&value)); } return value; } template auto consume_Windows_System_IAppResourceGroupStateReport::ExecutionState() const { winrt::Windows::System::AppResourceGroupExecutionState 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_ExecutionState(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExecutionState(reinterpret_cast(&value))); } return value; } template auto consume_Windows_System_IAppResourceGroupStateReport::EnergyQuotaState() const { winrt::Windows::System::AppResourceGroupEnergyQuotaState 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_EnergyQuotaState(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EnergyQuotaState(reinterpret_cast(&value))); } return value; } template auto consume_Windows_System_IAppUriHandlerHost::Name() 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_Name(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Name(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerHost::Name(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_Name(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Name(*(void**)(&value))); } } template auto consume_Windows_System_IAppUriHandlerHost2::IsEnabled() 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_IsEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } return value; } template auto consume_Windows_System_IAppUriHandlerHost2::IsEnabled(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_IsEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsEnabled(value)); } } template auto consume_Windows_System_IAppUriHandlerHostFactory::CreateInstance(param::hstring const& name) 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->CreateInstance(*(void**)(&name), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateInstance(*(void**)(&name), &value)); } return winrt::Windows::System::AppUriHandlerHost{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistration::Name() 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_Name(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Name(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistration::User() 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_User(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_User(&value)); } return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistration::GetAppAddedHostsAsync() 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->GetAppAddedHostsAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAppAddedHostsAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistration::SetAppAddedHostsAsync(param::async_iterable const& hosts) 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->SetAppAddedHostsAsync(*(void**)(&hosts), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetAppAddedHostsAsync(*(void**)(&hosts), &operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistration2::GetAllHosts() 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->GetAllHosts(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAllHosts(&result)); } return winrt::Windows::Foundation::Collections::IVector{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistration2::UpdateHosts(param::iterable const& hosts) 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->UpdateHosts(*(void**)(&hosts))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UpdateHosts(*(void**)(&hosts))); } } template auto consume_Windows_System_IAppUriHandlerRegistration2::PackageFamilyName() 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_PackageFamilyName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PackageFamilyName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistrationManager::User() 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_User(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_User(&value)); } return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistrationManager::TryGetRegistration(param::hstring const& name) 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->TryGetRegistration(*(void**)(&name), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryGetRegistration(*(void**)(&name), &result)); } return winrt::Windows::System::AppUriHandlerRegistration{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistrationManager2::PackageFamilyName() 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_PackageFamilyName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PackageFamilyName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistrationManagerStatics::GetDefault() 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->GetDefault(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDefault(&result)); } return winrt::Windows::System::AppUriHandlerRegistrationManager{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistrationManagerStatics::GetForUser(winrt::Windows::System::User const& user) 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->GetForUser(*(void**)(&user), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetForUser(*(void**)(&user), &result)); } return winrt::Windows::System::AppUriHandlerRegistrationManager{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistrationManagerStatics2::GetForPackage(param::hstring const& packageFamilyName) 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->GetForPackage(*(void**)(&packageFamilyName), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetForPackage(*(void**)(&packageFamilyName), &result)); } return winrt::Windows::System::AppUriHandlerRegistrationManager{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IAppUriHandlerRegistrationManagerStatics2::GetForPackageForUser(param::hstring const& packageFamilyName, winrt::Windows::System::User const& user) 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->GetForPackageForUser(*(void**)(&packageFamilyName), *(void**)(&user), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetForPackageForUser(*(void**)(&packageFamilyName), *(void**)(&user), &result)); } return winrt::Windows::System::AppUriHandlerRegistrationManager{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IDateTimeSettingsStatics::SetSystemDateTime(winrt::Windows::Foundation::DateTime const& utcDateTime) 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->SetSystemDateTime(impl::bind_in(utcDateTime))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetSystemDateTime(impl::bind_in(utcDateTime))); } } template auto consume_Windows_System_IDispatcherQueue::CreateTimer() 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->CreateTimer(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateTimer(&result)); } return winrt::Windows::System::DispatcherQueueTimer{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IDispatcherQueue::TryEnqueue(winrt::Windows::System::DispatcherQueueHandler const& callback) const { bool 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->TryEnqueue(*(void**)(&callback), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryEnqueue(*(void**)(&callback), &result)); } return result; } template auto consume_Windows_System_IDispatcherQueue::TryEnqueue(winrt::Windows::System::DispatcherQueuePriority const& priority, winrt::Windows::System::DispatcherQueueHandler const& callback) const { bool 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->TryEnqueueWithPriority(static_cast(priority), *(void**)(&callback), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryEnqueueWithPriority(static_cast(priority), *(void**)(&callback), &result)); } return result; } template auto consume_Windows_System_IDispatcherQueue::ShutdownStarting(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_ShutdownStarting(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ShutdownStarting(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IDispatcherQueue::ShutdownStarting(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ShutdownStarting(handler)); } template auto consume_Windows_System_IDispatcherQueue::ShutdownStarting(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_ShutdownStarting(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ShutdownStarting(impl::bind_in(token)); } } template auto consume_Windows_System_IDispatcherQueue::ShutdownCompleted(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_ShutdownCompleted(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ShutdownCompleted(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IDispatcherQueue::ShutdownCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ShutdownCompleted(handler)); } template auto consume_Windows_System_IDispatcherQueue::ShutdownCompleted(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_ShutdownCompleted(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ShutdownCompleted(impl::bind_in(token)); } } template auto consume_Windows_System_IDispatcherQueue2::HasThreadAccess() 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_HasThreadAccess(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasThreadAccess(&value)); } return value; } template auto consume_Windows_System_IDispatcherQueueController::DispatcherQueue() 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_DispatcherQueue(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DispatcherQueue(&value)); } return winrt::Windows::System::DispatcherQueue{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IDispatcherQueueController::ShutdownQueueAsync() 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->ShutdownQueueAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShutdownQueueAsync(&operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IDispatcherQueueControllerStatics::CreateOnDedicatedThread() 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->CreateOnDedicatedThread(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateOnDedicatedThread(&result)); } return winrt::Windows::System::DispatcherQueueController{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IDispatcherQueueShutdownStartingEventArgs::GetDeferral() 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->GetDeferral(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&result)); } return winrt::Windows::Foundation::Deferral{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IDispatcherQueueStatics::GetForCurrentThread() 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->GetForCurrentThread(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetForCurrentThread(&result)); } return winrt::Windows::System::DispatcherQueue{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IDispatcherQueueTimer::Interval() const { winrt::Windows::Foundation::TimeSpan 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_Interval(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Interval(put_abi(value))); } return value; } template auto consume_Windows_System_IDispatcherQueueTimer::Interval(winrt::Windows::Foundation::TimeSpan 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_Interval(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Interval(impl::bind_in(value))); } } template auto consume_Windows_System_IDispatcherQueueTimer::IsRunning() 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_IsRunning(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsRunning(&value)); } return value; } template auto consume_Windows_System_IDispatcherQueueTimer::IsRepeating() 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_IsRepeating(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsRepeating(&value)); } return value; } template auto consume_Windows_System_IDispatcherQueueTimer::IsRepeating(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_IsRepeating(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsRepeating(value)); } } template auto consume_Windows_System_IDispatcherQueueTimer::Start() 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->Start()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Start()); } } template auto consume_Windows_System_IDispatcherQueueTimer::Stop() 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->Stop()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Stop()); } } template auto consume_Windows_System_IDispatcherQueueTimer::Tick(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_Tick(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Tick(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IDispatcherQueueTimer::Tick(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Tick(handler)); } template auto consume_Windows_System_IDispatcherQueueTimer::Tick(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_Tick(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Tick(impl::bind_in(token)); } } template auto consume_Windows_System_IFolderLauncherOptions::ItemsToSelect() 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_ItemsToSelect(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ItemsToSelect(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IKnownUserPropertiesStatics::DisplayName() 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_DisplayName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IKnownUserPropertiesStatics::FirstName() 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_FirstName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FirstName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IKnownUserPropertiesStatics::LastName() 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_LastName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LastName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IKnownUserPropertiesStatics::ProviderName() 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_ProviderName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProviderName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IKnownUserPropertiesStatics::AccountName() 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_AccountName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AccountName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IKnownUserPropertiesStatics::GuestHost() 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_GuestHost(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GuestHost(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IKnownUserPropertiesStatics::PrincipalName() 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_PrincipalName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrincipalName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IKnownUserPropertiesStatics::DomainName() 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_DomainName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DomainName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IKnownUserPropertiesStatics::SessionInitiationProtocolUri() 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_SessionInitiationProtocolUri(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SessionInitiationProtocolUri(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IKnownUserPropertiesStatics2::AgeEnforcementRegion() 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_AgeEnforcementRegion(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AgeEnforcementRegion(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ILaunchUriResult::Status() const { winrt::Windows::System::LaunchUriStatus 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_System_ILaunchUriResult::Result() 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_Result(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Result(&value)); } return winrt::Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherOptions::TreatAsUntrusted() 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_TreatAsUntrusted(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TreatAsUntrusted(&value)); } return value; } template auto consume_Windows_System_ILauncherOptions::TreatAsUntrusted(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_TreatAsUntrusted(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_TreatAsUntrusted(value)); } } template auto consume_Windows_System_ILauncherOptions::DisplayApplicationPicker() 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_DisplayApplicationPicker(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayApplicationPicker(&value)); } return value; } template auto consume_Windows_System_ILauncherOptions::DisplayApplicationPicker(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_DisplayApplicationPicker(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DisplayApplicationPicker(value)); } } template auto consume_Windows_System_ILauncherOptions::UI() 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_UI(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UI(&value)); } return winrt::Windows::System::LauncherUIOptions{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherOptions::PreferredApplicationPackageFamilyName() 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_PreferredApplicationPackageFamilyName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PreferredApplicationPackageFamilyName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherOptions::PreferredApplicationPackageFamilyName(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_PreferredApplicationPackageFamilyName(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PreferredApplicationPackageFamilyName(*(void**)(&value))); } } template auto consume_Windows_System_ILauncherOptions::PreferredApplicationDisplayName() 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_PreferredApplicationDisplayName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PreferredApplicationDisplayName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherOptions::PreferredApplicationDisplayName(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_PreferredApplicationDisplayName(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PreferredApplicationDisplayName(*(void**)(&value))); } } template auto consume_Windows_System_ILauncherOptions::FallbackUri() 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_FallbackUri(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FallbackUri(&value)); } return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherOptions::FallbackUri(winrt::Windows::Foundation::Uri 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_FallbackUri(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_FallbackUri(*(void**)(&value))); } } template auto consume_Windows_System_ILauncherOptions::ContentType() 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_ContentType(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ContentType(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherOptions::ContentType(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_ContentType(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ContentType(*(void**)(&value))); } } template auto consume_Windows_System_ILauncherOptions2::TargetApplicationPackageFamilyName() 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_TargetApplicationPackageFamilyName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TargetApplicationPackageFamilyName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherOptions2::TargetApplicationPackageFamilyName(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_TargetApplicationPackageFamilyName(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_TargetApplicationPackageFamilyName(*(void**)(&value))); } } template auto consume_Windows_System_ILauncherOptions2::NeighboringFilesQuery() 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_NeighboringFilesQuery(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NeighboringFilesQuery(&value)); } return winrt::Windows::Storage::Search::StorageFileQueryResult{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherOptions2::NeighboringFilesQuery(winrt::Windows::Storage::Search::StorageFileQueryResult 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_NeighboringFilesQuery(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_NeighboringFilesQuery(*(void**)(&value))); } } template auto consume_Windows_System_ILauncherOptions3::IgnoreAppUriHandlers() 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_IgnoreAppUriHandlers(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IgnoreAppUriHandlers(&value)); } return value; } template auto consume_Windows_System_ILauncherOptions3::IgnoreAppUriHandlers(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_IgnoreAppUriHandlers(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IgnoreAppUriHandlers(value)); } } template auto consume_Windows_System_ILauncherOptions4::LimitPickerToCurrentAppAndAppUriHandlers() 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_LimitPickerToCurrentAppAndAppUriHandlers(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LimitPickerToCurrentAppAndAppUriHandlers(&value)); } return value; } template auto consume_Windows_System_ILauncherOptions4::LimitPickerToCurrentAppAndAppUriHandlers(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_LimitPickerToCurrentAppAndAppUriHandlers(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_LimitPickerToCurrentAppAndAppUriHandlers(value)); } } template auto consume_Windows_System_ILauncherStatics::LaunchFileAsync(winrt::Windows::Storage::IStorageFile const& file) 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->LaunchFileAsync(*(void**)(&file), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchFileAsync(*(void**)(&file), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics::LaunchFileAsync(winrt::Windows::Storage::IStorageFile const& file, winrt::Windows::System::LauncherOptions 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->LaunchFileWithOptionsAsync(*(void**)(&file), *(void**)(&options), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchFileWithOptionsAsync(*(void**)(&file), *(void**)(&options), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics::LaunchUriAsync(winrt::Windows::Foundation::Uri const& uri) 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->LaunchUriAsync(*(void**)(&uri), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriAsync(*(void**)(&uri), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics::LaunchUriAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions 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->LaunchUriWithOptionsAsync(*(void**)(&uri), *(void**)(&options), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriWithOptionsAsync(*(void**)(&uri), *(void**)(&options), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics2::LaunchUriForResultsAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions 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->LaunchUriForResultsAsync(*(void**)(&uri), *(void**)(&options), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriForResultsAsync(*(void**)(&uri), *(void**)(&options), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics2::LaunchUriForResultsAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions const& options, winrt::Windows::Foundation::Collections::ValueSet const& inputData) 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->LaunchUriForResultsWithDataAsync(*(void**)(&uri), *(void**)(&options), *(void**)(&inputData), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriForResultsWithDataAsync(*(void**)(&uri), *(void**)(&options), *(void**)(&inputData), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics2::LaunchUriAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions const& options, winrt::Windows::Foundation::Collections::ValueSet const& inputData) 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->LaunchUriWithDataAsync(*(void**)(&uri), *(void**)(&options), *(void**)(&inputData), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriWithDataAsync(*(void**)(&uri), *(void**)(&options), *(void**)(&inputData), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics2::QueryUriSupportAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LaunchQuerySupportType const& launchQuerySupportType) 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->QueryUriSupportAsync(*(void**)(&uri), static_cast(launchQuerySupportType), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->QueryUriSupportAsync(*(void**)(&uri), static_cast(launchQuerySupportType), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics2::QueryUriSupportAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LaunchQuerySupportType const& launchQuerySupportType, param::hstring const& packageFamilyName) 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->QueryUriSupportWithPackageFamilyNameAsync(*(void**)(&uri), static_cast(launchQuerySupportType), *(void**)(&packageFamilyName), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->QueryUriSupportWithPackageFamilyNameAsync(*(void**)(&uri), static_cast(launchQuerySupportType), *(void**)(&packageFamilyName), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics2::QueryFileSupportAsync(winrt::Windows::Storage::StorageFile const& file) 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->QueryFileSupportAsync(*(void**)(&file), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->QueryFileSupportAsync(*(void**)(&file), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics2::QueryFileSupportAsync(winrt::Windows::Storage::StorageFile const& file, param::hstring const& packageFamilyName) 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->QueryFileSupportWithPackageFamilyNameAsync(*(void**)(&file), *(void**)(&packageFamilyName), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->QueryFileSupportWithPackageFamilyNameAsync(*(void**)(&file), *(void**)(&packageFamilyName), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics2::FindUriSchemeHandlersAsync(param::hstring const& scheme) 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->FindUriSchemeHandlersAsync(*(void**)(&scheme), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindUriSchemeHandlersAsync(*(void**)(&scheme), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics2::FindUriSchemeHandlersAsync(param::hstring const& scheme, winrt::Windows::System::LaunchQuerySupportType const& launchQuerySupportType) 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->FindUriSchemeHandlersWithLaunchUriTypeAsync(*(void**)(&scheme), static_cast(launchQuerySupportType), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindUriSchemeHandlersWithLaunchUriTypeAsync(*(void**)(&scheme), static_cast(launchQuerySupportType), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics2::FindFileHandlersAsync(param::hstring const& extension) 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->FindFileHandlersAsync(*(void**)(&extension), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindFileHandlersAsync(*(void**)(&extension), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics3::LaunchFolderAsync(winrt::Windows::Storage::IStorageFolder const& folder) 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->LaunchFolderAsync(*(void**)(&folder), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchFolderAsync(*(void**)(&folder), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics3::LaunchFolderAsync(winrt::Windows::Storage::IStorageFolder const& folder, winrt::Windows::System::FolderLauncherOptions 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->LaunchFolderWithOptionsAsync(*(void**)(&folder), *(void**)(&options), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchFolderWithOptionsAsync(*(void**)(&folder), *(void**)(&options), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics4::QueryAppUriSupportAsync(winrt::Windows::Foundation::Uri const& uri) 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->QueryAppUriSupportAsync(*(void**)(&uri), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->QueryAppUriSupportAsync(*(void**)(&uri), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics4::QueryAppUriSupportAsync(winrt::Windows::Foundation::Uri const& uri, param::hstring const& packageFamilyName) 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->QueryAppUriSupportWithPackageFamilyNameAsync(*(void**)(&uri), *(void**)(&packageFamilyName), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->QueryAppUriSupportWithPackageFamilyNameAsync(*(void**)(&uri), *(void**)(&packageFamilyName), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics4::FindAppUriHandlersAsync(winrt::Windows::Foundation::Uri const& uri) 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->FindAppUriHandlersAsync(*(void**)(&uri), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAppUriHandlersAsync(*(void**)(&uri), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics4::LaunchUriForUserAsync(winrt::Windows::System::User const& user, winrt::Windows::Foundation::Uri const& uri) 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->LaunchUriForUserAsync(*(void**)(&user), *(void**)(&uri), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriForUserAsync(*(void**)(&user), *(void**)(&uri), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics4::LaunchUriForUserAsync(winrt::Windows::System::User const& user, winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions 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->LaunchUriWithOptionsForUserAsync(*(void**)(&user), *(void**)(&uri), *(void**)(&options), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriWithOptionsForUserAsync(*(void**)(&user), *(void**)(&uri), *(void**)(&options), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics4::LaunchUriForUserAsync(winrt::Windows::System::User const& user, winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions const& options, winrt::Windows::Foundation::Collections::ValueSet const& inputData) 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->LaunchUriWithDataForUserAsync(*(void**)(&user), *(void**)(&uri), *(void**)(&options), *(void**)(&inputData), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriWithDataForUserAsync(*(void**)(&user), *(void**)(&uri), *(void**)(&options), *(void**)(&inputData), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics4::LaunchUriForResultsForUserAsync(winrt::Windows::System::User const& user, winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions 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->LaunchUriForResultsForUserAsync(*(void**)(&user), *(void**)(&uri), *(void**)(&options), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriForResultsForUserAsync(*(void**)(&user), *(void**)(&uri), *(void**)(&options), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics4::LaunchUriForResultsForUserAsync(winrt::Windows::System::User const& user, winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions const& options, winrt::Windows::Foundation::Collections::ValueSet const& inputData) 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->LaunchUriForResultsWithDataForUserAsync(*(void**)(&user), *(void**)(&uri), *(void**)(&options), *(void**)(&inputData), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriForResultsWithDataForUserAsync(*(void**)(&user), *(void**)(&uri), *(void**)(&options), *(void**)(&inputData), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics5::LaunchFolderPathAsync(param::hstring const& path) 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->LaunchFolderPathAsync(*(void**)(&path), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchFolderPathAsync(*(void**)(&path), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics5::LaunchFolderPathAsync(param::hstring const& path, winrt::Windows::System::FolderLauncherOptions 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->LaunchFolderPathWithOptionsAsync(*(void**)(&path), *(void**)(&options), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchFolderPathWithOptionsAsync(*(void**)(&path), *(void**)(&options), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics5::LaunchFolderPathForUserAsync(winrt::Windows::System::User const& user, param::hstring const& path) 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->LaunchFolderPathForUserAsync(*(void**)(&user), *(void**)(&path), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchFolderPathForUserAsync(*(void**)(&user), *(void**)(&path), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherStatics5::LaunchFolderPathForUserAsync(winrt::Windows::System::User const& user, param::hstring const& path, winrt::Windows::System::FolderLauncherOptions 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->LaunchFolderPathWithOptionsForUserAsync(*(void**)(&user), *(void**)(&path), *(void**)(&options), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchFolderPathWithOptionsForUserAsync(*(void**)(&user), *(void**)(&path), *(void**)(&options), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherUIOptions::InvocationPoint() 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_InvocationPoint(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InvocationPoint(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherUIOptions::InvocationPoint(winrt::Windows::Foundation::IReference 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_InvocationPoint(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_InvocationPoint(*(void**)(&value))); } } template auto consume_Windows_System_ILauncherUIOptions::SelectionRect() 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_SelectionRect(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectionRect(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ILauncherUIOptions::SelectionRect(winrt::Windows::Foundation::IReference 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_SelectionRect(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SelectionRect(*(void**)(&value))); } } template auto consume_Windows_System_ILauncherUIOptions::PreferredPlacement() const { winrt::Windows::UI::Popups::Placement 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_PreferredPlacement(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PreferredPlacement(reinterpret_cast(&value))); } return value; } template auto consume_Windows_System_ILauncherUIOptions::PreferredPlacement(winrt::Windows::UI::Popups::Placement 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_PreferredPlacement(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PreferredPlacement(static_cast(value))); } } template auto consume_Windows_System_ILauncherViewOptions::DesiredRemainingView() const { winrt::Windows::UI::ViewManagement::ViewSizePreference 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_DesiredRemainingView(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DesiredRemainingView(reinterpret_cast(&value))); } return value; } template auto consume_Windows_System_ILauncherViewOptions::DesiredRemainingView(winrt::Windows::UI::ViewManagement::ViewSizePreference 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_DesiredRemainingView(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DesiredRemainingView(static_cast(value))); } } template auto consume_Windows_System_IMemoryManagerStatics::AppMemoryUsage() const { uint64_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_AppMemoryUsage(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppMemoryUsage(&value)); } return value; } template auto consume_Windows_System_IMemoryManagerStatics::AppMemoryUsageLimit() const { uint64_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_AppMemoryUsageLimit(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppMemoryUsageLimit(&value)); } return value; } template auto consume_Windows_System_IMemoryManagerStatics::AppMemoryUsageLevel() const { winrt::Windows::System::AppMemoryUsageLevel 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_AppMemoryUsageLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppMemoryUsageLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_System_IMemoryManagerStatics::AppMemoryUsageIncreased(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; 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->add_AppMemoryUsageIncreased(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AppMemoryUsageIncreased(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IMemoryManagerStatics::AppMemoryUsageIncreased(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, AppMemoryUsageIncreased(handler)); } template auto consume_Windows_System_IMemoryManagerStatics::AppMemoryUsageIncreased(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_AppMemoryUsageIncreased(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AppMemoryUsageIncreased(impl::bind_in(token)); } } template auto consume_Windows_System_IMemoryManagerStatics::AppMemoryUsageDecreased(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; 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->add_AppMemoryUsageDecreased(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AppMemoryUsageDecreased(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IMemoryManagerStatics::AppMemoryUsageDecreased(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, AppMemoryUsageDecreased(handler)); } template auto consume_Windows_System_IMemoryManagerStatics::AppMemoryUsageDecreased(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_AppMemoryUsageDecreased(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AppMemoryUsageDecreased(impl::bind_in(token)); } } template auto consume_Windows_System_IMemoryManagerStatics::AppMemoryUsageLimitChanging(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; 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->add_AppMemoryUsageLimitChanging(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AppMemoryUsageLimitChanging(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IMemoryManagerStatics::AppMemoryUsageLimitChanging(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, AppMemoryUsageLimitChanging(handler)); } template auto consume_Windows_System_IMemoryManagerStatics::AppMemoryUsageLimitChanging(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_AppMemoryUsageLimitChanging(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AppMemoryUsageLimitChanging(impl::bind_in(token)); } } template auto consume_Windows_System_IMemoryManagerStatics2::GetAppMemoryReport() const { void* memoryReport{}; 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->GetAppMemoryReport(&memoryReport)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAppMemoryReport(&memoryReport)); } return winrt::Windows::System::AppMemoryReport{ memoryReport, take_ownership_from_abi }; } template auto consume_Windows_System_IMemoryManagerStatics2::GetProcessMemoryReport() const { void* memoryReport{}; 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->GetProcessMemoryReport(&memoryReport)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetProcessMemoryReport(&memoryReport)); } return winrt::Windows::System::ProcessMemoryReport{ memoryReport, take_ownership_from_abi }; } template auto consume_Windows_System_IMemoryManagerStatics3::TrySetAppMemoryUsageLimit(uint64_t value) const { bool 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->TrySetAppMemoryUsageLimit(value, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TrySetAppMemoryUsageLimit(value, &result)); } return result; } template auto consume_Windows_System_IMemoryManagerStatics4::ExpectedAppMemoryUsageLimit() const { uint64_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_ExpectedAppMemoryUsageLimit(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExpectedAppMemoryUsageLimit(&value)); } return value; } template auto consume_Windows_System_IProcessLauncherOptions::StandardInput() 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_StandardInput(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StandardInput(&value)); } return winrt::Windows::Storage::Streams::IInputStream{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IProcessLauncherOptions::StandardInput(winrt::Windows::Storage::Streams::IInputStream 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_StandardInput(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_StandardInput(*(void**)(&value))); } } template auto consume_Windows_System_IProcessLauncherOptions::StandardOutput() 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_StandardOutput(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StandardOutput(&value)); } return winrt::Windows::Storage::Streams::IOutputStream{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IProcessLauncherOptions::StandardOutput(winrt::Windows::Storage::Streams::IOutputStream 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_StandardOutput(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_StandardOutput(*(void**)(&value))); } } template auto consume_Windows_System_IProcessLauncherOptions::StandardError() 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_StandardError(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StandardError(&value)); } return winrt::Windows::Storage::Streams::IOutputStream{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IProcessLauncherOptions::StandardError(winrt::Windows::Storage::Streams::IOutputStream 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_StandardError(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_StandardError(*(void**)(&value))); } } template auto consume_Windows_System_IProcessLauncherOptions::WorkingDirectory() 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_WorkingDirectory(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WorkingDirectory(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IProcessLauncherOptions::WorkingDirectory(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_WorkingDirectory(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_WorkingDirectory(*(void**)(&value))); } } template auto consume_Windows_System_IProcessLauncherResult::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_System_IProcessLauncherStatics::RunToCompletionAsync(param::hstring const& fileName, param::hstring const& args) const { void* asyncOperationResult{}; 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->RunToCompletionAsync(*(void**)(&fileName), *(void**)(&args), &asyncOperationResult)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RunToCompletionAsync(*(void**)(&fileName), *(void**)(&args), &asyncOperationResult)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOperationResult, take_ownership_from_abi }; } template auto consume_Windows_System_IProcessLauncherStatics::RunToCompletionAsync(param::hstring const& fileName, param::hstring const& args, winrt::Windows::System::ProcessLauncherOptions const& options) const { void* asyncOperationResult{}; 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->RunToCompletionAsyncWithOptions(*(void**)(&fileName), *(void**)(&args), *(void**)(&options), &asyncOperationResult)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RunToCompletionAsyncWithOptions(*(void**)(&fileName), *(void**)(&args), *(void**)(&options), &asyncOperationResult)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOperationResult, take_ownership_from_abi }; } template auto consume_Windows_System_IProcessMemoryReport::PrivateWorkingSetUsage() const { uint64_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_PrivateWorkingSetUsage(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrivateWorkingSetUsage(&value)); } return value; } template auto consume_Windows_System_IProcessMemoryReport::TotalWorkingSetUsage() const { uint64_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_TotalWorkingSetUsage(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TotalWorkingSetUsage(&value)); } return value; } template auto consume_Windows_System_IProtocolForResultsOperation::ReportCompleted(winrt::Windows::Foundation::Collections::ValueSet const& data) 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->ReportCompleted(*(void**)(&data))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ReportCompleted(*(void**)(&data))); } } template auto consume_Windows_System_IRemoteLauncherOptions::FallbackUri() 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_FallbackUri(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FallbackUri(&value)); } return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IRemoteLauncherOptions::FallbackUri(winrt::Windows::Foundation::Uri 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_FallbackUri(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_FallbackUri(*(void**)(&value))); } } template auto consume_Windows_System_IRemoteLauncherOptions::PreferredAppIds() 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_PreferredAppIds(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PreferredAppIds(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IRemoteLauncherStatics::LaunchUriAsync(winrt::Windows::System::RemoteSystems::RemoteSystemConnectionRequest const& remoteSystemConnectionRequest, winrt::Windows::Foundation::Uri const& uri) 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->LaunchUriAsync(*(void**)(&remoteSystemConnectionRequest), *(void**)(&uri), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriAsync(*(void**)(&remoteSystemConnectionRequest), *(void**)(&uri), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IRemoteLauncherStatics::LaunchUriAsync(winrt::Windows::System::RemoteSystems::RemoteSystemConnectionRequest const& remoteSystemConnectionRequest, winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::RemoteLauncherOptions 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->LaunchUriWithOptionsAsync(*(void**)(&remoteSystemConnectionRequest), *(void**)(&uri), *(void**)(&options), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriWithOptionsAsync(*(void**)(&remoteSystemConnectionRequest), *(void**)(&uri), *(void**)(&options), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IRemoteLauncherStatics::LaunchUriAsync(winrt::Windows::System::RemoteSystems::RemoteSystemConnectionRequest const& remoteSystemConnectionRequest, winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::RemoteLauncherOptions const& options, winrt::Windows::Foundation::Collections::ValueSet const& inputData) 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->LaunchUriWithDataAsync(*(void**)(&remoteSystemConnectionRequest), *(void**)(&uri), *(void**)(&options), *(void**)(&inputData), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchUriWithDataAsync(*(void**)(&remoteSystemConnectionRequest), *(void**)(&uri), *(void**)(&options), *(void**)(&inputData), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IShutdownManagerStatics::BeginShutdown(winrt::Windows::System::ShutdownKind const& shutdownKind, winrt::Windows::Foundation::TimeSpan const& timeout) 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->BeginShutdown(static_cast(shutdownKind), impl::bind_in(timeout))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->BeginShutdown(static_cast(shutdownKind), impl::bind_in(timeout))); } } template auto consume_Windows_System_IShutdownManagerStatics::CancelShutdown() 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->CancelShutdown()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CancelShutdown()); } } template auto consume_Windows_System_IShutdownManagerStatics2::IsPowerStateSupported(winrt::Windows::System::PowerState const& powerState) 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->IsPowerStateSupported(static_cast(powerState), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsPowerStateSupported(static_cast(powerState), &value)); } return value; } template auto consume_Windows_System_IShutdownManagerStatics2::EnterPowerState(winrt::Windows::System::PowerState const& powerState) 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->EnterPowerState(static_cast(powerState))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->EnterPowerState(static_cast(powerState))); } } template auto consume_Windows_System_IShutdownManagerStatics2::EnterPowerState(winrt::Windows::System::PowerState const& powerState, winrt::Windows::Foundation::TimeSpan const& wakeUpAfter) 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->EnterPowerStateWithTimeSpan(static_cast(powerState), impl::bind_in(wakeUpAfter))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->EnterPowerStateWithTimeSpan(static_cast(powerState), impl::bind_in(wakeUpAfter))); } } template auto consume_Windows_System_ITimeZoneSettingsStatics::CurrentTimeZoneDisplayName() 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_CurrentTimeZoneDisplayName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentTimeZoneDisplayName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ITimeZoneSettingsStatics::SupportedTimeZoneDisplayNames() 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_SupportedTimeZoneDisplayNames(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedTimeZoneDisplayNames(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_System_ITimeZoneSettingsStatics::CanChangeTimeZone() 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_CanChangeTimeZone(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CanChangeTimeZone(&value)); } return value; } template auto consume_Windows_System_ITimeZoneSettingsStatics::ChangeTimeZoneByDisplayName(param::hstring const& timeZoneDisplayName) 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->ChangeTimeZoneByDisplayName(*(void**)(&timeZoneDisplayName))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ChangeTimeZoneByDisplayName(*(void**)(&timeZoneDisplayName))); } } template auto consume_Windows_System_ITimeZoneSettingsStatics2::AutoUpdateTimeZoneAsync(winrt::Windows::Foundation::TimeSpan const& timeout) 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->AutoUpdateTimeZoneAsync(impl::bind_in(timeout), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AutoUpdateTimeZoneAsync(impl::bind_in(timeout), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IUser::NonRoamableId() 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_NonRoamableId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NonRoamableId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IUser::AuthenticationStatus() const { winrt::Windows::System::UserAuthenticationStatus 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_AuthenticationStatus(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AuthenticationStatus(reinterpret_cast(&value))); } return value; } template auto consume_Windows_System_IUser::Type() const { winrt::Windows::System::UserType 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_Type(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Type(reinterpret_cast(&value))); } return value; } template auto consume_Windows_System_IUser::GetPropertyAsync(param::hstring const& value) 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->GetPropertyAsync(*(void**)(&value), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPropertyAsync(*(void**)(&value), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IUser::GetPropertiesAsync(param::async_vector_view const& values) 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->GetPropertiesAsync(*(void**)(&values), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPropertiesAsync(*(void**)(&values), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IUser::GetPictureAsync(winrt::Windows::System::UserPictureSize const& desiredSize) 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->GetPictureAsync(static_cast(desiredSize), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPictureAsync(static_cast(desiredSize), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IUser2::CheckUserAgeConsentGroupAsync(winrt::Windows::System::UserAgeConsentGroup const& consentGroup) 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->CheckUserAgeConsentGroupAsync(static_cast(consentGroup), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CheckUserAgeConsentGroupAsync(static_cast(consentGroup), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IUserAuthenticationStatusChangeDeferral::Complete() 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->Complete()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Complete()); } } template auto consume_Windows_System_IUserAuthenticationStatusChangingEventArgs::GetDeferral() 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->GetDeferral(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&result)); } return winrt::Windows::System::UserAuthenticationStatusChangeDeferral{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IUserAuthenticationStatusChangingEventArgs::User() 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_User(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_User(&value)); } return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IUserAuthenticationStatusChangingEventArgs::NewStatus() const { winrt::Windows::System::UserAuthenticationStatus 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_NewStatus(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NewStatus(reinterpret_cast(&value))); } return value; } template auto consume_Windows_System_IUserAuthenticationStatusChangingEventArgs::CurrentStatus() const { winrt::Windows::System::UserAuthenticationStatus 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_CurrentStatus(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentStatus(reinterpret_cast(&value))); } return value; } template auto consume_Windows_System_IUserChangedEventArgs::User() 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_User(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_User(&value)); } return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IUserChangedEventArgs2::ChangedPropertyKinds() 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_ChangedPropertyKinds(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ChangedPropertyKinds(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IUserDeviceAssociationChangedEventArgs::DeviceId() 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_DeviceId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeviceId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IUserDeviceAssociationChangedEventArgs::NewUser() 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_NewUser(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NewUser(&value)); } return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IUserDeviceAssociationChangedEventArgs::OldUser() 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_OldUser(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_OldUser(&value)); } return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IUserDeviceAssociationStatics::FindUserFromDeviceId(param::hstring const& deviceId) const { void* user{}; 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->FindUserFromDeviceId(*(void**)(&deviceId), &user)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindUserFromDeviceId(*(void**)(&deviceId), &user)); } return winrt::Windows::System::User{ user, take_ownership_from_abi }; } template auto consume_Windows_System_IUserDeviceAssociationStatics::UserDeviceAssociationChanged(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; 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->add_UserDeviceAssociationChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_UserDeviceAssociationChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IUserDeviceAssociationStatics::UserDeviceAssociationChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, UserDeviceAssociationChanged(handler)); } template auto consume_Windows_System_IUserDeviceAssociationStatics::UserDeviceAssociationChanged(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_UserDeviceAssociationChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_UserDeviceAssociationChanged(impl::bind_in(token)); } } template auto consume_Windows_System_IUserPicker::AllowGuestAccounts() 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_AllowGuestAccounts(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AllowGuestAccounts(&value)); } return value; } template auto consume_Windows_System_IUserPicker::AllowGuestAccounts(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_AllowGuestAccounts(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AllowGuestAccounts(value)); } } template auto consume_Windows_System_IUserPicker::SuggestedSelectedUser() 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_SuggestedSelectedUser(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SuggestedSelectedUser(&value)); } return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_System_IUserPicker::SuggestedSelectedUser(winrt::Windows::System::User 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_SuggestedSelectedUser(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SuggestedSelectedUser(*(void**)(&value))); } } template auto consume_Windows_System_IUserPicker::PickSingleUserAsync() 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->PickSingleUserAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PickSingleUserAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IUserPickerStatics::IsSupported() const { bool 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->IsSupported(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsSupported(&result)); } return result; } template auto consume_Windows_System_IUserStatics::CreateWatcher() 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->CreateWatcher(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWatcher(&result)); } return winrt::Windows::System::UserWatcher{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IUserStatics::FindAllAsync() 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->FindAllAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IUserStatics::FindAllAsync(winrt::Windows::System::UserType const& type) 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->FindAllAsyncByType(static_cast(type), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllAsyncByType(static_cast(type), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IUserStatics::FindAllAsync(winrt::Windows::System::UserType const& type, winrt::Windows::System::UserAuthenticationStatus const& status) 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->FindAllAsyncByTypeAndStatus(static_cast(type), static_cast(status), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllAsyncByTypeAndStatus(static_cast(type), static_cast(status), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_System_IUserStatics::GetFromId(param::hstring const& nonRoamableId) 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->GetFromId(*(void**)(&nonRoamableId), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetFromId(*(void**)(&nonRoamableId), &result)); } return winrt::Windows::System::User{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IUserStatics2::GetDefault() 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->GetDefault(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDefault(&result)); } return winrt::Windows::System::User{ result, take_ownership_from_abi }; } template auto consume_Windows_System_IUserWatcher::Status() const { winrt::Windows::System::UserWatcherStatus 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_System_IUserWatcher::Start() 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->Start()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Start()); } } template auto consume_Windows_System_IUserWatcher::Stop() 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->Stop()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Stop()); } } template auto consume_Windows_System_IUserWatcher::Added(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_Added(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Added(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IUserWatcher::Added(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Added(handler)); } template auto consume_Windows_System_IUserWatcher::Added(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_Added(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Added(impl::bind_in(token)); } } template auto consume_Windows_System_IUserWatcher::Removed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_Removed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Removed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IUserWatcher::Removed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Removed(handler)); } template auto consume_Windows_System_IUserWatcher::Removed(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_Removed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Removed(impl::bind_in(token)); } } template auto consume_Windows_System_IUserWatcher::Updated(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_Updated(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Updated(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IUserWatcher::Updated(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Updated(handler)); } template auto consume_Windows_System_IUserWatcher::Updated(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_Updated(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Updated(impl::bind_in(token)); } } template auto consume_Windows_System_IUserWatcher::AuthenticationStatusChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_AuthenticationStatusChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AuthenticationStatusChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IUserWatcher::AuthenticationStatusChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, AuthenticationStatusChanged(handler)); } template auto consume_Windows_System_IUserWatcher::AuthenticationStatusChanged(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_AuthenticationStatusChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AuthenticationStatusChanged(impl::bind_in(token)); } } template auto consume_Windows_System_IUserWatcher::AuthenticationStatusChanging(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_AuthenticationStatusChanging(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AuthenticationStatusChanging(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IUserWatcher::AuthenticationStatusChanging(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, AuthenticationStatusChanging(handler)); } template auto consume_Windows_System_IUserWatcher::AuthenticationStatusChanging(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_AuthenticationStatusChanging(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AuthenticationStatusChanging(impl::bind_in(token)); } } template auto consume_Windows_System_IUserWatcher::EnumerationCompleted(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_EnumerationCompleted(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_EnumerationCompleted(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IUserWatcher::EnumerationCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, EnumerationCompleted(handler)); } template auto consume_Windows_System_IUserWatcher::EnumerationCompleted(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_EnumerationCompleted(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_EnumerationCompleted(impl::bind_in(token)); } } template auto consume_Windows_System_IUserWatcher::Stopped(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; 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->add_Stopped(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Stopped(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_System_IUserWatcher::Stopped(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Stopped(handler)); } template auto consume_Windows_System_IUserWatcher::Stopped(winrt::event_token const& token) const noexcept { 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; _winrt_abi_type->remove_Stopped(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Stopped(impl::bind_in(token)); } } template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke() noexcept final try { (*this)(); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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_AppResourceGroupInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppResourceGroupInfo()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AppInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppInfo()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetResourceGroups(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetResourceGroups()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateResourceGroupWatcher(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateResourceGroupWatcher()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall LaunchAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RequestInfoAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().RequestInfoAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWatcher(void** watcher) noexcept final try { clear_abi(watcher); typename D::abi_guard guard(this->shim()); *watcher = detach_from(this->shim().CreateWatcher()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestAccessAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestAccessAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestInfoForPackageAsync(void* packageFamilyName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().RequestInfoForPackageAsync(*reinterpret_cast(&packageFamilyName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestInfoForAppAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().RequestInfoForAppAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestInfoForAppUserModelId(void* appUserModelId, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().RequestInfoForAppAsync(*reinterpret_cast(&appUserModelId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_Added(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Added(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Added(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Added(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Removed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Removed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Removed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Removed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_EnumerationCompleted(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().EnumerationCompleted(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_EnumerationCompleted(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().EnumerationCompleted(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Stopped(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Stopped(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Stopped(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Stopped(*reinterpret_cast(&token)); return 0; } 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 Start() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Start(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Stop() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Stop(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AppDiagnosticInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppDiagnosticInfo()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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_PrivateCommitUsage(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrivateCommitUsage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PeakPrivateCommitUsage(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PeakPrivateCommitUsage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TotalCommitUsage(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TotalCommitUsage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TotalCommitLimit(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TotalCommitLimit()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ExpectedTotalCommitLimit(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExpectedTotalCommitLimit()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_OldLimit(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OldLimit()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NewLimit(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NewLimit()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_TaskId(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TaskId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Name(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Name()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Trigger(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Trigger()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EntryPoint(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EntryPoint()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_InstanceId(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InstanceId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsShared(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsShared()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetBackgroundTaskReports(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetBackgroundTaskReports()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetMemoryReport(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetMemoryReport()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetProcessDiagnosticInfos(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetProcessDiagnosticInfos()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetStateReport(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetStateReport()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall StartSuspendAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().StartSuspendAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StartResumeAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().StartResumeAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StartTerminateAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().StartTerminateAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_Added(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Added(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Added(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Added(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Removed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Removed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Removed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Removed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_EnumerationCompleted(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().EnumerationCompleted(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_EnumerationCompleted(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().EnumerationCompleted(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Stopped(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Stopped(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Stopped(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Stopped(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_ExecutionStateChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ExecutionStateChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ExecutionStateChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ExecutionStateChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_Status(int32_t* status) noexcept final try { typename D::abi_guard guard(this->shim()); *status = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Start() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Start(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Stop() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Stop(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AppDiagnosticInfos(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().AppDiagnosticInfos()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AppResourceGroupInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppResourceGroupInfo()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AppDiagnosticInfos(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().AppDiagnosticInfos()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AppResourceGroupInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppResourceGroupInfo()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CommitUsageLimit(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CommitUsageLimit()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CommitUsageLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CommitUsageLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrivateCommitUsage(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrivateCommitUsage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TotalCommitUsage(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TotalCommitUsage()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ExecutionState(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExecutionState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EnergyQuotaState(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EnergyQuotaState()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Name(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Name()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Name(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Name(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsEnabled(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* name, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&name))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Name(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Name()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_User(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().User()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAppAddedHostsAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetAppAddedHostsAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetAppAddedHostsAsync(void* hosts, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().SetAppAddedHostsAsync(*reinterpret_cast const*>(&hosts))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAllHosts(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetAllHosts()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateHosts(void* hosts) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UpdateHosts(*reinterpret_cast const*>(&hosts)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PackageFamilyName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PackageFamilyName()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_User(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().User()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryGetRegistration(void* name, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TryGetRegistration(*reinterpret_cast(&name))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PackageFamilyName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PackageFamilyName()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDefault(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetForUser(void* user, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetForUser(*reinterpret_cast(&user))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForPackage(void* packageFamilyName, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetForPackage(*reinterpret_cast(&packageFamilyName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetForPackageForUser(void* packageFamilyName, void* user, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetForPackageForUser(*reinterpret_cast(&packageFamilyName), *reinterpret_cast(&user))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall SetSystemDateTime(int64_t utcDateTime) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetSystemDateTime(*reinterpret_cast(&utcDateTime)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateTimer(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateTimer()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryEnqueue(void* callback, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TryEnqueue(*reinterpret_cast(&callback))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryEnqueueWithPriority(int32_t priority, void* callback, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TryEnqueue(*reinterpret_cast(&priority), *reinterpret_cast(&callback))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ShutdownStarting(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ShutdownStarting(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ShutdownStarting(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ShutdownStarting(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_ShutdownCompleted(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ShutdownCompleted(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ShutdownCompleted(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ShutdownCompleted(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_HasThreadAccess(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasThreadAccess()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DispatcherQueue(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DispatcherQueue()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShutdownQueueAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().ShutdownQueueAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateOnDedicatedThread(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateOnDedicatedThread()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDeferral(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentThread(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetForCurrentThread()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Interval(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Interval()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Interval(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Interval(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsRunning(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsRunning()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsRepeating(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsRepeating()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsRepeating(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsRepeating(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Start() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Start(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Stop() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Stop(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Tick(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Tick(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Tick(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Tick(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ItemsToSelect(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ItemsToSelect()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DisplayName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FirstName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FirstName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LastName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LastName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProviderName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProviderName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AccountName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AccountName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GuestHost(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GuestHost()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrincipalName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrincipalName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DomainName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DomainName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SessionInitiationProtocolUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SessionInitiationProtocolUri()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AgeEnforcementRegion(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AgeEnforcementRegion()); 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_Result(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Result()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_TreatAsUntrusted(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TreatAsUntrusted()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TreatAsUntrusted(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TreatAsUntrusted(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DisplayApplicationPicker(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayApplicationPicker()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DisplayApplicationPicker(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DisplayApplicationPicker(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UI(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UI()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PreferredApplicationPackageFamilyName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PreferredApplicationPackageFamilyName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PreferredApplicationPackageFamilyName(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PreferredApplicationPackageFamilyName(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PreferredApplicationDisplayName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PreferredApplicationDisplayName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PreferredApplicationDisplayName(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PreferredApplicationDisplayName(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FallbackUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FallbackUri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_FallbackUri(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().FallbackUri(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ContentType(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ContentType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ContentType(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ContentType(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_TargetApplicationPackageFamilyName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TargetApplicationPackageFamilyName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TargetApplicationPackageFamilyName(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TargetApplicationPackageFamilyName(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NeighboringFilesQuery(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NeighboringFilesQuery()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_NeighboringFilesQuery(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().NeighboringFilesQuery(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IgnoreAppUriHandlers(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IgnoreAppUriHandlers()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IgnoreAppUriHandlers(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IgnoreAppUriHandlers(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_LimitPickerToCurrentAppAndAppUriHandlers(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LimitPickerToCurrentAppAndAppUriHandlers()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_LimitPickerToCurrentAppAndAppUriHandlers(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().LimitPickerToCurrentAppAndAppUriHandlers(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall LaunchFileAsync(void* file, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchFileAsync(*reinterpret_cast(&file))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchFileWithOptionsAsync(void* file, void* options, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchFileAsync(*reinterpret_cast(&file), *reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchUriAsync(void* uri, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriAsync(*reinterpret_cast(&uri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchUriWithOptionsAsync(void* uri, void* options, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriAsync(*reinterpret_cast(&uri), *reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall LaunchUriForResultsAsync(void* uri, void* options, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriForResultsAsync(*reinterpret_cast(&uri), *reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchUriForResultsWithDataAsync(void* uri, void* options, void* inputData, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriForResultsAsync(*reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchUriWithDataAsync(void* uri, void* options, void* inputData, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriAsync(*reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall QueryUriSupportAsync(void* uri, int32_t launchQuerySupportType, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().QueryUriSupportAsync(*reinterpret_cast(&uri), *reinterpret_cast(&launchQuerySupportType))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall QueryUriSupportWithPackageFamilyNameAsync(void* uri, int32_t launchQuerySupportType, void* packageFamilyName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().QueryUriSupportAsync(*reinterpret_cast(&uri), *reinterpret_cast(&launchQuerySupportType), *reinterpret_cast(&packageFamilyName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall QueryFileSupportAsync(void* file, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().QueryFileSupportAsync(*reinterpret_cast(&file))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall QueryFileSupportWithPackageFamilyNameAsync(void* file, void* packageFamilyName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().QueryFileSupportAsync(*reinterpret_cast(&file), *reinterpret_cast(&packageFamilyName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindUriSchemeHandlersAsync(void* scheme, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().FindUriSchemeHandlersAsync(*reinterpret_cast(&scheme))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindUriSchemeHandlersWithLaunchUriTypeAsync(void* scheme, int32_t launchQuerySupportType, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().FindUriSchemeHandlersAsync(*reinterpret_cast(&scheme), *reinterpret_cast(&launchQuerySupportType))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindFileHandlersAsync(void* extension, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().FindFileHandlersAsync(*reinterpret_cast(&extension))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall LaunchFolderAsync(void* folder, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchFolderAsync(*reinterpret_cast(&folder))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchFolderWithOptionsAsync(void* folder, void* options, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchFolderAsync(*reinterpret_cast(&folder), *reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall QueryAppUriSupportAsync(void* uri, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().QueryAppUriSupportAsync(*reinterpret_cast(&uri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall QueryAppUriSupportWithPackageFamilyNameAsync(void* uri, void* packageFamilyName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().QueryAppUriSupportAsync(*reinterpret_cast(&uri), *reinterpret_cast(&packageFamilyName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAppUriHandlersAsync(void* uri, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().FindAppUriHandlersAsync(*reinterpret_cast(&uri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchUriForUserAsync(void* user, void* uri, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchUriWithOptionsForUserAsync(void* user, void* uri, void* options, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri), *reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchUriWithDataForUserAsync(void* user, void* uri, void* options, void* inputData, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchUriForResultsForUserAsync(void* user, void* uri, void* options, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriForResultsForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri), *reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchUriForResultsWithDataForUserAsync(void* user, void* uri, void* options, void* inputData, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriForResultsForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall LaunchFolderPathAsync(void* path, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchFolderPathAsync(*reinterpret_cast(&path))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchFolderPathWithOptionsAsync(void* path, void* options, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchFolderPathAsync(*reinterpret_cast(&path), *reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchFolderPathForUserAsync(void* user, void* path, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchFolderPathForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&path))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchFolderPathWithOptionsForUserAsync(void* user, void* path, void* options, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchFolderPathForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&path), *reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_InvocationPoint(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().InvocationPoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_InvocationPoint(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().InvocationPoint(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectionRect(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SelectionRect()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SelectionRect(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SelectionRect(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PreferredPlacement(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PreferredPlacement()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PreferredPlacement(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PreferredPlacement(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_DesiredRemainingView(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DesiredRemainingView()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DesiredRemainingView(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DesiredRemainingView(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AppMemoryUsage(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppMemoryUsage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AppMemoryUsageLimit(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppMemoryUsageLimit()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AppMemoryUsageLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppMemoryUsageLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_AppMemoryUsageIncreased(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AppMemoryUsageIncreased(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AppMemoryUsageIncreased(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AppMemoryUsageIncreased(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_AppMemoryUsageDecreased(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AppMemoryUsageDecreased(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AppMemoryUsageDecreased(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AppMemoryUsageDecreased(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_AppMemoryUsageLimitChanging(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AppMemoryUsageLimitChanging(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AppMemoryUsageLimitChanging(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AppMemoryUsageLimitChanging(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAppMemoryReport(void** memoryReport) noexcept final try { clear_abi(memoryReport); typename D::abi_guard guard(this->shim()); *memoryReport = detach_from(this->shim().GetAppMemoryReport()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetProcessMemoryReport(void** memoryReport) noexcept final try { clear_abi(memoryReport); typename D::abi_guard guard(this->shim()); *memoryReport = detach_from(this->shim().GetProcessMemoryReport()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TrySetAppMemoryUsageLimit(uint64_t value, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TrySetAppMemoryUsageLimit(value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ExpectedAppMemoryUsageLimit(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExpectedAppMemoryUsageLimit()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_StandardInput(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StandardInput()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_StandardInput(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StandardInput(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StandardOutput(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StandardOutput()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_StandardOutput(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StandardOutput(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StandardError(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StandardError()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_StandardError(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StandardError(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WorkingDirectory(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WorkingDirectory()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_WorkingDirectory(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().WorkingDirectory(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RunToCompletionAsync(void* fileName, void* args, void** asyncOperationResult) noexcept final try { clear_abi(asyncOperationResult); typename D::abi_guard guard(this->shim()); *asyncOperationResult = detach_from>(this->shim().RunToCompletionAsync(*reinterpret_cast(&fileName), *reinterpret_cast(&args))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RunToCompletionAsyncWithOptions(void* fileName, void* args, void* options, void** asyncOperationResult) noexcept final try { clear_abi(asyncOperationResult); typename D::abi_guard guard(this->shim()); *asyncOperationResult = detach_from>(this->shim().RunToCompletionAsync(*reinterpret_cast(&fileName), *reinterpret_cast(&args), *reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PrivateWorkingSetUsage(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrivateWorkingSetUsage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TotalWorkingSetUsage(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TotalWorkingSetUsage()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ReportCompleted(void* data) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReportCompleted(*reinterpret_cast(&data)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FallbackUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FallbackUri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_FallbackUri(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().FallbackUri(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PreferredAppIds(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().PreferredAppIds()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall LaunchUriAsync(void* remoteSystemConnectionRequest, void* uri, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriAsync(*reinterpret_cast(&remoteSystemConnectionRequest), *reinterpret_cast(&uri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchUriWithOptionsAsync(void* remoteSystemConnectionRequest, void* uri, void* options, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriAsync(*reinterpret_cast(&remoteSystemConnectionRequest), *reinterpret_cast(&uri), *reinterpret_cast(&options))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchUriWithDataAsync(void* remoteSystemConnectionRequest, void* uri, void* options, void* inputData, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchUriAsync(*reinterpret_cast(&remoteSystemConnectionRequest), *reinterpret_cast(&uri), *reinterpret_cast(&options), *reinterpret_cast(&inputData))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall BeginShutdown(int32_t shutdownKind, int64_t timeout) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().BeginShutdown(*reinterpret_cast(&shutdownKind), *reinterpret_cast(&timeout)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CancelShutdown() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CancelShutdown(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsPowerStateSupported(int32_t powerState, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPowerStateSupported(*reinterpret_cast(&powerState))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnterPowerState(int32_t powerState) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnterPowerState(*reinterpret_cast(&powerState)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnterPowerStateWithTimeSpan(int32_t powerState, int64_t wakeUpAfter) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnterPowerState(*reinterpret_cast(&powerState), *reinterpret_cast(&wakeUpAfter)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CurrentTimeZoneDisplayName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentTimeZoneDisplayName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedTimeZoneDisplayNames(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedTimeZoneDisplayNames()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CanChangeTimeZone(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanChangeTimeZone()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ChangeTimeZoneByDisplayName(void* timeZoneDisplayName) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ChangeTimeZoneByDisplayName(*reinterpret_cast(&timeZoneDisplayName)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall AutoUpdateTimeZoneAsync(int64_t timeout, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().AutoUpdateTimeZoneAsync(*reinterpret_cast(&timeout))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_NonRoamableId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NonRoamableId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AuthenticationStatus(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AuthenticationStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Type(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Type()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPropertyAsync(void* value, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetPropertyAsync(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPropertiesAsync(void* values, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetPropertiesAsync(*reinterpret_cast const*>(&values))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPictureAsync(int32_t desiredSize, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetPictureAsync(*reinterpret_cast(&desiredSize))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CheckUserAgeConsentGroupAsync(int32_t consentGroup, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CheckUserAgeConsentGroupAsync(*reinterpret_cast(&consentGroup))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Complete() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Complete(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDeferral(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_User(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().User()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NewStatus(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NewStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentStatus(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentStatus()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_User(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().User()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ChangedPropertyKinds(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ChangedPropertyKinds()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DeviceId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeviceId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NewUser(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NewUser()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OldUser(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OldUser()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FindUserFromDeviceId(void* deviceId, void** user) noexcept final try { clear_abi(user); typename D::abi_guard guard(this->shim()); *user = detach_from(this->shim().FindUserFromDeviceId(*reinterpret_cast(&deviceId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_UserDeviceAssociationChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().UserDeviceAssociationChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_UserDeviceAssociationChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().UserDeviceAssociationChanged(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AllowGuestAccounts(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowGuestAccounts()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowGuestAccounts(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowGuestAccounts(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SuggestedSelectedUser(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SuggestedSelectedUser()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SuggestedSelectedUser(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SuggestedSelectedUser(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PickSingleUserAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().PickSingleUserAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsSupported(bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWatcher(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWatcher()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().FindAllAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllAsyncByType(int32_t type, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().FindAllAsync(*reinterpret_cast(&type))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllAsyncByTypeAndStatus(int32_t type, int32_t status, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().FindAllAsync(*reinterpret_cast(&type), *reinterpret_cast(&status))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFromId(void* nonRoamableId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetFromId(*reinterpret_cast(&nonRoamableId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDefault(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDefault()); 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 Start() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Start(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Stop() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Stop(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Added(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Added(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Added(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Added(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Removed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Removed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Removed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Removed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Updated(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Updated(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Updated(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Updated(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_AuthenticationStatusChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AuthenticationStatusChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AuthenticationStatusChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AuthenticationStatusChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_AuthenticationStatusChanging(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AuthenticationStatusChanging(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AuthenticationStatusChanging(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AuthenticationStatusChanging(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_EnumerationCompleted(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().EnumerationCompleted(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_EnumerationCompleted(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().EnumerationCompleted(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Stopped(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Stopped(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Stopped(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Stopped(*reinterpret_cast(&token)); return 0; } }; #endif } WINRT_EXPORT namespace winrt::Windows::System { constexpr auto operator|(VirtualKeyModifiers const left, VirtualKeyModifiers const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(VirtualKeyModifiers& left, VirtualKeyModifiers const right) noexcept { left = left | right; return left; } constexpr auto operator&(VirtualKeyModifiers const left, VirtualKeyModifiers const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(VirtualKeyModifiers& left, VirtualKeyModifiers const right) noexcept { left = left & right; return left; } constexpr auto operator~(VirtualKeyModifiers const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(VirtualKeyModifiers const left, VirtualKeyModifiers const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(VirtualKeyModifiers& left, VirtualKeyModifiers const right) noexcept { left = left ^ right; return left; } inline auto AppDiagnosticInfo::RequestInfoAsync() { return impl::call_factory_cast>(*)(IAppDiagnosticInfoStatics const&), AppDiagnosticInfo, IAppDiagnosticInfoStatics>([](IAppDiagnosticInfoStatics const& f) { return f.RequestInfoAsync(); }); } inline auto AppDiagnosticInfo::CreateWatcher() { return impl::call_factory_cast([](IAppDiagnosticInfoStatics2 const& f) { return f.CreateWatcher(); }); } inline auto AppDiagnosticInfo::RequestAccessAsync() { return impl::call_factory_cast(*)(IAppDiagnosticInfoStatics2 const&), AppDiagnosticInfo, IAppDiagnosticInfoStatics2>([](IAppDiagnosticInfoStatics2 const& f) { return f.RequestAccessAsync(); }); } inline auto AppDiagnosticInfo::RequestInfoForPackageAsync(param::hstring const& packageFamilyName) { return impl::call_factory([&](IAppDiagnosticInfoStatics2 const& f) { return f.RequestInfoForPackageAsync(packageFamilyName); }); } inline auto AppDiagnosticInfo::RequestInfoForAppAsync() { return impl::call_factory_cast>(*)(IAppDiagnosticInfoStatics2 const&), AppDiagnosticInfo, IAppDiagnosticInfoStatics2>([](IAppDiagnosticInfoStatics2 const& f) { return f.RequestInfoForAppAsync(); }); } inline auto AppDiagnosticInfo::RequestInfoForAppAsync(param::hstring const& appUserModelId) { return impl::call_factory([&](IAppDiagnosticInfoStatics2 const& f) { return f.RequestInfoForAppAsync(appUserModelId); }); } inline AppUriHandlerHost::AppUriHandlerHost() : AppUriHandlerHost(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline AppUriHandlerHost::AppUriHandlerHost(param::hstring const& name) : AppUriHandlerHost(impl::call_factory([&](IAppUriHandlerHostFactory const& f) { return f.CreateInstance(name); })) { } inline auto AppUriHandlerRegistrationManager::GetDefault() { return impl::call_factory_cast([](IAppUriHandlerRegistrationManagerStatics const& f) { return f.GetDefault(); }); } inline auto AppUriHandlerRegistrationManager::GetForUser(winrt::Windows::System::User const& user) { return impl::call_factory([&](IAppUriHandlerRegistrationManagerStatics const& f) { return f.GetForUser(user); }); } inline auto AppUriHandlerRegistrationManager::GetForPackage(param::hstring const& packageFamilyName) { return impl::call_factory([&](IAppUriHandlerRegistrationManagerStatics2 const& f) { return f.GetForPackage(packageFamilyName); }); } inline auto AppUriHandlerRegistrationManager::GetForPackageForUser(param::hstring const& packageFamilyName, winrt::Windows::System::User const& user) { return impl::call_factory([&](IAppUriHandlerRegistrationManagerStatics2 const& f) { return f.GetForPackageForUser(packageFamilyName, user); }); } inline auto DateTimeSettings::SetSystemDateTime(winrt::Windows::Foundation::DateTime const& utcDateTime) { impl::call_factory([&](IDateTimeSettingsStatics const& f) { return f.SetSystemDateTime(utcDateTime); }); } inline auto DispatcherQueue::GetForCurrentThread() { return impl::call_factory_cast([](IDispatcherQueueStatics const& f) { return f.GetForCurrentThread(); }); } inline auto DispatcherQueueController::CreateOnDedicatedThread() { return impl::call_factory_cast([](IDispatcherQueueControllerStatics const& f) { return f.CreateOnDedicatedThread(); }); } inline FolderLauncherOptions::FolderLauncherOptions() : FolderLauncherOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto KnownUserProperties::DisplayName() { return impl::call_factory_cast([](IKnownUserPropertiesStatics const& f) { return f.DisplayName(); }); } inline auto KnownUserProperties::FirstName() { return impl::call_factory_cast([](IKnownUserPropertiesStatics const& f) { return f.FirstName(); }); } inline auto KnownUserProperties::LastName() { return impl::call_factory_cast([](IKnownUserPropertiesStatics const& f) { return f.LastName(); }); } inline auto KnownUserProperties::ProviderName() { return impl::call_factory_cast([](IKnownUserPropertiesStatics const& f) { return f.ProviderName(); }); } inline auto KnownUserProperties::AccountName() { return impl::call_factory_cast([](IKnownUserPropertiesStatics const& f) { return f.AccountName(); }); } inline auto KnownUserProperties::GuestHost() { return impl::call_factory_cast([](IKnownUserPropertiesStatics const& f) { return f.GuestHost(); }); } inline auto KnownUserProperties::PrincipalName() { return impl::call_factory_cast([](IKnownUserPropertiesStatics const& f) { return f.PrincipalName(); }); } inline auto KnownUserProperties::DomainName() { return impl::call_factory_cast([](IKnownUserPropertiesStatics const& f) { return f.DomainName(); }); } inline auto KnownUserProperties::SessionInitiationProtocolUri() { return impl::call_factory_cast([](IKnownUserPropertiesStatics const& f) { return f.SessionInitiationProtocolUri(); }); } inline auto KnownUserProperties::AgeEnforcementRegion() { return impl::call_factory_cast([](IKnownUserPropertiesStatics2 const& f) { return f.AgeEnforcementRegion(); }); } inline auto Launcher::LaunchFileAsync(winrt::Windows::Storage::IStorageFile const& file) { return impl::call_factory([&](ILauncherStatics const& f) { return f.LaunchFileAsync(file); }); } inline auto Launcher::LaunchFileAsync(winrt::Windows::Storage::IStorageFile const& file, winrt::Windows::System::LauncherOptions const& options) { return impl::call_factory([&](ILauncherStatics const& f) { return f.LaunchFileAsync(file, options); }); } inline auto Launcher::LaunchUriAsync(winrt::Windows::Foundation::Uri const& uri) { return impl::call_factory([&](ILauncherStatics const& f) { return f.LaunchUriAsync(uri); }); } inline auto Launcher::LaunchUriAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions const& options) { return impl::call_factory([&](ILauncherStatics const& f) { return f.LaunchUriAsync(uri, options); }); } inline auto Launcher::LaunchUriForResultsAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions const& options) { return impl::call_factory([&](ILauncherStatics2 const& f) { return f.LaunchUriForResultsAsync(uri, options); }); } inline auto Launcher::LaunchUriForResultsAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions const& options, winrt::Windows::Foundation::Collections::ValueSet const& inputData) { return impl::call_factory([&](ILauncherStatics2 const& f) { return f.LaunchUriForResultsAsync(uri, options, inputData); }); } inline auto Launcher::LaunchUriAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions const& options, winrt::Windows::Foundation::Collections::ValueSet const& inputData) { return impl::call_factory([&](ILauncherStatics2 const& f) { return f.LaunchUriAsync(uri, options, inputData); }); } inline auto Launcher::QueryUriSupportAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LaunchQuerySupportType const& launchQuerySupportType) { return impl::call_factory([&](ILauncherStatics2 const& f) { return f.QueryUriSupportAsync(uri, launchQuerySupportType); }); } inline auto Launcher::QueryUriSupportAsync(winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LaunchQuerySupportType const& launchQuerySupportType, param::hstring const& packageFamilyName) { return impl::call_factory([&](ILauncherStatics2 const& f) { return f.QueryUriSupportAsync(uri, launchQuerySupportType, packageFamilyName); }); } inline auto Launcher::QueryFileSupportAsync(winrt::Windows::Storage::StorageFile const& file) { return impl::call_factory([&](ILauncherStatics2 const& f) { return f.QueryFileSupportAsync(file); }); } inline auto Launcher::QueryFileSupportAsync(winrt::Windows::Storage::StorageFile const& file, param::hstring const& packageFamilyName) { return impl::call_factory([&](ILauncherStatics2 const& f) { return f.QueryFileSupportAsync(file, packageFamilyName); }); } inline auto Launcher::FindUriSchemeHandlersAsync(param::hstring const& scheme) { return impl::call_factory([&](ILauncherStatics2 const& f) { return f.FindUriSchemeHandlersAsync(scheme); }); } inline auto Launcher::FindUriSchemeHandlersAsync(param::hstring const& scheme, winrt::Windows::System::LaunchQuerySupportType const& launchQuerySupportType) { return impl::call_factory([&](ILauncherStatics2 const& f) { return f.FindUriSchemeHandlersAsync(scheme, launchQuerySupportType); }); } inline auto Launcher::FindFileHandlersAsync(param::hstring const& extension) { return impl::call_factory([&](ILauncherStatics2 const& f) { return f.FindFileHandlersAsync(extension); }); } inline auto Launcher::LaunchFolderAsync(winrt::Windows::Storage::IStorageFolder const& folder) { return impl::call_factory([&](ILauncherStatics3 const& f) { return f.LaunchFolderAsync(folder); }); } inline auto Launcher::LaunchFolderAsync(winrt::Windows::Storage::IStorageFolder const& folder, winrt::Windows::System::FolderLauncherOptions const& options) { return impl::call_factory([&](ILauncherStatics3 const& f) { return f.LaunchFolderAsync(folder, options); }); } inline auto Launcher::QueryAppUriSupportAsync(winrt::Windows::Foundation::Uri const& uri) { return impl::call_factory([&](ILauncherStatics4 const& f) { return f.QueryAppUriSupportAsync(uri); }); } inline auto Launcher::QueryAppUriSupportAsync(winrt::Windows::Foundation::Uri const& uri, param::hstring const& packageFamilyName) { return impl::call_factory([&](ILauncherStatics4 const& f) { return f.QueryAppUriSupportAsync(uri, packageFamilyName); }); } inline auto Launcher::FindAppUriHandlersAsync(winrt::Windows::Foundation::Uri const& uri) { return impl::call_factory([&](ILauncherStatics4 const& f) { return f.FindAppUriHandlersAsync(uri); }); } inline auto Launcher::LaunchUriForUserAsync(winrt::Windows::System::User const& user, winrt::Windows::Foundation::Uri const& uri) { return impl::call_factory([&](ILauncherStatics4 const& f) { return f.LaunchUriForUserAsync(user, uri); }); } inline auto Launcher::LaunchUriForUserAsync(winrt::Windows::System::User const& user, winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions const& options) { return impl::call_factory([&](ILauncherStatics4 const& f) { return f.LaunchUriForUserAsync(user, uri, options); }); } inline auto Launcher::LaunchUriForUserAsync(winrt::Windows::System::User const& user, winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions const& options, winrt::Windows::Foundation::Collections::ValueSet const& inputData) { return impl::call_factory([&](ILauncherStatics4 const& f) { return f.LaunchUriForUserAsync(user, uri, options, inputData); }); } inline auto Launcher::LaunchUriForResultsForUserAsync(winrt::Windows::System::User const& user, winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions const& options) { return impl::call_factory([&](ILauncherStatics4 const& f) { return f.LaunchUriForResultsForUserAsync(user, uri, options); }); } inline auto Launcher::LaunchUriForResultsForUserAsync(winrt::Windows::System::User const& user, winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::LauncherOptions const& options, winrt::Windows::Foundation::Collections::ValueSet const& inputData) { return impl::call_factory([&](ILauncherStatics4 const& f) { return f.LaunchUriForResultsForUserAsync(user, uri, options, inputData); }); } inline auto Launcher::LaunchFolderPathAsync(param::hstring const& path) { return impl::call_factory([&](ILauncherStatics5 const& f) { return f.LaunchFolderPathAsync(path); }); } inline auto Launcher::LaunchFolderPathAsync(param::hstring const& path, winrt::Windows::System::FolderLauncherOptions const& options) { return impl::call_factory([&](ILauncherStatics5 const& f) { return f.LaunchFolderPathAsync(path, options); }); } inline auto Launcher::LaunchFolderPathForUserAsync(winrt::Windows::System::User const& user, param::hstring const& path) { return impl::call_factory([&](ILauncherStatics5 const& f) { return f.LaunchFolderPathForUserAsync(user, path); }); } inline auto Launcher::LaunchFolderPathForUserAsync(winrt::Windows::System::User const& user, param::hstring const& path, winrt::Windows::System::FolderLauncherOptions const& options) { return impl::call_factory([&](ILauncherStatics5 const& f) { return f.LaunchFolderPathForUserAsync(user, path, options); }); } inline LauncherOptions::LauncherOptions() : LauncherOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto MemoryManager::AppMemoryUsage() { return impl::call_factory_cast([](IMemoryManagerStatics const& f) { return f.AppMemoryUsage(); }); } inline auto MemoryManager::AppMemoryUsageLimit() { return impl::call_factory_cast([](IMemoryManagerStatics const& f) { return f.AppMemoryUsageLimit(); }); } inline auto MemoryManager::AppMemoryUsageLevel() { return impl::call_factory_cast([](IMemoryManagerStatics const& f) { return f.AppMemoryUsageLevel(); }); } inline auto MemoryManager::AppMemoryUsageIncreased(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMemoryManagerStatics const& f) { return f.AppMemoryUsageIncreased(handler); }); } inline auto MemoryManager::AppMemoryUsageIncreased(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MemoryManager::AppMemoryUsageIncreased_revoker{ f, f.AppMemoryUsageIncreased(handler) }; } inline auto MemoryManager::AppMemoryUsageIncreased(winrt::event_token const& token) { impl::call_factory([&](IMemoryManagerStatics const& f) { return f.AppMemoryUsageIncreased(token); }); } inline auto MemoryManager::AppMemoryUsageDecreased(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMemoryManagerStatics const& f) { return f.AppMemoryUsageDecreased(handler); }); } inline auto MemoryManager::AppMemoryUsageDecreased(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MemoryManager::AppMemoryUsageDecreased_revoker{ f, f.AppMemoryUsageDecreased(handler) }; } inline auto MemoryManager::AppMemoryUsageDecreased(winrt::event_token const& token) { impl::call_factory([&](IMemoryManagerStatics const& f) { return f.AppMemoryUsageDecreased(token); }); } inline auto MemoryManager::AppMemoryUsageLimitChanging(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMemoryManagerStatics const& f) { return f.AppMemoryUsageLimitChanging(handler); }); } inline auto MemoryManager::AppMemoryUsageLimitChanging(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MemoryManager::AppMemoryUsageLimitChanging_revoker{ f, f.AppMemoryUsageLimitChanging(handler) }; } inline auto MemoryManager::AppMemoryUsageLimitChanging(winrt::event_token const& token) { impl::call_factory([&](IMemoryManagerStatics const& f) { return f.AppMemoryUsageLimitChanging(token); }); } inline auto MemoryManager::GetAppMemoryReport() { return impl::call_factory_cast([](IMemoryManagerStatics2 const& f) { return f.GetAppMemoryReport(); }); } inline auto MemoryManager::GetProcessMemoryReport() { return impl::call_factory_cast([](IMemoryManagerStatics2 const& f) { return f.GetProcessMemoryReport(); }); } inline auto MemoryManager::TrySetAppMemoryUsageLimit(uint64_t value) { return impl::call_factory([&](IMemoryManagerStatics3 const& f) { return f.TrySetAppMemoryUsageLimit(value); }); } inline auto MemoryManager::ExpectedAppMemoryUsageLimit() { return impl::call_factory_cast([](IMemoryManagerStatics4 const& f) { return f.ExpectedAppMemoryUsageLimit(); }); } inline auto ProcessLauncher::RunToCompletionAsync(param::hstring const& fileName, param::hstring const& args) { return impl::call_factory([&](IProcessLauncherStatics const& f) { return f.RunToCompletionAsync(fileName, args); }); } inline auto ProcessLauncher::RunToCompletionAsync(param::hstring const& fileName, param::hstring const& args, winrt::Windows::System::ProcessLauncherOptions const& options) { return impl::call_factory([&](IProcessLauncherStatics const& f) { return f.RunToCompletionAsync(fileName, args, options); }); } inline ProcessLauncherOptions::ProcessLauncherOptions() : ProcessLauncherOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto RemoteLauncher::LaunchUriAsync(winrt::Windows::System::RemoteSystems::RemoteSystemConnectionRequest const& remoteSystemConnectionRequest, winrt::Windows::Foundation::Uri const& uri) { return impl::call_factory([&](IRemoteLauncherStatics const& f) { return f.LaunchUriAsync(remoteSystemConnectionRequest, uri); }); } inline auto RemoteLauncher::LaunchUriAsync(winrt::Windows::System::RemoteSystems::RemoteSystemConnectionRequest const& remoteSystemConnectionRequest, winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::RemoteLauncherOptions const& options) { return impl::call_factory([&](IRemoteLauncherStatics const& f) { return f.LaunchUriAsync(remoteSystemConnectionRequest, uri, options); }); } inline auto RemoteLauncher::LaunchUriAsync(winrt::Windows::System::RemoteSystems::RemoteSystemConnectionRequest const& remoteSystemConnectionRequest, winrt::Windows::Foundation::Uri const& uri, winrt::Windows::System::RemoteLauncherOptions const& options, winrt::Windows::Foundation::Collections::ValueSet const& inputData) { return impl::call_factory([&](IRemoteLauncherStatics const& f) { return f.LaunchUriAsync(remoteSystemConnectionRequest, uri, options, inputData); }); } inline RemoteLauncherOptions::RemoteLauncherOptions() : RemoteLauncherOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto ShutdownManager::BeginShutdown(winrt::Windows::System::ShutdownKind const& shutdownKind, winrt::Windows::Foundation::TimeSpan const& timeout) { impl::call_factory([&](IShutdownManagerStatics const& f) { return f.BeginShutdown(shutdownKind, timeout); }); } inline auto ShutdownManager::CancelShutdown() { impl::call_factory_cast([](IShutdownManagerStatics const& f) { return f.CancelShutdown(); }); } inline auto ShutdownManager::IsPowerStateSupported(winrt::Windows::System::PowerState const& powerState) { return impl::call_factory([&](IShutdownManagerStatics2 const& f) { return f.IsPowerStateSupported(powerState); }); } inline auto ShutdownManager::EnterPowerState(winrt::Windows::System::PowerState const& powerState) { impl::call_factory([&](IShutdownManagerStatics2 const& f) { return f.EnterPowerState(powerState); }); } inline auto ShutdownManager::EnterPowerState(winrt::Windows::System::PowerState const& powerState, winrt::Windows::Foundation::TimeSpan const& wakeUpAfter) { impl::call_factory([&](IShutdownManagerStatics2 const& f) { return f.EnterPowerState(powerState, wakeUpAfter); }); } inline auto TimeZoneSettings::CurrentTimeZoneDisplayName() { return impl::call_factory_cast([](ITimeZoneSettingsStatics const& f) { return f.CurrentTimeZoneDisplayName(); }); } inline auto TimeZoneSettings::SupportedTimeZoneDisplayNames() { return impl::call_factory_cast(*)(ITimeZoneSettingsStatics const&), TimeZoneSettings, ITimeZoneSettingsStatics>([](ITimeZoneSettingsStatics const& f) { return f.SupportedTimeZoneDisplayNames(); }); } inline auto TimeZoneSettings::CanChangeTimeZone() { return impl::call_factory_cast([](ITimeZoneSettingsStatics const& f) { return f.CanChangeTimeZone(); }); } inline auto TimeZoneSettings::ChangeTimeZoneByDisplayName(param::hstring const& timeZoneDisplayName) { impl::call_factory([&](ITimeZoneSettingsStatics const& f) { return f.ChangeTimeZoneByDisplayName(timeZoneDisplayName); }); } inline auto TimeZoneSettings::AutoUpdateTimeZoneAsync(winrt::Windows::Foundation::TimeSpan const& timeout) { return impl::call_factory([&](ITimeZoneSettingsStatics2 const& f) { return f.AutoUpdateTimeZoneAsync(timeout); }); } inline auto User::CreateWatcher() { return impl::call_factory_cast([](IUserStatics const& f) { return f.CreateWatcher(); }); } inline auto User::FindAllAsync() { return impl::call_factory_cast>(*)(IUserStatics const&), User, IUserStatics>([](IUserStatics const& f) { return f.FindAllAsync(); }); } inline auto User::FindAllAsync(winrt::Windows::System::UserType const& type) { return impl::call_factory([&](IUserStatics const& f) { return f.FindAllAsync(type); }); } inline auto User::FindAllAsync(winrt::Windows::System::UserType const& type, winrt::Windows::System::UserAuthenticationStatus const& status) { return impl::call_factory([&](IUserStatics const& f) { return f.FindAllAsync(type, status); }); } inline auto User::GetFromId(param::hstring const& nonRoamableId) { return impl::call_factory([&](IUserStatics const& f) { return f.GetFromId(nonRoamableId); }); } inline auto User::GetDefault() { return impl::call_factory_cast([](IUserStatics2 const& f) { return f.GetDefault(); }); } inline auto UserDeviceAssociation::FindUserFromDeviceId(param::hstring const& deviceId) { return impl::call_factory([&](IUserDeviceAssociationStatics const& f) { return f.FindUserFromDeviceId(deviceId); }); } inline auto UserDeviceAssociation::UserDeviceAssociationChanged(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IUserDeviceAssociationStatics const& f) { return f.UserDeviceAssociationChanged(handler); }); } inline auto UserDeviceAssociation::UserDeviceAssociationChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return UserDeviceAssociation::UserDeviceAssociationChanged_revoker{ f, f.UserDeviceAssociationChanged(handler) }; } inline auto UserDeviceAssociation::UserDeviceAssociationChanged(winrt::event_token const& token) { impl::call_factory([&](IUserDeviceAssociationStatics const& f) { return f.UserDeviceAssociationChanged(token); }); } inline UserPicker::UserPicker() : UserPicker(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto UserPicker::IsSupported() { return impl::call_factory_cast([](IUserPickerStatics const& f) { return f.IsSupported(); }); } template DispatcherQueueHandler::DispatcherQueueHandler(L handler) : DispatcherQueueHandler(impl::make_delegate(std::forward(handler))) { } template DispatcherQueueHandler::DispatcherQueueHandler(F* handler) : DispatcherQueueHandler([=](auto&&... args) { return handler(args...); }) { } template DispatcherQueueHandler::DispatcherQueueHandler(O* object, M method) : DispatcherQueueHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template DispatcherQueueHandler::DispatcherQueueHandler(com_ptr&& object, M method) : DispatcherQueueHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template DispatcherQueueHandler::DispatcherQueueHandler(weak_ref&& object, LM&& lambda_or_method) : DispatcherQueueHandler([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 DispatcherQueueHandler::DispatcherQueueHandler(std::shared_ptr&& object, M method) : DispatcherQueueHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template DispatcherQueueHandler::DispatcherQueueHandler(std::weak_ptr&& object, LM&& lambda_or_method) : DispatcherQueueHandler([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 DispatcherQueueHandler::operator()() const { check_hresult((*(impl::abi_t**)this)->Invoke()); } } 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 {}; 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 {}; 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 } WINRT_EXPORT namespace winrt { [[nodiscard]] inline auto resume_foreground( Windows::System::DispatcherQueue const& dispatcher, Windows::System::DispatcherQueuePriority const priority = Windows::System::DispatcherQueuePriority::Normal) noexcept { struct awaitable { awaitable(Windows::System::DispatcherQueue const& dispatcher, Windows::System::DispatcherQueuePriority const priority) noexcept : m_dispatcher(dispatcher), m_priority(priority) { } bool await_ready() const noexcept { return false; } bool await_resume() const noexcept { return m_queued; } bool await_suspend(impl::coroutine_handle<> handle) { return m_dispatcher.TryEnqueue(m_priority, [handle, this] { m_queued = true; handle(); }); } private: Windows::System::DispatcherQueue const& m_dispatcher; Windows::System::DispatcherQueuePriority const m_priority; bool m_queued{}; }; return awaitable{ dispatcher, priority }; }; #ifdef WINRT_IMPL_COROUTINES inline auto operator co_await(Windows::System::DispatcherQueue const& dispatcher) { return resume_foreground(dispatcher); } #endif } #endif