- Small cleanup shell32. We don't support non-unicode OSes and Windows XP/2003 calls unicode functions

svn path=/trunk/; revision=39302
This commit is contained in:
Dmitry Chapyshev
2009-02-03 09:23:16 +00:00
parent 0c9316bd54
commit 62cd647ea4
3 changed files with 35 additions and 341 deletions

View File

@@ -28,33 +28,33 @@
28 stdcall SHILCreateFromPath(ptr ptr ptr) SHILCreateFromPathAW
29 stdcall -noname PathIsRoot(ptr) PathIsRootAW
30 stdcall -noname PathBuildRoot(ptr long) PathBuildRootAW
31 stdcall -noname PathFindExtension(ptr) PathFindExtensionAW # Fixme
32 stdcall -noname PathAddBackslash(ptr) PathAddBackslashAW # Fixme
33 stdcall -noname PathRemoveBlanks(ptr) PathRemoveBlanksAW # Fixme
34 stdcall -noname PathFindFileName(ptr) PathFindFileNameAW # Fixme
31 stdcall -noname PathFindExtension(wstr) PathFindExtensionW
32 stdcall -noname PathAddBackslash(wstr) PathAddBackslashW
33 stdcall -noname PathRemoveBlanks(wstr) PathRemoveBlanksW
34 stdcall -noname PathFindFileName(wstr) PathFindFileNameW
35 stdcall -noname PathRemoveFileSpec(ptr) PathRemoveFileSpecAW # Fixme
36 stdcall -noname PathAppend(ptr ptr) PathAppendAW # Fixme
37 stdcall -noname PathCombine(ptr ptr ptr) PathCombineAW # Fixme
38 stdcall -noname PathStripPath(ptr) PathStripPathAW # Fixme
39 stdcall -noname PathIsUNC(ptr) PathIsUNCAW # Fixme
40 stdcall -noname PathIsRelative(ptr) PathIsRelativeAW # Fixme
37 stdcall -noname PathCombine(wstr wstr wstr) PathCombineW
38 stdcall -noname PathStripPath(wstr) PathStripPathW
39 stdcall -noname PathIsUNC(wstr) PathIsUNCW
40 stdcall -noname PathIsRelative(wstr) PathIsRelativeW
41 stdcall IsLFNDriveA(str)
42 stdcall IsLFNDriveW(wstr)
43 stdcall PathIsExe(ptr) PathIsExeAW
44 stdcall OpenAs_RunDLL(long long str long) OpenAs_RunDLLA
45 stdcall -noname PathFileExists(ptr) PathFileExistsAW # Fixme
46 stdcall -noname PathMatchSpec(ptr ptr) PathMatchSpecAW # Fixme
46 stdcall -noname PathMatchSpec(wstr wstr) PathMatchSpecW
47 stdcall PathMakeUniqueName(ptr long ptr ptr ptr) PathMakeUniqueNameAW
48 stdcall -noname PathSetDlgItemPath(long long ptr) PathSetDlgItemPathAW # Fixme
48 stdcall -noname PathSetDlgItemPath(long long wstr) PathSetDlgItemPathW
49 stdcall PathQualify(ptr) PathQualifyAW
50 stdcall -noname PathStripToRoot(ptr) PathStripToRootAW # Fixme
50 stdcall -noname PathStripToRoot(wstr) PathStripToRootW
51 stdcall PathResolve(str long long) PathResolveAW
52 stdcall -noname PathGetArgs(str) PathGetArgsAW # Fixme
52 stdcall -noname PathGetArgs(wstr) PathGetArgsW
53 stub -noname Shell_53
54 stub -noname LogoffWindowsDialog
55 stdcall -noname PathQuoteSpaces(ptr) PathQuoteSpacesAW # Fixme
56 stdcall -noname PathUnquoteSpaces(str) PathUnquoteSpacesAW # Fixme
57 stdcall -noname PathGetDriveNumber(str) PathGetDriveNumberAW # Fixme
55 stdcall -noname PathQuoteSpaces(wstr) PathQuoteSpacesW
56 stdcall -noname PathUnquoteSpaces(wstr) PathUnquoteSpacesW
57 stdcall -noname PathGetDriveNumber(wstr) PathGetDriveNumberW
58 stdcall -noname ParseField(str long ptr long) ParseFieldAW # Fixme
59 stdcall RestartDialog(long wstr long)
60 stdcall -noname ExitWindowsDialog(long) # Fixme
@@ -90,8 +90,8 @@
90 stdcall SHFindFiles(ptr ptr)
91 stub SHFindComputer # Fixme
92 stdcall PathGetShortPath(ptr) PathGetShortPathAW
93 stdcall -noname Win32CreateDirectory(wstr ptr) Win32CreateDirectoryAW # Fixme
94 stdcall -noname Win32RemoveDirectory(wstr) Win32RemoveDirectoryAW # Fixme
93 stdcall -noname Win32CreateDirectory(wstr ptr) Win32CreateDirectoryW
94 stdcall -noname Win32RemoveDirectory(wstr) Win32RemoveDirectoryW
95 stdcall -noname SHLogILFromFSIL(ptr)
96 stdcall -noname StrRetToStrN(ptr long ptr ptr) StrRetToStrNAW # Fixme
97 stdcall -noname SHWaitForFileToOpen(long long long)
@@ -142,7 +142,7 @@
142 stub DragQueryFileAorW
143 stdcall DragQueryFileW(long long ptr long)
144 stdcall DragQueryPoint(long ptr)
145 stdcall -noname PathFindOnPath(ptr ptr) PathFindOnPathAW # Fixme
145 stdcall -noname PathFindOnPath(wstr wstr) PathFindOnPathW
146 stdcall -noname RLBuildListOfPaths()
147 stdcall SHCLSIDFromString(long long) SHCLSIDFromStringAW
148 stdcall SHMapIDListToImageListIndexAsync(ptr ptr ptr long ptr ptr ptr ptr ptr)
@@ -155,13 +155,13 @@
155 stdcall ILFree(ptr)
156 stdcall -noname ILGlobalFree(ptr)
157 stdcall ILCreateFromPath(ptr) ILCreateFromPathAW
158 stdcall -noname PathGetExtension(str long long) PathGetExtensionAW # Fixme
159 stdcall -noname PathIsDirectory(ptr) PathIsDirectoryAW # Fixme
158 stdcall -noname PathGetExtension(wstr long long) SHPathGetExtensionW
159 stdcall -noname PathIsDirectory(wstr) PathIsDirectoryW
160 stub SHNetConnectionDialog # Fixme
161 stdcall SHRunControlPanel(long long)
162 stdcall SHSimpleIDListFromPath(ptr) SHSimpleIDListFromPathAW # Fixme
163 stdcall -noname StrToOleStr(wstr str) StrToOleStrAW # Fixme
164 stdcall Win32DeleteFile(str) Win32DeleteFileAW
164 stdcall Win32DeleteFile(wstr) Win32DeleteFileW
165 stdcall SHCreateDirectory(long ptr)
166 stdcall CallCPLEntry16(long long long long long long)
167 stdcall SHAddFromPropSheetExtArray(long long long)
@@ -172,7 +172,7 @@
172 stdcall -noname SHCreateLinks(long str ptr long ptr)
173 stdcall SHValidateUNC(long long long)
174 stdcall SHCreateShellFolderViewEx(ptr ptr)
175 stdcall -noname SHGetSpecialFolderPath(long long long long) SHGetSpecialFolderPathAW # Fixme
175 stdcall -noname SHGetSpecialFolderPath(long long long long) SHGetSpecialFolderPathW
176 stdcall SHSetInstanceExplorer(long)
177 stub DAD_SetDragImageFromListView
178 stdcall SHObjectProperties(long long wstr wstr)
@@ -246,9 +246,9 @@
246 stub -noname Shell_246
247 stub -noname Shell_247
248 stub -noname Shell_248 # Fixme
249 stdcall -noname PathParseIconLocation(ptr) PathParseIconLocationAW # Fixme
250 stdcall -noname PathRemoveExtension(ptr) PathRemoveExtensionAW # Fixme
251 stdcall -noname PathRemoveArgs(ptr) PathRemoveArgsAW # Fixme
249 stdcall -noname PathParseIconLocation(wstr) PathParseIconLocationW
250 stdcall -noname PathRemoveExtension(wstr) PathRemoveExtensionW
251 stdcall -noname PathRemoveArgs(wstr) PathRemoveArgsW
252 stub -noname Shell_252 # Fixme
253 stub -noname Shell_253
254 stub -noname Shell_254

