// WARNING: Please don't edit this file. It was generated by C++/WinRT // v2.0.250303.1 #pragma once #ifndef WINRT_Microsoft_Windows_Storage_Pickers_H #define WINRT_Microsoft_Windows_Storage_Pickers_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/Microsoft.Windows.Storage.h" #include "winrt/impl/Microsoft.UI.2.h" #include "winrt/impl/Microsoft.Windows.Storage.Pickers.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" namespace winrt::impl { template auto consume_Microsoft_Windows_Storage_Pickers_IFileOpenPicker::ViewMode() const { winrt::Microsoft::Windows::Storage::Pickers::PickerViewMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->get_ViewMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_ViewMode(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileOpenPicker::ViewMode( winrt::Microsoft::Windows::Storage::Pickers::PickerViewMode 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< winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPicker, D const*>( static_cast(this), _winrt_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_ViewMode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ViewMode(static_cast(value))); } } template auto consume_Microsoft_Windows_Storage_Pickers_IFileOpenPicker< D>::SuggestedStartLocation() const { winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SuggestedStartLocation( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SuggestedStartLocation( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileOpenPicker:: SuggestedStartLocation( winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId 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< winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPicker, D const*>( static_cast(this), _winrt_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_SuggestedStartLocation( static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SuggestedStartLocation( static_cast(value))); } } template auto consume_Microsoft_Windows_Storage_Pickers_IFileOpenPicker< D>::CommitButtonText() 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< winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CommitButtonText(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CommitButtonText(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileOpenPicker< D>::CommitButtonText(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< winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPicker, D const*>( static_cast(this), _winrt_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_CommitButtonText(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CommitButtonText(*(void**)(&value))); } } template auto consume_Microsoft_Windows_Storage_Pickers_IFileOpenPicker< D>::FileTypeFilter() 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< winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_FileTypeFilter(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FileTypeFilter(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileOpenPicker< D>::PickSingleFileAsync() 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< winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->PickSingleFileAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PickSingleFileAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::Storage::Pickers::PickFileResult>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileOpenPicker< D>::PickMultipleFilesAsync() 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< winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->PickMultipleFilesAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PickMultipleFilesAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Windows::Foundation::Collections::IVectorView< winrt::Microsoft::Windows::Storage::Pickers::PickFileResult>>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileOpenPickerFactory< D>::CreateInstance(winrt::Microsoft::UI::WindowId const& windowId) 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< winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPickerFactory, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->CreateInstance(impl::bind_in(windowId), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->CreateInstance(impl::bind_in(windowId), &value)); } return winrt::Microsoft::Windows::Storage::Pickers::FileOpenPicker{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePicker< D>::SuggestedStartLocation() const { winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SuggestedStartLocation( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SuggestedStartLocation( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePicker:: SuggestedStartLocation( winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId 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< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker, D const*>( static_cast(this), _winrt_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_SuggestedStartLocation( static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SuggestedStartLocation( static_cast(value))); } } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePicker< D>::CommitButtonText() 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< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CommitButtonText(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CommitButtonText(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePicker< D>::CommitButtonText(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< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker, D const*>( static_cast(this), _winrt_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_CommitButtonText(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CommitButtonText(*(void**)(&value))); } } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePicker< D>::FileTypeChoices() 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< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_FileTypeChoices(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FileTypeChoices(&value)); } return winrt::Windows::Foundation::Collections::IMap< hstring, winrt::Windows::Foundation::Collections::IVector>{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePicker< D>::DefaultFileExtension() 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< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DefaultFileExtension(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DefaultFileExtension(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePicker< D>::DefaultFileExtension(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< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker, D const*>( static_cast(this), _winrt_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_DefaultFileExtension(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_DefaultFileExtension(*(void**)(&value))); } } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePicker< D>::SuggestedFileName() 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< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SuggestedFileName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SuggestedFileName(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePicker< D>::SuggestedFileName(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< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker, D const*>( static_cast(this), _winrt_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_SuggestedFileName(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SuggestedFileName(*(void**)(&value))); } } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePicker< D>::SuggestedFolder() 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< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SuggestedFolder(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SuggestedFolder(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePicker< D>::SuggestedFolder(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< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker, D const*>( static_cast(this), _winrt_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_SuggestedFolder(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_SuggestedFolder(*(void**)(&value))); } } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePicker< D>::PickSaveFileAsync() 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< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->PickSaveFileAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PickSaveFileAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::Storage::Pickers::PickFileResult>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFileSavePickerFactory< D>::CreateInstance(winrt::Microsoft::UI::WindowId const& windowId) 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< winrt::Microsoft::Windows::Storage::Pickers::IFileSavePickerFactory, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->CreateInstance(impl::bind_in(windowId), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->CreateInstance(impl::bind_in(windowId), &value)); } return winrt::Microsoft::Windows::Storage::Pickers::FileSavePicker{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFolderPicker::ViewMode() const { winrt::Microsoft::Windows::Storage::Pickers::PickerViewMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->get_ViewMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker>**)this; check_hresult( _winrt_abi_type->get_ViewMode(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_Storage_Pickers_IFolderPicker::ViewMode( winrt::Microsoft::Windows::Storage::Pickers::PickerViewMode 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< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker, D const*>( static_cast(this), _winrt_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_ViewMode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker>**)this; check_hresult(_winrt_abi_type->put_ViewMode(static_cast(value))); } } template auto consume_Microsoft_Windows_Storage_Pickers_IFolderPicker< D>::SuggestedStartLocation() const { winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SuggestedStartLocation( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker>**)this; check_hresult(_winrt_abi_type->get_SuggestedStartLocation( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_Storage_Pickers_IFolderPicker:: SuggestedStartLocation( winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId 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< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker, D const*>( static_cast(this), _winrt_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_SuggestedStartLocation( static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker>**)this; check_hresult(_winrt_abi_type->put_SuggestedStartLocation( static_cast(value))); } } template auto consume_Microsoft_Windows_Storage_Pickers_IFolderPicker< D>::CommitButtonText() 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< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CommitButtonText(&value)); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker>**)this; check_hresult(_winrt_abi_type->get_CommitButtonText(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFolderPicker< D>::CommitButtonText(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< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker, D const*>( static_cast(this), _winrt_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_CommitButtonText(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker>**)this; check_hresult(_winrt_abi_type->put_CommitButtonText(*(void**)(&value))); } } template auto consume_Microsoft_Windows_Storage_Pickers_IFolderPicker< D>::PickSingleFolderAsync() 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< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->PickSingleFolderAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::Windows::Storage::Pickers::IFolderPicker>**)this; check_hresult(_winrt_abi_type->PickSingleFolderAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::Storage::Pickers::PickFolderResult>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IFolderPickerFactory< D>::CreateInstance(winrt::Microsoft::UI::WindowId const& windowId) 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< winrt::Microsoft::Windows::Storage::Pickers::IFolderPickerFactory, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->CreateInstance(impl::bind_in(windowId), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->CreateInstance(impl::bind_in(windowId), &value)); } return winrt::Microsoft::Windows::Storage::Pickers::FolderPicker{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Storage_Pickers_IPickFileResult::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< winrt::Microsoft::Windows::Storage::Pickers::IPickFileResult, D const*>( static_cast(this), _winrt_cast_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_Microsoft_Windows_Storage_Pickers_IPickFolderResult::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< winrt::Microsoft::Windows::Storage::Pickers::IPickFolderResult, D const*>(static_cast(this), _winrt_cast_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}; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPicker> { int32_t __stdcall get_ViewMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::Storage::Pickers::PickerViewMode>( this->shim().ViewMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ViewMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ViewMode( *reinterpret_cast< winrt::Microsoft::Windows::Storage::Pickers::PickerViewMode const*>( &value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SuggestedStartLocation(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId>( this->shim().SuggestedStartLocation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SuggestedStartLocation(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SuggestedStartLocation( *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CommitButtonText(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CommitButtonText()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CommitButtonText(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CommitButtonText(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FileTypeFilter(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>( this->shim().FileTypeFilter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PickSingleFileAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().PickSingleFileAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PickMultipleFilesAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>( this->shim().PickMultipleFilesAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPickerFactory> : produce_base< D, winrt::Microsoft::Windows::Storage::Pickers::IFileOpenPickerFactory> { int32_t __stdcall CreateInstance(struct struct_Microsoft_UI_WindowId windowId, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::Storage::Pickers::FileOpenPicker>( this->shim().CreateInstance( *reinterpret_cast( &windowId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::Windows::Storage::Pickers::IFileSavePicker> { int32_t __stdcall get_SuggestedStartLocation(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId>( this->shim().SuggestedStartLocation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SuggestedStartLocation(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SuggestedStartLocation( *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CommitButtonText(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CommitButtonText()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CommitButtonText(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CommitButtonText(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FileTypeChoices(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>>( this->shim().FileTypeChoices()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DefaultFileExtension(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DefaultFileExtension()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DefaultFileExtension(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DefaultFileExtension( *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SuggestedFileName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SuggestedFileName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SuggestedFileName(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SuggestedFileName(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SuggestedFolder(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SuggestedFolder()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SuggestedFolder(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SuggestedFolder(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PickSaveFileAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().PickSaveFileAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::Storage::Pickers::IFileSavePickerFactory> : produce_base< D, winrt::Microsoft::Windows::Storage::Pickers::IFileSavePickerFactory> { int32_t __stdcall CreateInstance(struct struct_Microsoft_UI_WindowId windowId, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::Storage::Pickers::FileSavePicker>( this->shim().CreateInstance( *reinterpret_cast( &windowId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ViewMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::Storage::Pickers::PickerViewMode>( this->shim().ViewMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ViewMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ViewMode( *reinterpret_cast< winrt::Microsoft::Windows::Storage::Pickers::PickerViewMode const*>( &value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SuggestedStartLocation(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::Storage::Pickers::PickerLocationId>( this->shim().SuggestedStartLocation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_SuggestedStartLocation(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SuggestedStartLocation( *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CommitButtonText(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CommitButtonText()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CommitButtonText(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CommitButtonText(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PickSingleFolderAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().PickSingleFolderAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::Storage::Pickers::IFolderPickerFactory> : produce_base< D, winrt::Microsoft::Windows::Storage::Pickers::IFolderPickerFactory> { int32_t __stdcall CreateInstance(struct struct_Microsoft_UI_WindowId windowId, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().CreateInstance( *reinterpret_cast( &windowId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::Windows::Storage::Pickers::IPickFileResult> { 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< D, winrt::Microsoft::Windows::Storage::Pickers::IPickFolderResult> { 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 } // namespace winrt::impl WINRT_EXPORT namespace winrt::Microsoft::Windows::Storage::Pickers { inline FileOpenPicker::FileOpenPicker( winrt::Microsoft::UI::WindowId const& windowId) : FileOpenPicker( impl::call_factory( [&](IFileOpenPickerFactory const& f) { return f.CreateInstance(windowId); })) {} inline FileSavePicker::FileSavePicker( winrt::Microsoft::UI::WindowId const& windowId) : FileSavePicker( impl::call_factory( [&](IFileSavePickerFactory const& f) { return f.CreateInstance(windowId); })) {} inline FolderPicker::FolderPicker( winrt::Microsoft::UI::WindowId const& windowId) : FolderPicker(impl::call_factory( [&](IFolderPickerFactory const& f) { return f.CreateInstance(windowId); })) {} } 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 {}; #endif #ifdef __cpp_lib_format #endif } // namespace std #endif