// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Devices_Enumeration_H #define WINRT_Windows_Devices_Enumeration_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/Windows.Devices.h" #include "winrt/impl/Windows.ApplicationModel.Background.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Security.Credentials.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.UI.2.h" #include "winrt/impl/Windows.UI.Popups.2.h" #include "winrt/impl/Windows.Devices.Enumeration.2.h" namespace winrt::impl { template auto consume_Windows_Devices_Enumeration_IDeviceAccessChangedEventArgs::Status() const { winrt::Windows::Devices::Enumeration::DeviceAccessStatus 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_Devices_Enumeration_IDeviceAccessChangedEventArgs2::Id() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceAccessChangedEventArgs3::UserPromptRequired() 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_UserPromptRequired(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UserPromptRequired(&value)); } return value; } template auto consume_Windows_Devices_Enumeration_IDeviceAccessInformation::AccessChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_AccessChanged(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AccessChanged(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Devices_Enumeration_IDeviceAccessInformation::AccessChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, AccessChanged(handler)); } template auto consume_Windows_Devices_Enumeration_IDeviceAccessInformation::AccessChanged(winrt::event_token const& cookie) 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_AccessChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AccessChanged(impl::bind_in(cookie)); } } template auto consume_Windows_Devices_Enumeration_IDeviceAccessInformation::CurrentStatus() const { winrt::Windows::Devices::Enumeration::DeviceAccessStatus 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_CurrentStatus(reinterpret_cast(&status))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentStatus(reinterpret_cast(&status))); } return status; } template auto consume_Windows_Devices_Enumeration_IDeviceAccessInformation2::UserPromptRequired() 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_UserPromptRequired(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UserPromptRequired(&value)); } return value; } template auto consume_Windows_Devices_Enumeration_IDeviceAccessInformationStatics::CreateFromId(param::hstring const& 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->CreateFromId(*(void**)(&deviceId), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromId(*(void**)(&deviceId), &value)); } return winrt::Windows::Devices::Enumeration::DeviceAccessInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceAccessInformationStatics::CreateFromDeviceClassId(winrt::guid const& deviceClassId) 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->CreateFromDeviceClassId(impl::bind_in(deviceClassId), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromDeviceClassId(impl::bind_in(deviceClassId), &value)); } return winrt::Windows::Devices::Enumeration::DeviceAccessInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceAccessInformationStatics::CreateFromDeviceClass(winrt::Windows::Devices::Enumeration::DeviceClass const& deviceClass) 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->CreateFromDeviceClass(static_cast(deviceClass), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromDeviceClass(static_cast(deviceClass), &value)); } return winrt::Windows::Devices::Enumeration::DeviceAccessInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceConnectionChangeTriggerDetails::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_Devices_Enumeration_IDeviceDisconnectButtonClickedEventArgs::Device() 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_Device(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Device(&value)); } return winrt::Windows::Devices::Enumeration::DeviceInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformation::Id() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformation::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_Devices_Enumeration_IDeviceInformation::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_Devices_Enumeration_IDeviceInformation::IsDefault() 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_IsDefault(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsDefault(&value)); } return value; } template auto consume_Windows_Devices_Enumeration_IDeviceInformation::EnclosureLocation() 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_EnclosureLocation(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EnclosureLocation(&value)); } return winrt::Windows::Devices::Enumeration::EnclosureLocation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformation::Properties() 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_Properties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Properties(&value)); } return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformation::Update(winrt::Windows::Devices::Enumeration::DeviceInformationUpdate const& updateInfo) 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->Update(*(void**)(&updateInfo))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Update(*(void**)(&updateInfo))); } } template auto consume_Windows_Devices_Enumeration_IDeviceInformation::GetThumbnailAsync() const { void* asyncOp{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetThumbnailAsync(&asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetThumbnailAsync(&asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformation::GetGlyphThumbnailAsync() const { void* asyncOp{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetGlyphThumbnailAsync(&asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetGlyphThumbnailAsync(&asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformation2::Kind() const { winrt::Windows::Devices::Enumeration::DeviceInformationKind 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_Kind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Kind(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Enumeration_IDeviceInformation2::Pairing() 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_Pairing(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Pairing(&value)); } return winrt::Windows::Devices::Enumeration::DeviceInformationPairing{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationCustomPairing::PairAsync(winrt::Windows::Devices::Enumeration::DevicePairingKinds const& pairingKindsSupported) 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->PairAsync(static_cast(pairingKindsSupported), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PairAsync(static_cast(pairingKindsSupported), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationCustomPairing::PairAsync(winrt::Windows::Devices::Enumeration::DevicePairingKinds const& pairingKindsSupported, winrt::Windows::Devices::Enumeration::DevicePairingProtectionLevel const& minProtectionLevel) 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->PairWithProtectionLevelAsync(static_cast(pairingKindsSupported), static_cast(minProtectionLevel), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PairWithProtectionLevelAsync(static_cast(pairingKindsSupported), static_cast(minProtectionLevel), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationCustomPairing::PairAsync(winrt::Windows::Devices::Enumeration::DevicePairingKinds const& pairingKindsSupported, winrt::Windows::Devices::Enumeration::DevicePairingProtectionLevel const& minProtectionLevel, winrt::Windows::Devices::Enumeration::IDevicePairingSettings const& devicePairingSettings) 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->PairWithProtectionLevelAndSettingsAsync(static_cast(pairingKindsSupported), static_cast(minProtectionLevel), *(void**)(&devicePairingSettings), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PairWithProtectionLevelAndSettingsAsync(static_cast(pairingKindsSupported), static_cast(minProtectionLevel), *(void**)(&devicePairingSettings), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationCustomPairing::PairingRequested(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_PairingRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PairingRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationCustomPairing::PairingRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PairingRequested(handler)); } template auto consume_Windows_Devices_Enumeration_IDeviceInformationCustomPairing::PairingRequested(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_PairingRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PairingRequested(impl::bind_in(token)); } } template auto consume_Windows_Devices_Enumeration_IDeviceInformationCustomPairing2::AddPairingSetMember(winrt::Windows::Devices::Enumeration::DeviceInformation const& device) 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->AddPairingSetMember(*(void**)(&device))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AddPairingSetMember(*(void**)(&device))); } } template auto consume_Windows_Devices_Enumeration_IDeviceInformationCustomPairing2::PairingSetMembersRequested(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_PairingSetMembersRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PairingSetMembersRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationCustomPairing2::PairingSetMembersRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PairingSetMembersRequested(handler)); } template auto consume_Windows_Devices_Enumeration_IDeviceInformationCustomPairing2::PairingSetMembersRequested(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_PairingSetMembersRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PairingSetMembersRequested(impl::bind_in(token)); } } template auto consume_Windows_Devices_Enumeration_IDeviceInformationPairing::IsPaired() 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_IsPaired(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsPaired(&value)); } return value; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationPairing::CanPair() 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_CanPair(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CanPair(&value)); } return value; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationPairing::PairAsync() 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->PairAsync(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PairAsync(&result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationPairing::PairAsync(winrt::Windows::Devices::Enumeration::DevicePairingProtectionLevel const& minProtectionLevel) 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->PairWithProtectionLevelAsync(static_cast(minProtectionLevel), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PairWithProtectionLevelAsync(static_cast(minProtectionLevel), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationPairing2::ProtectionLevel() const { winrt::Windows::Devices::Enumeration::DevicePairingProtectionLevel 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_ProtectionLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtectionLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationPairing2::Custom() 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_Custom(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Custom(&value)); } return winrt::Windows::Devices::Enumeration::DeviceInformationCustomPairing{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationPairing2::PairAsync(winrt::Windows::Devices::Enumeration::DevicePairingProtectionLevel const& minProtectionLevel, winrt::Windows::Devices::Enumeration::IDevicePairingSettings const& devicePairingSettings) 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->PairWithProtectionLevelAndSettingsAsync(static_cast(minProtectionLevel), *(void**)(&devicePairingSettings), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PairWithProtectionLevelAndSettingsAsync(static_cast(minProtectionLevel), *(void**)(&devicePairingSettings), &result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationPairing2::UnpairAsync() 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->UnpairAsync(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UnpairAsync(&result)); } return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationPairingStatics::TryRegisterForAllInboundPairingRequests(winrt::Windows::Devices::Enumeration::DevicePairingKinds const& pairingKindsSupported) 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->TryRegisterForAllInboundPairingRequests(static_cast(pairingKindsSupported), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryRegisterForAllInboundPairingRequests(static_cast(pairingKindsSupported), &result)); } return result; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationPairingStatics2::TryRegisterForAllInboundPairingRequestsWithProtectionLevel(winrt::Windows::Devices::Enumeration::DevicePairingKinds const& pairingKindsSupported, winrt::Windows::Devices::Enumeration::DevicePairingProtectionLevel const& minProtectionLevel) 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->TryRegisterForAllInboundPairingRequestsWithProtectionLevel(static_cast(pairingKindsSupported), static_cast(minProtectionLevel), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryRegisterForAllInboundPairingRequestsWithProtectionLevel(static_cast(pairingKindsSupported), static_cast(minProtectionLevel), &result)); } return result; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics::CreateFromIdAsync(param::hstring const& deviceId) const { void* asyncOp{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIdAsync(*(void**)(&deviceId), &asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIdAsync(*(void**)(&deviceId), &asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics::CreateFromIdAsync(param::hstring const& deviceId, param::async_iterable const& additionalProperties) const { void* asyncOp{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIdAsyncAdditionalProperties(*(void**)(&deviceId), *(void**)(&additionalProperties), &asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIdAsyncAdditionalProperties(*(void**)(&deviceId), *(void**)(&additionalProperties), &asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics::FindAllAsync() const { void* asyncOp{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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(&asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllAsync(&asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics::FindAllAsync(winrt::Windows::Devices::Enumeration::DeviceClass const& deviceClass) const { void* asyncOp{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindAllAsyncDeviceClass(static_cast(deviceClass), &asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllAsyncDeviceClass(static_cast(deviceClass), &asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics::FindAllAsync(param::hstring const& aqsFilter) const { void* asyncOp{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindAllAsyncAqsFilter(*(void**)(&aqsFilter), &asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllAsyncAqsFilter(*(void**)(&aqsFilter), &asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics::FindAllAsync(param::hstring const& aqsFilter, param::async_iterable const& additionalProperties) const { void* asyncOp{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindAllAsyncAqsFilterAndAdditionalProperties(*(void**)(&aqsFilter), *(void**)(&additionalProperties), &asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllAsyncAqsFilterAndAdditionalProperties(*(void**)(&aqsFilter), *(void**)(&additionalProperties), &asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics::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::Devices::Enumeration::DeviceWatcher{ watcher, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics::CreateWatcher(winrt::Windows::Devices::Enumeration::DeviceClass const& deviceClass) 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->CreateWatcherDeviceClass(static_cast(deviceClass), &watcher)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWatcherDeviceClass(static_cast(deviceClass), &watcher)); } return winrt::Windows::Devices::Enumeration::DeviceWatcher{ watcher, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics::CreateWatcher(param::hstring const& aqsFilter) 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->CreateWatcherAqsFilter(*(void**)(&aqsFilter), &watcher)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWatcherAqsFilter(*(void**)(&aqsFilter), &watcher)); } return winrt::Windows::Devices::Enumeration::DeviceWatcher{ watcher, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics::CreateWatcher(param::hstring const& aqsFilter, param::iterable const& additionalProperties) 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->CreateWatcherAqsFilterAndAdditionalProperties(*(void**)(&aqsFilter), *(void**)(&additionalProperties), &watcher)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWatcherAqsFilterAndAdditionalProperties(*(void**)(&aqsFilter), *(void**)(&additionalProperties), &watcher)); } return winrt::Windows::Devices::Enumeration::DeviceWatcher{ watcher, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics2::GetAqsFilterFromDeviceClass(winrt::Windows::Devices::Enumeration::DeviceClass const& deviceClass) const { void* aqsFilter{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAqsFilterFromDeviceClass(static_cast(deviceClass), &aqsFilter)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAqsFilterFromDeviceClass(static_cast(deviceClass), &aqsFilter)); } return hstring{ aqsFilter, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics2::CreateFromIdAsync(param::hstring const& deviceId, param::async_iterable const& additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind const& kind) const { void* asyncOp{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromIdAsyncWithKindAndAdditionalProperties(*(void**)(&deviceId), *(void**)(&additionalProperties), static_cast(kind), &asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIdAsyncWithKindAndAdditionalProperties(*(void**)(&deviceId), *(void**)(&additionalProperties), static_cast(kind), &asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics2::FindAllAsync(param::hstring const& aqsFilter, param::async_iterable const& additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind const& kind) const { void* asyncOp{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindAllAsyncWithKindAqsFilterAndAdditionalProperties(*(void**)(&aqsFilter), *(void**)(&additionalProperties), static_cast(kind), &asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllAsyncWithKindAqsFilterAndAdditionalProperties(*(void**)(&aqsFilter), *(void**)(&additionalProperties), static_cast(kind), &asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics2::CreateWatcher(param::hstring const& aqsFilter, param::iterable const& additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind const& kind) 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->CreateWatcherWithKindAqsFilterAndAdditionalProperties(*(void**)(&aqsFilter), *(void**)(&additionalProperties), static_cast(kind), &watcher)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWatcherWithKindAqsFilterAndAdditionalProperties(*(void**)(&aqsFilter), *(void**)(&additionalProperties), static_cast(kind), &watcher)); } return winrt::Windows::Devices::Enumeration::DeviceWatcher{ watcher, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics3::CreateFromIdAsync(param::hstring const& deviceId, param::async_iterable const& additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind const& kind, winrt::Windows::Devices::Enumeration::IDeviceEnumerationSettings const& settings) 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->CreateFromIdAsyncWithAdditionalPropertiesKindAndSettings(*(void**)(&deviceId), *(void**)(&additionalProperties), static_cast(kind), *(void**)(&settings), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromIdAsyncWithAdditionalPropertiesKindAndSettings(*(void**)(&deviceId), *(void**)(&additionalProperties), static_cast(kind), *(void**)(&settings), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics3::FindAllAsync(param::hstring const& aqsFilter, param::async_iterable const& additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind const& kind, winrt::Windows::Devices::Enumeration::IDeviceEnumerationSettings const& settings) 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->FindAllAsyncWithAqsFilterAdditionalPropertiesKindAndSettings(*(void**)(&aqsFilter), *(void**)(&additionalProperties), static_cast(kind), *(void**)(&settings), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllAsyncWithAqsFilterAdditionalPropertiesKindAndSettings(*(void**)(&aqsFilter), *(void**)(&additionalProperties), static_cast(kind), *(void**)(&settings), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationStatics3::CreateWatcher(param::hstring const& aqsFilter, param::iterable const& additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind const& kind, winrt::Windows::Devices::Enumeration::IDeviceEnumerationSettings const& settings) 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->CreateWatcherWithAqsFilterAdditionalPropertiesKindAndSettings(*(void**)(&aqsFilter), *(void**)(&additionalProperties), static_cast(kind), *(void**)(&settings), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWatcherWithAqsFilterAdditionalPropertiesKindAndSettings(*(void**)(&aqsFilter), *(void**)(&additionalProperties), static_cast(kind), *(void**)(&settings), &result)); } return winrt::Windows::Devices::Enumeration::DeviceWatcher{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationUpdate::Id() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationUpdate::Properties() 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_Properties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Properties(&value)); } return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceInformationUpdate2::Kind() const { winrt::Windows::Devices::Enumeration::DeviceInformationKind 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_Kind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Kind(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Enumeration_IDevicePairingRequestedEventArgs::DeviceInformation() 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_DeviceInformation(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeviceInformation(&value)); } return winrt::Windows::Devices::Enumeration::DeviceInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDevicePairingRequestedEventArgs::PairingKind() const { winrt::Windows::Devices::Enumeration::DevicePairingKinds 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_PairingKind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PairingKind(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Enumeration_IDevicePairingRequestedEventArgs::Pin() 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_Pin(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Pin(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDevicePairingRequestedEventArgs::Accept() 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->Accept()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Accept()); } } template auto consume_Windows_Devices_Enumeration_IDevicePairingRequestedEventArgs::Accept(param::hstring const& pin) 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->AcceptWithPin(*(void**)(&pin))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AcceptWithPin(*(void**)(&pin))); } } template auto consume_Windows_Devices_Enumeration_IDevicePairingRequestedEventArgs::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_Devices_Enumeration_IDevicePairingRequestedEventArgs2::AcceptWithPasswordCredential(winrt::Windows::Security::Credentials::PasswordCredential const& passwordCredential) 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->AcceptWithPasswordCredential(*(void**)(&passwordCredential))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AcceptWithPasswordCredential(*(void**)(&passwordCredential))); } } template auto consume_Windows_Devices_Enumeration_IDevicePairingRequestedEventArgs3::AcceptWithAddress(param::hstring const& address) 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->AcceptWithAddress(*(void**)(&address))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AcceptWithAddress(*(void**)(&address))); } } template auto consume_Windows_Devices_Enumeration_IDevicePairingResult::Status() const { winrt::Windows::Devices::Enumeration::DevicePairingResultStatus 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_Devices_Enumeration_IDevicePairingResult::ProtectionLevelUsed() const { winrt::Windows::Devices::Enumeration::DevicePairingProtectionLevel 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_ProtectionLevelUsed(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtectionLevelUsed(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Enumeration_IDevicePairingSetMembersRequestedEventArgs::Status() const { winrt::Windows::Devices::Enumeration::DevicePairingAddPairingSetMemberStatus 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_Devices_Enumeration_IDevicePairingSetMembersRequestedEventArgs::ParentDeviceInformation() 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_ParentDeviceInformation(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ParentDeviceInformation(&value)); } return winrt::Windows::Devices::Enumeration::DeviceInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDevicePairingSetMembersRequestedEventArgs::PairingSetMembers() 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_PairingSetMembers(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PairingSetMembers(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDevicePicker::Filter() const { void* filter{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_Filter(&filter)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Filter(&filter)); } return winrt::Windows::Devices::Enumeration::DevicePickerFilter{ filter, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDevicePicker::Appearance() 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_Appearance(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Appearance(&value)); } return winrt::Windows::Devices::Enumeration::DevicePickerAppearance{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDevicePicker::RequestedProperties() 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_RequestedProperties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RequestedProperties(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDevicePicker::DeviceSelected(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_DeviceSelected(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_DeviceSelected(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Enumeration_IDevicePicker::DeviceSelected(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, DeviceSelected(handler)); } template auto consume_Windows_Devices_Enumeration_IDevicePicker::DeviceSelected(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_DeviceSelected(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_DeviceSelected(impl::bind_in(token)); } } template auto consume_Windows_Devices_Enumeration_IDevicePicker::DisconnectButtonClicked(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_DisconnectButtonClicked(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_DisconnectButtonClicked(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Enumeration_IDevicePicker::DisconnectButtonClicked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, DisconnectButtonClicked(handler)); } template auto consume_Windows_Devices_Enumeration_IDevicePicker::DisconnectButtonClicked(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_DisconnectButtonClicked(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_DisconnectButtonClicked(impl::bind_in(token)); } } template auto consume_Windows_Devices_Enumeration_IDevicePicker::DevicePickerDismissed(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_DevicePickerDismissed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_DevicePickerDismissed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Enumeration_IDevicePicker::DevicePickerDismissed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, DevicePickerDismissed(handler)); } template auto consume_Windows_Devices_Enumeration_IDevicePicker::DevicePickerDismissed(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_DevicePickerDismissed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_DevicePickerDismissed(impl::bind_in(token)); } } template auto consume_Windows_Devices_Enumeration_IDevicePicker::Show(winrt::Windows::Foundation::Rect const& selection) 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->Show(impl::bind_in(selection))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Show(impl::bind_in(selection))); } } template auto consume_Windows_Devices_Enumeration_IDevicePicker::Show(winrt::Windows::Foundation::Rect const& selection, winrt::Windows::UI::Popups::Placement const& placement) 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->ShowWithPlacement(impl::bind_in(selection), static_cast(placement))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShowWithPlacement(impl::bind_in(selection), static_cast(placement))); } } template auto consume_Windows_Devices_Enumeration_IDevicePicker::PickSingleDeviceAsync(winrt::Windows::Foundation::Rect const& selection) 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->PickSingleDeviceAsync(impl::bind_in(selection), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PickSingleDeviceAsync(impl::bind_in(selection), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDevicePicker::PickSingleDeviceAsync(winrt::Windows::Foundation::Rect const& selection, winrt::Windows::UI::Popups::Placement const& placement) 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->PickSingleDeviceAsyncWithPlacement(impl::bind_in(selection), static_cast(placement), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PickSingleDeviceAsyncWithPlacement(impl::bind_in(selection), static_cast(placement), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDevicePicker::Hide() 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->Hide()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Hide()); } } template auto consume_Windows_Devices_Enumeration_IDevicePicker::SetDisplayStatus(winrt::Windows::Devices::Enumeration::DeviceInformation const& device, param::hstring const& status, winrt::Windows::Devices::Enumeration::DevicePickerDisplayStatusOptions const& options) 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->SetDisplayStatus(*(void**)(&device), *(void**)(&status), static_cast(options))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetDisplayStatus(*(void**)(&device), *(void**)(&status), static_cast(options))); } } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::Title() 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_Title(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Title(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::Title(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_Title(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::ForegroundColor() const { winrt::Windows::UI::Color 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_ForegroundColor(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ForegroundColor(put_abi(value))); } return value; } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::ForegroundColor(winrt::Windows::UI::Color 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_ForegroundColor(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ForegroundColor(impl::bind_in(value))); } } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::BackgroundColor() const { winrt::Windows::UI::Color 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_BackgroundColor(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BackgroundColor(put_abi(value))); } return value; } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::BackgroundColor(winrt::Windows::UI::Color 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_BackgroundColor(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_BackgroundColor(impl::bind_in(value))); } } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::AccentColor() const { winrt::Windows::UI::Color 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_AccentColor(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AccentColor(put_abi(value))); } return value; } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::AccentColor(winrt::Windows::UI::Color 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_AccentColor(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AccentColor(impl::bind_in(value))); } } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::SelectedForegroundColor() const { winrt::Windows::UI::Color 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_SelectedForegroundColor(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedForegroundColor(put_abi(value))); } return value; } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::SelectedForegroundColor(winrt::Windows::UI::Color 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_SelectedForegroundColor(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SelectedForegroundColor(impl::bind_in(value))); } } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::SelectedBackgroundColor() const { winrt::Windows::UI::Color 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_SelectedBackgroundColor(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedBackgroundColor(put_abi(value))); } return value; } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::SelectedBackgroundColor(winrt::Windows::UI::Color 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_SelectedBackgroundColor(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SelectedBackgroundColor(impl::bind_in(value))); } } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::SelectedAccentColor() const { winrt::Windows::UI::Color 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_SelectedAccentColor(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedAccentColor(put_abi(value))); } return value; } template auto consume_Windows_Devices_Enumeration_IDevicePickerAppearance::SelectedAccentColor(winrt::Windows::UI::Color 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_SelectedAccentColor(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SelectedAccentColor(impl::bind_in(value))); } } template auto consume_Windows_Devices_Enumeration_IDevicePickerFilter::SupportedDeviceClasses() 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_SupportedDeviceClasses(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedDeviceClasses(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDevicePickerFilter::SupportedDeviceSelectors() 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_SupportedDeviceSelectors(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedDeviceSelectors(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceSelectedEventArgs::SelectedDevice() 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_SelectedDevice(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedDevice(&value)); } return winrt::Windows::Devices::Enumeration::DeviceInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceUnpairingResult::Status() const { winrt::Windows::Devices::Enumeration::DeviceUnpairingResultStatus 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_Devices_Enumeration_IDeviceWatcher::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_Devices_Enumeration_IDeviceWatcher::Added(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Added(handler)); } template auto consume_Windows_Devices_Enumeration_IDeviceWatcher::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_Devices_Enumeration_IDeviceWatcher::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_Devices_Enumeration_IDeviceWatcher::Updated(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Updated(handler)); } template auto consume_Windows_Devices_Enumeration_IDeviceWatcher::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_Devices_Enumeration_IDeviceWatcher::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_Devices_Enumeration_IDeviceWatcher::Removed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Removed(handler)); } template auto consume_Windows_Devices_Enumeration_IDeviceWatcher::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_Devices_Enumeration_IDeviceWatcher::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_Devices_Enumeration_IDeviceWatcher::EnumerationCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, EnumerationCompleted(handler)); } template auto consume_Windows_Devices_Enumeration_IDeviceWatcher::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_Devices_Enumeration_IDeviceWatcher::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_Devices_Enumeration_IDeviceWatcher::Stopped(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Stopped(handler)); } template auto consume_Windows_Devices_Enumeration_IDeviceWatcher::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_Devices_Enumeration_IDeviceWatcher::Status() const { winrt::Windows::Devices::Enumeration::DeviceWatcherStatus 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_Devices_Enumeration_IDeviceWatcher::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_Devices_Enumeration_IDeviceWatcher::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_Devices_Enumeration_IDeviceWatcher2::GetBackgroundTrigger(param::iterable const& requestedEventKinds) const { void* trigger{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetBackgroundTrigger(*(void**)(&requestedEventKinds), &trigger)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetBackgroundTrigger(*(void**)(&requestedEventKinds), &trigger)); } return winrt::Windows::ApplicationModel::Background::DeviceWatcherTrigger{ trigger, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceWatcherEvent::Kind() const { winrt::Windows::Devices::Enumeration::DeviceWatcherEventKind 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_Kind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Kind(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Enumeration_IDeviceWatcherEvent::DeviceInformation() 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_DeviceInformation(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeviceInformation(&value)); } return winrt::Windows::Devices::Enumeration::DeviceInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceWatcherEvent::DeviceInformationUpdate() 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_DeviceInformationUpdate(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeviceInformationUpdate(&value)); } return winrt::Windows::Devices::Enumeration::DeviceInformationUpdate{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IDeviceWatcherTriggerDetails::DeviceWatcherEvents() 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_DeviceWatcherEvents(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeviceWatcherEvents(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Enumeration_IEnclosureLocation::InDock() 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_InDock(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InDock(&value)); } return value; } template auto consume_Windows_Devices_Enumeration_IEnclosureLocation::InLid() 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_InLid(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InLid(&value)); } return value; } template auto consume_Windows_Devices_Enumeration_IEnclosureLocation::Panel() const { winrt::Windows::Devices::Enumeration::Panel 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_Panel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Panel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Enumeration_IEnclosureLocation2::RotationAngleInDegreesClockwise() 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_RotationAngleInDegreesClockwise(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RotationAngleInDegreesClockwise(&value)); } return value; } #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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_UserPromptRequired(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UserPromptRequired()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_AccessChanged(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().AccessChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AccessChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AccessChanged(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall get_CurrentStatus(int32_t* status) noexcept final try { typename D::abi_guard guard(this->shim()); *status = 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_UserPromptRequired(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UserPromptRequired()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromId(void* deviceId, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFromId(*reinterpret_cast(&deviceId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromDeviceClassId(winrt::guid deviceClassId, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFromDeviceClassId(*reinterpret_cast(&deviceClassId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromDeviceClass(int32_t deviceClass, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateFromDeviceClass(*reinterpret_cast(&deviceClass))); 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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Device(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Device()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall 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_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 get_IsDefault(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsDefault()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EnclosureLocation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EnclosureLocation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Update(void* updateInfo) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Update(*reinterpret_cast(&updateInfo)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetThumbnailAsync(void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().GetThumbnailAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetGlyphThumbnailAsync(void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().GetGlyphThumbnailAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Kind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Kind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Pairing(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Pairing()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall PairAsync(uint32_t pairingKindsSupported, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().PairAsync(*reinterpret_cast(&pairingKindsSupported))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PairWithProtectionLevelAsync(uint32_t pairingKindsSupported, int32_t minProtectionLevel, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().PairAsync(*reinterpret_cast(&pairingKindsSupported), *reinterpret_cast(&minProtectionLevel))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PairWithProtectionLevelAndSettingsAsync(uint32_t pairingKindsSupported, int32_t minProtectionLevel, void* devicePairingSettings, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().PairAsync(*reinterpret_cast(&pairingKindsSupported), *reinterpret_cast(&minProtectionLevel), *reinterpret_cast(&devicePairingSettings))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_PairingRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PairingRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PairingRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PairingRequested(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall AddPairingSetMember(void* device) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AddPairingSetMember(*reinterpret_cast(&device)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_PairingSetMembersRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PairingSetMembersRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PairingSetMembersRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PairingSetMembersRequested(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsPaired(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPaired()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CanPair(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanPair()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PairAsync(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().PairAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PairWithProtectionLevelAsync(int32_t minProtectionLevel, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().PairAsync(*reinterpret_cast(&minProtectionLevel))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProtectionLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Custom(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Custom()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PairWithProtectionLevelAndSettingsAsync(int32_t minProtectionLevel, void* devicePairingSettings, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().PairAsync(*reinterpret_cast(&minProtectionLevel), *reinterpret_cast(&devicePairingSettings))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UnpairAsync(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().UnpairAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryRegisterForAllInboundPairingRequests(uint32_t pairingKindsSupported, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TryRegisterForAllInboundPairingRequests(*reinterpret_cast(&pairingKindsSupported))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryRegisterForAllInboundPairingRequestsWithProtectionLevel(uint32_t pairingKindsSupported, int32_t minProtectionLevel, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TryRegisterForAllInboundPairingRequestsWithProtectionLevel(*reinterpret_cast(&pairingKindsSupported), *reinterpret_cast(&minProtectionLevel))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromIdAsync(void* deviceId, void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().CreateFromIdAsync(*reinterpret_cast(&deviceId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIdAsyncAdditionalProperties(void* deviceId, void* additionalProperties, void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().CreateFromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast const*>(&additionalProperties))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllAsync(void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().FindAllAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllAsyncDeviceClass(int32_t deviceClass, void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().FindAllAsync(*reinterpret_cast(&deviceClass))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllAsyncAqsFilter(void* aqsFilter, void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().FindAllAsync(*reinterpret_cast(&aqsFilter))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllAsyncAqsFilterAndAdditionalProperties(void* aqsFilter, void* additionalProperties, void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().FindAllAsync(*reinterpret_cast(&aqsFilter), *reinterpret_cast const*>(&additionalProperties))); return 0; } catch (...) { return to_hresult(); } 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 CreateWatcherDeviceClass(int32_t deviceClass, void** watcher) noexcept final try { clear_abi(watcher); typename D::abi_guard guard(this->shim()); *watcher = detach_from(this->shim().CreateWatcher(*reinterpret_cast(&deviceClass))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWatcherAqsFilter(void* aqsFilter, void** watcher) noexcept final try { clear_abi(watcher); typename D::abi_guard guard(this->shim()); *watcher = detach_from(this->shim().CreateWatcher(*reinterpret_cast(&aqsFilter))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWatcherAqsFilterAndAdditionalProperties(void* aqsFilter, void* additionalProperties, void** watcher) noexcept final try { clear_abi(watcher); typename D::abi_guard guard(this->shim()); *watcher = detach_from(this->shim().CreateWatcher(*reinterpret_cast(&aqsFilter), *reinterpret_cast const*>(&additionalProperties))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAqsFilterFromDeviceClass(int32_t deviceClass, void** aqsFilter) noexcept final try { clear_abi(aqsFilter); typename D::abi_guard guard(this->shim()); *aqsFilter = detach_from(this->shim().GetAqsFilterFromDeviceClass(*reinterpret_cast(&deviceClass))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromIdAsyncWithKindAndAdditionalProperties(void* deviceId, void* additionalProperties, int32_t kind, void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().CreateFromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast const*>(&additionalProperties), *reinterpret_cast(&kind))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllAsyncWithKindAqsFilterAndAdditionalProperties(void* aqsFilter, void* additionalProperties, int32_t kind, void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().FindAllAsync(*reinterpret_cast(&aqsFilter), *reinterpret_cast const*>(&additionalProperties), *reinterpret_cast(&kind))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWatcherWithKindAqsFilterAndAdditionalProperties(void* aqsFilter, void* additionalProperties, int32_t kind, void** watcher) noexcept final try { clear_abi(watcher); typename D::abi_guard guard(this->shim()); *watcher = detach_from(this->shim().CreateWatcher(*reinterpret_cast(&aqsFilter), *reinterpret_cast const*>(&additionalProperties), *reinterpret_cast(&kind))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromIdAsyncWithAdditionalPropertiesKindAndSettings(void* deviceId, void* additionalProperties, int32_t kind, void* settings, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateFromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast const*>(&additionalProperties), *reinterpret_cast(&kind), *reinterpret_cast(&settings))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllAsyncWithAqsFilterAdditionalPropertiesKindAndSettings(void* aqsFilter, void* additionalProperties, int32_t kind, void* settings, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().FindAllAsync(*reinterpret_cast(&aqsFilter), *reinterpret_cast const*>(&additionalProperties), *reinterpret_cast(&kind), *reinterpret_cast(&settings))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWatcherWithAqsFilterAdditionalPropertiesKindAndSettings(void* aqsFilter, void* additionalProperties, int32_t kind, void* settings, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWatcher(*reinterpret_cast(&aqsFilter), *reinterpret_cast const*>(&additionalProperties), *reinterpret_cast(&kind), *reinterpret_cast(&settings))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Kind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Kind()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DeviceInformation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeviceInformation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PairingKind(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PairingKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Pin(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Pin()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Accept() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Accept(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall AcceptWithPin(void* pin) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Accept(*reinterpret_cast(&pin)); return 0; } catch (...) { return to_hresult(); } 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 AcceptWithPasswordCredential(void* passwordCredential) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AcceptWithPasswordCredential(*reinterpret_cast(&passwordCredential)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall AcceptWithAddress(void* address) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AcceptWithAddress(*reinterpret_cast(&address)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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 get_ProtectionLevelUsed(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProtectionLevelUsed()); 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_ParentDeviceInformation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ParentDeviceInformation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PairingSetMembers(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().PairingSetMembers()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Filter(void** filter) noexcept final try { clear_abi(filter); typename D::abi_guard guard(this->shim()); *filter = detach_from(this->shim().Filter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Appearance(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Appearance()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RequestedProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RequestedProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_DeviceSelected(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().DeviceSelected(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_DeviceSelected(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().DeviceSelected(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_DisconnectButtonClicked(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().DisconnectButtonClicked(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_DisconnectButtonClicked(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().DisconnectButtonClicked(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_DevicePickerDismissed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().DevicePickerDismissed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_DevicePickerDismissed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().DevicePickerDismissed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall Show(winrt::Windows::Foundation::Rect selection) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(&selection)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowWithPlacement(winrt::Windows::Foundation::Rect selection, int32_t placement) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(&selection), *reinterpret_cast(&placement)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PickSingleDeviceAsync(winrt::Windows::Foundation::Rect selection, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().PickSingleDeviceAsync(*reinterpret_cast(&selection))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PickSingleDeviceAsyncWithPlacement(winrt::Windows::Foundation::Rect selection, int32_t placement, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().PickSingleDeviceAsync(*reinterpret_cast(&selection), *reinterpret_cast(&placement))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Hide() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Hide(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetDisplayStatus(void* device, void* status, uint32_t options) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetDisplayStatus(*reinterpret_cast(&device), *reinterpret_cast(&status), *reinterpret_cast(&options)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Title(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Title()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Title(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ForegroundColor(struct struct_Windows_UI_Color* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ForegroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ForegroundColor(struct struct_Windows_UI_Color value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ForegroundColor(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BackgroundColor(struct struct_Windows_UI_Color* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BackgroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_BackgroundColor(struct struct_Windows_UI_Color value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().BackgroundColor(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AccentColor(struct struct_Windows_UI_Color* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AccentColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AccentColor(struct struct_Windows_UI_Color value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AccentColor(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedForegroundColor(struct struct_Windows_UI_Color* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedForegroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SelectedForegroundColor(struct struct_Windows_UI_Color value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SelectedForegroundColor(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedBackgroundColor(struct struct_Windows_UI_Color* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedBackgroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SelectedBackgroundColor(struct struct_Windows_UI_Color value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SelectedBackgroundColor(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedAccentColor(struct struct_Windows_UI_Color* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedAccentColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SelectedAccentColor(struct struct_Windows_UI_Color value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SelectedAccentColor(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SupportedDeviceClasses(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedDeviceClasses()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedDeviceSelectors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedDeviceSelectors()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SelectedDevice(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedDevice()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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(); } }; #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_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_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* 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 GetBackgroundTrigger(void* requestedEventKinds, void** trigger) noexcept final try { clear_abi(trigger); typename D::abi_guard guard(this->shim()); *trigger = detach_from(this->shim().GetBackgroundTrigger(*reinterpret_cast const*>(&requestedEventKinds))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Kind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Kind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DeviceInformation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeviceInformation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DeviceInformationUpdate(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeviceInformationUpdate()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DeviceWatcherEvents(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().DeviceWatcherEvents()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_InDock(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InDock()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InLid(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InLid()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Panel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Panel()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_RotationAngleInDegreesClockwise(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RotationAngleInDegreesClockwise()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Devices::Enumeration { constexpr auto operator|(DevicePairingKinds const left, DevicePairingKinds const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(DevicePairingKinds& left, DevicePairingKinds const right) noexcept { left = left | right; return left; } constexpr auto operator&(DevicePairingKinds const left, DevicePairingKinds const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(DevicePairingKinds& left, DevicePairingKinds const right) noexcept { left = left & right; return left; } constexpr auto operator~(DevicePairingKinds const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(DevicePairingKinds const left, DevicePairingKinds const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(DevicePairingKinds& left, DevicePairingKinds const right) noexcept { left = left ^ right; return left; } constexpr auto operator|(DevicePickerDisplayStatusOptions const left, DevicePickerDisplayStatusOptions const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(DevicePickerDisplayStatusOptions& left, DevicePickerDisplayStatusOptions const right) noexcept { left = left | right; return left; } constexpr auto operator&(DevicePickerDisplayStatusOptions const left, DevicePickerDisplayStatusOptions const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(DevicePickerDisplayStatusOptions& left, DevicePickerDisplayStatusOptions const right) noexcept { left = left & right; return left; } constexpr auto operator~(DevicePickerDisplayStatusOptions const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(DevicePickerDisplayStatusOptions const left, DevicePickerDisplayStatusOptions const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(DevicePickerDisplayStatusOptions& left, DevicePickerDisplayStatusOptions const right) noexcept { left = left ^ right; return left; } inline auto DeviceAccessInformation::CreateFromId(param::hstring const& deviceId) { return impl::call_factory([&](IDeviceAccessInformationStatics const& f) { return f.CreateFromId(deviceId); }); } inline auto DeviceAccessInformation::CreateFromDeviceClassId(winrt::guid const& deviceClassId) { return impl::call_factory([&](IDeviceAccessInformationStatics const& f) { return f.CreateFromDeviceClassId(deviceClassId); }); } inline auto DeviceAccessInformation::CreateFromDeviceClass(winrt::Windows::Devices::Enumeration::DeviceClass const& deviceClass) { return impl::call_factory([&](IDeviceAccessInformationStatics const& f) { return f.CreateFromDeviceClass(deviceClass); }); } inline auto DeviceInformation::CreateFromIdAsync(param::hstring const& deviceId) { return impl::call_factory([&](IDeviceInformationStatics const& f) { return f.CreateFromIdAsync(deviceId); }); } inline auto DeviceInformation::CreateFromIdAsync(param::hstring const& deviceId, param::async_iterable const& additionalProperties) { return impl::call_factory([&](IDeviceInformationStatics const& f) { return f.CreateFromIdAsync(deviceId, additionalProperties); }); } inline auto DeviceInformation::FindAllAsync() { return impl::call_factory_cast(*)(IDeviceInformationStatics const&), DeviceInformation, IDeviceInformationStatics>([](IDeviceInformationStatics const& f) { return f.FindAllAsync(); }); } inline auto DeviceInformation::FindAllAsync(winrt::Windows::Devices::Enumeration::DeviceClass const& deviceClass) { return impl::call_factory([&](IDeviceInformationStatics const& f) { return f.FindAllAsync(deviceClass); }); } inline auto DeviceInformation::FindAllAsync(param::hstring const& aqsFilter) { return impl::call_factory([&](IDeviceInformationStatics const& f) { return f.FindAllAsync(aqsFilter); }); } inline auto DeviceInformation::FindAllAsync(param::hstring const& aqsFilter, param::async_iterable const& additionalProperties) { return impl::call_factory([&](IDeviceInformationStatics const& f) { return f.FindAllAsync(aqsFilter, additionalProperties); }); } inline auto DeviceInformation::CreateWatcher() { return impl::call_factory_cast([](IDeviceInformationStatics const& f) { return f.CreateWatcher(); }); } inline auto DeviceInformation::CreateWatcher(winrt::Windows::Devices::Enumeration::DeviceClass const& deviceClass) { return impl::call_factory([&](IDeviceInformationStatics const& f) { return f.CreateWatcher(deviceClass); }); } inline auto DeviceInformation::CreateWatcher(param::hstring const& aqsFilter) { return impl::call_factory([&](IDeviceInformationStatics const& f) { return f.CreateWatcher(aqsFilter); }); } inline auto DeviceInformation::CreateWatcher(param::hstring const& aqsFilter, param::iterable const& additionalProperties) { return impl::call_factory([&](IDeviceInformationStatics const& f) { return f.CreateWatcher(aqsFilter, additionalProperties); }); } inline auto DeviceInformation::GetAqsFilterFromDeviceClass(winrt::Windows::Devices::Enumeration::DeviceClass const& deviceClass) { return impl::call_factory([&](IDeviceInformationStatics2 const& f) { return f.GetAqsFilterFromDeviceClass(deviceClass); }); } inline auto DeviceInformation::CreateFromIdAsync(param::hstring const& deviceId, param::async_iterable const& additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind const& kind) { return impl::call_factory([&](IDeviceInformationStatics2 const& f) { return f.CreateFromIdAsync(deviceId, additionalProperties, kind); }); } inline auto DeviceInformation::FindAllAsync(param::hstring const& aqsFilter, param::async_iterable const& additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind const& kind) { return impl::call_factory([&](IDeviceInformationStatics2 const& f) { return f.FindAllAsync(aqsFilter, additionalProperties, kind); }); } inline auto DeviceInformation::CreateWatcher(param::hstring const& aqsFilter, param::iterable const& additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind const& kind) { return impl::call_factory([&](IDeviceInformationStatics2 const& f) { return f.CreateWatcher(aqsFilter, additionalProperties, kind); }); } inline auto DeviceInformation::CreateFromIdAsync(param::hstring const& deviceId, param::async_iterable const& additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind const& kind, winrt::Windows::Devices::Enumeration::IDeviceEnumerationSettings const& settings) { return impl::call_factory([&](IDeviceInformationStatics3 const& f) { return f.CreateFromIdAsync(deviceId, additionalProperties, kind, settings); }); } inline auto DeviceInformation::FindAllAsync(param::hstring const& aqsFilter, param::async_iterable const& additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind const& kind, winrt::Windows::Devices::Enumeration::IDeviceEnumerationSettings const& settings) { return impl::call_factory([&](IDeviceInformationStatics3 const& f) { return f.FindAllAsync(aqsFilter, additionalProperties, kind, settings); }); } inline auto DeviceInformation::CreateWatcher(param::hstring const& aqsFilter, param::iterable const& additionalProperties, winrt::Windows::Devices::Enumeration::DeviceInformationKind const& kind, winrt::Windows::Devices::Enumeration::IDeviceEnumerationSettings const& settings) { return impl::call_factory([&](IDeviceInformationStatics3 const& f) { return f.CreateWatcher(aqsFilter, additionalProperties, kind, settings); }); } inline auto DeviceInformationPairing::TryRegisterForAllInboundPairingRequests(winrt::Windows::Devices::Enumeration::DevicePairingKinds const& pairingKindsSupported) { return impl::call_factory([&](IDeviceInformationPairingStatics const& f) { return f.TryRegisterForAllInboundPairingRequests(pairingKindsSupported); }); } inline auto DeviceInformationPairing::TryRegisterForAllInboundPairingRequestsWithProtectionLevel(winrt::Windows::Devices::Enumeration::DevicePairingKinds const& pairingKindsSupported, winrt::Windows::Devices::Enumeration::DevicePairingProtectionLevel const& minProtectionLevel) { return impl::call_factory([&](IDeviceInformationPairingStatics2 const& f) { return f.TryRegisterForAllInboundPairingRequestsWithProtectionLevel(pairingKindsSupported, minProtectionLevel); }); } inline DevicePicker::DevicePicker() : DevicePicker(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif