// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Media_Import_H #define WINRT_Windows_Media_Import_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/Windows.Media.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.Media.Import.2.h" namespace winrt::impl { template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::Session() 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_Session(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Session(&value)); } return winrt::Windows::Media::Import::PhotoImportSession{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::HasSucceeded() 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_HasSucceeded(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasSucceeded(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::DeletedItems() 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_DeletedItems(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeletedItems(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::PhotosCount() 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_PhotosCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PhotosCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::PhotosSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PhotosSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PhotosSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::VideosCount() 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_VideosCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideosCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::VideosSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_VideosSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideosSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::SidecarsCount() 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_SidecarsCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SidecarsCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::SidecarsSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SidecarsSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SidecarsSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::SiblingsCount() 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_SiblingsCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SiblingsCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::SiblingsSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SiblingsSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SiblingsSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::TotalCount() 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_TotalCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TotalCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportDeleteImportedItemsFromSourceResult::TotalSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TotalSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TotalSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::Session() 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_Session(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Session(&value)); } return winrt::Windows::Media::Import::PhotoImportSession{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::HasSucceeded() 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_HasSucceeded(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasSucceeded(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::FoundItems() 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_FoundItems(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FoundItems(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::PhotosCount() 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_PhotosCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PhotosCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::PhotosSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PhotosSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PhotosSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::VideosCount() 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_VideosCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideosCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::VideosSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_VideosSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideosSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SidecarsCount() 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_SidecarsCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SidecarsCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SidecarsSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SidecarsSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SidecarsSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SiblingsCount() 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_SiblingsCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SiblingsCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SiblingsSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SiblingsSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SiblingsSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::TotalCount() 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_TotalCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TotalCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::TotalSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TotalSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TotalSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectAll() 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->SelectAll()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SelectAll()); } } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectNone() 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->SelectNone()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SelectNone()); } } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectNewAsync() const { void* action{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SelectNewAsync(&action)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SelectNewAsync(&action)); } return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SetImportMode(winrt::Windows::Media::Import::PhotoImportImportMode 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->SetImportMode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetImportMode(static_cast(value))); } } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::ImportMode() const { winrt::Windows::Media::Import::PhotoImportImportMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ImportMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ImportMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectedPhotosCount() 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_SelectedPhotosCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedPhotosCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectedPhotosSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SelectedPhotosSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedPhotosSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectedVideosCount() 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_SelectedVideosCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedVideosCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectedVideosSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SelectedVideosSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedVideosSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectedSidecarsCount() 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_SelectedSidecarsCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedSidecarsCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectedSidecarsSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SelectedSidecarsSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedSidecarsSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectedSiblingsCount() 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_SelectedSiblingsCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedSiblingsCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectedSiblingsSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SelectedSiblingsSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedSiblingsSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectedTotalCount() 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_SelectedTotalCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedTotalCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectedTotalSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SelectedTotalSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedTotalSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectionChanged(winrt::Windows::Foundation::TypedEventHandler const& value) 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_SelectionChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_SelectionChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectionChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, SelectionChanged(value)); } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::SelectionChanged(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_SelectionChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_SelectionChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::ImportItemsAsync() 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->ImportItemsAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ImportItemsAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::ItemImported(winrt::Windows::Foundation::TypedEventHandler const& value) 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_ItemImported(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ItemImported(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::ItemImported(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, ItemImported(value)); } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult::ItemImported(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_ItemImported(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ItemImported(impl::bind_in(token)); } } template auto consume_Windows_Media_Import_IPhotoImportFindItemsResult2::AddItemsInDateRangeToSelection(winrt::Windows::Foundation::DateTime const& rangeStart, winrt::Windows::Foundation::TimeSpan const& rangeLength) 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->AddItemsInDateRangeToSelection(impl::bind_in(rangeStart), impl::bind_in(rangeLength))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AddItemsInDateRangeToSelection(impl::bind_in(rangeStart), impl::bind_in(rangeLength))); } } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::Session() 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_Session(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Session(&value)); } return winrt::Windows::Media::Import::PhotoImportSession{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::HasSucceeded() 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_HasSucceeded(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasSucceeded(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::ImportedItems() 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_ImportedItems(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ImportedItems(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::PhotosCount() 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_PhotosCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PhotosCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::PhotosSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PhotosSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PhotosSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::VideosCount() 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_VideosCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideosCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::VideosSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_VideosSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideosSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::SidecarsCount() 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_SidecarsCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SidecarsCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::SidecarsSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SidecarsSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SidecarsSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::SiblingsCount() 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_SiblingsCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SiblingsCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::SiblingsSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SiblingsSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SiblingsSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::TotalCount() 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_TotalCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TotalCount(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::TotalSizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TotalSizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TotalSizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportImportItemsResult::DeleteImportedItemsFromSourceAsync() 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->DeleteImportedItemsFromSourceAsync(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->DeleteImportedItemsFromSourceAsync(&result)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportItem::Name() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Name(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Name(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportItem::ItemKey() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ItemKey(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ItemKey(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportItem::ContentType() const { winrt::Windows::Media::Import::PhotoImportContentType value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ContentType(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ContentType(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportItem::SizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportItem::Date() const { winrt::Windows::Foundation::DateTime value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Date(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Date(put_abi(value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportItem::Sibling() 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_Sibling(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Sibling(&value)); } return winrt::Windows::Media::Import::PhotoImportSidecar{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportItem::Sidecars() 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_Sidecars(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Sidecars(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportItem::VideoSegments() 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_VideoSegments(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideoSegments(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportItem::IsSelected() 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_IsSelected(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsSelected(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportItem::IsSelected(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_IsSelected(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsSelected(value)); } } template auto consume_Windows_Media_Import_IPhotoImportItem::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::IRandomAccessStreamReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportItem::ImportedFileNames() 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_ImportedFileNames(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ImportedFileNames(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportItem::DeletedFileNames() 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_DeletedFileNames(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeletedFileNames(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportItem2::Path() 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_Path(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Path(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportItemImportedEventArgs::ImportedItem() 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_ImportedItem(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ImportedItem(&value)); } return winrt::Windows::Media::Import::PhotoImportItem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportManagerStatics::IsSupportedAsync() 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->IsSupportedAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsSupportedAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportManagerStatics::FindAllSourcesAsync() 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->FindAllSourcesAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllSourcesAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportManagerStatics::GetPendingOperations() 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->GetPendingOperations(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPendingOperations(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportOperation::Stage() const { winrt::Windows::Media::Import::PhotoImportStage value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Stage(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Stage(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportOperation::Session() 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_Session(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Session(&value)); } return winrt::Windows::Media::Import::PhotoImportSession{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportOperation::ContinueFindingItemsAsync() 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->get_ContinueFindingItemsAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ContinueFindingItemsAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportOperation::ContinueImportingItemsAsync() 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->get_ContinueImportingItemsAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ContinueImportingItemsAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportOperation::ContinueDeletingImportedItemsFromSourceAsync() 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->get_ContinueDeletingImportedItemsFromSourceAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ContinueDeletingImportedItemsFromSourceAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSelectionChangedEventArgs::IsSelectionEmpty() 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_IsSelectionEmpty(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsSelectionEmpty(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportSession::Source() 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_Source(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Source(&value)); } return winrt::Windows::Media::Import::PhotoImportSource{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSession::SessionId() const { winrt::guid value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SessionId(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SessionId(put_abi(value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportSession::DestinationFolder(winrt::Windows::Storage::IStorageFolder 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_DestinationFolder(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DestinationFolder(*(void**)(&value))); } } template auto consume_Windows_Media_Import_IPhotoImportSession::DestinationFolder() 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_DestinationFolder(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DestinationFolder(&value)); } return winrt::Windows::Storage::IStorageFolder{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSession::AppendSessionDateToDestinationFolder(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_AppendSessionDateToDestinationFolder(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AppendSessionDateToDestinationFolder(value)); } } template auto consume_Windows_Media_Import_IPhotoImportSession::AppendSessionDateToDestinationFolder() 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_AppendSessionDateToDestinationFolder(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppendSessionDateToDestinationFolder(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportSession::SubfolderCreationMode(winrt::Windows::Media::Import::PhotoImportSubfolderCreationMode 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_SubfolderCreationMode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SubfolderCreationMode(static_cast(value))); } } template auto consume_Windows_Media_Import_IPhotoImportSession::SubfolderCreationMode() const { winrt::Windows::Media::Import::PhotoImportSubfolderCreationMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SubfolderCreationMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SubfolderCreationMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportSession::DestinationFileNamePrefix(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_DestinationFileNamePrefix(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DestinationFileNamePrefix(*(void**)(&value))); } } template auto consume_Windows_Media_Import_IPhotoImportSession::DestinationFileNamePrefix() 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_DestinationFileNamePrefix(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DestinationFileNamePrefix(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSession::FindItemsAsync(winrt::Windows::Media::Import::PhotoImportContentTypeFilter const& contentTypeFilter, winrt::Windows::Media::Import::PhotoImportItemSelectionMode const& itemSelectionMode) 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->FindItemsAsync(static_cast(contentTypeFilter), static_cast(itemSelectionMode), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindItemsAsync(static_cast(contentTypeFilter), static_cast(itemSelectionMode), &operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSession2::SubfolderDateFormat(winrt::Windows::Media::Import::PhotoImportSubfolderDateFormat 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_SubfolderDateFormat(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SubfolderDateFormat(static_cast(value))); } } template auto consume_Windows_Media_Import_IPhotoImportSession2::SubfolderDateFormat() const { winrt::Windows::Media::Import::PhotoImportSubfolderDateFormat value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SubfolderDateFormat(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SubfolderDateFormat(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportSession2::RememberDeselectedItems(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_RememberDeselectedItems(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_RememberDeselectedItems(value)); } } template auto consume_Windows_Media_Import_IPhotoImportSession2::RememberDeselectedItems() 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_RememberDeselectedItems(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RememberDeselectedItems(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportSidecar::Name() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Name(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Name(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSidecar::SizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportSidecar::Date() const { winrt::Windows::Foundation::DateTime value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Date(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Date(put_abi(value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportSource::Id() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSource::DisplayName() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DisplayName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSource::Description() 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_Description(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Description(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSource::Manufacturer() 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_Manufacturer(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Manufacturer(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSource::Model() 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_Model(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Model(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSource::SerialNumber() 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_SerialNumber(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SerialNumber(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSource::ConnectionProtocol() 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_ConnectionProtocol(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ConnectionProtocol(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSource::ConnectionTransport() const { winrt::Windows::Media::Import::PhotoImportConnectionTransport value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ConnectionTransport(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ConnectionTransport(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportSource::Type() const { winrt::Windows::Media::Import::PhotoImportSourceType value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_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_Import_IPhotoImportSource::PowerSource() const { winrt::Windows::Media::Import::PhotoImportPowerSource value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PowerSource(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PowerSource(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportSource::BatteryLevelPercent() 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_BatteryLevelPercent(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BatteryLevelPercent(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSource::DateTime() 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_DateTime(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DateTime(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSource::StorageMedia() 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_StorageMedia(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StorageMedia(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSource::IsLocked() 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_IsLocked(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsLocked(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSource::IsMassStorage() 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_IsMassStorage(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsMassStorage(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportSource::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::IRandomAccessStreamReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSource::CreateImportSession() 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->CreateImportSession(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateImportSession(&result)); } return winrt::Windows::Media::Import::PhotoImportSession{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSourceStatics::FromIdAsync(param::hstring const& sourceId) 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->FromIdAsync(*(void**)(&sourceId), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromIdAsync(*(void**)(&sourceId), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportSourceStatics::FromFolderAsync(winrt::Windows::Storage::IStorageFolder const& sourceRootFolder) 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->FromFolderAsync(*(void**)(&sourceRootFolder), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromFolderAsync(*(void**)(&sourceRootFolder), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportStorageMedium::Name() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Name(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Name(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportStorageMedium::Description() 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_Description(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Description(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportStorageMedium::SerialNumber() 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_SerialNumber(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SerialNumber(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportStorageMedium::StorageMediumType() const { winrt::Windows::Media::Import::PhotoImportStorageMediumType value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_StorageMediumType(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StorageMediumType(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportStorageMedium::SupportedAccessMode() const { winrt::Windows::Media::Import::PhotoImportAccessMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SupportedAccessMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedAccessMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportStorageMedium::CapacityInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CapacityInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CapacityInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportStorageMedium::AvailableSpaceInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AvailableSpaceInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AvailableSpaceInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportStorageMedium::Refresh() 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->Refresh()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Refresh()); } } template auto consume_Windows_Media_Import_IPhotoImportVideoSegment::Name() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Name(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Name(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportVideoSegment::SizeInBytes() const { uint64_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SizeInBytes(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SizeInBytes(&value)); } return value; } template auto consume_Windows_Media_Import_IPhotoImportVideoSegment::Date() const { winrt::Windows::Foundation::DateTime value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Date(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Date(put_abi(value))); } return value; } template auto consume_Windows_Media_Import_IPhotoImportVideoSegment::Sibling() 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_Sibling(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Sibling(&value)); } return winrt::Windows::Media::Import::PhotoImportSidecar{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Import_IPhotoImportVideoSegment::Sidecars() 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_Sidecars(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Sidecars(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Session(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Session()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HasSucceeded(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasSucceeded()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DeletedItems(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().DeletedItems()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PhotosCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PhotosCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PhotosSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PhotosSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideosCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideosCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideosSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideosSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SidecarsCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SidecarsCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SidecarsSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SidecarsSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SiblingsCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SiblingsCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SiblingsSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SiblingsSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TotalCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TotalCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TotalSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TotalSizeInBytes()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Session(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Session()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HasSucceeded(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasSucceeded()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FoundItems(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().FoundItems()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PhotosCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PhotosCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PhotosSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PhotosSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideosCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideosCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideosSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideosSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SidecarsCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SidecarsCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SidecarsSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SidecarsSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SiblingsCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SiblingsCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SiblingsSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SiblingsSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TotalCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TotalCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TotalSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TotalSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SelectAll() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SelectAll(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SelectNone() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SelectNone(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SelectNewAsync(void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().SelectNewAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetImportMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetImportMode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ImportMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ImportMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedPhotosCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedPhotosCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedPhotosSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedPhotosSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedVideosCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedVideosCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedVideosSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedVideosSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedSidecarsCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedSidecarsCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedSidecarsSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedSidecarsSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedSiblingsCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedSiblingsCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedSiblingsSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedSiblingsSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedTotalCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedTotalCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SelectedTotalSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedTotalSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_SelectionChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().SelectionChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SelectionChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SelectionChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall ImportItemsAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().ImportItemsAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ItemImported(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ItemImported(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ItemImported(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ItemImported(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall AddItemsInDateRangeToSelection(int64_t rangeStart, int64_t rangeLength) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AddItemsInDateRangeToSelection(*reinterpret_cast(&rangeStart), *reinterpret_cast(&rangeLength)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Session(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Session()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HasSucceeded(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasSucceeded()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ImportedItems(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ImportedItems()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PhotosCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PhotosCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PhotosSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PhotosSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideosCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideosCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideosSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideosSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SidecarsCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SidecarsCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SidecarsSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SidecarsSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SiblingsCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SiblingsCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SiblingsSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SiblingsSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TotalCount(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TotalCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TotalSizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TotalSizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DeleteImportedItemsFromSourceAsync(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().DeleteImportedItemsFromSourceAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Name(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Name()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ItemKey(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ItemKey()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ContentType(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ContentType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Date(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Date()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Sibling(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Sibling()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Sidecars(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Sidecars()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideoSegments(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().VideoSegments()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsSelected(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSelected()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsSelected(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsSelected(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 get_ImportedFileNames(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ImportedFileNames()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DeletedFileNames(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().DeletedFileNames()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Path(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Path()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ImportedItem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ImportedItem()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsSupportedAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().IsSupportedAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllSourcesAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().FindAllSourcesAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPendingOperations(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetPendingOperations()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Stage(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Stage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Session(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Session()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ContinueFindingItemsAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().ContinueFindingItemsAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ContinueImportingItemsAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().ContinueImportingItemsAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ContinueDeletingImportedItemsFromSourceAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().ContinueDeletingImportedItemsFromSourceAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsSelectionEmpty(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSelectionEmpty()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Source(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Source()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SessionId(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SessionId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DestinationFolder(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DestinationFolder(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DestinationFolder(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DestinationFolder()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AppendSessionDateToDestinationFolder(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AppendSessionDateToDestinationFolder(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AppendSessionDateToDestinationFolder(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppendSessionDateToDestinationFolder()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SubfolderCreationMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SubfolderCreationMode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SubfolderCreationMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SubfolderCreationMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DestinationFileNamePrefix(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DestinationFileNamePrefix(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DestinationFileNamePrefix(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DestinationFileNamePrefix()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindItemsAsync(int32_t contentTypeFilter, int32_t itemSelectionMode, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().FindItemsAsync(*reinterpret_cast(&contentTypeFilter), *reinterpret_cast(&itemSelectionMode))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_SubfolderDateFormat(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SubfolderDateFormat(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SubfolderDateFormat(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SubfolderDateFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RememberDeselectedItems(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RememberDeselectedItems(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RememberDeselectedItems(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RememberDeselectedItems()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Name(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Name()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Date(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Date()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DisplayName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Description(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Description()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Manufacturer(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Manufacturer()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Model(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Model()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SerialNumber(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SerialNumber()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ConnectionProtocol(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ConnectionProtocol()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ConnectionTransport(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ConnectionTransport()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Type(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Type()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PowerSource(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PowerSource()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BatteryLevelPercent(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().BatteryLevelPercent()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DateTime(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().DateTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StorageMedia(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().StorageMedia()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsLocked(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().IsLocked()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsMassStorage(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsMassStorage()); 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 CreateImportSession(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateImportSession()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FromIdAsync(void* sourceId, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().FromIdAsync(*reinterpret_cast(&sourceId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FromFolderAsync(void* sourceRootFolder, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().FromFolderAsync(*reinterpret_cast(&sourceRootFolder))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Name(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Name()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Description(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Description()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SerialNumber(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SerialNumber()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StorageMediumType(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StorageMediumType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedAccessMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SupportedAccessMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CapacityInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CapacityInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AvailableSpaceInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AvailableSpaceInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Refresh() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Refresh(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Name(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Name()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SizeInBytes(uint64_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SizeInBytes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Date(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Date()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Sibling(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Sibling()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Sidecars(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Sidecars()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Media::Import { inline auto PhotoImportManager::IsSupportedAsync() { return impl::call_factory_cast(*)(IPhotoImportManagerStatics const&), PhotoImportManager, IPhotoImportManagerStatics>([](IPhotoImportManagerStatics const& f) { return f.IsSupportedAsync(); }); } inline auto PhotoImportManager::FindAllSourcesAsync() { return impl::call_factory_cast>(*)(IPhotoImportManagerStatics const&), PhotoImportManager, IPhotoImportManagerStatics>([](IPhotoImportManagerStatics const& f) { return f.FindAllSourcesAsync(); }); } inline auto PhotoImportManager::GetPendingOperations() { return impl::call_factory_cast(*)(IPhotoImportManagerStatics const&), PhotoImportManager, IPhotoImportManagerStatics>([](IPhotoImportManagerStatics const& f) { return f.GetPendingOperations(); }); } inline auto PhotoImportSource::FromIdAsync(param::hstring const& sourceId) { return impl::call_factory([&](IPhotoImportSourceStatics const& f) { return f.FromIdAsync(sourceId); }); } inline auto PhotoImportSource::FromFolderAsync(winrt::Windows::Storage::IStorageFolder const& sourceRootFolder) { return impl::call_factory([&](IPhotoImportSourceStatics const& f) { return f.FromFolderAsync(sourceRootFolder); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif