28#define WIN32_NO_STATUS
42#include <wine/unicode.h>
55#define _WIN32_WINNT _WIN32_WINNT_WS03
77 static DWORD s_dwProductType = 0;
79 if (s_dwProductType != 0)
81 *ProductType = s_dwProductType;
91 cbValue =
sizeof(szValue);
97 else if (
lstrcmpW(szValue,
L"LanmanNT") == 0)
101 s_dwProductType = *ProductType;
111 szRoot[0] = (
WCHAR)(
L'A' + iDrive);
135#if (_WIN32_WINNT >= _WIN32_WINNT_WS03)
160 INT iDrive, cchPathLeft;
162 PWCHAR pchTemp = szTemp, pchPath;
202 if (szTemp[0] ==
L'\\')
216 if (*pchTemp ==
L'\\')
226#define VALID_SHORT_PATH_CHAR_CLASSES ( \
227 PATH_CHAR_CLASS_DOT | \
228 PATH_CHAR_CLASS_BACKSLASH | \
229 PATH_CHAR_CLASS_COLON | \
230 PATH_CHAR_CLASS_OTHER_VALID \
240 cchPathLeft -=
lstrlenW(pszPath) + 1;
248 cchPathLeft -= (2 + 1);
255 pchSlash =
StrChrW(pchSlash + 1,
L'\\');
260 pchTemp += pchSlash - pszPath;
261 cchPathLeft -= (
INT)(
SIZE_T)(pchSlash - pszPath) + 1;
275 while (*pchTemp && cchPathLeft > 0)
278 if (*pchTemp ==
L'.')
287 else if (pchTemp[1] ==
L'.' && (pchTemp[2] ==
UNICODE_NULL || pchTemp[2] ==
L'\\'))
297 while (*pchTemp && *pchTemp !=
L'\\')
302 while (*pchTemp ==
L'\\')
318 pchPath = &pszPath[
lstrlenW(pszPath)];
327 WCHAR szDotExtension[1 + 3 + 1] =
L"";
328 INT cchDotExtension = 0;
331 while (*pchTemp && *pchTemp !=
L'\\')
333 if (*pchTemp ==
L'.')
339 ZeroMemory(szDotExtension,
sizeof(szDotExtension));
344 if (cchDotExtension < 1 + 3)
345 szDotExtension[cchDotExtension++] = *pchTemp;
350 szTitle[cchTitle++] = *pchTemp;
357 for (ich = 0;
szTitle[ich] && cchPathLeft > 0; ++ich)
366 for (ich = 0; szDotExtension[ich] && cchPathLeft > 0; ++ich)
368 *pchPath++ = szDotExtension[ich];
376 while (*pchTemp !=
UNICODE_NULL && *pchTemp !=
L'\\' && cchPathLeft > 0)
378 *pchPath++ = *pchTemp++;
384 while (*pchTemp ==
L'\\')
399 if (*pchPath ==
L'.')
425 TRACE(
"(%s)\n",lpszPath);
428 return (
LPSTR)(*lpszPath?(lpszPath+1):lpszPath);
439 return (
LPWSTR)(*lpszPath?(lpszPath+1):lpszPath);
471 TRACE(
"%s\n", pszPath);
525 static const char *
const lpszExtensions[] =
526 {
"exe",
"com",
"pif",
"cmd",
"bat",
"scf",
"scr",
NULL };
528 TRACE(
"path=%s\n",lpszPath);
530 for(
i=0; lpszExtensions[
i];
i++)
543 static const WCHAR lpszExtensions[][4] =
544 {
L"exe",
L"com",
L"pif",
L"cmd",
L"bat",
L"scf",
L"scr",
L"" };
548 for(
i=0; lpszExtensions[
i][0];
i++)
549 if (!
wcsicmp(lpszExtension,lpszExtensions[
i]))
return TRUE;
593 DWORD cchMaxFileName, iDrive;
615 iDrive = ((lpszPath[0] -
L'A') & 0x1F);
624#define MSDOS_8DOT3_LEN 12
659 FIXME(
"%p %u %s %s %s stub\n",
660 lpszBuffer, dwBuffSize,
debugstr_a(lpszShortName),
677 TRACE(
"%p %u %s %s %s\n",
681 if (!
cchMax || !pszUniqueName)
686 PWSTR pszDest = pszUniqueName;
700 PCWSTR pszTitle = pszLongPlate ? pszLongPlate : pszTemplate;
701 PCWSTR pchDotExt, formatString =
L"%d";
716 cchTitle = pchDotExt - pszTemplate;
720 while (cchTitle > 1 && (
L'0' <= *
pch && *
pch <=
L'9'))
727#define MSDOS_8DOT3_FILENAME_TITLE_LEN 8
728 if (cchTitle > MSDOS_8DOT3_FILENAME_TITLE_LEN - 1)
729 cchTitle = MSDOS_8DOT3_FILENAME_TITLE_LEN - 1;
732 while (cchTitle > 1 && (dirLength + cchTitle + extLength + 1 > (
cchMax - 1)))
737 else if (cchTitle == 1)
742 pszTitle = pszTemplate;
752 while (*
pch >=
L'0' && *
pch <=
L'9')
758 openParen =
StrChrW(openParen + 1,
L'(');
763 pchDotExt = openParen + 1;
764 cchTitle = pchDotExt - pszTitle;
769 cchTitle = pchDotExt - pszTitle;
770 formatString =
L" (%d)";
776 cchTitle = pchDotExt - pszTitle;
777 formatString =
L" (%d)";
780 INT remainingChars =
cchMax - (dirLength + cchTitle + (
lstrlenW(formatString) - 2));
781 if (remainingChars <= 0)
783 else if (remainingChars == 1)
785 else if (remainingChars == 2)
794 PWSTR pchTitle = pszDest + cchTitle;
823 FIXME(
"%p %u %s %s %s stub\n",
824 lpszBuffer, dwBuffSize,
debugstr_w(lpszShortName),
841 return PathMakeUniqueNameW(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName);
842 return PathMakeUniqueNameA(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName);
856 file = longname ? longname : shortname;
960 TRACE(
"%s\n",pszPath);
990 DWORD iDir, cDirs, cbDirs;
997 for (cDirs = 0; dirs[cDirs]; ++cDirs)
1000 cbDirs = (cDirs + 1) *
sizeof(
LPWSTR);
1006 for (iDir = 0; iDir < cDirs; ++iDir)
1009 if (dirsW[iDir] ==
NULL)
1023 for (iDir = 0; iDir < cDirs; ++iDir)
1039 dwWhich &= ~WHICH_LNK;
1068 goto CheckAbsoluteAndFinish;
1092CheckAbsoluteAndFinish:
1093#if (_WIN32_WINNT >= _WIN32_WINNT_WS03)
1126 FIXME(
"%s %p 0x%04x 0x%04x stub\n",
1127 lpszPath, lpszBuff, dwBuffSize,
dwFlags);
1128 if(!lpszPath)
return -1;
1129 if(lpszBuff)
strcpy(lpszBuff, lpszPath);
1143 FIXME(
"(%s, %p, 0x%04x, 0x%04x) stub\n",
1145 if(!lpszPath)
return -1;
1146 if(lpszBuff)
strcpyW(lpszBuff, lpszPath);
1185static const WCHAR szSHFolders[] =
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
1195 CSIDL_Type_InMyDocuments,
1208#define CSIDL_CONTACTS 0x0043
1209#define CSIDL_DOWNLOADS 0x0047
1210#define CSIDL_LINKS 0x004d
1211#define CSIDL_APPDATA_LOCALLOW 0x004e
1212#define CSIDL_SAVED_GAMES 0x0062
1213#define CSIDL_SEARCHES 0x0063
1239 &FOLDERID_InternetFolder,
1256 &FOLDERID_ControlPanelFolder,
1258 L"ControlPanelFolder",
1263 &FOLDERID_PrintersFolder,
1270 &FOLDERID_Documents,
1277 &FOLDERID_Favorites,
1303 &FOLDERID_RecycleBinFolder,
1305 L"RecycleBinFolder",
1309 &FOLDERID_StartMenu,
1325 CSIDL_Type_InMyDocuments,
1336 CSIDL_Type_InMyDocuments,
1362 &FOLDERID_ComputerFolder,
1364 L"MyComputerFolder",
1369 &FOLDERID_NetworkFolder,
1371 L"NetworkPlacesFolder",
1390 &FOLDERID_Templates,
1396 &FOLDERID_CommonStartMenu,
1398 L"Common Start Menu",
1403 &FOLDERID_CommonPrograms,
1414 &FOLDERID_CommonStartup,
1420 &FOLDERID_PublicDesktop,
1431 &FOLDERID_RoamingAppData,
1437 &FOLDERID_PrintHood,
1444 &FOLDERID_LocalAppData,
1462 &FOLDERID_Favorites,
1464 L"Common Favorites",
1469 &FOLDERID_InternetCache,
1487 &FOLDERID_ProgramData,
1507 &FOLDERID_ProgramFiles,
1520 CSIDL_Type_InMyDocuments,
1535 &FOLDERID_SystemX86,
1542 &FOLDERID_ProgramFilesX86,
1545 L"Program Files (x86)",
1549 &FOLDERID_ProgramFilesCommon,
1551 L"ProgramFilesCommon",
1556 &FOLDERID_ProgramFilesCommonX86,
1558 L"ProgramFilesCommonX86",
1559 L"Program Files (x86)\\Common Files",
1563 &FOLDERID_CommonTemplates,
1565 L"Common Templates",
1569 &FOLDERID_PublicDocuments,
1571 L"Common Documents",
1576 &FOLDERID_CommonAdminTools,
1578 L"Common Administrative Tools",
1582 &FOLDERID_AdminTools,
1584 L"Administrative Tools",
1588 &FOLDERID_ConnectionsFolder,
1590 L"ConnectionsFolder",
1613 &FOLDERID_PublicMusic,
1620 &FOLDERID_PublicPictures,
1627 &FOLDERID_PublicVideos,
1634 &FOLDERID_ResourceDir,
1640 &FOLDERID_LocalizedResourcesDir,
1646 &FOLDERID_CommonOEMLinks,
1652 &FOLDERID_CDBurning,
1655 L"Local Settings\\Application Data\\Microsoft\\CD Burning"
1678 &FOLDERID_AddNewPrograms,
1684 &FOLDERID_AppUpdates,
1690 &FOLDERID_ChangeRemovePrograms,
1696 &FOLDERID_ConflictFolder,
1708 &FOLDERID_DeviceMetadataStore,
1720 &FOLDERID_DocumentsLibrary,
1726 &FOLDERID_Downloads,
1728 CSIDL_Type_InMyDocuments,
1742 &FOLDERID_GameTasks,
1748 &FOLDERID_HomeGroup,
1754 &FOLDERID_ImplicitAppShortcuts,
1760 &FOLDERID_Libraries,
1772 &FOLDERID_LocalAppDataLow,
1775 L"AppData\\LocalLow"
1778 &FOLDERID_MusicLibrary,
1784 &FOLDERID_OriginalImages,
1790 &FOLDERID_PhotoAlbums,
1793 L"Pictures\\Slide Shows"
1796 &FOLDERID_PicturesLibrary,
1802 &FOLDERID_Playlists,
1808 &FOLDERID_ProgramFilesX64,
1814 &FOLDERID_ProgramFilesCommonX64,
1826 &FOLDERID_PublicDownloads,
1832 &FOLDERID_PublicGameTasks,
1835 L"Microsoft\\Windows\\GameExplorer"
1838 &FOLDERID_PublicLibraries,
1841 L"Microsoft\\Windows\\Libraries"
1844 &FOLDERID_PublicRingtones,
1847 L"Microsoft\\Windows\\Ringtones"
1850 &FOLDERID_QuickLaunch,
1856 &FOLDERID_RecordedTVLibrary,
1862 &FOLDERID_Ringtones,
1868 &FOLDERID_SampleMusic,
1871 L"Music\\Sample Music"
1874 &FOLDERID_SamplePictures,
1877 L"Pictures\\Sample Pictures"
1880 &FOLDERID_SamplePlaylists,
1883 L"Music\\Sample Playlists"
1886 &FOLDERID_SampleVideos,
1889 L"Videos\\Sample Videos"
1892 &FOLDERID_SavedGames,
1898 &FOLDERID_SavedSearches,
1904 &FOLDERID_SEARCH_CSC,
1910 &FOLDERID_SEARCH_MAPI,
1916 &FOLDERID_SearchHome,
1922 &FOLDERID_SidebarDefaultParts,
1928 &FOLDERID_SidebarParts,
1934 &FOLDERID_SyncManagerFolder,
1940 &FOLDERID_SyncResultsFolder,
1946 &FOLDERID_SyncSetupFolder,
1952 &FOLDERID_UserPinned,
1958 &FOLDERID_UserProfiles,
1964 &FOLDERID_UserProgramFiles,
1970 &FOLDERID_UserProgramFilesCommon,
1976 &FOLDERID_UsersFiles,
1982 &FOLDERID_UsersLibraries,
1988 &FOLDERID_VideosLibrary,
2012 LPCWSTR pszPath, pchBackslash;
2015 pchBackslash =
StrChrW(pszStart,
L'\\');
2018 *ppch = (
LPWSTR)(pchBackslash + 1);
2019 *pcch = (pchBackslash - pszStart) + 1;
2057 LPCWSTR pShellFolderPath, pUserShellFolderPath;
2058 HKEY userShellFolderKey, shellFolderKey;
2059 DWORD dwType, dwPathLen;
2066 strcpyW(shellFolderPath, userPrefix);
2069 pShellFolderPath = shellFolderPath;
2070 strcpyW(userShellFolderPath, userPrefix);
2073 pUserShellFolderPath = userShellFolderPath;
2081 if (
RegCreateKeyW(rootKey, pShellFolderPath, &shellFolderKey))
2086 if (
RegCreateKeyW(rootKey, pUserShellFolderPath, &userShellFolderKey))
2088 TRACE(
"Failed to create %s\n",
2128 TRACE(
"returning 0x%08x\n",
hr);
2141 else if ((
INT) hToken == -1)
2149 TRACE(
"_SHGetUserProfileDirectoryW returning %S\n",
szPath);
2190 FIXME(
"unsupported for user other than current or default\n");
2216 strcpyW(pszPath,
L"%USERPROFILE%");
2219 case CSIDL_Type_InMyDocuments:
2220 strcpyW(pszPath,
L"%USERPROFILE%");
2242 strcpyW(pszPath,
L"%ALLUSERSPROFILE%");
2246 strcpyW(pszPath,
L"%SystemDrive%");
2264 ERR(
"(%d,%s), LoadString failed, missing translation?\n",
folder,
2274 TRACE(
"returning 0x%08x\n",
hr);
2315 &dwType, (
LPBYTE)pszPath, &dwPathLen) ||
2343 pszPath[dwPathLen /
sizeof(
WCHAR)] =
'\0';
2355 char InfoBuffer[64];
2367 if (UserInfo ==
NULL)
2397 const WCHAR *szValueName;
2427 static const WCHAR DefaultW[] =
L".Default";
2431 if (hToken == (
HANDLE)-1)
2434 userPrefix = DefaultW;
2436 else if (hToken ==
NULL)
2442 if (userPrefix ==
NULL)
2454 szValueName = &
buffer[0];
2470 if (userPrefix !=
NULL && userPrefix != DefaultW)
2548 (
LPBYTE)szValue, &dwPathLen);
2552 dwPathLen /=
sizeof(
WCHAR);
2553 szValue[dwPathLen] =
'\0';
2606 if (szSrc[0] !=
'%')
2638 strcpyW(szDest, szProfilesPrefix);
2644 goto fallback_expand;
2654 strcpyW( def_val + 3,
L"Users\\Public" );
2667 strcpyW(szDest, szProfilesPrefix);
2673 goto fallback_expand;
2683 goto fallback_expand;
2695 DWORD ret = SHExpandEnvironmentStringsForUserW(hToken, szTemp, szDest,
cchDest);
2706 else if (!
strcmpW( szTemp, szDest ))
break;
2715 TRACE(
"returning 0x%08x (input was %s, output is %s)\n",
hr,
2766 TRACE(
"%p,%#x,%p,%#x,%s,%p\n", hwndOwner,
nFolder, hToken,
dwFlags,
debugstr_a(pszSubPath), pszPath);
2781 if (pszSubPath && pszSubPath[0]) {
2819 TRACE(
"%p,%#x,%p,%#x,%s,%p\n", hwndOwner,
nFolder, hToken,
dwFlags,
debugstr_w(pszSubPath), pszPath);
2879 case CSIDL_Type_InMyDocuments:
2887 FIXME(
"bogus type %d, please fix\n",
type);
2916 strcpyW(pszPath, szBuildPath);
2936 ERR(
"Failed to create directory %s.\n",
debugstr_w(szBuildPath));
2941 TRACE(
"Created missing system directory %s\n",
debugstr_w(szBuildPath));
2962 L"%%SystemRoot%%\\system32\\shell32.dll,%d",
3021 const WCHAR *szValueName;
3027 DWORD dwType, dwPathLen;
3030 TRACE(
"%p,%p,%s,%p,%u\n", hRootKey, hToken,
3031 debugstr_w(szUserShellFolderPath), folders, foldersLen);
3057 szValueName = &
buffer[0];
3115 TRACE(
"returning 0x%08x\n",
hr);
3121 static const UINT folders[] = {
3154 LPCWSTR pUserShellFolderPath, pShellFolderPath;
3159 TRACE(
"%s\n", bDefault ?
"TRUE" :
"FALSE");
3164 strcpyW(userShellFolderPath,
L".Default");
3167 pUserShellFolderPath = userShellFolderPath;
3168 strcpyW(shellFolderPath,
L".Default");
3171 pShellFolderPath = shellFolderPath;
3182 pShellFolderPath, folders,
ARRAY_SIZE(folders));
3183 TRACE(
"returning 0x%08x\n",
hr);
3189 static const UINT folders[] = {
3208 TRACE(
"returning 0x%08x\n",
hr);
3265 WCHAR clsidstr[2 + 38 + 1];
3266 clsidstr[0] = clsidstr[1] =
L':';
3271 IShellFolder_Release(psf);
3313 TRACE(
"%p 0x%08x %p 0x%08x %p\n",
3368 hr = SHGetFolderLocationHelper(hwndOwner,
CSIDL_CONTROLS, &CLSID_NetworkConnections, ppidl);
3397 TRACE(
"-- (new pidl %p)\n",*ppidl);
static _In_ LPCWSTR _In_ DWORD _In_ int _In_ int cchDest
#define PRF_TRYPROGRAMEXTENSIONS
#define PRF_REQUIREABSOLUTE
#define shell32_hInstance
ACPI_SIZE strlen(const char *String)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void shell(int argc, const char *argv[])
#define RegCloseKey(hKey)
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
#define IDI_SHELL_NETWORK_FOLDER
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
BOOL WINAPI GetUserNameW(LPWSTR lpszName, LPDWORD lpSize)
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
BOOL WINAPI ConvertSidToStringSidW(PSID Sid, LPWSTR *StringSid)
LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
#define GetCurrentDirectoryW(x, y)
#define GetCurrentProcess()
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
static const WCHAR *const ext[]
static void cleanup(void)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
BOOL WINAPI GetVolumeInformationW(IN LPCWSTR lpRootPathName, IN LPWSTR lpVolumeNameBuffer, IN DWORD nVolumeNameSize, OUT LPDWORD lpVolumeSerialNumber OPTIONAL, OUT LPDWORD lpMaximumComponentLength OPTIONAL, OUT LPDWORD lpFileSystemFlags OPTIONAL, OUT LPWSTR lpFileSystemNameBuffer OPTIONAL, IN DWORD nFileSystemNameSize)
DWORD WINAPI GetShortPathNameA(IN LPCSTR lpszLongPath, OUT LPSTR lpszShortPath, IN DWORD cchBuffer)
UINT WINAPI GetSystemWow64DirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetShortPathNameW(IN LPCWSTR lpszLongPath, OUT LPWSTR lpszShortPath, IN DWORD cchBuffer)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
EXTERN_C HRESULT SHBindToObject(_In_opt_ IShellFolder *psf, _In_ LPCITEMIDLIST pidl, _In_ REFIID riid, _Out_ void **ppvObj)
void WINAPI SHFree(LPVOID pv)
LPVOID WINAPI SHAlloc(SIZE_T len)
static LPWSTR PathGetExtensionW(LPCWSTR lpszPath)
#define CSIDL_APPDATA_LOCALLOW
VOID WINAPI PathQualifyAW(LPVOID pszPath)
BOOL WINAPI PathIsRootAW(LPCVOID lpszPath)
VOID WINAPI PathQualifyA(LPSTR pszPath)
static const WCHAR Program_Files_Common_FilesW[]
static VOID WINAPI PathQualifyExW(_Inout_ LPWSTR pszPath, _Inout_opt_ LPCWSTR pszDir, _In_ DWORD dwFlags)
static BOOL DoGetProductType(PNT_PRODUCT_TYPE ProductType)
HRESULT SHELL_RegisterShellFolders(void)
static const WCHAR szKnownFolderRedirections[]
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
enum _CSIDL_Type CSIDL_Type
LPVOID WINAPI SHPathGetExtensionW(LPCWSTR lpszPath, DWORD void1, DWORD void2)
BOOL WINAPI IsLFNDriveAW(LPCVOID lpszPath)
static const WCHAR Start_Menu_Admin_ToolsW[]
static const WCHAR szSHUserFolders[]
HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl)
#define VALID_SHORT_PATH_CHAR_CLASSES
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
static const WCHAR Local_Settings_HistoryW[]
static HRESULT _SHGetCurrentVersionPath(DWORD dwFlags, BYTE folder, LPWSTR pszPath)
static BOOL PathMakeUniqueNameW(LPWSTR lpszBuffer, DWORD dwBuffSize, LPCWSTR lpszShortName, LPCWSTR lpszLongName, LPCWSTR lpszPathName)
static LPSTR PathGetExtensionA(LPCSTR lpszPath)
static HRESULT _SHRegisterUserShellFolders(BOOL bDefault)
BOOL WINAPI PathAppendAW(LPVOID lpszPath1, LPCVOID lpszPath2)
static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest)
static void PathGetShortPathA(LPSTR pszPath)
static BOOL PathMakeUniqueNameA(LPSTR lpszBuffer, DWORD dwBuffSize, LPCSTR lpszShortName, LPCSTR lpszLongName, LPCSTR lpszPathName)
BOOL WINAPI PathIsExeAW(LPCVOID path)
BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath)
static const WCHAR Program_FilesW[]
static const BOOL is_win64
@ CSIDL_Type_SystemX86Path
HRESULT WINAPI SHGetFolderPathAndSubDirW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPCWSTR pszSubPath, LPWSTR pszPath)
static HRESULT _SHOpenProfilesKey(PHKEY pKey)
#define CSIDL_SAVED_GAMES
static LONG PathProcessCommandW(LPCWSTR lpszPath, LPWSTR lpszBuff, DWORD dwBuffSize, DWORD dwFlags)
static BOOL WINAPI PathMakeAbsoluteW(_Inout_ LPWSTR path)
BOOL WINAPI IsLFNDriveW(LPCWSTR lpszPath)
static HRESULT _SHGetAllUsersProfilePath(DWORD dwFlags, BYTE folder, LPWSTR pszPath)
HRESULT WINAPI SHGetFolderPathAndSubDirA(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPCSTR pszSubPath, LPSTR pszPath)
INT Shell_ParseSpecialFolder(_In_ LPCWSTR pszStart, _Out_ LPWSTR *ppch, _Out_ INT *pcch)
static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath)
static BOOL PathIsExeA(LPCSTR lpszPath)
static const WCHAR Start_Menu_ProgramsW[]
static const WCHAR szSHFolders[]
BOOL APIENTRY IsRemovableDrive(DWORD iDrive)
INT SHGetSpecialFolderID(_In_ LPCWSTR pszName)
static HRESULT _SHGetProfilesValue(HKEY profilesKey, LPCWSTR szValueName, LPWSTR szValue, LPCWSTR szDefault)
static const CSIDL_DATA CSIDL_Data[]
static BOOL WINAPI PathSearchOnExtensionsW(_Inout_ LPWSTR pszPath, _In_opt_ LPCWSTR *ppszDirs, _In_ BOOL bDoSearch, _In_ DWORD dwWhich)
static const WCHAR Local_Settings_Temporary_Internet_FilesW[]
static const WCHAR Start_Menu_StartupW[]
static const WCHAR szKnownFolderDescriptions[]
VOID WINAPI PathQualifyW(LPWSTR pszPath)
BOOL WINAPI PathMakeUniqueNameAW(LPVOID lpszBuffer, DWORD dwBuffSize, LPCVOID lpszShortName, LPCVOID lpszLongName, LPCVOID lpszPathName)
BOOL WINAPI PathResolveA(LPSTR path, LPCSTR *dirs, DWORD flags)
BOOL _SHGetUserProfileDirectoryW(HANDLE hToken, LPWSTR szPath, LPDWORD lpcchPath)
LONG WINAPI PathProcessCommandAW(LPCVOID lpszPath, LPVOID lpszBuff, DWORD dwBuffSize, DWORD dwFlags)
VOID WINAPI PathGetShortPathAW(LPVOID pszPath)
static const WCHAR MusicW[]
BOOL WINAPI PathResolveW(_Inout_ LPWSTR path, _Inout_opt_ LPCWSTR *dirs, _In_ DWORD flags)
static HRESULT _SHRegisterCommonShellFolders(void)
static LPWSTR _GetUserSidStringFromToken(HANDLE Token)
BOOL WINAPI PathResolveAW(LPVOID path, LPCVOID *paths, DWORD flags)
static const WCHAR PicturesW[]
static LONG PathProcessCommandA(LPCSTR lpszPath, LPSTR lpszBuff, DWORD dwBuffSize, DWORD dwFlags)
static HRESULT _SHRegisterFolders(HKEY hRootKey, HANDLE hToken, LPCWSTR szUserShellFolderPath, LPCWSTR szShellFolderPath, const UINT folders[], UINT foldersLen)
int WINAPI PathCleanupSpec(LPCWSTR lpszPathW, LPWSTR lpszFileW)
static HRESULT _SHGetUserProfilePath(HANDLE hToken, DWORD dwFlags, BYTE folder, LPWSTR pszPath)
static const WCHAR Application_DataW[]
BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath)
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)
BOOL WINAPI SHGetSpecialFolderPathW(HWND hwndOwner, LPWSTR szPath, int nFolder, BOOL bCreate)
BOOL PathIsExeW(LPCWSTR lpszPath)
static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix, LPCWSTR value, LPWSTR path)
static void PathGetShortPathW(LPWSTR pszPath)
BOOL WINAPI IsLFNDriveA(LPCSTR lpszPath)
static const WCHAR Local_Settings_Application_DataW[]
static BOOL WINAPI PathIsAbsoluteW(_In_ LPCWSTR path)
enum _NT_PRODUCT_TYPE NT_PRODUCT_TYPE
enum _NT_PRODUCT_TYPE * PNT_PRODUCT_TYPE
VOID WINAPI FixSlashesAndColonW(LPWSTR lpwstr)
int WINAPI PathGetDriveNumberW(const WCHAR *path)
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
BOOL WINAPI PathFindOnPathW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs)
UINT WINAPI PathGetCharTypeA(UCHAR ch)
BOOL WINAPI PathRemoveFileSpecA(LPSTR lpszPath)
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
void WINAPI PathRemoveExtensionW(LPWSTR lpszPath)
LPWSTR WINAPI PathBuildRootW(LPWSTR lpszPath, int drive)
BOOL WINAPI PathFileExistsA(LPCSTR lpszPath)
BOOL WINAPI PathIsRootW(LPCWSTR lpszPath)
BOOL WINAPI PathIsRootA(LPCSTR lpszPath)
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
VOID WINAPI PathUnquoteSpacesW(LPWSTR lpszPath)
BOOL WINAPI PathIsUNCW(LPCWSTR lpszPath)
BOOL WINAPI PathFindOnPathExW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs, DWORD dwWhich)
LPSTR WINAPI PathFindExtensionA(LPCSTR lpszPath)
BOOL WINAPI PathIsValidCharW(WCHAR c, DWORD class)
UINT WINAPI PathGetCharTypeW(WCHAR ch)
BOOL WINAPI PathIsFileSpecW(LPCWSTR lpszPath)
BOOL WINAPI PathFileExistsAndAttributesW(LPCWSTR lpszPath, DWORD *dwAttr)
BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath, DWORD dwWhich)
LPWSTR WINAPI PathRemoveBackslashW(LPWSTR lpszPath)
DWORD WINAPI SHAnsiToUnicode(LPCSTR lpSrcStr, LPWSTR lpDstStr, int iLen)
INT WINAPI SHUnicodeToAnsi(LPCWSTR lpSrcStr, LPSTR lpDstStr, INT iLen)
LPWSTR WINAPI StrCpyNW(LPWSTR dst, LPCWSTR src, int count)
BOOL WINAPI PathIsURLW(LPCWSTR lpstrPath)
#define IShellFolder_ParseDisplayName
BOOL WINAPI GetAllUsersProfileDirectoryW(_Out_opt_ LPWSTR lpProfileDir, _Inout_ LPDWORD lpcchSize)
BOOL WINAPI GetDefaultUserProfileDirectoryW(_Out_opt_ LPWSTR lpProfileDir, _Inout_ LPDWORD lpcchSize)
BOOL WINAPI GetUserProfileDirectoryW(_In_ HANDLE hToken, _Out_opt_ LPWSTR lpProfileDir, _Inout_ LPDWORD lpcchSize)
static const WCHAR Cleanup[]
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLuint GLsizei GLsizei * length
GLsizei const GLuint * paths
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
TCHAR szTitle[MAX_LOADSTRING]
#define ERROR_ALREADY_EXISTS
#define ERROR_FILE_NOT_FOUND
static DWORD DWORD void LPSTR DWORD cch
static const WCHAR path1[]
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
#define FILE_ATTRIBUTE_READONLY
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_SYSTEM
#define PathAddBackslashW
LPITEMIDLIST _ILCreateMyComputer(void)
LPITEMIDLIST _ILCreateIExplore(void)
void WINAPI ILFree(LPITEMIDLIST pidl)
HRESULT WINAPI SHILCreateFromPathW(LPCWSTR path, LPITEMIDLIST *ppidl, DWORD *attributes)
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
LPITEMIDLIST _ILCreateDesktop(void)
LPITEMIDLIST _ILCreateNetwork(void)
LPITEMIDLIST _ILCreatePrinters(void)
LPITEMIDLIST _ILCreateControlPanel(void)
LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path)
LPITEMIDLIST _ILCreateMyDocuments(void)
LPITEMIDLIST _ILCreateBitBucket(void)
#define strncmpiW(s1, s2, n)
static __inline BOOL SHELL_OsIsUnicode(void)
static __inline LPWSTR __SHCloneStrAtoW(WCHAR **target, const char *source)
#define CSIDL_FLAG_CREATE
int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
#define CSIDL_COMMON_TEMPLATES
#define CSIDL_COMMON_DESKTOPDIRECTORY
#define CSIDL_PROGRAM_FILES
#define CSIDL_INTERNET_CACHE
_In_ int _In_ BOOL bCreate
#define CSIDL_DESKTOPDIRECTORY
#define CSIDL_MYDOCUMENTS
#define CSIDL_COMMON_STARTMENU
#define CSIDL_FLAG_NO_ALIAS
#define CSIDL_COMMON_APPDATA
#define CSIDL_CONNECTIONS
#define CSIDL_COMMON_PROGRAMS
#define CSIDL_FLAG_DONT_VERIFY
#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_FOLDER_MASK
#define CSIDL_PROGRAM_FILESX86
#define CSIDL_COMMON_PICTURES
#define CSIDL_COMMON_STARTUP
#define CSIDL_COMMON_DOCUMENTS
#define CSIDL_COMMON_ADMINTOOLS
#define IDI_SHELL_MY_DOCUMENTS
#define IDI_SHELL_MY_MUSIC
#define IDI_SHELL_MY_PICTURES
#define IDI_SHELL_TSKBAR_STARTMENU
#define IDI_SHELL_COMPUTER_FOLDER
#define IDI_SHELL_DESKTOP
#define IDI_SHELL_FAVORITES
#define IDS_INTERNET_CACHE
#define IDI_SHELL_MY_MOVIES
#define IDI_SHELL_PROGRAMS_FOLDER
#define IDI_SHELL_RECENT_DOCUMENTS
#define IDI_SHELL_NETWORK
#define IDI_SHELL_PRINTERS_FOLDER
#define IDS_COMMON_PICTURES
#define IDS_PROGRAM_FILES_COMMON
#define IDS_DESKTOPDIRECTORY
#define IDI_SHELL_NETWORK_CONNECTIONS
#define IDI_SHELL_FONTS_FOLDER
#define IDI_SHELL_CONTROL_PANEL
#define IDS_PROGRAM_FILES
#define IDS_LOCAL_APPDATA
#define IDI_SHELL_SYSTEM_GEAR
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyNW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, size_t cchToCopy)
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define E_NOT_SUFFICIENT_BUFFER
#define ERROR_PATH_NOT_FOUND
#define ERROR_FILENAME_EXCED_RANGE
#define HRESULT_FROM_WIN32(x)
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define IS_INTRESOURCE(i)
LPWSTR WINAPI CharPrevW(_In_ LPCWSTR, _In_ LPCWSTR)
#define MAKEINTRESOURCEW(i)
static const WCHAR userName[]
struct _TOKEN_USER * PTOKEN_USER