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",
442 "Microsoft\\Windows\\Templates\0",
452 "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\0\0",
461 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{E413D040-6788-4C22-957E-175D1C513A34},\0"
462 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{E413D040-6788-4C22-957E-175D1C513A34},\0\0" ,
471 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}\0"
472 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{7007ACC7-3202-11D1-AAD2-00805FC1270E}\0\0" ,
481 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{56784854-C6CB-462B-8169-88E350ACB882}\0\0",
486 "ControlPanelFolder",
490 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\0"
491 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\0\0" ,
498 FOLDERID_RoamingAppData, FOLDERID_LocalAppData,
499 "Microsoft\\Windows\\Cookies\0Microsoft\\Windows\\INetCookies\0" ,
514 "Device Metadata Store",
517 "Microsoft\\Windows\\DeviceMetadataStore\0",
527 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{FDD39AD0-238F-46AF-ADB4-6C85480369C7}\0shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}\0\0",
535 "Documents.library-ms\0",
536 "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{7b0db17d-9cd2-4a93-9733-46cc89022e7c}\0\0",
545 "(null)\0shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{374DE290-123F-4565-9164-39C4925E467B}\0\0",
572 "::{ED228FDF-9EA8-4870-83b1-96b02CFE0D52}\0\0",
580 "Microsoft\\Windows\\GameExplorer\0",
589 "Microsoft\\Windows\\History\0",
599 "::{B4FB3F98-C1EA-428d-A78A-D1F5659CBA93}\0\0",
604 "ImplicitAppShortcuts",
607 "ImplicitAppShortcuts\0",
616 "Microsoft\\Windows\\Temporary Internet Files\0Microsoft\\Windows\\INetCache\0\0",
626 "::{871C5380-42A0-1069-A2EA-08002B30309D}\0\0",
634 "Microsoft\\Windows\\Libraries\0",
644 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{bfb9d5e0-c6a9-404c-b2b2-ae6db6af4968}\0\0",
661 "AppData\\LocalLow\0",
667 "LocalizedResourcesDir",
680 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{4BD8D571-6D19-48D3-BE97-422220080E43}\0shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{1CF1260C-4DD0-4EBB-811F-33C572699FDE}\0\0",
688 "Music.library-ms\0",
689 "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{2112AB0A-C86A-4ffe-A368-0DE96E47012E}\0\0",
697 "Microsoft\\Windows\\Network Shortcuts\0",
703 "NetworkPlacesFolder",
707 "::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\0\0",
715 "Microsoft\\Windows Photo Gallery\\Original Images\0",
734 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{33E28130-4E1E-4676-835A-98395C3BC3BB}\0shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{3ADD1653-EB32-4CB0-BBD7-DFA0ABB5ACCA}\0\0",
742 "Pictures.library-ms\0",
743 "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{A990AE9F-A03B-4e80-94BC-9912D7504104}\0\0",
761 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{2227A280-3AEA-1069-A2DE-08002B30309D}\0\0",
769 "Microsoft\\Windows\\Printer Shortcuts\0",
803 "ProgramFilesCommon",
812 "ProgramFilesCommonX64",
821 "ProgramFilesCommonX86",
861 "::{4336a54d-038b-4685-ab02-99bb52d3fb8b}\0"
897 "Microsoft\\Windows\\GameExplorer\0",
933 "Microsoft\\Windows\\Ringtones\0",
951 "Microsoft\\Internet Explorer\\Quick Launch\0",
960 "Microsoft\\Windows\\Recent\0",
969 "RecordedTV.library-ms\0",
979 "::{645FF040-5081-101B-9F08-00AA002F954E}\0\0",
996 "Microsoft\\Windows\\Ringtones\0",
1003 KF_CATEGORY_PERUSER,
1005 "AppData\\Roaming\0",
1023 "Sample Pictures\0",
1032 "Sample Playlists\0",
1048 KF_CATEGORY_PERUSER,
1051 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{4C5C32FF-BB9D-43b0-B5B4-2D72E54EAAA4}\0\0",
1057 KF_CATEGORY_PERUSER,
1060 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{7d1d3a04-debb-4115-95cf-2f29da2920da}\0\0",
1066 KF_CATEGORY_VIRTUAL,
1069 "shell:::{BD7A2E7B-21CB-41b2-A086-B309680C6B7E}\\*\0\0",
1075 KF_CATEGORY_VIRTUAL,
1078 "::{9343812e-1c37-4a49-a12e-4b2d810d956b}\0\0",
1084 KF_CATEGORY_VIRTUAL,
1087 "shell:::{89D83576-6BD1-4C86-9454-BEB04E94C819}\\*\0\0",
1093 KF_CATEGORY_PERUSER,
1095 "Microsoft\\Windows\\SendTo\0",
1104 "Windows Sidebar\\Gadgets\0",
1111 KF_CATEGORY_PERUSER,
1113 "Microsoft\\Windows Sidebar\\Gadgets\0",
1120 KF_CATEGORY_PERUSER,
1122 "Microsoft\\Windows\\Start Menu\0",
1129 KF_CATEGORY_PERUSER,
1138 KF_CATEGORY_VIRTUAL,
1141 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\0"
1142 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\0\0" ,
1147 "SyncResultsFolder",
1148 KF_CATEGORY_VIRTUAL,
1151 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{BC48B32F-5910-47F5-8570-5074A8A5636A},\0"
1152 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{BC48B32F-5910-47F5-8570-5074A8A5636A},\0\0",
1158 KF_CATEGORY_VIRTUAL,
1161 "::{21EC2020-3AEA-1069-A2DD-08002B30309D}\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{F1390A9A-A3F4-4E5D-9C5F-98F3BD8D935C},\0"
1162 "::{26EE0668-A00A-44D7-9371-BEB064C98683}\\0\\::{9C73F5E5-7AE7-4E32-A8E8-8D23B85255BF}\\::{F1390A9A-A3F4-4E5D-9C5F-98F3BD8D935C},\0\0" ,
1186 KF_CATEGORY_PERUSER,
1188 "Microsoft\\Windows\\Templates\0",
1195 KF_CATEGORY_PERUSER,
1213 KF_CATEGORY_PERUSER,
1221 "UserProgramFilesCommon",
1222 KF_CATEGORY_PERUSER,
1231 KF_CATEGORY_VIRTUAL,
1234 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\0\0",
1239 "UsersLibrariesFolder",
1240 KF_CATEGORY_VIRTUAL,
1243 "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\0\0",
1249 KF_CATEGORY_PERUSER,
1252 "::{59031a47-3f72-44a7-89c5-5595fe6b30ee}\\{18989B1D-99B5-455B-841C-AB7C74E4DDFC}\0shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{A0953C92-50DC-43BF-BE83-3742FED03C9C}\0\0",
1258 KF_CATEGORY_PERUSER,
1260 "Videos.library-ms\0",
1261 "::{031E4825-7B94-4dc3-B131-E946B44C8DD5}\\{491E922F-5643-4af4-A7EB-4E7A138D8174}\0\0",
1275 "CredentialManager",
1302 "SystemCertificates",
1319 if (pSHGetFolderLocation)
1323 hr = pSHGetFolderLocation(
NULL, 0xeeee,
NULL, 0, &pidl);
1336 if (pSHGetSpecialFolderLocation)
1342 hr = pSHGetSpecialFolderLocation(
NULL, 0xeeee, &pidl);
1346 if (pSHGetFolderPathA)
1357 if (pSHGetSpecialFolderPathA)
1383 if (!pSHGetFolderLocation)
return TRUE;
1393 ok(pidlLast !=
NULL,
"%s: ILFindLastID failed\n",
1396 ret = pidlLast->mkid.abID[0];
1411 if (!pSHGetSpecialFolderLocation)
return TRUE;
1424 ret = pidlLast->mkid.abID[0];
1436 if (!pSHGetFolderPathA)
return;
1440 "SHGetFolderPathA(NULL, %s, NULL, SHGFP_TYPE_CURRENT, path) failed: 0x%08x\n",
getFolderName(
folder),
hr);
1448 if (!pSHGetSpecialFolderPathA)
return;
1454 "SHGetSpecialFolderPathA(NULL, path, %s, FALSE) failed\n",
1463 for (
i = 0;
i < numEntries;
i++)
1469 if (pSHGetFolderLocation)
1472 for (
j = 0; !foundTypeMatch &&
j < testEntries[
i].
numTypes;
j++)
1474 foundTypeMatch =
TRUE;
1476 "%s has unexpected type %d (0x%02x)\n",
1480 for (
j = 0, foundTypeMatch =
FALSE; !foundTypeMatch &&
1483 foundTypeMatch =
TRUE;
1485 "%s has unexpected type %d (0x%02x)\n",
1511 if (!pSHGetSpecialFolderPathA)
return;
1515 char *envVal =
getenv(envVar);
1518 "%%%s%% does not match SHGetSpecialFolderPath:\n"
1519 "%%%s%% is %s\nSHGetSpecialFolderPath returns %s\n",
1520 envVar, envVar, envVal,
path);
1534 if (!pSHGetFolderLocation)
return;
1543 if (pidlLast && (pidlLast->mkid.abID[0] ==
PT_SHELLEXT ||
1544 pidlLast->mkid.abID[0] ==
PT_GUID))
1546 GUID *shellGuid = (
GUID *)(pidlLast->mkid.abID + 2);
1574DEFINE_GUID(CLSID_NetworkExplorerFolder, 0xF02C1A0D, 0xBE21, 0x4350, 0x88, 0xB0, 0x73, 0x67, 0xFC, 0x96, 0xEF, 0x3C);
1575DEFINE_GUID(_CLSID_Documents, 0xA8CDFF1C, 0x4878, 0x43be, 0xB5, 0xFD, 0xF8, 0x09, 0x1C, 0x1C, 0x60, 0xD0);
1608 if (lpszPath && *lpszPath &&
1609 lpszPath[1] ==
':' && lpszPath[2] ==
'\\' && lpszPath[3] ==
'\0')
1634 if (!pSHGetSpecialFolderPathA)
return;
1642 "GetWindowsDirectory returns %s SHGetSpecialFolderPath returns %s\n",
1643 windowsDir, windowsShellPath);
1655 if (!pSHGetSpecialFolderPathA)
return;
1663 "GetSystemDirectory returns %s SHGetSpecialFolderPath returns %s\n",
1664 systemDir, systemShellPath);
1667 if (!pGetSystemWow64DirectoryA || !pGetSystemWow64DirectoryA(systemDirx86,
sizeof(systemDirx86)))
1674 "GetSystemDirectory returns %s SHGetSpecialFolderPath returns %s\n",
1675 systemDir, systemShellPath);
1708 "SHGetFolderPath returned 0x%08x, expected 0x80070002\n",
hr);
1713 "SHGetFolderLocation returned 0x%08x\n",
hr);
1717 "SHGetSpecialFolderPath succeeded, expected failure\n");
1722 "SHGetFolderLocation returned 0x%08x\n",
hr);
1734 trace(
"CSIDL_FAVORITES was changed to %s\n",
path);
1736 ok(!
ret,
"expected failure with ERROR_ALREADY_EXISTS\n");
1739 "got %d, expected ERROR_ALREADY_EXISTS\n",
GetLastError());
1750 else if (
arg[0] ==
'2')
1756 ok(
hr ==
S_OK,
"SHGetFolderPath failed: 0x%08x\n",
hr);
1775 static const char userShellFolders[] =
1776 "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders";
1780 if (!pSHGetFolderPathA)
return;
1781 if (!pSHGetFolderLocation)
return;
1782 if (!pSHGetSpecialFolderPathA)
return;
1783 if (!pSHGetSpecialFolderLocation)
return;
1784 if (!pSHFileOperationA)
return;
1792 len =
sizeof(originalPath);
1798 memcpy(modifiedPath, originalPath,
len);
1799 modifiedPath[
len++] =
'2';
1800 modifiedPath[
len++] =
'\0';
1801 trace(
"Changing CSIDL_FAVORITES to %s\n", modifiedPath);
1819 trace(
"Restoring CSIDL_FAVORITES to %s\n", originalPath);
1821 strlen(originalPath) + 1);
1832 "child process termination\n");
1835 else skip(
"RegQueryValueExA(key, Favorites, ...) failed\n");
1839 else skip(
"RegOpenKeyExA(HKEY_CURRENT_USER, %s, ...) failed\n", userShellFolders);
1849 if (!pSHGetKnownFolderPath || !pSHGetFolderPathEx)
1851 win_skip(
"SHGetKnownFolderPath or SHGetFolderPathEx not available\n");
1856 hr = pSHGetKnownFolderPath(&FOLDERID_Desktop, 0,
NULL,
NULL);
1860 path = (
void *)0xdeadbeef;
1867 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1882 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1887 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1894 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1901 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1910 hr = pSHGetKnownFolderPath(&FOLDERID_Desktop, 0,
NULL, &
path);
1911 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1915 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1920 hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0,
NULL,
buffer, 0);
1924 hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0,
NULL,
NULL,
len + 1);
1934 ok(
hr ==
S_OK,
"expected S_OK, got 0x%08x\n",
hr);
1948 if(
strcmp(hay,
"(null)") == 0 && !needle)
1954 ok(0,
"Failed to convert string\n");
1989 expectedCsidl = known_folder->
csidl & 0xFFFF;
1992 ok_(__FILE__, known_folder->
line)(
hr ==
S_OK,
"cannot retrieve CSIDL for folder %s\n", known_folder->
sFolderId);
1994 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);
1998 ok_(__FILE__, known_folder->
line)(
hr ==
S_OK,
"cannot get known folder for %s\n", known_folder->
sFolderId);
2001 hr = IKnownFolder_GetFolderDefinition(
folder, &kfd);
2002 ok_(__FILE__, known_folder->
line)(
hr ==
S_OK,
"cannot get known folder definition for %s\n", known_folder->
sFolderId);
2006 ok_(__FILE__, known_folder->
line)(
ret != 0,
"cannot convert known folder name \"%s\" to wide characters\n", known_folder->
sName);
2014 "invalid known folder parent for %s: %s retrieved\n",
2023 "invalid known folder attributes for %s: 0x%08x expected, but 0x%08x retrieved\n", known_folder->
sFolderId, known_folder->
attributes, kfd.
dwAttributes);
2025 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);
2030 IKnownFolder_Release(
folder);
2045 hr = IKnownFolder_GetFolderDefinition(
folder, &kfd);
2066 IKnownFolder_Release(
folder);
2074 static const WCHAR sWindows[] = {
'W',
'i',
'n',
'd',
'o',
'w',
's',0};
2075 static const WCHAR sWindows2[] = {
'w',
'i',
'n',
'd',
'o',
'w',
's',0};
2076 static const WCHAR sExample[] = {
'E',
'x',
'a',
'm',
'p',
'l',
'e',0};
2077 static const WCHAR sExample2[] = {
'E',
'x',
'a',
'm',
'p',
'l',
'e',
'2',0};
2078 static const WCHAR sSubFolder[] = {
'S',
'u',
'b',
'F',
'o',
'l',
'd',
'e',
'r',0};
2079 static const WCHAR sNoSuch[] = {
'N',
'o',
'S',
'u',
'c',
'h',0};
2080 static const WCHAR sBackslash[] = {
'\\',0};
2081 static const KNOWNFOLDERID newFolderId = {0x01234567, 0x89AB, 0xCDEF, {0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x01} };
2082 static const KNOWNFOLDERID subFolderId = {0xFEDCBA98, 0x7654, 0x3210, {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF} };
2087 KF_CATEGORY cat = 0;
2091 LPWSTR folderPath, errorMsg;
2103 lstrcatW(sExample2Path, sExample2);
2105 lstrcpyW(sSubFolderPath, sExamplePath);
2106 lstrcatW(sSubFolderPath, sBackslash);
2107 lstrcatW(sSubFolderPath, sSubFolder);
2109 lstrcpyW(sSubFolder2Path, sExample2Path);
2110 lstrcatW(sSubFolder2Path, sBackslash);
2111 lstrcatW(sSubFolder2Path, sSubFolder);
2116 &IID_IKnownFolderManager, (
LPVOID*)&mgr);
2118 win_skip(
"IKnownFolderManager unavailable\n");
2123 ok(
hr ==
S_OK,
"failed to create KnownFolderManager instance: 0x%08x\n",
hr);
2125 hr = IKnownFolderManager_QueryInterface(mgr, &IID_IMarshal, (
void**)&unk);
2129 ok(
hr ==
S_OK,
"failed to convert CSIDL to KNOWNFOLDERID: 0x%08x\n",
hr);
2132 hr = IKnownFolderManager_FolderIdToCsidl(mgr, &FOLDERID_Windows, &
csidl);
2133 ok(
hr ==
S_OK,
"failed to convert CSIDL to KNOWNFOLDERID: 0x%08x\n",
hr);
2136 hr = IKnownFolderManager_GetFolder(mgr, &FOLDERID_Windows, &
folder);
2137 ok(
hr ==
S_OK,
"failed to get known folder: 0x%08x\n",
hr);
2140 hr = IKnownFolder_QueryInterface(
folder, &IID_IMarshal, (
void**)&unk);
2143 hr = IKnownFolder_GetCategory(
folder, &cat);
2144 ok(
hr ==
S_OK,
"failed to get folder category: 0x%08x\n",
hr);
2145 ok(cat==KF_CATEGORY_FIXED,
"invalid folder category: %d\n", cat);
2148 ok(
hr ==
S_OK,
"failed to get folder id: 0x%08x\n",
hr);
2151 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2152 ok(
hr ==
S_OK,
"failed to get path from known folder: 0x%08x\n",
hr);
2156 hr = IKnownFolder_GetRedirectionCapabilities(
folder, &redirectionCapabilities);
2157 ok(
hr ==
S_OK,
"failed to get redirection capabilities: 0x%08x\n",
hr);
2159 ok(redirectionCapabilities==0,
"invalid redirection capabilities returned: %d\n", redirectionCapabilities);
2161 hr = IKnownFolder_SetPath(
folder, 0, sWinDir);
2165 hr = IKnownFolder_GetFolderDefinition(
folder, &kfDefinition);
2166 ok(
hr ==
S_OK,
"failed to get folder definition: 0x%08x\n",
hr);
2169 ok(kfDefinition.
category==KF_CATEGORY_FIXED,
"invalid folder category: 0x%08x\n", kfDefinition.
category);
2176 ok(
hr ==
S_OK,
"failed to release KnownFolder instance: 0x%08x\n",
hr);
2179 hr = IKnownFolderManager_GetFolderByName(mgr, sWindows, &
folder);
2180 ok(
hr ==
S_OK,
"failed to get known folder: 0x%08x\n",
hr);
2184 ok(
hr ==
S_OK,
"failed to get folder id: 0x%08x\n",
hr);
2188 ok(
hr ==
S_OK,
"failed to release KnownFolder instance: 0x%08x\n",
hr);
2191 hr = IKnownFolderManager_GetFolderByName(mgr, sWindows2, &
folder);
2192 ok(
hr ==
S_OK,
"failed to get known folder: 0x%08x\n",
hr);
2196 ok(
hr ==
S_OK,
"failed to get folder id: 0x%08x\n",
hr);
2200 ok(
hr ==
S_OK,
"failed to release KnownFolder instance: 0x%08x\n",
hr);
2203 folder = (IKnownFolder *)0xdeadbeef;
2204 hr = IKnownFolderManager_GetFolderByName(mgr, sNoSuch, &
folder);
2211 hr = IKnownFolderManager_GetFolderIds(mgr, &folders, &nCount);
2212 ok(
hr ==
S_OK,
"failed to get known folders: 0x%08x\n",
hr);
2213 for(
i=0;
i<nCount;++
i)
2224 ok(bRes,
"cannot create example directory: %s\n",
wine_dbgstr_w(sExamplePath));
2226 ok(bRes,
"cannot create example directory: %s\n",
wine_dbgstr_w(sExample2Path));
2228 ok(bRes,
"cannot create example directory: %s\n",
wine_dbgstr_w(sSubFolderPath));
2230 ZeroMemory(&kfDefinition,
sizeof(kfDefinition));
2231 kfDefinition.
category = KF_CATEGORY_PERUSER;
2239 hr = IKnownFolderManager_RegisterFolder(mgr, &newFolderId, &kfDefinition);
2241 win_skip(
"No permissions required to register custom known folder\n");
2244 ok(
hr ==
S_OK,
"failed to register known folder: 0x%08x\n",
hr);
2247 hr = IKnownFolderManager_GetFolder(mgr, &newFolderId, &
folder);
2248 ok(
hr ==
S_OK,
"failed to get known folder: 0x%08x\n",
hr);
2251 hr = IKnownFolder_GetCategory(
folder, &cat);
2252 ok(
hr ==
S_OK,
"failed to get folder category: hr=0x%0x\n",
hr);
2253 ok(cat == KF_CATEGORY_PERUSER,
"invalid category returned: %d, while %d (KF_CATEGORY_PERUSER) expected\n", cat, KF_CATEGORY_PERUSER);
2256 ok(
hr ==
S_OK,
"failed to get folder id: 0x%08x\n",
hr);
2260 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2261 ok(
hr ==
S_OK,
"failed to get path from known folder: 0x%08x\n",
hr);
2266 ZeroMemory(&kfSubDefinition,
sizeof(kfSubDefinition));
2267 kfSubDefinition.
category = KF_CATEGORY_PERUSER;
2274 kfSubDefinition.
fidParent = newFolderId;
2276 hr = IKnownFolderManager_RegisterFolder(mgr, &subFolderId, &kfSubDefinition);
2277 ok(
hr ==
S_OK,
"failed to register known folder: 0x%08x\n",
hr);
2281 hr = IKnownFolderManager_GetFolder(mgr, &subFolderId, &subFolder);
2282 ok(
hr ==
S_OK,
"failed to get known folder: 0x%08x\n",
hr);
2286 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2287 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2293 hr = IKnownFolderManager_Redirect(mgr, &newFolderId,
NULL, 0, sExample2Path, 0,
NULL, &errorMsg);
2297 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2298 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2303 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2305 ok(folderPath==
NULL,
"invalid known folder path retrieved: \"%s\" when NULL pointer was expected\n",
wine_dbgstr_w(folderPath));
2310 hr = IKnownFolder_SetPath(
folder, 0, sExamplePath);
2311 ok(
hr ==
S_OK,
"SetPath() failed: 0x%08x\n",
hr);
2314 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2315 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2322 ok(bRes,
"cannot create example directory: %s\n",
wine_dbgstr_w(sSubFolder2Path));
2325 hr = IKnownFolderManager_Redirect(mgr, &newFolderId,
NULL, 0, sExample2Path, 0,
NULL, &errorMsg);
2329 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2330 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2338 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2340 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2347 hr = IKnownFolder_SetPath(
folder, 0, sExamplePath);
2348 ok(
hr ==
S_OK,
"SetPath() failed: 0x%08x\n",
hr);
2351 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2352 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2357 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2358 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2365 ok(bRes,
"cannot create example directory: %s\n",
wine_dbgstr_w(sSubFolder2Path));
2368 hr = IKnownFolderManager_Redirect(mgr, &newFolderId,
NULL, 0, sExample2Path, 1, &subFolderId, &errorMsg);
2372 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2373 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2378 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2379 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2388 hr = IKnownFolder_SetPath(
folder, 0, sExamplePath);
2389 ok(
hr ==
S_OK,
"SetPath() failed: 0x%08x\n",
hr);
2392 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2393 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2398 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2399 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2409 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2410 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2415 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2416 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2425 hr = IKnownFolder_SetPath(
folder, 0, sExamplePath);
2426 ok(
hr ==
S_OK,
"SetPath() failed: 0x%08x\n",
hr);
2429 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2430 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2435 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2436 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2446 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2447 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2452 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2453 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2467 hr = IKnownFolder_GetPath(
folder, 0, &folderPath);
2468 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2473 hr = IKnownFolder_GetPath(subFolder, 0, &folderPath);
2474 ok(
hr ==
S_OK,
"failed to get known folder path: 0x%08x\n",
hr);
2479 if(!pSHGetKnownFolderPath || !pSHSetKnownFolderPath)
2481 win_skip(
"cannot get SHGet/SetKnownFolderPath routines\n");
2485 hr = pSHGetKnownFolderPath(&newFolderId, 0,
NULL, &folderPath);
2487 ok(
hr==
S_OK,
"cannot get known folder path: hr=0x%0x\n",
hr);
2492 hr = pSHSetKnownFolderPath(&newFolderId, 0,
NULL, sExample2Path);
2494 ok(
hr==
S_OK,
"cannot set known folder path: hr=0x%0x\n",
hr);
2497 hr = pSHGetKnownFolderPath(&newFolderId, 0,
NULL, &folderPath);
2499 ok(
hr==
S_OK,
"cannot get known folder path: hr=0x%0x\n",
hr);
2504 hr = pSHSetKnownFolderPath(&newFolderId, 0,
NULL, sExamplePath);
2506 ok(
hr==
S_OK,
"cannot set known folder path: hr=0x%0x\n",
hr);
2509 IKnownFolder_Release(subFolder);
2512 hr = IKnownFolderManager_UnregisterFolder(mgr, &subFolderId);
2513 ok(
hr ==
S_OK,
"failed to unregister folder: 0x%08x\n",
hr);
2519 ok(
hr ==
S_OK,
"failed to release KnownFolder instance: 0x%08x\n",
hr);
2525 hr = IKnownFolderManager_RegisterFolder(mgr, &newFolderId, &kfDefinition);
2526 ok(
hr ==
S_OK,
"failed to re-register known folder: 0x%08x\n",
hr);
2528 hr = IKnownFolderManager_GetFolder(mgr, &newFolderId, &
folder);
2529 ok(
hr ==
S_OK,
"failed to get known folder: 0x%08x\n",
hr);
2531 hr = IKnownFolder_GetFolderDefinition(
folder, &kfSubDefinition);
2532 ok(
hr ==
S_OK,
"failed to get folder definition: 0x%08x\n",
hr);
2539 ok(
hr ==
S_OK,
"failed to release KnownFolder instance: 0x%08x\n",
hr);
2542 hr = IKnownFolderManager_UnregisterFolder(mgr, &newFolderId);
2543 ok(
hr ==
S_OK,
"failed to unregister folder: 0x%08x\n",
hr);
2553 hr = IKnownFolderManager_Release(mgr);
2554 ok(
hr ==
S_OK,
"failed to release KnownFolderManager instance: 0x%08x\n",
hr);
2570 static const WCHAR does_not_existW[] = {
'%',
'D',
'O',
'E',
'S',
'_',
'N',
'O',
'T',
'_',
'E',
'X',
'I',
'S',
'T',
'%',0};
2571 static const CHAR does_not_existA[] =
"%DOES_NOT_EXIST%";
2574 "%ALLUSERSPROFILE%",
"%APPDATA%",
"%LOCALAPPDATA%",
2575 "%NUMBER_OF_PROCESSORS%",
"%OS%",
"%PROCESSOR_ARCHITECTURE%",
2576 "%PROCESSOR_IDENTIFIER%",
"%PROCESSOR_LEVEL%",
"%PROCESSOR_REVISION%",
2577 "%ProgramFiles%",
"%SystemDrive%",
2578 "%SystemRoot%",
"%USERPROFILE%",
"%windir%",
2582 "%HOMEDRIVE%%HOMEPATH%",
2598 win_skip(
"DoEnvironmentSubstA/W are broken on NT 4\n");
2604 "%d: got %s (expected %s)\n",
i, bufferA, expectedA);
2619 bufferA[
len + 2] = 0;
2628 "+1: got %s (expected %s)\n", bufferA, expectedA);
2640 bufferA[
len + 2] = 0;
2649 " 0: got %s (expected %s)\n", bufferA,
names[
i]);
2663 bufferA[
len + 2] = 0;
2671 "-1: got %s (expected %s)\n", bufferA,
names[
i]);
2685 lstrcpyA(bufferA, does_not_existA);
2688 res2 =
lstrlenA(does_not_existA) + 1;
2693 "%d: got %s (expected %s)\n",
i, bufferA, does_not_existA);
2712 static const WCHAR shortW[] = {
'f',
'i',
'l',
'e',
'.',
't',
's',
't',0};
2713 static const WCHAR short2W[] = {
'f',
'i',
'l',
'e',
' ',
'(',
'2',
')',
'.',
't',
's',
't',0};
2714 static const WCHAR tmpW[] = {
't',
'm',
'p',0};
2715 static const WCHAR longW[] = {
'n',
'a',
'm',
'e',0};
2716 static const WCHAR long2W[] = {
'n',
'a',
'm',
'e',
' ',
'(',
'2',
')',0};
2721 if (!pPathYetAnotherMakeUniqueName)
2723 win_skip(
"PathYetAnotherMakeUniqueName() is not available.\n");
2741 ret = pPathYetAnotherMakeUniqueName(
nameW, pathW, shortW,
NULL);
2752 ret = pPathYetAnotherMakeUniqueName(
nameW, pathW, shortW,
NULL);
2762 ret = pPathYetAnotherMakeUniqueName(
nameW, pathW, tmpW, longW);
2772 ret = pPathYetAnotherMakeUniqueName(
nameW, pathW, tmpW, longW);
2782 ret = pPathYetAnotherMakeUniqueName(
nameW, pathW,
NULL, longW);
2794 if (!pSHGetKnownFolderIDList)
2796 win_skip(
"SHGetKnownFolderIDList is not available.\n");
2804 pidl = (
void*)0xdeadbeef;
2805 hr = pSHGetKnownFolderIDList(
NULL, 0,
NULL, &pidl);
2808 pidl = (
void*)0xdeadbeef;
2811 ok(pidl ==
NULL,
"got %p\n", pidl);
2813 hr = pSHGetKnownFolderIDList(&FOLDERID_Desktop, 0,
NULL,
NULL);
2816 pidl = (
void*)0xdeadbeef;
2817 hr = pSHGetKnownFolderIDList(&FOLDERID_Desktop, 0,
NULL, &pidl);
2818 ok(
hr ==
S_OK,
"SHGetKnownFolderIDList failed: 0x%08x\n",
hr);
2823 pidl = (
void*)0xdeadbeef;
2825 ok(
hr ==
S_OK,
"SHGetKnownFolderIDList failed: 0x%08x\n",
hr);
2830 pidl = (
void*)0xdeadbeef;
2831 hr = pSHGetKnownFolderIDList(&FOLDERID_Documents, 0,
NULL, &pidl);
2832 ok(
hr ==
S_OK,
"SHGetKnownFolderIDList failed: 0x%08x\n",
hr);
2833 ok(!
ILIsEmpty(pidl),
"pidl should not be empty.\n");
2837 pidl = (
void*)0xdeadbeef;
2839 ok(
hr ==
S_OK,
"SHGetKnownFolderIDList failed: 0x%08x\n",
hr);
2840 ok(!
ILIsEmpty(pidl),
"pidl should not be empty.\n");
2847 if (!
init())
return;
2851 "GetSystemWow64DirectoryA" );
2857 if (!pSHGetFolderLocation)
2858 win_skip(
"SHGetFolderLocation is not available\n");
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
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)
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)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
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)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
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
#define sprintf(buf, format,...)
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
#define CSIDL_FLAG_CREATE
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_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
#define E_NOT_SUFFICIENT_BUFFER
#define HRESULT_FROM_WIN32(x)
#define HKEY_CURRENT_USER
LPSTR WINAPI CharPrevA(_In_ LPCSTR, _In_ LPCSTR)