29#include "wine/unicode.h"
36#define NO_SHLWAPI_STREAM
55#define GET_FUNC(func, module, name, fail) \
58 if (!SHLWAPI_h##module && !(SHLWAPI_h##module = LoadLibraryA(#module ".dll"))) return fail; \
59 func = (fn##func)GetProcAddress(SHLWAPI_h##module, name); \
60 if (!func) return fail; \
113 if (lpszPath && lpszAppend)
116 while (*lpszAppend ==
'\\')
133 if (lpszPath && lpszAppend)
136 while (*lpszAppend ==
'\\')
172 if (!lpszDir && !lpszFile)
207 if (!lpszDir && !lpszFile)
213 if ((!lpszFile || !*lpszFile) && lpszDir)
220 if (!lpszDir || !*lpszDir || *lpszFile !=
'\\' ||
PathIsUNCW(lpszFile))
269 LPSTR prev = lpszPath;
309 if (lpszPath[-1] !=
'\\')
338 lpszPath[0] =
'A' +
drive;
357 lpszPath[0] =
'A' +
drive;
378 LPCSTR lastSlash = lpszPath;
382 while (lpszPath && *lpszPath)
384 if ((*lpszPath ==
'\\' || *lpszPath ==
'/' || *lpszPath ==
':') &&
385 lpszPath[1] && lpszPath[1] !=
'\\' && lpszPath[1] !=
'/')
386 lastSlash = lpszPath + 1;
389 return (
LPSTR)lastSlash;
403 while (lpszPath && *lpszPath)
405 if ((*lpszPath ==
'\\' || *lpszPath ==
'/' || *lpszPath ==
':') &&
406 lpszPath[1] && lpszPath[1] !=
'\\' && lpszPath[1] !=
'/')
407 lastSlash = lpszPath + 1;
435 if (*lpszPath ==
'\\' || *lpszPath==
' ')
437 else if (*lpszPath ==
'.')
438 lastpoint = lpszPath;
442 return (
LPSTR)(lastpoint ? lastpoint : lpszPath);
460 if (*lpszPath ==
'\\' || *lpszPath==
' ')
462 else if (*lpszPath ==
'.')
463 lastpoint = lpszPath;
467 return (
LPWSTR)(lastpoint ? lastpoint : lpszPath);
494 if ((*lpszPath==
' ') && !bSeenQuote)
495 return (
LPSTR)lpszPath + 1;
496 if (*lpszPath ==
'"')
497 bSeenQuote = !bSeenQuote;
501 return (
LPSTR)lpszPath;
519 if ((*lpszPath==
' ') && !bSeenQuote)
520 return (
LPWSTR)lpszPath + 1;
521 if (*lpszPath ==
'"')
522 bSeenQuote = !bSeenQuote;
545 if (lpszPath && !
IsDBCSLeadByte(*lpszPath) && lpszPath[1] ==
':' &&
547 return tolower(*lpszPath) -
'a';
560 static const WCHAR nt_prefixW[] = {
'\\',
'\\',
'?',
'\\'};
591 LPSTR lpszFileSpec = lpszPath;
599 if (*lpszPath ==
'\\')
600 lpszFileSpec = ++lpszPath;
601 if (*lpszPath ==
'\\')
602 lpszFileSpec = ++lpszPath;
606 if(*lpszPath ==
'\\')
607 lpszFileSpec = lpszPath;
608 else if(*lpszPath ==
':')
610 lpszFileSpec = ++lpszPath;
611 if (*lpszPath ==
'\\')
620 *lpszFileSpec =
'\0';
634 LPWSTR lpszFileSpec = lpszPath;
642 if (*lpszPath ==
'\\')
643 lpszFileSpec = ++lpszPath;
644 if (*lpszPath ==
'\\')
645 lpszFileSpec = ++lpszPath;
649 if(*lpszPath ==
'\\')
650 lpszFileSpec = lpszPath;
651 else if(*lpszPath ==
':')
653 lpszFileSpec = ++lpszPath;
654 if (*lpszPath ==
'\\')
662 *lpszFileSpec =
'\0';
687 if(lpszFileName != lpszPath)
703 if(lpszFileName != lpszPath)
771 if(*lpszLastChar ==
' ')
772 *lpszLastChar =
'\0';
789 if (*lpszArgs || (lpszArgs > lpszPath && lpszArgs[-1] ==
' '))
816 if (lpszPath && *lpszPath !=
'\0')
833 if (lpszPath && *lpszPath !=
'\0')
878 szTemp = lpszPath +
strlenW(lpszPath);
879 if (szTemp > lpszPath) szTemp--;
903 if (!pszPath || !*pszPath)
908 while (*pszPath ==
' ')
912 *
start++ = *pszPath++;
915 while (
start[-1] ==
' ')
932 if (!pszPath || !*pszPath)
937 while (*pszPath ==
' ')
941 *
start++ = *pszPath++;
944 while (
start[-1] ==
' ')
968 if(lpszPath &&
StrChrA(lpszPath,
' '))
970 size_t iLen =
strlen(lpszPath) + 1;
974 memmove(lpszPath + 1, lpszPath, iLen);
976 lpszPath[iLen] =
'"';
977 lpszPath[iLen + 1] =
'\0';
991 if(lpszPath &&
StrChrW(lpszPath,
' '))
993 int iLen =
strlenW(lpszPath) + 1;
999 lpszPath[iLen] =
'"';
1000 lpszPath[iLen + 1] =
'\0';
1025 if (lpszPath && *lpszPath ==
'"')
1029 if (lpszPath[dwLen] ==
'"')
1031 lpszPath[dwLen] =
'\0';
1032 for (; *lpszPath; lpszPath++)
1033 *lpszPath = lpszPath[1];
1047 if (lpszPath && *lpszPath ==
'"')
1051 if (lpszPath[dwLen] ==
'"')
1053 lpszPath[dwLen] =
'\0';
1054 for (; *lpszPath; lpszPath++)
1055 *lpszPath = lpszPath[1];
1085 if ((lpszComma =
strchr(lpszPath,
',')))
1087 *lpszComma++ =
'\0';
1110 if ((lpszComma =
StrChrW(lpszPath,
',')))
1112 *lpszComma++ =
'\0';
1128 static const WCHAR pszExts[][5] = { {
'.',
'p',
'i',
'f', 0},
1129 {
'.',
'c',
'o',
'm', 0},
1130 {
'.',
'e',
'x',
'e', 0},
1131 {
'.',
'b',
'a',
't', 0},
1132 {
'.',
'l',
'n',
'k', 0},
1133 {
'.',
'c',
'm',
'd', 0},
1145 if (!*szExt || dwWhich & 0x40)
1155 while ( (dwWhich & 0x1) && pszExts[iChoose][0] )
1157 while (pszExts[iChoose][0])
1165 lstrcpyW(lpszPath + iLen, pszExts[iChoose]);
1174 *(lpszPath + iLen) = (
WCHAR)
'\0';
1228 static const WCHAR szSystem[] = {
'S',
'y',
's',
't',
'e',
'm',
'\0'};
1229 static const WCHAR szPath[] = {
'P',
'A',
'T',
'H',
'\0'};
1269 lpszCurr = lpszPATH;
1275 while (*lpszEnd ==
' ')
1277 while (*lpszEnd && *lpszEnd !=
';')
1278 *pBuff++ = *lpszEnd++;
1282 lpszCurr = lpszEnd + 1;
1321 TRACE(
"(%s,%p,%08x)\n",
debugstr_a(lpszFile), lppszOtherDirs, dwWhich);
1329 if (lppszOtherDirs && *lppszOtherDirs)
1332 LPCSTR *lpszOtherPath = lppszOtherDirs;
1334 while (lpszOtherPath && *lpszOtherPath && (*lpszOtherPath)[0])
1364 TRACE(
"(%s,%p,%08x)\n",
debugstr_w(lpszFile), lppszOtherDirs, dwWhich);
1370 if (lppszOtherDirs && *lppszOtherDirs)
1372 LPCWSTR *lpszOtherPath = lppszOtherDirs;
1373 while (lpszOtherPath && *lpszOtherPath && (*lpszOtherPath)[0])
1472 static const WCHAR szEllipses[] = {
'.',
'.',
'.',
'\0' };
1474 DWORD dwLen, dwFileLen = 0;
1483 WARN(
"Invalid lpszDest would crash under Win32!\n");
1492 dwLen =
strlenW(lpszPath) + 1;
1503 dwFileLen = lpszPath + dwLen - lpszFile;
1505 if (dwFileLen == dwLen)
1525 if (dwFileLen + 3 >
cchMax)
1553 dwLen =
cchMax - dwFileLen - 3;
1578 if (*lpszPath ==
'\\' || (*lpszPath && lpszPath[1] ==
':'))
1592 if (!lpszPath || !*lpszPath)
1594 if (*lpszPath ==
'\\' || (*lpszPath && lpszPath[1] ==
':'))
1615 if (lpszPath && *lpszPath)
1617 if (*lpszPath ==
'\\')
1621 else if (lpszPath[1]==
'\\')
1629 if (*lpszPath ==
'\\')
1640 else if (lpszPath[1] ==
':' && lpszPath[2] ==
'\\' && lpszPath[3] ==
'\0')
1655 if (lpszPath && *lpszPath)
1657 if (*lpszPath ==
'\\')
1661 else if (lpszPath[1]==
'\\')
1669 if (*lpszPath ==
'\\')
1680 else if (lpszPath[1] ==
':' && lpszPath[2] ==
'\\' && lpszPath[3] ==
'\0')
1736 FIXME(
"UNC Server Share not yet supported - FAILING\n");
1780 FIXME(
"UNC Server Share not yet supported - FAILING\n");
1923 while (*
mask ==
'*')
1956 while (*
mask ==
'*')
1984 TRACE(
"(%s,%s)\n", lpszPath, lpszMask);
1991 while (*lpszMask ==
' ')
1997 while (*lpszMask && *lpszMask !=
';')
2000 if (*lpszMask ==
';')
2013 static const WCHAR szStarDotStar[] = {
'*',
'.',
'*',
'\0' };
2017 if (!
lstrcmpW(lpszMask, szStarDotStar))
2022 while (*lpszMask ==
' ')
2028 while (*lpszMask && *lpszMask !=
';')
2031 if (*lpszMask ==
';')
2057 if (!lpszPath1 || !lpszPath2 || !(lpszStart =
PathSkipRootA(lpszPath1)))
2061 if (lpszStart - lpszPath1 > dwLen)
2078 if (!lpszPath1 || !lpszPath2 || !(lpszStart =
PathSkipRootW(lpszPath1)))
2082 if (lpszStart - lpszPath1 > dwLen)
2130 static const WCHAR szContentType[] = {
'C',
'o',
'n',
't',
'e',
'n',
't',
' ',
'T',
'y',
'p',
'e',
'\0' };
2140 !
strcmpiW(lpszContentType, szBuff))
2168 if (*lpszPath ==
'\\' || *lpszPath ==
':')
2189 if (*lpszPath ==
'\\' || *lpszPath ==
':')
2213 if (lpszPrefix && lpszPath &&
2228 if (lpszPrefix && lpszPath &&
2251 if (lpszPath && *lpszPath)
2269 if (lpszPath && *lpszPath)
2299#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
2300 if (lpszPath && (lpszPath[0]==
'\\') && (lpszPath[1]==
'\\') && (lpszPath[2]!=
'?'))
2302 if (lpszPath && (lpszPath[0]==
'\\') && (lpszPath[1]==
'\\'))
2322#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
2323 if (lpszPath && (lpszPath[0]==
'\\') && (lpszPath[1]==
'\\') && (lpszPath[2]!=
'?'))
2325 if (lpszPath && (lpszPath[0]==
'\\') && (lpszPath[1]==
'\\'))
2352 if (lpszPath && *lpszPath++ ==
'\\' && *lpszPath++ ==
'\\')
2356 if (*lpszPath ==
'\\')
2374 if (lpszPath && lpszPath[0] ==
'\\' && lpszPath[1] ==
'\\')
2376 return !
strchrW( lpszPath + 2,
'\\' );
2402 if (lpszPath && *lpszPath++ ==
'\\' && *lpszPath++ ==
'\\')
2407 if (*lpszPath ==
'\\')
2429 if (lpszPath && *lpszPath++ ==
'\\' && *lpszPath++ ==
'\\')
2434 if (*lpszPath ==
'\\')
2469 if (!lpszBuf || !lpszPath)
2478 WARN(
"Failed to convert string to widechar (too long?), LE %d.\n",
GetLastError());
2495 LPWSTR lpszDst = lpszBuf;
2503 if (!lpszBuf || !lpszPath)
2517 if (*lpszSrc ==
'\\')
2519 *lpszDst++ = *lpszSrc++;
2521 else if (*lpszSrc && lpszSrc[1] ==
':')
2524 *lpszDst++ = *lpszSrc++;
2525 *lpszDst++ = *lpszSrc++;
2526 if (*lpszSrc ==
'\\')
2527 *lpszDst++ = *lpszSrc++;
2533 if (*lpszSrc ==
'.')
2535 if (lpszSrc[1] ==
'\\' && (lpszSrc == lpszPath || lpszSrc[-1] ==
'\\' || lpszSrc[-1] ==
':'))
2539 else if (lpszSrc[1] ==
'.' && (lpszDst == lpszBuf || lpszDst[-1] ==
'\\'))
2544 if (lpszDst != lpszBuf)
2547 if (lpszDst > lpszBuf+1 && lpszDst[-1] ==
'\\' &&
2548 (lpszDst[-2] !=
'\\' || lpszDst > lpszBuf+2))
2550 if (lpszDst[-2] ==
':' && (lpszDst > lpszBuf+3 || lpszDst[-3] ==
':'))
2553 while (lpszDst > lpszBuf && *lpszDst !=
'\\')
2555 if (*lpszDst ==
'\\')
2563 while (lpszDst > lpszBuf && *lpszDst !=
'\\')
2565 if (lpszDst == lpszBuf)
2574 *lpszDst++ = *lpszSrc++;
2577 *lpszDst++ = *lpszSrc++;
2580 if (lpszDst - lpszBuf == 2 && lpszDst[-1] ==
':')
2609 if(!lpszPath || !*lpszPath)
2612 if ((lpszSlash =
StrChrA(lpszPath,
'\\')))
2614 if (lpszSlash[1] ==
'\\')
2616 return lpszSlash + 1;
2632 if(!lpszPath || !*lpszPath)
2635 if ((lpszSlash =
StrChrW(lpszPath,
'\\')))
2637 if (lpszSlash[1] ==
'\\')
2639 return lpszSlash + 1;
2671 dwLen =
strlen(lpszPath);
2676 strcpy(lpszPath + dwLen, lpszExtension);
2699 strcpyW(lpszPath + dwLen, lpszExtension);
2717 LPSTR pszIter = lpszPath;
2732 pszIter = lpszPath + 1;
2749 LPWSTR pszIter = lpszPath;
2764 pszIter = lpszPath + 1;
2801 LPCSTR lpszIter1 = lpszFile1;
2802 LPCSTR lpszIter2 = lpszFile2;
2809 if (!lpszFile1 || !lpszFile2)
2826 if ((!*lpszIter1 || *lpszIter1 ==
'\\') &&
2827 (!*lpszIter2 || *lpszIter2 ==
'\\'))
2828 iLen = lpszIter1 - lpszFile1;
2840 if (iLen && achPath)
2842 memcpy(achPath,lpszFile1,iLen);
2843 achPath[iLen] =
'\0';
2856 LPCWSTR lpszIter1 = lpszFile1;
2857 LPCWSTR lpszIter2 = lpszFile2;
2864 if (!lpszFile1 || !lpszFile2)
2881 if ((!*lpszIter1 || *lpszIter1 ==
'\\') &&
2882 (!*lpszIter2 || *lpszIter2 ==
'\\'))
2883 iLen = lpszIter1 - lpszFile1;
2895 if (iLen && achPath)
2898 achPath[iLen] =
'\0';
2940 static const WCHAR szEllipses[] = {
'.',
'.',
'.',
'\0' };
2963 DWORD dwEllipsesLen = 0, dwPathLen = 0;
2966 if (sFile != lpszPath) sFile--;
2970 dwEllipsesLen =
size.cx;
2973 dwPathLen =
size.cx;
2975 if (sFile != lpszPath)
2988 DWORD dwTotalLen = bEllipses? dwPathLen + dwEllipsesLen : dwPathLen;
2991 dwTotalLen +=
size.cx;
2992 if (dwTotalLen <=
dx)
3000 }
while (sPath > lpszPath);
3002 if (sPath > lpszPath)
3012 strcpyW(lpszPath, szEllipses);
3030 }
while (dwLen &&
size.cx + dwEllipsesLen >
dx);
3034 DWORD dwWritten = 0;
3039 while (dwWritten + dwEllipsesLen <
dx && dwLen < 3)
3042 dwWritten += dwEllipsesLen;
3089 if (!
ch ||
ch <
' ' ||
ch ==
'<' ||
ch ==
'>' ||
3090 ch ==
'"' ||
ch ==
'|' ||
ch ==
'/')
3092 else if (
ch ==
'*' ||
ch==
'?')
3094 else if ((
ch ==
'\\') || (
ch ==
':'))
3101 ch ==
'.' ||
ch ==
'@' ||
ch ==
'^' ||
3102 ch ==
'\'' ||
ch == 130 ||
ch ==
'`')
3120 static BOOL bUseSystemForSystemFolders =
FALSE;
3128 "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer",
3129 "UseSystemForSystemFolders", 0, 0, 0))
3130 bUseSystemForSystemFolders =
TRUE;
3132 return bUseSystemForSystemFolders;
3153 if (lpszPath && *lpszPath)
3174 if (!lpszPath || !*lpszPath)
3213 LPSTR lpszExtension;
3219 if (!lpszExtension || (lpszExtension - lpszPath +
strlen(lpszExt) >=
MAX_PATH))
3222 strcpy(lpszExtension, lpszExt);
3239 if (!lpszExtension || (lpszExtension - lpszPath +
strlenW(lpszExt) >=
MAX_PATH))
3242 strcpyW(lpszExtension, lpszExt);
3298 if (!lpszPath || !*lpszPath)
3301 if (*lpszPath ==
'\\' && lpszPath[1] ==
'\\')
3305 if ((lpszPath =
StrChrA(lpszPath,
'\\')) &&
3306 (lpszPath =
StrChrA(lpszPath + 1,
'\\')))
3308 return (
LPSTR)lpszPath;
3315 if (lpszPath[0] && lpszPath[1] ==
':' && lpszPath[2] ==
'\\')
3316 return (
LPSTR)lpszPath + 3;
3329 if (!lpszPath || !*lpszPath)
3332 if (*lpszPath ==
'\\' && lpszPath[1] ==
'\\')
3336 if ((lpszPath =
StrChrW(lpszPath,
'\\')) &&
3337 (lpszPath =
StrChrW(lpszPath + 1,
'\\')))
3343 if (lpszPath[0] && lpszPath[1] ==
':' && lpszPath[2] ==
'\\')
3344 return (
LPWSTR)lpszPath + 3;
3360 DWORD lenW =
sizeof(bufW)/
sizeof(
WCHAR), lenA;
3405 static const WCHAR file_colon[] = {
'f',
'i',
'l',
'e',
':',0 };
3406 static const WCHAR localhost[] = {
'l',
'o',
'c',
'a',
'l',
'h',
'o',
's',
't',0 };
3428 while (*
src ==
'/' || *
src ==
'\\') {
3479 while (*
src && *
src !=
'/' && *
src !=
'\\')
3508 if (*
dst ==
'/') *
dst =
'\\';
3509 if (
isalphaW(*tpath) && tpath[1] ==
'|')
3531 if (tpath != pszPath)
3534 if (tpath != pszPath)
3601 if(lpszPath && lpszFrom && lpszTo)
3622 static const WCHAR szPrevDirSlash[] = {
'.',
'.',
'\\',
'\0' };
3623 static const WCHAR szPrevDir[] = {
'.',
'.',
'\0' };
3631 if(!lpszPath || !lpszFrom || !lpszTo)
3648 lpszFrom = szFrom + dwLen;
3654 if (*lpszFrom ==
'\\')
3660 strcatW(lpszPath, *lpszFrom ? szPrevDirSlash : szPrevDir);
3668 if (*lpszTo && lpszTo[-1])
3670 if (*lpszTo !=
'\\')
3678 strcpyW(lpszPath + dwLen, lpszTo);
3818 if (*lpszPath ==
'\\' && lpszPath[1] ==
'\\')
3821 if (dwDriveNum == -1)
3844 if (*lpszPath ==
'\\' && lpszPath[1] ==
'\\')
3847 if (dwDriveNum == -1)
3871 DWORD dwNameLen = 0, dwExtLen = 0;
3880 if (*lpszPath ==
' ')
3882 if (*lpszPath ==
'.')
3912 DWORD dwNameLen = 0, dwExtLen = 0;
3921 if (*lpszPath ==
' ')
3923 if (*lpszPath ==
'.')
3980 static const WCHAR szAllFiles[] = {
'*',
'.',
'*',
'\0' };
3998 strcpyW(szSearch + dwLen, szAllFiles);
4007 if (
find_data.cFileName[1] ==
'\0')
continue;
4047 if (lpszSuffix && lppszArray && dwCount > 0)
4049 dwLen =
strlen(lpszSuffix);
4051 while (dwRet < dwCount)
4053 size_t dwCompareLen =
strlen(*lppszArray);
4054 if (dwCompareLen < dwLen)
4056 if (!
strcmp(lpszSuffix + dwLen - dwCompareLen, *lppszArray))
4078 if (lpszSuffix && lppszArray && dwCount > 0)
4082 while (dwRet < dwCount)
4084 size_t dwCompareLen =
strlenW(*lppszArray);
4085 if (dwCompareLen < dwLen)
4087 if (!
strcmpW(lpszSuffix + dwLen - dwCompareLen, *lppszArray))
4117 if (!pszPath)
return;
4120 if (
ext == pszPath ||
ext[-1] !=
']')
return;
4126 if (
skip > pszPath && *
skip ==
'[' &&
skip[-1] !=
'\\')
4141 if (!pszPath)
return;
4144 if (
ext == pszPath ||
ext[-1] !=
']')
return;
4150 if (
skip > pszPath && *
skip ==
'[' &&
skip[-1] !=
'\\')
4185 if (buf_len <
len + 1)
return FALSE;
4191static const WCHAR allusersprofileW[] = {
'%',
'A',
'L',
'L',
'U',
'S',
'E',
'R',
'S',
'P',
'R',
'O',
'F',
'I',
'L',
'E',
'%',0};
4193static const WCHAR programfilesW[] = {
'%',
'P',
'r',
'o',
'g',
'r',
'a',
'm',
'F',
'i',
'l',
'e',
's',
'%',0};
4194static const WCHAR systemrootW[] = {
'%',
'S',
'y',
's',
't',
'e',
'm',
'R',
'o',
'o',
't',
'%',0};
4195static const WCHAR systemdriveW[] = {
'%',
'S',
'y',
's',
't',
'e',
'm',
'D',
'r',
'i',
'v',
'e',
'%',0};
4196static const WCHAR userprofileW[] = {
'%',
'U',
'S',
'E',
'R',
'P',
'R',
'O',
'F',
'I',
'L',
'E',
'%',0};
4212 if (
map->len)
map->len--;
4258 needed =
match->varlen + pathlen -
match->len;
4259 if (
match->len == 0 || needed > buf_len)
return FALSE;
4287 TRACE(
"(%s,%p,%d)\n", lpszFile, lpszPath, dwPathLen);
4303 static const WCHAR szWeb[] = {
'\\',
'W',
'e',
'b',
'\\',
'\0'};
4304 static const WCHAR szWebMui[] = {
'm',
'u',
'i',
'\\',
'%',
'0',
'4',
'x',
'\\',
'\0'};
4305#define szWebLen (sizeof(szWeb)/sizeof(WCHAR))
4306#define szWebMuiLen ((sizeof(szWebMui)+1)/sizeof(WCHAR))
4307 DWORD dwLen, dwFileLen;
4308 LANGID lidSystem, lidUser;
4314 if (dwLen > 0 && lpszPath[dwLen-1] ==
'\\')
4317 dwFileLen =
strlenW(lpszFile);
4319 if (dwLen + dwFileLen +
szWebLen >= dwPathLen)
4322 strcpyW(lpszPath+dwLen, szWeb);
4324 dwPathLen = dwPathLen - dwLen;
4329 if (lidSystem != lidUser)
4334 wsprintfW(lpszPath + dwLen, szWebMui, lidUser);
4342 strcpyW(lpszPath + dwLen, lpszFile);
4349#define PATH_CHAR_CLASS_LETTER 0x00000001
4350#define PATH_CHAR_CLASS_ASTERIX 0x00000002
4351#define PATH_CHAR_CLASS_DOT 0x00000004
4352#define PATH_CHAR_CLASS_BACKSLASH 0x00000008
4353#define PATH_CHAR_CLASS_COLON 0x00000010
4354#define PATH_CHAR_CLASS_SEMICOLON 0x00000020
4355#define PATH_CHAR_CLASS_COMMA 0x00000040
4356#define PATH_CHAR_CLASS_SPACE 0x00000080
4357#define PATH_CHAR_CLASS_OTHER_VALID 0x00000100
4358#define PATH_CHAR_CLASS_DOUBLEQUOTE 0x00000200
4360#define PATH_CHAR_CLASS_INVALID 0x00000000
4361#define PATH_CHAR_CLASS_ANY 0xffffffff
4439 if ((
unsigned)
c > 0x7e)
#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)
int WINAPI PathCommonPrefixW(const WCHAR *file1, const WCHAR *file2, WCHAR *path)
BOOL WINAPI PathIsRootA(const char *path)
#define PATH_CHAR_CLASS_DOUBLEQUOTE
BOOL WINAPI PathMatchSpecA(const char *path, const char *mask)
BOOL WINAPI PathIsSameRootW(const WCHAR *path1, const WCHAR *path2)
void WINAPI PathRemoveExtensionW(WCHAR *path)
#define PATH_CHAR_CLASS_OTHER_VALID
void WINAPI PathRemoveBlanksW(WCHAR *path)
BOOL WINAPI PathIsUNCW(const WCHAR *path)
LPSTR WINAPI PathFindExtensionA(const char *path)
BOOL WINAPI PathIsPrefixA(const char *prefix, const char *path)
HRESULT WINAPI UrlUnescapeW(WCHAR *url, WCHAR *unescaped, DWORD *unescaped_len, DWORD flags)
static WCHAR * heap_strdupAtoW(const char *str)
int WINAPI PathCommonPrefixA(const char *file1, const char *file2, char *path)
void WINAPI PathRemoveBlanksA(char *path)
void WINAPI PathUnquoteSpacesW(WCHAR *path)
int WINAPI PathGetDriveNumberW(const WCHAR *path)
#define PATH_CHAR_CLASS_SPACE
#define PATH_CHAR_CLASS_ASTERIX
void WINAPI PathQuoteSpacesA(char *path)
BOOL WINAPI PathRemoveFileSpecA(char *path)
WCHAR *WINAPI PathRemoveBackslashW(WCHAR *path)
HRESULT WINAPI PathCreateFromUrlW(const WCHAR *url, WCHAR *path, DWORD *pcchPath, DWORD dwReserved)
BOOL WINAPI PathIsUNCServerShareW(const WCHAR *path)
BOOL WINAPI PathIsUNCServerA(const char *path)
BOOL WINAPI PathIsFileSpecA(const char *path)
WCHAR *WINAPI PathFindFileNameW(const WCHAR *path)
BOOL WINAPI PathFileExistsA(const char *path)
UINT WINAPI PathGetCharTypeA(UCHAR ch)
BOOL WINAPI PathRelativePathToA(char *path, const char *from, DWORD attributes_from, const char *to, DWORD attributes_to)
HRESULT WINAPI PathCreateFromUrlA(const char *pszUrl, char *pszPath, DWORD *pcchPath, DWORD dwReserved)
#define PATH_CHAR_CLASS_ANY
char *WINAPI PathFindNextComponentA(const char *path)
char *WINAPI PathGetArgsA(const char *path)
#define PATH_CHAR_CLASS_LETTER
BOOL WINAPI PathSearchAndQualifyA(const char *path, char *buffer, UINT length)
void WINAPI PathStripPathA(char *path)
void WINAPI PathStripPathW(WCHAR *path)
BOOL WINAPI PathRemoveFileSpecW(WCHAR *path)
void WINAPI PathRemoveExtensionA(char *path)
LPWSTR WINAPI PathFindExtensionW(const WCHAR *path)
char *WINAPI PathSkipRootA(const char *path)
BOOL WINAPI PathUnExpandEnvStringsW(const WCHAR *path, WCHAR *buffer, UINT buf_len)
int WINAPI PathGetDriveNumberA(const char *path)
#define PATH_CHAR_CLASS_SEMICOLON
BOOL WINAPI PathIsRelativeA(const char *path)
int WINAPI PathParseIconLocationA(char *path)
void WINAPI PathUnquoteSpacesA(char *path)
#define PATH_CHAR_CLASS_COLON
BOOL WINAPI PathIsRelativeW(const WCHAR *path)
int WINAPI PathParseIconLocationW(WCHAR *path)
BOOL WINAPI PathSearchAndQualifyW(const WCHAR *path, WCHAR *buffer, UINT length)
char *WINAPI PathRemoveBackslashA(char *path)
BOOL WINAPI PathStripToRootW(WCHAR *path)
BOOL WINAPI PathStripToRootA(char *path)
BOOL WINAPI PathIsSameRootA(const char *path1, const char *path2)
BOOL WINAPI PathIsUNCServerW(const WCHAR *path)
static void init_envvars_map(struct envvars_map *map)
HRESULT WINAPI PathCreateFromUrlAlloc(const WCHAR *url, WCHAR **path, DWORD reserved)
BOOL WINAPI PathIsValidCharW(WCHAR c, DWORD class)
BOOL WINAPI PathMatchSpecW(const WCHAR *path, const WCHAR *mask)
WCHAR *WINAPI PathGetArgsW(const WCHAR *path)
BOOL WINAPI PathIsLFNFileSpecA(const char *path)
UINT WINAPI PathGetCharTypeW(WCHAR ch)
BOOL WINAPI PathIsValidCharA(char c, DWORD class)
WCHAR *WINAPI PathSkipRootW(const WCHAR *path)
#define PATH_CHAR_CLASS_COMMA
BOOL WINAPI PathRelativePathToW(WCHAR *path, const WCHAR *from, DWORD attributes_from, const WCHAR *to, DWORD attributes_to)
BOOL WINAPI PathFileExistsW(const WCHAR *path)
BOOL WINAPI PathUnExpandEnvStringsA(const char *path, char *buffer, UINT buf_len)
#define PATH_CHAR_CLASS_INVALID
char *WINAPI PathFindFileNameA(const char *path)
BOOL WINAPI PathIsFileSpecW(const WCHAR *path)
BOOL WINAPI PathIsRootW(const WCHAR *path)
BOOL WINAPI PathIsLFNFileSpecW(const WCHAR *path)
BOOL WINAPI PathIsPrefixW(const WCHAR *prefix, const WCHAR *path)
#define PATH_CHAR_CLASS_BACKSLASH
#define PATH_CHAR_CLASS_DOT
WCHAR *WINAPI PathFindNextComponentW(const WCHAR *path)
BOOL WINAPI PathIsUNCA(const char *path)
BOOL WINAPI PathIsUNCServerShareA(const char *path)
void WINAPI PathQuoteSpacesW(WCHAR *path)
LPSTR WINAPI CharNextA(const char *ptr)
WCHAR *WINAPI StrDupW(const WCHAR *str)
LPSTR WINAPI CharPrevA(const char *start, const char *ptr)
WCHAR *WINAPI StrCpyNW(WCHAR *dst, const WCHAR *src, int count)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP char *__cdecl strchr(const char *, int)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
HRESULT WINAPI SHGetWebFolderFilePathA(LPCSTR lpszFile, LPSTR lpszPath, DWORD dwPathLen)
void WINAPI PathRemoveArgsW(LPWSTR lpszPath)
static const WCHAR userprofileW[]
BOOL WINAPI PathFileExistsDefExtA(LPSTR lpszPath, DWORD dwWhich)
BOOL WINAPI PathIsDirectoryA(LPCSTR lpszPath)
BOOL WINAPI PathMakeSystemFolderA(LPCSTR lpszPath)
static const WCHAR systemdriveW[]
BOOL WINAPI PathIsNetworkPathW(LPCWSTR lpszPath)
LPSTR WINAPI PathBuildRootA(LPSTR lpszPath, int drive)
BOOL WINAPI PathMakeSystemFolderW(LPCWSTR lpszPath)
BOOL(WINAPI * fnpIsNetDrive)(int)
static const WCHAR programfilesW[]
BOOL WINAPI PathIsNetworkPathA(LPCSTR 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)
BOOL WINAPI PathFindOnPathW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs)
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)
static BOOL PathMatchSingleMaskA(LPCSTR name, LPCSTR mask)
static BOOL SHLWAPI_UseSystemForSystemFolders(void)
BOOL WINAPI PathMakePrettyW(LPWSTR lpszPath)
static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
void WINAPI PathUndecorateW(LPWSTR pszPath)
BOOL WINAPI PathCompactPathA(HDC hDC, LPSTR lpszPath, UINT dx)
BOOL WINAPI PathUnmakeSystemFolderW(LPCWSTR lpszPath)
BOOL WINAPI PathFindOnPathA(LPSTR lpszFile, LPCSTR *lppszOtherDirs)
static fnpIsNetDrive pIsNetDrive
LPWSTR WINAPI PathBuildRootW(LPWSTR lpszPath, int drive)
BOOL WINAPI PathFileExistsAndAttributesA(LPCSTR lpszPath, DWORD *dwAttr)
static HMODULE SHLWAPI_hshell32
HRESULT WINAPI SHGetWebFolderFilePathW(LPCWSTR, LPWSTR, DWORD)
VOID WINAPI PathSetDlgItemPathA(HWND hDlg, int id, LPCSTR lpszPath)
BOOL WINAPI PathIsContentTypeW(LPCWSTR lpszPath, LPCWSTR lpszContentType)
BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
BOOL WINAPI PathIsSystemFolderW(LPCWSTR lpszPath, DWORD dwAttrib)
BOOL WINAPI PathFindOnPathExW(LPWSTR lpszFile, LPCWSTR *lppszOtherDirs, DWORD dwWhich)
BOOL WINAPI PathMakePrettyA(LPSTR lpszPath)
static const WCHAR allusersprofileW[]
void WINAPI PathUndecorateA(LPSTR pszPath)
LPCSTR WINAPI PathFindSuffixArrayA(LPCSTR lpszSuffix, LPCSTR *lppszArray, int dwCount)
static const WCHAR appdataW[]
static const WCHAR systemrootW[]
BOOL WINAPI PathUnmakeSystemFolderA(LPCSTR lpszPath)
VOID WINAPI PathSetDlgItemPathW(HWND hDlg, int id, LPCWSTR lpszPath)
LPCWSTR WINAPI PathFindSuffixArrayW(LPCWSTR lpszSuffix, LPCWSTR *lppszArray, int dwCount)
BOOL WINAPI PathFileExistsAndAttributesW(LPCWSTR lpszPath, DWORD *dwAttr)
BOOL WINAPI PathFileExistsDefExtW(LPWSTR lpszPath, DWORD dwWhich)
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
BOOL WINAPI PathIsContentTypeA(LPCSTR lpszPath, LPCSTR lpszContentType)
BOOL WINAPI PathIsDirectoryEmptyA(LPCSTR 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 StrCpyW(LPWSTR lpszStr, LPCWSTR lpszSrc)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static unsigned char buff[32768]
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 const WCHAR pathW[]
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
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
_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 URL_UNESCAPE_INPLACE
EXTERN_C int WINAPI IsNetDrive(int drive)
#define RtlMoveMemory(Destination, Source, Length)
#define INVALID_FILE_ATTRIBUTES
DWORD WINAPI GetLastError(void)
#define GetFileAttributes
#define strncmpiW(s1, s2, n)
#define strncmpW(s1, s2, n)
BOOL WINAPI GetTextExtentPointW(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpString, _In_ int c, _Out_ LPSIZE lpsz)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
struct _NETRESOURCEA * LPNETRESOURCEA
#define RESOURCEDISPLAYTYPE_SHARE
#define RESOURCEDISPLAYTYPE_GENERIC
#define RESOURCETYPE_DISK
struct _NETRESOURCEW * LPNETRESOURCEW
#define RESOURCE_GLOBALNET
#define HKEY_LOCAL_MACHINE
#define HKEY_CLASSES_ROOT
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HDC WINAPI GetDC(_In_opt_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
DWORD WINAPI WNetGetResourceInformationA(LPNETRESOURCEA lpNetResource, LPVOID lpBuffer, LPDWORD cbBuffer, LPSTR *lplpSystem)
DWORD WINAPI WNetGetResourceInformationW(LPNETRESOURCEW lpNetResource, LPVOID lpBuffer, LPDWORD cbBuffer, LPWSTR *lplpSystem)