42#define OLD_CSIDL_MYDOCUMENTS 0x000c
44DEFINE_GUID(
GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
60#define PT_SHELLEXT 0x2e
66#define PT_FOLDERW 0x35
69#define PT_WORKGRP 0x41
76#define PT_IESPECIAL2 0xb1
79static GUID CLSID_CommonDocuments = { 0x0000000c, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x1a } };
117#define DECLARE_TYPE(x, y) { x, ARRAY_SIZE(y), y }
190#define GET_PROC(func) \
191 p ## func = (void*)GetProcAddress(hShell32, #func); \
193 trace("GetProcAddress(%s) failed\n", #func);
211 ok(pSHGetMalloc !=
NULL,
"shell32 is missing SHGetMalloc\n");
216 ok(
hr ==
S_OK,
"SHGetMalloc failed: 0x%08x\n",
hr);
217 ok(
pMalloc !=
NULL,
"SHGetMalloc returned a NULL IMalloc\n");
224 trace(
"shell32 version is %d.%d\n",
230#ifndef CSIDL_PROFILES
231#define CSIDL_PROFILES 0x003e
239#define CSIDL_TO_STR(x) case x: return#x;
308#define NO_CSIDL 0x10000
309#define WINE_ATTRIBUTES_OPTIONAL 0x20000
310#define KNOWN_FOLDER(id, csidl, name, category, parent1, parent2, relative_path, parsing_name, attributes, definitionFlags) \
311 { &id, # id, csidl, # csidl, name, category, {&parent1, &parent2}, relative_path, parsing_name, attributes, definitionFlags, __LINE__ }
314static const GUID _FOLDERID_CryptoKeys = {0xB88F4DAA, 0xE7BD, 0x49A9, {0xB7, 0x4D, 0x02, 0x88, 0x5A, 0x5D, 0xC7, 0x65} };
315static const GUID _FOLDERID_DpapiKeys = {0x10C07CD0, 0xEF91, 0x4567, {0xB8, 0x50, 0x44, 0x8B, 0x77, 0xCB, 0x37, 0xF9} };
316static const GUID _FOLDERID_SystemCertificates = {0x54EED2E0, 0xE7CA, 0x4FDB, {0x91, 0x48, 0x0F, 0x42, 0x47, 0x29, 0x1C, 0xFA} };
317static const GUID _FOLDERID_CredentialManager = {0x915221FB, 0x9EFE, 0x4BDA, {0x8F, 0xD7, 0xF7, 0x8D, 0xCA, 0x77, 0x4F, 0x87} };
346 "AddNewProgramsFolder",
350 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{15eae92e-f17a-4431-9f28-805e482dafd4}\0"
351 "shell:::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{15eae92e-f17a-4431-9f28-805e482dafd4}\0\0" ,
356 "Administrative Tools",
359 "Administrative Tools",
369 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\\::{d450a8a1-9568-45c7-9c0e-b4f9fb4537bd}\0"
370 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\\::{d450a8a1-9568-45c7-9c0e-b4f9fb4537bd}\0\0" ,
378 "Microsoft\\Windows\\Burn\\Burn",
384 "ChangeRemoveProgramsFolder",
388 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\0"
389 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7b81be6a-ce2b-4676-a29e-eb907a5126c5}\0\0" ,
394 "Common Administrative Tools",
397 "Administrative Tools",
424 "Microsoft\\Windows\\Start Menu\0",
454 "Microsoft\\Windows\\Templates\0",
464 "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\0\0",
473 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{E413D040-6788-4C22-957E-175D1C513A34},\0"
474 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{E413D040-6788-4C22-957E-175D1C513A34},\0\0" ,
483 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}\0"
484 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}\0\0" ,
493 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{56784854-C6CB-462B-8169-88E350ACB882}\0\0",
498 "ControlPanelFolder",
502 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\0"
503 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\0\0" ,
510 FOLDERID_RoamingAppData, FOLDERID_LocalAppData,
511 "Microsoft\\Windows\\Cookies\0Microsoft\\Windows\\INetCookies\0" ,
526 "Device Metadata Store",
529 "Microsoft\\Windows\\DeviceMetadataStore\0",
539 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{FDD39AD0-238F-46AF-ADB4-6C85480369C7}\0shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}\0\0",
547 "Documents.library-ms\0",
548 "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{7b0db17d-9cd2-4a93-9733-46cc89022e7c}\0\0",
557 "(null)\0shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{374DE290-123F-4565-9164-39C4925E467B}\0\0",
584 "::{ED228FDF-9EA8-4870-83b1-96b02CFE0D52}\0\0",
592 "Microsoft\\Windows\\GameExplorer\0",
601 "Microsoft\\Windows\\History\0",
611 "::{B4FB3F98-C1EA-428d-A78A-D1F5659CBA93}\0\0",
616 "ImplicitAppShortcuts",
619 "ImplicitAppShortcuts\0",
628 "Microsoft\\Windows\\Temporary Internet Files\0Microsoft\\Windows\\INetCache\0\0",
638 "::{871C5380-42A0-1069-A2EA-08002B30309D}\0\0",
646 "Microsoft\\Windows\\Libraries\0",
656 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{bfb9d5e0-c6a9-404c-b2b2-ae6db6af4968}\0\0",
673 "AppData\\LocalLow\0",
679 "LocalizedResourcesDir",
692 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{4BD8D571-6D19-48D3-BE97-422220080E43}\0shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{1CF1260C-4DD0-4EBB-811F-33C572699FDE}\0\0",
700 "Music.library-ms\0",
701 "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{2112AB0A-C86A-4ffe-A368-0DE96E47012E}\0\0",
709 "Microsoft\\Windows\\Network Shortcuts\0",
715 "NetworkPlacesFolder",
719 "::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\0\0",
727 "Microsoft\\Windows Photo Gallery\\Original Images\0",
746 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{33E28130-4E1E-4676-835A-98395C3BC3BB}\0shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{3ADD1653-EB32-4CB0-BBD7-DFA0ABB5ACCA}\0\0",
754 "Pictures.library-ms\0",
755 "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{A990AE9F-A03B-4e80-94BC-9912D7504104}\0\0",
773 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{2227A280-3AEA-1069-A2DE-08002B30309D}\0\0",
781 "Microsoft\\Windows\\Printer Shortcuts\0",
815 "ProgramFilesCommon",
824 "ProgramFilesCommonX64",
833 "ProgramFilesCommonX86",
873 "::{4336a54d-038b-4685-ab02-99bb52d3fb8b}\0"
909 "Microsoft\\Windows\\GameExplorer\0",
945 "Microsoft\\Windows\\Ringtones\0",
963 "Microsoft\\Internet Explorer\\Quick Launch\0",
972 "Microsoft\\Windows\\Recent\0",
981 "RecordedTV.library-ms\0",
991 "::{645FF040-5081-101B-9F08-00AA002F954E}\0\0",
1006 KF_CATEGORY_PERUSER,
1008 "Microsoft\\Windows\\Ringtones\0",
1015 KF_CATEGORY_PERUSER,
1017 "AppData\\Roaming\0",
1035 "Sample Pictures\0",
1044 "Sample Playlists\0",
1060 KF_CATEGORY_PERUSER,
1063 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4}\0\0",
1069 KF_CATEGORY_PERUSER,
1072 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{7d1d3a04-debb-4115-95cf-2f29da2920da}\0\0",
1078 KF_CATEGORY_VIRTUAL,
1081 "shell:::{BD7A2E7B-21CB-41b2-A086-B309680C6B7E}\\*\0\0",
1087 KF_CATEGORY_VIRTUAL,
1090 "::{9343812e-1c37-4a49-a12e-4b2d810d956b}\0\0",
1096 KF_CATEGORY_VIRTUAL,
1099 "shell:::{89D83576-6BD1-4C86-9454-BEB04E94C819}\\*\0\0",
1105 KF_CATEGORY_PERUSER,
1107 "Microsoft\\Windows\\SendTo\0",
1116 "Windows Sidebar\\Gadgets\0",
1123 KF_CATEGORY_PERUSER,
1125 "Microsoft\\Windows Sidebar\\Gadgets\0",
1132 KF_CATEGORY_PERUSER,
1134 "Microsoft\\Windows\\Start Menu\0",
1142 KF_CATEGORY_PERUSER,
1152 KF_CATEGORY_PERUSER,
1162 KF_CATEGORY_VIRTUAL,
1165 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\0"
1166 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\0\0" ,
1171 "SyncResultsFolder",
1172 KF_CATEGORY_VIRTUAL,
1175 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{BC48B32F-5910-47F5-8570-5074A8A5636A},\0"
1176 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{BC48B32F-5910-47F5-8570-5074A8A5636A},\0\0",
1182 KF_CATEGORY_VIRTUAL,
1185 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{F1390A9A-A3F4-4E5D-9C5F-98F3BD8D935C},\0"
1186 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{F1390A9A-A3F4-4E5D-9C5F-98F3BD8D935C},\0\0" ,
1210 KF_CATEGORY_PERUSER,
1212 "Microsoft\\Windows\\Templates\0",
1219 KF_CATEGORY_PERUSER,
1237 KF_CATEGORY_PERUSER,
1245 "UserProgramFilesCommon",
1246 KF_CATEGORY_PERUSER,
1255 KF_CATEGORY_VIRTUAL,
1258 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\0\0",
1263 "UsersLibrariesFolder",
1264 KF_CATEGORY_VIRTUAL,
1267 "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\0\0",
1273 KF_CATEGORY_PERUSER,
1276 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{18989B1D-99B5-455B-841C-AB7C74E4DDFC}\0shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{A0953C92-50DC-43BF-BE83-3742FED03C9C}\0\0",
1282 KF_CATEGORY_PERUSER,
1284 "Videos.library-ms\0",
1285 "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{491E922F-5643-4af4-A7EB-4E7A138D8174}\0\0",
1299 "CredentialManager",
1326 "SystemCertificates",
1343 if (pSHGetFolderLocation)
1347 hr = pSHGetFolderLocation(
NULL, 0xeeee,
NULL, 0, &pidl);
1360 if (pSHGetSpecialFolderLocation)
1366 hr = pSHGetSpecialFolderLocation(
NULL, 0xeeee, &pidl);
1370 if (pSHGetFolderPathA)
1381 if (pSHGetSpecialFolderPathA)
1407 if (!pSHGetFolderLocation)
return TRUE;
1417 ok(pidlLast !=
NULL,
"%s: ILFindLastID failed\n",
1420 ret = pidlLast->mkid.abID[0];
1435 if (!pSHGetSpecialFolderLocation)
return TRUE;
1448 ret = pidlLast->mkid.abID[0];
1460 if (!pSHGetFolderPathA)
return;
1464 "SHGetFolderPathA(NULL, %s, NULL, SHGFP_TYPE_CURRENT, path) failed: 0x%08x\n",
getFolderName(
folder),
hr);
1472 if (!pSHGetSpecialFolderPathA)
return;
1478 "SHGetSpecialFolderPathA(NULL, path, %s, FALSE) failed\n",
1487 for (
i = 0;
i < numEntries;
i++)
1493 if (pSHGetFolderLocation)
1496 for (
j = 0; !foundTypeMatch &&
j < testEntries[
i].
numTypes;
j++)
1498 foundTypeMatch =
TRUE;
1500 "%s has unexpected type %d (0x%02x)\n",
1504 for (
j = 0, foundTypeMatch =
FALSE; !foundTypeMatch &&
1507 foundTypeMatch =
TRUE;
1509 "%s has unexpected type %d (0x%02x)\n",
1535 if (!pSHGetSpecialFolderPathA)
return;
1539 char *envVal =
getenv(envVar);
1542 "%%%s%% does not match SHGetSpecialFolderPath:\n"
1543 "%%%s%% is %s\nSHGetSpecialFolderPath returns %s\n",
1544 envVar, envVar, envVal,
path);
1558 if (!pSHGetFolderLocation)
return;
1567 if (pidlLast && (pidlLast->mkid.abID[0] ==
PT_SHELLEXT ||
1568 pidlLast->mkid.abID[0] ==
PT_GUID))
1570 GUID *shellGuid = (
GUID *)(pidlLast->mkid.abID + 2);
1598DEFINE_GUID(CLSID_NetworkExplorerFolder, 0xF02C1A0D, 0xBE21, 0x4350, 0x88, 0xB0, 0x73, 0x67, 0xFC, 0x96, 0xEF, 0x3C);
1599DEFINE_GUID(_CLSID_Documents, 0xA8CDFF1C, 0x4878, 0x43be, 0xB5, 0xFD, 0xF8, 0x09, 0x1C, 0x1C, 0x60, 0xD0);
1632 if (lpszPath && *lpszPath &&
1633 lpszPath[1] ==
':' && lpszPath[2] ==
'\\' && lpszPath[3] ==
'\0')
1658 if (!pSHGetSpecialFolderPathA)
return;
1666 "GetWindowsDirectory returns %s SHGetSpecialFolderPath returns %s\n",
1667 windowsDir, windowsShellPath);
1679 if (!pSHGetSpecialFolderPathA)
return;
1687 "GetSystemDirectory returns %s SHGetSpecialFolderPath returns %s\n",
1688 systemDir, systemShellPath);
1691 if (!pGetSystemWow64DirectoryA || !pGetSystemWow64DirectoryA(systemDirx86,
sizeof(systemDirx86)))
1698 "GetSystemDirectory returns %s SHGetSpecialFolderPath returns %s\n",
1699 systemDir, systemShellPath);
1732 "SHGetFolderPath returned 0x%08x, expected 0x80070002\n",
hr);
1737 "SHGetFolderLocation returned 0x%08x\n",
hr);
1741 "SHGetSpecialFolderPath succeeded, expected failure\n");
1746 "SHGetFolderLocation returned 0x%08x\n",
hr);
1758 trace(
"CSIDL_FAVORITES was changed to %s\n",
path);
1760 ok(!
ret,
"expected failure with ERROR_ALREADY_EXISTS\n");
1763 "got %d, expected ERROR_ALREADY_EXISTS\n",
GetLastError());
1774 else if (
arg[0] ==
'2')
1780 ok(
hr ==
S_OK,
"SHGetFolderPath failed: 0x%08x\n",
hr);
1799 static const char userShellFolders[] =
1800 "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders";
1804 if (!pSHGetFolderPathA)
return;
1805 if (!pSHGetFolderLocation)
return;
1806 if (!pSHGetSpecialFolderPathA)
return;
1807 if (!pSHGetSpecialFolderLocation)
return;
1808 if (!pSHFileOperationA)
return;
1816 len =
sizeof(originalPath);
1822 memcpy(modifiedPath, originalPath,
len);
1823 modifiedPath[
len++] =
'2';
1824 modifiedPath[
len++] =
'\0';
1825 trace(
"Changing CSIDL_FAVORITES to %s\n", modifiedPath);
1843 trace(
"Restoring CSIDL_FAVORITES to %s\n", originalPath);
1845 strlen(originalPath) + 1);
1856 "child process termination\n");
1859 else skip(
"RegQueryValueExA(key, Favorites, ...) failed\n");
1863 else skip(
"RegOpenKeyExA(HKEY_CURRENT_USER, %s, ...) failed\n", userShellFolders);
1873 if (!pSHGetKnownFolderPath || !pSHGetFolderPathEx)
1875 win_skip(
"SHGetKnownFolderPath or SHGetFolderPathEx not available\n");
1880 hr = pSHGetKnownFolderPath(&FOLDERID_Desktop, 0,
NULL,
NULL);
1884 path = (
void *)0xdeadbeef;
1891 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1906 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1911 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1918 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1925 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1934 hr = pSHGetKnownFolderPath(&FOLDERID_Desktop, 0,
NULL, &
path);
1935 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1939 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1944 hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0,
NULL,
buffer, 0);
1948 hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0,
NULL,
NULL,
len + 1);
1958 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1972 if(
strcmp(hay,
"(null)") == 0 && !needle)
1978 ok(0,
"Failed to convert string\n");
2013 expectedCsidl = known_folder->
csidl & 0xFFFF;
2016 ok_(__FILE__, known_folder->
line)(
hr ==
S_OK,
"cannot retrieve CSIDL for folder %s\n", known_folder->
sFolderId);
2018 ok_(__FILE__, known_folder->
line)(
csidl == expectedCsidl,
"invalid CSIDL retrieved for folder %s. %d (%s) expected, but %d found\n", known_folder->
sFolderId, expectedCsidl, known_folder->
sCsidl,
csidl);
2022 ok_(__FILE__, known_folder->
line)(
hr ==
S_OK,
"cannot get known folder for %s\n", known_folder->
sFolderId);
2025 hr = IKnownFolder_GetFolderDefinition(
folder, &kfd);
2026 ok_(__FILE__, known_folder->
line)(
hr ==
S_OK,
"cannot get known folder definition for %s\n", known_folder->
sFolderId);
2030 ok_(__FILE__, known_folder->
line)(
ret != 0,
"cannot convert known folder name \"%s\" to wide characters\n", known_folder->
sName);
2038 "invalid known folder parent for %s: %s retrieved\n",
2047 "invalid known folder attributes for %s: 0x%08x expected, but 0x%08x retrieved\n", known_folder->
sFolderId, known_folder->
attributes, kfd.
dwAttributes);
2049 ok_(__FILE__, known_folder->
line)(!(kfd.
kfdFlags & (~known_folder->definitionFlags)),
"invalid known folder flags for %s: 0x%08x expected, but 0x%08x retrieved\n", known_folder->
sFolderId, known_folder->
definitionFlags, kfd.
kfdFlags);
2054 IKnownFolder_Release(
folder);
2069 hr = IKnownFolder_GetFolderDefinition(
folder, &kfd);
2090 IKnownFolder_Release(
folder);
2098 static const WCHAR sWindows[] = {
'W',
'i',
'n',
'd',
'o',
'w',
's',0};
2099 static const WCHAR sWindows2[] = {
'w',
'i',
'n',
'd',
'o',
'w',
's',0};
2100 static const WCHAR sExample[] = {
'E',
'x',
'a',
'm',
'p',
'l',
'e',0};
2101 static const WCHAR sExample2[] = {
'E',
'x',
'a',
'm',
'p',
'l',
'e',
'2',0};
2102 static const WCHAR sSubFolder[] = {
'S',
'u',
'b',
'F',
'o',
'l',
'd',
'e',
'r',0};
2103 static const WCHAR sNoSuch[] = {
'N',
'o',
'S',
'u',
'c',
'h',0};
2104 static const WCHAR sBackslash[] = {
'\\',0};
2105 static const KNOWNFOLDERID newFolderId = {0x01234567, 0x89AB, 0xCDEF, {0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x01} };
2106 static const KNOWNFOLDERID subFolderId = {0xFEDCBA98, 0x7654, 0x3210, {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF} };
2111 KF_CATEGORY cat = 0;
2115 LPWSTR folderPath, errorMsg;
2127 lstrcatW(sExample2Path, sExample2);
2129 lstrcpyW(sSubFolderPath, sExamplePath);
2130 lstrcatW(sSubFolderPath, sBackslash);
2131 lstrcatW(sSubFolderPath, sSubFolder);
2133 lstrcpyW(sSubFolder2Path, sExample2Path);
2134 lstrcatW(sSubFolder2Path, sBackslash);
2135 lstrcatW(sSubFolder2Path, sSubFolder);
2140 &IID_IKnownFolderManager, (
LPVOID*)&mgr);
2142 win_skip(
"IKnownFolderManager unavailable\n");
2147 ok(
hr ==
S_OK,
"failed to create KnownFolderManager instance: 0x%08x\n",
hr);
2149 hr = IKnownFolderManager_QueryInterface(mgr, &IID_IMarshal, (
void**)&unk);
2153 ok(
hr ==
S_OK,
"failed to convert CSIDL to KNOWNFOLDERID: 0x%08x\n",
hr);
2156 hr = IKnownFolderManager_FolderIdToCsidl(mgr, &FOLDERID_Windows, &
csidl);
2157 ok(
hr ==
S_OK,
"failed to convert CSIDL to KNOWNFOLDERID: 0x%08x\n",
hr);
2160 hr = IKnownFolderManager_GetFolder(mgr, &FOLDERID_Windows, &
folder);
2161 ok(
hr ==
S_OK,
"failed to get known folder: 0x%08x\n",
hr);
2164 hr = IKnownFolder_QueryInterface(
folder, &IID_IMarshal, (
void**)&unk);
2167 hr = IKnownFolder_GetCategory(
folder, &cat);
2168 ok(
hr ==
S_OK,
"failed to get folder category: 0x%08x\n",
hr);
2169 ok(cat==KF_CATEGORY_FIXED,
"invalid folder category: %d\n", cat);
2172 ok(
hr ==
S_OK,
"failed to get folder id: 0x%08x\n",
hr);
2175 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2176 ok(
hr ==
S_OK,
"failed to get path from known folder: 0x%08x\n",
hr);
2180 hr = IKnownFolder_GetRedirectionCapabilities(
folder, &redirectionCapabilities);
2181 ok(
hr ==
S_OK,
"failed to get redirection capabilities: 0x%08x\n",
hr);
2183 ok(redirectionCapabilities==0,
"invalid redirection capabilities returned: %d\n", redirectionCapabilities);
2185 hr = IKnownFolder_SetPath(
folder, 0, sWinDir);
2189 hr = IKnownFolder_GetFolderDefinition(
folder, &kfDefinition);
2190 ok(
hr ==
S_OK,
"failed to get folder definition: 0x%08x\n",
hr);
2193 ok(kfDefinition.
category==KF_CATEGORY_FIXED,
"invalid folder category: 0x%08x\n", kfDefinition.
category);
2200 ok(
hr ==
S_OK,
"failed to release KnownFolder instance: 0x%08x\n",
hr);
2203 hr = IKnownFolderManager_GetFolderByName(mgr, sWindows, &
folder);
2204 ok(
hr ==
S_OK,
"failed to get known folder: 0x%08x\n",
hr);
2208 ok(
hr ==
S_OK,
"failed to get folder id: 0x%08x\n",
hr);
2212 ok(
hr ==
S_OK,
"failed to release KnownFolder instance: 0x%08x\n",
hr);
2215 hr = IKnownFolderManager_GetFolderByName(mgr, sWindows2, &
folder);
2216 ok(
hr ==
S_OK,
"failed to get known folder: 0x%08x\n",
hr);
2220 ok(
hr ==
S_OK,
"failed to get folder id: 0x%08x\n",
hr);
2224 ok(
hr ==
S_OK,
"failed to release KnownFolder instance: 0x%08x\n",
hr);
2227 folder = (IKnownFolder *)0xdeadbeef;
2228 hr = IKnownFolderManager_GetFolderByName(mgr, sNoSuch, &
folder);
2235 hr = IKnownFolderManager_GetFolderIds(mgr, &folders, &nCount);
2236 ok(
hr ==
S_OK,
"failed to get known folders: 0x%08x\n",
hr);
2237 for(
i=0;
i<nCount;++
i)
2248 ok(bRes,
"cannot create example directory: %s\n",
wine_dbgstr_w(sExamplePath));
2250 ok(bRes,
"cannot create example directory: %s\n",
wine_dbgstr_w(sExample2Path));
2252 ok(bRes,
"cannot create example directory: %s\n",
wine_dbgstr_w(sSubFolderPath));
2254 ZeroMemory(&kfDefinition,
sizeof(kfDefinition));
2255 kfDefinition.
category = KF_CATEGORY_PERUSER;
2263 hr = IKnownFolderManager_RegisterFolder(mgr, &newFolderId, &kfDefinition);
2265 win_skip(
"No permissions required to register custom known folder\n");
2268 ok(
hr ==
S_OK,
"failed to register known folder: 0x%08x\n",
hr);
2271 hr = IKnownFolderManager_GetFolder(mgr, &newFolderId, &
folder);
2272 ok(
hr ==
S_OK,
"failed to get known folder: 0x%08x\n",
hr);
2275 hr = IKnownFolder_GetCategory(
folder, &cat);
2276 ok(
hr ==
S_OK,
"failed to get folder category: hr=0x%0x\n",
hr);
2277 ok(cat == KF_CATEGORY_PERUSER,
"invalid category returned: %d, while %d (KF_CATEGORY_PERUSER) expected\n", cat, KF_CATEGORY_PERUSER);
2280 ok(
hr ==
S_OK,
"failed to get folder id: 0x%08x\n",
hr);
2284 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2285 ok(
hr ==
S_OK,
"failed to get path from known folder: 0x%08x\n",
hr);
2290 ZeroMemory(&kfSubDefinition,
sizeof(kfSubDefinition));
2291 kfSubDefinition.
category = KF_CATEGORY_PERUSER;
2298 kfSubDefinition.
fidParent = newFolderId;
2300 hr = IKnownFolderManager_RegisterFolder(mgr, &subFolderId, &kfSubDefinition);
2301 ok(
hr ==
S_OK,
"failed to register known folder: 0x%08x\n",
hr);
2305 hr = IKnownFolderManager_GetFolder(mgr, &subFolderId, &subFolder);
2306 ok(
hr ==
S_OK,
"failed to get known folder: 0x%08x\n",
hr);
2310 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2311 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2317 hr = IKnownFolderManager_Redirect(mgr, &newFolderId,
NULL, 0, sExample2Path, 0,
NULL, &errorMsg);
2321 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2322 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2327 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2329 ok(folderPath==
NULL,
"invalid known folder path retrieved: \"%s\" when NULL pointer was expected\n",
wine_dbgstr_w(folderPath));
2334 hr = IKnownFolder_SetPath(
folder, 0, sExamplePath);
2335 ok(
hr ==
S_OK,
"SetPath() failed: 0x%08x\n",
hr);
2338 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2339 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2346 ok(bRes,
"cannot create example directory: %s\n",
wine_dbgstr_w(sSubFolder2Path));
2349 hr = IKnownFolderManager_Redirect(mgr, &newFolderId,
NULL, 0, sExample2Path, 0,
NULL, &errorMsg);
2353 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2354 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2362 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2364 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2371 hr = IKnownFolder_SetPath(
folder, 0, sExamplePath);
2372 ok(
hr ==
S_OK,
"SetPath() failed: 0x%08x\n",
hr);
2375 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2376 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2381 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2382 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2389 ok(bRes,
"cannot create example directory: %s\n",
wine_dbgstr_w(sSubFolder2Path));
2392 hr = IKnownFolderManager_Redirect(mgr, &newFolderId,
NULL, 0, sExample2Path, 1, &subFolderId, &errorMsg);
2396 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2397 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2402 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2403 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2412 hr = IKnownFolder_SetPath(
folder, 0, sExamplePath);
2413 ok(
hr ==
S_OK,
"SetPath() failed: 0x%08x\n",
hr);
2416 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2417 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2422 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2423 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2433 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2434 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2439 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2440 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2449 hr = IKnownFolder_SetPath(
folder, 0, sExamplePath);
2450 ok(
hr ==
S_OK,
"SetPath() failed: 0x%08x\n",
hr);
2453 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2454 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2459 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2460 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2470 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2471 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2476 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2477 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2491 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2492 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2497 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2498 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2503 if(!pSHGetKnownFolderPath || !pSHSetKnownFolderPath)
2505 win_skip(
"cannot get SHGet/SetKnownFolderPath routines\n");
2509 hr = pSHGetKnownFolderPath(&newFolderId, 0,
NULL, &folderPath);
2511 ok(
hr==
S_OK,
"cannot get known folder path: hr=0x%0x\n",
hr);
2516 hr = pSHSetKnownFolderPath(&newFolderId, 0,
NULL, sExample2Path);
2518 ok(
hr==
S_OK,
"cannot set known folder path: hr=0x%0x\n",
hr);
2521 hr = pSHGetKnownFolderPath(&newFolderId, 0,
NULL, &folderPath);
2523 ok(
hr==
S_OK,
"cannot get known folder path: hr=0x%0x\n",
hr);
2528 hr = pSHSetKnownFolderPath(&newFolderId, 0,
NULL, sExamplePath);
2530 ok(
hr==
S_OK,
"cannot set known folder path: hr=0x%0x\n",
hr);
2533 IKnownFolder_Release(subFolder);
2536 hr = IKnownFolderManager_UnregisterFolder(mgr, &subFolderId);
2537 ok(
hr ==
S_OK,
"failed to unregister folder: 0x%08x\n",
hr);
2543 ok(
hr ==
S_OK,
"failed to release KnownFolder instance: 0x%08x\n",
hr);
2549 hr = IKnownFolderManager_RegisterFolder(mgr, &newFolderId, &kfDefinition);
2550 ok(
hr ==
S_OK,
"failed to re-register known folder: 0x%08x\n",
hr);
2552 hr = IKnownFolderManager_GetFolder(mgr, &newFolderId, &
folder);
2553 ok(
hr ==
S_OK,
"failed to get known folder: 0x%08x\n",
hr);
2555 hr = IKnownFolder_GetFolderDefinition(
folder, &kfSubDefinition);
2556 ok(
hr ==
S_OK,
"failed to get folder definition: 0x%08x\n",
hr);
2563 ok(
hr ==
S_OK,
"failed to release KnownFolder instance: 0x%08x\n",
hr);
2566 hr = IKnownFolderManager_UnregisterFolder(mgr, &newFolderId);
2567 ok(
hr ==
S_OK,
"failed to unregister folder: 0x%08x\n",
hr);
2577 hr = IKnownFolderManager_Release(mgr);
2578 ok(
hr ==
S_OK,
"failed to release KnownFolderManager instance: 0x%08x\n",
hr);
2594 static const WCHAR does_not_existW[] = {
'%',
'D',
'O',
'E',
'S',
'_',
'N',
'O',
'T',
'_',
'E',
'X',
'I',
'S',
'T',
'%',0};
2595 static const CHAR does_not_existA[] =
"%DOES_NOT_EXIST%";
2598 "%ALLUSERSPROFILE%",
"%APPDATA%",
"%LOCALAPPDATA%",
2599 "%NUMBER_OF_PROCESSORS%",
"%OS%",
"%PROCESSOR_ARCHITECTURE%",
2600 "%PROCESSOR_IDENTIFIER%",
"%PROCESSOR_LEVEL%",
"%PROCESSOR_REVISION%",
2601 "%ProgramFiles%",
"%SystemDrive%",
2602 "%SystemRoot%",
"%USERPROFILE%",
"%windir%",
2606 "%HOMEDRIVE%%HOMEPATH%",
2622 win_skip(
"DoEnvironmentSubstA/W are broken on NT 4\n");
2628 "%d: got %s (expected %s)\n",
i, bufferA, expectedA);
2643 bufferA[
len + 2] = 0;
2652 "+1: got %s (expected %s)\n", bufferA, expectedA);
2664 bufferA[
len + 2] = 0;
2673 " 0: got %s (expected %s)\n", bufferA,
names[
i]);
2687 bufferA[
len + 2] = 0;
2695 "-1: got %s (expected %s)\n", bufferA,
names[
i]);
2709 lstrcpyA(bufferA, does_not_existA);
2712 res2 =
lstrlenA(does_not_existA) + 1;
2717 "%d: got %s (expected %s)\n",
i, bufferA, does_not_existA);
2736 static const WCHAR shortW[] = {
'f',
'i',
'l',
'e',
'.',
't',
's',
't',0};
2737 static const WCHAR short2W[] = {
'f',
'i',
'l',
'e',
' ',
'(',
'2',
')',
'.',
't',
's',
't',0};
2738 static const WCHAR tmpW[] = {
't',
'm',
'p',0};
2739 static const WCHAR longW[] = {
'n',
'a',
'm',
'e',0};
2740 static const WCHAR long2W[] = {
'n',
'a',
'm',
'e',
' ',
'(',
'2',
')',0};
2745 if (!pPathYetAnotherMakeUniqueName)
2747 win_skip(
"PathYetAnotherMakeUniqueName() is not available.\n");
2786 ret = pPathYetAnotherMakeUniqueName(
nameW,
pathW, tmpW, longW);
2796 ret = pPathYetAnotherMakeUniqueName(
nameW,
pathW, tmpW, longW);
2818 if (!pSHGetKnownFolderIDList)
2820 win_skip(
"SHGetKnownFolderIDList is not available.\n");
2828 pidl = (
void*)0xdeadbeef;
2829 hr = pSHGetKnownFolderIDList(
NULL, 0,
NULL, &pidl);
2832 pidl = (
void*)0xdeadbeef;
2835 ok(pidl ==
NULL,
"got %p\n", pidl);
2837 hr = pSHGetKnownFolderIDList(&FOLDERID_Desktop, 0,
NULL,
NULL);
2840 pidl = (
void*)0xdeadbeef;
2841 hr = pSHGetKnownFolderIDList(&FOLDERID_Desktop, 0,
NULL, &pidl);
2842 ok(
hr ==
S_OK,
"SHGetKnownFolderIDList failed: 0x%08x\n",
hr);
2847 pidl = (
void*)0xdeadbeef;
2849 ok(
hr ==
S_OK,
"SHGetKnownFolderIDList failed: 0x%08x\n",
hr);
2854 pidl = (
void*)0xdeadbeef;
2855 hr = pSHGetKnownFolderIDList(&FOLDERID_Documents, 0,
NULL, &pidl);
2856 ok(
hr ==
S_OK,
"SHGetKnownFolderIDList failed: 0x%08x\n",
hr);
2857 ok(!
ILIsEmpty(pidl),
"pidl should not be empty.\n");
2861 pidl = (
void*)0xdeadbeef;
2863 ok(
hr ==
S_OK,
"SHGetKnownFolderIDList failed: 0x%08x\n",
hr);
2864 ok(!
ILIsEmpty(pidl),
"pidl should not be empty.\n");
2871 if (!
init())
return;
2875 "GetSystemWow64DirectoryA" );
2881 if (!pSHGetFolderLocation)
2882 win_skip(
"SHGetFolderLocation is not available\n");
static void startup(void)
static const WCHAR nameW[]
#define RegCloseKey(hKey)
STDAPI DllGetVersion(DLLVERSIONINFO *info)
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegFlushKey(HKEY hKey)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
void *WINAPI CoTaskMemAlloc(SIZE_T size)
void WINAPI CoTaskMemFree(void *ptr)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
#define GetProcAddress(x, y)
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
DWORD WINAPI ExpandEnvironmentStringsA(IN LPCSTR lpSrc, IN LPSTR lpDst, IN DWORD nSize)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(const char *app_name, char *cmd_line, SECURITY_ATTRIBUTES *process_attr, SECURITY_ATTRIBUTES *thread_attr, BOOL inherit, DWORD flags, void *env, const char *cur_dir, STARTUPINFOA *startup_info, PROCESS_INFORMATION *info)
LPSTR WINAPI CharPrevA(const char *start, const char *ptr)
char *CDECL getenv(const char *name)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal)
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl)
BOOL WINAPI SHGetSpecialFolderPathA(HWND hwndOwner, LPSTR szPath, int nFolder, BOOL bCreate)
HRESULT WINAPI SHGetFolderPathA(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPSTR pszPath)
BOOL WINAPI PathYetAnotherMakeUniqueName(LPWSTR buffer, LPCWSTR path, LPCWSTR shortname, LPCWSTR longname)
GLuint GLuint GLsizei GLenum type
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static WCHAR does_not_existW[]
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
#define ERROR_ALREADY_EXISTS
#define FILE_FLAG_DELETE_ON_CLOSE
#define ERROR_FILE_NOT_FOUND
static const WCHAR pathW[]
static LPSTR myPathRemoveBackslashA(LPSTR lpszPath)
static const BYTE folderOrSpecialType[]
static void test_SHGetKnownFolderIDList(void)
static void testSystemDir(void)
static const BYTE workgroupType[]
static void matchGUID(int folder, const GUID *guid, const GUID *guid_alt)
static void test_SHGetSpecialFolderPath(BOOL optional, int folder)
static void test_PidlTypes(void)
static const BYTE folderType[]
static const BYTE guidType[]
static void test_DoEnvironmentSubst(void)
static PWSTR *static PWSTR
static const BYTE favoritesType[]
static const BYTE printersType[]
static void test_NonExistentPath(void)
static void test_SHGetFolderPathEx(void)
static void test_EnvVars(void)
static void test_SHGetFolderPath(BOOL optional, int folder)
static BYTE testSHGetFolderLocation(int folder)
static BOOL is_in_strarray(const WCHAR *needle, const char *hay)
static const char * getFolderName(int folder)
static void test_PathYetAnotherMakeUniqueName(void)
static const struct shellExpectedValues optionalShellValues[]
static const GUID _FOLDERID_SystemCertificates
#define OLD_CSIDL_MYDOCUMENTS
static const BYTE personalType[]
static void test_parameters(void)
static PIDLIST_ABSOLUTE *static DLLVERSIONINFO shellVersion
static void loadShell32(void)
static const BYTE ieSpecialType[]
static const BYTE shellExtType[]
static void test_knownFolders(void)
static void doChild(const char *arg)
static void test_GUIDs(void)
static GUID CLSID_CommonDocuments
static const GUID _FOLDERID_DpapiKeys
static void matchSpecialFolderPathToEnv(int folder, const char *envVar)
static void test_ShellValues(const struct shellExpectedValues testEntries[], int numEntries, BOOL optional)
BOOL known_folder_found[ARRAY_SIZE(known_folders)]
static const BYTE controlPanelType[]
static const struct shellExpectedValues requiredShellValues[]
static const GUID _FOLDERID_CryptoKeys
static BOOL myPathIsRootA(LPCSTR lpszPath)
#define WINE_ATTRIBUTES_OPTIONAL
static void check_known_folder(IKnownFolderManager *mgr, KNOWNFOLDERID *folderId)
static void testWinDir(void)
static BYTE testSHGetSpecialFolderLocation(int folder)
#define DECLARE_TYPE(x, y)
static const GUID _FOLDERID_CredentialManager
#define KNOWN_FOLDER(id, csidl, name, category, parent1, parent2, relative_path, parsing_name, attributes, definitionFlags)
static LPITEMIDLIST *static BOOL
static char selfname[MAX_PATH]
static const struct knownFolderDef known_folders[]
static const WCHAR path2[]
#define FILE_ATTRIBUTE_READONLY
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
interface IMalloc * LPMALLOC
const GUID IID_IOleObject
void WINAPI ILFree(LPITEMIDLIST pidl)
LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl)
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
int winetest_get_mainargs(char ***pargv)
void winetest_wait_child_process(HANDLE process)
struct _SHFILEOPSTRUCTA * LPSHFILEOPSTRUCTA
DWORD WINAPI DoEnvironmentSubstW(LPWSTR pszString, UINT cchString)
DWORD WINAPI DoEnvironmentSubstA(LPSTR pszString, UINT cchString)
int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
#define CSIDL_COMMON_TEMPLATES
#define CSIDL_COMMON_DESKTOPDIRECTORY
#define CSIDL_PROGRAM_FILES
#define CSIDL_INTERNET_CACHE
#define CSIDL_DESKTOPDIRECTORY
#define CSIDL_MYDOCUMENTS
#define CSIDL_COMMON_STARTMENU
#define CSIDL_CDBURN_AREA
#define CSIDL_COMMON_ALTSTARTUP
#define CSIDL_FLAG_CREATE
#define CSIDL_COMMON_APPDATA
#define CSIDL_CONNECTIONS
#define CSIDL_COMMON_PROGRAMS
#define CSIDL_COMPUTERSNEARME
#define CSIDL_COMMON_FAVORITES
#define CSIDL_LOCAL_APPDATA
#define CSIDL_PROGRAM_FILES_COMMONX86
#define CSIDL_PROGRAM_FILES_COMMON
#define CSIDL_COMMON_MUSIC
#define CSIDL_COMMON_VIDEO
#define CSIDL_PROGRAM_FILESX86
static BOOL ILIsEmpty(_In_opt_ PCUIDLIST_RELATIVE pidl)
#define CSIDL_COMMON_PICTURES
#define CSIDL_COMMON_STARTUP
#define KF_FLAG_DEFAULT_PATH
#define CSIDL_COMMON_DOCUMENTS
#define CSIDL_COMMON_OEM_LINKS
#define CSIDL_COMMON_ADMINTOOLS
#define CSIDL_RESOURCES_LOCALIZED
enum tagKF_DEFINITION_FLAGS KF_DEFINITION_FLAGS
static void FreeKnownFolderDefinitionFields(KNOWNFOLDER_DEFINITION *pKFD)
@ KFDF_PUBLISHEXPANDEDPATH
@ KFDF_LOCAL_REDIRECT_ONLY
pointer_default(unique)] interface IFileDialogCustomize enum tagKF_REDIRECTION_CAPABILITIES KF_REDIRECTION_CAPABILITIES
ITEMIDLIST UNALIGNED * LPITEMIDLIST
KNOWNFOLDERID * REFKNOWNFOLDERID
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
const char * sRelativePath
const KF_CATEGORY category
const KNOWNFOLDERID * folderId
const KF_DEFINITION_FLAGS definitionFlags
const KNOWNFOLDERID * fidParents[2]
const char * sParsingName
KF_DEFINITION_FLAGS kfdFlags
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
#define INVALID_FILE_ATTRIBUTES
DWORD WINAPI GetLastError(void)
#define STARTF_USESHOWWINDOW
#define REGDB_E_CLASSNOTREG
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define E_NOT_SUFFICIENT_BUFFER
#define HKEY_CURRENT_USER