In my UWP app, to get the path of the user's downloads folder, I am importing Shell32.dll
and invoking the method SHGetKnownFolderPath with the shell folder value for downloads folder "{374DE290-123F-4565-9164-39C4925E467B}"
(as mentioned in Windows 10 User Shell Folders Restore Default Paths).
Now my question is, does the above way of getting the folder path, violate any UWP recommendation? Will my app pass the certification for publishing in Microsoft store? Or will it be rejected as mentioned in the answer to this question - How to access registry key in a UWP app?
A more general answer: You can use the UserDataPaths
class as a replacement for SHGetKnownFolderPath
in Windows 10.