using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using Vanara.InteropServices; namespace Vanara.PInvoke { public static partial class Shell32 { /// Describes match criteria. Used by methods of the IKnownFolderManager interface. [PInvokeData("Shobjidl.h", MSDNShortId = "bb762505")] public enum FFFP_MODE { /// Exact match. FFFP_EXACTMATCH, /// Nearest parent match. FFFP_NEARESTPARENTMATCH, } /// Value that represent a category by which a folder registered with the Known Folder system can be classified. [PInvokeData("Shobjidl.h", MSDNShortId = "bb762512")] public enum KF_CATEGORY { /// /// Virtual folders are not part of the file system, which is to say that they have no path. For example, Control Panel and /// Printers are virtual folders. A number of features such as folder path and redirection do not apply to this category. /// KF_CATEGORY_VIRTUAL = 1, /// /// Fixed file system folders are not managed by the Shell and are usually given a permanent path when the system is installed. /// For example, the Windows and Program Files folders are fixed folders. A number of features such as redirection do not apply /// to this category. /// KF_CATEGORY_FIXED = 2, /// /// Common folders are those file system folders used for sharing data and settings, accessible by all users of a system. For /// example, all users share a common Documents folder as well as their per-user Documents folder. /// KF_CATEGORY_COMMON = 3, /// /// Per-user folders are those stored under each user's profile and accessible only by that user. For example, /// %USERPROFILE%\Pictures. This category of folder usually supports many features including aliasing, redirection and customization. /// KF_CATEGORY_PERUSER = 4, } /// Flags that specify certain known folder behaviors. Used with the KNOWNFOLDER_DEFINITION structure. [PInvokeData("Shobjidl.h", MSDNShortId = "bb762513")] [Flags] public enum KF_DEFINITION_FLAGS { /// /// Prevent a per-user known folder from being redirected to a network location. Note that if the known folder has been flagged /// with KFDF_LOCAL_REDIRECT_ONLY but it is a subfolder of a known folder that is redirected to a network location, this /// subfolder is redirected also. /// KFDF_LOCAL_REDIRECT_ONLY = 0x00000002, /// Can be roamed through a PC-to-PC synchronization. KFDF_ROAMABLE = 0x00000004, /// /// Create the folder when the user first logs on. Normally a known folder is not created until it is first called. At that /// time, an API such as SHCreateItemInKnownFolder or IKnownFolder::GetShellItem is called with the KF_FLAG_CREATE flag. /// However, some known folders need to exist immediately. An example is those known folders under %USERPROFILE%, which must /// exist to provide a proper view. In those cases, KFDF_PRECREATE is set and Windows Explorer calls the creation API during its /// user initialization. /// KFDF_PRECREATE = 0x00000008, /// Introduced in Windows 7. The known folder is a file rather than a folder. KFDF_STREAM = 0x00000010, /// /// Introduced in Windows 7. The full path of the known folder, with any environment variables fully expanded, is stored in the /// registry under HKEY_CURRENT_USER. /// KFDF_PUBLISHEXPANDEDPATH = 0x00000020, /// Introduced in Windows 8.1. Prevent showing the Locations tab in the property dialog of the known folder. KFDF_NO_REDIRECT_UI = 0x00000040, } /// /// Flags used by IKnownFolderManager::Redirect to specify details of a known folder redirection such as permissions and ownership /// for the redirected folder. /// [PInvokeData("Shobjidl.h", MSDNShortId = "bb762515")] [Flags] public enum KF_REDIRECT_FLAGS { /// Ensure that only the user has permission to access the redirected folder. KF_REDIRECT_USER_EXCLUSIVE = 0x00000001, /// Copy the DACL of the source folder to the target to maintain current access permissions. KF_REDIRECT_COPY_SOURCE_DACL = 0x00000002, /// /// Sets the user as the owner of a newly created target folder unless the user is a member of the Administrator group, in which /// case Administrator is set as the owner. Must be called with KF_REDIRECT_SET_OWNER_EXPLICIT. /// KF_REDIRECT_OWNER_USER = 0x00000004, /// /// Set the owner of a newly created target folder. If the user belongs to the Administrators group, Administrators is assigned /// as the owner. Must be called with KF_REDIRECT_OWNER_USER. /// KF_REDIRECT_SET_OWNER_EXPLICIT = 0x00000008, /// /// Do not perform a redirection, simply check whether redirection has occurred. If so, IKnownFolderManager::Redirect returns /// S_OK; if not, or if some actions remain to be completed, it returns S_FALSE. /// KF_REDIRECT_CHECK_ONLY = 0x00000010, /// Display UI during the redirection. KF_REDIRECT_WITH_UI = 0x00000020, /// Unpin the source folder. KF_REDIRECT_UNPIN = 0x00000040, /// Pin the target folder. KF_REDIRECT_PIN = 0x00000080, /// Copy the existing contents—both files and subfolders—of the known folder to the redirected folder. KF_REDIRECT_COPY_CONTENTS = 0x00000200, /// /// Delete the contents of the source folder after they have been copied to the redirected folder. This flag is valid only if /// KF_REDIRECT_COPY_CONTENTS is set. /// KF_REDIRECT_DEL_SOURCE_CONTENTS = 0x00000400, /// Reserved. Do not use. KF_REDIRECT_EXCLUDE_ALL_KNOWN_SUBFOLDERS = 0x00000800, } /// Flags that specify the current redirection capabilities of a known folder. Used by IKnownFolder::GetRedirectionCapabilities. [PInvokeData("Shobjidl.h", MSDNShortId = "bb762514")] [Flags] public enum KF_REDIRECTION_CAPABILITIES { /// /// The folder can be redirected if any of the bits in the lower byte of the value are set but no DENY flag is set. DENY flags /// are found in the upper byte of the value. /// KF_REDIRECTION_CAPABILITIES_ALLOW_ALL = 0x000000FF, /// /// The folder can be redirected. Currently, redirection exists for only common and user folders; fixed and virtual folders /// cannot be redirected. /// KF_REDIRECTION_CAPABILITIES_REDIRECTABLE = 0x00000001, /// Redirection is not allowed. KF_REDIRECTION_CAPABILITIES_DENY_ALL = 0x000FFF00, /// The folder cannot be redirected because it is already redirected by group policy. KF_REDIRECTION_CAPABILITIES_DENY_POLICY_REDIRECTED = 0x00000100, /// The folder cannot be redirected because the policy prohibits redirecting this folder. KF_REDIRECTION_CAPABILITIES_DENY_POLICY = 0x00000200, /// The folder cannot be redirected because the calling application does not have sufficient permissions. KF_REDIRECTION_CAPABILITIES_DENY_PERMISSIONS = 0x00000400, } /// Specify special retrieval options for known folders. These values supersede CSIDL values, which have parallel meanings. [Flags] [PInvokeData("Shlobj.h", MSDNShortId = "dd378447")] public enum KNOWN_FOLDER_FLAG : uint { /// No flags. KF_FLAG_DEFAULT = 0x00000000, /// /// Build a simple IDList (PIDL) This value can be used when you want to retrieve the file system path but do not specify this /// value if you are retrieving the localized display name of the folder because it might not resolve correctly. /// KF_FLAG_SIMPLE_IDLIST = 0x00000100, /// /// Gets the folder's default path independent of the current location of its parent. KF_FLAG_DEFAULT_PATH must also be set. /// KF_FLAG_NOT_PARENT_RELATIVE = 0x00000200, /// /// Gets the default path for a known folder. If this flag is not set, the function retrieves the current—and possibly /// redirected—path of the folder. The execution of this flag includes a verification of the folder's existence unless /// KF_FLAG_DONT_VERIFY is set. /// KF_FLAG_DEFAULT_PATH = 0x00000400, /// /// Initializes the folder using its Desktop.ini settings. If the folder cannot be initialized, the function returns a failure /// code and no path is returned. This flag should always be combined with KF_FLAG_CREATE. If the folder is located on a /// network, the function might take a longer time to execute. /// KF_FLAG_INIT = 0x00000800, /// /// Gets the true system path for the folder, free of any aliased placeholders such as %USERPROFILE%, returned by /// SHGetKnownFolderIDList and IKnownFolder::GetIDList. This flag has no effect on paths returned by SHGetKnownFolderPath and /// IKnownFolder::GetPath. By default, known folder retrieval functions and methods return the aliased path if an alias exists. /// KF_FLAG_NO_ALIAS = 0x00001000, /// /// Stores the full path in the registry without using environment strings. If this flag is not set, portions of the path may be /// represented by environment strings such as %USERPROFILE%. This flag can only be used with SHSetKnownFolderPath and IKnownFolder::SetPath. /// KF_FLAG_DONT_UNEXPAND = 0x00002000, /// /// Do not verify the folder's existence before attempting to retrieve the path or IDList. If this flag is not set, an attempt /// is made to verify that the folder is truly present at the path. If that verification fails due to the folder being absent or /// inaccessible, the function returns a failure code and no path is returned. If the folder is located on a network, the /// function might take a longer time to execute. Setting this flag can reduce that lag time. /// KF_FLAG_DONT_VERIFY = 0x00004000, /// /// Forces the creation of the specified folder if that folder does not already exist. The security provisions predefined for /// that folder are applied. If the folder does not exist and cannot be created, the function returns a failure code and no path /// is returned. This value can be used only with the following functions and methods: SHGetKnownFolderPath, /// SHGetKnownFolderIDList, IKnownFolder::GetIDList, IKnownFolder::GetPath, and IKnownFolder::GetShellItem. /// KF_FLAG_CREATE = 0x00008000, /// /// Introduced in Windows 7: When running inside an app container, or when providing an app container token, this flag prevents /// redirection to app container folders. Instead, it retrieves the path that would be returned where it not running inside an /// app container. /// KF_FLAG_NO_APPCONTAINER_REDIRECTION = 0x00010000, /// Introduced in Windows 7. Return only aliased PIDLs. Do not use the file system path. KF_FLAG_ALIAS_ONLY = 0x80000000 } /// /// The KNOWNFOLDERID constants represent GUIDs that identify standard folders registered with the system as Known Folders. These /// folders are installed with Windows Vista and later operating systems, and a computer will have only folders appropriate to it /// installed. For descriptions of these folders, see CSIDL. /// [PInvokeData("Knownfolders.h", MSDNShortId = "dd378457")] public enum KNOWNFOLDERID { /// Account Pictures /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\AccountPictures /// Localized Name: Account Pictures /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_ROAMABLE, KFDF_PRECREATE /// [KnownFolderDetail("008ca0b1-55b4-4c56-b8a8-4de4b299d3be")] FOLDERID_AccountPictures, /// AddNewProgramsFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{15eae92e-f17a-4431-9f28-805e482dafd4} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("de61d971-5ebc-4f02-a3a9-6c82895e5c04")] FOLDERID_AddNewPrograms, /// Windows Administrative Tools /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Start Menu\Programs\Administrative Tools /// Localized Name: Windows Administrative Tools /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("724ef170-a42d-4fef-9f26-b60e846fba4f", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_ADMINTOOLS)] FOLDERID_AdminTools, /// Application Shortcuts /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Microsoft\Windows\Application Shortcuts /// Localized Name: Application Shortcuts /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("a3918781-e5f2-4890-b3d9-a7e54332328c")] FOLDERID_ApplicationShortcuts, /// AppsFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: shell:::{4234d49b-0245-4df3-b780-3893943456e1} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("1e87508d-89c2-42f0-8a7e-645a0f50ca58")] FOLDERID_AppsFolder, /// AppUpdatesFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\::{d450a8a1-9568-45c7-9c0e-b4f9fb4537bd} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("a305ce99-f527-492b-8b1a-7e76fa98d6e4")] FOLDERID_AppUpdates, /// Camera Roll /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Pictures\Camera Roll /// Localized Name: Camera Roll /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("ab5fb87b-7ce2-4f83-915d-550846c9537b")] FOLDERID_CameraRoll, /// Temporary Burn Folder /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Microsoft\Windows\Burn\Burn /// Localized Name: Temporary Burn Folder /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_LOCAL_REDIRECT_ONLY /// [KnownFolderDetail("9e52ab10-f80d-49df-acb8-4330f5687855", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_CDBURN_AREA)] FOLDERID_CDBurning, /// ChangeRemoveProgramsFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("df7266ac-9274-4867-8d55-3bd661de872d")] FOLDERID_ChangeRemovePrograms, /// Windows Administrative Tools /// Category: KF_CATEGORY_COMMON /// Path: %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Administrative Tools /// Localized Name: Windows Administrative Tools /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("d0384e7d-bac3-4797-8f14-cba229b392b5", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_COMMON_ADMINTOOLS)] FOLDERID_CommonAdminTools, /// OEM Links /// Category: KF_CATEGORY_COMMON /// Path: %ALLUSERSPROFILE%\OEM Links /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("c1bae2d0-10df-4334-bedd-7aa20b227a9d", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_COMMON_OEM_LINKS)] FOLDERID_CommonOEMLinks, /// Programs /// Category: KF_CATEGORY_COMMON /// Path: %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs /// Localized Name: Programs /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("0139d44e-6afe-49f2-8690-3dafcae6ffb8", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_COMMON_PROGRAMS)] FOLDERID_CommonPrograms, /// Start Menu /// Category: KF_CATEGORY_COMMON /// Path: %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu /// Localized Name: Start Menu /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("a4115719-d62e-491d-aa7c-e74b8be3b067", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_COMMON_STARTMENU)] FOLDERID_CommonStartMenu, /// Startup /// Category: KF_CATEGORY_COMMON /// Path: %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Startup /// Localized Name: Startup /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("82a5ea35-d9cd-47c5-9629-e15d2f714e6e", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_COMMON_STARTUP)] FOLDERID_CommonStartup, /// Common Templates /// Category: KF_CATEGORY_COMMON /// Path: %ALLUSERSPROFILE%\Microsoft\Windows\Templates /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("b94237e7-57ac-4347-9151-b08c6c32d1f7", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_COMMON_TEMPLATES)] FOLDERID_CommonTemplates, /// MyComputerFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{20D04FE0-3AEA-1069-A2D8-08002B30309D} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("0ac0837c-bbf8-452a-850d-79d08e667ca7", Equivalent = Environment.SpecialFolder.MyComputer /* CSIDL.CSIDL_DRIVES */)] FOLDERID_ComputerFolder, /// ConflictFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\::{E413D040-6788-4C22-957E-175D1C513A34}, /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("4bfefb45-347d-4006-a5be-ac0cb0567192")] FOLDERID_ConflictFolder, /// ConnectionsFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{7007ACC7-3202-11D1-AAD2-00805FC1270E} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("6f0cd92b-2e97-45d1-88ff-b0d186b8dedd", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_CONNECTIONS)] FOLDERID_ConnectionsFolder, /// Contacts /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Contacts /// Parsing Name: ::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\{56784854-C6CB-462B-8169-88E350ACB882} /// Tooltip: Contains Contact files. /// Localized Name: Contacts /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_ROAMABLE, KFDF_PRECREATE, KFDF_PUBLISHEXPANDEDPATH /// [KnownFolderDetail("56784854-c6cb-462b-8169-88e350acb882")] FOLDERID_Contacts, /// ControlPanelFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{26EE0668-A00A-44D7-9371-BEB064C98683}\0 /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("82a74aeb-aeb4-465c-a014-d097ee346d63", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_CONTROLS)] FOLDERID_ControlPanelFolder, /// Cookies /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Microsoft\Windows\INetCookies /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("2b0f765d-c0e9-4171-908e-08a611b84ff6", Equivalent = Environment.SpecialFolder.Cookies /* CSIDL.CSIDL_COOKIES */)] FOLDERID_Cookies, /// Desktop /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Desktop /// Localized Name: Desktop /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_ROAMABLE, KFDF_PRECREATE, KFDF_PUBLISHEXPANDEDPATH /// [KnownFolderDetail("b4bfcc3a-db2c-424c-b029-7fe99a87c641", Equivalent = Environment.SpecialFolder.Desktop /* CSIDL.CSIDL_DESKTOP */)] FOLDERID_Desktop, /// Device Metadata Store /// Category: KF_CATEGORY_COMMON /// Path: %ALLUSERSPROFILE%\Microsoft\Windows\DeviceMetadataStore /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("5ce4a5e9-e4eb-479d-b89f-130c02886155")] FOLDERID_DeviceMetadataStore, /// Documents /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Documents /// Parsing Name: shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0} /// Localized Name: Documents /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_ROAMABLE, KFDF_PRECREATE /// [KnownFolderDetail("fdd39ad0-238f-46af-adb4-6c85480369c7", Equivalent = Environment.SpecialFolder.MyDocuments /* CSIDL.CSIDL_MYDOCUMENTS */)] FOLDERID_Documents, /// Documents /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Libraries\Documents.library-ms /// Parsing Name: ::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\{7b0db17d-9cd2-4a93-9733-46cc89022e7c} /// Localized Name: Documents /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_PRECREATE, KFDF_STREAM /// [KnownFolderDetail("7b0db17d-9cd2-4a93-9733-46cc89022e7c")] FOLDERID_DocumentsLibrary, /// Downloads /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Downloads /// Parsing Name: shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{374DE290-123F-4565-9164-39C4925E467B} /// Localized Name: Downloads /// SDDL: S:AI(RA;IOOICI;;;;WD;("IMAGELOAD",TU,0x0,0x01)) /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_ROAMABLE, KFDF_PRECREATE, KFDF_PUBLISHEXPANDEDPATH /// [KnownFolderDetail("374de290-123f-4565-9164-39c4925e467b")] FOLDERID_Downloads, /// Favorites /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Favorites /// Localized Name: Favorites /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_ROAMABLE, KFDF_PRECREATE, KFDF_PUBLISHEXPANDEDPATH /// [KnownFolderDetail("1777f761-68ad-4d8a-87bd-30b759fa33dd", Equivalent = Environment.SpecialFolder.Favorites /* CSIDL.CSIDL_FAVORITES */)] FOLDERID_Favorites, /// Fonts /// Category: KF_CATEGORY_FIXED /// Path: %SystemRoot%\Fonts /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("fd228cb7-ae11-4ae3-864c-16f3910ab8fe", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_FONTS)] FOLDERID_Fonts, /// Games [KnownFolderDetail("{CAC52C1A-B53D-4edc-92D7-6B2E8AC19434}")] FOLDERID_Games, /// GameTasks /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Microsoft\Windows\GameExplorer /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_LOCAL_REDIRECT_ONLY /// [KnownFolderDetail("054fae61-4dd8-4787-80b6-090220c4b700")] FOLDERID_GameTasks, /// History /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Microsoft\Windows\History /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_LOCAL_REDIRECT_ONLY /// [KnownFolderDetail("d9dc8a3b-b784-432e-a781-5a1130a75963", Equivalent = Environment.SpecialFolder.History /* CSIDL.CSIDL_HISTORY */)] FOLDERID_History, /// HomeGroupFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{B4FB3F98-C1EA-428d-A78A-D1F5659CBA93} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("52528a6b-b9e3-4add-b60d-588c2dba842d")] FOLDERID_HomeGroup, /// HomeGroupCurrentUserFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{B4FB3F98-C1EA-428d-A78A-D1F5659CBA93}\$CurrentUser$ /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("9b74b6a3-0dfd-4f11-9e78-5f7800f2e772")] FOLDERID_HomeGroupCurrentUser, /// ImplicitAppShortcuts /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\ImplicitAppShortcuts /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("bcb5256f-79f6-4cee-b725-dc34e402fd46")] FOLDERID_ImplicitAppShortcuts, /// Cache /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Microsoft\Windows\INetCache /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_LOCAL_REDIRECT_ONLY /// [KnownFolderDetail("352481e8-33be-4251-ba85-6007caedcf9d", Equivalent = Environment.SpecialFolder.InternetCache /* CSIDL.CSIDL_INTERNET_CACHE */)] FOLDERID_InternetCache, /// InternetFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{871C5380-42A0-1069-A2EA-08002B30309D} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("4d9f7874-4e0c-4904-967b-40b0d20c3e4b", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_INTERNET)] FOLDERID_InternetFolder, /// Libraries /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Libraries /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_PRECREATE, KFDF_PUBLISHEXPANDEDPATH /// [KnownFolderDetail("1b3ea5dc-b587-4786-b4ef-bd1dc332aeae")] FOLDERID_Libraries, /// Links /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Links /// Parsing Name: ::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\{bfb9d5e0-c6a9-404c-b2b2-ae6db6af4968} /// Localized Name: Links /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_ROAMABLE, KFDF_PRECREATE, KFDF_PUBLISHEXPANDEDPATH /// [KnownFolderDetail("bfb9d5e0-c6a9-404c-b2b2-ae6db6af4968")] FOLDERID_Links, /// Local AppData /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA% /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_LOCAL_REDIRECT_ONLY, KFDF_PUBLISHEXPANDEDPATH /// [KnownFolderDetail("f1b32785-6fba-4fcf-9d55-7b8e7f157091", Equivalent = Environment.SpecialFolder.LocalApplicationData /* CSIDL.CSIDL_LOCAL_APPDATA */)] FOLDERID_LocalAppData, /// LocalAppDataLow /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%Low /// SDDL: S:(ML;OICI;NW;;;LW) /// Attributes: FILE_ATTRIBUTE_NOT_CONTENT_INDEXED /// Flags: KFDF_LOCAL_REDIRECT_ONLY, KFDF_PRECREATE, KFDF_PUBLISHEXPANDEDPATH /// [KnownFolderDetail("a520a1a4-1780-4ff6-bd18-167343c5af16")] FOLDERID_LocalAppDataLow, /// LocalizedResourcesDir /// Category: KF_CATEGORY_FIXED /// Path: %SystemRoot%\resources\0409 /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("2a00375e-224c-49de-b8d1-440df7ef3ddc", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_RESOURCES_LOCALIZED)] FOLDERID_LocalizedResourcesDir, /// Music /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Music /// Parsing Name: shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{1CF1260C-4DD0-4EBB-811F-33C572699FDE} /// Tooltip: Contains music and other audio files. /// Localized Name: Music /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_ROAMABLE, KFDF_PRECREATE /// [KnownFolderDetail("4bd8d571-6d19-48d3-be97-422220080e43", Equivalent = Environment.SpecialFolder.MyMusic /* CSIDL.CSIDL_MYMUSIC */)] FOLDERID_Music, /// Music /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Libraries\Music.library-ms /// Parsing Name: ::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\{2112AB0A-C86A-4ffe-A368-0DE96E47012E} /// Tooltip: Contains music and other audio files. /// Localized Name: Music /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_PRECREATE, KFDF_STREAM /// [KnownFolderDetail("2112ab0a-c86a-4ffe-a368-0de96e47012e")] FOLDERID_MusicLibrary, /// NetHood /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Network Shortcuts /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("c5abbf53-e17f-4121-8900-86626fc2c973", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_NETHOOD)] FOLDERID_NetHood, /// NetworkPlacesFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("d20beec4-5ca8-4905-ae3b-bf251ea09b53", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_NETWORK)] FOLDERID_NetworkFolder, /// 3D Objects /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\3D Objects /// Localized Name: 3D Objects /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("31c0dd25-9439-4f12-bf41-7ff4eda38722")] FOLDERID_Objects3D, /// Original Images /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Microsoft\Windows Photo Gallery\Original Images /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("2c36c0aa-5812-4b87-bfd0-4cd0dfb19b39")] FOLDERID_OriginalImages, /// Slide Shows /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Pictures\Slide Shows /// Localized Name: Slide Shows /// Attributes: FILE_ATTRIBUTE_READONLY /// [KnownFolderDetail("69d2cf90-fc33-4fb7-9a0c-ebb0f0fcb43c")] FOLDERID_PhotoAlbums, /// Pictures /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Libraries\Pictures.library-ms /// Parsing Name: ::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\{A990AE9F-A03B-4e80-94BC-9912D7504104} /// Tooltip: Contains digital photos, images, and graphic files. /// Localized Name: Pictures /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_PRECREATE, KFDF_STREAM /// [KnownFolderDetail("a990ae9f-a03b-4e80-94bc-9912d7504104")] FOLDERID_PicturesLibrary, /// Pictures /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Pictures /// Parsing Name: shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{3ADD1653-EB32-4CB0-BBD7-DFA0ABB5ACCA} /// Tooltip: Contains digital photos, images, and graphic files. /// Localized Name: Pictures /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_ROAMABLE, KFDF_PRECREATE /// [KnownFolderDetail("33e28130-4e1e-4676-835a-98395c3bc3bb", Equivalent = Environment.SpecialFolder.MyPictures /* CSIDL.CSIDL_MYPICTURES */)] FOLDERID_Pictures, /// Playlists /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Music\Playlists /// Localized Name: Playlists /// Attributes: FILE_ATTRIBUTE_READONLY /// [KnownFolderDetail("de92c1c7-837f-4f69-a3bb-86e631204a23")] FOLDERID_Playlists, /// PrintersFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{2227A280-3AEA-1069-A2DE-08002B30309D} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("76fc4e2d-d6ad-4519-a663-37bd56068185", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_PRINTERS)] FOLDERID_PrintersFolder, /// PrintHood /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Printer Shortcuts /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("9274bd8d-cfd1-41c3-b35e-b13f55a758f4", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_PRINTHOOD)] FOLDERID_PrintHood, /// Profile /// Category: KF_CATEGORY_FIXED /// Path: %USERPROFILE% /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("5e6c858f-0e22-4760-9afe-ea3317b67173", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_PROFILE)] FOLDERID_Profile, /// Common AppData /// Category: KF_CATEGORY_FIXED /// Path: %ALLUSERSPROFILE% /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("62ab5d82-fdc1-4dc3-a9dd-070d1d495d97", Equivalent = Environment.SpecialFolder.CommonApplicationData /* CSIDL.CSIDL_COMMON_APPDATA */)] FOLDERID_ProgramData, /// Program Files /// Category: KF_CATEGORY_FIXED /// Path: %ProgramFiles% (x86) /// Localized Name: Program Files /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("905e63b6-c1bf-494e-b29c-65b732d3d21a", Equivalent = Environment.SpecialFolder.ProgramFiles /* CSIDL.CSIDL_PROGRAM_FILES */)] FOLDERID_ProgramFiles, /// Program Files [KnownFolderDetail("{6D809377-6AF0-444b-8957-A3773F02200E}")] FOLDERID_ProgramFilesX64, /// Program Files (x86) /// Category: KF_CATEGORY_FIXED /// Path: %ProgramFiles% (x86) /// Localized Name: Program Files (x86) /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("7c5a40ef-a0fb-4bfc-874a-c0f2e0b9fa8e", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_PROGRAM_FILESX86)] FOLDERID_ProgramFilesX86, /// ProgramFilesCommon /// Category: KF_CATEGORY_FIXED /// Path: %ProgramFiles% (x86)\Common Files /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("f7f1ed05-9f6d-47a2-aaae-29d317c6f066", Equivalent = Environment.SpecialFolder.CommonProgramFiles /* CSIDL.CSIDL_PROGRAM_FILES_COMMON */)] FOLDERID_ProgramFilesCommon, /// Common Files [KnownFolderDetail("{6365D5A7-0F0D-45E5-87F6-0DA56B6A4F7D}")] FOLDERID_ProgramFilesCommonX64, /// ProgramFilesCommonX86 /// Category: KF_CATEGORY_FIXED /// Path: %ProgramFiles% (x86)\Common Files /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("de974d24-d9c6-4d3e-bf91-f4455120b917", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_PROGRAM_FILES_COMMONX86)] FOLDERID_ProgramFilesCommonX86, /// Programs /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Start Menu\Programs /// Localized Name: Programs /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("a77f5d77-2e2b-44c3-a6a2-aba601054a51", Equivalent = Environment.SpecialFolder.Programs /* CSIDL.CSIDL_PROGRAMS */)] FOLDERID_Programs, /// Public /// Category: KF_CATEGORY_FIXED /// Path: %PUBLIC% /// Localized Name: Public /// SDDL: D:PAI(A;OICI;FA;;;BA)(A;OICIIO;FA;;;CO)(A;OICI;FA;;;SY)(A;OICIIO;0x1301ff;;;IU)(A;;0x1200af;;;IU)(A;OICIIO;0x1301ff;;;SU)(A;;0x1200af;;;SU)(A;OICIIO;0x1301ff;;;S-1-5-3)(A;;0x1200af;;;S-1-5-3) /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("dfdf76a2-c82a-4d63-906a-5644ac457385")] FOLDERID_Public, /// Public Desktop /// Category: KF_CATEGORY_COMMON /// Path: %PUBLIC%\Desktop /// Localized Name: Public Desktop /// SDDL: D:P(A;OICI;FA;;;BA)(A;OICI;0x1200a9;;;IU)(A;OICI;FA;;;SY) /// Attributes: FILE_ATTRIBUTE_READONLY, FILE_ATTRIBUTE_HIDDEN /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("c4aa340d-f20f-4863-afef-f87ef2e6ba25", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_COMMON_DESKTOPDIRECTORY)] FOLDERID_PublicDesktop, /// Public Documents /// Category: KF_CATEGORY_COMMON /// Path: %PUBLIC%\Documents /// Localized Name: Public Documents /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("ed4824af-dce4-45a8-81e2-fc7965083634", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_COMMON_DOCUMENTS)] FOLDERID_PublicDocuments, /// Public Downloads /// Category: KF_CATEGORY_COMMON /// Path: %PUBLIC%\Downloads /// Localized Name: Public Downloads /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("3d644c9b-1fb8-4f30-9b45-f670235f79c0")] FOLDERID_PublicDownloads, /// PublicGameTasks /// Category: KF_CATEGORY_COMMON /// Path: %ALLUSERSPROFILE%\Microsoft\Windows\GameExplorer /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_LOCAL_REDIRECT_ONLY /// [KnownFolderDetail("debf2536-e1a8-4c59-b6a2-414586476aea")] FOLDERID_PublicGameTasks, /// PublicLibraries /// Category: KF_CATEGORY_COMMON /// Path: %PUBLIC%\Libraries /// Attributes: FILE_ATTRIBUTE_READONLY, FILE_ATTRIBUTE_HIDDEN /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("48daf80b-e6cf-4f4e-b800-0e69d84ee384")] FOLDERID_PublicLibraries, /// Public Music /// Category: KF_CATEGORY_COMMON /// Path: %PUBLIC%\Music /// Tooltip: Contains music and other audio files. /// Localized Name: Public Music /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("3214fab5-9757-4298-bb61-92a9deaa44ff", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_COMMON_MUSIC)] FOLDERID_PublicMusic, /// Public Pictures /// Category: KF_CATEGORY_COMMON /// Path: %PUBLIC%\Pictures /// Tooltip: Contains digital photos, images, and graphic files. /// Localized Name: Public Pictures /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("b6ebfb86-6907-413c-9af7-4fc2abf07cc5", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_COMMON_PICTURES)] FOLDERID_PublicPictures, /// CommonRingtones /// Category: KF_CATEGORY_COMMON /// Path: %ALLUSERSPROFILE%\Microsoft\Windows\Ringtones /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("e555ab60-153b-4d17-9f04-a5fe99fc15ec")] FOLDERID_PublicRingtones, /// Public Account Pictures /// Category: KF_CATEGORY_PERUSER /// Path: %PUBLIC%\AccountPictures /// Localized Name: Public Account Pictures /// Attributes: FILE_ATTRIBUTE_READONLY, FILE_ATTRIBUTE_HIDDEN /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("0482af6c-08f1-4c34-8c90-e17ec98b1e17")] FOLDERID_PublicUserTiles, /// Public Videos /// Category: KF_CATEGORY_COMMON /// Path: %PUBLIC%\Videos /// Tooltip: Contains movies and other video files. /// Localized Name: Public Videos /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("2400183a-6185-49fb-a2d8-4a392a602ba3", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_COMMON_VIDEO)] FOLDERID_PublicVideos, /// Quick Launch /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Internet Explorer\Quick Launch /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("52a4f021-7b75-48a9-9f6b-4b87a210bc8f")] FOLDERID_QuickLaunch, /// Recent Items /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Recent /// Localized Name: Recent Items /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("ae50c081-ebd2-438a-8655-8a092e34987a", Equivalent = Environment.SpecialFolder.Recent /* CSIDL.CSIDL_RECENT */)] FOLDERID_Recent, /// Recorded TV /// Category: KF_CATEGORY_COMMON /// Path: %PUBLIC%\Libraries\RecordedTV.library-ms /// Localized Name: Recorded TV /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_PRECREATE, KFDF_STREAM /// [KnownFolderDetail("1a6fdba2-f42d-4358-a798-b74d745926c5")] FOLDERID_RecordedTVLibrary, /// RecycleBinFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{645FF040-5081-101B-9F08-00AA002F954E} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("b7534046-3ecb-4c18-be4e-64cd4cb7d6ac", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_BITBUCKET)] FOLDERID_RecycleBinFolder, /// ResourceDir /// Category: KF_CATEGORY_FIXED /// Path: %SystemRoot%\resources /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("8ad10c31-2adb-4296-a8f7-e4701232c972", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_RESOURCES)] FOLDERID_ResourceDir, /// Ringtones /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Microsoft\Windows\Ringtones /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("c870044b-f49e-4126-a9c3-b52a1ff411e8")] FOLDERID_Ringtones, /// AppData /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA% /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("3eb685db-65f9-4cf6-a03a-e3ef65729f3d", Equivalent = Environment.SpecialFolder.ApplicationData /* CSIDL.CSIDL_APPDATA */)] FOLDERID_RoamingAppData, /// Roamed Tile Images /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Microsoft\Windows\RoamedTileImages /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("aaa8d5a5-f1d6-4259-baa8-78e7ef60835e")] FOLDERID_RoamedTileImages, /// Roaming Tiles /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Microsoft\Windows\RoamingTiles /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_PRECREATE, KFDF_PUBLISHEXPANDEDPATH /// [KnownFolderDetail("00bcfc5a-ed94-4e48-96a1-3f6217f21990")] FOLDERID_RoamingTiles, /// SampleMusic /// Category: KF_CATEGORY_COMMON /// Path: %PUBLIC%\Music\Sample Music /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("b250c668-f57d-4ee1-a63c-290ee7d1aa1f")] FOLDERID_SampleMusic, /// SamplePictures /// Category: KF_CATEGORY_COMMON /// Path: %PUBLIC%\Pictures\Sample Pictures /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("c4900540-2379-4c75-844b-64e6faf8716b")] FOLDERID_SamplePictures, /// Sample Playlists [KnownFolderDetail("{15CA69B3-30EE-49C1-ACE1-6B5EC372AFB5}")] FOLDERID_SamplePlaylists, /// SampleVideos /// Category: KF_CATEGORY_COMMON /// Path: %PUBLIC%\Videos\Sample Videos /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("859ead94-2e85-48ad-a71a-0969cb56a6cd")] FOLDERID_SampleVideos, /// Saved Games /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Saved Games /// Parsing Name: ::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\{4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4} /// Localized Name: Saved Games /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_ROAMABLE, KFDF_PRECREATE, KFDF_PUBLISHEXPANDEDPATH /// [KnownFolderDetail("4c5c32ff-bb9d-43b0-b5b4-2d72e54eaaa4")] FOLDERID_SavedGames, /// Saved Pictures /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Pictures\Saved Pictures /// Localized Name: Saved Pictures /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("3b193882-d3ad-4eab-965a-69829d1fb59f")] FOLDERID_SavedPictures, /// Saved Pictures /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Libraries\SavedPictures.library-ms /// Parsing Name: ::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\{E25B5812-BE88-4bd9-94B0-29233477B6C3} /// Localized Name: Saved Pictures /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_STREAM /// [KnownFolderDetail("e25b5812-be88-4bd9-94b0-29233477b6c3")] FOLDERID_SavedPicturesLibrary, /// Searches /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Searches /// Parsing Name: ::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\{7d1d3a04-debb-4115-95cf-2f29da2920da} /// Localized Name: Searches /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE, KFDF_PUBLISHEXPANDEDPATH /// [KnownFolderDetail("7d1d3a04-debb-4115-95cf-2f29da2920da")] FOLDERID_SavedSearches, /// Screenshots /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Pictures\Screenshots /// Localized Name: Screenshots /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("b7bede81-df94-4682-a7d8-57a52620b86f")] FOLDERID_Screenshots, /// CSCFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: shell:::{BD7A2E7B-21CB-41b2-A086-B309680C6B7E}\* /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("ee32e446-31ca-4aba-814f-a5ebd2fd6d5e")] FOLDERID_SEARCH_CSC, /// SearchHistoryFolder /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Microsoft\Windows\ConnectedSearch\History /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("0d4c3db6-03a3-462f-a0e6-08924c41b5d4")] FOLDERID_SearchHistory, /// SearchHomeFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{9343812e-1c37-4a49-a12e-4b2d810d956b} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("190337d1-b8ca-4121-a639-6d472d16972a")] FOLDERID_SearchHome, /// MAPIFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: shell:::{89D83576-6BD1-4C86-9454-BEB04E94C819}\* /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("98ec0e18-2098-4d44-8644-66979315a281")] FOLDERID_SEARCH_MAPI, /// SearchTemplatesFolder /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Microsoft\Windows\ConnectedSearch\Templates /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("7e636bfe-dfa9-4d5e-b456-d7b39851d8a9")] FOLDERID_SearchTemplates, /// SendTo /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\SendTo /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("8983036c-27c0-404b-8f08-102d10dcfd74", Equivalent = Environment.SpecialFolder.SendTo /* CSIDL.CSIDL_SENDTO */)] FOLDERID_SendTo, /// Gadgets [KnownFolderDetail("{7B396E54-9EC5-4300-BE0A-2482EBAE1A26}")] FOLDERID_SidebarDefaultParts, /// Gadgets [KnownFolderDetail("{A75D362E-50FC-4fb7-AC2C-A8BEAA314493}")] FOLDERID_SidebarParts, /// OneDrive /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\OneDrive /// Parsing Name: shell:::{018D5C66-4533-4307-9B53-224DE2ED1FE6} /// Localized Name: OneDrive /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_LOCAL_REDIRECT_ONLY, KFDF_NO_REDIRECT_UI /// [KnownFolderDetail("a52bba46-e9e1-435f-b3d9-28daa648c0f6")] FOLDERID_SkyDrive, /// OneDriveCameraRoll /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\OneDrive\Pictures\Camera Roll /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_NO_REDIRECT_UI /// [KnownFolderDetail("767e6811-49cb-4273-87c2-20f355e1085b")] FOLDERID_SkyDriveCameraRoll, /// OneDriveDocuments /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\OneDrive\Documents /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_NO_REDIRECT_UI /// [KnownFolderDetail("24d89e24-2f19-4534-9dde-6a6671fbb8fe")] FOLDERID_SkyDriveDocuments, /// OneDrivePictures /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\OneDrive\Pictures /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_NO_REDIRECT_UI /// [KnownFolderDetail("339719b5-8c47-4894-94c2-d8f77add44a6")] FOLDERID_SkyDrivePictures, /// Start Menu /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Start Menu /// Localized Name: Start Menu /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("625b53c3-ab48-4ec1-ba1f-a1ef4146fc19", Equivalent = Environment.SpecialFolder.StartMenu /* CSIDL.CSIDL_STARTMENU */)] FOLDERID_StartMenu, /// Startup /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup /// Localized Name: Startup /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("b97d20bb-f46a-4c97-ba10-5e3608430854", Equivalent = Environment.SpecialFolder.Startup /* CSIDL.CSIDL_STARTUP */)] FOLDERID_Startup, /// SyncCenterFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("43668bf8-c14e-49b2-97c9-747784d784b7")] FOLDERID_SyncManagerFolder, /// SyncResultsFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\::{BC48B32F-5910-47F5-8570-5074A8A5636A}, /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("289a9a43-be44-4057-a41b-587a76d7e7f9")] FOLDERID_SyncResultsFolder, /// SyncSetupFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{26EE0668-A00A-44D7-9371-BEB064C98683}\0\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\::{F1390A9A-A3F4-4E5D-9C5F-98F3BD8D935C}, /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("0f214138-b1d3-4a90-bba9-27cbc0c5389a")] FOLDERID_SyncSetupFolder, /// System /// Category: KF_CATEGORY_FIXED /// Path: %SystemRoot%\system32 /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("1ac14e77-02e7-4e5d-b744-2eb1ae5198b7", Equivalent = Environment.SpecialFolder.System /* CSIDL.CSIDL_SYSTEM */)] FOLDERID_System, /// SystemX86 /// Category: KF_CATEGORY_FIXED /// Path: %SystemRoot%\SysWOW64 /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("d65231b0-b2f1-4857-a4ce-a8e7c6ea7d27", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_SYSTEMX86)] FOLDERID_SystemX86, /// Templates /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Templates /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("a63293e8-664e-48db-a079-df759e0509f7", Equivalent = Environment.SpecialFolder.Templates /* CSIDL.CSIDL_TEMPLATES */)] FOLDERID_Templates, /// User Pinned /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned /// Attributes: FILE_ATTRIBUTE_HIDDEN /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("9e3995ab-1f9c-4f13-b827-48b24b6c7174")] FOLDERID_UserPinned, /// Users /// Category: KF_CATEGORY_FIXED /// Path: %HOMEDRIVE%\Users /// Localized Name: Users /// SDDL: D:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;GXGR;;;BU)(A;OICI;GXGR;;;WD) /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("0762d272-c50a-4bb0-a382-697dcd729b80")] FOLDERID_UserProfiles, /// UserProgramFiles /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Programs /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("5cd7aee2-2219-4a67-b85d-6c9ce15660cb")] FOLDERID_UserProgramFiles, /// UserProgramFilesCommon /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Programs\Common /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("bcbd3057-ca5c-4622-b42d-bc56db0ae516")] FOLDERID_UserProgramFilesCommon, /// UsersFilesFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{59031a47-3f72-44a7-89c5-5595fe6b30ee} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("f3ce0f7c-4901-4acc-8648-d5d44b04ef8f")] FOLDERID_UsersFiles, /// UsersLibrariesFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{031E4825-7B94-4dc3-B131-E946B44C8DD5} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("a302545d-deff-464b-abe8-61c8648d939b")] FOLDERID_UsersLibraries, /// Videos /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Videos /// Parsing Name: shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{A0953C92-50DC-43BF-BE83-3742FED03C9C} /// Tooltip: Contains movies and other video files. /// Localized Name: Videos /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_ROAMABLE, KFDF_PRECREATE /// [KnownFolderDetail("18989b1d-99b5-455b-841c-ab7c74e4ddfc", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_MYVIDEO)] FOLDERID_Videos, /// Videos /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Libraries\Videos.library-ms /// Parsing Name: ::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\{491E922F-5643-4af4-A7EB-4E7A138D8174} /// Tooltip: Contains movies and other video files. /// Localized Name: Videos /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_PRECREATE, KFDF_STREAM /// [KnownFolderDetail("491e922f-5643-4af4-a7eb-4e7a138d8174")] FOLDERID_VideosLibrary, /// Windows /// Category: KF_CATEGORY_FIXED /// Path: %SystemRoot% /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("f38bf404-1d43-42f2-9305-67de0b28fc23", Equivalent = (Environment.SpecialFolder)CSIDL.CSIDL_WINDOWS)] FOLDERID_Windows, /// Application Mods /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\AppMods /// Localized Name: Application Mods /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("7ad67899-66af-43ba-9156-6aad42e6c596")] FOLDERID_AllAppMods, /// Captures /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Videos\Captures /// Localized Name: Captures /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("edc0fe71-98d8-4f4a-b920-c8dc133cb165")] FOLDERID_AppCaptures, /// AppDataDesktop /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Desktop /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("b2c5e279-7add-439f-b28c-c41fe1bbf672")] FOLDERID_AppDataDesktop, /// AppDataDocuments /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Documents /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("7be16610-1f7f-44ac-bff0-83e15f2ffca1")] FOLDERID_AppDataDocuments, /// AppDataFavorites /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\Favorites /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("7cfbefbc-de1f-45aa-b843-a542ac536cc9")] FOLDERID_AppDataFavorites, /// AppDataProgramData /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\ProgramData /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("559d40a3-a036-40fa-af61-84cb430a4d34")] FOLDERID_AppDataProgramData, /// Camera Roll /// Category: KF_CATEGORY_PERUSER /// Path: %APPDATA%\Microsoft\Windows\Libraries\CameraRoll.library-ms /// Parsing Name: ::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\{2B20DF75-1EDA-4039-8097-38798227D5B7} /// Localized Name: Camera Roll /// Attributes: SECURITY_ANONYMOUS /// Flags: KFDF_STREAM /// [KnownFolderDetail("2b20df75-1eda-4039-8097-38798227d5b7")] FOLDERID_CameraRollLibrary, /// Start Menu /// Category: KF_CATEGORY_COMMON /// Path: %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu Places /// Localized Name: Start Menu /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("a440879f-87a0-4f7d-b700-0207b966194a")] FOLDERID_CommonStartMenuPlaces, /// CredentialManager /// Category: KF_CATEGORY_FIXED /// Path: %APPDATA%\Microsoft\Credentials /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("915221fb-9efe-4bda-8fd7-f78dca774f87")] FOLDERID_CredentialManager, /// [KnownFolderDetail("3db40b20-2a30-4dbe-917e-771dd21dd099")] FOLDERID_CurrentAppMods, /// CryptoKeys /// Category: KF_CATEGORY_FIXED /// Path: %APPDATA%\Microsoft\Crypto /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("b88f4daa-e7bd-49a9-b74d-02885a5dc765")] FOLDERID_CryptoKeys, /// Development Files /// Category: KF_CATEGORY_PERUSER /// Path: %LOCALAPPDATA%\DevelopmentFiles /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("dbe8e08e-3053-4bbc-b183-2a7b2b191e59")] FOLDERID_DevelopmentFiles, /// ThisDeviceFolder /// Category: KF_CATEGORY_VIRTUAL /// Parsing Name: ::{f8278c54-a712-415b-b593-b77a2be0dda9} /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("1c2ac1dc-4358-4b6c-9733-af21156576f0")] FOLDERID_Device, /// DpapiKeys /// Category: KF_CATEGORY_FIXED /// Path: %APPDATA%\Microsoft\Protect /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("10c07cd0-ef91-4567-b850-448b77cb37f9")] FOLDERID_DpapiKeys, /// Documents /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Documents /// Parsing Name: shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{d3162b92-9365-467a-956b-92703aca08af} /// Localized Name: Documents /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("f42ee2d3-909f-4907-8871-4c22fc0bf756")] FOLDERID_LocalDocuments, /// Downloads /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Downloads /// Parsing Name: shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{088e3905-0323-4b02-9826-5d99428e115f} /// Localized Name: Downloads /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("7d83ee9b-2244-4e70-b1f5-5393042af1e4")] FOLDERID_LocalDownloads, /// Music /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Music /// Parsing Name: shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de} /// Tooltip: Contains music and other audio files. /// Localized Name: Music /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("a0c69a99-21c8-4671-8703-7934162fcf1d")] FOLDERID_LocalMusic, /// Pictures /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Pictures /// Parsing Name: shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{24ad3ad4-a569-4530-98e1-ab02f9417aa8} /// Tooltip: Contains digital photos, images, and graphic files. /// Localized Name: Pictures /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("0ddd015d-b06c-45d5-8c4c-f59713854639")] FOLDERID_LocalPictures, /// Videos /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Videos /// Parsing Name: shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a} /// Tooltip: Contains movies and other video files. /// Localized Name: Videos /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_PRECREATE /// [KnownFolderDetail("35286a68-3c57-41a1-bbb1-0eae73d76c95")] FOLDERID_LocalVideos, /// OneDrive root FOLDERID_OneDrive = FOLDERID_SkyDrive, /// Recorded Calls /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Recorded Calls /// Localized Name: Recorded Calls /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("2f8b40c2-83ed-48ee-b383-a1f157ec6f9a")] FOLDERID_RecordedCalls, /// [KnownFolderDetail("12D4C69E-24AD-4923-BE19-31321C43A767")] FOLDERID_RetailDemo, /// OneDriveMusic /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\OneDrive\Music /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_NO_REDIRECT_UI /// [KnownFolderDetail("c3f2459e-80d6-45dc-bfef-1f769f2be730")] FOLDERID_SkyDriveMusic, /// Common Start menu item. [KnownFolderDetail("F26305EF-6948-40B9-B255-81453D09C785")] FOLDERID_StartMenuAllPrograms, /// SystemCertificates /// Category: KF_CATEGORY_FIXED /// Path: %APPDATA%\Microsoft\SystemCertificates /// Attributes: SECURITY_ANONYMOUS /// [KnownFolderDetail("54eed2e0-e7ca-4fdb-9148-0f4247291cfa")] FOLDERID_SystemCertificates, /// Desktop /// Category: KF_CATEGORY_PERUSER /// Path: %USERPROFILE%\Desktop /// Parsing Name: shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{B4BFCC3A-DB2C-424C-B029-7FE99A87C641} /// Localized Name: Desktop /// Attributes: FILE_ATTRIBUTE_READONLY /// Flags: KFDF_ROAMABLE /// [KnownFolderDetail("754ac886-df64-4cba-86b5-f7fbf4fbcef5")] FOLDERID_ThisPCDesktop, } /// /// Exposes methods that allow an application to retrieve information about a known folder's category, type, GUID, pointer to an /// item identifier list (PIDL) value, redirection capabilities, and definition. It provides a method for the retrieval of a known /// folder's IShellItem object. It also provides methods to get or set the path of the known folder. /// [ComImport, Guid("3AA7AF7E-9B36-420c-A8E3-F77D4674A488"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [PInvokeData("Shobjidl.h", MSDNShortId = "bb762502")] public interface IKnownFolder { /// Gets the ID of the selected folder. /// /// When this method returns, returns the KNOWNFOLDERID value of the known folder. Note, KNOWNFOLDERID values are GUIDs. /// Guid GetId(); /// Retrieves the category—virtual, fixed, common, or per-user—of the selected folder. /// When this method returns, contains a pointer to the KF_CATEGORY of the selected folder. KF_CATEGORY GetCategory(); /// /// Retrieves the location of a known folder in the Shell namespace in the form of a Shell item (IShellItem or derived interface). /// /// /// Flags that specify special retrieval options. This value can be 0; otherwise, one or more of the KNOWN_FOLDER_FLAG values. /// /// A reference to the IID of the requested interface. /// /// When this method returns, contains the interface pointer requested in . This is typically IShellItem /// or IShellItem2. /// [return: MarshalAs(UnmanagedType.Interface)] object GetShellItem([In] KNOWN_FOLDER_FLAG dwFlags, in Guid riid); /// Retrieves the path of a known folder as a string. /// /// Flags that specify special retrieval options. This value can be 0; otherwise, one or more of the KNOWN_FOLDER_FLAG values. /// /// /// When this method returns, contains the address of a pointer to a null-terminated buffer that contains the path. The calling /// application is responsible for calling CoTaskMemFree to free this resource when it is no longer needed. /// SafeCoTaskMemString GetPath([In] KNOWN_FOLDER_FLAG dwFlags); /// Assigns a new path to a known folder. /// Either zero or the following value: KF_FLAG_DONT_UNEXPAND /// The PSZ path. void SetPath([In] KNOWN_FOLDER_FLAG dwFlags, [In, MarshalAs(UnmanagedType.LPWStr)] string pszPath); /// Gets the location of the Shell namespace folder in the IDList (ITEMIDLIST) form. /// /// Flags that specify special retrieval options. This value can be 0; otherwise, one or more of the KNOWN_FOLDER_FLAG values. /// /// /// When this method returns, contains the address of an absolute PIDL. This parameter is passed uninitialized. The calling /// application is responsible for freeing this resource when it is no longer needed. /// [return: ComAliasName("ShellObjects.wirePIDL")] PIDL GetIDList([In] KNOWN_FOLDER_FLAG dwFlags); /// Retrieves the folder type. /// When this returns, contains a pointer to a FOLDERTYPEID (a GUID) that identifies the known folder type. Guid GetFolderType(); /// /// Gets a value that states whether the known folder can have its path set to a new value or what specific restrictions or /// prohibitions are placed on that redirection. /// /// /// When this method returns, contains a pointer to a KF_REDIRECTION_CAPABILITIES value that indicates the redirection /// capabilities for this folder. /// KF_REDIRECTION_CAPABILITIES GetRedirectionCapabilities(); /// /// Retrieves a structure that contains the defining elements of a known folder, which includes the folder's category, name, /// path, description, tooltip, icon, and other properties. /// /// /// When this method returns, contains a pointer to the KNOWNFOLDER_DEFINITION structure. When no longer needed, the calling /// application is responsible for calling FreeKnownFolderDefinitionFields to free this resource. /// KNOWNFOLDER_DEFINITION GetFolderDefinition(); } /// Exposes methods that create, enumerate or manage existing known folders. [ComImport, Guid("8BE2D872-86AA-4d47-B776-32CCA40C7018"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown), CoClass(typeof(CKnownFolderManager))] [PInvokeData("Shobjidl.h", MSDNShortId = "bb761744")] public interface IKnownFolderManager { /// Gets the KNOWNFOLDERID that is the equivalent of a legacy CSIDL value. /// The CSIDL value. /// When this method returns, contains a pointer to the KNOWNFOLDERID. This pointer is passed uninitialized. Guid FolderIdFromCsidl([In] int nCsidl); /// Gets the legacy CSIDL value that is the equivalent of a given KNOWNFOLDERID. /// Reference to the KNOWNFOLDERID. /// When this method returns, contains a pointer to the CSIDL value. This pointer is passed uninitialized. CSIDL FolderIdToCsidl(in Guid rfid); /// /// Gets an array of all registered known folder IDs. This can be used in enumerating all known folders. /// /// /// Type: KNOWNFOLDERID** /// /// When this method returns, contains a pointer to an array of all KNOWNFOLDERID values registered with the system. Use /// CoTaskMemFree to free these resources when they are no longer needed. /// /// /// /// Type: UINT* /// /// When this method returns, contains a pointer to the number of KNOWNFOLDERID values in the array at ppKFId. The [in] /// functionality of this parameter is not used. /// /// /// /// The caller of this method must have User privileges. /// You can use StringFromCLSID or StringFromGUID2 to convert the retrieved KNOWNFOLDERID values to strings. /// // https://docs.microsoft.com/en-us/windows/desktop/api/shobjidl_core/nf-shobjidl_core-iknownfoldermanager-getfolderids HRESULT // GetFolderIds( KNOWNFOLDERID **ppKFId, UINT *pCount ); [PInvokeData("shobjidl_core.h", MSDNShortId = "3ac09fc4-15c4-4346-94ad-2a4617c463d1")] void GetFolderIds(out SafeCoTaskMemHandle ppKFId, out uint pCount); /// /// Gets an object that represents a known folder identified by its KNOWNFOLDERID. The object allows you to query certain folder /// properties, get the current path of the folder, redirect the folder to another location, and get the path of the folder as /// an ITEMIDLIST. /// /// Reference to the KNOWNFOLDERID. /// When this method returns, contains an interface pointer to the IKnownFolder object that represents the folder. [return: MarshalAs(UnmanagedType.Interface)] IKnownFolder GetFolder(in Guid rfid); /// /// Gets an object that represents a known folder identified by its canonical name. The object allows you to query certain /// folder properties, get the current path of the folder, redirect the folder to another location, and get the path of the /// folder as an ITEMIDLIST. /// /// /// A pointer to the non-localized, canonical name for the known folder, stored as a null-terminated Unicode string. If this /// folder is a common or per-user folder, this value is also used as the value name of the "User Shell Folders" registry /// settings. This value is retrieved through the pszName member of the folder's KNOWNFOLDER_DEFINITION structure. /// /// /// When this method returns, contains the address of a pointer to the IKnownFolder object that represents the known folder. /// [return: MarshalAs(UnmanagedType.Interface)] IKnownFolder GetFolderByName([In, MarshalAs(UnmanagedType.LPWStr)] string pszCanonicalName); /// /// Adds a new known folder to the registry. Used particularly by independent software vendors (ISVs) that are adding one of /// their own folders to the known folder system. /// /// A GUID that represents the known folder. /// A pointer to a valid KNOWNFOLDER_DEFINITION structure that provides the details of the new folder. void RegisterFolder(in Guid rfid, in KNOWNFOLDER_DEFINITION pKFD); /// /// Remove a known folder from the registry, which makes it unknown to the known folder system. This method does not remove the /// folder itself. /// /// GUID or KNOWNFOLDERID that represents the known folder. void UnregisterFolder(in Guid rfid); /// /// Gets an object that represents a known folder based on a file system path. The object allows you to query certain folder /// properties, get the current path of the folder, redirect the folder to another location, and get the path of the folder as /// an ITEMIDLIST. /// /// Pointer to a null-terminated Unicode string of length MAX_PATH that contains a path to a known folder. /// /// One of the following values that specify the precision of the match of path and known folder: FFFP_EXACTMATCH = Retrieve /// only the specific known folder for the given file path; FFFP_NEARESTPARENTMATCH = If an exact match is not found for the /// given file path, retrieve the first known folder that matches one of its parent folders walking up the parent tree. /// /// /// When this method returns, contains the address of a pointer to the IKnownFolder object that represents the known folder. /// [return: MarshalAs(UnmanagedType.Interface)] IKnownFolder FindFolderFromPath([In, MarshalAs(UnmanagedType.LPWStr)] string pszPath, [In] FFFP_MODE mode); /// /// Gets an object that represents a known folder based on an IDList. The object allows you to query certain folder properties, /// get the current path of the folder, redirect the folder to another location, and get the path of the folder as an ITEMIDLIST. /// /// A pointer to the IDList. /// /// When this method returns, contains the address of a pointer to the IKnownFolder object that represents the known folder. /// [return: MarshalAs(UnmanagedType.Interface)] IKnownFolder FindFolderFromIDList([In] PIDL pidl); /// Redirects folder requests for common and per-user folders. /// A reference to the KNOWNFOLDERID of the folder to be redirected. /// /// The handle of the parent window used to display copy engine progress UI dialogs when KF_REDIRECT_WITH_UI i passed in the /// flags parameter. If no progress dialog is needed, this value can be NULL. /// /// The KF_REDIRECT_FLAGS options for redirection. /// /// A pointer to the new path for the folder. This is a null-terminated Unicode string. This value can be NULL. /// /// The number of KNOWNFOLDERID values in the array at pExclusion. /// /// Pointer to an array of KNOWNFOLDERID values that refer to subfolders of that should be excluded from /// the redirection. If no subfolders are excluded, this value can be NULL. /// /// /// When this method returns, contains the address of a pointer to a null-terminated Unicode string that contains an error /// message if one was generated. This value can be NULL. /// SafeCoTaskMemString Redirect(in Guid rfid, [In, Optional] HWND hwnd, [In] KF_REDIRECT_FLAGS flags, [In, Optional, MarshalAs(UnmanagedType.LPWStr)] string pszTargetPath, [In] uint cFolders, [In] Guid[] pExclusion); } /// Frees the allocated fields in the result from IKnownFolder::GetFolderDefinition. /// /// Type: KNOWNFOLDER_DEFINITION* /// A pointer to a KNOWNFOLDER_DEFINITION structure that contains information about the given known folder. /// /// This function does not return a value. /// /// This is an inline helper function that calls CoTaskMemFree on the fields in the structure that need to be freed. Its /// implementation can be seen in the header file. /// // https://docs.microsoft.com/en-us/windows/desktop/api/shobjidl_core/nf-shobjidl_core-freeknownfolderdefinitionfields void // FreeKnownFolderDefinitionFields( KNOWNFOLDER_DEFINITION *pKFD ); [PInvokeData("shobjidl_core.h", MSDNShortId = "0ad17dd3-e612-403a-b8c3-e93d5f259c1f")] public static void FreeKnownFolderDefinitionFields(in KNOWNFOLDER_DEFINITION pKFD) { foreach (var fi in pKFD.GetType().GetFields().Where(f => f.FieldType == typeof(StrPtrUni))) Marshal.FreeCoTaskMem((IntPtr)(StrPtrUni)fi.GetValue(pKFD)); } /// Gets an array of all registered known folder IDs. This can be used in enumerating all known folders. /// The instance. /// An enumeration of all known folder Guid values registered with the system. /// /// The caller of this method must have User privileges. /// You can use StringFromCLSID or StringFromGUID2 to convert the retrieved KNOWNFOLDERID values to strings. /// // https://docs.microsoft.com/en-us/windows/desktop/api/shobjidl_core/nf-shobjidl_core-iknownfoldermanager-getfolderids HRESULT // GetFolderIds( KNOWNFOLDERID **ppKFId, UINT *pCount ); [PInvokeData("shobjidl_core.h", MSDNShortId = "3ac09fc4-15c4-4346-94ad-2a4617c463d1")] public static IEnumerable GetFolderIds(this IKnownFolderManager mgr) { mgr.GetFolderIds(out var mem, out var c); using (mem) return mem.ToArray((int)c); } /// Gets an array of all registered known folder IDs. This can be used in enumerating all known folders. /// The instance. /// An enumeration of all KNOWNFOLDERID values registered with the system. /// The caller of this method must have User privileges. [PInvokeData("shobjidl_core.h", MSDNShortId = "3ac09fc4-15c4-4346-94ad-2a4617c463d1")] public static IEnumerable GetKnownFolderIds(this IKnownFolderManager mgr) { foreach (var id in mgr.GetFolderIds()) if (AssociateAttribute.TryEnumLookup(id, out var kf)) yield return kf; } /// Extension method to simplify using the method. /// Type of the interface to get. /// An instance. /// /// Flags that specify special retrieval options. This value can be 0; otherwise, one or more of the KNOWN_FOLDER_FLAG values. /// /// Receives the interface pointer requested in . public static T GetShellItem(this IKnownFolder fv, [In] KNOWN_FOLDER_FLAG dwFlags = KNOWN_FOLDER_FLAG.KF_FLAG_DEFAULT) where T : class => (T)fv.GetShellItem(dwFlags, typeof(T).GUID); /// Defines the specifics of a known folder. [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [PInvokeData("Shobjidl.h", MSDNShortId = "bb773325")] public struct KNOWNFOLDER_DEFINITION { /// A single value from the KF_CATEGORY constants that classifies the folder as virtual, fixed, common, or per-user. public KF_CATEGORY category; /// /// A pointer to the non-localized, canonical name for the known folder, stored as a null-terminated Unicode string. If this /// folder is a common or per-user folder, this value is also used as the value name of the "User Shell Folders" registry /// settings. This name is meant to be a unique, human-readable name. Third parties are recommended to follow the format /// Company.Application.Name. The name given here should not be confused with the display name. /// public StrPtrUni pszName; /// /// A pointer to a short description of the known folder, stored as a null-terminated Unicode string. This description should /// include the folder's purpose and usage. /// public StrPtrUni pszDescription; /// /// A KNOWNFOLDERID value that names another known folder to serve as the parent folder. Applies to common and per-user folders /// only. This value is used in conjunction with pszRelativePath. See Remarks for more details. This value is optional if no /// value is provided for pszRelativePath. /// public Guid fidParent; /// /// Optional. A pointer to a path relative to the parent folder specified in fidParent. This is a null-terminated Unicode /// string, refers to the physical file system path, and is not localized. Applies to common and per-user folders only. See /// Remarks for more details. /// public StrPtrUni pszRelativePath; /// /// A pointer to the Shell namespace folder path of the folder, stored as a null-terminated Unicode string. Applies to virtual /// folders only. For example, Control Panel has a parsing name of ::%CLSID_MyComputer%\::%CLSID_ControlPanel%. /// public StrPtrUni pszParsingName; /// /// Optional. A pointer to the default tooltip resource used for this known folder when it is created. This is a null-terminated /// Unicode string in this form: /// Module name, Resource ID /// /// For example, @%_SYS_MOD_PATH%,-12688 is the tooltip for Common Pictures.When the folder is created, this string is stored in /// that folder's copy of Desktop.ini. It can be changed later by other Shell APIs. This resource might be localized. /// /// This information is not required for virtual folders. /// public StrPtrUni pszTooltip; /// /// Optional. A pointer to the default localized name resource used when the folder is created. This is a null-terminated /// Unicode string in this form: /// Module name, Resource ID /// /// When the folder is created, this string is stored in that folder's copy of Desktop.ini. It can be changed later by other /// Shell APIs. /// /// This information is not required for virtual folders. /// public StrPtrUni pszLocalizedName; /// /// Optional. A pointer to the default icon resource used when the folder is created. This is a null-terminated Unicode string /// in this form: /// Module name, Resource ID /// /// When the folder is created, this string is stored in that folder's copy of Desktop.ini. It can be changed later by other /// Shell APIs. /// /// This information is not required for virtual folders. /// public StrPtrUni pszIcon; /// /// Optional. A pointer to a Security Descriptor Definition Language format string. This is a null-terminated Unicode string /// that describes the default security descriptor that the folder receives when it is created. If this parameter is NULL, the /// new folder inherits the security descriptor of its parent. This is particularly useful for common folders that are accessed /// by all users. /// public StrPtrUni pszSecurity; /// /// Optional. Default file system attributes given to the folder when it is created. For example, the file could be hidden and /// read-only (FILE_ATTRIBUTE_HIDDEN and FILE_ATTRIBUTE_READONLY). For a complete list of possible values, see the /// dwFlagsAndAttributes parameter of the CreateFile function. Set to -1 if not needed. /// public FileFlagsAndAttributes dwAttributes; /// /// Optional. One of more values from the KF_DEFINITION_FLAGS enumeration that allow you to restrict redirection, allow PC-to-PC /// roaming, and control the time at which the known folder is created. Set to 0 if not needed. /// public KF_DEFINITION_FLAGS kfdFlags; /// /// One of the FOLDERTYPEID values that identifies the known folder type based on its contents (such as documents, music, or /// photographs). This value is a GUID. /// public Guid ftidType; /// Frees the allocated fields in the result from IKnownFolder::GetFolderDefinition. /// /// This is an inline helper function that calls CoTaskMemFree on the fields in the structure that need to be freed. Its /// implementation can be seen in the header file. /// // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-freeknownfolderdefinitionfields void // FreeKnownFolderDefinitionFields( KNOWNFOLDER_DEFINITION *pKFD ); [PInvokeData("shobjidl_core.h", MSDNShortId = "NF:shobjidl_core.FreeKnownFolderDefinitionFields")] public void FreeKnownFolderDefinitionFields() { Marshal.FreeCoTaskMem((IntPtr)pszName); Marshal.FreeCoTaskMem((IntPtr)pszDescription); Marshal.FreeCoTaskMem((IntPtr)pszRelativePath); Marshal.FreeCoTaskMem((IntPtr)pszParsingName); Marshal.FreeCoTaskMem((IntPtr)pszTooltip); Marshal.FreeCoTaskMem((IntPtr)pszLocalizedName); Marshal.FreeCoTaskMem((IntPtr)pszIcon); Marshal.FreeCoTaskMem((IntPtr)pszSecurity); } } /// Class interface for IKnownFolderManager. [ComImport, Guid("4df0c730-df9d-4ae3-9153-aa6b82e9795a"), ClassInterface(ClassInterfaceType.None)] public class CKnownFolderManager { } /// Provides information about a . [AttributeUsage(AttributeTargets.Field)] internal class KnownFolderDetailAttribute : AssociateAttribute { /// The equivalent SpecialFolder. public Environment.SpecialFolder Equivalent = (Environment.SpecialFolder)0XFFFF; /// Initializes a new instance of the class with a GUID for the . /// The GUID for the . public KnownFolderDetailAttribute(string knownFolderGuid) : base(knownFolderGuid) { } } } }