known-folders

Access music files UWP -KnownFolders.MusicLibrary.GetItemsAsync() doesnt return anything

醉酒当歌 提交于 2020-01-07 01:23:11
问题 Hey i have the following : var fileList = await KnownFolders.MusicLibrary.GetItemsAsync(); It doesn't return any files and i have files in the Music folder. I also have : <Capabilities> <Capability Name="internetClient" /> <Capability Name="removableStorage" /> <Capability Name="documentsLibrary" /> <Capability Name="MusicLibrary" /> <Capability Name="HomeGroup" /> <Capability Name="RemovableDevices" /> I dont know why it doesnt return any files/ exception ? Any suggestions ? I also tried

How to get folder path from Known folder GUID in Delphi

会有一股神秘感。 提交于 2019-12-22 05:13:15
问题 I have a KNOWNFOLDERID and I would like to know the corresponding path like C:....\folder. KNOWNFOLDERID can be found here. http://msdn.microsoft.com/en-us/library/bb762584%28VS.85%29.aspx I d like to use win api (I don't want to build an array with all KNOWNFOLDERID and paths). Thanks 回答1: Simply call the SHGetKnownFolderPath API function. Since this function was added in Vista, it won't be declared in the library units that shipped with Delphi 7. So you'd need to declare it yourself. type

How to get folder path from Known folder GUID in Delphi

大憨熊 提交于 2019-12-22 05:11:01
问题 I have a KNOWNFOLDERID and I would like to know the corresponding path like C:....\folder. KNOWNFOLDERID can be found here. http://msdn.microsoft.com/en-us/library/bb762584%28VS.85%29.aspx I d like to use win api (I don't want to build an array with all KNOWNFOLDERID and paths). Thanks 回答1: Simply call the SHGetKnownFolderPath API function. Since this function was added in Vista, it won't be declared in the library units that shipped with Delphi 7. So you'd need to declare it yourself. type

Get Internal Drives Using Windows.Storage Namespace in UWP

和自甴很熟 提交于 2019-12-11 15:08:19
问题 Having spent some time reading up on the Windows.Storage classes and methods, I'm a bit shocked to find that there is no simple way to retrieve a list of the internal drives on a machine using UWP. I've found examples such as this: How to get logical drives names in Windows 10?, but this provides the removable drives only (Flash drives, DVD drive, etc). I know I can allow the user to select a folder and that'll provide me with the handle to the selected drive, but it seems clunky as I want

Windows Special and Known Folders from python (Start Menu, Downloads, …)

跟風遠走 提交于 2019-12-08 07:07:06
问题 What is the best method to determine the path of Windows special-folders and known-folders in python? I've uncovered a couple of popular methods for SpecialFolders, a.k.a CSIDL, but nothing straightforward yet for KNOWNFOLDERID. Backwards compatibility is maintained, so the CSIDL methods still work, but any special/known folders introduced since Windows XP are not enumerated there. Examples of the "new" unavailable ones include Downloads, Playlists, Program Files x64. Special Folders Find

How to get folder path from Known folder GUID in Delphi

依然范特西╮ 提交于 2019-12-05 07:54:46
I have a KNOWNFOLDERID and I would like to know the corresponding path like C:....\folder. KNOWNFOLDERID can be found here. http://msdn.microsoft.com/en-us/library/bb762584%28VS.85%29.aspx I d like to use win api (I don't want to build an array with all KNOWNFOLDERID and paths). Thanks Simply call the SHGetKnownFolderPath API function. Since this function was added in Vista, it won't be declared in the library units that shipped with Delphi 7. So you'd need to declare it yourself. type KNOWNFOLDERID = TGuid; function SHGetKnownFolderPath( const rfid: KNOWNFOLDERID; dwFlags: DWORD; hToken:

Unable to call SHGetKnownFolderPath() even with #include <Shlobj.h> and #pragma comment (lib, “Shell32.lib”)

断了今生、忘了曾经 提交于 2019-12-01 21:52:59
问题 (Visual Studio 2010 / Visual C++ / Windows 7) example.cpp: #include <Shlobj.h> #pragma comment (lib, "Shell32.lib") ... void example() { SHGetKnownFolderPath(...) // undefined } I'm doing everything according to documentation and what I see in other threads, but it still doesn't work. 回答1: I had exactly the same problem. Another project with the same code and ancillary files (but different includes) was working. Putting #include <Shlobj.h> at the top of the file solved the problem. It might

Unable to call SHGetKnownFolderPath() even with #include <Shlobj.h> and #pragma comment (lib, “Shell32.lib”)

允我心安 提交于 2019-12-01 21:24:50
(Visual Studio 2010 / Visual C++ / Windows 7) example.cpp: #include <Shlobj.h> #pragma comment (lib, "Shell32.lib") ... void example() { SHGetKnownFolderPath(...) // undefined } I'm doing everything according to documentation and what I see in other threads, but it still doesn't work. I had exactly the same problem. Another project with the same code and ancillary files (but different includes) was working. Putting #include <Shlobj.h> at the top of the file solved the problem. It might not be replicable though, as it should have worked without doing that. Probably another Visual Studio bug.

How to enable DocumentsLibrary capability in a Windows store (WinRT) app?

本秂侑毒 提交于 2019-12-01 05:13:59
I just created a new blank XAML/C# Windows Store app in Visual Studio. I tried to create a file in the Documents folder with this code: // DEBUG ONLY: StorageFile file = await KnownFolders.DocumentsLibrary.CreateFileAsync("Hey lol.txt"); But it throws this exception (which I expected): WinRT information: Access to the specified location (DocumentsLibrary) requires a capability to be declared in the manifest. Which is fine. I expected it. So I go to Package.appxmanifest and go to Capabilities tab, and to my surprise, there is no "DocumentsLibrary" capability listed. How do I enable it if it's

How to enable DocumentsLibrary capability in a Windows store (WinRT) app?

谁说我不能喝 提交于 2019-12-01 02:37:07
问题 I just created a new blank XAML/C# Windows Store app in Visual Studio. I tried to create a file in the Documents folder with this code: // DEBUG ONLY: StorageFile file = await KnownFolders.DocumentsLibrary.CreateFileAsync("Hey lol.txt"); But it throws this exception (which I expected): WinRT information: Access to the specified location (DocumentsLibrary) requires a capability to be declared in the manifest. Which is fine. I expected it. So I go to Package.appxmanifest and go to Capabilities