Sync to Wine-20050111: Jon Griffiths jon_p_griffiths@yahoo.com - Remove unneeded headers to reduce unneeded rebuilds. Jacek Caban jack@itma.pwr.wroc.pl - Get rid of W->A call. Michael Stefaniuc mstefani@redhat.de - Do not check for non NULL pointer before HeapFree'ing it. It's redundant. Alexandre Julliard julliard@winehq.org - Remove some no longer needed AW functions. - Janitorial: C booleans must not be compared against TRUE. Hans Leidekker hans@it.vu.nl - Stub implementations for SHUpdateImageA, SHHandleUpdateImage, SHObjectProperties, SHGetNewLinkInfo{A,W}, SHStartNetConnectionDialog, SHEmptyRecycleBin{A,W}, SHFormatDrive, SHQueryRecycleBin{A,W}. - 'HeapAlloc can fail' fix for ExtractIconExA. - Implement ExtractAssociatedIconA -> W. - Correct prototype for SHObjectProperties. - Forward SHGetNewLinkInfo to SHGetNewLinkInfoA. Robert Shearman rob@codeweavers.com - Remove unnecessary WNDPROC casts. - Don't sort the children of My Computer in shell browse for folder dialog. Eric Pouech pouech-eric@wanadoo.fr - Removed excessive statement (break after return or goto, not useful break, not needed vars...) - Fixed some errors in function prototypes. Jose Manuel Ferrer Ortiz jmfo1982@yahoo.es - Added some Spanish translations. Juan Lang juan_lang@yahoo.com - Revert shell32 version to Win2K SP4 level. Rein Klazes wijn@wanadoo.nl - ShellExecuteEx, ExtractIconEx, SHFileOperation, SHGetFileInfo, SHGetPathFromIDList spec entries always refer to the Ansi version. Problem found by Paul Vriens. Modified: trunk/reactos/lib/shell32/autocomplete.c Modified: trunk/reactos/lib/shell32/brsfolder.c Modified: trunk/reactos/lib/shell32/changenotify.c Modified: trunk/reactos/lib/shell32/cpanelfolder.c Modified: trunk/reactos/lib/shell32/enumidlist.c Modified: trunk/reactos/lib/shell32/folders.c Modified: trunk/reactos/lib/shell32/iconcache.c Modified: trunk/reactos/lib/shell32/pidl.c Modified: trunk/reactos/lib/shell32/shell32.spec Modified: trunk/reactos/lib/shell32/shell32_Es.rc Modified: trunk/reactos/lib/shell32/shell32_main.c Modified: trunk/reactos/lib/shell32/shelllink.c Modified: trunk/reactos/lib/shell32/shellole.c Modified: trunk/reactos/lib/shell32/shellord.c Modified: trunk/reactos/lib/shell32/shellreg.c Modified: trunk/reactos/lib/shell32/shfldr_mycomp.c Modified: trunk/reactos/lib/shell32/shlexec.c Modified: trunk/reactos/lib/shell32/shlfileop.c Modified: trunk/reactos/lib/shell32/shlfolder.c Modified: trunk/reactos/lib/shell32/shlfsbind.c Modified: trunk/reactos/lib/shell32/shlview.c Modified: trunk/reactos/lib/shell32/systray.c Modified: trunk/reactos/lib/shell32/undocshell.h Modified: trunk/reactos/lib/shell32/version.h _____
Modified: trunk/reactos/lib/shell32/autocomplete.c --- trunk/reactos/lib/shell32/autocomplete.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/autocomplete.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -187,10 +187,8 @@
if (!--(This->ref)) { TRACE(" destroying IAutoComplete(%p)\n",This); - if (This->quickComplete) - HeapFree(GetProcessHeap(), 0, This->quickComplete); - if (This->txtbackup) - HeapFree(GetProcessHeap(), 0, This->txtbackup); + HeapFree(GetProcessHeap(), 0, This->quickComplete); + HeapFree(GetProcessHeap(), 0, This->txtbackup); if (This->hwndListBox) DestroyWindow(This->hwndListBox); if (This->enumstr) _____
Modified: trunk/reactos/lib/shell32/brsfolder.c --- trunk/reactos/lib/shell32/brsfolder.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/brsfolder.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -330,7 +330,10 @@
if (SUCCEEDED(IShellFolder_BindToObject(lptvid->lpsfParent, lptvid->lpi,0,(REFIID)&IID_IShellFolder,(LPVOID *)&lpsf2))) { FillTreeView( lpsf2, lptvid->lpifq, pnmtv->itemNew.hItem, lptvid->pEnumIL); } - TreeView_SortChildren(hwndTreeView, pnmtv->itemNew.hItem, FALSE); + /* My Computer is already sorted and trying to do a simple text + * sort will only mess things up */ + if (!_ILIsMyComputer(lptvid->lpi)) + TreeView_SortChildren(hwndTreeView, pnmtv->itemNew.hItem, FALSE); } break; case TVN_SELCHANGEDA: @@ -491,10 +494,7 @@ WideCharToMultiByte(CP_ACP, 0, bi.pszDisplayName, -1, lpbi->pszDisplayName, MAX_PATH, 0, NULL); HeapFree(GetProcessHeap(), 0, bi.pszDisplayName); } - if (bi.lpszTitle) - { - HeapFree(GetProcessHeap(), 0, (LPVOID)bi.lpszTitle); - } + HeapFree(GetProcessHeap(), 0, (LPVOID)bi.lpszTitle); lpbi->iImage = bi.iImage; return lpid; } _____
Modified: trunk/reactos/lib/shell32/changenotify.c --- trunk/reactos/lib/shell32/changenotify.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/changenotify.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -27,9 +27,7 @@
#include "winbase.h" #include "wine/debug.h" #include "wingdi.h" -#include "pidl.h" #include "shell32_main.h" -#include "undocshell.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
_____
Modified: trunk/reactos/lib/shell32/cpanelfolder.c --- trunk/reactos/lib/shell32/cpanelfolder.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/cpanelfolder.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -47,7 +47,6 @@
#include "shell32_main.h" #include "shresdef.h" #include "shlwapi.h" -#include "shellfolder.h" #include "wine/debug.h" #include "debughlp.h" #include "shfldr.h" _____
Modified: trunk/reactos/lib/shell32/enumidlist.c --- trunk/reactos/lib/shell32/enumidlist.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/enumidlist.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -28,13 +28,9 @@
#include "windef.h" #include "winbase.h" #include "winreg.h" -#include "undocshell.h" #include "shlwapi.h" -#include "winerror.h" -#include "objbase.h"
#include "pidl.h" -#include "shlguid.h" #include "enumidlist.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell); _____
Modified: trunk/reactos/lib/shell32/folders.c --- trunk/reactos/lib/shell32/folders.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/folders.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -34,10 +34,8 @@
#include "undocshell.h" #include "shlguid.h" #include "winreg.h" -#include "shlwapi.h"
#include "wine/debug.h" -#include "wine/unicode.h"
#include "pidl.h" #include "shell32_main.h" _____
Modified: trunk/reactos/lib/shell32/iconcache.c --- trunk/reactos/lib/shell32/iconcache.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/iconcache.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -43,7 +43,6 @@
#include "pidl.h" #include "shell32_main.h" #include "undocshell.h" -#include "shlwapi.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
@@ -420,15 +419,6 @@ }
/*********************************************************************** ** - * ExtractIconEx [SHELL32.@] - */ -UINT WINAPI ExtractIconExAW(LPCVOID lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons) -{ if (SHELL_OsIsUnicode()) - return ExtractIconExW ( lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); - return ExtractIconExA ( lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); -} - -/********************************************************************** *** * ExtractIconExW [SHELL32.@] * RETURNS * 0 no icon found @@ -460,15 +450,18 @@ */ UINT WINAPI ExtractIconExA(LPCSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons) { - UINT ret; + UINT ret = 0; INT len = MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, NULL, 0); LPWSTR lpwstrFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
TRACE("%s %i %p %p %i\n", lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons);
- MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, lpwstrFile, len); - ret = ExtractIconExW (lpwstrFile, nIconIndex, phiconLarge, phiconSmall, nIcons); - HeapFree(GetProcessHeap(), 0, lpwstrFile); + if (lpwstrFile) + { + MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, lpwstrFile, len); + ret = ExtractIconExW(lpwstrFile, nIconIndex, phiconLarge, phiconSmall, nIcons); + HeapFree(GetProcessHeap(), 0, lpwstrFile); + } return ret; }
@@ -480,43 +473,55 @@ */ HICON WINAPI ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon) { - HICON hIcon; - WORD wDummyIcon = 0; - - TRACE("\n"); + HICON hIcon = NULL; + INT len = MultiByteToWideChar(CP_ACP, 0, lpIconPath, -1, NULL, 0); + LPWSTR lpIconPathW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
- if(lpiIcon == NULL) - lpiIcon = &wDummyIcon; + TRACE("%p %s %p\n", hInst, debugstr_a(lpIconPath), lpiIcon);
- hIcon = ExtractIconA(hInst, lpIconPath, *lpiIcon); + if (lpIconPathW) + { + MultiByteToWideChar(CP_ACP, 0, lpIconPath, -1, lpIconPathW, len); + hIcon = ExtractAssociatedIconW(hInst, lpIconPathW, lpiIcon); + HeapFree(GetProcessHeap(), 0, lpIconPathW); + } + return hIcon; +}
- if( hIcon < (HICON)2 ) - { if( hIcon == (HICON)1 ) /* no icons found in given file */ - { char tempPath[0x80]; - HINSTANCE uRet = FindExecutableA(lpIconPath,NULL,tempPath); +HICON WINAPI ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon) +{ + HICON hIcon = NULL; + WORD wDummyIcon = 0;
- if( uRet > (HINSTANCE)32 && tempPath[0] ) - { strcpy(lpIconPath,tempPath); - hIcon = ExtractIconA(hInst, lpIconPath, *lpiIcon); - if( hIcon > (HICON)2 ) - return hIcon; - } - else hIcon = 0; - } + TRACE("%p %s %p\n", hInst, debugstr_w(lpIconPath), lpiIcon);
- if( hIcon == (HICON)1 ) - *lpiIcon = 2; /* MSDOS icon - we found .exe but no icons in it */ - else - *lpiIcon = 6; /* generic icon - found nothing */ + if(lpiIcon == NULL) + lpiIcon = &wDummyIcon;
- if (GetModuleFileNameA(hInst, lpIconPath, 0x80)) - { - /* terminate string (GetModuleFileName doesn't do if buffer is too small) */ - lpIconPath[0x80 - 1] = '\0'; - hIcon = LoadIconA( hInst, MAKEINTRESOURCEA(*lpiIcon)); - } - } - return hIcon; + hIcon = ExtractIconW(hInst, lpIconPath, *lpiIcon); + + if( hIcon < (HICON)2 ) + { if( hIcon == (HICON)1 ) /* no icons found in given file */ + { WCHAR tempPath[MAX_PATH]; + HINSTANCE uRet = FindExecutableW(lpIconPath,NULL,tempPath); + + if( uRet > (HINSTANCE)32 && tempPath[0] ) + { lstrcpyW(lpIconPath,tempPath); + hIcon = ExtractIconW(hInst, lpIconPath, *lpiIcon); + if( hIcon > (HICON)2 ) + return hIcon; + } + } + + if( hIcon == (HICON)1 ) + *lpiIcon = 2; /* MSDOS icon - we found .exe but no icons in it */ + else + *lpiIcon = 6; /* generic icon - found nothing */ + + if (GetModuleFileNameW(hInst, lpIconPath, MAX_PATH)) + hIcon = LoadIconW(hInst, MAKEINTRESOURCEW(*lpiIcon)); + } + return hIcon; }
/*********************************************************************** ** _____
Modified: trunk/reactos/lib/shell32/pidl.c --- trunk/reactos/lib/shell32/pidl.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/pidl.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -47,7 +47,6 @@
#include "shlwapi.h"
#include "pidl.h" -#include "debughlp.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(pidl); @@ -1058,7 +1057,7 @@
_ILParsePathW(wPath, NULL, TRUE, &pidl, NULL);
- if (wPath) HeapFree(GetProcessHeap(), 0, wPath); + HeapFree(GetProcessHeap(), 0, wPath); TRACE("%s %p\n", debugstr_a(lpszPath), pidl); return pidl; } @@ -1366,18 +1365,6 @@ }
/*********************************************************************** ** - * SHGetPathFromIDList [SHELL32.@][NT 4.0: SHELL32.219] - */ -BOOL WINAPI SHGetPathFromIDListAW(LPCITEMIDLIST pidl,LPVOID pszPath) -{ - TRACE_(shell)("(pidl=%p,%p)\n",pidl,pszPath); - - if (SHELL_OsIsUnicode()) - return SHGetPathFromIDListW(pidl,pszPath); - return SHGetPathFromIDListA(pidl,pszPath); -} - -/********************************************************************** *** * SHBindToParent [shell version 5.0] */ HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast) _____
Modified: trunk/reactos/lib/shell32/shell32.spec --- trunk/reactos/lib/shell32/shell32.spec 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shell32.spec 2005-01-12 22:49:57 UTC (rev 12998) @@ -169,9 +169,9 @@
175 stdcall SHGetSpecialFolderPath(long long long long) SHGetSpecialFolderPathAW 176 stdcall SHSetInstanceExplorer (long) 177 stub DAD_SetDragImageFromListView - 178 stub SHObjectProperties - 179 stub SHGetNewLinkInfoA - 180 stub SHGetNewLinkInfoW + 178 stdcall SHObjectProperties(long long wstr wstr) + 179 stdcall SHGetNewLinkInfoA(str str ptr long long) + 180 stdcall SHGetNewLinkInfoW(wstr wstr ptr long long) 181 stdcall RegisterShellHook(long long) 182 varargs ShellMessageBoxW(long long long str long) 183 varargs ShellMessageBoxA(long long long str long) @@ -182,9 +182,9 @@ 188 stdcall ShellDDEInit(long) 189 stdcall ILCreateFromPathA(str) 190 stdcall ILCreateFromPathW(wstr) - 191 stub SHUpdateImageA + 191 stdcall SHUpdateImageA(str long long long) 192 stdcall SHUpdateImageW(wstr long long long) - 193 stub SHHandleUpdateImage + 193 stdcall SHHandleUpdateImage(ptr) 194 stub SHCreatePropSheetExtArrayEx 195 stdcall SHFree(ptr) 196 stdcall SHAlloc(long) @@ -206,7 +206,7 @@ 212 stub Printers_AddPrinterPropPages 213 stub Printers_RegisterWindowW 214 stub Printers_UnregisterWindow - 215 stub SHStartNetConnectionDialog + 215 stdcall SHStartNetConnectionDialog(long str long) 243 stdcall @(long long) shell32_243 244 stdcall SHInitRestricted(ptr ptr) 247 stdcall SHGetDataFromIDListA (ptr ptr long ptr long) @@ -235,15 +235,15 @@ 288 stdcall ShellAboutA(long str str long) 289 stdcall ShellAboutW(long wstr wstr long) 290 stdcall ShellExecuteA(long str str str str long) - 291 stdcall ShellExecuteEx (long) ShellExecuteExAW + 291 stdcall ShellExecuteEx (long) ShellExecuteExA 292 stdcall ShellExecuteExA (long) 293 stdcall ShellExecuteExW (long) 294 stdcall ShellExecuteW (long wstr wstr wstr wstr long) 296 stdcall Shell_NotifyIcon(long ptr) Shell_NotifyIconA 297 stdcall Shell_NotifyIconA(long ptr) 298 stdcall Shell_NotifyIconW(long ptr) - 299 stub Shl1632_ThunkData32 - 300 stub Shl3216_ThunkData32 +#299 stub Shl1632_ThunkData32 +#300 stub Shl3216_ThunkData32 301 stdcall StrChrA(str long) shlwapi.StrChrA 302 stdcall StrChrIA(str long) shlwapi.StrChrIA 303 stdcall StrChrIW(wstr long) shlwapi.StrChrIW @@ -338,12 +338,12 @@ @ stdcall DoEnvironmentSubstW(wstr wstr) @ stub DragQueryFileAorW @ stdcall DuplicateIcon(long long) -@ stdcall ExtractAssociatedIconA(long ptr long) +@ stdcall ExtractAssociatedIconA(long str ptr) @ stdcall ExtractAssociatedIconExA(long str long long) @ stdcall ExtractAssociatedIconExW(long wstr long long) -@ stub ExtractAssociatedIconW +@ stdcall ExtractAssociatedIconW(long wstr ptr) @ stdcall ExtractIconA(long str long) -@ stdcall ExtractIconEx(ptr long ptr ptr long)ExtractIconExAW +@ stdcall ExtractIconEx(ptr long ptr ptr long) ExtractIconExA @ stdcall ExtractIconExA(str long ptr ptr long) @ stdcall ExtractIconExW(wstr long ptr ptr long) @ stdcall ExtractIconW(long wstr long) @@ -376,21 +376,21 @@ @ stdcall SHCreateDirectoryExA(long str ptr) @ stdcall SHCreateDirectoryExW(long wstr ptr) @ stub ShellHookProc -@ stub SHEmptyRecycleBinA -@ stub SHEmptyRecycleBinW -@ stdcall SHFileOperation(ptr)SHFileOperationAW +@ stdcall SHEmptyRecycleBinA(long str long) +@ stdcall SHEmptyRecycleBinW(long wstr long) +@ stdcall SHFileOperation(ptr) SHFileOperationA @ stdcall SHFileOperationA(ptr) @ stdcall SHFileOperationW(ptr) -@ stub SHFormatDrive +@ stdcall SHFormatDrive(long long long long) @ stdcall SHFreeNameMappings(ptr) @ stdcall SHGetDesktopFolder(ptr) -@ stdcall SHGetFileInfo(ptr long ptr long long)SHGetFileInfoAW +@ stdcall SHGetFileInfo(ptr long ptr long long) SHGetFileInfoA @ stdcall SHGetFileInfoA(ptr long ptr long long) @ stdcall SHGetFileInfoW(ptr long ptr long long) @ stdcall SHGetInstanceExplorer(long) @ stdcall SHGetMalloc(ptr) -@ stub SHGetNewLinkInfo -@ stdcall SHGetPathFromIDList(ptr ptr)SHGetPathFromIDListAW +@ stdcall SHGetNewLinkInfo(str str ptr long long) SHGetNewLinkInfoA +@ stdcall SHGetPathFromIDList(ptr ptr) SHGetPathFromIDListA @ stdcall SHGetPathFromIDListA(ptr ptr) @ stdcall SHGetPathFromIDListW(ptr ptr) @ stdcall SHGetSettings(ptr long) @@ -399,8 +399,8 @@ @ stub SHHelpShortcuts_RunDLLA @ stub SHHelpShortcuts_RunDLLW @ stdcall SHLoadInProc(long) -@ stub SHQueryRecycleBinA -@ stub SHQueryRecycleBinW +@ stdcall SHQueryRecycleBinA(str ptr) +@ stdcall SHQueryRecycleBinW(wstr ptr) @ stub SHUpdateRecycleBinIcon @ stub WOWShellExecute
_____
Modified: trunk/reactos/lib/shell32/shell32_Es.rc --- trunk/reactos/lib/shell32/shell32_Es.rc 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shell32_Es.rc 2005-01-12 22:49:57 UTC (rev 12998) @@ -188,3 +188,35 @@
IDS_SHUTDOWN_TITLE "Apagar" IDS_SHUTDOWN_PROMPT "¿Desea terminar su sesión ReactOS?" } + +/* shell folder path default values */ +STRINGTABLE DISCARDABLE +{ + IDS_PROGRAMS "Menú Inicio\Programas" + IDS_PERSONAL "Mis documentos" + IDS_FAVORITES "Favoritos" + IDS_STARTUP "Menú Inicio\Programas\Inicio" + IDS_RECENT "Recent" + IDS_SENDTO "SendTo" + IDS_STARTMENU "Menú Inicio" + IDS_MYMUSIC "Mis documentos\Mi música" + IDS_MYVIDEO "Mis documentos\Mis vídeos" + IDS_DESKTOPDIRECTORY "Escritorio" + IDS_NETHOOD "Entorno de red" + IDS_TEMPLATES "Templates" + IDS_APPDATA "Application Data" + IDS_PRINTHOOD "PrintHood" + IDS_LOCAL_APPDATA "Configuración local\Datos de programa" + IDS_INTERNET_CACHE "Archivos temporales de Internet" + IDS_COOKIES "Cookies" + IDS_HISTORY "Historial" + IDS_PROGRAM_FILES "Archivos de programa" + IDS_MYPICTURES "Mis documentos\Mis imágenes" + IDS_PROGRAM_FILES_COMMON "Archivos de programa\Archivos comunes" + IDS_COMMON_DOCUMENTS "Documentos" + IDS_ADMINTOOLS "Menú Inicio\Programas\Accesorios\Herramientas del sistema" + IDS_COMMON_MUSIC "Documentos\Mi música" + IDS_COMMON_PICTURES "Documentos\Mis imágenes" + IDS_COMMON_VIDEO "Documentos\Mis vídeos" + IDS_CDBURN_AREA "Configuración local\Datos de programa\Microsoft\CD Burning" +} _____
Modified: trunk/reactos/lib/shell32/shell32_main.c --- trunk/reactos/lib/shell32/shell32_main.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shell32_main.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -543,21 +543,6 @@
}
/*********************************************************************** ** - * SHGetFileInfo [SHELL32.@] - */ -DWORD WINAPI SHGetFileInfoAW( - LPCVOID path, - DWORD dwFileAttributes, - LPVOID psfi, - UINT sizeofpsfi, - UINT flags) -{ - if(SHELL_OsIsUnicode()) - return SHGetFileInfoW(path, dwFileAttributes, psfi, sizeofpsfi, flags ); - return SHGetFileInfoA(path, dwFileAttributes, psfi, sizeofpsfi, flags ); -} - -/********************************************************************** *** * DuplicateIcon [SHELL32.@] */ HICON WINAPI DuplicateIcon( HINSTANCE hInstance, HICON hIcon) @@ -827,8 +812,8 @@
ret = ShellAboutW(hWnd, appW, otherW, hIcon);
- if (otherW) HeapFree(GetProcessHeap(), 0, otherW); - if (appW) HeapFree(GetProcessHeap(), 0, appW); + HeapFree(GetProcessHeap(), 0, otherW); + HeapFree(GetProcessHeap(), 0, appW); return ret; }
@@ -844,10 +829,12 @@ HRSRC hRes; LPVOID template; BOOL bRet; + static const WCHAR wszSHELL_ABOUT_MSGBOX[] = + {'S','H','E','L','L','_','A','B','O','U','T','_','M','S','G','B','O','X' ,0};
TRACE("\n");
- if(!(hRes = FindResourceA(shell32_hInstance, "SHELL_ABOUT_MSGBOX", (LPSTR)RT_DIALOG))) + if(!(hRes = FindResourceW(shell32_hInstance, wszSHELL_ABOUT_MSGBOX, (LPWSTR)RT_DIALOG))) return FALSE; if(!(template = (LPVOID)LoadResource(shell32_hInstance, hRes))) return FALSE; _____
Modified: trunk/reactos/lib/shell32/shelllink.c --- trunk/reactos/lib/shell32/shelllink.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shelllink.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -993,21 +993,12 @@
TRACE("-- destroying IShellLink(%p)\n",This);
- if (This->sIcoPath) - HeapFree(GetProcessHeap(), 0, This->sIcoPath); + HeapFree(GetProcessHeap(), 0, This->sIcoPath); + HeapFree(GetProcessHeap(), 0, This->sArgs); + HeapFree(GetProcessHeap(), 0, This->sWorkDir); + HeapFree(GetProcessHeap(), 0, This->sDescription); + HeapFree(GetProcessHeap(),0,This->sPath);
- if (This->sArgs) - HeapFree(GetProcessHeap(), 0, This->sArgs); - - if (This->sWorkDir) - HeapFree(GetProcessHeap(), 0, This->sWorkDir); - - if (This->sDescription) - HeapFree(GetProcessHeap(), 0, This->sDescription); - - if (This->sPath) - HeapFree(GetProcessHeap(),0,This->sPath); - if (This->pPidl) ILFree(This->pPidl);
@@ -1080,8 +1071,7 @@
TRACE("(%p)->(pName=%s)\n", This, pszName);
- if (This->sDescription) - HeapFree(GetProcessHeap(), 0, This->sDescription); + HeapFree(GetProcessHeap(), 0, This->sDescription); This->sDescription = HEAP_strdupAtoW( GetProcessHeap(), 0, pszName); if ( !This->sDescription ) return E_OUTOFMEMORY; @@ -1112,8 +1102,7 @@
TRACE("(%p)->(dir=%s)\n",This, pszDir);
- if (This->sWorkDir) - HeapFree(GetProcessHeap(), 0, This->sWorkDir); + HeapFree(GetProcessHeap(), 0, This->sWorkDir); This->sWorkDir = HEAP_strdupAtoW( GetProcessHeap(), 0, pszDir); if ( !This->sWorkDir ) return E_OUTOFMEMORY; @@ -1144,8 +1133,7 @@
TRACE("(%p)->(args=%s)\n",This, pszArgs);
- if (This->sArgs) - HeapFree(GetProcessHeap(), 0, This->sArgs); + HeapFree(GetProcessHeap(), 0, This->sArgs); This->sArgs = HEAP_strdupAtoW( GetProcessHeap(), 0, pszArgs); if( !This->sArgs ) return E_OUTOFMEMORY; @@ -1276,8 +1264,7 @@
TRACE("(%p)->(path=%s iicon=%u)\n",This, pszIconPath, iIcon);
- if (This->sIcoPath) - HeapFree(GetProcessHeap(), 0, This->sIcoPath); + HeapFree(GetProcessHeap(), 0, This->sIcoPath); This->sIcoPath = HEAP_strdupAtoW(GetProcessHeap(), 0, pszIconPath); if ( !This->sIcoPath ) return E_OUTOFMEMORY; @@ -1294,8 +1281,7 @@
FIXME("(%p)->(path=%s %lx)\n",This, pszPathRel, dwReserved);
- if (This->sPathRel) - HeapFree(GetProcessHeap(), 0, This->sPathRel); + HeapFree(GetProcessHeap(), 0, This->sPathRel); This->sPathRel = HEAP_strdupAtoW(GetProcessHeap(), 0, pszPathRel); This->bDirty = TRUE;
@@ -1354,9 +1340,7 @@ if (!GetFullPathNameA(pszFile, MAX_PATH, buffer, &fname)) return E_FAIL;
- if (This->sPath) - HeapFree(GetProcessHeap(), 0, This->sPath); - + HeapFree(GetProcessHeap(), 0, This->sPath); This->sPath = HEAP_strdupAtoW(GetProcessHeap(), 0, buffer); if( !This->sPath ) return E_OUTOFMEMORY; @@ -1499,8 +1483,7 @@
TRACE("(%p)->(desc=%s)\n",This, debugstr_w(pszName));
- if (This->sDescription) - HeapFree(GetProcessHeap(), 0, This->sDescription); + HeapFree(GetProcessHeap(), 0, This->sDescription); This->sDescription = HeapAlloc( GetProcessHeap(), 0, (lstrlenW( pszName )+1)*sizeof(WCHAR) ); if ( !This->sDescription ) @@ -1532,8 +1515,7 @@
TRACE("(%p)->(dir=%s)\n",This, debugstr_w(pszDir));
- if (This->sWorkDir) - HeapFree(GetProcessHeap(), 0, This->sWorkDir); + HeapFree(GetProcessHeap(), 0, This->sWorkDir); This->sWorkDir = HeapAlloc( GetProcessHeap(), 0, (lstrlenW( pszDir )+1)*sizeof (WCHAR) ); if ( !This->sWorkDir ) @@ -1564,8 +1546,7 @@
TRACE("(%p)->(args=%s)\n",This, debugstr_w(pszArgs));
- if (This->sArgs) - HeapFree(GetProcessHeap(), 0, This->sArgs); + HeapFree(GetProcessHeap(), 0, This->sArgs); This->sArgs = HeapAlloc( GetProcessHeap(), 0, (lstrlenW( pszArgs )+1)*sizeof (WCHAR) ); if ( !This->sArgs ) @@ -1697,8 +1678,7 @@
TRACE("(%p)->(path=%s iicon=%u)\n",This, debugstr_w(pszIconPath), iIcon);
- if (This->sIcoPath) - HeapFree(GetProcessHeap(), 0, This->sIcoPath); + HeapFree(GetProcessHeap(), 0, This->sIcoPath); This->sIcoPath = HeapAlloc( GetProcessHeap(), 0, (lstrlenW( pszIconPath )+1)*sizeof (WCHAR) ); if ( !This->sIcoPath ) @@ -1717,8 +1697,7 @@
TRACE("(%p)->(path=%s %lx)\n",This, debugstr_w(pszPathRel), dwReserved);
- if (This->sPathRel) - HeapFree(GetProcessHeap(), 0, This->sPathRel); + HeapFree(GetProcessHeap(), 0, This->sPathRel); This->sPathRel = HeapAlloc( GetProcessHeap(), 0, (lstrlenW( pszPathRel )+1) * sizeof (WCHAR) ); if ( !This->sPathRel ) @@ -1781,9 +1760,7 @@ if (!GetFullPathNameW(pszFile, MAX_PATH, buffer, &fname)) return E_FAIL;
- if (This->sPath) - HeapFree(GetProcessHeap(), 0, This->sPath); - + HeapFree(GetProcessHeap(), 0, This->sPath); This->sPath = HeapAlloc( GetProcessHeap(), 0, (lstrlenW( buffer )+1) * sizeof (WCHAR) ); if (!This->sPath) _____
Modified: trunk/reactos/lib/shell32/shellole.c --- trunk/reactos/lib/shell32/shellole.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shellole.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -704,7 +704,7 @@
lpDrop = (LPSTR) lpDropFileStruct + lpDropFileStruct->pFiles;
- if(lpDropFileStruct->fWide == TRUE) { + if(lpDropFileStruct->fWide) { LPWSTR lpszFileW = NULL;
if(lpszFile) { _____
Modified: trunk/reactos/lib/shell32/shellord.c --- trunk/reactos/lib/shell32/shellord.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shellord.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -1546,5 +1546,90 @@
*/ void WINAPI SHUpdateImageW(LPCWSTR pszHashItem, int iIndex, UINT uFlags, int iImageIndex) { - FIXME("%s, %d, 0x%x, %d\n", debugstr_w(pszHashItem), iIndex, uFlags, iImageIndex); + FIXME("%s, %d, 0x%x, %d - stub\n", debugstr_w(pszHashItem), iIndex, uFlags, iImageIndex); } + +VOID WINAPI SHUpdateImageA(LPCSTR pszHashItem, INT iIndex, UINT uFlags, INT iImageIndex) +{ + FIXME("%s, %d, 0x%x, %d - stub\n", debugstr_a(pszHashItem), iIndex, uFlags, iImageIndex); +} + +INT WINAPI SHHandleUpdateImage(LPCITEMIDLIST pidlExtra) +{ + FIXME("%p - stub\n", pidlExtra); + + return -1; +} + +BOOL WINAPI SHObjectProperties(HWND hwnd, DWORD dwType, LPCWSTR szObject, LPCWSTR szPage) +{ + FIXME("%p, 0x%08lx, %s, %s - stub\n", hwnd, dwType, debugstr_w(szObject), debugstr_w(szPage)); + + return TRUE; +} + +BOOL WINAPI SHGetNewLinkInfoA(LPCSTR pszLinkTo, LPCSTR pszDir, LPSTR pszName, BOOL *pfMustCopy, + UINT uFlags) +{ + FIXME("%s, %s, %p, %p, 0x%08x - stub\n", debugstr_a(pszLinkTo), debugstr_a(pszDir), + pszName, pfMustCopy, uFlags); + + return FALSE; +} + +BOOL WINAPI SHGetNewLinkInfoW(LPCWSTR pszLinkTo, LPCWSTR pszDir, LPWSTR pszName, BOOL *pfMustCopy, + UINT uFlags) +{ + FIXME("%s, %s, %p, %p, 0x%08x - stub\n", debugstr_w(pszLinkTo), debugstr_w(pszDir), + pszName, pfMustCopy, uFlags); + + return FALSE; +} + +HRESULT WINAPI SHStartNetConnectionDialog(HWND hwnd, LPCSTR pszRemoteName, DWORD dwType) +{ + FIXME("%p, %s, 0x%08lx - stub\n", hwnd, debugstr_a(pszRemoteName), dwType); + + return S_OK; +} + +HRESULT WINAPI SHEmptyRecycleBinA(HWND hwnd, LPCSTR pszRootPath, DWORD dwFlags) +{ + FIXME("%p, %s, 0x%08lx - stub\n", hwnd, debugstr_a(pszRootPath), dwFlags); + + return S_OK; +} + +HRESULT WINAPI SHEmptyRecycleBinW(HWND hwnd, LPCWSTR pszRootPath, DWORD dwFlags) +{ + FIXME("%p, %s, 0x%08lx - stub\n", hwnd, debugstr_w(pszRootPath), dwFlags); + + return S_OK; +} + +DWORD WINAPI SHFormatDrive(HWND hwnd, UINT drive, UINT fmtID, UINT options) +{ + FIXME("%p, 0x%08x, 0x%08x, 0x%08x - stub\n", hwnd, drive, fmtID, options); + + return SHFMT_NOFORMAT; +} + +HRESULT WINAPI SHQueryRecycleBinA(LPCSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo) +{ + FIXME("%s, %p - stub\n", debugstr_a(pszRootPath), pSHQueryRBInfo); + + pSHQueryRBInfo->i64Size = 0; + pSHQueryRBInfo->i64NumItems = 0; + + return S_OK; +} + +HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryRBInfo) +{ + FIXME("%s, %p - stub\n", debugstr_w(pszRootPath), pSHQueryRBInfo); + + pSHQueryRBInfo->i64Size = 0; + pSHQueryRBInfo->i64NumItems = 0; + + return S_OK; +} _____
Modified: trunk/reactos/lib/shell32/shellreg.c --- trunk/reactos/lib/shell32/shellreg.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shellreg.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -36,7 +36,6 @@
#include "undocshell.h" #include "wine/winbase16.h" -#include "shell32_main.h"
#include "wine/debug.h"
_____
Modified: trunk/reactos/lib/shell32/shfldr_mycomp.c --- trunk/reactos/lib/shell32/shfldr_mycomp.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shfldr_mycomp.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -45,7 +45,6 @@
#include "shell32_main.h" #include "shresdef.h" #include "shlwapi.h" -#include "shellfolder.h" #include "wine/debug.h" #include "debughlp.h" #include "shfldr.h" _____
Modified: trunk/reactos/lib/shell32/shlexec.c --- trunk/reactos/lib/shell32/shlexec.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shlexec.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -38,17 +38,12 @@
#include "winbase.h" #include "winerror.h" #include "winreg.h" -#include "wownt32.h" -#include "shellapi.h" -#include "wingdi.h" #include "winuser.h" -#include "shlobj.h" #include "shlwapi.h" #include "ddeml.h"
#include "wine/winbase16.h" #include "shell32_main.h" -#include "undocshell.h" #include "pidl.h"
#include "wine/debug.h" @@ -1284,7 +1279,7 @@ retval = execute_from_key(lpstrProtocol, wszApplicationName, env, sei_tmp.lpParameters, execfunc, &sei_tmp, sei); else retval = execfunc(wszQuotedCmd, env, FALSE, &sei_tmp, sei); - if (env) HeapFree( GetProcessHeap(), 0, env ); + HeapFree( GetProcessHeap(), 0, env ); } else if (PathIsURLW((LPWSTR)lpFile)) /* File not found, check for URL */ { @@ -1369,17 +1364,6 @@ }
/*********************************************************************** ** - * ShellExecuteEx [SHELL32.291] - * - */ -BOOL WINAPI ShellExecuteExAW (LPVOID sei) -{ - if (SHELL_OsIsUnicode()) - return ShellExecuteExW32 (sei, SHELL_ExecuteW); - return ShellExecuteExA (sei); -} - -/********************************************************************** *** * ShellExecuteExA [SHELL32.292] * */ _____
Modified: trunk/reactos/lib/shell32/shlfileop.c --- trunk/reactos/lib/shell32/shlfileop.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shlfileop.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -1335,8 +1335,7 @@
if (hFind != INVALID_HANDLE_VALUE) FindClose(hFind); hFind = INVALID_HANDLE_VALUE; - if (pTempFrom) - HeapFree(GetProcessHeap(), 0, pTempFrom); + HeapFree(GetProcessHeap(), 0, pTempFrom); if (retCode) nFileOp.fAnyOperationsAborted = TRUE; TRACE("%s level=%ld AnyOpsAborted=%s ret=0x%x, with %s %s%s\n", @@ -1348,17 +1347,6 @@ return retCode; }
-/********************************************************************** *** - * SHFileOperation [SHELL32.@] - * - */ -DWORD WINAPI SHFileOperationAW(LPVOID lpFileOp) -{ - if (SHELL_OsIsUnicode()) - return SHFileOperationW(lpFileOp); - return SHFileOperationA(lpFileOp); -} - #define SHDSA_GetItemCount(hdsa) (*(int*)(hdsa))
/*********************************************************************** ** _____
Modified: trunk/reactos/lib/shell32/shlfolder.c --- trunk/reactos/lib/shell32/shlfolder.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shlfolder.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -45,11 +45,8 @@
#include "pidl.h" #include "undocshell.h" #include "shell32_main.h" -#include "shresdef.h" #include "shlwapi.h" -#include "shellfolder.h" #include "wine/debug.h" -#include "debughlp.h" #include "shfldr.h"
WINE_DEFAULT_DEBUG_CHANNEL (shell); _____
Modified: trunk/reactos/lib/shell32/shlfsbind.c --- trunk/reactos/lib/shell32/shlfsbind.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shlfsbind.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -33,7 +33,6 @@
#include "shlobj.h" #include "shell32_main.h"
-#include "debughlp.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(pidl); _____
Modified: trunk/reactos/lib/shell32/shlview.c --- trunk/reactos/lib/shell32/shlview.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/shlview.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -1380,7 +1380,6 @@
} return TRUE; } - break;
case LVN_ENDLABELEDITA: { @@ -1411,7 +1410,6 @@ } return FALSE; } - break;
case LVN_KEYDOWN: { @@ -1822,7 +1820,7 @@ { ZeroMemory(&wc, sizeof(wc)); wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpfnWndProc = (WNDPROC) ShellView_WndProc; + wc.lpfnWndProc = ShellView_WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = shell32_hInstance; _____
Modified: trunk/reactos/lib/shell32/systray.c --- trunk/reactos/lib/shell32/systray.c 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/systray.c 2005-01-12 22:49:57 UTC (rev 12998) @@ -162,7 +162,7 @@
WNDCLASSA wc;
wc.style = CS_SAVEBITS|CS_DBLCLKS; - wc.lpfnWndProc = (WNDPROC)SYSTRAY_WndProc; + wc.lpfnWndProc = SYSTRAY_WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = 0; _____
Modified: trunk/reactos/lib/shell32/undocshell.h --- trunk/reactos/lib/shell32/undocshell.h 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/undocshell.h 2005-01-12 22:49:57 UTC (rev 12998) @@ -559,7 +559,7 @@
LPDWORD lpdwUsage, REFIID riidObject);
-void WINAPI SHFreeUnusedLibraries(); +void WINAPI SHFreeUnusedLibraries(void);
/* SHCreateLinks flags */ #define SHCLF_PREFIXNAME 0x01 _____
Modified: trunk/reactos/lib/shell32/version.h --- trunk/reactos/lib/shell32/version.h 2005-01-12 21:02:21 UTC (rev 12997) +++ trunk/reactos/lib/shell32/version.h 2005-01-12 22:49:57 UTC (rev 12998) @@ -18,11 +18,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#define WINE_FILEVERSION_MAJOR 6 +#define WINE_FILEVERSION_MAJOR 5 #define WINE_FILEVERSION_MINOR 0 -#define WINE_FILEVERSION_BUILD 2600 -#define WINE_FILEVERSION_PLATFORMID 1 +#define WINE_FILEVERSION_BUILD 3900 +#define WINE_FILEVERSION_PLATFORMID 6975
/* FIXME: when libs/wpp gets fixed to support concatenation we can remove * this and define it in version.rc */ -#define WINE_FILEVERSION "6.0.2600.1" +#define WINE_FILEVERSION "5.0.3900.6975"