// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Media_Devices_H #define WINRT_Windows_Media_Devices_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.Media.h" #include "winrt/impl/Windows.Devices.Enumeration.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Media.Capture.2.h" #include "winrt/impl/Windows.Media.Devices.Core.2.h" #include "winrt/impl/Windows.Media.Effects.2.h" #include "winrt/impl/Windows.Media.MediaProperties.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.Media.Devices.2.h" namespace winrt::impl { template auto consume_Windows_Media_Devices_IAdvancedPhotoCaptureSettings::Mode() const { winrt::Windows::Media::Devices::AdvancedPhotoMode 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_Mode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IAdvancedPhotoCaptureSettings::Mode(winrt::Windows::Media::Devices::AdvancedPhotoMode 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_Mode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Mode(static_cast(value))); } } template auto consume_Windows_Media_Devices_IAdvancedPhotoControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IAdvancedPhotoControl::SupportedModes() 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_SupportedModes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedModes(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedPhotoControl::Mode() const { winrt::Windows::Media::Devices::AdvancedPhotoMode 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_Mode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IAdvancedPhotoControl::Configure(winrt::Windows::Media::Devices::AdvancedPhotoCaptureSettings const& settings) 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->Configure(*(void**)(&settings))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Configure(*(void**)(&settings))); } } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController::SetDeviceProperty(param::hstring const& propertyId, winrt::Windows::Foundation::IInspectable const& propertyValue) 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->SetDeviceProperty(*(void**)(&propertyId), *(void**)(&propertyValue))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetDeviceProperty(*(void**)(&propertyId), *(void**)(&propertyValue))); } } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController::GetDeviceProperty(param::hstring const& propertyId) const { void* propertyValue{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeviceProperty(*(void**)(&propertyId), &propertyValue)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeviceProperty(*(void**)(&propertyId), &propertyValue)); } return winrt::Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController10::CameraOcclusionInfo() 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_CameraOcclusionInfo(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CameraOcclusionInfo(&value)); } return winrt::Windows::Media::Devices::CameraOcclusionInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController11::TryAcquireExclusiveControl(param::hstring const& deviceId, winrt::Windows::Media::Capture::MediaCaptureDeviceExclusiveControlReleaseMode const& mode) 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->TryAcquireExclusiveControl(*(void**)(&deviceId), static_cast(mode), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryAcquireExclusiveControl(*(void**)(&deviceId), static_cast(mode), &result)); } return result; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::LowLagPhotoSequence() 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_LowLagPhotoSequence(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LowLagPhotoSequence(&value)); } return winrt::Windows::Media::Devices::LowLagPhotoSequenceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::LowLagPhoto() 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_LowLagPhoto(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LowLagPhoto(&value)); } return winrt::Windows::Media::Devices::LowLagPhotoControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::SceneModeControl() 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_SceneModeControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SceneModeControl(&value)); } return winrt::Windows::Media::Devices::SceneModeControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::TorchControl() 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_TorchControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TorchControl(&value)); } return winrt::Windows::Media::Devices::TorchControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::FlashControl() 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_FlashControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FlashControl(&value)); } return winrt::Windows::Media::Devices::FlashControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::WhiteBalanceControl() 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_WhiteBalanceControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WhiteBalanceControl(&value)); } return winrt::Windows::Media::Devices::WhiteBalanceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::ExposureControl() 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_ExposureControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExposureControl(&value)); } return winrt::Windows::Media::Devices::ExposureControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::FocusControl() 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_FocusControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FocusControl(&value)); } return winrt::Windows::Media::Devices::FocusControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::ExposureCompensationControl() 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_ExposureCompensationControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExposureCompensationControl(&value)); } return winrt::Windows::Media::Devices::ExposureCompensationControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::IsoSpeedControl() 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_IsoSpeedControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsoSpeedControl(&value)); } return winrt::Windows::Media::Devices::IsoSpeedControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::RegionsOfInterestControl() 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_RegionsOfInterestControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RegionsOfInterestControl(&value)); } return winrt::Windows::Media::Devices::RegionsOfInterestControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::PrimaryUse() const { winrt::Windows::Media::Devices::CaptureUse 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_PrimaryUse(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrimaryUse(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController2::PrimaryUse(winrt::Windows::Media::Devices::CaptureUse 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_PrimaryUse(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PrimaryUse(static_cast(value))); } } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController3::VariablePhotoSequenceController() 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_VariablePhotoSequenceController(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VariablePhotoSequenceController(&value)); } return winrt::Windows::Media::Devices::Core::VariablePhotoSequenceController{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController3::PhotoConfirmationControl() 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_PhotoConfirmationControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PhotoConfirmationControl(&value)); } return winrt::Windows::Media::Devices::PhotoConfirmationControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController3::ZoomControl() 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_ZoomControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ZoomControl(&value)); } return winrt::Windows::Media::Devices::ZoomControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController4::ExposurePriorityVideoControl() 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_ExposurePriorityVideoControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExposurePriorityVideoControl(&value)); } return winrt::Windows::Media::Devices::ExposurePriorityVideoControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController4::DesiredOptimization() const { winrt::Windows::Media::Devices::MediaCaptureOptimization 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_DesiredOptimization(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DesiredOptimization(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController4::DesiredOptimization(winrt::Windows::Media::Devices::MediaCaptureOptimization 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_DesiredOptimization(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DesiredOptimization(static_cast(value))); } } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController4::HdrVideoControl() 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_HdrVideoControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HdrVideoControl(&value)); } return winrt::Windows::Media::Devices::HdrVideoControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController4::OpticalImageStabilizationControl() 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_OpticalImageStabilizationControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_OpticalImageStabilizationControl(&value)); } return winrt::Windows::Media::Devices::OpticalImageStabilizationControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController4::AdvancedPhotoControl() 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_AdvancedPhotoControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AdvancedPhotoControl(&value)); } return winrt::Windows::Media::Devices::AdvancedPhotoControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController5::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_Media_Devices_IAdvancedVideoCaptureDeviceController5::GetDevicePropertyById(param::hstring const& propertyId, winrt::Windows::Foundation::IReference const& maxPropertyValueSize) 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->GetDevicePropertyById(*(void**)(&propertyId), *(void**)(&maxPropertyValueSize), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDevicePropertyById(*(void**)(&propertyId), *(void**)(&maxPropertyValueSize), &value)); } return winrt::Windows::Media::Devices::VideoDeviceControllerGetDevicePropertyResult{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController5::SetDevicePropertyById(param::hstring const& propertyId, winrt::Windows::Foundation::IInspectable const& propertyValue) const { winrt::Windows::Media::Devices::VideoDeviceControllerSetDevicePropertyStatus 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->SetDevicePropertyById(*(void**)(&propertyId), *(void**)(&propertyValue), reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetDevicePropertyById(*(void**)(&propertyId), *(void**)(&propertyValue), reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController5::GetDevicePropertyByExtendedId(array_view extendedPropertyId, winrt::Windows::Foundation::IReference const& maxPropertyValueSize) 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->GetDevicePropertyByExtendedId(extendedPropertyId.size(), get_abi(extendedPropertyId), *(void**)(&maxPropertyValueSize), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDevicePropertyByExtendedId(extendedPropertyId.size(), get_abi(extendedPropertyId), *(void**)(&maxPropertyValueSize), &value)); } return winrt::Windows::Media::Devices::VideoDeviceControllerGetDevicePropertyResult{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController5::SetDevicePropertyByExtendedId(array_view extendedPropertyId, array_view propertyValue) const { winrt::Windows::Media::Devices::VideoDeviceControllerSetDevicePropertyStatus 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->SetDevicePropertyByExtendedId(extendedPropertyId.size(), get_abi(extendedPropertyId), propertyValue.size(), get_abi(propertyValue), reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetDevicePropertyByExtendedId(extendedPropertyId.size(), get_abi(extendedPropertyId), propertyValue.size(), get_abi(propertyValue), reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController6::VideoTemporalDenoisingControl() 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_VideoTemporalDenoisingControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideoTemporalDenoisingControl(&value)); } return winrt::Windows::Media::Devices::VideoTemporalDenoisingControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController7::InfraredTorchControl() 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_InfraredTorchControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InfraredTorchControl(&value)); } return winrt::Windows::Media::Devices::InfraredTorchControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController8::PanelBasedOptimizationControl() 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_PanelBasedOptimizationControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PanelBasedOptimizationControl(&value)); } return winrt::Windows::Media::Devices::PanelBasedOptimizationControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAdvancedVideoCaptureDeviceController9::DigitalWindowControl() 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_DigitalWindowControl(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DigitalWindowControl(&value)); } return winrt::Windows::Media::Devices::DigitalWindowControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAudioDeviceController::Muted(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Muted(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Muted(value)); } } template auto consume_Windows_Media_Devices_IAudioDeviceController::Muted() 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_Muted(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Muted(&value)); } return value; } template auto consume_Windows_Media_Devices_IAudioDeviceController::VolumePercent(float 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_VolumePercent(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_VolumePercent(value)); } } template auto consume_Windows_Media_Devices_IAudioDeviceController::VolumePercent() const { float 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_VolumePercent(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VolumePercent(&value)); } return value; } template auto consume_Windows_Media_Devices_IAudioDeviceController2::AudioCaptureEffectsManager() 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_AudioCaptureEffectsManager(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AudioCaptureEffectsManager(&value)); } return winrt::Windows::Media::Effects::AudioCaptureEffectsManager{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAudioDeviceModule::ClassId() 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_ClassId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ClassId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAudioDeviceModule::DisplayName() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DisplayName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAudioDeviceModule::InstanceId() 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_InstanceId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InstanceId(&value)); } return value; } template auto consume_Windows_Media_Devices_IAudioDeviceModule::MajorVersion() 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_MajorVersion(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MajorVersion(&value)); } return value; } template auto consume_Windows_Media_Devices_IAudioDeviceModule::MinorVersion() 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_MinorVersion(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MinorVersion(&value)); } return value; } template auto consume_Windows_Media_Devices_IAudioDeviceModule::SendCommandAsync(winrt::Windows::Storage::Streams::IBuffer const& Command) 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->SendCommandAsync(*(void**)(&Command), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SendCommandAsync(*(void**)(&Command), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAudioDeviceModuleNotificationEventArgs::Module() 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_Module(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Module(&value)); } return winrt::Windows::Media::Devices::AudioDeviceModule{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAudioDeviceModuleNotificationEventArgs::NotificationData() 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_NotificationData(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NotificationData(&value)); } return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAudioDeviceModulesManager::ModuleNotificationReceived(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_ModuleNotificationReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ModuleNotificationReceived(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Devices_IAudioDeviceModulesManager::ModuleNotificationReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ModuleNotificationReceived(handler)); } template auto consume_Windows_Media_Devices_IAudioDeviceModulesManager::ModuleNotificationReceived(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_ModuleNotificationReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ModuleNotificationReceived(impl::bind_in(token)); } } template auto consume_Windows_Media_Devices_IAudioDeviceModulesManager::FindAllById(param::hstring const& moduleId) const { void* modules{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindAllById(*(void**)(&moduleId), &modules)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllById(*(void**)(&moduleId), &modules)); } return winrt::Windows::Foundation::Collections::IVectorView{ modules, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAudioDeviceModulesManager::FindAll() const { void* modules{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindAll(&modules)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAll(&modules)); } return winrt::Windows::Foundation::Collections::IVectorView{ modules, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IAudioDeviceModulesManagerFactory::Create(param::hstring const& deviceId) 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->Create(*(void**)(&deviceId), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(*(void**)(&deviceId), &result)); } return winrt::Windows::Media::Devices::AudioDeviceModulesManager{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_ICallControl::IndicateNewIncomingCall(bool enableRinger, param::hstring const& callerId) const { uint64_t callToken{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IndicateNewIncomingCall(enableRinger, *(void**)(&callerId), &callToken)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IndicateNewIncomingCall(enableRinger, *(void**)(&callerId), &callToken)); } return callToken; } template auto consume_Windows_Media_Devices_ICallControl::IndicateNewOutgoingCall() const { uint64_t callToken{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IndicateNewOutgoingCall(&callToken)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IndicateNewOutgoingCall(&callToken)); } return callToken; } template auto consume_Windows_Media_Devices_ICallControl::IndicateActiveCall(uint64_t callToken) 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->IndicateActiveCall(callToken)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IndicateActiveCall(callToken)); } } template auto consume_Windows_Media_Devices_ICallControl::EndCall(uint64_t callToken) 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->EndCall(callToken)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->EndCall(callToken)); } } template auto consume_Windows_Media_Devices_ICallControl::HasRinger() 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_HasRinger(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasRinger(&value)); } return value; } template auto consume_Windows_Media_Devices_ICallControl::AnswerRequested(winrt::Windows::Media::Devices::CallControlEventHandler 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_AnswerRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AnswerRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Devices_ICallControl::AnswerRequested(auto_revoke_t, winrt::Windows::Media::Devices::CallControlEventHandler const& handler) const { return impl::make_event_revoker(this, AnswerRequested(handler)); } template auto consume_Windows_Media_Devices_ICallControl::AnswerRequested(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_AnswerRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AnswerRequested(impl::bind_in(token)); } } template auto consume_Windows_Media_Devices_ICallControl::HangUpRequested(winrt::Windows::Media::Devices::CallControlEventHandler 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_HangUpRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_HangUpRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Devices_ICallControl::HangUpRequested(auto_revoke_t, winrt::Windows::Media::Devices::CallControlEventHandler const& handler) const { return impl::make_event_revoker(this, HangUpRequested(handler)); } template auto consume_Windows_Media_Devices_ICallControl::HangUpRequested(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_HangUpRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_HangUpRequested(impl::bind_in(token)); } } template auto consume_Windows_Media_Devices_ICallControl::DialRequested(winrt::Windows::Media::Devices::DialRequestedEventHandler 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_DialRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_DialRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Devices_ICallControl::DialRequested(auto_revoke_t, winrt::Windows::Media::Devices::DialRequestedEventHandler const& handler) const { return impl::make_event_revoker(this, DialRequested(handler)); } template auto consume_Windows_Media_Devices_ICallControl::DialRequested(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_DialRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_DialRequested(impl::bind_in(token)); } } template auto consume_Windows_Media_Devices_ICallControl::RedialRequested(winrt::Windows::Media::Devices::RedialRequestedEventHandler 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_RedialRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_RedialRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Devices_ICallControl::RedialRequested(auto_revoke_t, winrt::Windows::Media::Devices::RedialRequestedEventHandler const& handler) const { return impl::make_event_revoker(this, RedialRequested(handler)); } template auto consume_Windows_Media_Devices_ICallControl::RedialRequested(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_RedialRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_RedialRequested(impl::bind_in(token)); } } template auto consume_Windows_Media_Devices_ICallControl::KeypadPressed(winrt::Windows::Media::Devices::KeypadPressedEventHandler 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_KeypadPressed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_KeypadPressed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Devices_ICallControl::KeypadPressed(auto_revoke_t, winrt::Windows::Media::Devices::KeypadPressedEventHandler const& handler) const { return impl::make_event_revoker(this, KeypadPressed(handler)); } template auto consume_Windows_Media_Devices_ICallControl::KeypadPressed(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_KeypadPressed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_KeypadPressed(impl::bind_in(token)); } } template auto consume_Windows_Media_Devices_ICallControl::AudioTransferRequested(winrt::Windows::Media::Devices::CallControlEventHandler 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_AudioTransferRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AudioTransferRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Devices_ICallControl::AudioTransferRequested(auto_revoke_t, winrt::Windows::Media::Devices::CallControlEventHandler const& handler) const { return impl::make_event_revoker(this, AudioTransferRequested(handler)); } template auto consume_Windows_Media_Devices_ICallControl::AudioTransferRequested(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_AudioTransferRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AudioTransferRequested(impl::bind_in(token)); } } template auto consume_Windows_Media_Devices_ICallControlStatics::GetDefault() const { void* callControl{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDefault(&callControl)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDefault(&callControl)); } return winrt::Windows::Media::Devices::CallControl{ callControl, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_ICallControlStatics::FromId(param::hstring const& deviceId) const { void* callControl{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FromId(*(void**)(&deviceId), &callControl)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromId(*(void**)(&deviceId), &callControl)); } return winrt::Windows::Media::Devices::CallControl{ callControl, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_ICameraOcclusionInfo::GetState() 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->GetState(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetState(&result)); } return winrt::Windows::Media::Devices::CameraOcclusionState{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_ICameraOcclusionInfo::IsOcclusionKindSupported(winrt::Windows::Media::Devices::CameraOcclusionKind const& occlusionKind) 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->IsOcclusionKindSupported(static_cast(occlusionKind), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsOcclusionKindSupported(static_cast(occlusionKind), &result)); } return result; } template auto consume_Windows_Media_Devices_ICameraOcclusionInfo::StateChanged(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_StateChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_StateChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Devices_ICameraOcclusionInfo::StateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, StateChanged(handler)); } template auto consume_Windows_Media_Devices_ICameraOcclusionInfo::StateChanged(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_StateChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_StateChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Devices_ICameraOcclusionState::IsOccluded() 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_IsOccluded(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsOccluded(&value)); } return value; } template auto consume_Windows_Media_Devices_ICameraOcclusionState::IsOcclusionKind(winrt::Windows::Media::Devices::CameraOcclusionKind const& occlusionKind) 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->IsOcclusionKind(static_cast(occlusionKind), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsOcclusionKind(static_cast(occlusionKind), &result)); } return result; } template auto consume_Windows_Media_Devices_ICameraOcclusionStateChangedEventArgs::State() 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_State(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_State(&value)); } return winrt::Windows::Media::Devices::CameraOcclusionState{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IDefaultAudioDeviceChangedEventArgs::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_Media_Devices_IDefaultAudioDeviceChangedEventArgs::Role() const { winrt::Windows::Media::Devices::AudioDeviceRole 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_Role(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Role(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IDialRequestedEventArgs::Handled() 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->Handled()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Handled()); } } template auto consume_Windows_Media_Devices_IDialRequestedEventArgs::Contact() 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_Contact(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Contact(&value)); } return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IDigitalWindowBounds::NormalizedOriginTop() const { double 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_NormalizedOriginTop(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NormalizedOriginTop(&value)); } return value; } template auto consume_Windows_Media_Devices_IDigitalWindowBounds::NormalizedOriginTop(double 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_NormalizedOriginTop(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_NormalizedOriginTop(value)); } } template auto consume_Windows_Media_Devices_IDigitalWindowBounds::NormalizedOriginLeft() const { double 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_NormalizedOriginLeft(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NormalizedOriginLeft(&value)); } return value; } template auto consume_Windows_Media_Devices_IDigitalWindowBounds::NormalizedOriginLeft(double 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_NormalizedOriginLeft(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_NormalizedOriginLeft(value)); } } template auto consume_Windows_Media_Devices_IDigitalWindowBounds::Scale() const { double 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_Scale(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Scale(&value)); } return value; } template auto consume_Windows_Media_Devices_IDigitalWindowBounds::Scale(double 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_Scale(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Scale(value)); } } template auto consume_Windows_Media_Devices_IDigitalWindowCapability::Width() const { int32_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_Width(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Width(&value)); } return value; } template auto consume_Windows_Media_Devices_IDigitalWindowCapability::Height() const { int32_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_Height(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Height(&value)); } return value; } template auto consume_Windows_Media_Devices_IDigitalWindowCapability::MinScaleValue() const { double 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_MinScaleValue(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MinScaleValue(&value)); } return value; } template auto consume_Windows_Media_Devices_IDigitalWindowCapability::MaxScaleValue() const { double 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_MaxScaleValue(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxScaleValue(&value)); } return value; } template auto consume_Windows_Media_Devices_IDigitalWindowCapability::MinScaleValueWithoutUpsampling() const { double 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_MinScaleValueWithoutUpsampling(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MinScaleValueWithoutUpsampling(&value)); } return value; } template auto consume_Windows_Media_Devices_IDigitalWindowCapability::NormalizedFieldOfViewLimit() const { winrt::Windows::Foundation::Rect 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_NormalizedFieldOfViewLimit(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NormalizedFieldOfViewLimit(put_abi(value))); } return value; } template auto consume_Windows_Media_Devices_IDigitalWindowControl::IsSupported() 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_IsSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_IDigitalWindowControl::SupportedModes() const { uint32_t value_impl_size{}; int32_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_SupportedModes(&value_impl_size, &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedModes(&value_impl_size, &value)); } return com_array{ value, value_impl_size, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IDigitalWindowControl::CurrentMode() const { winrt::Windows::Media::Devices::DigitalWindowMode 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_CurrentMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IDigitalWindowControl::GetBounds() 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->GetBounds(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetBounds(&result)); } return winrt::Windows::Media::Devices::DigitalWindowBounds{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IDigitalWindowControl::Configure(winrt::Windows::Media::Devices::DigitalWindowMode const& digitalWindowMode) 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->Configure(static_cast(digitalWindowMode))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Configure(static_cast(digitalWindowMode))); } } template auto consume_Windows_Media_Devices_IDigitalWindowControl::Configure(winrt::Windows::Media::Devices::DigitalWindowMode const& digitalWindowMode, winrt::Windows::Media::Devices::DigitalWindowBounds const& digitalWindowBounds) 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->ConfigureWithBounds(static_cast(digitalWindowMode), *(void**)(&digitalWindowBounds))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ConfigureWithBounds(static_cast(digitalWindowMode), *(void**)(&digitalWindowBounds))); } } template auto consume_Windows_Media_Devices_IDigitalWindowControl::SupportedCapabilities() 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_SupportedCapabilities(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedCapabilities(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IDigitalWindowControl::GetCapabilityForSize(int32_t width, int32_t height) 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->GetCapabilityForSize(width, height, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCapabilityForSize(width, height, &result)); } return winrt::Windows::Media::Devices::DigitalWindowCapability{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IExposureCompensationControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IExposureCompensationControl::Min() const { float 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_Min(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Min(&value)); } return value; } template auto consume_Windows_Media_Devices_IExposureCompensationControl::Max() const { float 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_Max(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Max(&value)); } return value; } template auto consume_Windows_Media_Devices_IExposureCompensationControl::Step() const { float 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_Step(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Step(&value)); } return value; } template auto consume_Windows_Media_Devices_IExposureCompensationControl::Value() const { float 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_Value(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(&value)); } return value; } template auto consume_Windows_Media_Devices_IExposureCompensationControl::SetValueAsync(float value) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetValueAsync(value, &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetValueAsync(value, &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IExposureControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IExposureControl::Auto() 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_Auto(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Auto(&value)); } return value; } template auto consume_Windows_Media_Devices_IExposureControl::SetAutoAsync(bool value) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetAutoAsync(value, &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetAutoAsync(value, &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IExposureControl::Min() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Min(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Min(put_abi(value))); } return value; } template auto consume_Windows_Media_Devices_IExposureControl::Max() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Max(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Max(put_abi(value))); } return value; } template auto consume_Windows_Media_Devices_IExposureControl::Step() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Step(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Step(put_abi(value))); } return value; } template auto consume_Windows_Media_Devices_IExposureControl::Value() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Value(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(put_abi(value))); } return value; } template auto consume_Windows_Media_Devices_IExposureControl::SetValueAsync(winrt::Windows::Foundation::TimeSpan const& shutterDuration) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetValueAsync(impl::bind_in(shutterDuration), &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetValueAsync(impl::bind_in(shutterDuration), &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IExposurePriorityVideoControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IExposurePriorityVideoControl::Enabled() 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_Enabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Enabled(&value)); } return value; } template auto consume_Windows_Media_Devices_IExposurePriorityVideoControl::Enabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Enabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Enabled(value)); } } template auto consume_Windows_Media_Devices_IFlashControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IFlashControl::PowerSupported() 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_PowerSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PowerSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_IFlashControl::RedEyeReductionSupported() 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_RedEyeReductionSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RedEyeReductionSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_IFlashControl::Enabled() 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_Enabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Enabled(&value)); } return value; } template auto consume_Windows_Media_Devices_IFlashControl::Enabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Enabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Enabled(value)); } } template auto consume_Windows_Media_Devices_IFlashControl::Auto() 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_Auto(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Auto(&value)); } return value; } template auto consume_Windows_Media_Devices_IFlashControl::Auto(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Auto(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Auto(value)); } } template auto consume_Windows_Media_Devices_IFlashControl::RedEyeReduction() 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_RedEyeReduction(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RedEyeReduction(&value)); } return value; } template auto consume_Windows_Media_Devices_IFlashControl::RedEyeReduction(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_RedEyeReduction(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_RedEyeReduction(value)); } } template auto consume_Windows_Media_Devices_IFlashControl::PowerPercent() const { float 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_PowerPercent(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PowerPercent(&value)); } return value; } template auto consume_Windows_Media_Devices_IFlashControl::PowerPercent(float 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_PowerPercent(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PowerPercent(value)); } } template auto consume_Windows_Media_Devices_IFlashControl2::AssistantLightSupported() 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_AssistantLightSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AssistantLightSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_IFlashControl2::AssistantLightEnabled() 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_AssistantLightEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AssistantLightEnabled(&value)); } return value; } template auto consume_Windows_Media_Devices_IFlashControl2::AssistantLightEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AssistantLightEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AssistantLightEnabled(value)); } } template auto consume_Windows_Media_Devices_IFocusControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IFocusControl::SupportedPresets() 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_SupportedPresets(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedPresets(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IFocusControl::Preset() const { winrt::Windows::Media::Devices::FocusPreset 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_Preset(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Preset(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IFocusControl::SetPresetAsync(winrt::Windows::Media::Devices::FocusPreset const& preset) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetPresetAsync(static_cast(preset), &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetPresetAsync(static_cast(preset), &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IFocusControl::SetPresetAsync(winrt::Windows::Media::Devices::FocusPreset const& preset, bool completeBeforeFocus) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetPresetWithCompletionOptionAsync(static_cast(preset), completeBeforeFocus, &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetPresetWithCompletionOptionAsync(static_cast(preset), completeBeforeFocus, &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IFocusControl::Min() 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_Min(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Min(&value)); } return value; } template auto consume_Windows_Media_Devices_IFocusControl::Max() 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_Max(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Max(&value)); } return value; } template auto consume_Windows_Media_Devices_IFocusControl::Step() 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_Step(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Step(&value)); } return value; } template auto consume_Windows_Media_Devices_IFocusControl::Value() 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_Value(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(&value)); } return value; } template auto consume_Windows_Media_Devices_IFocusControl::SetValueAsync(uint32_t focus) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetValueAsync(focus, &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetValueAsync(focus, &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IFocusControl::FocusAsync() const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FocusAsync(&asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FocusAsync(&asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IFocusControl2::FocusChangedSupported() 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_FocusChangedSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FocusChangedSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_IFocusControl2::WaitForFocusSupported() 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_WaitForFocusSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WaitForFocusSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_IFocusControl2::SupportedFocusModes() 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_SupportedFocusModes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedFocusModes(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IFocusControl2::SupportedFocusDistances() 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_SupportedFocusDistances(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedFocusDistances(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IFocusControl2::SupportedFocusRanges() 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_SupportedFocusRanges(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedFocusRanges(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IFocusControl2::Mode() const { winrt::Windows::Media::Devices::FocusMode 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_Mode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IFocusControl2::FocusState() const { winrt::Windows::Media::Devices::MediaCaptureFocusState 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_FocusState(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FocusState(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IFocusControl2::UnlockAsync() const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->UnlockAsync(&asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UnlockAsync(&asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IFocusControl2::LockAsync() const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LockAsync(&asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LockAsync(&asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IFocusControl2::Configure(winrt::Windows::Media::Devices::FocusSettings const& settings) 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->Configure(*(void**)(&settings))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Configure(*(void**)(&settings))); } } template auto consume_Windows_Media_Devices_IFocusSettings::Mode() const { winrt::Windows::Media::Devices::FocusMode 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_Mode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IFocusSettings::Mode(winrt::Windows::Media::Devices::FocusMode 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_Mode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Mode(static_cast(value))); } } template auto consume_Windows_Media_Devices_IFocusSettings::AutoFocusRange() const { winrt::Windows::Media::Devices::AutoFocusRange 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_AutoFocusRange(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoFocusRange(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IFocusSettings::AutoFocusRange(winrt::Windows::Media::Devices::AutoFocusRange 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_AutoFocusRange(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AutoFocusRange(static_cast(value))); } } template auto consume_Windows_Media_Devices_IFocusSettings::Value() 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_Value(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IFocusSettings::Value(winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Value(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Value(*(void**)(&value))); } } template auto consume_Windows_Media_Devices_IFocusSettings::Distance() 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_Distance(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Distance(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IFocusSettings::Distance(winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Distance(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Distance(*(void**)(&value))); } } template auto consume_Windows_Media_Devices_IFocusSettings::WaitForFocus() 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_WaitForFocus(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WaitForFocus(&value)); } return value; } template auto consume_Windows_Media_Devices_IFocusSettings::WaitForFocus(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_WaitForFocus(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_WaitForFocus(value)); } } template auto consume_Windows_Media_Devices_IFocusSettings::DisableDriverFallback() 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_DisableDriverFallback(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisableDriverFallback(&value)); } return value; } template auto consume_Windows_Media_Devices_IFocusSettings::DisableDriverFallback(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_DisableDriverFallback(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DisableDriverFallback(value)); } } template auto consume_Windows_Media_Devices_IHdrVideoControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IHdrVideoControl::SupportedModes() 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_SupportedModes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedModes(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IHdrVideoControl::Mode() const { winrt::Windows::Media::Devices::HdrVideoMode 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_Mode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IHdrVideoControl::Mode(winrt::Windows::Media::Devices::HdrVideoMode 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_Mode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Mode(static_cast(value))); } } template auto consume_Windows_Media_Devices_IInfraredTorchControl::IsSupported() 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_IsSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_IInfraredTorchControl::SupportedModes() 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_SupportedModes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedModes(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IInfraredTorchControl::CurrentMode() const { winrt::Windows::Media::Devices::InfraredTorchMode 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_CurrentMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IInfraredTorchControl::CurrentMode(winrt::Windows::Media::Devices::InfraredTorchMode 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_CurrentMode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CurrentMode(static_cast(value))); } } template auto consume_Windows_Media_Devices_IInfraredTorchControl::MinPower() const { int32_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_MinPower(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MinPower(&value)); } return value; } template auto consume_Windows_Media_Devices_IInfraredTorchControl::MaxPower() const { int32_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_MaxPower(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxPower(&value)); } return value; } template auto consume_Windows_Media_Devices_IInfraredTorchControl::PowerStep() const { int32_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_PowerStep(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PowerStep(&value)); } return value; } template auto consume_Windows_Media_Devices_IInfraredTorchControl::Power() const { int32_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_Power(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Power(&value)); } return value; } template auto consume_Windows_Media_Devices_IInfraredTorchControl::Power(int32_t 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_Power(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Power(value)); } } template auto consume_Windows_Media_Devices_IIsoSpeedControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IIsoSpeedControl::SupportedPresets() 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_SupportedPresets(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedPresets(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IIsoSpeedControl::Preset() const { winrt::Windows::Media::Devices::IsoSpeedPreset 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_Preset(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Preset(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IIsoSpeedControl::SetPresetAsync(winrt::Windows::Media::Devices::IsoSpeedPreset const& preset) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetPresetAsync(static_cast(preset), &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetPresetAsync(static_cast(preset), &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IIsoSpeedControl2::Min() 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_Min(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Min(&value)); } return value; } template auto consume_Windows_Media_Devices_IIsoSpeedControl2::Max() 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_Max(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Max(&value)); } return value; } template auto consume_Windows_Media_Devices_IIsoSpeedControl2::Step() 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_Step(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Step(&value)); } return value; } template auto consume_Windows_Media_Devices_IIsoSpeedControl2::Value() 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_Value(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(&value)); } return value; } template auto consume_Windows_Media_Devices_IIsoSpeedControl2::SetValueAsync(uint32_t isoSpeed) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetValueAsync(isoSpeed, &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetValueAsync(isoSpeed, &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IIsoSpeedControl2::Auto() 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_Auto(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Auto(&value)); } return value; } template auto consume_Windows_Media_Devices_IIsoSpeedControl2::SetAutoAsync() const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetAutoAsync(&asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetAutoAsync(&asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IKeypadPressedEventArgs::TelephonyKey() const { winrt::Windows::Media::Devices::TelephonyKey telephonyKey{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_TelephonyKey(reinterpret_cast(&telephonyKey))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TelephonyKey(reinterpret_cast(&telephonyKey))); } return telephonyKey; } template auto consume_Windows_Media_Devices_ILowLagPhotoControl::GetHighestConcurrentFrameRate(winrt::Windows::Media::MediaProperties::IMediaEncodingProperties const& captureProperties) 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->GetHighestConcurrentFrameRate(*(void**)(&captureProperties), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetHighestConcurrentFrameRate(*(void**)(&captureProperties), &value)); } return winrt::Windows::Media::MediaProperties::MediaRatio{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_ILowLagPhotoControl::GetCurrentFrameRate() 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->GetCurrentFrameRate(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentFrameRate(&value)); } return winrt::Windows::Media::MediaProperties::MediaRatio{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_ILowLagPhotoControl::ThumbnailEnabled() 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_ThumbnailEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ThumbnailEnabled(&value)); } return value; } template auto consume_Windows_Media_Devices_ILowLagPhotoControl::ThumbnailEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ThumbnailEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ThumbnailEnabled(value)); } } template auto consume_Windows_Media_Devices_ILowLagPhotoControl::ThumbnailFormat() const { winrt::Windows::Media::MediaProperties::MediaThumbnailFormat 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_ThumbnailFormat(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ThumbnailFormat(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_ILowLagPhotoControl::ThumbnailFormat(winrt::Windows::Media::MediaProperties::MediaThumbnailFormat 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_ThumbnailFormat(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ThumbnailFormat(static_cast(value))); } } template auto consume_Windows_Media_Devices_ILowLagPhotoControl::DesiredThumbnailSize() 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_DesiredThumbnailSize(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DesiredThumbnailSize(&value)); } return value; } template auto consume_Windows_Media_Devices_ILowLagPhotoControl::DesiredThumbnailSize(uint32_t 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_DesiredThumbnailSize(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DesiredThumbnailSize(value)); } } template auto consume_Windows_Media_Devices_ILowLagPhotoControl::HardwareAcceleratedThumbnailSupported() 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_HardwareAcceleratedThumbnailSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HardwareAcceleratedThumbnailSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::MaxPastPhotos() 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_MaxPastPhotos(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxPastPhotos(&value)); } return value; } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::MaxPhotosPerSecond() const { float 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_MaxPhotosPerSecond(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxPhotosPerSecond(&value)); } return value; } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::PastPhotoLimit() 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_PastPhotoLimit(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PastPhotoLimit(&value)); } return value; } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::PastPhotoLimit(uint32_t 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_PastPhotoLimit(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PastPhotoLimit(value)); } } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::PhotosPerSecondLimit() const { float 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_PhotosPerSecondLimit(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PhotosPerSecondLimit(&value)); } return value; } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::PhotosPerSecondLimit(float 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_PhotosPerSecondLimit(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PhotosPerSecondLimit(value)); } } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::GetHighestConcurrentFrameRate(winrt::Windows::Media::MediaProperties::IMediaEncodingProperties const& captureProperties) 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->GetHighestConcurrentFrameRate(*(void**)(&captureProperties), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetHighestConcurrentFrameRate(*(void**)(&captureProperties), &value)); } return winrt::Windows::Media::MediaProperties::MediaRatio{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::GetCurrentFrameRate() 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->GetCurrentFrameRate(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentFrameRate(&value)); } return winrt::Windows::Media::MediaProperties::MediaRatio{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::ThumbnailEnabled() 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_ThumbnailEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ThumbnailEnabled(&value)); } return value; } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::ThumbnailEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ThumbnailEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ThumbnailEnabled(value)); } } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::ThumbnailFormat() const { winrt::Windows::Media::MediaProperties::MediaThumbnailFormat 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_ThumbnailFormat(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ThumbnailFormat(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::ThumbnailFormat(winrt::Windows::Media::MediaProperties::MediaThumbnailFormat 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_ThumbnailFormat(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ThumbnailFormat(static_cast(value))); } } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::DesiredThumbnailSize() 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_DesiredThumbnailSize(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DesiredThumbnailSize(&value)); } return value; } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::DesiredThumbnailSize(uint32_t 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_DesiredThumbnailSize(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DesiredThumbnailSize(value)); } } template auto consume_Windows_Media_Devices_ILowLagPhotoSequenceControl::HardwareAcceleratedThumbnailSupported() 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_HardwareAcceleratedThumbnailSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HardwareAcceleratedThumbnailSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_IMediaDeviceControl::Capabilities() 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_Capabilities(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Capabilities(&value)); } return winrt::Windows::Media::Devices::MediaDeviceControlCapabilities{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IMediaDeviceControl::TryGetValue(double& value) const { bool succeeded{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryGetValue(&value, &succeeded)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryGetValue(&value, &succeeded)); } return succeeded; } template auto consume_Windows_Media_Devices_IMediaDeviceControl::TrySetValue(double value) const { bool succeeded{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TrySetValue(value, &succeeded)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TrySetValue(value, &succeeded)); } return succeeded; } template auto consume_Windows_Media_Devices_IMediaDeviceControl::TryGetAuto(bool& value) const { bool succeeded{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryGetAuto(&value, &succeeded)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryGetAuto(&value, &succeeded)); } return succeeded; } template auto consume_Windows_Media_Devices_IMediaDeviceControl::TrySetAuto(bool value) const { bool succeeded{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TrySetAuto(value, &succeeded)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TrySetAuto(value, &succeeded)); } return succeeded; } template auto consume_Windows_Media_Devices_IMediaDeviceControlCapabilities::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IMediaDeviceControlCapabilities::Min() const { double 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_Min(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Min(&value)); } return value; } template auto consume_Windows_Media_Devices_IMediaDeviceControlCapabilities::Max() const { double 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_Max(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Max(&value)); } return value; } template auto consume_Windows_Media_Devices_IMediaDeviceControlCapabilities::Step() const { double 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_Step(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Step(&value)); } return value; } template auto consume_Windows_Media_Devices_IMediaDeviceControlCapabilities::Default() const { double 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_Default(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Default(&value)); } return value; } template auto consume_Windows_Media_Devices_IMediaDeviceControlCapabilities::AutoModeSupported() 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_AutoModeSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoModeSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_IMediaDeviceController::GetAvailableMediaStreamProperties(winrt::Windows::Media::Capture::MediaStreamType const& mediaStreamType) 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->GetAvailableMediaStreamProperties(static_cast(mediaStreamType), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAvailableMediaStreamProperties(static_cast(mediaStreamType), &value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IMediaDeviceController::GetMediaStreamProperties(winrt::Windows::Media::Capture::MediaStreamType const& mediaStreamType) 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->GetMediaStreamProperties(static_cast(mediaStreamType), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetMediaStreamProperties(static_cast(mediaStreamType), &value)); } return winrt::Windows::Media::MediaProperties::IMediaEncodingProperties{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IMediaDeviceController::SetMediaStreamPropertiesAsync(winrt::Windows::Media::Capture::MediaStreamType const& mediaStreamType, winrt::Windows::Media::MediaProperties::IMediaEncodingProperties const& mediaEncodingProperties) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetMediaStreamPropertiesAsync(static_cast(mediaStreamType), *(void**)(&mediaEncodingProperties), &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetMediaStreamPropertiesAsync(static_cast(mediaStreamType), *(void**)(&mediaEncodingProperties), &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IMediaDeviceStatics::GetAudioCaptureSelector() const { void* selector{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAudioCaptureSelector(&selector)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAudioCaptureSelector(&selector)); } return hstring{ selector, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IMediaDeviceStatics::GetAudioRenderSelector() const { void* selector{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAudioRenderSelector(&selector)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAudioRenderSelector(&selector)); } return hstring{ selector, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IMediaDeviceStatics::GetVideoCaptureSelector() const { void* selector{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetVideoCaptureSelector(&selector)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetVideoCaptureSelector(&selector)); } return hstring{ selector, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IMediaDeviceStatics::GetDefaultAudioCaptureId(winrt::Windows::Media::Devices::AudioDeviceRole const& role) const { void* deviceId{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDefaultAudioCaptureId(static_cast(role), &deviceId)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDefaultAudioCaptureId(static_cast(role), &deviceId)); } return hstring{ deviceId, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IMediaDeviceStatics::GetDefaultAudioRenderId(winrt::Windows::Media::Devices::AudioDeviceRole const& role) const { void* deviceId{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDefaultAudioRenderId(static_cast(role), &deviceId)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDefaultAudioRenderId(static_cast(role), &deviceId)); } return hstring{ deviceId, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IMediaDeviceStatics::DefaultAudioCaptureDeviceChanged(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_DefaultAudioCaptureDeviceChanged(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_DefaultAudioCaptureDeviceChanged(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_Devices_IMediaDeviceStatics::DefaultAudioCaptureDeviceChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, DefaultAudioCaptureDeviceChanged(handler)); } template auto consume_Windows_Media_Devices_IMediaDeviceStatics::DefaultAudioCaptureDeviceChanged(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_DefaultAudioCaptureDeviceChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_DefaultAudioCaptureDeviceChanged(impl::bind_in(cookie)); } } template auto consume_Windows_Media_Devices_IMediaDeviceStatics::DefaultAudioRenderDeviceChanged(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_DefaultAudioRenderDeviceChanged(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_DefaultAudioRenderDeviceChanged(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_Devices_IMediaDeviceStatics::DefaultAudioRenderDeviceChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, DefaultAudioRenderDeviceChanged(handler)); } template auto consume_Windows_Media_Devices_IMediaDeviceStatics::DefaultAudioRenderDeviceChanged(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_DefaultAudioRenderDeviceChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_DefaultAudioRenderDeviceChanged(impl::bind_in(cookie)); } } template auto consume_Windows_Media_Devices_IModuleCommandResult::Status() const { winrt::Windows::Media::Devices::SendCommandStatus 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_Media_Devices_IModuleCommandResult::Result() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Result(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Result(&value)); } return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IOpticalImageStabilizationControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IOpticalImageStabilizationControl::SupportedModes() 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_SupportedModes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedModes(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IOpticalImageStabilizationControl::Mode() const { winrt::Windows::Media::Devices::OpticalImageStabilizationMode 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_Mode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IOpticalImageStabilizationControl::Mode(winrt::Windows::Media::Devices::OpticalImageStabilizationMode 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_Mode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Mode(static_cast(value))); } } template auto consume_Windows_Media_Devices_IPanelBasedOptimizationControl::IsSupported() 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_IsSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_IPanelBasedOptimizationControl::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_Media_Devices_IPanelBasedOptimizationControl::Panel(winrt::Windows::Devices::Enumeration::Panel 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_Panel(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Panel(static_cast(value))); } } template auto consume_Windows_Media_Devices_IPhotoConfirmationControl::Supported() const { bool pbSupported{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_Supported(&pbSupported)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&pbSupported)); } return pbSupported; } template auto consume_Windows_Media_Devices_IPhotoConfirmationControl::Enabled() 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_Enabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Enabled(&value)); } return value; } template auto consume_Windows_Media_Devices_IPhotoConfirmationControl::Enabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Enabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Enabled(value)); } } template auto consume_Windows_Media_Devices_IPhotoConfirmationControl::PixelFormat() const { winrt::Windows::Media::MediaProperties::MediaPixelFormat format{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_PixelFormat(reinterpret_cast(&format))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PixelFormat(reinterpret_cast(&format))); } return format; } template auto consume_Windows_Media_Devices_IPhotoConfirmationControl::PixelFormat(winrt::Windows::Media::MediaProperties::MediaPixelFormat const& format) 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_PixelFormat(static_cast(format))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PixelFormat(static_cast(format))); } } template auto consume_Windows_Media_Devices_IRedialRequestedEventArgs::Handled() 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->Handled()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Handled()); } } template auto consume_Windows_Media_Devices_IRegionOfInterest::AutoFocusEnabled() 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_AutoFocusEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoFocusEnabled(&value)); } return value; } template auto consume_Windows_Media_Devices_IRegionOfInterest::AutoFocusEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AutoFocusEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AutoFocusEnabled(value)); } } template auto consume_Windows_Media_Devices_IRegionOfInterest::AutoWhiteBalanceEnabled() 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_AutoWhiteBalanceEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoWhiteBalanceEnabled(&value)); } return value; } template auto consume_Windows_Media_Devices_IRegionOfInterest::AutoWhiteBalanceEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AutoWhiteBalanceEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AutoWhiteBalanceEnabled(value)); } } template auto consume_Windows_Media_Devices_IRegionOfInterest::AutoExposureEnabled() 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_AutoExposureEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoExposureEnabled(&value)); } return value; } template auto consume_Windows_Media_Devices_IRegionOfInterest::AutoExposureEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AutoExposureEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AutoExposureEnabled(value)); } } template auto consume_Windows_Media_Devices_IRegionOfInterest::Bounds() const { winrt::Windows::Foundation::Rect 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_Bounds(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Bounds(put_abi(value))); } return value; } template auto consume_Windows_Media_Devices_IRegionOfInterest::Bounds(winrt::Windows::Foundation::Rect 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_Bounds(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Bounds(impl::bind_in(value))); } } template auto consume_Windows_Media_Devices_IRegionOfInterest2::Type() const { winrt::Windows::Media::Devices::RegionOfInterestType value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Type(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Type(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IRegionOfInterest2::Type(winrt::Windows::Media::Devices::RegionOfInterestType 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_Type(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Type(static_cast(value))); } } template auto consume_Windows_Media_Devices_IRegionOfInterest2::BoundsNormalized() 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_BoundsNormalized(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BoundsNormalized(&value)); } return value; } template auto consume_Windows_Media_Devices_IRegionOfInterest2::BoundsNormalized(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_BoundsNormalized(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_BoundsNormalized(value)); } } template auto consume_Windows_Media_Devices_IRegionOfInterest2::Weight() 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_Weight(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Weight(&value)); } return value; } template auto consume_Windows_Media_Devices_IRegionOfInterest2::Weight(uint32_t 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_Weight(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Weight(value)); } } template auto consume_Windows_Media_Devices_IRegionsOfInterestControl::MaxRegions() 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_MaxRegions(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxRegions(&value)); } return value; } template auto consume_Windows_Media_Devices_IRegionsOfInterestControl::SetRegionsAsync(param::async_iterable const& regions) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetRegionsAsync(*(void**)(®ions), &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetRegionsAsync(*(void**)(®ions), &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IRegionsOfInterestControl::SetRegionsAsync(param::async_iterable const& regions, bool lockValues) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetRegionsWithLockAsync(*(void**)(®ions), lockValues, &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetRegionsWithLockAsync(*(void**)(®ions), lockValues, &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IRegionsOfInterestControl::ClearRegionsAsync() const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ClearRegionsAsync(&asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ClearRegionsAsync(&asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IRegionsOfInterestControl::AutoFocusSupported() 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_AutoFocusSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoFocusSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_IRegionsOfInterestControl::AutoWhiteBalanceSupported() 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_AutoWhiteBalanceSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoWhiteBalanceSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_IRegionsOfInterestControl::AutoExposureSupported() 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_AutoExposureSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoExposureSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_ISceneModeControl::SupportedModes() 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_SupportedModes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedModes(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_ISceneModeControl::Value() const { winrt::Windows::Media::Devices::CaptureSceneMode 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_Value(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_ISceneModeControl::SetValueAsync(winrt::Windows::Media::Devices::CaptureSceneMode const& sceneMode) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetValueAsync(static_cast(sceneMode), &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetValueAsync(static_cast(sceneMode), &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_ITorchControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_ITorchControl::PowerSupported() 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_PowerSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PowerSupported(&value)); } return value; } template auto consume_Windows_Media_Devices_ITorchControl::Enabled() 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_Enabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Enabled(&value)); } return value; } template auto consume_Windows_Media_Devices_ITorchControl::Enabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Enabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Enabled(value)); } } template auto consume_Windows_Media_Devices_ITorchControl::PowerPercent() const { float 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_PowerPercent(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PowerPercent(&value)); } return value; } template auto consume_Windows_Media_Devices_ITorchControl::PowerPercent(float 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_PowerPercent(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PowerPercent(value)); } } template auto consume_Windows_Media_Devices_IVideoDeviceController::Brightness() 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_Brightness(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Brightness(&value)); } return winrt::Windows::Media::Devices::MediaDeviceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoDeviceController::Contrast() 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_Contrast(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Contrast(&value)); } return winrt::Windows::Media::Devices::MediaDeviceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoDeviceController::Hue() 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_Hue(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Hue(&value)); } return winrt::Windows::Media::Devices::MediaDeviceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoDeviceController::WhiteBalance() 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_WhiteBalance(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WhiteBalance(&value)); } return winrt::Windows::Media::Devices::MediaDeviceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoDeviceController::BacklightCompensation() 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_BacklightCompensation(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BacklightCompensation(&value)); } return winrt::Windows::Media::Devices::MediaDeviceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoDeviceController::Pan() 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_Pan(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Pan(&value)); } return winrt::Windows::Media::Devices::MediaDeviceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoDeviceController::Tilt() 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_Tilt(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Tilt(&value)); } return winrt::Windows::Media::Devices::MediaDeviceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoDeviceController::Zoom() 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_Zoom(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Zoom(&value)); } return winrt::Windows::Media::Devices::MediaDeviceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoDeviceController::Roll() 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_Roll(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Roll(&value)); } return winrt::Windows::Media::Devices::MediaDeviceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoDeviceController::Exposure() 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_Exposure(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Exposure(&value)); } return winrt::Windows::Media::Devices::MediaDeviceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoDeviceController::Focus() 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_Focus(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Focus(&value)); } return winrt::Windows::Media::Devices::MediaDeviceControl{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoDeviceController::TrySetPowerlineFrequency(winrt::Windows::Media::Capture::PowerlineFrequency const& value) const { bool succeeded{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TrySetPowerlineFrequency(static_cast(value), &succeeded)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TrySetPowerlineFrequency(static_cast(value), &succeeded)); } return succeeded; } template auto consume_Windows_Media_Devices_IVideoDeviceController::TryGetPowerlineFrequency(winrt::Windows::Media::Capture::PowerlineFrequency& value) const { bool succeeded{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryGetPowerlineFrequency(reinterpret_cast(&value), &succeeded)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryGetPowerlineFrequency(reinterpret_cast(&value), &succeeded)); } return succeeded; } template auto consume_Windows_Media_Devices_IVideoDeviceControllerGetDevicePropertyResult::Status() const { winrt::Windows::Media::Devices::VideoDeviceControllerGetDevicePropertyStatus 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_Media_Devices_IVideoDeviceControllerGetDevicePropertyResult::Value() 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_Value(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(&value)); } return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoTemporalDenoisingControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IVideoTemporalDenoisingControl::SupportedModes() 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_SupportedModes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedModes(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IVideoTemporalDenoisingControl::Mode() const { winrt::Windows::Media::Devices::VideoTemporalDenoisingMode 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_Mode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IVideoTemporalDenoisingControl::Mode(winrt::Windows::Media::Devices::VideoTemporalDenoisingMode 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_Mode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Mode(static_cast(value))); } } template auto consume_Windows_Media_Devices_IWhiteBalanceControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IWhiteBalanceControl::Preset() const { winrt::Windows::Media::Devices::ColorTemperaturePreset 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_Preset(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Preset(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IWhiteBalanceControl::SetPresetAsync(winrt::Windows::Media::Devices::ColorTemperaturePreset const& preset) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetPresetAsync(static_cast(preset), &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetPresetAsync(static_cast(preset), &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IWhiteBalanceControl::Min() 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_Min(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Min(&value)); } return value; } template auto consume_Windows_Media_Devices_IWhiteBalanceControl::Max() 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_Max(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Max(&value)); } return value; } template auto consume_Windows_Media_Devices_IWhiteBalanceControl::Step() 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_Step(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Step(&value)); } return value; } template auto consume_Windows_Media_Devices_IWhiteBalanceControl::Value() 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_Value(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(&value)); } return value; } template auto consume_Windows_Media_Devices_IWhiteBalanceControl::SetValueAsync(uint32_t temperature) const { void* asyncInfo{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetValueAsync(temperature, &asyncInfo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetValueAsync(temperature, &asyncInfo)); } return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IZoomControl::Supported() 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_Supported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Supported(&value)); } return value; } template auto consume_Windows_Media_Devices_IZoomControl::Min() const { float 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_Min(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Min(&value)); } return value; } template auto consume_Windows_Media_Devices_IZoomControl::Max() const { float 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_Max(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Max(&value)); } return value; } template auto consume_Windows_Media_Devices_IZoomControl::Step() const { float 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_Step(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Step(&value)); } return value; } template auto consume_Windows_Media_Devices_IZoomControl::Value() const { float 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_Value(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(&value)); } return value; } template auto consume_Windows_Media_Devices_IZoomControl::Value(float 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_Value(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Value(value)); } } template auto consume_Windows_Media_Devices_IZoomControl2::SupportedModes() 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_SupportedModes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedModes(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Devices_IZoomControl2::Mode() const { winrt::Windows::Media::Devices::ZoomTransitionMode 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_Mode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IZoomControl2::Configure(winrt::Windows::Media::Devices::ZoomSettings const& settings) 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->Configure(*(void**)(&settings))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Configure(*(void**)(&settings))); } } template auto consume_Windows_Media_Devices_IZoomSettings::Mode() const { winrt::Windows::Media::Devices::ZoomTransitionMode 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_Mode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Mode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Devices_IZoomSettings::Mode(winrt::Windows::Media::Devices::ZoomTransitionMode 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_Mode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Mode(static_cast(value))); } } template auto consume_Windows_Media_Devices_IZoomSettings::Value() const { float 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_Value(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(&value)); } return value; } template auto consume_Windows_Media_Devices_IZoomSettings::Value(float 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_Value(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Value(value)); } } template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* sender) noexcept final try { (*this)(*reinterpret_cast(&sender)); return 0; } catch (...) { return to_hresult(); } }; template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* sender, void* e) noexcept final try { (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&e)); return 0; } catch (...) { return to_hresult(); } }; template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* sender, void* e) noexcept final try { (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&e)); return 0; } catch (...) { return to_hresult(); } }; template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* sender, void* e) noexcept final try { (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&e)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Mode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Mode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Mode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Mode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedModes(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedModes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Mode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Mode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Configure(void* settings) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Configure(*reinterpret_cast(&settings)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall SetDeviceProperty(void* propertyId, void* propertyValue) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetDeviceProperty(*reinterpret_cast(&propertyId), *reinterpret_cast(&propertyValue)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeviceProperty(void* propertyId, void** propertyValue) noexcept final try { clear_abi(propertyValue); typename D::abi_guard guard(this->shim()); *propertyValue = detach_from(this->shim().GetDeviceProperty(*reinterpret_cast(&propertyId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CameraOcclusionInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CameraOcclusionInfo()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryAcquireExclusiveControl(void* deviceId, int32_t mode, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().TryAcquireExclusiveControl(*reinterpret_cast(&deviceId), *reinterpret_cast(&mode))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_LowLagPhotoSequence(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LowLagPhotoSequence()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LowLagPhoto(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LowLagPhoto()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SceneModeControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SceneModeControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TorchControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TorchControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FlashControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FlashControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WhiteBalanceControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WhiteBalanceControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExposureControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExposureControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FocusControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FocusControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExposureCompensationControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExposureCompensationControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsoSpeedControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsoSpeedControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RegionsOfInterestControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RegionsOfInterestControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrimaryUse(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrimaryUse()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PrimaryUse(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PrimaryUse(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_VariablePhotoSequenceController(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VariablePhotoSequenceController()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PhotoConfirmationControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PhotoConfirmationControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ZoomControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ZoomControl()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ExposurePriorityVideoControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExposurePriorityVideoControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DesiredOptimization(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DesiredOptimization()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DesiredOptimization(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DesiredOptimization(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HdrVideoControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HdrVideoControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OpticalImageStabilizationControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OpticalImageStabilizationControl()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AdvancedPhotoControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AdvancedPhotoControl()); 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 GetDevicePropertyById(void* propertyId, void* maxPropertyValueSize, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDevicePropertyById(*reinterpret_cast(&propertyId), *reinterpret_cast const*>(&maxPropertyValueSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetDevicePropertyById(void* propertyId, void* propertyValue, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SetDevicePropertyById(*reinterpret_cast(&propertyId), *reinterpret_cast(&propertyValue))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDevicePropertyByExtendedId(uint32_t __extendedPropertyIdSize, uint8_t* extendedPropertyId, void* maxPropertyValueSize, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDevicePropertyByExtendedId(array_view(reinterpret_cast(extendedPropertyId), reinterpret_cast(extendedPropertyId) + __extendedPropertyIdSize), *reinterpret_cast const*>(&maxPropertyValueSize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetDevicePropertyByExtendedId(uint32_t __extendedPropertyIdSize, uint8_t* extendedPropertyId, uint32_t __propertyValueSize, uint8_t* propertyValue, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SetDevicePropertyByExtendedId(array_view(reinterpret_cast(extendedPropertyId), reinterpret_cast(extendedPropertyId) + __extendedPropertyIdSize), array_view(reinterpret_cast(propertyValue), reinterpret_cast(propertyValue) + __propertyValueSize))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_VideoTemporalDenoisingControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoTemporalDenoisingControl()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_InfraredTorchControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InfraredTorchControl()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PanelBasedOptimizationControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PanelBasedOptimizationControl()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DigitalWindowControl(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DigitalWindowControl()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_Muted(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Muted(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Muted(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Muted()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_VolumePercent(float value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().VolumePercent(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VolumePercent(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VolumePercent()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AudioCaptureEffectsManager(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AudioCaptureEffectsManager()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ClassId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClassId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DisplayName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InstanceId(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InstanceId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MajorVersion(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MajorVersion()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MinorVersion(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinorVersion()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SendCommandAsync(void* Command, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SendCommandAsync(*reinterpret_cast(&Command))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Module(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Module()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NotificationData(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NotificationData()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_ModuleNotificationReceived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ModuleNotificationReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ModuleNotificationReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ModuleNotificationReceived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall FindAllById(void* moduleId, void** modules) noexcept final try { clear_abi(modules); typename D::abi_guard guard(this->shim()); *modules = detach_from>(this->shim().FindAllById(*reinterpret_cast(&moduleId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAll(void** modules) noexcept final try { clear_abi(modules); typename D::abi_guard guard(this->shim()); *modules = detach_from>(this->shim().FindAll()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void* deviceId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast(&deviceId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IndicateNewIncomingCall(bool enableRinger, void* callerId, uint64_t* callToken) noexcept final try { typename D::abi_guard guard(this->shim()); *callToken = detach_from(this->shim().IndicateNewIncomingCall(enableRinger, *reinterpret_cast(&callerId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IndicateNewOutgoingCall(uint64_t* callToken) noexcept final try { typename D::abi_guard guard(this->shim()); *callToken = detach_from(this->shim().IndicateNewOutgoingCall()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IndicateActiveCall(uint64_t callToken) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IndicateActiveCall(callToken); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EndCall(uint64_t callToken) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EndCall(callToken); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HasRinger(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasRinger()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_AnswerRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AnswerRequested(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AnswerRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AnswerRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_HangUpRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().HangUpRequested(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_HangUpRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().HangUpRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_DialRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().DialRequested(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_DialRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().DialRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_RedialRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().RedialRequested(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_RedialRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().RedialRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_KeypadPressed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().KeypadPressed(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_KeypadPressed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().KeypadPressed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_AudioTransferRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AudioTransferRequested(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AudioTransferRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AudioTransferRequested(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDefault(void** callControl) noexcept final try { clear_abi(callControl); typename D::abi_guard guard(this->shim()); *callControl = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FromId(void* deviceId, void** callControl) noexcept final try { clear_abi(callControl); typename D::abi_guard guard(this->shim()); *callControl = detach_from(this->shim().FromId(*reinterpret_cast(&deviceId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetState(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsOcclusionKindSupported(int32_t occlusionKind, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsOcclusionKindSupported(*reinterpret_cast(&occlusionKind))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_StateChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().StateChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_StateChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().StateChanged(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsOccluded(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsOccluded()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsOcclusionKind(int32_t occlusionKind, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsOcclusionKind(*reinterpret_cast(&occlusionKind))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_State(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); return 0; } catch (...) { return to_hresult(); } }; #endif 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_Role(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Role()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Handled() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Contact(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Contact()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_NormalizedOriginTop(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NormalizedOriginTop()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_NormalizedOriginTop(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().NormalizedOriginTop(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NormalizedOriginLeft(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NormalizedOriginLeft()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_NormalizedOriginLeft(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().NormalizedOriginLeft(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Scale(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Scale()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Scale(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Scale(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Width(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Width()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Height(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Height()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MinScaleValue(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinScaleValue()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxScaleValue(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxScaleValue()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MinScaleValueWithoutUpsampling(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinScaleValueWithoutUpsampling()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NormalizedFieldOfViewLimit(winrt::Windows::Foundation::Rect* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NormalizedFieldOfViewLimit()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedModes(uint32_t* __valueSize, int32_t** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); std::tie(*__valueSize, *value) = detach_abi(this->shim().SupportedModes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetBounds(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetBounds()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Configure(int32_t digitalWindowMode) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Configure(*reinterpret_cast(&digitalWindowMode)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConfigureWithBounds(int32_t digitalWindowMode, void* digitalWindowBounds) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Configure(*reinterpret_cast(&digitalWindowMode), *reinterpret_cast(&digitalWindowBounds)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedCapabilities(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedCapabilities()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCapabilityForSize(int32_t width, int32_t height, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetCapabilityForSize(width, height)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Min(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Min()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Max(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Max()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Step(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Step()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetValueAsync(float value, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetValueAsync(value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Auto(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Auto()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetAutoAsync(bool value, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetAutoAsync(value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Min(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Min()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Max(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Max()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Step(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Step()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetValueAsync(int64_t shutterDuration, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetValueAsync(*reinterpret_cast(&shutterDuration))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Enabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Enabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Enabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Enabled(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PowerSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PowerSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RedEyeReductionSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RedEyeReductionSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Enabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Enabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Enabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Enabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Auto(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Auto()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Auto(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Auto(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RedEyeReduction(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RedEyeReduction()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RedEyeReduction(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RedEyeReduction(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PowerPercent(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PowerPercent()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PowerPercent(float value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PowerPercent(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AssistantLightSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AssistantLightSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AssistantLightEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AssistantLightEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AssistantLightEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AssistantLightEnabled(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedPresets(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedPresets()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Preset(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Preset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPresetAsync(int32_t preset, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetPresetAsync(*reinterpret_cast(&preset))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPresetWithCompletionOptionAsync(int32_t preset, bool completeBeforeFocus, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetPresetAsync(*reinterpret_cast(&preset), completeBeforeFocus)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Min(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Min()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Max(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Max()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Step(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Step()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetValueAsync(uint32_t focus, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetValueAsync(focus)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FocusAsync(void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().FocusAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FocusChangedSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FocusChangedSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WaitForFocusSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WaitForFocusSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedFocusModes(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedFocusModes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedFocusDistances(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedFocusDistances()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedFocusRanges(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedFocusRanges()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Mode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Mode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FocusState(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FocusState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UnlockAsync(void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().UnlockAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LockAsync(void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().LockAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Configure(void* settings) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Configure(*reinterpret_cast(&settings)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Mode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Mode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Mode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Mode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoFocusRange(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoFocusRange()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AutoFocusRange(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AutoFocusRange(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Value(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Value(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Distance(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Distance()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Distance(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Distance(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WaitForFocus(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WaitForFocus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_WaitForFocus(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().WaitForFocus(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DisableDriverFallback(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisableDriverFallback()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DisableDriverFallback(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DisableDriverFallback(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedModes(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedModes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Mode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Mode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Mode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Mode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedModes(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedModes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CurrentMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CurrentMode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MinPower(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinPower()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxPower(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxPower()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PowerStep(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PowerStep()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Power(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Power()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Power(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Power(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedPresets(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedPresets()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Preset(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Preset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPresetAsync(int32_t preset, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetPresetAsync(*reinterpret_cast(&preset))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Min(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Min()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Max(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Max()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Step(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Step()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetValueAsync(uint32_t isoSpeed, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetValueAsync(isoSpeed)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Auto(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Auto()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetAutoAsync(void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetAutoAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_TelephonyKey(int32_t* telephonyKey) noexcept final try { typename D::abi_guard guard(this->shim()); *telephonyKey = detach_from(this->shim().TelephonyKey()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetHighestConcurrentFrameRate(void* captureProperties, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetHighestConcurrentFrameRate(*reinterpret_cast(&captureProperties))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentFrameRate(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetCurrentFrameRate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ThumbnailEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ThumbnailEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ThumbnailEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ThumbnailEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ThumbnailFormat(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ThumbnailFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ThumbnailFormat(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ThumbnailFormat(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DesiredThumbnailSize(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DesiredThumbnailSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DesiredThumbnailSize(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DesiredThumbnailSize(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HardwareAcceleratedThumbnailSupported(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HardwareAcceleratedThumbnailSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxPastPhotos(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxPastPhotos()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxPhotosPerSecond(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxPhotosPerSecond()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PastPhotoLimit(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PastPhotoLimit()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PastPhotoLimit(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PastPhotoLimit(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PhotosPerSecondLimit(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PhotosPerSecondLimit()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PhotosPerSecondLimit(float value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PhotosPerSecondLimit(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetHighestConcurrentFrameRate(void* captureProperties, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetHighestConcurrentFrameRate(*reinterpret_cast(&captureProperties))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentFrameRate(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetCurrentFrameRate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ThumbnailEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ThumbnailEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ThumbnailEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ThumbnailEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ThumbnailFormat(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ThumbnailFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ThumbnailFormat(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ThumbnailFormat(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DesiredThumbnailSize(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DesiredThumbnailSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DesiredThumbnailSize(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DesiredThumbnailSize(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HardwareAcceleratedThumbnailSupported(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HardwareAcceleratedThumbnailSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Capabilities(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Capabilities()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryGetValue(double* value, bool* succeeded) noexcept final try { typename D::abi_guard guard(this->shim()); *succeeded = detach_from(this->shim().TryGetValue(*value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TrySetValue(double value, bool* succeeded) noexcept final try { typename D::abi_guard guard(this->shim()); *succeeded = detach_from(this->shim().TrySetValue(value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryGetAuto(bool* value, bool* succeeded) noexcept final try { typename D::abi_guard guard(this->shim()); *succeeded = detach_from(this->shim().TryGetAuto(*value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TrySetAuto(bool value, bool* succeeded) noexcept final try { typename D::abi_guard guard(this->shim()); *succeeded = detach_from(this->shim().TrySetAuto(value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Min(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Min()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Max(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Max()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Step(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Step()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Default(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Default()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoModeSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoModeSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall GetAvailableMediaStreamProperties(int32_t mediaStreamType, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetAvailableMediaStreamProperties(*reinterpret_cast(&mediaStreamType))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetMediaStreamProperties(int32_t mediaStreamType, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetMediaStreamProperties(*reinterpret_cast(&mediaStreamType))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetMediaStreamPropertiesAsync(int32_t mediaStreamType, void* mediaEncodingProperties, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetMediaStreamPropertiesAsync(*reinterpret_cast(&mediaStreamType), *reinterpret_cast(&mediaEncodingProperties))); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAudioCaptureSelector(void** selector) noexcept final try { clear_abi(selector); typename D::abi_guard guard(this->shim()); *selector = detach_from(this->shim().GetAudioCaptureSelector()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAudioRenderSelector(void** selector) noexcept final try { clear_abi(selector); typename D::abi_guard guard(this->shim()); *selector = detach_from(this->shim().GetAudioRenderSelector()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetVideoCaptureSelector(void** selector) noexcept final try { clear_abi(selector); typename D::abi_guard guard(this->shim()); *selector = detach_from(this->shim().GetVideoCaptureSelector()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDefaultAudioCaptureId(int32_t role, void** deviceId) noexcept final try { clear_abi(deviceId); typename D::abi_guard guard(this->shim()); *deviceId = detach_from(this->shim().GetDefaultAudioCaptureId(*reinterpret_cast(&role))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDefaultAudioRenderId(int32_t role, void** deviceId) noexcept final try { clear_abi(deviceId); typename D::abi_guard guard(this->shim()); *deviceId = detach_from(this->shim().GetDefaultAudioRenderId(*reinterpret_cast(&role))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_DefaultAudioCaptureDeviceChanged(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().DefaultAudioCaptureDeviceChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_DefaultAudioCaptureDeviceChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().DefaultAudioCaptureDeviceChanged(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_DefaultAudioRenderDeviceChanged(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().DefaultAudioRenderDeviceChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_DefaultAudioRenderDeviceChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().DefaultAudioRenderDeviceChanged(*reinterpret_cast(&cookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Result(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Result()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedModes(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedModes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Mode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Mode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Mode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Mode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSupported()); 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(); } int32_t __stdcall put_Panel(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Panel(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* pbSupported) noexcept final try { typename D::abi_guard guard(this->shim()); *pbSupported = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Enabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Enabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Enabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Enabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PixelFormat(int32_t* format) noexcept final try { typename D::abi_guard guard(this->shim()); *format = detach_from(this->shim().PixelFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PixelFormat(int32_t format) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PixelFormat(*reinterpret_cast(&format)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Handled() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AutoFocusEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoFocusEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AutoFocusEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AutoFocusEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoWhiteBalanceEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoWhiteBalanceEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AutoWhiteBalanceEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AutoWhiteBalanceEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoExposureEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoExposureEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AutoExposureEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AutoExposureEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Bounds(winrt::Windows::Foundation::Rect* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Bounds()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Bounds(winrt::Windows::Foundation::Rect value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Bounds(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Type(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Type()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Type(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Type(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BoundsNormalized(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BoundsNormalized()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_BoundsNormalized(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().BoundsNormalized(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Weight(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Weight()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Weight(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Weight(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MaxRegions(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxRegions()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetRegionsAsync(void* regions, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetRegionsAsync(*reinterpret_cast const*>(®ions))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetRegionsWithLockAsync(void* regions, bool lockValues, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetRegionsAsync(*reinterpret_cast const*>(®ions), lockValues)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ClearRegionsAsync(void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().ClearRegionsAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoFocusSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoFocusSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoWhiteBalanceSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoWhiteBalanceSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoExposureSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoExposureSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SupportedModes(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedModes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetValueAsync(int32_t sceneMode, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetValueAsync(*reinterpret_cast(&sceneMode))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PowerSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PowerSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Enabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Enabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Enabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Enabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PowerPercent(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PowerPercent()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PowerPercent(float value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PowerPercent(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Brightness(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Brightness()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Contrast(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Contrast()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Hue(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Hue()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WhiteBalance(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WhiteBalance()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BacklightCompensation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BacklightCompensation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Pan(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Pan()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Tilt(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Tilt()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Zoom(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Zoom()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Roll(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Roll()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Exposure(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Exposure()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Focus(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Focus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TrySetPowerlineFrequency(int32_t value, bool* succeeded) noexcept final try { typename D::abi_guard guard(this->shim()); *succeeded = detach_from(this->shim().TrySetPowerlineFrequency(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryGetPowerlineFrequency(int32_t* value, bool* succeeded) noexcept final try { typename D::abi_guard guard(this->shim()); *succeeded = detach_from(this->shim().TryGetPowerlineFrequency(*reinterpret_cast(value))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedModes(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedModes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Mode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Mode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Mode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Mode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Preset(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Preset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPresetAsync(int32_t preset, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetPresetAsync(*reinterpret_cast(&preset))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Min(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Min()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Max(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Max()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Step(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Step()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetValueAsync(uint32_t temperature, void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().SetValueAsync(temperature)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Min(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Min()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Max(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Max()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Step(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Step()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Value(float value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Value(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SupportedModes(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedModes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Mode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Mode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Configure(void* settings) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Configure(*reinterpret_cast(&settings)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Mode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Mode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Mode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Mode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Value(float value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Value(value); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Media::Devices { inline AdvancedPhotoCaptureSettings::AdvancedPhotoCaptureSettings() : AdvancedPhotoCaptureSettings(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline AudioDeviceModulesManager::AudioDeviceModulesManager(param::hstring const& deviceId) : AudioDeviceModulesManager(impl::call_factory([&](IAudioDeviceModulesManagerFactory const& f) { return f.Create(deviceId); })) { } inline auto CallControl::GetDefault() { return impl::call_factory_cast([](ICallControlStatics const& f) { return f.GetDefault(); }); } inline auto CallControl::FromId(param::hstring const& deviceId) { return impl::call_factory([&](ICallControlStatics const& f) { return f.FromId(deviceId); }); } inline DigitalWindowBounds::DigitalWindowBounds() : DigitalWindowBounds(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline FocusSettings::FocusSettings() : FocusSettings(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto MediaDevice::GetAudioCaptureSelector() { return impl::call_factory_cast([](IMediaDeviceStatics const& f) { return f.GetAudioCaptureSelector(); }); } inline auto MediaDevice::GetAudioRenderSelector() { return impl::call_factory_cast([](IMediaDeviceStatics const& f) { return f.GetAudioRenderSelector(); }); } inline auto MediaDevice::GetVideoCaptureSelector() { return impl::call_factory_cast([](IMediaDeviceStatics const& f) { return f.GetVideoCaptureSelector(); }); } inline auto MediaDevice::GetDefaultAudioCaptureId(winrt::Windows::Media::Devices::AudioDeviceRole const& role) { return impl::call_factory([&](IMediaDeviceStatics const& f) { return f.GetDefaultAudioCaptureId(role); }); } inline auto MediaDevice::GetDefaultAudioRenderId(winrt::Windows::Media::Devices::AudioDeviceRole const& role) { return impl::call_factory([&](IMediaDeviceStatics const& f) { return f.GetDefaultAudioRenderId(role); }); } inline auto MediaDevice::DefaultAudioCaptureDeviceChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) { return impl::call_factory([&](IMediaDeviceStatics const& f) { return f.DefaultAudioCaptureDeviceChanged(handler); }); } inline auto MediaDevice::DefaultAudioCaptureDeviceChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) { auto f = get_activation_factory(); return MediaDevice::DefaultAudioCaptureDeviceChanged_revoker{ f, f.DefaultAudioCaptureDeviceChanged(handler) }; } inline auto MediaDevice::DefaultAudioCaptureDeviceChanged(winrt::event_token const& cookie) { impl::call_factory([&](IMediaDeviceStatics const& f) { return f.DefaultAudioCaptureDeviceChanged(cookie); }); } inline auto MediaDevice::DefaultAudioRenderDeviceChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) { return impl::call_factory([&](IMediaDeviceStatics const& f) { return f.DefaultAudioRenderDeviceChanged(handler); }); } inline auto MediaDevice::DefaultAudioRenderDeviceChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) { auto f = get_activation_factory(); return MediaDevice::DefaultAudioRenderDeviceChanged_revoker{ f, f.DefaultAudioRenderDeviceChanged(handler) }; } inline auto MediaDevice::DefaultAudioRenderDeviceChanged(winrt::event_token const& cookie) { impl::call_factory([&](IMediaDeviceStatics const& f) { return f.DefaultAudioRenderDeviceChanged(cookie); }); } inline RegionOfInterest::RegionOfInterest() : RegionOfInterest(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline ZoomSettings::ZoomSettings() : ZoomSettings(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } template CallControlEventHandler::CallControlEventHandler(L handler) : CallControlEventHandler(impl::make_delegate(std::forward(handler))) { } template CallControlEventHandler::CallControlEventHandler(F* handler) : CallControlEventHandler([=](auto&&... args) { return handler(args...); }) { } template CallControlEventHandler::CallControlEventHandler(O* object, M method) : CallControlEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template CallControlEventHandler::CallControlEventHandler(com_ptr&& object, M method) : CallControlEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template CallControlEventHandler::CallControlEventHandler(weak_ref&& object, LM&& lambda_or_method) : CallControlEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template CallControlEventHandler::CallControlEventHandler(std::shared_ptr&& object, M method) : CallControlEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template CallControlEventHandler::CallControlEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : CallControlEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto CallControlEventHandler::operator()(winrt::Windows::Media::Devices::CallControl const& sender) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&sender))); } template DialRequestedEventHandler::DialRequestedEventHandler(L handler) : DialRequestedEventHandler(impl::make_delegate(std::forward(handler))) { } template DialRequestedEventHandler::DialRequestedEventHandler(F* handler) : DialRequestedEventHandler([=](auto&&... args) { return handler(args...); }) { } template DialRequestedEventHandler::DialRequestedEventHandler(O* object, M method) : DialRequestedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template DialRequestedEventHandler::DialRequestedEventHandler(com_ptr&& object, M method) : DialRequestedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template DialRequestedEventHandler::DialRequestedEventHandler(weak_ref&& object, LM&& lambda_or_method) : DialRequestedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template DialRequestedEventHandler::DialRequestedEventHandler(std::shared_ptr&& object, M method) : DialRequestedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template DialRequestedEventHandler::DialRequestedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : DialRequestedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto DialRequestedEventHandler::operator()(winrt::Windows::Media::Devices::CallControl const& sender, winrt::Windows::Media::Devices::DialRequestedEventArgs const& e) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&sender), *(void**)(&e))); } template KeypadPressedEventHandler::KeypadPressedEventHandler(L handler) : KeypadPressedEventHandler(impl::make_delegate(std::forward(handler))) { } template KeypadPressedEventHandler::KeypadPressedEventHandler(F* handler) : KeypadPressedEventHandler([=](auto&&... args) { return handler(args...); }) { } template KeypadPressedEventHandler::KeypadPressedEventHandler(O* object, M method) : KeypadPressedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template KeypadPressedEventHandler::KeypadPressedEventHandler(com_ptr&& object, M method) : KeypadPressedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template KeypadPressedEventHandler::KeypadPressedEventHandler(weak_ref&& object, LM&& lambda_or_method) : KeypadPressedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template KeypadPressedEventHandler::KeypadPressedEventHandler(std::shared_ptr&& object, M method) : KeypadPressedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template KeypadPressedEventHandler::KeypadPressedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : KeypadPressedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto KeypadPressedEventHandler::operator()(winrt::Windows::Media::Devices::CallControl const& sender, winrt::Windows::Media::Devices::KeypadPressedEventArgs const& e) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&sender), *(void**)(&e))); } template RedialRequestedEventHandler::RedialRequestedEventHandler(L handler) : RedialRequestedEventHandler(impl::make_delegate(std::forward(handler))) { } template RedialRequestedEventHandler::RedialRequestedEventHandler(F* handler) : RedialRequestedEventHandler([=](auto&&... args) { return handler(args...); }) { } template RedialRequestedEventHandler::RedialRequestedEventHandler(O* object, M method) : RedialRequestedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template RedialRequestedEventHandler::RedialRequestedEventHandler(com_ptr&& object, M method) : RedialRequestedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template RedialRequestedEventHandler::RedialRequestedEventHandler(weak_ref&& object, LM&& lambda_or_method) : RedialRequestedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template RedialRequestedEventHandler::RedialRequestedEventHandler(std::shared_ptr&& object, M method) : RedialRequestedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template RedialRequestedEventHandler::RedialRequestedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : RedialRequestedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto RedialRequestedEventHandler::operator()(winrt::Windows::Media::Devices::CallControl const& sender, winrt::Windows::Media::Devices::RedialRequestedEventArgs const& e) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&sender), *(void**)(&e))); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif