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),
675 FIXME(
"%p %u %s %s %s stub\n",
676 lpszBuffer, dwBuffSize,
debugstr_w(lpszShortName),
692 return PathMakeUniqueNameW(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName);
693 return PathMakeUniqueNameA(lpszBuffer,dwBuffSize, lpszShortName,lpszLongName,lpszPathName);
707 file = longname ? longname : shortname;
811 TRACE(
"%s\n",pszPath);
841 DWORD iDir, cDirs, cbDirs;
848 for (cDirs = 0; dirs[cDirs]; ++cDirs)
851 cbDirs = (cDirs + 1) *
sizeof(
LPWSTR);
857 for (iDir = 0; iDir < cDirs; ++iDir)
860 if (dirsW[iDir] ==
NULL)
874 for (iDir = 0; iDir < cDirs; ++iDir)
890 dwWhich &= ~WHICH_LNK;
919 goto CheckAbsoluteAndFinish;
943CheckAbsoluteAndFinish:
944#if (_WIN32_WINNT >= _WIN32_WINNT_WS03)
977 FIXME(
"%s %p 0x%04x 0x%04x stub\n",
978 lpszPath, lpszBuff, dwBuffSize,
dwFlags);
979 if(!lpszPath)
return -1;
980 if(lpszBuff)
strcpy(lpszBuff, lpszPath);
993 FIXME(
"(%s, %p, 0x%04x, 0x%04x) stub\n",
995 if(!lpszPath)
return -1;
996 if(lpszBuff)
strcpyW(lpszBuff, lpszPath);
1034static const WCHAR szSHFolders[] =
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
1044 CSIDL_Type_InMyDocuments,
1057#define CSIDL_CONTACTS 0x0043
1058#define CSIDL_DOWNLOADS 0x0047
1059#define CSIDL_LINKS 0x004d
1060#define CSIDL_APPDATA_LOCALLOW 0x004e
1061#define CSIDL_SAVED_GAMES 0x0062
1062#define CSIDL_SEARCHES 0x0063
1088 &FOLDERID_InternetFolder,
1105 &FOLDERID_ControlPanelFolder,
1107 L"ControlPanelFolder",
1112 &FOLDERID_PrintersFolder,
1119 &FOLDERID_Documents,
1126 &FOLDERID_Favorites,
1152 &FOLDERID_RecycleBinFolder,
1154 L"RecycleBinFolder",
1158 &FOLDERID_StartMenu,
1174 CSIDL_Type_InMyDocuments,
1185 CSIDL_Type_InMyDocuments,
1211 &FOLDERID_ComputerFolder,
1213 L"MyComputerFolder",
1218 &FOLDERID_NetworkFolder,
1220 L"NetworkPlacesFolder",
1239 &FOLDERID_Templates,
1245 &FOLDERID_CommonStartMenu,
1247 L"Common Start Menu",
1252 &FOLDERID_CommonPrograms,
1263 &FOLDERID_CommonStartup,
1269 &FOLDERID_PublicDesktop,
1280 &FOLDERID_RoamingAppData,
1286 &FOLDERID_PrintHood,
1293 &FOLDERID_LocalAppData,
1311 &FOLDERID_Favorites,
1313 L"Common Favorites",
1318 &FOLDERID_InternetCache,
1336 &FOLDERID_ProgramData,
1356 &FOLDERID_ProgramFiles,
1369 CSIDL_Type_InMyDocuments,
1384 &FOLDERID_SystemX86,
1391 &FOLDERID_ProgramFilesX86,
1394 L"Program Files (x86)",
1398 &FOLDERID_ProgramFilesCommon,
1400 L"ProgramFilesCommon",
1405 &FOLDERID_ProgramFilesCommonX86,
1407 L"ProgramFilesCommonX86",
1408 L"Program Files (x86)\\Common Files",
1412 &FOLDERID_CommonTemplates,
1414 L"Common Templates",
1418 &FOLDERID_PublicDocuments,
1420 L"Common Documents",
1425 &FOLDERID_CommonAdminTools,
1427 L"Common Administrative Tools",
1431 &FOLDERID_AdminTools,
1433 L"Administrative Tools",
1437 &FOLDERID_ConnectionsFolder,
1439 L"ConnectionsFolder",
1462 &FOLDERID_PublicMusic,
1469 &FOLDERID_PublicPictures,
1476 &FOLDERID_PublicVideos,
1483 &FOLDERID_ResourceDir,
1489 &FOLDERID_LocalizedResourcesDir,
1495 &FOLDERID_CommonOEMLinks,
1501 &FOLDERID_CDBurning,
1504 L"Local Settings\\Application Data\\Microsoft\\CD Burning"
1527 &FOLDERID_AddNewPrograms,
1533 &FOLDERID_AppUpdates,
1539 &FOLDERID_ChangeRemovePrograms,
1545 &FOLDERID_ConflictFolder,
1557 &FOLDERID_DeviceMetadataStore,
1569 &FOLDERID_DocumentsLibrary,
1575 &FOLDERID_Downloads,
1577 CSIDL_Type_InMyDocuments,
1591 &FOLDERID_GameTasks,
1597 &FOLDERID_HomeGroup,
1603 &FOLDERID_ImplicitAppShortcuts,
1609 &FOLDERID_Libraries,
1621 &FOLDERID_LocalAppDataLow,
1624 L"AppData\\LocalLow"
1627 &FOLDERID_MusicLibrary,
1633 &FOLDERID_OriginalImages,
1639 &FOLDERID_PhotoAlbums,
1642 L"Pictures\\Slide Shows"
1645 &FOLDERID_PicturesLibrary,
1651 &FOLDERID_Playlists,
1657 &FOLDERID_ProgramFilesX64,
1663 &FOLDERID_ProgramFilesCommonX64,
1675 &FOLDERID_PublicDownloads,
1681 &FOLDERID_PublicGameTasks,
1684 L"Microsoft\\Windows\\GameExplorer"
1687 &FOLDERID_PublicLibraries,
1690 L"Microsoft\\Windows\\Libraries"
1693 &FOLDERID_PublicRingtones,
1696 L"Microsoft\\Windows\\Ringtones"
1699 &FOLDERID_QuickLaunch,
1705 &FOLDERID_RecordedTVLibrary,
1711 &FOLDERID_Ringtones,
1717 &FOLDERID_SampleMusic,
1720 L"Music\\Sample Music"
1723 &FOLDERID_SamplePictures,
1726 L"Pictures\\Sample Pictures"
1729 &FOLDERID_SamplePlaylists,
1732 L"Music\\Sample Playlists"
1735 &FOLDERID_SampleVideos,
1738 L"Videos\\Sample Videos"
1741 &FOLDERID_SavedGames,
1747 &FOLDERID_SavedSearches,
1753 &FOLDERID_SEARCH_CSC,
1759 &FOLDERID_SEARCH_MAPI,
1765 &FOLDERID_SearchHome,
1771 &FOLDERID_SidebarDefaultParts,
1777 &FOLDERID_SidebarParts,
1783 &FOLDERID_SyncManagerFolder,
1789 &FOLDERID_SyncResultsFolder,
1795 &FOLDERID_SyncSetupFolder,
1801 &FOLDERID_UserPinned,
1807 &FOLDERID_UserProfiles,
1813 &FOLDERID_UserProgramFiles,
1819 &FOLDERID_UserProgramFilesCommon,
1825 &FOLDERID_UsersFiles,
1831 &FOLDERID_UsersLibraries,
1837 &FOLDERID_VideosLibrary,
1861 LPCWSTR pszPath, pchBackslash;
1864 pchBackslash =
StrChrW(pszStart,
L'\\');
1867 *ppch = (
LPWSTR)(pchBackslash + 1);
1868 *pcch = (pchBackslash - pszStart) + 1;
1906 LPCWSTR pShellFolderPath, pUserShellFolderPath;
1907 HKEY userShellFolderKey, shellFolderKey;
1908 DWORD dwType, dwPathLen;
1915 strcpyW(shellFolderPath, userPrefix);
1918 pShellFolderPath = shellFolderPath;
1919 strcpyW(userShellFolderPath, userPrefix);
1922 pUserShellFolderPath = userShellFolderPath;
1930 if (
RegCreateKeyW(rootKey, pShellFolderPath, &shellFolderKey))
1935 if (
RegCreateKeyW(rootKey, pUserShellFolderPath, &userShellFolderKey))
1937 TRACE(
"Failed to create %s\n",
1977 TRACE(
"returning 0x%08x\n",
hr);
1990 else if ((
INT) hToken == -1)
1998 TRACE(
"_SHGetUserProfileDirectoryW returning %S\n",
szPath);
2039 FIXME(
"unsupported for user other than current or default\n");
2065 strcpyW(pszPath,
L"%USERPROFILE%");
2068 case CSIDL_Type_InMyDocuments:
2069 strcpyW(pszPath,
L"%USERPROFILE%");
2091 strcpyW(pszPath,
L"%ALLUSERSPROFILE%");
2095 strcpyW(pszPath,
L"%SystemDrive%");
2113 ERR(
"(%d,%s), LoadString failed, missing translation?\n",
folder,
2123 TRACE(
"returning 0x%08x\n",
hr);
2164 &dwType, (
LPBYTE)pszPath, &dwPathLen) ||
2192 pszPath[dwPathLen /
sizeof(
WCHAR)] =
'\0';
2204 char InfoBuffer[64];
2216 if (UserInfo ==
NULL)
2246 const WCHAR *szValueName;
2276 static const WCHAR DefaultW[] =
L".Default";
2280 if (hToken == (
HANDLE)-1)
2283 userPrefix = DefaultW;
2285 else if (hToken ==
NULL)
2291 if (userPrefix ==
NULL)
2303 szValueName = &
buffer[0];
2319 if (userPrefix !=
NULL && userPrefix != DefaultW)
2397 (
LPBYTE)szValue, &dwPathLen);
2401 dwPathLen /=
sizeof(
WCHAR);
2402 szValue[dwPathLen] =
'\0';
2455 if (szSrc[0] !=
'%')
2487 strcpyW(szDest, szProfilesPrefix);
2491 DWORD cchSize = cchDest;
2493 goto fallback_expand;
2503 strcpyW( def_val + 3,
L"Users\\Public" );
2516 strcpyW(szDest, szProfilesPrefix);
2520 DWORD cchSize = cchDest;
2522 goto fallback_expand;
2532 goto fallback_expand;
2544 DWORD ret = SHExpandEnvironmentStringsForUserW(hToken, szTemp, szDest, cchDest);
2555 else if (!
strcmpW( szTemp, szDest ))
break;
2564 TRACE(
"returning 0x%08x (input was %s, output is %s)\n",
hr,
2615 TRACE(
"%p,%#x,%p,%#x,%s,%p\n", hwndOwner,
nFolder, hToken,
dwFlags,
debugstr_a(pszSubPath), pszPath);
2630 if (pszSubPath && pszSubPath[0]) {
2668 TRACE(
"%p,%#x,%p,%#x,%s,%p\n", hwndOwner,
nFolder, hToken,
dwFlags,
debugstr_w(pszSubPath), pszPath);
2728 case CSIDL_Type_InMyDocuments:
2736 FIXME(
"bogus type %d, please fix\n",
type);
2765 strcpyW(pszPath, szBuildPath);
2785 ERR(
"Failed to create directory %s.\n",
debugstr_w(szBuildPath));
2790 TRACE(
"Created missing system directory %s\n",
debugstr_w(szBuildPath));
2811 L"%%SystemRoot%%\\system32\\shell32.dll,%d",
2870 const WCHAR *szValueName;
2876 DWORD dwType, dwPathLen;
2879 TRACE(
"%p,%p,%s,%p,%u\n", hRootKey, hToken,
2880 debugstr_w(szUserShellFolderPath), folders, foldersLen);
2906 szValueName = &
buffer[0];
2964 TRACE(
"returning 0x%08x\n",
hr);
2970 static const UINT folders[] = {
3003 LPCWSTR pUserShellFolderPath, pShellFolderPath;
3008 TRACE(
"%s\n", bDefault ?
"TRUE" :
"FALSE");
3013 strcpyW(userShellFolderPath,
L".Default");
3016 pUserShellFolderPath = userShellFolderPath;
3017 strcpyW(shellFolderPath,
L".Default");
3020 pShellFolderPath = shellFolderPath;
3031 pShellFolderPath, folders,
ARRAY_SIZE(folders));
3032 TRACE(
"returning 0x%08x\n",
hr);
3038 static const UINT folders[] = {
3057 TRACE(
"returning 0x%08x\n",
hr);
3114 WCHAR clsidstr[2 + 38 + 1];
3115 clsidstr[0] = clsidstr[1] =
L':';
3120 IShellFolder_Release(psf);
3162 TRACE(
"%p 0x%08x %p 0x%08x %p\n",
3217 hr = SHGetFolderLocationHelper(hwndOwner,
CSIDL_CONTROLS, &CLSID_NetworkConnections, ppidl);
3246 TRACE(
"-- (new pidl %p)\n",*ppidl);
#define PRF_TRYPROGRAMEXTENSIONS
#define PRF_REQUIREABSOLUTE
#define shell32_hInstance
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
#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 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)
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