-
Notifications
You must be signed in to change notification settings - Fork 370
Experimental Microsoft.Windows.Storage.Pickers.* API #5240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…4945) Creating new API Microsoft.Windows.Storage.Pickers.FileOpenPicker.PickSingleFileAsync
…ype-workingdir\Microsoft.Storage.Pickers Squashed commit of the following: commit 4ce840f Author: Dinah Gao <x.kic8462852@gmail.com> Date: Wed Dec 11 15:00:41 2024 +0800 add one telemetry commit bbf72f8 Author: Dinah Gao <116714259+DinahK-2SO@users.noreply.github.com> Date: Tue Dec 10 11:01:23 2024 +0800 Microsoft.Windows.Storage.Pickers.FileOpenPicker.PickSingleFileAsync (#4945) Creating new API Microsoft.Windows.Storage.Pickers.FileOpenPicker.PickSingleFileAsync commit ff3f2a8 Author: Xiang Hong <hx.hongxiang@gmail.com> Date: Mon Dec 9 18:14:16 2024 +0800 fix: fix project configuration and add certificate notes to README.md commit e11c8e6 Author: Xiang Hong (from Dev Box) <xianghong@microsoft.com> Date: Sun Dec 8 20:54:23 2024 +0800 update readme for folder description commit c6966f3 Author: Xiang Hong (from Dev Box) <xianghong@microsoft.com> Date: Sun Dec 8 20:08:46 2024 +0800 add a simple READEME commit c17750f Author: Xiang Hong (from Dev Box) <xianghong@microsoft.com> Date: Sun Dec 8 11:27:04 2024 +0800 feature: add basic implementations for SavePickers FileExtension/SuggestedSaveFile/Name functionalities commit 3be9dc1 Author: Xiang Hong (from Dev Box) <xianghong@microsoft.com> Date: Sun Dec 8 10:35:59 2024 +0800 clean: code clean on naming styles etc commit 9fcc249 Author: Xiang Hong (from Dev Box) <xianghong@microsoft.com> Date: Sat Dec 7 22:22:21 2024 +0800 refactor: use WinRT MD5 hash string to Guid commit 756bafa Author: Xiang Hong (from Dev Box) <xianghong@microsoft.com> Date: Sat Dec 7 22:02:55 2024 +0800 fix: fix file type filter issues and refactor to use PickParameters commit 8dea72a Author: Xiang Hong (from Dev Box) <xianghong@microsoft.com> Date: Sat Dec 7 19:46:45 2024 +0800 feature: add COM FileSavePicker basic implementation commit 37a5a75 Author: Xiang Hong <hx.hongxiang@gmail.com> Date: Sat Dec 7 17:13:55 2024 +0800 add save file dialog usage in demo app commit fc9a03a Author: Xiang Hong <hx.hongxiang@gmail.com> Date: Sat Dec 7 12:06:47 2024 +0800 feature: add folder functionalities to demo test app commit 34556bd Author: Xiang Hong <hx.hongxiang@gmail.com> Date: Fri Dec 6 22:51:55 2024 +0800 feature: add COM based picker prototype basic implementation
msbuild dev\WindowsAppRuntime_DLL\WindowsAppRuntime_DLL.vcxproj
msbuild dev\Projections\CS\Microsoft.Windows.Storage.Pickers.Projection\Microsoft.Windows.Storage.Pickers.Projection.csproj
…g-updated-main-branch-for-test-errors
…g-updated-main-branch-for-test-errors
…iaomgao/storage-pickers_graceful_solution
…_graceful_solution Add the storage prickers project to solution; Merge latest main to our dev branch.
…ub.com/microsoft/WindowsAppSDK into user/xianghong/storage-pickers-develop
…hong/adding-test-prototype
commit 4a6b97a Author: Dinah Gao <x.kic8462852@gmail.com> Date: Tue Jan 14 13:43:22 2025 +0800 create file for fileSavePicker commit 369651d Author: Dinah Gao <x.kic8462852@gmail.com> Date: Mon Jan 13 18:13:47 2025 +0800 save investigation progress commit f025b64 Author: Dinah Gao <x.kic8462852@gmail.com> Date: Mon Jan 13 11:54:10 2025 +0800 update doc commit cc4b8cb Author: Dinah Gao <x.kic8462852@gmail.com> Date: Mon Jan 13 11:47:36 2025 +0800 atls.lib commit dc26511 Author: Dinah Gao <x.kic8462852@gmail.com> Date: Fri Jan 10 17:56:21 2025 +0800 COM APIs commit d0f487c Author: Dinah Gao <x.kic8462852@gmail.com> Date: Fri Jan 10 15:05:10 2025 +0800 fix file save picker not creating new file
…rosoft/WindowsAppSDK into user/xianghong/storage-pickers-develop
…hong/adding-test-prototype
…ototype Add unit test project for StoragePickers API
…icrosoft/WindowsAppSDK into user/xianghong/storage-pickers-develop
...osoft.Windows.Storage.Pickers.Projection/Microsoft.Windows.Storage.Pickers.Projection.csproj
Show resolved
Hide resolved
return winrt::hstring{ filePath.get() }; | ||
} | ||
|
||
std::vector<COMDLG_FILTERSPEC> CaptureFilterSpec(std::vector<winrt::hstring>& buffer, winrt::Windows::Foundation::Collections::IVectorView<winrt::hstring> filters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your questions.
The buffer and return result are both "out" values. The problem here is the returned Win32 styles COMDLG_FILTERSPEC
only contains raw pointers (get from c_str()
method of hstring
s), which does not automatically expand lifetime of strings dynamically constructed in this function. The buffer is used to carry those strings and is expected to expand lifetime of those string to the lifetime of setting Common Item Dialog options.
Comments has been updated to hopefully reduce confusion on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider changing the CaptureFilterSpec
functions to instead be member functions on PickerParameters. Then it doesn't need to take the buffer
or return the vector, since it would just use these both locally.
Feel free to consider this for follow-up in a later change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @codendone , Now we're refactoring the CaptureFilterSpec
methods here #5434
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Draft implementation for
Microsoft.Windows.Storage.Pickers.*
APIs following spec #5155.