View File

@@ -44,29 +44,6 @@ BOOL WINAPI PathAppendAW(
return PathAppendA(lpszPath1, lpszPath2);
}
/*************************************************************************
* PathCombine [SHELL32.37]
*/
LPVOID WINAPI PathCombineAW(
LPVOID szDest,
LPCVOID lpszDir,
LPCVOID lpszFile)
{
if (SHELL_OsIsUnicode())
return PathCombineW( szDest, lpszDir, lpszFile );
return PathCombineA( szDest, lpszDir, lpszFile );
}
/*************************************************************************
* PathAddBackslash [SHELL32.32]
*/
LPVOID WINAPI PathAddBackslashAW(LPVOID lpszPath)
{
if(SHELL_OsIsUnicode())
return PathAddBackslashW(lpszPath);
return PathAddBackslashA(lpszPath);
}
/*************************************************************************
* PathBuildRoot [SHELL32.30]
*/
@@ -77,31 +54,6 @@ LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive)
return PathBuildRootA(lpszPath, drive);
}
/*
Extracting Component Parts
*/
/*************************************************************************
* PathFindFileName [SHELL32.34]
*/
LPVOID WINAPI PathFindFileNameAW(LPCVOID lpszPath)
{
if(SHELL_OsIsUnicode())
return PathFindFileNameW(lpszPath);
return PathFindFileNameA(lpszPath);
}
/*************************************************************************
* PathFindExtension [SHELL32.31]
*/
LPVOID WINAPI PathFindExtensionAW(LPCVOID lpszPath)
{
if (SHELL_OsIsUnicode())
return PathFindExtensionW(lpszPath);
return PathFindExtensionA(lpszPath);
}
/*************************************************************************
* PathGetExtensionA [internal]
*
@@ -120,7 +72,7 @@ static LPSTR PathGetExtensionA(LPCSTR lpszPath)
/*************************************************************************
* PathGetExtensionW [internal]
*/
static LPWSTR PathGetExtensionW(LPCWSTR lpszPath)
LPWSTR PathGetExtensionW(LPCWSTR lpszPath)
{
TRACE("(%s)\n",debugstr_w(lpszPath));
@@ -129,33 +81,11 @@ static LPWSTR PathGetExtensionW(LPCWSTR lpszPath)
}
/*************************************************************************
* PathGetExtension [SHELL32.158]
* SHPathGetExtension [SHELL32.158]
*/
LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath,DWORD void1, DWORD void2)
LPVOID WINAPI SHPathGetExtensionW(LPCWSTR lpszPath, DWORD void1, DWORD void2)
{
if (SHELL_OsIsUnicode())
return PathGetExtensionW(lpszPath);
return PathGetExtensionA(lpszPath);
}
/*************************************************************************
* PathGetArgs [SHELL32.52]
*/
LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath)
{
if (SHELL_OsIsUnicode())
return PathGetArgsW(lpszPath);
return PathGetArgsA(lpszPath);
}
/*************************************************************************
* PathGetDriveNumber [SHELL32.57]
*/
int WINAPI PathGetDriveNumberAW(LPVOID lpszPath)
{
if (SHELL_OsIsUnicode())
return PathGetDriveNumberW(lpszPath);
return PathGetDriveNumberA(lpszPath);
return PathGetExtensionW(lpszPath);
}
/*************************************************************************
@@ -168,50 +98,6 @@ BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath)
return PathRemoveFileSpecA(lpszPath);
}
/*************************************************************************
* PathStripPath [SHELL32.38]
*/
void WINAPI PathStripPathAW(LPVOID lpszPath)
{
if (SHELL_OsIsUnicode())
PathStripPathW(lpszPath);
else
PathStripPathA(lpszPath);
}
/*************************************************************************
* PathStripToRoot [SHELL32.50]
*/
BOOL WINAPI PathStripToRootAW(LPVOID lpszPath)
{
if (SHELL_OsIsUnicode())
return PathStripToRootW(lpszPath);
return PathStripToRootA(lpszPath);
}
/*************************************************************************
* PathRemoveArgs [SHELL32.251]
*/
void WINAPI PathRemoveArgsAW(LPVOID lpszPath)
{
if (SHELL_OsIsUnicode())
PathRemoveArgsW(lpszPath);
else
PathRemoveArgsA(lpszPath);
}
/*************************************************************************
* PathRemoveExtension [SHELL32.250]
*/
void WINAPI PathRemoveExtensionAW(LPVOID lpszPath)
{
if (SHELL_OsIsUnicode())
PathRemoveExtensionW(lpszPath);
else
PathRemoveExtensionA(lpszPath);
}
/*
Path Manipulations
*/
@@ -256,71 +142,9 @@ VOID WINAPI PathGetShortPathAW(LPVOID pszPath)
PathGetShortPathA(pszPath);
}
/*************************************************************************
* PathRemoveBlanks [SHELL32.33]
*/
void WINAPI PathRemoveBlanksAW(LPVOID str)
{
if(SHELL_OsIsUnicode())
PathRemoveBlanksW(str);
else
PathRemoveBlanksA(str);
}
/*************************************************************************
* PathQuoteSpaces [SHELL32.55]
*/
VOID WINAPI PathQuoteSpacesAW (LPVOID lpszPath)
{
if(SHELL_OsIsUnicode())
PathQuoteSpacesW(lpszPath);
else
PathQuoteSpacesA(lpszPath);
}
/*************************************************************************
* PathUnquoteSpaces [SHELL32.56]
*/
VOID WINAPI PathUnquoteSpacesAW(LPVOID str)
{
if(SHELL_OsIsUnicode())
PathUnquoteSpacesW(str);
else
PathUnquoteSpacesA(str);
}
/*************************************************************************
* PathParseIconLocation [SHELL32.249]
*/
int WINAPI PathParseIconLocationAW (LPVOID lpszPath)
{
if(SHELL_OsIsUnicode())
return PathParseIconLocationW(lpszPath);
return PathParseIconLocationA(lpszPath);
}
/*
########## Path Testing ##########
*/
/*************************************************************************
* PathIsUNC [SHELL32.39]
*/
BOOL WINAPI PathIsUNCAW (LPCVOID lpszPath)
{
if (SHELL_OsIsUnicode())
return PathIsUNCW( lpszPath );
return PathIsUNCA( lpszPath );
}
/*************************************************************************
* PathIsRelative [SHELL32.40]
*/
BOOL WINAPI PathIsRelativeAW (LPCVOID lpszPath)
{
if (SHELL_OsIsUnicode())
return PathIsRelativeW( lpszPath );
return PathIsRelativeA( lpszPath );
}
/*************************************************************************
* PathIsRoot [SHELL32.29]
@@ -380,16 +204,6 @@ BOOL WINAPI PathIsExeAW (LPCVOID path)
return PathIsExeA(path);
}
/*************************************************************************
* PathIsDirectory [SHELL32.159]
*/
BOOL WINAPI PathIsDirectoryAW (LPCVOID lpszPath)
{
if (SHELL_OsIsUnicode())
return PathIsDirectoryW (lpszPath);
return PathIsDirectoryA (lpszPath);
}
/*************************************************************************
* PathFileExists [SHELL32.45]
*/
@@ -400,16 +214,6 @@ BOOL WINAPI PathFileExistsAW (LPCVOID lpszPath)
return PathFileExistsA (lpszPath);
}
/*************************************************************************
* PathMatchSpec [SHELL32.46]
*/
BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask)
{
if (SHELL_OsIsUnicode())
return PathMatchSpecW( name, mask );
return PathMatchSpecA( name, mask );
}
/*************************************************************************
* PathIsSameRoot [SHELL32.650]
*/
@@ -526,16 +330,6 @@ BOOL WINAPI PathYetAnotherMakeUniqueName(
########## cleaning and resolving paths ##########
*/
/*************************************************************************
* PathFindOnPath [SHELL32.145]
*/
BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID *sOtherDirs)
{
if (SHELL_OsIsUnicode())
return PathFindOnPathW(sFile, (LPCWSTR *)sOtherDirs);
return PathFindOnPathA(sFile, (LPCSTR *)sOtherDirs);
}
/*************************************************************************
* PathCleanupSpec [SHELL32.171]
*
@@ -727,17 +521,6 @@ LONG WINAPI PathProcessCommandAW (
########## special ##########
*/
/*************************************************************************
* PathSetDlgItemPath (SHELL32.48)
*/
VOID WINAPI PathSetDlgItemPathAW(HWND hDlg, int id, LPCVOID pszPath)
{
if (SHELL_OsIsUnicode())
PathSetDlgItemPathW(hDlg, id, pszPath);
else
PathSetDlgItemPathA(hDlg, id, pszPath);
}
static const WCHAR szCurrentVersion[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\0'};
static const WCHAR Administrative_ToolsW[] = {'A','d','m','i','n','i','s','t','r','a','t','i','v','e',' ','T','o','o','l','s','\0'};
static const WCHAR AppDataW[] = {'A','p','p','D','a','t','a','\0'};
@@ -2248,21 +2031,6 @@ BOOL WINAPI SHGetSpecialFolderPathW (
szPath)) == S_OK ? TRUE : FALSE;
}
/*************************************************************************
* SHGetSpecialFolderPath (SHELL32.175)
*/
BOOL WINAPI SHGetSpecialFolderPathAW (
HWND hwndOwner,
LPVOID szPath,
int nFolder,
BOOL bCreate)
{
if (SHELL_OsIsUnicode())
return SHGetSpecialFolderPathW (hwndOwner, szPath, nFolder, bCreate);
return SHGetSpecialFolderPathA (hwndOwner, szPath, nFolder, bCreate);
}
/*************************************************************************
* SHGetFolderLocation [SHELL32.@]
*

View File

@@ -37,11 +37,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
static const WCHAR wWildcardFile[] = {'*',0};
static const WCHAR wWildcardChars[] = {'*','?',0};
static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec);
static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec);
static DWORD SHNotifyRemoveDirectoryA(LPCSTR path);
static DWORD SHNotifyRemoveDirectoryW(LPCWSTR path);
static DWORD SHNotifyDeleteFileA(LPCSTR path);
static DWORD SHNotifyDeleteFileW(LPCWSTR path);
static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest);
static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists);
@@ -367,28 +364,7 @@ BOOL SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
*
* RETURNS
* TRUE if successful, FALSE otherwise
*
* NOTES
* Verified on Win98 / IE 5 (SHELL32 4.72, March 1999 build) to be ANSI.
* This is Unicode on NT/2000
*/
static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec)
{
LPWSTR wPath;
DWORD retCode;
TRACE("(%s, %p)\n", debugstr_a(path), sec);
retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
if (!retCode)
{
retCode = SHNotifyCreateDirectoryW(wPath, sec);
SHELL32_FreeUnicodeBuf(wPath);
}
return retCode;
}
/**********************************************************************/
static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
{
@@ -404,11 +380,9 @@ static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
/**********************************************************************/
BOOL WINAPI Win32CreateDirectoryAW(LPCVOID path, LPSECURITY_ATTRIBUTES sec)
BOOL WINAPI Win32CreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
{
if (SHELL_OsIsUnicode())
return (SHNotifyCreateDirectoryW(path, sec) == ERROR_SUCCESS);
return (SHNotifyCreateDirectoryA(path, sec) == ERROR_SUCCESS);
return (SHNotifyCreateDirectoryW(path, sec) == ERROR_SUCCESS);
}
/************************************************************************
@@ -421,29 +395,7 @@ BOOL WINAPI Win32CreateDirectoryAW(LPCVOID path, LPSECURITY_ATTRIBUTES sec)
*
* RETURNS
* TRUE if successful, FALSE otherwise
*
* NOTES
* Verified on Win98 / IE 5 (SHELL32 4.72, March 1999 build) to be ANSI.
* This is Unicode on NT/2000
*/
static DWORD SHNotifyRemoveDirectoryA(LPCSTR path)
{
LPWSTR wPath;
DWORD retCode;
TRACE("(%s)\n", debugstr_a(path));
retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
if (!retCode)
{
retCode = SHNotifyRemoveDirectoryW(wPath);
SHELL32_FreeUnicodeBuf(wPath);
}
return retCode;
}
/***********************************************************************/
static DWORD SHNotifyRemoveDirectoryW(LPCWSTR path)
{
BOOL ret;
@@ -468,11 +420,9 @@ static DWORD SHNotifyRemoveDirectoryW(LPCWSTR path)
/***********************************************************************/
BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
BOOL WINAPI Win32RemoveDirectoryW(LPCWSTR path)
{
if (SHELL_OsIsUnicode())
return (SHNotifyRemoveDirectoryW(path) == ERROR_SUCCESS);
return (SHNotifyRemoveDirectoryA(path) == ERROR_SUCCESS);
return (SHNotifyRemoveDirectoryW(path) == ERROR_SUCCESS);
}
/************************************************************************
@@ -485,29 +435,7 @@ BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
*
* RETURNS
* TRUE if successful, FALSE otherwise
*
* NOTES
* Verified on Win98 / IE 5 (SHELL32 4.72, March 1999 build) to be ANSI.
* This is Unicode on NT/2000
*/
static DWORD SHNotifyDeleteFileA(LPCSTR path)
{
LPWSTR wPath;
DWORD retCode;
TRACE("(%s)\n", debugstr_a(path));
retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
if (!retCode)
{
retCode = SHNotifyDeleteFileW(wPath);
SHELL32_FreeUnicodeBuf(wPath);
}
return retCode;
}
/***********************************************************************/
static DWORD SHNotifyDeleteFileW(LPCWSTR path)
{
BOOL ret;
@@ -533,11 +461,9 @@ static DWORD SHNotifyDeleteFileW(LPCWSTR path)
/***********************************************************************/
DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
DWORD WINAPI Win32DeleteFileW(LPCWSTR path)
{
if (SHELL_OsIsUnicode())
return (SHNotifyDeleteFileW(path) == ERROR_SUCCESS);
return (SHNotifyDeleteFileA(path) == ERROR_SUCCESS);
return (SHNotifyDeleteFileW(path) == ERROR_SUCCESS);
}
/************************************************************************