// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_H #define WINRT_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #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/Microsoft.Windows.ApplicationModel.WindowsAppRuntime.2.h" namespace winrt::impl { template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IDeploymentInitializeOptions::ForceDeployment() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IDeploymentInitializeOptions)->get_ForceDeployment(&value)); return value; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IDeploymentInitializeOptions::ForceDeployment(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IDeploymentInitializeOptions)->put_ForceDeployment(value)); } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IDeploymentInitializeOptions2::OnErrorShowUI() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IDeploymentInitializeOptions2)->get_OnErrorShowUI(&value)); return value; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IDeploymentInitializeOptions2::OnErrorShowUI(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IDeploymentInitializeOptions2)->put_OnErrorShowUI(value)); } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IDeploymentManagerStatics::GetStatus() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IDeploymentManagerStatics)->GetStatus(&result)); return winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::DeploymentResult{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IDeploymentManagerStatics::Initialize() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IDeploymentManagerStatics)->Initialize(&result)); return winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::DeploymentResult{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IDeploymentManagerStatics2::Initialize(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::DeploymentInitializeOptions const& deploymentInitializeOptions) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IDeploymentManagerStatics2)->Initialize(*(void**)(&deploymentInitializeOptions), &result)); return winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::DeploymentResult{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IDeploymentResult::Status() const { winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::DeploymentStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IDeploymentResult)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IDeploymentResult::ExtendedError() const { winrt::hresult value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IDeploymentResult)->get_ExtendedError(put_abi(value))); return value; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IDeploymentResultFactory::CreateInstance(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::DeploymentStatus const& status, winrt::hresult const& extendedError) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IDeploymentResultFactory)->CreateInstance(static_cast(status), impl::bind_in(extendedError), &value)); return winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::DeploymentResult{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IReleaseInfoStatics::Major() const { uint16_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IReleaseInfoStatics)->get_Major(&value)); return value; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IReleaseInfoStatics::Minor() const { uint16_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IReleaseInfoStatics)->get_Minor(&value)); return value; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IReleaseInfoStatics::Patch() const { uint16_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IReleaseInfoStatics)->get_Patch(&value)); return value; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IReleaseInfoStatics::VersionTag() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IReleaseInfoStatics)->get_VersionTag(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IReleaseInfoStatics::AsString() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IReleaseInfoStatics)->get_AsString(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IRuntimeCompatibilityOptions::PatchLevel1() const { winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::WindowsAppRuntimeVersion value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IRuntimeCompatibilityOptions)->get_PatchLevel1(put_abi(value))); return value; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IRuntimeCompatibilityOptions::PatchLevel1(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::WindowsAppRuntimeVersion const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IRuntimeCompatibilityOptions)->put_PatchLevel1(impl::bind_in(value))); } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IRuntimeCompatibilityOptions::PatchLevel2() const { winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::WindowsAppRuntimeVersion value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IRuntimeCompatibilityOptions)->get_PatchLevel2(put_abi(value))); return value; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IRuntimeCompatibilityOptions::PatchLevel2(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::WindowsAppRuntimeVersion const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IRuntimeCompatibilityOptions)->put_PatchLevel2(impl::bind_in(value))); } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IRuntimeCompatibilityOptions::DisabledChanges() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IRuntimeCompatibilityOptions)->get_DisabledChanges(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IRuntimeCompatibilityOptions::Apply() const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IRuntimeCompatibilityOptions)->Apply()); } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IRuntimeInfoStatics::Version() const { winrt::Windows::ApplicationModel::PackageVersion value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IRuntimeInfoStatics)->get_Version(put_abi(value))); return value; } template auto consume_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_IRuntimeInfoStatics::AsString() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::IRuntimeInfoStatics)->get_AsString(&value)); return hstring{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ForceDeployment(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ForceDeployment()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ForceDeployment(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ForceDeployment(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_OnErrorShowUI(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OnErrorShowUI()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_OnErrorShowUI(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OnErrorShowUI(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetStatus(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Initialize(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Initialize()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Initialize(void* deploymentInitializeOptions, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Initialize(*reinterpret_cast(&deploymentInitializeOptions))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedError()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(int32_t status, winrt::hresult extendedError, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&status), *reinterpret_cast(&extendedError))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Major(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Major()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Minor(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Minor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Patch(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Patch()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VersionTag(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VersionTag()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AsString(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AsString()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PatchLevel1(struct struct_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_WindowsAppRuntimeVersion* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PatchLevel1()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PatchLevel1(struct struct_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_WindowsAppRuntimeVersion value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PatchLevel1(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PatchLevel2(struct struct_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_WindowsAppRuntimeVersion* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PatchLevel2()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PatchLevel2(struct struct_Microsoft_Windows_ApplicationModel_WindowsAppRuntime_WindowsAppRuntimeVersion value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PatchLevel2(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DisabledChanges(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().DisabledChanges()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Apply() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Apply(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Version(struct struct_Windows_ApplicationModel_PackageVersion* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Version()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AsString(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AsString()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime { inline DeploymentInitializeOptions::DeploymentInitializeOptions() : DeploymentInitializeOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto DeploymentManager::GetStatus() { return impl::call_factory_cast([](IDeploymentManagerStatics const& f) { return f.GetStatus(); }); } inline auto DeploymentManager::Initialize() { return impl::call_factory_cast([](IDeploymentManagerStatics const& f) { return f.Initialize(); }); } inline auto DeploymentManager::Initialize(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::DeploymentInitializeOptions const& deploymentInitializeOptions) { return impl::call_factory([&](IDeploymentManagerStatics2 const& f) { return f.Initialize(deploymentInitializeOptions); }); } inline DeploymentResult::DeploymentResult(winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::DeploymentStatus const& status, winrt::hresult const& extendedError) : DeploymentResult(impl::call_factory([&](IDeploymentResultFactory const& f) { return f.CreateInstance(status, extendedError); })) { } inline auto ReleaseInfo::Major() { return impl::call_factory_cast([](IReleaseInfoStatics const& f) { return f.Major(); }); } inline auto ReleaseInfo::Minor() { return impl::call_factory_cast([](IReleaseInfoStatics const& f) { return f.Minor(); }); } inline auto ReleaseInfo::Patch() { return impl::call_factory_cast([](IReleaseInfoStatics const& f) { return f.Patch(); }); } inline auto ReleaseInfo::VersionTag() { return impl::call_factory_cast([](IReleaseInfoStatics const& f) { return f.VersionTag(); }); } inline auto ReleaseInfo::AsString() { return impl::call_factory_cast([](IReleaseInfoStatics const& f) { return f.AsString(); }); } inline RuntimeCompatibilityOptions::RuntimeCompatibilityOptions() : RuntimeCompatibilityOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto RuntimeInfo::Version() { return impl::call_factory_cast([](IRuntimeInfoStatics const& f) { return f.Version(); }); } inline auto RuntimeInfo::AsString() { return impl::call_factory_cast([](IRuntimeInfoStatics const& f) { return f.AsString(); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif