// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Media_H #define WINRT_Windows_Media_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/impl/Windows.ApplicationModel.AppService.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Graphics.DirectX.2.h" #include "winrt/impl/Windows.Graphics.DirectX.Direct3D11.2.h" #include "winrt/impl/Windows.Graphics.Imaging.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.Media.2.h" namespace winrt::impl { template auto consume_Windows_Media_IAudioBuffer::Capacity() 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_Capacity(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Capacity(&value)); } return value; } template auto consume_Windows_Media_IAudioBuffer::Length() 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_Length(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Length(&value)); } return value; } template auto consume_Windows_Media_IAudioBuffer::Length(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_Length(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Length(value)); } } template auto consume_Windows_Media_IAudioFrame::LockBuffer(winrt::Windows::Media::AudioBufferAccessMode const& mode) 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->LockBuffer(static_cast(mode), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LockBuffer(static_cast(mode), &value)); } return winrt::Windows::Media::AudioBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IAudioFrameFactory::Create(uint32_t capacity) 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->Create(capacity, &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(capacity, &value)); } return winrt::Windows::Media::AudioFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IAutoRepeatModeChangeRequestedEventArgs::RequestedAutoRepeatMode() const { winrt::Windows::Media::MediaPlaybackAutoRepeatMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_RequestedAutoRepeatMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RequestedAutoRepeatMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_IImageDisplayProperties::Title() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Title(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Title(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IImageDisplayProperties::Title(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } } template auto consume_Windows_Media_IImageDisplayProperties::Subtitle() 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_Subtitle(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Subtitle(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IImageDisplayProperties::Subtitle(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Subtitle(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Subtitle(*(void**)(&value))); } } template auto consume_Windows_Media_IMediaControl::SoundLevelChanged(winrt::Windows::Foundation::EventHandler 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_SoundLevelChanged(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_SoundLevelChanged(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_IMediaControl::SoundLevelChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, SoundLevelChanged(handler)); } template auto consume_Windows_Media_IMediaControl::SoundLevelChanged(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_SoundLevelChanged(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_SoundLevelChanged(impl::bind_in(cookie)); } } template auto consume_Windows_Media_IMediaControl::PlayPressed(winrt::Windows::Foundation::EventHandler 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_PlayPressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PlayPressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_IMediaControl::PlayPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, PlayPressed(handler)); } template auto consume_Windows_Media_IMediaControl::PlayPressed(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_PlayPressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PlayPressed(impl::bind_in(cookie)); } } template auto consume_Windows_Media_IMediaControl::PausePressed(winrt::Windows::Foundation::EventHandler 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_PausePressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PausePressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_IMediaControl::PausePressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, PausePressed(handler)); } template auto consume_Windows_Media_IMediaControl::PausePressed(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_PausePressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PausePressed(impl::bind_in(cookie)); } } template auto consume_Windows_Media_IMediaControl::StopPressed(winrt::Windows::Foundation::EventHandler 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_StopPressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_StopPressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_IMediaControl::StopPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, StopPressed(handler)); } template auto consume_Windows_Media_IMediaControl::StopPressed(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_StopPressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_StopPressed(impl::bind_in(cookie)); } } template auto consume_Windows_Media_IMediaControl::PlayPauseTogglePressed(winrt::Windows::Foundation::EventHandler 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_PlayPauseTogglePressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PlayPauseTogglePressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_IMediaControl::PlayPauseTogglePressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, PlayPauseTogglePressed(handler)); } template auto consume_Windows_Media_IMediaControl::PlayPauseTogglePressed(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_PlayPauseTogglePressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PlayPauseTogglePressed(impl::bind_in(cookie)); } } template auto consume_Windows_Media_IMediaControl::RecordPressed(winrt::Windows::Foundation::EventHandler 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_RecordPressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_RecordPressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_IMediaControl::RecordPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, RecordPressed(handler)); } template auto consume_Windows_Media_IMediaControl::RecordPressed(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_RecordPressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_RecordPressed(impl::bind_in(cookie)); } } template auto consume_Windows_Media_IMediaControl::NextTrackPressed(winrt::Windows::Foundation::EventHandler 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_NextTrackPressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_NextTrackPressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_IMediaControl::NextTrackPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, NextTrackPressed(handler)); } template auto consume_Windows_Media_IMediaControl::NextTrackPressed(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_NextTrackPressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_NextTrackPressed(impl::bind_in(cookie)); } } template auto consume_Windows_Media_IMediaControl::PreviousTrackPressed(winrt::Windows::Foundation::EventHandler 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_PreviousTrackPressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PreviousTrackPressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_IMediaControl::PreviousTrackPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, PreviousTrackPressed(handler)); } template auto consume_Windows_Media_IMediaControl::PreviousTrackPressed(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_PreviousTrackPressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PreviousTrackPressed(impl::bind_in(cookie)); } } template auto consume_Windows_Media_IMediaControl::FastForwardPressed(winrt::Windows::Foundation::EventHandler 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_FastForwardPressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_FastForwardPressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_IMediaControl::FastForwardPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, FastForwardPressed(handler)); } template auto consume_Windows_Media_IMediaControl::FastForwardPressed(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_FastForwardPressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_FastForwardPressed(impl::bind_in(cookie)); } } template auto consume_Windows_Media_IMediaControl::RewindPressed(winrt::Windows::Foundation::EventHandler 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_RewindPressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_RewindPressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_IMediaControl::RewindPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, RewindPressed(handler)); } template auto consume_Windows_Media_IMediaControl::RewindPressed(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_RewindPressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_RewindPressed(impl::bind_in(cookie)); } } template auto consume_Windows_Media_IMediaControl::ChannelUpPressed(winrt::Windows::Foundation::EventHandler 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_ChannelUpPressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ChannelUpPressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_IMediaControl::ChannelUpPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, ChannelUpPressed(handler)); } template auto consume_Windows_Media_IMediaControl::ChannelUpPressed(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_ChannelUpPressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ChannelUpPressed(impl::bind_in(cookie)); } } template auto consume_Windows_Media_IMediaControl::ChannelDownPressed(winrt::Windows::Foundation::EventHandler 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_ChannelDownPressed(*(void**)(&handler), put_abi(cookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ChannelDownPressed(*(void**)(&handler), put_abi(cookie))); } return cookie; } template auto consume_Windows_Media_IMediaControl::ChannelDownPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, ChannelDownPressed(handler)); } template auto consume_Windows_Media_IMediaControl::ChannelDownPressed(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_ChannelDownPressed(impl::bind_in(cookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ChannelDownPressed(impl::bind_in(cookie)); } } template auto consume_Windows_Media_IMediaControl::SoundLevel() const { winrt::Windows::Media::SoundLevel value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SoundLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SoundLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_IMediaControl::TrackName(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_TrackName(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_TrackName(*(void**)(&value))); } } template auto consume_Windows_Media_IMediaControl::TrackName() 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_TrackName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TrackName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaControl::ArtistName(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ArtistName(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ArtistName(*(void**)(&value))); } } template auto consume_Windows_Media_IMediaControl::ArtistName() 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_ArtistName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ArtistName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaControl::IsPlaying(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_IsPlaying(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsPlaying(value)); } } template auto consume_Windows_Media_IMediaControl::IsPlaying() 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_IsPlaying(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsPlaying(&value)); } return value; } template auto consume_Windows_Media_IMediaControl::AlbumArt(winrt::Windows::Foundation::Uri const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AlbumArt(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AlbumArt(*(void**)(&value))); } } template auto consume_Windows_Media_IMediaControl::AlbumArt() 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_AlbumArt(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AlbumArt(&value)); } return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaExtension::SetProperties(winrt::Windows::Foundation::Collections::IPropertySet const& configuration) 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->SetProperties(*(void**)(&configuration))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetProperties(*(void**)(&configuration))); } } template auto consume_Windows_Media_IMediaExtensionManager::RegisterSchemeHandler(param::hstring const& activatableClassId, param::hstring const& scheme) 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->RegisterSchemeHandler(*(void**)(&activatableClassId), *(void**)(&scheme))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterSchemeHandler(*(void**)(&activatableClassId), *(void**)(&scheme))); } } template auto consume_Windows_Media_IMediaExtensionManager::RegisterSchemeHandler(param::hstring const& activatableClassId, param::hstring const& scheme, winrt::Windows::Foundation::Collections::IPropertySet const& configuration) 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->RegisterSchemeHandlerWithSettings(*(void**)(&activatableClassId), *(void**)(&scheme), *(void**)(&configuration))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterSchemeHandlerWithSettings(*(void**)(&activatableClassId), *(void**)(&scheme), *(void**)(&configuration))); } } template auto consume_Windows_Media_IMediaExtensionManager::RegisterByteStreamHandler(param::hstring const& activatableClassId, param::hstring const& fileExtension, param::hstring const& mimeType) 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->RegisterByteStreamHandler(*(void**)(&activatableClassId), *(void**)(&fileExtension), *(void**)(&mimeType))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterByteStreamHandler(*(void**)(&activatableClassId), *(void**)(&fileExtension), *(void**)(&mimeType))); } } template auto consume_Windows_Media_IMediaExtensionManager::RegisterByteStreamHandler(param::hstring const& activatableClassId, param::hstring const& fileExtension, param::hstring const& mimeType, winrt::Windows::Foundation::Collections::IPropertySet const& configuration) 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->RegisterByteStreamHandlerWithSettings(*(void**)(&activatableClassId), *(void**)(&fileExtension), *(void**)(&mimeType), *(void**)(&configuration))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterByteStreamHandlerWithSettings(*(void**)(&activatableClassId), *(void**)(&fileExtension), *(void**)(&mimeType), *(void**)(&configuration))); } } template auto consume_Windows_Media_IMediaExtensionManager::RegisterAudioDecoder(param::hstring const& activatableClassId, winrt::guid const& inputSubtype, winrt::guid const& outputSubtype) 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->RegisterAudioDecoder(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterAudioDecoder(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype))); } } template auto consume_Windows_Media_IMediaExtensionManager::RegisterAudioDecoder(param::hstring const& activatableClassId, winrt::guid const& inputSubtype, winrt::guid const& outputSubtype, winrt::Windows::Foundation::Collections::IPropertySet const& configuration) 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->RegisterAudioDecoderWithSettings(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype), *(void**)(&configuration))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterAudioDecoderWithSettings(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype), *(void**)(&configuration))); } } template auto consume_Windows_Media_IMediaExtensionManager::RegisterAudioEncoder(param::hstring const& activatableClassId, winrt::guid const& inputSubtype, winrt::guid const& outputSubtype) 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->RegisterAudioEncoder(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterAudioEncoder(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype))); } } template auto consume_Windows_Media_IMediaExtensionManager::RegisterAudioEncoder(param::hstring const& activatableClassId, winrt::guid const& inputSubtype, winrt::guid const& outputSubtype, winrt::Windows::Foundation::Collections::IPropertySet const& configuration) 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->RegisterAudioEncoderWithSettings(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype), *(void**)(&configuration))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterAudioEncoderWithSettings(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype), *(void**)(&configuration))); } } template auto consume_Windows_Media_IMediaExtensionManager::RegisterVideoDecoder(param::hstring const& activatableClassId, winrt::guid const& inputSubtype, winrt::guid const& outputSubtype) 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->RegisterVideoDecoder(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterVideoDecoder(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype))); } } template auto consume_Windows_Media_IMediaExtensionManager::RegisterVideoDecoder(param::hstring const& activatableClassId, winrt::guid const& inputSubtype, winrt::guid const& outputSubtype, winrt::Windows::Foundation::Collections::IPropertySet const& configuration) 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->RegisterVideoDecoderWithSettings(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype), *(void**)(&configuration))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterVideoDecoderWithSettings(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype), *(void**)(&configuration))); } } template auto consume_Windows_Media_IMediaExtensionManager::RegisterVideoEncoder(param::hstring const& activatableClassId, winrt::guid const& inputSubtype, winrt::guid const& outputSubtype) 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->RegisterVideoEncoder(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterVideoEncoder(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype))); } } template auto consume_Windows_Media_IMediaExtensionManager::RegisterVideoEncoder(param::hstring const& activatableClassId, winrt::guid const& inputSubtype, winrt::guid const& outputSubtype, winrt::Windows::Foundation::Collections::IPropertySet const& configuration) 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->RegisterVideoEncoderWithSettings(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype), *(void**)(&configuration))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterVideoEncoderWithSettings(*(void**)(&activatableClassId), impl::bind_in(inputSubtype), impl::bind_in(outputSubtype), *(void**)(&configuration))); } } template auto consume_Windows_Media_IMediaExtensionManager2::RegisterMediaExtensionForAppService(winrt::Windows::Media::IMediaExtension const& extension, winrt::Windows::ApplicationModel::AppService::AppServiceConnection const& connection) 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->RegisterMediaExtensionForAppService(*(void**)(&extension), *(void**)(&connection))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RegisterMediaExtensionForAppService(*(void**)(&extension), *(void**)(&connection))); } } template auto consume_Windows_Media_IMediaFrame::Type() 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_Type(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Type(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaFrame::IsReadOnly() 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_IsReadOnly(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsReadOnly(&value)); } return value; } template auto consume_Windows_Media_IMediaFrame::RelativeTime(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_RelativeTime(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_RelativeTime(*(void**)(&value))); } } template auto consume_Windows_Media_IMediaFrame::RelativeTime() 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_RelativeTime(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RelativeTime(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaFrame::SystemRelativeTime(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_SystemRelativeTime(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SystemRelativeTime(*(void**)(&value))); } } template auto consume_Windows_Media_IMediaFrame::SystemRelativeTime() 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_SystemRelativeTime(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SystemRelativeTime(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaFrame::Duration(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_Duration(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Duration(*(void**)(&value))); } } template auto consume_Windows_Media_IMediaFrame::Duration() 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_Duration(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Duration(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaFrame::IsDiscontinuous(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_IsDiscontinuous(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsDiscontinuous(value)); } } template auto consume_Windows_Media_IMediaFrame::IsDiscontinuous() 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_IsDiscontinuous(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsDiscontinuous(&value)); } return value; } template auto consume_Windows_Media_IMediaFrame::ExtendedProperties() 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_ExtendedProperties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendedProperties(&value)); } return winrt::Windows::Foundation::Collections::IPropertySet{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaMarker::Time() 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_Time(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Time(put_abi(value))); } return value; } template auto consume_Windows_Media_IMediaMarker::MediaMarkerType() 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_MediaMarkerType(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaMarkerType(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaMarker::Text() 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_Text(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Text(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaMarkerTypesStatics::Bookmark() 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_Bookmark(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Bookmark(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaMarkers::Markers() 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_Markers(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Markers(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaProcessingTriggerDetails::Arguments() 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_Arguments(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Arguments(&value)); } return winrt::Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaTimelineController::Start() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Start()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Start()); } } template auto consume_Windows_Media_IMediaTimelineController::Resume() 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->Resume()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Resume()); } } template auto consume_Windows_Media_IMediaTimelineController::Pause() 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->Pause()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Pause()); } } template auto consume_Windows_Media_IMediaTimelineController::Position() 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_Position(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Position(put_abi(value))); } return value; } template auto consume_Windows_Media_IMediaTimelineController::Position(winrt::Windows::Foundation::TimeSpan const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Position(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Position(impl::bind_in(value))); } } template auto consume_Windows_Media_IMediaTimelineController::ClockRate() 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_ClockRate(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ClockRate(&value)); } return value; } template auto consume_Windows_Media_IMediaTimelineController::ClockRate(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_ClockRate(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ClockRate(value)); } } template auto consume_Windows_Media_IMediaTimelineController::State() const { winrt::Windows::Media::MediaTimelineControllerState value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_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(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_State(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_IMediaTimelineController::PositionChanged(winrt::Windows::Foundation::TypedEventHandler const& positionChangedEventHandler) const { winrt::event_token eventCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_PositionChanged(*(void**)(&positionChangedEventHandler), put_abi(eventCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PositionChanged(*(void**)(&positionChangedEventHandler), put_abi(eventCookie))); } return eventCookie; } template auto consume_Windows_Media_IMediaTimelineController::PositionChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& positionChangedEventHandler) const { return impl::make_event_revoker(this, PositionChanged(positionChangedEventHandler)); } template auto consume_Windows_Media_IMediaTimelineController::PositionChanged(winrt::event_token const& eventCookie) 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_PositionChanged(impl::bind_in(eventCookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PositionChanged(impl::bind_in(eventCookie)); } } template auto consume_Windows_Media_IMediaTimelineController::StateChanged(winrt::Windows::Foundation::TypedEventHandler const& stateChangedEventHandler) const { winrt::event_token eventCookie{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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**)(&stateChangedEventHandler), put_abi(eventCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_StateChanged(*(void**)(&stateChangedEventHandler), put_abi(eventCookie))); } return eventCookie; } template auto consume_Windows_Media_IMediaTimelineController::StateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& stateChangedEventHandler) const { return impl::make_event_revoker(this, StateChanged(stateChangedEventHandler)); } template auto consume_Windows_Media_IMediaTimelineController::StateChanged(winrt::event_token const& eventCookie) 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(eventCookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_StateChanged(impl::bind_in(eventCookie)); } } template auto consume_Windows_Media_IMediaTimelineController2::Duration() 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_Duration(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Duration(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMediaTimelineController2::Duration(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_Duration(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Duration(*(void**)(&value))); } } template auto consume_Windows_Media_IMediaTimelineController2::IsLoopingEnabled() 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_IsLoopingEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsLoopingEnabled(&value)); } return value; } template auto consume_Windows_Media_IMediaTimelineController2::IsLoopingEnabled(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_IsLoopingEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsLoopingEnabled(value)); } } template auto consume_Windows_Media_IMediaTimelineController2::Failed(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) 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_Failed(*(void**)(&eventHandler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Failed(*(void**)(&eventHandler), put_abi(token))); } return token; } template auto consume_Windows_Media_IMediaTimelineController2::Failed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, Failed(eventHandler)); } template auto consume_Windows_Media_IMediaTimelineController2::Failed(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_Failed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Failed(impl::bind_in(token)); } } template auto consume_Windows_Media_IMediaTimelineController2::Ended(winrt::Windows::Foundation::TypedEventHandler const& eventHandler) 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_Ended(*(void**)(&eventHandler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Ended(*(void**)(&eventHandler), put_abi(token))); } return token; } template auto consume_Windows_Media_IMediaTimelineController2::Ended(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& eventHandler) const { return impl::make_event_revoker(this, Ended(eventHandler)); } template auto consume_Windows_Media_IMediaTimelineController2::Ended(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_Ended(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Ended(impl::bind_in(token)); } } template auto consume_Windows_Media_IMediaTimelineControllerFailedEventArgs::ExtendedError() const { winrt::hresult value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } return value; } template auto consume_Windows_Media_IMusicDisplayProperties::Title() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Title(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Title(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMusicDisplayProperties::Title(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } } template auto consume_Windows_Media_IMusicDisplayProperties::AlbumArtist() 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_AlbumArtist(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AlbumArtist(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMusicDisplayProperties::AlbumArtist(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AlbumArtist(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AlbumArtist(*(void**)(&value))); } } template auto consume_Windows_Media_IMusicDisplayProperties::Artist() 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_Artist(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Artist(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMusicDisplayProperties::Artist(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Artist(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Artist(*(void**)(&value))); } } template auto consume_Windows_Media_IMusicDisplayProperties2::AlbumTitle() 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_AlbumTitle(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AlbumTitle(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMusicDisplayProperties2::AlbumTitle(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AlbumTitle(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AlbumTitle(*(void**)(&value))); } } template auto consume_Windows_Media_IMusicDisplayProperties2::TrackNumber() 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_TrackNumber(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TrackNumber(&value)); } return value; } template auto consume_Windows_Media_IMusicDisplayProperties2::TrackNumber(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_TrackNumber(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_TrackNumber(value)); } } template auto consume_Windows_Media_IMusicDisplayProperties2::Genres() 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_Genres(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Genres(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IMusicDisplayProperties3::AlbumTrackCount() 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_AlbumTrackCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AlbumTrackCount(&value)); } return value; } template auto consume_Windows_Media_IMusicDisplayProperties3::AlbumTrackCount(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_AlbumTrackCount(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AlbumTrackCount(value)); } } template auto consume_Windows_Media_IPlaybackPositionChangeRequestedEventArgs::RequestedPlaybackPosition() 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_RequestedPlaybackPosition(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RequestedPlaybackPosition(put_abi(value))); } return value; } template auto consume_Windows_Media_IPlaybackRateChangeRequestedEventArgs::RequestedPlaybackRate() 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_RequestedPlaybackRate(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RequestedPlaybackRate(&value)); } return value; } template auto consume_Windows_Media_IShuffleEnabledChangeRequestedEventArgs::RequestedShuffleEnabled() 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_RequestedShuffleEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RequestedShuffleEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::PlaybackStatus() const { winrt::Windows::Media::MediaPlaybackStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlaybackStatus(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackStatus(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::PlaybackStatus(winrt::Windows::Media::MediaPlaybackStatus 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_PlaybackStatus(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PlaybackStatus(static_cast(value))); } } template auto consume_Windows_Media_ISystemMediaTransportControls::DisplayUpdater() 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_DisplayUpdater(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayUpdater(&value)); } return winrt::Windows::Media::SystemMediaTransportControlsDisplayUpdater{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_ISystemMediaTransportControls::SoundLevel() const { winrt::Windows::Media::SoundLevel value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SoundLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SoundLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::IsEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::IsEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsEnabled(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls::IsPlayEnabled() 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_IsPlayEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsPlayEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::IsPlayEnabled(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_IsPlayEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsPlayEnabled(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls::IsStopEnabled() 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_IsStopEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsStopEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::IsStopEnabled(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_IsStopEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsStopEnabled(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls::IsPauseEnabled() 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_IsPauseEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsPauseEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::IsPauseEnabled(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_IsPauseEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsPauseEnabled(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls::IsRecordEnabled() 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_IsRecordEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsRecordEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::IsRecordEnabled(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_IsRecordEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsRecordEnabled(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls::IsFastForwardEnabled() 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_IsFastForwardEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsFastForwardEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::IsFastForwardEnabled(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_IsFastForwardEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsFastForwardEnabled(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls::IsRewindEnabled() 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_IsRewindEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsRewindEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::IsRewindEnabled(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_IsRewindEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsRewindEnabled(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls::IsPreviousEnabled() 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_IsPreviousEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsPreviousEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::IsPreviousEnabled(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_IsPreviousEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsPreviousEnabled(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls::IsNextEnabled() 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_IsNextEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsNextEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::IsNextEnabled(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_IsNextEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsNextEnabled(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls::IsChannelUpEnabled() 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_IsChannelUpEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsChannelUpEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::IsChannelUpEnabled(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_IsChannelUpEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsChannelUpEnabled(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls::IsChannelDownEnabled() 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_IsChannelDownEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsChannelDownEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls::IsChannelDownEnabled(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_IsChannelDownEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsChannelDownEnabled(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls::ButtonPressed(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_ButtonPressed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ButtonPressed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_ISystemMediaTransportControls::ButtonPressed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ButtonPressed(handler)); } template auto consume_Windows_Media_ISystemMediaTransportControls::ButtonPressed(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_ButtonPressed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ButtonPressed(impl::bind_in(token)); } } template auto consume_Windows_Media_ISystemMediaTransportControls::PropertyChanged(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_PropertyChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PropertyChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_ISystemMediaTransportControls::PropertyChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PropertyChanged(handler)); } template auto consume_Windows_Media_ISystemMediaTransportControls::PropertyChanged(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_PropertyChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PropertyChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_ISystemMediaTransportControls2::AutoRepeatMode() const { winrt::Windows::Media::MediaPlaybackAutoRepeatMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AutoRepeatMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoRepeatMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls2::AutoRepeatMode(winrt::Windows::Media::MediaPlaybackAutoRepeatMode 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_AutoRepeatMode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AutoRepeatMode(static_cast(value))); } } template auto consume_Windows_Media_ISystemMediaTransportControls2::ShuffleEnabled() 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_ShuffleEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ShuffleEnabled(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls2::ShuffleEnabled(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_ShuffleEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ShuffleEnabled(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls2::PlaybackRate() 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_PlaybackRate(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackRate(&value)); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControls2::PlaybackRate(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_PlaybackRate(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PlaybackRate(value)); } } template auto consume_Windows_Media_ISystemMediaTransportControls2::UpdateTimelineProperties(winrt::Windows::Media::SystemMediaTransportControlsTimelineProperties const& timelineProperties) 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->UpdateTimelineProperties(*(void**)(&timelineProperties))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UpdateTimelineProperties(*(void**)(&timelineProperties))); } } template auto consume_Windows_Media_ISystemMediaTransportControls2::PlaybackPositionChangeRequested(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_PlaybackPositionChangeRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PlaybackPositionChangeRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_ISystemMediaTransportControls2::PlaybackPositionChangeRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PlaybackPositionChangeRequested(handler)); } template auto consume_Windows_Media_ISystemMediaTransportControls2::PlaybackPositionChangeRequested(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_PlaybackPositionChangeRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PlaybackPositionChangeRequested(impl::bind_in(token)); } } template auto consume_Windows_Media_ISystemMediaTransportControls2::PlaybackRateChangeRequested(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_PlaybackRateChangeRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PlaybackRateChangeRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_ISystemMediaTransportControls2::PlaybackRateChangeRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PlaybackRateChangeRequested(handler)); } template auto consume_Windows_Media_ISystemMediaTransportControls2::PlaybackRateChangeRequested(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_PlaybackRateChangeRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PlaybackRateChangeRequested(impl::bind_in(token)); } } template auto consume_Windows_Media_ISystemMediaTransportControls2::ShuffleEnabledChangeRequested(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_ShuffleEnabledChangeRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ShuffleEnabledChangeRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_ISystemMediaTransportControls2::ShuffleEnabledChangeRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ShuffleEnabledChangeRequested(handler)); } template auto consume_Windows_Media_ISystemMediaTransportControls2::ShuffleEnabledChangeRequested(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_ShuffleEnabledChangeRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ShuffleEnabledChangeRequested(impl::bind_in(token)); } } template auto consume_Windows_Media_ISystemMediaTransportControls2::AutoRepeatModeChangeRequested(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_AutoRepeatModeChangeRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AutoRepeatModeChangeRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_ISystemMediaTransportControls2::AutoRepeatModeChangeRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, AutoRepeatModeChangeRequested(handler)); } template auto consume_Windows_Media_ISystemMediaTransportControls2::AutoRepeatModeChangeRequested(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_AutoRepeatModeChangeRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AutoRepeatModeChangeRequested(impl::bind_in(token)); } } template auto consume_Windows_Media_ISystemMediaTransportControlsButtonPressedEventArgs::Button() const { winrt::Windows::Media::SystemMediaTransportControlsButton value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Button(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Button(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControlsDisplayUpdater::Type() const { winrt::Windows::Media::MediaPlaybackType value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_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_ISystemMediaTransportControlsDisplayUpdater::Type(winrt::Windows::Media::MediaPlaybackType 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_ISystemMediaTransportControlsDisplayUpdater::AppMediaId() 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_AppMediaId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppMediaId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_ISystemMediaTransportControlsDisplayUpdater::AppMediaId(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AppMediaId(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AppMediaId(*(void**)(&value))); } } template auto consume_Windows_Media_ISystemMediaTransportControlsDisplayUpdater::Thumbnail() 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_Thumbnail(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Thumbnail(&value)); } return winrt::Windows::Storage::Streams::RandomAccessStreamReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_ISystemMediaTransportControlsDisplayUpdater::Thumbnail(winrt::Windows::Storage::Streams::RandomAccessStreamReference 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_Thumbnail(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Thumbnail(*(void**)(&value))); } } template auto consume_Windows_Media_ISystemMediaTransportControlsDisplayUpdater::MusicProperties() 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_MusicProperties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MusicProperties(&value)); } return winrt::Windows::Media::MusicDisplayProperties{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_ISystemMediaTransportControlsDisplayUpdater::VideoProperties() 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_VideoProperties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideoProperties(&value)); } return winrt::Windows::Media::VideoDisplayProperties{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_ISystemMediaTransportControlsDisplayUpdater::ImageProperties() 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_ImageProperties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ImageProperties(&value)); } return winrt::Windows::Media::ImageDisplayProperties{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_ISystemMediaTransportControlsDisplayUpdater::CopyFromFileAsync(winrt::Windows::Media::MediaPlaybackType const& type, winrt::Windows::Storage::StorageFile const& source) 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->CopyFromFileAsync(static_cast(type), *(void**)(&source), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CopyFromFileAsync(static_cast(type), *(void**)(&source), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_ISystemMediaTransportControlsDisplayUpdater::ClearAll() 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->ClearAll()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ClearAll()); } } template auto consume_Windows_Media_ISystemMediaTransportControlsDisplayUpdater::Update() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Update()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Update()); } } template auto consume_Windows_Media_ISystemMediaTransportControlsPropertyChangedEventArgs::Property() const { winrt::Windows::Media::SystemMediaTransportControlsProperty value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Property(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Property(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControlsStatics::GetForCurrentView() const { void* mediaControl{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetForCurrentView(&mediaControl)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetForCurrentView(&mediaControl)); } return winrt::Windows::Media::SystemMediaTransportControls{ mediaControl, take_ownership_from_abi }; } template auto consume_Windows_Media_ISystemMediaTransportControlsTimelineProperties::StartTime() 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_StartTime(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StartTime(put_abi(value))); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControlsTimelineProperties::StartTime(winrt::Windows::Foundation::TimeSpan const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_StartTime(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_StartTime(impl::bind_in(value))); } } template auto consume_Windows_Media_ISystemMediaTransportControlsTimelineProperties::EndTime() 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_EndTime(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EndTime(put_abi(value))); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControlsTimelineProperties::EndTime(winrt::Windows::Foundation::TimeSpan const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_EndTime(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_EndTime(impl::bind_in(value))); } } template auto consume_Windows_Media_ISystemMediaTransportControlsTimelineProperties::MinSeekTime() 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_MinSeekTime(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MinSeekTime(put_abi(value))); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControlsTimelineProperties::MinSeekTime(winrt::Windows::Foundation::TimeSpan const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_MinSeekTime(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_MinSeekTime(impl::bind_in(value))); } } template auto consume_Windows_Media_ISystemMediaTransportControlsTimelineProperties::MaxSeekTime() 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_MaxSeekTime(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxSeekTime(put_abi(value))); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControlsTimelineProperties::MaxSeekTime(winrt::Windows::Foundation::TimeSpan const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_MaxSeekTime(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_MaxSeekTime(impl::bind_in(value))); } } template auto consume_Windows_Media_ISystemMediaTransportControlsTimelineProperties::Position() 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_Position(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Position(put_abi(value))); } return value; } template auto consume_Windows_Media_ISystemMediaTransportControlsTimelineProperties::Position(winrt::Windows::Foundation::TimeSpan const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Position(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Position(impl::bind_in(value))); } } template auto consume_Windows_Media_IVideoDisplayProperties::Title() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Title(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Title(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoDisplayProperties::Title(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } } template auto consume_Windows_Media_IVideoDisplayProperties::Subtitle() 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_Subtitle(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Subtitle(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoDisplayProperties::Subtitle(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Subtitle(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Subtitle(*(void**)(&value))); } } template auto consume_Windows_Media_IVideoDisplayProperties2::Genres() 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_Genres(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Genres(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoEffectsStatics::VideoStabilization() 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_VideoStabilization(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideoStabilization(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoFrame::SoftwareBitmap() 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_SoftwareBitmap(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SoftwareBitmap(&value)); } return winrt::Windows::Graphics::Imaging::SoftwareBitmap{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoFrame::CopyToAsync(winrt::Windows::Media::VideoFrame const& frame) 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->CopyToAsync(*(void**)(&frame), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CopyToAsync(*(void**)(&frame), &value)); } return winrt::Windows::Foundation::IAsyncAction{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoFrame::Direct3DSurface() 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_Direct3DSurface(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Direct3DSurface(&value)); } return winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoFrame2::CopyToAsync(winrt::Windows::Media::VideoFrame const& frame, winrt::Windows::Foundation::IReference const& sourceBounds, winrt::Windows::Foundation::IReference const& destinationBounds) 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->CopyToWithBoundsAsync(*(void**)(&frame), *(void**)(&sourceBounds), *(void**)(&destinationBounds), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CopyToWithBoundsAsync(*(void**)(&frame), *(void**)(&sourceBounds), *(void**)(&destinationBounds), &operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoFrameFactory::Create(winrt::Windows::Graphics::Imaging::BitmapPixelFormat const& format, int32_t width, int32_t height) 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->Create(static_cast(format), width, height, &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(static_cast(format), width, height, &value)); } return winrt::Windows::Media::VideoFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoFrameFactory::CreateWithAlpha(winrt::Windows::Graphics::Imaging::BitmapPixelFormat const& format, int32_t width, int32_t height, winrt::Windows::Graphics::Imaging::BitmapAlphaMode const& alpha) 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->CreateWithAlpha(static_cast(format), width, height, static_cast(alpha), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithAlpha(static_cast(format), width, height, static_cast(alpha), &value)); } return winrt::Windows::Media::VideoFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoFrameStatics::CreateAsDirect3D11SurfaceBacked(winrt::Windows::Graphics::DirectX::DirectXPixelFormat const& format, 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->CreateAsDirect3D11SurfaceBacked(static_cast(format), width, height, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateAsDirect3D11SurfaceBacked(static_cast(format), width, height, &result)); } return winrt::Windows::Media::VideoFrame{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoFrameStatics::CreateAsDirect3D11SurfaceBacked(winrt::Windows::Graphics::DirectX::DirectXPixelFormat const& format, int32_t width, int32_t height, winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice const& device) 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->CreateAsDirect3D11SurfaceBackedWithDevice(static_cast(format), width, height, *(void**)(&device), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateAsDirect3D11SurfaceBackedWithDevice(static_cast(format), width, height, *(void**)(&device), &result)); } return winrt::Windows::Media::VideoFrame{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoFrameStatics::CreateWithSoftwareBitmap(winrt::Windows::Graphics::Imaging::SoftwareBitmap const& bitmap) 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->CreateWithSoftwareBitmap(*(void**)(&bitmap), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithSoftwareBitmap(*(void**)(&bitmap), &result)); } return winrt::Windows::Media::VideoFrame{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_IVideoFrameStatics::CreateWithDirect3D11Surface(winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface const& surface) 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->CreateWithDirect3D11Surface(*(void**)(&surface), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithDirect3D11Surface(*(void**)(&surface), &result)); } return winrt::Windows::Media::VideoFrame{ result, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Capacity(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Capacity()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Length(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Length()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Length(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Length(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall LockBuffer(int32_t mode, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LockBuffer(*reinterpret_cast(&mode))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(uint32_t capacity, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Create(capacity)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_RequestedAutoRepeatMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RequestedAutoRepeatMode()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Title(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Title()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Title(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Subtitle(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Subtitle()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Subtitle(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Subtitle(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_SoundLevelChanged(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().SoundLevelChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SoundLevelChanged(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SoundLevelChanged(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PlayPressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PlayPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PlayPressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PlayPressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PausePressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PausePressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PausePressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PausePressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_StopPressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().StopPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_StopPressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().StopPressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PlayPauseTogglePressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PlayPauseTogglePressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PlayPauseTogglePressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PlayPauseTogglePressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_RecordPressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().RecordPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_RecordPressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().RecordPressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_NextTrackPressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().NextTrackPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_NextTrackPressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().NextTrackPressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_PreviousTrackPressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().PreviousTrackPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PreviousTrackPressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PreviousTrackPressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_FastForwardPressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().FastForwardPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_FastForwardPressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().FastForwardPressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_RewindPressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().RewindPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_RewindPressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().RewindPressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_ChannelUpPressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().ChannelUpPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ChannelUpPressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ChannelUpPressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall add_ChannelDownPressed(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().ChannelDownPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ChannelDownPressed(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ChannelDownPressed(*reinterpret_cast(&cookie)); return 0; } int32_t __stdcall get_SoundLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SoundLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TrackName(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TrackName(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TrackName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TrackName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ArtistName(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ArtistName(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ArtistName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ArtistName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsPlaying(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsPlaying(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPlaying(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPlaying()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AlbumArt(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AlbumArt(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AlbumArt(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AlbumArt()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall SetProperties(void* configuration) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetProperties(*reinterpret_cast(&configuration)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RegisterSchemeHandler(void* activatableClassId, void* scheme) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterSchemeHandler(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&scheme)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RegisterSchemeHandlerWithSettings(void* activatableClassId, void* scheme, void* configuration) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterSchemeHandler(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&scheme), *reinterpret_cast(&configuration)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RegisterByteStreamHandler(void* activatableClassId, void* fileExtension, void* mimeType) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterByteStreamHandler(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&fileExtension), *reinterpret_cast(&mimeType)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RegisterByteStreamHandlerWithSettings(void* activatableClassId, void* fileExtension, void* mimeType, void* configuration) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterByteStreamHandler(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&fileExtension), *reinterpret_cast(&mimeType), *reinterpret_cast(&configuration)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RegisterAudioDecoder(void* activatableClassId, winrt::guid inputSubtype, winrt::guid outputSubtype) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterAudioDecoder(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&inputSubtype), *reinterpret_cast(&outputSubtype)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RegisterAudioDecoderWithSettings(void* activatableClassId, winrt::guid inputSubtype, winrt::guid outputSubtype, void* configuration) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterAudioDecoder(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&inputSubtype), *reinterpret_cast(&outputSubtype), *reinterpret_cast(&configuration)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RegisterAudioEncoder(void* activatableClassId, winrt::guid inputSubtype, winrt::guid outputSubtype) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterAudioEncoder(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&inputSubtype), *reinterpret_cast(&outputSubtype)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RegisterAudioEncoderWithSettings(void* activatableClassId, winrt::guid inputSubtype, winrt::guid outputSubtype, void* configuration) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterAudioEncoder(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&inputSubtype), *reinterpret_cast(&outputSubtype), *reinterpret_cast(&configuration)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RegisterVideoDecoder(void* activatableClassId, winrt::guid inputSubtype, winrt::guid outputSubtype) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterVideoDecoder(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&inputSubtype), *reinterpret_cast(&outputSubtype)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RegisterVideoDecoderWithSettings(void* activatableClassId, winrt::guid inputSubtype, winrt::guid outputSubtype, void* configuration) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterVideoDecoder(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&inputSubtype), *reinterpret_cast(&outputSubtype), *reinterpret_cast(&configuration)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RegisterVideoEncoder(void* activatableClassId, winrt::guid inputSubtype, winrt::guid outputSubtype) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterVideoEncoder(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&inputSubtype), *reinterpret_cast(&outputSubtype)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RegisterVideoEncoderWithSettings(void* activatableClassId, winrt::guid inputSubtype, winrt::guid outputSubtype, void* configuration) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterVideoEncoder(*reinterpret_cast(&activatableClassId), *reinterpret_cast(&inputSubtype), *reinterpret_cast(&outputSubtype), *reinterpret_cast(&configuration)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RegisterMediaExtensionForAppService(void* extension, void* connection) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RegisterMediaExtensionForAppService(*reinterpret_cast(&extension), *reinterpret_cast(&connection)); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_Type(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Type()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsReadOnly(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsReadOnly()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RelativeTime(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RelativeTime(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RelativeTime(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RelativeTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SystemRelativeTime(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SystemRelativeTime(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SystemRelativeTime(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SystemRelativeTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Duration(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Duration(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Duration(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Duration()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsDiscontinuous(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsDiscontinuous(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsDiscontinuous(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsDiscontinuous()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedProperties()); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall get_Time(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Time()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MediaMarkerType(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaMarkerType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Text(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Text()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Bookmark(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Bookmark()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_Markers(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Markers()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Arguments(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Arguments()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Start() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Start(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Resume() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Resume(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Pause() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Pause(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Position(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Position()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Position(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ClockRate(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClockRate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ClockRate(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClockRate(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_State(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_PositionChanged(void* positionChangedEventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().PositionChanged(*reinterpret_cast const*>(&positionChangedEventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PositionChanged(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PositionChanged(*reinterpret_cast(&eventCookie)); return 0; } int32_t __stdcall add_StateChanged(void* stateChangedEventHandler, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().StateChanged(*reinterpret_cast const*>(&stateChangedEventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_StateChanged(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().StateChanged(*reinterpret_cast(&eventCookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Duration(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Duration()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Duration(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Duration(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsLoopingEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsLoopingEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsLoopingEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsLoopingEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Failed(void* eventHandler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Failed(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Failed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Failed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Ended(void* eventHandler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Ended(*reinterpret_cast const*>(&eventHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Ended(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Ended(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedError()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Title(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Title()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Title(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AlbumArtist(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AlbumArtist()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AlbumArtist(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AlbumArtist(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Artist(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Artist()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Artist(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Artist(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AlbumTitle(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AlbumTitle()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AlbumTitle(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AlbumTitle(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TrackNumber(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TrackNumber()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TrackNumber(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TrackNumber(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Genres(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Genres()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AlbumTrackCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AlbumTrackCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AlbumTrackCount(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AlbumTrackCount(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_RequestedPlaybackPosition(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RequestedPlaybackPosition()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_RequestedPlaybackRate(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RequestedPlaybackRate()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_RequestedShuffleEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RequestedShuffleEnabled()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PlaybackStatus(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PlaybackStatus(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PlaybackStatus(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DisplayUpdater(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayUpdater()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SoundLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SoundLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPlayEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPlayEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsPlayEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsPlayEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsStopEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsStopEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsStopEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsStopEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPauseEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPauseEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsPauseEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsPauseEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsRecordEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsRecordEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsRecordEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsRecordEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsFastForwardEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsFastForwardEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsFastForwardEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsFastForwardEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsRewindEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsRewindEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsRewindEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsRewindEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPreviousEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPreviousEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsPreviousEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsPreviousEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsNextEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsNextEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsNextEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsNextEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsChannelUpEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsChannelUpEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsChannelUpEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsChannelUpEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsChannelDownEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsChannelDownEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsChannelDownEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsChannelDownEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ButtonPressed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ButtonPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ButtonPressed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ButtonPressed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_PropertyChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PropertyChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PropertyChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PropertyChanged(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AutoRepeatMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoRepeatMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AutoRepeatMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AutoRepeatMode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ShuffleEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShuffleEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ShuffleEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShuffleEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PlaybackRate(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackRate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PlaybackRate(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PlaybackRate(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateTimelineProperties(void* timelineProperties) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UpdateTimelineProperties(*reinterpret_cast(&timelineProperties)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_PlaybackPositionChangeRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PlaybackPositionChangeRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PlaybackPositionChangeRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PlaybackPositionChangeRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_PlaybackRateChangeRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PlaybackRateChangeRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PlaybackRateChangeRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PlaybackRateChangeRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_ShuffleEnabledChangeRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ShuffleEnabledChangeRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ShuffleEnabledChangeRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ShuffleEnabledChangeRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_AutoRepeatModeChangeRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AutoRepeatModeChangeRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AutoRepeatModeChangeRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AutoRepeatModeChangeRequested(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Button(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Button()); 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_AppMediaId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppMediaId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AppMediaId(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AppMediaId(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Thumbnail(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Thumbnail()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Thumbnail(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MusicProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MusicProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideoProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ImageProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ImageProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CopyFromFileAsync(int32_t type, void* source, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CopyFromFileAsync(*reinterpret_cast(&type), *reinterpret_cast(&source))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ClearAll() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClearAll(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Update() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Update(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Property(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Property()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentView(void** mediaControl) noexcept final try { clear_abi(mediaControl); typename D::abi_guard guard(this->shim()); *mediaControl = detach_from(this->shim().GetForCurrentView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_StartTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StartTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_StartTime(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StartTime(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EndTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EndTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_EndTime(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EndTime(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MinSeekTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinSeekTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MinSeekTime(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MinSeekTime(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxSeekTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxSeekTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MaxSeekTime(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MaxSeekTime(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Position(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Position()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Position(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Title(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Title()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Title(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Subtitle(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Subtitle()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Subtitle(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Subtitle(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Genres(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Genres()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_VideoStabilization(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoStabilization()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SoftwareBitmap(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SoftwareBitmap()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CopyToAsync(void* frame, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CopyToAsync(*reinterpret_cast(&frame))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Direct3DSurface(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Direct3DSurface()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CopyToWithBoundsAsync(void* frame, void* sourceBounds, void* destinationBounds, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().CopyToAsync(*reinterpret_cast(&frame), *reinterpret_cast const*>(&sourceBounds), *reinterpret_cast const*>(&destinationBounds))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(int32_t format, int32_t width, int32_t height, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Create(*reinterpret_cast(&format), width, height)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithAlpha(int32_t format, int32_t width, int32_t height, int32_t alpha, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateWithAlpha(*reinterpret_cast(&format), width, height, *reinterpret_cast(&alpha))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateAsDirect3D11SurfaceBacked(int32_t format, 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().CreateAsDirect3D11SurfaceBacked(*reinterpret_cast(&format), width, height)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateAsDirect3D11SurfaceBackedWithDevice(int32_t format, int32_t width, int32_t height, void* device, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateAsDirect3D11SurfaceBacked(*reinterpret_cast(&format), width, height, *reinterpret_cast(&device))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithSoftwareBitmap(void* bitmap, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWithSoftwareBitmap(*reinterpret_cast(&bitmap))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithDirect3D11Surface(void* surface, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWithDirect3D11Surface(*reinterpret_cast(&surface))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Media { inline AudioFrame::AudioFrame(uint32_t capacity) : AudioFrame(impl::call_factory([&](IAudioFrameFactory const& f) { return f.Create(capacity); })) { } inline auto MediaControl::SoundLevelChanged(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMediaControl const& f) { return f.SoundLevelChanged(handler); }); } inline auto MediaControl::SoundLevelChanged(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MediaControl::SoundLevelChanged_revoker{ f, f.SoundLevelChanged(handler) }; } inline auto MediaControl::SoundLevelChanged(winrt::event_token const& cookie) { impl::call_factory([&](IMediaControl const& f) { return f.SoundLevelChanged(cookie); }); } inline auto MediaControl::PlayPressed(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMediaControl const& f) { return f.PlayPressed(handler); }); } inline auto MediaControl::PlayPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MediaControl::PlayPressed_revoker{ f, f.PlayPressed(handler) }; } inline auto MediaControl::PlayPressed(winrt::event_token const& cookie) { impl::call_factory([&](IMediaControl const& f) { return f.PlayPressed(cookie); }); } inline auto MediaControl::PausePressed(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMediaControl const& f) { return f.PausePressed(handler); }); } inline auto MediaControl::PausePressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MediaControl::PausePressed_revoker{ f, f.PausePressed(handler) }; } inline auto MediaControl::PausePressed(winrt::event_token const& cookie) { impl::call_factory([&](IMediaControl const& f) { return f.PausePressed(cookie); }); } inline auto MediaControl::StopPressed(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMediaControl const& f) { return f.StopPressed(handler); }); } inline auto MediaControl::StopPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MediaControl::StopPressed_revoker{ f, f.StopPressed(handler) }; } inline auto MediaControl::StopPressed(winrt::event_token const& cookie) { impl::call_factory([&](IMediaControl const& f) { return f.StopPressed(cookie); }); } inline auto MediaControl::PlayPauseTogglePressed(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMediaControl const& f) { return f.PlayPauseTogglePressed(handler); }); } inline auto MediaControl::PlayPauseTogglePressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MediaControl::PlayPauseTogglePressed_revoker{ f, f.PlayPauseTogglePressed(handler) }; } inline auto MediaControl::PlayPauseTogglePressed(winrt::event_token const& cookie) { impl::call_factory([&](IMediaControl const& f) { return f.PlayPauseTogglePressed(cookie); }); } inline auto MediaControl::RecordPressed(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMediaControl const& f) { return f.RecordPressed(handler); }); } inline auto MediaControl::RecordPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MediaControl::RecordPressed_revoker{ f, f.RecordPressed(handler) }; } inline auto MediaControl::RecordPressed(winrt::event_token const& cookie) { impl::call_factory([&](IMediaControl const& f) { return f.RecordPressed(cookie); }); } inline auto MediaControl::NextTrackPressed(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMediaControl const& f) { return f.NextTrackPressed(handler); }); } inline auto MediaControl::NextTrackPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MediaControl::NextTrackPressed_revoker{ f, f.NextTrackPressed(handler) }; } inline auto MediaControl::NextTrackPressed(winrt::event_token const& cookie) { impl::call_factory([&](IMediaControl const& f) { return f.NextTrackPressed(cookie); }); } inline auto MediaControl::PreviousTrackPressed(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMediaControl const& f) { return f.PreviousTrackPressed(handler); }); } inline auto MediaControl::PreviousTrackPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MediaControl::PreviousTrackPressed_revoker{ f, f.PreviousTrackPressed(handler) }; } inline auto MediaControl::PreviousTrackPressed(winrt::event_token const& cookie) { impl::call_factory([&](IMediaControl const& f) { return f.PreviousTrackPressed(cookie); }); } inline auto MediaControl::FastForwardPressed(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMediaControl const& f) { return f.FastForwardPressed(handler); }); } inline auto MediaControl::FastForwardPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MediaControl::FastForwardPressed_revoker{ f, f.FastForwardPressed(handler) }; } inline auto MediaControl::FastForwardPressed(winrt::event_token const& cookie) { impl::call_factory([&](IMediaControl const& f) { return f.FastForwardPressed(cookie); }); } inline auto MediaControl::RewindPressed(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMediaControl const& f) { return f.RewindPressed(handler); }); } inline auto MediaControl::RewindPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MediaControl::RewindPressed_revoker{ f, f.RewindPressed(handler) }; } inline auto MediaControl::RewindPressed(winrt::event_token const& cookie) { impl::call_factory([&](IMediaControl const& f) { return f.RewindPressed(cookie); }); } inline auto MediaControl::ChannelUpPressed(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMediaControl const& f) { return f.ChannelUpPressed(handler); }); } inline auto MediaControl::ChannelUpPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MediaControl::ChannelUpPressed_revoker{ f, f.ChannelUpPressed(handler) }; } inline auto MediaControl::ChannelUpPressed(winrt::event_token const& cookie) { impl::call_factory([&](IMediaControl const& f) { return f.ChannelUpPressed(cookie); }); } inline auto MediaControl::ChannelDownPressed(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IMediaControl const& f) { return f.ChannelDownPressed(handler); }); } inline auto MediaControl::ChannelDownPressed(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return MediaControl::ChannelDownPressed_revoker{ f, f.ChannelDownPressed(handler) }; } inline auto MediaControl::ChannelDownPressed(winrt::event_token const& cookie) { impl::call_factory([&](IMediaControl const& f) { return f.ChannelDownPressed(cookie); }); } inline auto MediaControl::SoundLevel() { return impl::call_factory_cast([](IMediaControl const& f) { return f.SoundLevel(); }); } inline auto MediaControl::TrackName(param::hstring const& value) { impl::call_factory([&](IMediaControl const& f) { return f.TrackName(value); }); } inline auto MediaControl::TrackName() { return impl::call_factory_cast([](IMediaControl const& f) { return f.TrackName(); }); } inline auto MediaControl::ArtistName(param::hstring const& value) { impl::call_factory([&](IMediaControl const& f) { return f.ArtistName(value); }); } inline auto MediaControl::ArtistName() { return impl::call_factory_cast([](IMediaControl const& f) { return f.ArtistName(); }); } inline auto MediaControl::IsPlaying(bool value) { impl::call_factory([&](IMediaControl const& f) { return f.IsPlaying(value); }); } inline auto MediaControl::IsPlaying() { return impl::call_factory_cast([](IMediaControl const& f) { return f.IsPlaying(); }); } inline auto MediaControl::AlbumArt(winrt::Windows::Foundation::Uri const& value) { impl::call_factory([&](IMediaControl const& f) { return f.AlbumArt(value); }); } inline auto MediaControl::AlbumArt() { return impl::call_factory_cast([](IMediaControl const& f) { return f.AlbumArt(); }); } inline MediaExtensionManager::MediaExtensionManager() : MediaExtensionManager(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto MediaMarkerTypes::Bookmark() { return impl::call_factory_cast([](IMediaMarkerTypesStatics const& f) { return f.Bookmark(); }); } inline MediaTimelineController::MediaTimelineController() : MediaTimelineController(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto SystemMediaTransportControls::GetForCurrentView() { return impl::call_factory_cast([](ISystemMediaTransportControlsStatics const& f) { return f.GetForCurrentView(); }); } inline SystemMediaTransportControlsTimelineProperties::SystemMediaTransportControlsTimelineProperties() : SystemMediaTransportControlsTimelineProperties(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto VideoEffects::VideoStabilization() { return impl::call_factory_cast([](IVideoEffectsStatics const& f) { return f.VideoStabilization(); }); } inline VideoFrame::VideoFrame(winrt::Windows::Graphics::Imaging::BitmapPixelFormat const& format, int32_t width, int32_t height) : VideoFrame(impl::call_factory([&](IVideoFrameFactory const& f) { return f.Create(format, width, height); })) { } inline VideoFrame::VideoFrame(winrt::Windows::Graphics::Imaging::BitmapPixelFormat const& format, int32_t width, int32_t height, winrt::Windows::Graphics::Imaging::BitmapAlphaMode const& alpha) : VideoFrame(impl::call_factory([&](IVideoFrameFactory const& f) { return f.CreateWithAlpha(format, width, height, alpha); })) { } inline auto VideoFrame::CreateAsDirect3D11SurfaceBacked(winrt::Windows::Graphics::DirectX::DirectXPixelFormat const& format, int32_t width, int32_t height) { return impl::call_factory([&](IVideoFrameStatics const& f) { return f.CreateAsDirect3D11SurfaceBacked(format, width, height); }); } inline auto VideoFrame::CreateAsDirect3D11SurfaceBacked(winrt::Windows::Graphics::DirectX::DirectXPixelFormat const& format, int32_t width, int32_t height, winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DDevice const& device) { return impl::call_factory([&](IVideoFrameStatics const& f) { return f.CreateAsDirect3D11SurfaceBacked(format, width, height, device); }); } inline auto VideoFrame::CreateWithSoftwareBitmap(winrt::Windows::Graphics::Imaging::SoftwareBitmap const& bitmap) { return impl::call_factory([&](IVideoFrameStatics const& f) { return f.CreateWithSoftwareBitmap(bitmap); }); } inline auto VideoFrame::CreateWithDirect3D11Surface(winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface const& surface) { return impl::call_factory([&](IVideoFrameStatics const& f) { return f.CreateWithDirect3D11Surface(surface); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif