From 183bc5006da1ae7d15d31d0555d3f3cb8c9ffd0e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mariusz=20Pluci=C5=84ski?= Date: Thu, 4 Aug 2011 16:25:17 +0200 Subject: [PATCH] shell32/tests: Add verification of known folders attributes. --- dlls/shell32/tests/shellpath.c | 319 ++++++++++++++++++++++----------- 1 file changed, 213 insertions(+), 106 deletions(-) diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index d4d5281929..645bbe5776 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -890,8 +890,8 @@ if (0) { /* crashes */ /* Standard CSIDL values (and their flags) uses only two less-significant bytes */ #define NO_CSIDL 0x10000 #define CSIDL_TODO_WINE 0x20000 -#define KNOWN_FOLDER(id, csidl, name, category, parent, relative_path, parsing_name) \ - { &id, # id, csidl, # csidl, name, category, &parent, # parent, relative_path, parsing_name, __LINE__ } +#define KNOWN_FOLDER(id, csidl, name, category, parent, relative_path, parsing_name, attributes) \ + { &id, # id, csidl, # csidl, name, category, &parent, # parent, relative_path, parsing_name, attributes, __LINE__ } /* non-published known folders test */ static const GUID _FOLDERID_CryptoKeys = {0xB88F4DAA, 0xE7BD, 0x49A9, {0xB7, 0x4D, 0x02, 0x88, 0x5A, 0x5D, 0xC7, 0x65} }; @@ -910,6 +910,7 @@ struct knownFolderDef { const char *sParent; const char *sRelativePath; const char *sParsingName; + const DWORD attributes; const int line; }; @@ -930,14 +931,16 @@ static const struct knownFolderDef known_folders[] = { GUID_NULL, NULL, "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{15eae92e-f17a-4431-9f28-805e482dafd4}\0" - "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{15eae92e-f17a-4431-9f28-805e482dafd4}\0\0" /* 6.1 */), + "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{15eae92e-f17a-4431-9f28-805e482dafd4}\0\0" /* 6.1 */, + 0), KNOWN_FOLDER(FOLDERID_AdminTools, CSIDL_ADMINTOOLS, "Administrative Tools", KF_CATEGORY_PERUSER, FOLDERID_Programs, "Administrative Tools", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_AppUpdates, NO_CSIDL, "AppUpdatesFolder", @@ -945,14 +948,16 @@ static const struct knownFolderDef known_folders[] = { GUID_NULL, NULL, "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\\::{d450a8a1-9568-45c7-9c0e-b4f9fb4537bd}\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\\::{d450a8a1-9568-45c7-9c0e-b4f9fb4537bd}\0\0" /* 6.1 */), + "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\\::{d450a8a1-9568-45c7-9c0e-b4f9fb4537bd}\0\0" /* 6.1 */, + 0), KNOWN_FOLDER(FOLDERID_CDBurning, CSIDL_CDBURN_AREA, "CD Burning", KF_CATEGORY_PERUSER, FOLDERID_LocalAppData, "Microsoft\\Windows\\Burn\\Burn", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_ChangeRemovePrograms, NO_CSIDL, "ChangeRemoveProgramsFolder", @@ -960,55 +965,63 @@ static const struct knownFolderDef known_folders[] = { GUID_NULL, NULL, "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\0\0" /* 6.1 */), + "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\0\0" /* 6.1 */, + 0), KNOWN_FOLDER(FOLDERID_CommonAdminTools, CSIDL_COMMON_ADMINTOOLS, "Common Administrative Tools", KF_CATEGORY_COMMON, FOLDERID_CommonPrograms, "Administrative Tools", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_CommonOEMLinks, CSIDL_COMMON_OEM_LINKS,"OEM Links", KF_CATEGORY_COMMON, FOLDERID_ProgramData, "OEM Links", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_CommonPrograms, CSIDL_COMMON_PROGRAMS, "Common Programs", KF_CATEGORY_COMMON, FOLDERID_CommonStartMenu, "Programs", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_CommonStartMenu, CSIDL_COMMON_STARTMENU, "Common Start Menu", KF_CATEGORY_COMMON, FOLDERID_ProgramData, "Microsoft\\Windows\\Start Menu", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_CommonStartup, CSIDL_COMMON_STARTUP, "Common Startup", KF_CATEGORY_COMMON, FOLDERID_CommonPrograms, "StartUp", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_CommonTemplates, CSIDL_COMMON_TEMPLATES, "Common Templates", KF_CATEGORY_COMMON, FOLDERID_ProgramData, "Microsoft\\Windows\\Templates", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_ComputerFolder, CSIDL_DRIVES, "MyComputerFolder", KF_CATEGORY_VIRTUAL, GUID_NULL, NULL, - "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\0\0"), + "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\0\0", + 0), KNOWN_FOLDER(FOLDERID_ConflictFolder, NO_CSIDL, "ConflictFolder", @@ -1016,7 +1029,8 @@ static const struct knownFolderDef known_folders[] = { GUID_NULL, NULL, "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{E413D040-6788-4C22-957E-175D1C513A34},\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{E413D040-6788-4C22-957E-175D1C513A34},\0\0" /* 6.1 */), + "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{E413D040-6788-4C22-957E-175D1C513A34},\0\0" /* 6.1 */, + 0), KNOWN_FOLDER(FOLDERID_ConnectionsFolder, CSIDL_CONNECTIONS, "ConnectionsFolder", @@ -1024,14 +1038,16 @@ static const struct knownFolderDef known_folders[] = { GUID_NULL, NULL, "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}\0\0" /* 6.1 */), + "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}\0\0" /* 6.1 */, + 0), KNOWN_FOLDER(FOLDERID_Contacts, NO_CSIDL, "Contacts", KF_CATEGORY_PERUSER, FOLDERID_Profile, "Contacts", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{56784854-C6CB-462B-8169-88E350ACB882}\0\0"), + "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{56784854-C6CB-462B-8169-88E350ACB882}\0\0", + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_ControlPanelFolder, CSIDL_CONTROLS, "ControlPanelFolder", @@ -1039,273 +1055,312 @@ static const struct knownFolderDef known_folders[] = { GUID_NULL, NULL, "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\0\0" /* 6.1 */), + "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\0\0" /* 6.1 */, + 0), KNOWN_FOLDER(FOLDERID_Cookies, CSIDL_COOKIES, "Cookies", KF_CATEGORY_PERUSER, FOLDERID_RoamingAppData, "Microsoft\\Windows\\Cookies", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_Desktop, CSIDL_DESKTOP, "Desktop", KF_CATEGORY_PERUSER, FOLDERID_Profile, "Desktop", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_DeviceMetadataStore, NO_CSIDL, "Device Metadata Store", KF_CATEGORY_COMMON, FOLDERID_ProgramData, "Microsoft\\Windows\\DeviceMetadataStore", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_Documents, CSIDL_MYDOCUMENTS, "Personal", KF_CATEGORY_PERUSER, FOLDERID_Profile, "Documents", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{FDD39AD0-238F-46AF-ADB4-6C85480369C7}\0\0"), + "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{FDD39AD0-238F-46AF-ADB4-6C85480369C7}\0\0", + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_DocumentsLibrary, NO_CSIDL, "DocumentsLibrary", KF_CATEGORY_PERUSER, FOLDERID_Libraries, "Documents.library-ms", - "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{7b0db17d-9cd2-4a93-9733-46cc89022e7c}\0\0"), + "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{7b0db17d-9cd2-4a93-9733-46cc89022e7c}\0\0", + 0), KNOWN_FOLDER(FOLDERID_Downloads, NO_CSIDL, "Downloads", KF_CATEGORY_PERUSER, FOLDERID_Profile, "Downloads", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_Favorites, CSIDL_FAVORITES, "Favorites", KF_CATEGORY_PERUSER, FOLDERID_Profile, "Favorites", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_Fonts, CSIDL_FONTS, "Fonts", KF_CATEGORY_FIXED, FOLDERID_Windows, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_Games, NO_CSIDL, "Games", KF_CATEGORY_VIRTUAL, GUID_NULL, NULL, - "::{ED228FDF-9EA8-4870-83b1-96b02CFE0D52}\0\0"), + "::{ED228FDF-9EA8-4870-83b1-96b02CFE0D52}\0\0", + 0), KNOWN_FOLDER(FOLDERID_GameTasks, NO_CSIDL, "GameTasks", KF_CATEGORY_PERUSER, FOLDERID_LocalAppData, "Microsoft\\Windows\\GameExplorer", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_History, CSIDL_HISTORY, "History", KF_CATEGORY_PERUSER, FOLDERID_LocalAppData, "Microsoft\\Windows\\History", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_HomeGroup, NO_CSIDL, "HomeGroupFolder", KF_CATEGORY_VIRTUAL, GUID_NULL, NULL, - "::{B4FB3F98-C1EA-428d-A78A-D1F5659CBA93}\0\0"), + "::{B4FB3F98-C1EA-428d-A78A-D1F5659CBA93}\0\0", + 0), KNOWN_FOLDER(FOLDERID_ImplicitAppShortcuts, NO_CSIDL, "ImplicitAppShortcuts", KF_CATEGORY_PERUSER, FOLDERID_UserPinned, "ImplicitAppShortcuts", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_InternetCache, CSIDL_INTERNET_CACHE, "Cache", KF_CATEGORY_PERUSER, FOLDERID_LocalAppData, "Microsoft\\Windows\\Temporary Internet Files", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_InternetFolder, CSIDL_INTERNET, "InternetFolder", KF_CATEGORY_VIRTUAL, GUID_NULL, NULL, - "::{871C5380-42A0-1069-A2EA-08002B30309D}\0\0"), + "::{871C5380-42A0-1069-A2EA-08002B30309D}\0\0", + 0), KNOWN_FOLDER(FOLDERID_Libraries, NO_CSIDL, "Libraries", KF_CATEGORY_PERUSER, FOLDERID_RoamingAppData, "Microsoft\\Windows\\Libraries", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_Links, NO_CSIDL, "Links", KF_CATEGORY_PERUSER, FOLDERID_Profile, "Links", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{bfb9d5e0-c6a9-404c-b2b2-ae6db6af4968}\0\0"), + "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{bfb9d5e0-c6a9-404c-b2b2-ae6db6af4968}\0\0", + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_LocalAppData, CSIDL_LOCAL_APPDATA, "Local AppData", KF_CATEGORY_PERUSER, FOLDERID_Profile, "AppData\\Local", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_LocalAppDataLow, NO_CSIDL, "LocalAppDataLow", KF_CATEGORY_PERUSER, FOLDERID_Profile, "AppData\\LocalLow", - NULL), + NULL, + FILE_ATTRIBUTE_NOT_CONTENT_INDEXED), KNOWN_FOLDER(FOLDERID_LocalizedResourcesDir, CSIDL_RESOURCES_LOCALIZED, "LocalizedResourcesDir", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_Music, CSIDL_MYMUSIC, "My Music", KF_CATEGORY_PERUSER, FOLDERID_Profile, "Music", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{4BD8D571-6D19-48D3-BE97-422220080E43}\0\0"), + "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{4BD8D571-6D19-48D3-BE97-422220080E43}\0\0", + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_MusicLibrary, NO_CSIDL, "MusicLibrary", KF_CATEGORY_PERUSER, FOLDERID_Libraries, "Music.library-ms", - "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{2112AB0A-C86A-4ffe-A368-0DE96E47012E}\0\0"), + "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{2112AB0A-C86A-4ffe-A368-0DE96E47012E}\0\0", + 0), KNOWN_FOLDER(FOLDERID_NetHood, CSIDL_NETHOOD, "NetHood", KF_CATEGORY_PERUSER, FOLDERID_RoamingAppData, "Microsoft\\Windows\\Network Shortcuts", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_NetworkFolder, CSIDL_NETWORK, "NetworkPlacesFolder", KF_CATEGORY_VIRTUAL, GUID_NULL, NULL, - "::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\0\0"), + "::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\0\0", + 0), KNOWN_FOLDER(FOLDERID_OriginalImages, NO_CSIDL, "Original Images", KF_CATEGORY_PERUSER, FOLDERID_LocalAppData, "Microsoft\\Windows Photo Gallery\\Original Images", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_PhotoAlbums, NO_CSIDL, "PhotoAlbums", KF_CATEGORY_PERUSER, FOLDERID_Pictures, "Slide Shows", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_Pictures, CSIDL_MYPICTURES, "My Pictures", KF_CATEGORY_PERUSER, FOLDERID_Profile, "Pictures", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{33E28130-4E1E-4676-835A-98395C3BC3BB}\0\0"), + "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{33E28130-4E1E-4676-835A-98395C3BC3BB}\0\0", + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_PicturesLibrary, NO_CSIDL, "PicturesLibrary", KF_CATEGORY_PERUSER, FOLDERID_Libraries, "Pictures.library-ms", - "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{A990AE9F-A03B-4e80-94BC-9912D7504104}\0\0"), + "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{A990AE9F-A03B-4e80-94BC-9912D7504104}\0\0", + 0), KNOWN_FOLDER(FOLDERID_Playlists, NO_CSIDL, "Playlists", KF_CATEGORY_PERUSER, FOLDERID_Music, "Playlists", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_PrintersFolder, CSIDL_PRINTERS, "PrintersFolder", KF_CATEGORY_VIRTUAL, GUID_NULL, NULL, - "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{2227A280-3AEA-1069-A2DE-08002B30309D}\0\0"), + "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{2227A280-3AEA-1069-A2DE-08002B30309D}\0\0", + 0), KNOWN_FOLDER(FOLDERID_PrintHood, CSIDL_PRINTHOOD, "PrintHood", KF_CATEGORY_PERUSER, FOLDERID_RoamingAppData, "Microsoft\\Windows\\Printer Shortcuts", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_Profile, CSIDL_PROFILE, "Profile", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_ProgramData, CSIDL_COMMON_APPDATA, "Common AppData", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_ProgramFiles, CSIDL_PROGRAM_FILES, "ProgramFiles", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_ProgramFilesCommon, CSIDL_PROGRAM_FILES_COMMON, "ProgramFilesCommon", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_ProgramFilesCommonX86, NO_CSIDL, "ProgramFilesCommonX86", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_ProgramFilesX86, CSIDL_PROGRAM_FILESX86, "ProgramFilesX86", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_Programs, CSIDL_PROGRAMS, "Programs", KF_CATEGORY_PERUSER, FOLDERID_StartMenu, "Programs", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_Public, NO_CSIDL, "Public", @@ -1313,217 +1368,248 @@ static const struct knownFolderDef known_folders[] = { GUID_NULL, NULL, "::{4336a54d-038b-4685-ab02-99bb52d3fb8b}\0" - "(null)\0\0" /* 6.1 */), + "(null)\0\0" /* 6.1 */, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_PublicDesktop, CSIDL_COMMON_DESKTOPDIRECTORY, "Common Desktop", KF_CATEGORY_COMMON, FOLDERID_Public, "Desktop", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN), KNOWN_FOLDER(FOLDERID_PublicDocuments, CSIDL_COMMON_DOCUMENTS, "Common Documents", KF_CATEGORY_COMMON, FOLDERID_Public, "Documents", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_PublicDownloads, NO_CSIDL, "CommonDownloads", KF_CATEGORY_COMMON, FOLDERID_Public, "Downloads", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_PublicGameTasks, NO_CSIDL, "PublicGameTasks", KF_CATEGORY_COMMON, FOLDERID_ProgramData, "Microsoft\\Windows\\GameExplorer", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_PublicLibraries, NO_CSIDL, "PublicLibraries", KF_CATEGORY_COMMON, FOLDERID_Public, "Libraries", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN), KNOWN_FOLDER(FOLDERID_PublicMusic, CSIDL_COMMON_MUSIC, "CommonMusic", KF_CATEGORY_COMMON, FOLDERID_Public, "Music", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_PublicPictures, CSIDL_COMMON_PICTURES, "CommonPictures", KF_CATEGORY_COMMON, FOLDERID_Public, "Pictures", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_PublicRingtones, NO_CSIDL, "CommonRingtones", KF_CATEGORY_COMMON, FOLDERID_ProgramData, "Microsoft\\Windows\\Ringtones", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_PublicVideos, CSIDL_COMMON_VIDEO, "CommonVideo", KF_CATEGORY_COMMON, FOLDERID_Public, "Videos", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_QuickLaunch, NO_CSIDL, "Quick Launch", KF_CATEGORY_PERUSER, FOLDERID_RoamingAppData, "Microsoft\\Internet Explorer\\Quick Launch", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_Recent, CSIDL_RECENT, "Recent", KF_CATEGORY_PERUSER, FOLDERID_RoamingAppData, "Microsoft\\Windows\\Recent", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_RecordedTVLibrary, NO_CSIDL, "RecordedTVLibrary", KF_CATEGORY_COMMON, FOLDERID_PublicLibraries, "RecordedTV.library-ms", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_RecycleBinFolder, CSIDL_BITBUCKET, "RecycleBinFolder", KF_CATEGORY_VIRTUAL, GUID_NULL, NULL, - "::{645FF040-5081-101B-9F08-00AA002F954E}\0\0"), + "::{645FF040-5081-101B-9F08-00AA002F954E}\0\0", + 0), KNOWN_FOLDER(FOLDERID_ResourceDir, CSIDL_RESOURCES, "ResourceDir", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_Ringtones, NO_CSIDL, "Ringtones", KF_CATEGORY_PERUSER, FOLDERID_LocalAppData, "Microsoft\\Windows\\Ringtones", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_RoamingAppData, CSIDL_APPDATA, "AppData", KF_CATEGORY_PERUSER, FOLDERID_Profile, "AppData\\Roaming", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_SampleMusic, NO_CSIDL, "SampleMusic", KF_CATEGORY_COMMON, FOLDERID_PublicMusic, "Sample Music", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_SamplePictures, NO_CSIDL, "SamplePictures", KF_CATEGORY_COMMON, FOLDERID_PublicPictures, "Sample Pictures", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_SamplePlaylists, NO_CSIDL, "SamplePlaylists", KF_CATEGORY_COMMON, FOLDERID_PublicMusic, "Sample Playlists", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_SampleVideos, NO_CSIDL, "SampleVideos", KF_CATEGORY_COMMON, FOLDERID_PublicVideos, "Sample Videos", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_SavedGames, NO_CSIDL, "SavedGames", KF_CATEGORY_PERUSER, FOLDERID_Profile, "Saved Games", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4}\0\0"), + "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4}\0\0", + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_SavedSearches, NO_CSIDL, "Searches", KF_CATEGORY_PERUSER, FOLDERID_Profile, "Searches", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{7d1d3a04-debb-4115-95cf-2f29da2920da}\0\0"), + "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{7d1d3a04-debb-4115-95cf-2f29da2920da}\0\0", + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_SEARCH_CSC, NO_CSIDL, "CSCFolder", KF_CATEGORY_VIRTUAL, GUID_NULL, NULL, - "shell:::{BD7A2E7B-21CB-41b2-A086-B309680C6B7E}\\*\0\0"), + "shell:::{BD7A2E7B-21CB-41b2-A086-B309680C6B7E}\\*\0\0", + 0), KNOWN_FOLDER(FOLDERID_SearchHome, NO_CSIDL, "SearchHomeFolder", KF_CATEGORY_VIRTUAL, GUID_NULL, NULL, - "::{9343812e-1c37-4a49-a12e-4b2d810d956b}\0\0"), + "::{9343812e-1c37-4a49-a12e-4b2d810d956b}\0\0", + 0), KNOWN_FOLDER(FOLDERID_SEARCH_MAPI, NO_CSIDL, "MAPIFolder", KF_CATEGORY_VIRTUAL, GUID_NULL, NULL, - "shell:::{89D83576-6BD1-4C86-9454-BEB04E94C819}\\*\0\0"), + "shell:::{89D83576-6BD1-4C86-9454-BEB04E94C819}\\*\0\0", + 0), KNOWN_FOLDER(FOLDERID_SendTo, CSIDL_SENDTO, "SendTo", KF_CATEGORY_PERUSER, FOLDERID_RoamingAppData, "Microsoft\\Windows\\SendTo", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_SidebarDefaultParts, NO_CSIDL, "Default Gadgets", KF_CATEGORY_COMMON, FOLDERID_ProgramFiles, "Windows Sidebar\\Gadgets", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_SidebarParts, NO_CSIDL, "Gadgets", KF_CATEGORY_PERUSER, FOLDERID_LocalAppData, "Microsoft\\Windows Sidebar\\Gadgets", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_StartMenu, CSIDL_STARTMENU, "Start Menu", KF_CATEGORY_PERUSER, FOLDERID_RoamingAppData, "Microsoft\\Windows\\Start Menu", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_Startup, CSIDL_STARTUP, "Startup", KF_CATEGORY_PERUSER, FOLDERID_Programs, "StartUp", - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_SyncManagerFolder, NO_CSIDL, "SyncCenterFolder", @@ -1531,7 +1617,8 @@ static const struct knownFolderDef known_folders[] = { GUID_NULL, NULL, "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\0\0" /* 6.1 */), + "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\0\0" /* 6.1 */, + 0), KNOWN_FOLDER(FOLDERID_SyncResultsFolder, NO_CSIDL, "SyncResultsFolder", @@ -1539,7 +1626,8 @@ static const struct knownFolderDef known_folders[] = { GUID_NULL, NULL, "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{BC48B32F-5910-47F5-8570-5074A8A5636A},\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{BC48B32F-5910-47F5-8570-5074A8A5636A},\0\0"), + "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{BC48B32F-5910-47F5-8570-5074A8A5636A},\0\0", + 0), KNOWN_FOLDER(FOLDERID_SyncSetupFolder, NO_CSIDL, "SyncSetupFolder", @@ -1547,119 +1635,136 @@ static const struct knownFolderDef known_folders[] = { GUID_NULL, NULL, "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{F1390A9A-A3F4-4E5D-9C5F-98F3BD8D935C},\0" - "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{F1390A9A-A3F4-4E5D-9C5F-98F3BD8D935C},\0\0" /* 6.1 */), + "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{F1390A9A-A3F4-4E5D-9C5F-98F3BD8D935C},\0\0" /* 6.1 */, + 0), KNOWN_FOLDER(FOLDERID_System, CSIDL_SYSTEM, "System", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_SystemX86, CSIDL_SYSTEMX86, "SystemX86", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_Templates, CSIDL_TEMPLATES, "Templates", KF_CATEGORY_PERUSER, FOLDERID_RoamingAppData, "Microsoft\\Windows\\Templates", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_UserPinned, NO_CSIDL, "User Pinned", KF_CATEGORY_PERUSER, FOLDERID_QuickLaunch, "User Pinned", - NULL), + NULL, + FILE_ATTRIBUTE_HIDDEN), KNOWN_FOLDER(FOLDERID_UserProfiles, NO_CSIDL, "UserProfiles", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_UserProgramFiles, NO_CSIDL, "UserProgramFiles", KF_CATEGORY_PERUSER, FOLDERID_LocalAppData, "Programs", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_UserProgramFilesCommon, NO_CSIDL, "UserProgramFilesCommon", KF_CATEGORY_PERUSER, FOLDERID_UserProgramFiles, "Common", - NULL), + NULL, + 0), KNOWN_FOLDER(FOLDERID_UsersFiles, NO_CSIDL, "UsersFilesFolder", KF_CATEGORY_VIRTUAL, GUID_NULL, NULL, - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\0\0"), + "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\0\0", + 0), KNOWN_FOLDER(FOLDERID_UsersLibraries, NO_CSIDL, "UsersLibrariesFolder", KF_CATEGORY_VIRTUAL, GUID_NULL, NULL, - "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\0\0"), + "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\0\0", + 0), KNOWN_FOLDER(FOLDERID_Videos, CSIDL_MYVIDEO, "My Video", KF_CATEGORY_PERUSER, FOLDERID_Profile, "Videos", - "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{18989B1D-99B5-455B-841C-AB7C74E4DDFC}\0\0"), + "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{18989B1D-99B5-455B-841C-AB7C74E4DDFC}\0\0", + FILE_ATTRIBUTE_READONLY), KNOWN_FOLDER(FOLDERID_VideosLibrary, NO_CSIDL, "VideosLibrary", KF_CATEGORY_PERUSER, FOLDERID_Libraries, "Videos.library-ms", - "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{491E922F-5643-4af4-A7EB-4E7A138D8174}\0\0"), + "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{491E922F-5643-4af4-A7EB-4E7A138D8174}\0\0", + 0), KNOWN_FOLDER(FOLDERID_Windows, CSIDL_WINDOWS, "Windows", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(_FOLDERID_CredentialManager, NO_CSIDL, "CredentialManager", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(_FOLDERID_CryptoKeys, NO_CSIDL, "CryptoKeys", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(_FOLDERID_DpapiKeys, NO_CSIDL, "DpapiKeys", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), KNOWN_FOLDER(_FOLDERID_SystemCertificates, NO_CSIDL, "SystemCertificates", KF_CATEGORY_FIXED, GUID_NULL, NULL, - NULL), + NULL, + 0), { NULL, NULL, 0, NULL, NULL, 0, 0 } }; #undef KNOWN_FOLDER @@ -1757,6 +1862,8 @@ static void check_known_folder(IKnownFolderManager *mgr, KNOWNFOLDERID *folderId ok_(__FILE__, known_folder->line)(validPath, "invalid known folder parsing name returned for %s: %s retrieved\n", known_folder->sFolderId, wine_dbgstr_w(kfd.pszParsingName)); + ok_(__FILE__, known_folder->line)(known_folder->attributes == kfd.dwAttributes, "invalid known folder attributes for %s: 0x%08x expected, but 0x%08x retrieved\n", known_folder->sFolderId, known_folder->attributes, kfd.dwAttributes); + FreeKnownFolderDefinitionFields(&kfd); } -- 2.32.0.93.g670b81a890