29#include "wine/unicode.h"
36#define NO_SHLWAPI_STREAM
52#define GET_FUNC(func, module, name, fail) \
55 if (!SHLWAPI_h##module && !(SHLWAPI_h##module = LoadLibraryA(#module ".dll"))) return fail; \
56 func = (fn##func)GetProcAddress(SHLWAPI_h##module, name); \
57 if (!func) return fail; \
110 if (lpszPath && lpszAppend)
113 while (*lpszAppend ==
'\\')
130 if (lpszPath && lpszAppend)
133 while (*lpszAppend ==
'\\')
169 if (!lpszDir && !lpszFile)
204 if (!lpszDir && !lpszFile)
210 if ((!lpszFile || !*lpszFile) && lpszDir)
217 if (!lpszDir || !*lpszDir || *lpszFile !=
'\\' ||
PathIsUNCW(lpszFile))
266 LPSTR prev = lpszPath;
306 if (lpszPath[-1] !=
'\\')
335 lpszPath[0] =
'A' +
drive;
354 lpszPath[0] =
'A' +
drive;
375 LPCSTR lastSlash = lpszPath;
379 while (lpszPath && *lpszPath)
381 if ((*lpszPath ==
'\\' || *lpszPath ==
'/' || *lpszPath ==
':') &&
382 lpszPath[1] && lpszPath[1] !=
'\\' && lpszPath[1] !=
'/')
383 lastSlash = lpszPath + 1;
386 return (
LPSTR)lastSlash;
400 while (lpszPath && *lpszPath)
402 if ((*lpszPath ==
'\\' || *lpszPath ==
'/' || *lpszPath ==
':') &&
403 lpszPath[1] && lpszPath[1] !=
'\\' && lpszPath[1] !=
'/')
404 lastSlash = lpszPath + 1;
432 if (*lpszPath ==
'\\' || *lpszPath==
' ')
434 else if (*lpszPath ==
'.')
435 lastpoint = lpszPath;
439 return (
LPSTR)(lastpoint ? lastpoint : lpszPath);
457 if (*lpszPath ==
'\\' || *lpszPath==
' ')
459 else if (*lpszPath ==
'.')
460 lastpoint = lpszPath;
464 return (
LPWSTR)(lastpoint ? lastpoint : lpszPath);
491 if ((*lpszPath==
' ') && !bSeenQuote)
492 return (
LPSTR)lpszPath + 1;
493 if (*lpszPath ==
'"')
494 bSeenQuote = !bSeenQuote;
498 return (
LPSTR)lpszPath;
516 if ((*lpszPath==
' ') && !bSeenQuote)
517 return (
LPWSTR)lpszPath + 1;
518 if (*lpszPath ==
'"')
519 bSeenQuote = !bSeenQuote;
542 if (lpszPath && !
IsDBCSLeadByte(*lpszPath) && lpszPath[1] ==
':' &&
544 return tolower(*lpszPath) -
'a';
557 static const WCHAR nt_prefixW[] = {
'\\',
'\\',
'?',
'\\'};
588 LPSTR lpszFileSpec = lpszPath;
596 if (*lpszPath ==
'\\')
597 lpszFileSpec = ++lpszPath;
598 if (*lpszPath ==
'\\')
599 lpszFileSpec = ++lpszPath;
603 if(*lpszPath ==
'\\')
604 lpszFileSpec = lpszPath;
605 else if(*lpszPath ==
':')
607 lpszFileSpec = ++lpszPath;
608 if (*lpszPath ==
'\\')
617 *lpszFileSpec =
'\0';
631 LPWSTR lpszFileSpec = lpszPath;
639 if (*lpszPath ==
'\\')
640 lpszFileSpec = ++lpszPath;
641 if (*lpszPath ==
'\\')
642 lpszFileSpec = ++lpszPath;
646 if(*lpszPath ==
'\\')
647 lpszFileSpec = lpszPath;
648 else if(*lpszPath ==
':')
650 lpszFileSpec = ++lpszPath;
651 if (*lpszPath ==
'\\')
659 *lpszFileSpec =
'\0';
684 if(lpszFileName != lpszPath)
700 if(lpszFileName != lpszPath)
768 if(*lpszLastChar ==
' ')
769 *lpszLastChar =
'\0';
786 if (*lpszArgs || (lpszArgs > lpszPath && lpszArgs[-1] ==
' '))
813 if (lpszPath && *lpszPath !=
'\0')
830 if (lpszPath && *lpszPath !=
'\0')
875 szTemp = lpszPath +
strlenW(lpszPath);
876 if (szTemp > lpszPath) szTemp--;
900 if (!pszPath || !*pszPath)
905 while (*pszPath ==
' ')
909 *
start++ = *pszPath++;
912 while (
start[-1] ==
' ')
929 if (!pszPath || !*pszPath)
934 while (*pszPath ==
' ')
938 *
start++ = *pszPath++;
941 while (
start[-1] ==
' ')
965 if(lpszPath &&
StrChrA(lpszPath,
' '))
967 size_t iLen =
strlen(lpszPath) + 1;
971 memmove(lpszPath + 1, lpszPath, iLen);
973 lpszPath[iLen] =
'"';
974 lpszPath[iLen + 1] =
'\0';
988 if(lpszPath &&
StrChrW(lpszPath,
' '))
990 int iLen =
strlenW(lpszPath) + 1;
996 lpszPath[iLen] =
'"';
997 lpszPath[iLen + 1] =
'\0';
1022 if (lpszPath && *lpszPath ==
'"')
1026 if (lpszPath[dwLen] ==
'"')
1028 lpszPath[dwLen] =
'\0';
1029 for (; *lpszPath; lpszPath++)
1030 *lpszPath = lpszPath[1];
1044 if (lpszPath && *lpszPath ==
'"')
1048 if (lpszPath[dwLen] ==
'"')
1050 lpszPath[dwLen] =
'\0';
1051 for (; *lpszPath; lpszPath++)
1052 *lpszPath = lpszPath[1];
1082 if ((lpszComma =
strchr(lpszPath,
',')))
1084 *lpszComma++ =
'\0';
1107 if ((lpszComma =
StrChrW(lpszPath,
',')))
1109 *lpszComma++ =
'\0';
1125 static const WCHAR pszExts[][5] = { {
'.',
'p',
'i',
'f', 0},
1126 {
'.',
'c',
'o',
'm', 0},
1127 {
'.',
'e',
'x',
'e', 0},
1128 {
'.',
'b',
'a',
't', 0},
1129 {
'.',
'l',
'n',
'k', 0},
1130 {
'.',
'c',
'm',
'd', 0},
1142 if (!*szExt || dwWhich & 0x40)
1152 while ( (dwWhich & 0x1) && pszExts[iChoose][0] )
1154 while (pszExts[iChoose][0])
1162 lstrcpyW(lpszPath + iLen, pszExts[iChoose]);
1171 *(lpszPath + iLen) = (
WCHAR)
'\0';
1225 static const WCHAR szSystem[] = {
'S',
'y',
's',
't',
'e',
'm',
'\0'};
1226 static const WCHAR szPath[] = {
'P',
'A',
'T',
'H',
'\0'};
1266 lpszCurr = lpszPATH;
1272 while (*lpszEnd ==
' ')
1274 while (*lpszEnd && *lpszEnd !=
';')
1275 *pBuff++ = *lpszEnd++;
1279 lpszCurr = lpszEnd + 1;
1318 TRACE(
"(%s,%p,%08x)\n",
debugstr_a(lpszFile), lppszOtherDirs, dwWhich);
1326 if (lppszOtherDirs && *lppszOtherDirs)
1329 LPCSTR *lpszOtherPath = lppszOtherDirs;
1331 while (lpszOtherPath && *lpszOtherPath && (*lpszOtherPath)[0])
1361 TRACE(
"(%s,%p,%08x)\n",
debugstr_w(lpszFile), lppszOtherDirs, dwWhich);
1367 if (lppszOtherDirs && *lppszOtherDirs)
1369 LPCWSTR *lpszOtherPath = lppszOtherDirs;
1370 while (lpszOtherPath && *lpszOtherPath && (*lpszOtherPath)[0])
1469 static const WCHAR szEllipses[] = {
'.',
'.',
'.',
'\0' };
1471 DWORD dwLen, dwFileLen = 0;
1480 WARN(
"Invalid lpszDest would crash under Win32!\n");
1489 dwLen =
strlenW(lpszPath) + 1;
1500 dwFileLen = lpszPath + dwLen - lpszFile;
1502 if (dwFileLen == dwLen)
1522 if (dwFileLen + 3 >
cchMax)
1550 dwLen =
cchMax - dwFileLen - 3;
1575 if (*lpszPath ==
'\\' || (*lpszPath && lpszPath[1] ==
':'))
1589 if (!lpszPath || !*lpszPath)
1591 if (*lpszPath ==
'\\' || (*lpszPath && lpszPath[1] ==
':'))
1612 if (lpszPath && *lpszPath)
1614 if (*lpszPath ==
'\\')
1618 else if (lpszPath[1]==
'\\')
1626 if (*lpszPath ==
'\\')
1637 else if (lpszPath[1] ==
':' && lpszPath[2] ==
'\\' && lpszPath[3] ==
'\0')
1652 if (lpszPath && *lpszPath)
1654 if (*lpszPath ==
'\\')
1658 else if (lpszPath[1]==
'\\')
1666 if (*lpszPath ==
'\\')
1677 else if (lpszPath[1] ==
':' && lpszPath[2] ==
'\\' && lpszPath[3] ==
'\0')
1715 FIXME(
"UNC Server Share not yet supported - FAILING\n");
1740 FIXME(
"UNC Server Share not yet supported - FAILING\n");
1882 while (*
mask ==
'*')
1915 while (*
mask ==
'*')
1943 TRACE(
"(%s,%s)\n", lpszPath, lpszMask);
1950 while (*lpszMask ==
' ')
1956 while (*lpszMask && *lpszMask !=
';')
1959 if (*lpszMask ==
';')
1972 static const WCHAR szStarDotStar[] = {
'*',
'.',
'*',
'\0' };
1976 if (!
lstrcmpW(lpszMask, szStarDotStar))
1981 while (*lpszMask ==
' ')
1987 while (*lpszMask && *lpszMask !=
';')
1990 if (*lpszMask ==
';')
2016 if (!lpszPath1 || !lpszPath2 || !(lpszStart =
PathSkipRootA(lpszPath1)))
2020 if (lpszStart - lpszPath1 > dwLen)
2037 if (!lpszPath1 || !lpszPath2 || !(lpszStart =
PathSkipRootW(lpszPath1)))
2041 if (lpszStart - lpszPath1 > dwLen)
2089 static const WCHAR szContentType[] = {
'C',
'o',
'n',
't',
'e',
'n',
't',
' ',
'T',
'y',
'p',
'e',
'\0' };
2099 !
strcmpiW(lpszContentType, szBuff))
2127 if (*lpszPath ==
'\\' || *lpszPath ==
':')
2148 if (*lpszPath ==
'\\' || *lpszPath ==
':')
2172 if (lpszPrefix && lpszPath &&
2187 if (lpszPrefix && lpszPath &&
2210 if (lpszPath && *lpszPath)
2228 if (lpszPath && *lpszPath)
2258#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
2259 if (lpszPath && (lpszPath[0]==
'\\') && (lpszPath[1]==
'\\') && (lpszPath[2]!=
'?'))
2261 if (lpszPath && (lpszPath[0]==
'\\') && (lpszPath[1]==
'\\'))
2281#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
2282 if (lpszPath && (lpszPath[0]==
'\\') && (lpszPath[1]==
'\\') && (lpszPath[2]!=
'?'))
2284 if (lpszPath && (lpszPath[0]==
'\\') && (lpszPath[1]==
'\\'))
2311 if (lpszPath && *lpszPath++ ==
'\\' && *lpszPath++ ==
'\\')
2315 if (*lpszPath ==
'\\')
2333 if (lpszPath && lpszPath[0] ==
'\\' && lpszPath[1] ==
'\\')
2335 return !
strchrW( lpszPath + 2,
'\\' );
2361 if (lpszPath && *lpszPath++ ==
'\\' && *lpszPath++ ==
'\\')
2366 if (*lpszPath ==
'\\')
2388 if (lpszPath && *lpszPath++ ==
'\\' && *lpszPath++ ==
'\\')
2393 if (*lpszPath ==
'\\')
2428 if (!lpszBuf || !lpszPath)
2437 WARN(
"Failed to convert string to widechar (too long?), LE %d.\n",
GetLastError());
2454 LPWSTR lpszDst = lpszBuf;
2462 if (!lpszBuf || !lpszPath)
2476 if (*lpszSrc ==
'\\')
2478 *lpszDst++ = *lpszSrc++;
2480 else if (*lpszSrc && lpszSrc[1] ==
':')
2483 *lpszDst++ = *lpszSrc++;
2484 *lpszDst++ = *lpszSrc++;
2485 if (*lpszSrc ==
'\\')
2486 *lpszDst++ = *lpszSrc++;
2492 if (*lpszSrc ==
'.')
2494 if (lpszSrc[1] ==
'\\' && (lpszSrc == lpszPath || lpszSrc[-1] ==
'\\' || lpszSrc[-1] ==
':'))
2498 else if (lpszSrc[1] ==
'.' && (lpszDst == lpszBuf || lpszDst[-1] ==
'\\'))
2503 if (lpszDst != lpszBuf)
2506 if (lpszDst > lpszBuf+1 && lpszDst[-1] ==
'\\' &&
2507 (lpszDst[-2] !=
'\\' || lpszDst > lpszBuf+2))
2509 if (lpszDst[-2] ==
':' && (lpszDst > lpszBuf+3 || lpszDst[-3] ==
':'))
2512 while (lpszDst > lpszBuf && *lpszDst !=
'\\')
2514 if (*lpszDst ==
'\\')
2522 while (lpszDst > lpszBuf && *lpszDst !=
'\\')
2524 if (lpszDst == lpszBuf)
2533 *lpszDst++ = *lpszSrc++;
2536 *lpszDst++ = *lpszSrc++;
2539 if (lpszDst - lpszBuf == 2 && lpszDst[-1] ==
':')
2568 if(!lpszPath || !*lpszPath)
2571 if ((lpszSlash =
StrChrA(lpszPath,
'\\')))
2573 if (lpszSlash[1] ==
'\\')
2575 return lpszSlash + 1;
2591 if(!lpszPath || !*lpszPath)
2594 if ((lpszSlash =
StrChrW(lpszPath,
'\\')))
2596 if (lpszSlash[1] ==
'\\')
2598 return lpszSlash + 1;
2630 dwLen =
strlen(lpszPath);
2635 strcpy(lpszPath + dwLen, lpszExtension);
2658 strcpyW(lpszPath + dwLen, lpszExtension);
2676 LPSTR pszIter = lpszPath;
2691 pszIter = lpszPath + 1;
2708 LPWSTR pszIter = lpszPath;
2723 pszIter = lpszPath + 1;
2760 LPCSTR lpszIter1 = lpszFile1;
2761 LPCSTR lpszIter2 = lpszFile2;
2768 if (!lpszFile1 || !lpszFile2)
2785 if ((!*lpszIter1 || *lpszIter1 ==
'\\') &&
2786 (!*lpszIter2 || *lpszIter2 ==
'\\'))
2787 iLen = lpszIter1 - lpszFile1;
2799 if (iLen && achPath)
2801 memcpy(achPath,lpszFile1,iLen);
2802 achPath[iLen] =
'\0';
2815 LPCWSTR lpszIter1 = lpszFile1;
2816 LPCWSTR lpszIter2 = lpszFile2;
2823 if (!lpszFile1 || !lpszFile2)
2840 if ((!*lpszIter1 || *lpszIter1 ==
'\\') &&
2841 (!*lpszIter2 || *lpszIter2 ==
'\\'))
2842 iLen = lpszIter1 - lpszFile1;
2854 if (iLen && achPath)
2857 achPath[iLen] =
'\0';
2899 static const WCHAR szEllipses[] = {
'.',
'.',
'.',
'\0' };
2922 DWORD dwEllipsesLen = 0, dwPathLen = 0;
2925 if (sFile != lpszPath) sFile--;
2929 dwEllipsesLen =
size.cx;
2932 dwPathLen =
size.cx;
2934 if (sFile != lpszPath)
2947 DWORD dwTotalLen = bEllipses? dwPathLen + dwEllipsesLen : dwPathLen;
2950 dwTotalLen +=
size.cx;
2951 if (dwTotalLen <=
dx)
2959 }
while (sPath > lpszPath);
2961 if (sPath > lpszPath)
2971 strcpyW(lpszPath, szEllipses);
2989 }
while (dwLen &&
size.cx + dwEllipsesLen >
dx);
2993 DWORD dwWritten = 0;
2998 while (dwWritten + dwEllipsesLen <
dx && dwLen < 3)
3001 dwWritten += dwEllipsesLen;
3046 TRACE(
"(%d)\n", ch);
3048 if (!ch || ch <
' ' || ch ==
'<' || ch ==
'>' ||
3049 ch ==
'"' || ch ==
'|' || ch ==
'/')
3051 else if (ch ==
'*' || ch==
'?')
3053 else if ((ch ==
'\\') || (ch ==
':'))
3059 if (((ch & 0x1) && ch !=
';') || !ch ||
isalnum(ch) || ch ==
'$' || ch ==
'&' || ch ==
'(' ||
3060 ch ==
'.' || ch ==
'@' || ch ==
'^' ||
3061 ch ==
'\'' || ch == 130 || ch ==
'`')
3079 static BOOL bUseSystemForSystemFolders =
FALSE;
3087 "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer",
3088 "UseSystemForSystemFolders", 0, 0, 0))
3089 bUseSystemForSystemFolders =
TRUE;
3091 return bUseSystemForSystemFolders;
3112 if (lpszPath && *lpszPath)
3133 if (!lpszPath || !*lpszPath)
3172 LPSTR lpszExtension;
3178 if (!lpszExtension || (lpszExtension - lpszPath +
strlen(lpszExt) >=
MAX_PATH))
3181 strcpy(lpszExtension, lpszExt);
3198 if (!lpszExtension || (lpszExtension - lpszPath +
strlenW(lpszExt) >=
MAX_PATH))
3201 strcpyW(lpszExtension, lpszExt);
3257 if (!lpszPath || !*lpszPath)
3260 if (*lpszPath ==
'\\' && lpszPath[1] ==
'\\')
3264 if ((lpszPath =
StrChrA(lpszPath,
'\\')) &&
3265 (lpszPath =
StrChrA(lpszPath + 1,
'\\')))
3267 return (
LPSTR)lpszPath;
3274 if (lpszPath[0] && lpszPath[1] ==
':' && lpszPath[2] ==
'\\')
3275 return (
LPSTR)lpszPath + 3;
3288 if (!lpszPath || !*lpszPath)
3291 if (*lpszPath ==
'\\' && lpszPath[1] ==
'\\')
3295 if ((lpszPath =
StrChrW(lpszPath,
'\\')) &&
3296 (lpszPath =
StrChrW(lpszPath + 1,
'\\')))
3302 if (lpszPath[0] && lpszPath[1] ==
':' && lpszPath[2] ==
'\\')
3303 return (
LPWSTR)lpszPath + 3;
3316 WCHAR *pathW = bufW;
3319 DWORD lenW =
sizeof(bufW)/
sizeof(
WCHAR), lenA;
3364 static const WCHAR file_colon[] = {
'f',
'i',
'l',
'e',
':',0 };
3365 static const WCHAR localhost[] = {
'l',
'o',
'c',
'a',
'l',
'h',
'o',
's',
't',0 };
3387 while (*
src ==
'/' || *
src ==
'\\') {
3438 while (*
src && *
src !=
'/' && *
src !=
'\\')
3467 if (*
dst ==
'/') *
dst =
'\\';
3468 if (
isalphaW(*tpath) && tpath[1] ==
'|')
3490 if (tpath != pszPath)
3493 if (tpath != pszPath)
3560 if(lpszPath && lpszFrom && lpszTo)
3581 static const WCHAR szPrevDirSlash[] = {
'.',
'.',
'\\',
'\0' };
3582 static const WCHAR szPrevDir[] = {
'.',
'.',
'\0' };
3590 if(!lpszPath || !lpszFrom || !lpszTo)
3607 lpszFrom = szFrom + dwLen;
3613 if (*lpszFrom ==
'\\')
3619 strcatW(lpszPath, *lpszFrom ? szPrevDirSlash : szPrevDir);
3627 if (*lpszTo && lpszTo[-1])
3629 if (*lpszTo !=
'\\')
3637 strcpyW(lpszPath + dwLen, lpszTo);
3777 if (*lpszPath ==
'\\' && lpszPath[1] ==
'\\')
3780 if (dwDriveNum == -1)
3803 if (*lpszPath ==
'\\' && lpszPath[1] ==
'\\')
3806 if (dwDriveNum == -1)
3830 DWORD dwNameLen = 0, dwExtLen = 0;
3839 if (*lpszPath ==
' ')
3841 if (*lpszPath ==
'.')
3871 DWORD dwNameLen = 0, dwExtLen = 0;
3880 if (*lpszPath ==
' ')
3882 if (*lpszPath ==
'.')
3939 static const WCHAR szAllFiles[] = {
'*',
'.',
'*',
'\0' };
3957 strcpyW(szSearch + dwLen, szAllFiles);
3966 if (
find_data.cFileName[1] ==
'\0')
continue;
4006 if (lpszSuffix && lppszArray && dwCount > 0)
4008 dwLen =
strlen(lpszSuffix);
4010 while (dwRet < dwCount)
4012 size_t dwCompareLen =
strlen(*lppszArray);
4013 if (dwCompareLen < dwLen)
4015 if (!
strcmp(lpszSuffix + dwLen - dwCompareLen, *lppszArray))
4037 if (lpszSuffix && lppszArray && dwCount > 0)
4041 while (dwRet < dwCount)
4043 size_t dwCompareLen =
strlenW(*lppszArray);
4044 if (dwCompareLen < dwLen)
4046 if (!
strcmpW(lpszSuffix + dwLen - dwCompareLen, *lppszArray))
4076 if (!pszPath)
return;
4079 if (
ext == pszPath ||
ext[-1] !=
']')
return;
4085 if (
skip > pszPath && *
skip ==
'[' &&
skip[-1] !=
'\\')
4100 if (!pszPath)
return;
4103 if (
ext == pszPath ||
ext[-1] !=
']')
return;
4109 if (
skip > pszPath && *
skip ==
'[' &&
skip[-1] !=
'\\')
4137 if (!pathW)
return FALSE;
4144 if (buf_len <
len + 1)
return FALSE;
4150static const WCHAR allusersprofileW[] = {
'%',
'A',
'L',
'L',
'U',
'S',
'E',
'R',
'S',
'P',
'R',
'O',
'F',
'I',
'L',
'E',
'%',0};
4152static const WCHAR programfilesW[] = {
'%',
'P',
'r',
'o',
'g',
'r',
'a',
'm',
'F',
'i',
'l',
'e',
's',
'%',0};
4153static const WCHAR systemrootW[] = {
'%',
'S',
'y',
's',
't',
'e',
'm',
'R',
'o',
'o',
't',
'%',0};
4154static const WCHAR systemdriveW[] = {
'%',
'S',
'y',
's',
't',
'e',
'm',
'D',
'r',
'i',
'v',
'e',
'%',0};
4155static const WCHAR userprofileW[] = {
'%',
'U',
'S',
'E',
'R',
'P',
'R',
'O',
'F',
'I',
'L',
'E',
'%',0};
4171 if (
map->len)
map->len--;
4217 needed =
match->varlen + pathlen -
match->len;
4218 if (
match->len == 0 || needed > buf_len)
return FALSE;
4246 TRACE(
"(%s,%p,%d)\n", lpszFile, lpszPath, dwPathLen);
4262 static const WCHAR szWeb[] = {
'\\',
'W',
'e',
'b',
'\\',
'\0'};
4263 static const WCHAR szWebMui[] = {
'm',
'u',
'i',
'\\',
'%',
'0',
'4',
'x',
'\\',
'\0'};
4264#define szWebLen (sizeof(szWeb)/sizeof(WCHAR))
4265#define szWebMuiLen ((sizeof(szWebMui)+1)/sizeof(WCHAR))
4266 DWORD dwLen, dwFileLen;
4267 LANGID lidSystem, lidUser;
4273 if (dwLen > 0 && lpszPath[dwLen-1] ==
'\\')
4276 dwFileLen =
strlenW(lpszFile);
4278 if (dwLen + dwFileLen +
szWebLen >= dwPathLen)
4281 strcpyW(lpszPath+dwLen, szWeb);
4283 dwPathLen = dwPathLen - dwLen;
4288 if (lidSystem != lidUser)
4293 wsprintfW(lpszPath + dwLen, szWebMui, lidUser);
4301 strcpyW(lpszPath + dwLen, lpszFile);
4308#define PATH_CHAR_CLASS_LETTER 0x00000001
4309#define PATH_CHAR_CLASS_ASTERIX 0x00000002
4310#define PATH_CHAR_CLASS_DOT 0x00000004
4311#define PATH_CHAR_CLASS_BACKSLASH 0x00000008
4312#define PATH_CHAR_CLASS_COLON 0x00000010
4313#define PATH_CHAR_CLASS_SEMICOLON 0x00000020
4314#define PATH_CHAR_CLASS_COMMA 0x00000040
4315#define PATH_CHAR_CLASS_SPACE 0x00000080
4316#define PATH_CHAR_CLASS_OTHER_VALID 0x00000100
4317#define PATH_CHAR_CLASS_DOUBLEQUOTE 0x00000200
4319#define PATH_CHAR_CLASS_INVALID 0x00000000
4320#define PATH_CHAR_CLASS_ANY 0xffffffff
4398 if ((
unsigned)
c > 0x7e)
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
char * strchr(const char *String, int ch)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void shell(int argc, const char *argv[])
static int find_data(const struct Vector *v, const BYTE *pData, int size)
INT WINAPI StrToIntW(LPCWSTR lpString)
LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
INT WINAPI StrToIntA(LPCSTR lpszStr)
LPSTR WINAPI StrChrA(LPCSTR lpszStr, WORD ch)
#define ERROR_INVALID_PARAMETER
#define GetEnvironmentVariableW(x, y, z)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
static const WCHAR *const ext[]
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
UINT WINAPI SetErrorMode(IN UINT uMode)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
DWORD WINAPI SearchPathA(IN LPCSTR lpPath OPTIONAL, IN LPCSTR lpFileName, IN LPCSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart OPTIONAL)
DWORD WINAPI SearchPathW(IN LPCWSTR lpPath OPTIONAL, IN LPCWSTR lpFileName, IN LPCWSTR lpExtension OPTIONAL, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart OPTIONAL)
DWORD WINAPI GetFullPathNameA(IN LPCSTR lpFileName, IN DWORD nBufferLength, OUT LPSTR lpBuffer, OUT LPSTR *lpFilePart)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
UINT WINAPI GetSystemWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
BOOL WINAPI IsDBCSLeadByte(BYTE testchar)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
LANGID WINAPI GetUserDefaultUILanguage(void)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
LANGID WINAPI GetSystemDefaultUILanguage(void)
HRESULT WINAPI SHGetWebFolderFilePathA(LPCSTR lpszFile, LPSTR lpszPath, DWORD dwPathLen)
void WINAPI PathStripPathW(LPWSTR lpszPath)
void WINAPI PathRemoveArgsW(LPWSTR lpszPath)
static const WCHAR userprofileW[]
BOOL WINAPI PathFileExistsDefExtA(LPSTR lpszPath, DWORD dwWhich)
void WINAPI PathRemoveExtensionA(LPSTR lpszPath)
VOID WINAPI PathUnquoteSpacesA(LPSTR lpszPath)
BOOL WINAPI PathIsUNCA(LPCSTR lpszPath)
#define PATH_CHAR_CLASS_DOUBLEQUOTE
BOOL WINAPI PathIsDirectoryA(LPCSTR lpszPath)
BOOL WINAPI PathMakeSystemFolderA(LPCSTR lpszPath)
static const WCHAR systemdriveW[]
void WINAPI PathRemoveBlanksA(LPSTR pszPath)
void WINAPI PathStripPathA(LPSTR lpszPath)
LPSTR WINAPI PathFindFileNameA(LPCSTR lpszPath)
#define PATH_CHAR_CLASS_OTHER_VALID
VOID WINAPI PathQuoteSpacesA(LPSTR lpszPath)
BOOL WINAPI PathIsNetworkPathW(LPCWSTR lpszPath)
BOOL WINAPI PathRelativePathToA(LPSTR lpszPath, LPCSTR lpszFrom, DWORD dwAttrFrom, LPCSTR lpszTo, DWORD dwAttrTo)
LPSTR WINAPI PathBuildRootA(LPSTR lpszPath, int drive)
int WINAPI PathGetDriveNumberW(const WCHAR *path)
#define PATH_CHAR_CLASS_SPACE
#define PATH_CHAR_CLASS_ASTERIX
LPWSTR WINAPI PathSkipRootW(LPCWSTR lpszPath)
BOOL WINAPI PathUnExpandEnvStringsA(LPCSTR path, LPSTR buffer, UINT buf_len)
BOOL WINAPI PathMakeSystemFolderW(LPCWSTR lpszPath)
BOOL(WINAPI * fnpIsNetDrive)(int)
BOOL WINAPI PathIsPrefixA(LPCSTR lpszPrefix, LPCSTR lpszPath)
static const WCHAR programfilesW[]
int WINAPI PathCommonPrefixW(LPCWSTR lpszFile1, LPCWSTR lpszFile2, LPWSTR achPath)
HRESULT WINAPI PathCreateFromUrlW(LPCWSTR pszUrl, LPWSTR pszPath, LPDWORD pcchPath, DWORD dwReserved)
BOOL WINAPI PathIsNetworkPathA(LPCSTR lpszPath)
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
static BOOL PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask)
BOOL WINAPI PathFindOnPathExA(LPSTR lpszFile, LPCSTR *lppszOtherDirs, DWORD dwWhich)
void WINAPI PathRemoveArgsA(LPSTR lpszPath)
static const DWORD SHELL_charclass[]
#define GET_FUNC(func, module, name, fail)
LPSTR WINAPI PathFindNextComponentA(LPCSTR lpszPath)
BOOL WINAPI PathFindOnPathW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs)
UINT WINAPI PathGetCharTypeA(UCHAR ch)
int WINAPI PathParseIconLocationA(LPSTR lpszPath)
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath)
BOOL WINAPI PathCompactPathExA(LPSTR lpszDest, LPCSTR lpszPath, UINT cchMax, DWORD dwFlags)
BOOL WINAPI PathIsSystemFolderA(LPCSTR lpszPath, DWORD dwAttrib)
BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath, UINT cchMax, DWORD dwFlags)
#define PATH_CHAR_CLASS_ANY
BOOL WINAPI PathIsRelativeA(LPCSTR lpszPath)
static BOOL PathMatchSingleMaskA(LPCSTR name, LPCSTR mask)
static BOOL SHLWAPI_UseSystemForSystemFolders(void)
int WINAPI PathGetDriveNumberA(LPCSTR lpszPath)
BOOL WINAPI PathRemoveFileSpecA(LPSTR lpszPath)
BOOL WINAPI PathIsUNCServerW(LPCWSTR lpszPath)
BOOL WINAPI PathRelativePathToW(LPWSTR lpszPath, LPCWSTR lpszFrom, DWORD dwAttrFrom, LPCWSTR lpszTo, DWORD dwAttrTo)
BOOL WINAPI PathStripToRootW(LPWSTR lpszPath)
BOOL WINAPI PathMakePrettyW(LPWSTR lpszPath)
#define PATH_CHAR_CLASS_LETTER
BOOL WINAPI PathUnExpandEnvStringsW(LPCWSTR path, LPWSTR buffer, UINT buf_len)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
void WINAPI PathUndecorateW(LPWSTR pszPath)
BOOL WINAPI PathCompactPathA(HDC hDC, LPSTR lpszPath, UINT dx)
void WINAPI PathRemoveExtensionW(LPWSTR lpszPath)
BOOL WINAPI PathUnmakeSystemFolderW(LPCWSTR lpszPath)
BOOL WINAPI PathFindOnPathA(LPSTR lpszFile, LPCSTR *lppszOtherDirs)
static fnpIsNetDrive pIsNetDrive
BOOL WINAPI PathMatchSpecW(LPCWSTR lpszPath, LPCWSTR lpszMask)
LPWSTR WINAPI PathBuildRootW(LPWSTR lpszPath, int drive)
void WINAPI PathRemoveBlanksW(LPWSTR pszPath)
BOOL WINAPI PathFileExistsA(LPCSTR lpszPath)
BOOL WINAPI PathFileExistsAndAttributesA(LPCSTR lpszPath, DWORD *dwAttr)
BOOL WINAPI PathIsRootW(LPCWSTR lpszPath)
BOOL WINAPI PathIsRootA(LPCSTR lpszPath)
#define PATH_CHAR_CLASS_SEMICOLON
VOID WINAPI PathQuoteSpacesW(LPWSTR lpszPath)
static HMODULE SHLWAPI_hshell32
HRESULT WINAPI SHGetWebFolderFilePathW(LPCWSTR, LPWSTR, DWORD)
VOID WINAPI PathSetDlgItemPathA(HWND hDlg, int id, LPCSTR lpszPath)
static WCHAR * heap_strdupAtoW(LPCSTR str)
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
BOOL WINAPI PathIsContentTypeW(LPCWSTR lpszPath, LPCWSTR lpszContentType)
BOOL WINAPI PathIsUNCServerA(LPCSTR lpszPath)
BOOL WINAPI PathSearchAndQualifyA(LPCSTR lpszPath, LPSTR lpszBuf, UINT cchBuf)
VOID WINAPI PathUnquoteSpacesW(LPWSTR lpszPath)
BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
#define PATH_CHAR_CLASS_COLON
BOOL WINAPI PathIsSystemFolderW(LPCWSTR lpszPath, DWORD dwAttrib)
BOOL WINAPI PathMatchSpecA(LPCSTR lpszPath, LPCSTR lpszMask)
BOOL WINAPI PathIsUNCW(LPCWSTR lpszPath)
BOOL WINAPI PathIsSameRootW(LPCWSTR lpszPath1, LPCWSTR lpszPath2)
BOOL WINAPI PathFindOnPathExW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs, DWORD dwWhich)
BOOL WINAPI PathMakePrettyA(LPSTR lpszPath)
static const WCHAR allusersprofileW[]
void WINAPI PathUndecorateA(LPSTR pszPath)
LPSTR WINAPI PathFindExtensionA(LPCSTR lpszPath)
LPSTR WINAPI PathGetArgsA(LPCSTR lpszPath)
BOOL WINAPI PathIsUNCServerShareW(LPCWSTR lpszPath)
LPCSTR WINAPI PathFindSuffixArrayA(LPCSTR lpszSuffix, LPCSTR *lppszArray, int dwCount)
LPWSTR WINAPI PathFindNextComponentW(LPCWSTR lpszPath)
static const WCHAR appdataW[]
HRESULT WINAPI PathCreateFromUrlA(LPCSTR pszUrl, LPSTR pszPath, LPDWORD pcchPath, DWORD dwReserved)
BOOL WINAPI PathIsFileSpecA(LPCSTR lpszPath)
static void init_envvars_map(struct envvars_map *map)
BOOL WINAPI PathIsUNCServerShareA(LPCSTR lpszPath)
BOOL WINAPI PathIsLFNFileSpecW(LPCWSTR lpszPath)
BOOL WINAPI PathStripToRootA(LPSTR lpszPath)
BOOL WINAPI PathIsValidCharW(WCHAR c, DWORD class)
BOOL WINAPI PathSearchAndQualifyW(LPCWSTR lpszPath, LPWSTR lpszBuf, UINT cchBuf)
UINT WINAPI PathGetCharTypeW(WCHAR ch)
BOOL WINAPI PathIsValidCharA(char c, DWORD class)
HRESULT WINAPI PathCreateFromUrlAlloc(LPCWSTR pszUrl, LPWSTR *pszPath, DWORD dwReserved)
static const WCHAR systemrootW[]
BOOL WINAPI PathUnmakeSystemFolderA(LPCSTR lpszPath)
#define PATH_CHAR_CLASS_COMMA
VOID WINAPI PathSetDlgItemPathW(HWND hDlg, int id, LPCWSTR lpszPath)
BOOL WINAPI PathIsFileSpecW(LPCWSTR lpszPath)
int WINAPI PathCommonPrefixA(LPCSTR lpszFile1, LPCSTR lpszFile2, LPSTR achPath)
LPCWSTR WINAPI PathFindSuffixArrayW(LPCWSTR lpszSuffix, LPCWSTR *lppszArray, int dwCount)
BOOL WINAPI PathFileExistsAndAttributesW(LPCWSTR lpszPath, DWORD *dwAttr)
BOOL WINAPI PathIsLFNFileSpecA(LPCSTR lpszPath)
BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath, DWORD dwWhich)
LPSTR WINAPI PathSkipRootA(LPCSTR lpszPath)
#define PATH_CHAR_CLASS_INVALID
BOOL WINAPI PathIsPrefixW(LPCWSTR lpszPrefix, LPCWSTR lpszPath)
LPWSTR WINAPI PathRemoveBackslashW(LPWSTR lpszPath)
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
BOOL WINAPI PathIsContentTypeA(LPCSTR lpszPath, LPCSTR lpszContentType)
#define PATH_CHAR_CLASS_BACKSLASH
#define PATH_CHAR_CLASS_DOT
BOOL WINAPI PathIsDirectoryEmptyA(LPCSTR lpszPath)
LPWSTR WINAPI PathGetArgsW(LPCWSTR lpszPath)
BOOL WINAPI PathIsSameRootA(LPCSTR lpszPath1, LPCSTR lpszPath2)
int WINAPI PathParseIconLocationW(LPWSTR lpszPath)
LPSTR WINAPI PathRemoveBackslashA(LPSTR lpszPath)
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
DWORD WINAPI SHGetValueW(HKEY hKey, LPCWSTR lpszSubKey, LPCWSTR lpszValue, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData)
DWORD WINAPI SHGetValueA(HKEY hKey, LPCSTR lpszSubKey, LPCSTR lpszValue, LPDWORD pwType, LPVOID pvData, LPDWORD pcbData)
LPWSTR WINAPI StrCpyNW(LPWSTR dst, LPCWSTR src, int count)
LPWSTR WINAPI StrCpyW(LPWSTR lpszStr, LPCWSTR lpszSrc)
LPWSTR WINAPI StrDupW(LPCWSTR lpszStr)
HRESULT WINAPI UrlUnescapeW(LPWSTR pszUrl, LPWSTR pszUnescaped, LPDWORD pcchUnescaped, DWORD dwFlags)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static unsigned char buff[32768]
_Check_return_ _CRTIMP int __cdecl isalnum(_In_ int _C)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
BOOL unescape(WCHAR *str, size_t *len)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static const BYTE localhost[]
static LPWSTR PDWORD pcchPath
static unsigned(__cdecl *hash_bstr)(bstr_t s)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
#define SEM_FAILCRITICALERRORS
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteN(_Out_ PCHAR MbString, _In_ ULONG MbSize, _Out_opt_ PULONG ResultSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteSize(_Out_ PULONG MbSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
#define FILE_ATTRIBUTE_READONLY
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_SYSTEM
#define FILE_ATTRIBUTE_DIRECTORY
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define PathAddExtensionA
#define PathCanonicalizeA
#define PathAddExtensionW
#define PathCanonicalizeW
#define PathAddBackslashA
#define PathRenameExtensionA
#define PathRenameExtensionW
#define PathAddBackslashW
#define strncmpiW(s1, s2, n)