- mostly cleanup after the renaming
- implemented SHILCreateFromPath
- small changed to SHGetFileInfo
diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c
index fb30ac4..ad3799d 100644
--- a/dlls/shell32/iconcache.c
+++ b/dlls/shell32/iconcache.c
@@ -58,7 +58,7 @@
if ((_lread(hFile,&mz_header,sizeof(mz_header)) != sizeof(mz_header)) || (mz_header.e_magic != IMAGE_DOS_SIGNATURE))
{ if (mz_header.e_cblp == 1) /* .ICO file ? */
{ *retptr = (LPBYTE)-1; /* ICONHEADER.idType, must be 1 */
- return 1;
+ return 1;
}
else
return 0; /* failed */
@@ -98,7 +98,7 @@
*retptr = pTypeInfo;
return IMAGE_OS2_SIGNATURE;
}
- return 0; /* failed */
+ return 0; /* failed */
}
/*************************************************************************
* SHELL_LoadResource
@@ -141,7 +141,7 @@
{ WORD id[3]; /* idReserved, idType, idCount */
LPicoICONDIR lpiID;
int i;
-
+
TRACE(shell,"\n");
_llseek( hFile, 0, SEEK_SET );
if( _lread(hFile,(char*)id,sizeof(id)) != sizeof(id) )
@@ -169,7 +169,7 @@
for( i=0; i < lpiID->idCount; i++ )
{ memcpy((void*)(lpID->idEntries + i),(void*)(lpiID->idEntries + i), sizeof(ICONDIRENTRY) - 2);
lpID->idEntries[i].icon.wResId = i;
- }
+ }
*lplpiID = lpiID;
return handle;
}
@@ -215,7 +215,7 @@
NE_NAMEINFO* pIconStorage = NULL;
NE_NAMEINFO* pIconDir = NULL;
LPicoICONDIR lpiID = NULL;
-
+
if( pData == (BYTE*)-1 )
{ hIcon = ICO_GetIconDirectory(0, hFile, &lpiID); /* check for .ICO file */
if( hIcon )
@@ -252,7 +252,7 @@
hIcon = SHELL_LoadResource( 0, hFile, pIconDir + i, *(WORD*)pData );
RetPtr[i-nIconIndex] = GetIconID16( hIcon, 3 );
GlobalFree16(hIcon);
- }
+ }
for( icon = nIconIndex; icon < nIconIndex + n; icon++ )
{ hIcon = 0;
@@ -336,7 +336,7 @@
{ hRet = iconDirCount;
goto end_3; /* success */
}
-
+
if (nIconIndex >= iconDirCount)
{ WARN(shell,"nIconIndex %d is larger than iconDirCount %d\n",nIconIndex,iconDirCount);
goto end_4; /* failure */
@@ -433,10 +433,11 @@
} SIC_ENTRY, * LPSIC_ENTRY;
/*****************************************************************************
-* SIC_CompareEntrys [called by comctl32.dll]
-* NOTES
-* Callback for DPA_Search
-*/
+ * SIC_CompareEntrys [called by comctl32.dll]
+ *
+ * NOTES
+ * Callback for DPA_Search
+ */
INT CALLBACK SIC_CompareEntrys( LPVOID p1, LPVOID p2, LPARAM lparam)
{ TRACE(shell,"%p %p\n", p1, p2);
@@ -449,10 +450,11 @@
return 0;
}
/*****************************************************************************
-* SIC_IconAppend (internal)
-* NOTES
-* appends a icon pair to the end of the cache
-*/
+ * SIC_IconAppend [internal]
+ *
+ * NOTES
+ * appends a icon pair to the end of the cache
+ */
static INT SIC_IconAppend (LPCSTR sSourceFile, INT dwSourceIndex, HICON hSmallIcon, HICON hBigIcon)
{ LPSIC_ENTRY lpsice;
INT index, index1;
@@ -468,7 +470,7 @@
if ( INVALID_INDEX == index )
{ SHFree(lpsice);
return INVALID_INDEX;
- }
+ }
index = pImageList_AddIcon (ShellSmallIconList, hSmallIcon);
index1= pImageList_AddIcon (ShellBigIconList, hBigIcon);
@@ -482,10 +484,11 @@
}
/****************************************************************************
-* SIC_LoadIcon [internal]
-* NOTES
-* gets small/big icon by number from a file
-*/
+ * SIC_LoadIcon [internal]
+ *
+ * NOTES
+ * gets small/big icon by number from a file
+ */
static INT SIC_LoadIcon (LPCSTR sSourceFile, INT dwSourceIndex)
{ HICON hiconLarge=0;
HICON hiconSmall=0;
@@ -501,11 +504,12 @@
return SIC_IconAppend (sSourceFile, dwSourceIndex, hiconSmall, hiconLarge);
}
/*****************************************************************************
-* SIC_GetIconIndex [internal]
-* NOTES
-* look in the cache for a proper icon. if not available the icon is taken
-* from the file and cached
-*/
+ * SIC_GetIconIndex [internal]
+ *
+ * NOTES
+ * look in the cache for a proper icon. if not available the icon is taken
+ * from the file and cached
+ */
INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex )
{ SIC_ENTRY sice;
INT index = INVALID_INDEX;
@@ -527,10 +531,11 @@
return ((LPSIC_ENTRY)pDPA_GetPtr(hdpa, index))->dwListIndex;
}
/****************************************************************************
-* SIC_LoadIcon [internal]
-* NOTES
-* retrives the specified icon from the iconcache. if not found try's to load the icon
-*/
+ * SIC_LoadIcon [internal]
+ *
+ * NOTES
+ * retrives the specified icon from the iconcache. if not found try's to load the icon
+ */
static HICON SIC_GetIcon (LPCSTR sSourceFile, INT dwSourceIndex, BOOL bSmallIcon )
{ INT index;
@@ -547,11 +552,12 @@
}
/*****************************************************************************
-* SIC_Initialize [internal]
-* NOTES
-* hack to load the resources from the shell32.dll under a different dll name
-* will be removed when the resource-compiler is ready
-*/
+ * SIC_Initialize [internal]
+ *
+ * NOTES
+ * hack to load the resources from the shell32.dll under a different dll name
+ * will be removed when the resource-compiler is ready
+ */
BOOL SIC_Initialize(void)
{ CHAR szShellPath[MAX_PATH];
HGLOBAL hSmRet, hLgRet;
@@ -606,7 +612,7 @@
}
/*************************************************************************
- * Shell_GetImageList [SHELL32.71]
+ * Shell_GetImageList [SHELL32.71]
*
* PARAMETERS
* imglist[1|2] [OUT] pointer which recive imagelist handles
@@ -625,7 +631,7 @@
}
/*************************************************************************
- * SHMapPIDLToSystemImageListIndex [SHELL32.77]
+ * SHMapPIDLToSystemImageListIndex [SHELL32.77]
*
* PARAMETERS
* x pointer to an instance of IShellFolder
@@ -679,7 +685,7 @@
}
/*************************************************************************
- * Shell_GetCachedImageIndex [SHELL32.72]
+ * Shell_GetCachedImageIndex [SHELL32.72]
*
*/
INT WINAPI Shell_GetCachedImageIndexA(LPCSTR szPath, INT nIndex, DWORD z)
@@ -705,20 +711,20 @@
}
/*************************************************************************
-* ExtracticonEx32 [shell32.189]
-*/
+ * ExtracticonExAW [shell32.189]
+ */
HICON WINAPI ExtractIconExAW ( LPCVOID lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons )
{ if (VERSION_OsIsUnicode())
return ExtractIconExW ( lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons);
return ExtractIconExA ( lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons);
}
/*************************************************************************
-* ExtracticonEx32A [shell32.190]
-* RETURNS
-* 0 no icon found
-* 1 file is not valid
-* HICON32 handle of a icon (phiconLarge/Small == NULL)
-*/
+ * ExtracticonExA [shell32.190]
+ * RETURNS
+ * 0 no icon found
+ * 1 file is not valid
+ * HICON handle of a icon (phiconLarge/Small == NULL)
+ */
HICON WINAPI ExtractIconExA ( LPCSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons )
{ HICON ret=0;
@@ -749,8 +755,8 @@
return ret;
}
/*************************************************************************
-* ExtracticonEx32W [shell32.191]
-*/
+ * ExtracticonExW [shell32.191]
+ */
HICON WINAPI ExtractIconExW ( LPCWSTR lpszFile, INT nIconIndex, HICON * phiconLarge, HICON * phiconSmall, UINT nIcons )
{ LPSTR sFile;
DWORD ret;
diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c
index 1e9f593..b0e106f 100644
--- a/dlls/shell32/pidl.c
+++ b/dlls/shell32/pidl.c
@@ -134,6 +134,47 @@
return newpidl;
}
+/*************************************************************************
+ * SHILCreateFromPath [SHELL32.28]
+ *
+ * NOTES
+ * wraper for IShellFolder::ParseDisplayName()
+ */
+HRESULT WINAPI SHILCreateFromPathA (LPSTR path, LPITEMIDLIST * ppidl, DWORD attributes)
+{ LPSHELLFOLDER sf;
+ WCHAR lpszDisplayName[MAX_PATH];
+ DWORD pchEaten;
+ HRESULT ret = E_FAIL;
+
+ TRACE(shell, "%s %p 0x%08lx\n",path,ppidl,attributes);
+
+ LocalToWideChar(lpszDisplayName, path, MAX_PATH);
+
+ if (SUCCEEDED (SHGetDesktopFolder(&sf)))
+ { ret = sf->lpvtbl->fnParseDisplayName(sf,0, NULL,lpszDisplayName,&pchEaten,ppidl,&attributes);
+ sf->lpvtbl->fnRelease(sf);
+ }
+ return ret;
+}
+HRESULT WINAPI SHILCreateFromPathW (LPWSTR path, LPITEMIDLIST * ppidl, DWORD attributes)
+{ LPSHELLFOLDER sf;
+ DWORD pchEaten;
+ HRESULT ret = E_FAIL;
+
+ TRACE(shell, "%s %p 0x%08lx\n",debugstr_w(path),ppidl,attributes);
+
+ if (SUCCEEDED (SHGetDesktopFolder(&sf)))
+ { ret = sf->lpvtbl->fnParseDisplayName(sf,0, NULL, path, &pchEaten, ppidl, &attributes);
+ sf->lpvtbl->fnRelease(sf);
+ }
+ return ret;
+}
+HRESULT WINAPI SHILCreateFromPathAW (LPVOID path, LPITEMIDLIST * ppidl, DWORD attributes)
+{
+ if ( !VERSION_OsIsUnicode())
+ return SHILCreateFromPathW (path, ppidl, attributes);
+ return SHILCreateFromPathA (path, ppidl, attributes);
+}
/*************************************************************************
* SHCloneSpecialIDList [SHELL32.89]
@@ -468,26 +509,28 @@
* ILCreateFromPath [SHELL32.157]
*
*/
-LPITEMIDLIST WINAPI ILCreateFromPath(LPVOID path)
-{ LPSHELLFOLDER shellfolder;
- LPITEMIDLIST pidlnew;
- WCHAR lpszDisplayName[MAX_PATH];
- DWORD pchEaten;
-
- if ( !VERSION_OsIsUnicode())
- { TRACE(pidl,"(path=%s)\n",(LPSTR)path);
- LocalToWideChar(lpszDisplayName, path, MAX_PATH);
- }
- else
- { TRACE(pidl,"(path=L%s)\n",debugstr_w(path));
- lstrcpyW(lpszDisplayName, path);
- }
+LPITEMIDLIST WINAPI ILCreateFromPathA (LPSTR path)
+{ LPITEMIDLIST pidlnew;
- if (SHGetDesktopFolder(&shellfolder)==S_OK)
- { shellfolder->lpvtbl->fnParseDisplayName(shellfolder,0, NULL,lpszDisplayName,&pchEaten,&pidlnew,NULL);
- shellfolder->lpvtbl->fnRelease(shellfolder);
- }
- return pidlnew;
+ TRACE(shell,"%s\n",path);
+ if (SUCCEEDED (SHILCreateFromPathA (path, &pidlnew, 0)))
+ return pidlnew;
+ return FALSE;
+}
+LPITEMIDLIST WINAPI ILCreateFromPathW (LPWSTR path)
+{ LPITEMIDLIST pidlnew;
+
+ TRACE(shell,"%s\n",debugstr_w(path));
+
+ if (SUCCEEDED (SHILCreateFromPathW (path, &pidlnew, 0)))
+ return pidlnew;
+ return FALSE;
+}
+LPITEMIDLIST WINAPI ILCreateFromPathAW (LPVOID path)
+{
+ if ( !VERSION_OsIsUnicode())
+ return ILCreateFromPathW (path);
+ return ILCreateFromPathA (path);
}
/*************************************************************************
* SHSimpleIDListFromPath [SHELL32.162]
@@ -520,11 +563,33 @@
*
*/
HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len)
-{ FIXME(shell,"sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len);
+{ TRACE(shell,"sf=%p pidl=%p 0x%04x %p 0x%04x stub\n",psf,pidl,nFormat,dest,len);
+
+ if (! psf || !dest )
+ return E_INVALIDARG;
+
switch (nFormat)
{ case SHGDFIL_FINDDATA:
+ { WIN32_FIND_DATAA * pfd = dest;
+ STRRET lpName;
+ CHAR pszPath[MAX_PATH];
+ HANDLE handle;
+
+ if ( len < sizeof (WIN32_FIND_DATAA))
+ return E_INVALIDARG;
+
+ psf->lpvtbl->fnAddRef(psf);
+ psf->lpvtbl->fnGetDisplayNameOf( psf, pidl, SHGDN_FORPARSING, &lpName);
+ psf->lpvtbl->fnRelease(psf);
+
+ strcpy(pszPath,lpName.u.cStr);
+ if ((handle = FindFirstFileA ( pszPath, pfd)))
+ FindClose (handle);
+ }
+ break;
case SHGDFIL_NETRESOURCE:
case SHGDFIL_DESCRIPTIONID:
+ FIXME(shell, "SHGDFIL %i stub\n", nFormat);
break;
default:
ERR(shell,"Unknown SHGDFIL %i, please report\n", nFormat);
diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c
index cbf1a13..f8967cc 100644
--- a/dlls/shell32/shell32_main.c
+++ b/dlls/shell32/shell32_main.c
@@ -27,7 +27,7 @@
#include "shlguid.h"
/*************************************************************************
- * CommandLineToArgvW [SHELL32.7]
+ * CommandLineToArgvW [SHELL32.7]
*/
LPWSTR* WINAPI CommandLineToArgvW(LPWSTR cmdline,LPDWORD numargs)
{ LPWSTR *argv,s,t;
@@ -75,7 +75,7 @@
}
/*************************************************************************
- * Control_RunDLL [SHELL32.12]
+ * Control_RunDLL [SHELL32.12]
*
* Wild speculation in the following!
*
@@ -89,10 +89,7 @@
}
/*************************************************************************
- * SHGetFileInfoA [SHELL32.254]
- *
- * FIXME
- *
+ * SHGetFileInfoA [SHELL32.254]
*/
DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
@@ -101,8 +98,8 @@
{ CHAR szTemp[MAX_PATH];
LPPIDLDATA pData;
LPITEMIDLIST pPidlTemp = NULL;
- DWORD ret=0;
-
+ DWORD ret=0, dwfa = dwFileAttributes;
+
TRACE(shell,"(%s,0x%lx,%p,0x%x,0x%x)\n",
path,dwFileAttributes,psfi,sizeofpsfi,flags);
@@ -139,10 +136,15 @@
ret=TRUE;
}
else
- { psfi->dwAttributes=SFGAO_FILESYSTEM;
+ { if (! (flags & SHGFI_USEFILEATTRIBUTES))
+ dwfa = GetFileAttributesA (szTemp);
+
+ psfi->dwAttributes = SFGAO_FILESYSTEM;
+ if (dwfa == FILE_ATTRIBUTE_DIRECTORY)
+ psfi->dwAttributes |= SFGAO_FOLDER | SFGAO_HASSUBFOLDER;
ret=TRUE;
}
- FIXME(shell,"file attributes, stub\n");
+ WARN(shell,"file attributes, semi-stub\n");
}
if (flags & SHGFI_DISPLAYNAME)
@@ -152,57 +154,60 @@
else
{ strcpy(psfi->szDisplayName,path);
}
- TRACE(shell,"displayname=%s\n", psfi->szDisplayName);
+ TRACE(shell,"displayname=%s\n", psfi->szDisplayName);
ret=TRUE;
}
-
+
if (flags & SHGFI_TYPENAME)
- { FIXME(shell,"get the file type, stub\n");
+ { FIXME(shell,"get the file type, stub\n");
strcpy(psfi->szTypeName,"FIXME: Type");
ret=TRUE;
}
-
- if (flags & SHGFI_ICONLOCATION)
- { FIXME(shell,"location of icon, stub\n");
- strcpy(psfi->szDisplayName,"");
- ret=TRUE;
- }
- if (flags & SHGFI_EXETYPE)
- FIXME(shell,"type of executable, stub\n");
+ if (flags & SHGFI_ICONLOCATION)
+ { FIXME(shell,"location of icon, stub\n");
+ strcpy(psfi->szDisplayName,"");
+ ret=TRUE;
+ }
- if (flags & SHGFI_LINKOVERLAY)
- FIXME(shell,"set icon to link, stub\n");
+ if (flags & SHGFI_EXETYPE)
+ FIXME(shell,"type of executable, stub\n");
- if (flags & SHGFI_OPENICON)
- FIXME(shell,"set to open icon, stub\n");
+ if (flags & SHGFI_LINKOVERLAY)
+ FIXME(shell,"set icon to link, stub\n");
- if (flags & SHGFI_SELECTED)
- FIXME(shell,"set icon to selected, stub\n");
+ if (flags & SHGFI_OPENICON)
+ FIXME(shell,"set to open icon, stub\n");
- if (flags & SHGFI_SHELLICONSIZE)
- FIXME(shell,"set icon to shell size, stub\n");
+ if (flags & SHGFI_SELECTED)
+ FIXME(shell,"set icon to selected, stub\n");
- if (flags & SHGFI_USEFILEATTRIBUTES)
- FIXME(shell,"use the dwFileAttributes, stub\n");
-
- if (flags & SHGFI_ICON)
- { FIXME(shell,"icon handle\n");
- if (flags & SHGFI_SMALLICON)
- { TRACE(shell,"set to small icon\n");
- psfi->hIcon=pImageList_GetIcon(ShellSmallIconList,32,ILD_NORMAL);
- ret = (DWORD) ShellSmallIconList;
- }
- else
- { TRACE(shell,"set to big icon\n");
- psfi->hIcon=pImageList_GetIcon(ShellBigIconList,32,ILD_NORMAL);
- ret = (DWORD) ShellBigIconList;
- }
- }
+ if (flags & SHGFI_SHELLICONSIZE)
+ FIXME(shell,"set icon to shell size, stub\n");
+
+ if (flags & SHGFI_USEFILEATTRIBUTES)
+ FIXME(shell,"use the dwFileAttributes, stub\n");
+
+ if (flags & (SHGFI_UNKNOWN1 | SHGFI_UNKNOWN2 | SHGFI_UNKNOWN3))
+ FIXME(shell,"unknown attribute!\n");
+
+ if (flags & SHGFI_ICON)
+ { FIXME(shell,"icon handle\n");
+ if (flags & SHGFI_SMALLICON)
+ { TRACE(shell,"set to small icon\n");
+ psfi->hIcon=pImageList_GetIcon(ShellSmallIconList,32,ILD_NORMAL);
+ ret = (DWORD) ShellSmallIconList;
+ }
+ else
+ { TRACE(shell,"set to big icon\n");
+ psfi->hIcon=pImageList_GetIcon(ShellBigIconList,32,ILD_NORMAL);
+ ret = (DWORD) ShellBigIconList;
+ }
+ }
if (flags & SHGFI_SYSICONINDEX)
{ if (!pPidlTemp)
- { pPidlTemp = ILCreateFromPath (szTemp);
+ { pPidlTemp = ILCreateFromPathA (szTemp);
}
psfi->iIcon = SHMapPIDLToSystemImageListIndex (NULL, pPidlTemp, 0);
TRACE(shell,"-- SYSICONINDEX %i\n", psfi->iIcon);
@@ -217,14 +222,11 @@
}
}
- return ret;
+ return ret;
}
/*************************************************************************
- * SHGetFileInfo32W [SHELL32.255]
- *
- * FIXME
- *
+ * SHGetFileInfoW [SHELL32.255]
*/
DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
@@ -236,7 +238,7 @@
}
/*************************************************************************
- * ExtractIcon32A (SHELL32.133)
+ * ExtractIconA [SHELL32.133]
*/
HICON WINAPI ExtractIconA( HINSTANCE hInstance, LPCSTR lpszExeFileName,
UINT nIconIndex )
@@ -254,7 +256,7 @@
}
/*************************************************************************
- * ExtractIcon32W (SHELL32.180)
+ * ExtractIconW [SHELL32.180]
*/
HICON WINAPI ExtractIconW( HINSTANCE hInstance, LPCWSTR lpszExeFileName,
UINT nIconIndex )
@@ -270,7 +272,7 @@
}
/*************************************************************************
- * FindExecutable32A (SHELL32.184)
+ * FindExecutableA [SHELL32.184]
*/
HINSTANCE WINAPI FindExecutableA( LPCSTR lpFile, LPCSTR lpDirectory,
LPSTR lpResult )
@@ -303,7 +305,7 @@
}
/*************************************************************************
- * FindExecutable32W (SHELL32.219)
+ * FindExecutableW [SHELL32.219]
*/
HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory,
LPWSTR lpResult)
@@ -339,7 +341,7 @@
}
/*************************************************************************
- * SHAppBarMessage32 [SHELL32.207]
+ * SHAppBarMessage32 [SHELL32.207]
*/
UINT WINAPI SHAppBarMessage(DWORD msg, PAPPBARDATA data)
{ FIXME(shell,"(0x%08lx,%p): stub\n", msg, data);
@@ -363,7 +365,7 @@
/*************************************************************************
- * SHGetDesktopFolder [SHELL32.216]
+ * SHGetDesktopFolder [SHELL32.216]
*
* SDK header win95/shlobj.h: This is equivalent to call CoCreateInstance with
* CLSID_ShellDesktop
@@ -406,7 +408,7 @@
}
/*************************************************************************
- * SHGetPathFromIDList [SHELL32.221][NT 4.0: SHELL32.219]
+ * SHGetPathFromIDList [SHELL32.221][NT 4.0: SHELL32.219]
*/
BOOL WINAPI SHGetPathFromIDListAW(LPCITEMIDLIST pidl,LPSTR pszPath)
{ TRACE(shell,"(pidl=%p,%p)\n",pidl,pszPath);
@@ -414,7 +416,8 @@
}
/*************************************************************************
- * SHGetSpecialFolderLocation [SHELL32.223]
+ * SHGetSpecialFolderLocation [SHELL32.223]
+ *
* gets the folder locations from the registry and creates a pidl
* creates missing reg keys and directorys
*
@@ -431,11 +434,11 @@
*
*/
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST * ppidl)
-{ LPSHELLFOLDER shellfolder;
- DWORD pchEaten,tpathlen=MAX_PATH,type,dwdisp,res;
- CHAR pszTemp[256],buffer[256],tpath[MAX_PATH],npath[MAX_PATH];
- LPWSTR lpszDisplayName = (LPWSTR)&pszTemp[0];
- HKEY key;
+{ LPSHELLFOLDER shellfolder;
+ DWORD pchEaten, tpathlen=MAX_PATH, type, dwdisp, res, dwLastError;
+ CHAR pszTemp[256], buffer[256], tpath[MAX_PATH], npath[MAX_PATH];
+ LPWSTR lpszDisplayName = (LPWSTR)&pszTemp[0];
+ HKEY key;
enum
{ FT_UNKNOWN= 0x00000000,
@@ -623,7 +626,9 @@
return E_OUTOFMEMORY;
}
TRACE(shell,"value %s=%s created\n",buffer,npath);
+ dwLastError = GetLastError();
CreateDirectoryA(npath,NULL);
+ SetLastError (dwLastError);
strcpy(tpath,npath);
}
break;
@@ -653,7 +658,7 @@
return NOERROR;
}
/*************************************************************************
- * SHHelpShortcuts_RunDLL [SHELL32.224]
+ * SHHelpShortcuts_RunDLL [SHELL32.224]
*
*/
DWORD WINAPI SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4)
@@ -664,7 +669,7 @@
}
/*************************************************************************
- * SHLoadInProc [SHELL32.225]
+ * SHLoadInProc [SHELL32.225]
*
*/
@@ -674,7 +679,7 @@
}
/*************************************************************************
- * ShellExecute32A (SHELL32.245)
+ * ShellExecuteA [SHELL32.245]
*/
HINSTANCE WINAPI ShellExecuteA( HWND hWnd, LPCSTR lpOperation,
LPCSTR lpFile, LPCSTR lpParameters,
@@ -685,7 +690,7 @@
}
/*************************************************************************
- * ShellExecute32W [SHELL32.294]
+ * ShellExecuteW [SHELL32.294]
* from shellapi.h
* WINSHELLAPI HINSTANCE APIENTRY ShellExecuteW(HWND hwnd, LPCWSTR lpOperation,
* LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);
@@ -704,7 +709,7 @@
}
/*************************************************************************
- * AboutDlgProc32 (not an exported API function)
+ * AboutDlgProc32 (internal)
*/
BOOL WINAPI AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
LPARAM lParam )
@@ -835,7 +840,7 @@
/*************************************************************************
- * ShellAbout32A (SHELL32.243)
+ * ShellAboutA [SHELL32.243]
*/
BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff,
HICON hIcon )
@@ -852,7 +857,7 @@
/*************************************************************************
- * ShellAbout32W (SHELL32.244)
+ * ShellAboutW [SHELL32.244]
*/
BOOL WINAPI ShellAboutW( HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff,
HICON hIcon )
@@ -874,7 +879,7 @@
}
/*************************************************************************
- * Shell_NotifyIcon [SHELL32.296]
+ * Shell_NotifyIcon [SHELL32.296]
* FIXME
* This function is supposed to deal with the systray.
* Any ideas on how this is to be implimented?
@@ -885,7 +890,7 @@
}
/*************************************************************************
- * Shell_NotifyIcon [SHELL32.297]
+ * Shell_NotifyIcon [SHELL32.297]
* FIXME
* This function is supposed to deal with the systray.
* Any ideas on how this is to be implimented?
@@ -903,7 +908,7 @@
}
/*************************************************************************
- * SHGetPathFromIDList32A [SHELL32.261][NT 4.0: SHELL32.220]
+ * SHGetPathFromIDListA [SHELL32.261][NT 4.0: SHELL32.220]
*
* PARAMETERS
* pidl, [IN] pidl
@@ -927,38 +932,37 @@
TRACE(shell,"(pidl=%p,%p)\n",pidl,pszPath);
- if (!pidl)
- { strcpy(buffer,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\");
+ if (!pidl)
+ { strcpy(buffer,"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\");
- if (RegCreateKeyExA(HKEY_CURRENT_USER,buffer,0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&key,&dwdisp))
- { return E_OUTOFMEMORY;
- }
- type=REG_SZ;
- strcpy (buffer,"Desktop"); /*registry name*/
- if ( RegQueryValueExA(key,buffer,NULL,&type,(LPBYTE)tpath,&tpathlen))
- { GetWindowsDirectoryA(tpath,MAX_PATH);
- PathAddBackslashA(tpath);
- strcat (tpath,"Desktop"); /*folder name*/
- RegSetValueExA(key,buffer,0,REG_SZ,(LPBYTE)tpath,tpathlen);
- CreateDirectoryA(tpath,NULL);
- }
- RegCloseKey(key);
- strcpy(pszPath,tpath);
- }
- else
- { if (SHGetDesktopFolder(&shellfolder)==S_OK)
- { shellfolder->lpvtbl->fnGetDisplayNameOf(shellfolder,pidl,SHGDN_FORPARSING,&lpName);
- shellfolder->lpvtbl->fnRelease(shellfolder);
+ if (RegCreateKeyExA(HKEY_CURRENT_USER,buffer,0,NULL,REG_OPTION_NON_VOLATILE,KEY_WRITE,NULL,&key,&dwdisp))
+ { return E_OUTOFMEMORY;
+ }
+ type=REG_SZ;
+ strcpy (buffer,"Desktop"); /*registry name*/
+ if ( RegQueryValueExA(key,buffer,NULL,&type,(LPBYTE)tpath,&tpathlen))
+ { GetWindowsDirectoryA(tpath,MAX_PATH);
+ PathAddBackslashA(tpath);
+ strcat (tpath,"Desktop"); /*folder name*/
+ RegSetValueExA(key,buffer,0,REG_SZ,(LPBYTE)tpath,tpathlen);
+ CreateDirectoryA(tpath,NULL);
+ }
+ RegCloseKey(key);
+ strcpy(pszPath,tpath);
}
- /*WideCharToLocal32(pszPath, lpName.u.pOleStr, MAX_PATH);*/
- strcpy(pszPath,lpName.u.cStr);
- /* fixme free the olestring*/
- }
+ else
+ { if (SHGetDesktopFolder(&shellfolder)==S_OK)
+ { shellfolder->lpvtbl->fnGetDisplayNameOf(shellfolder,pidl,SHGDN_FORPARSING,&lpName);
+ shellfolder->lpvtbl->fnRelease(shellfolder);
+ }
+ strcpy(pszPath,lpName.u.cStr);
+ }
TRACE(shell,"-- (%s)\n",pszPath);
- return NOERROR;
+
+ return TRUE;
}
/*************************************************************************
- * SHGetPathFromIDList32W [SHELL32.262]
+ * SHGetPathFromIDListW [SHELL32.262]
*/
DWORD WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath)
{ char sTemp[MAX_PATH];
@@ -970,7 +974,7 @@
TRACE(shell,"-- (%s)\n",debugstr_w(pszPath));
- return NOERROR;
+ return TRUE;
}
/*************************************************************************
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h
index 7afe0d3..aa0ab21 100644
--- a/dlls/shell32/shell32_main.h
+++ b/dlls/shell32/shell32_main.h
@@ -42,7 +42,14 @@
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST iil1,LPCITEMIDLIST iil2);
LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl);
DWORD WINAPI ILGetSize(LPITEMIDLIST pidl);
-LPITEMIDLIST WINAPI ILCreateFromPath(LPVOID path);
+
+HRESULT WINAPI SHILCreateFromPathA (LPSTR path, LPITEMIDLIST * ppidl, DWORD attributes);
+HRESULT WINAPI SHILCreateFromPathW (LPWSTR path, LPITEMIDLIST * ppidl, DWORD attributes);
+HRESULT WINAPI SHILCreateFromPathAW (LPVOID path, LPITEMIDLIST * ppidl, DWORD attributes);
+
+LPITEMIDLIST WINAPI ILCreateFromPathA(LPSTR path);
+LPITEMIDLIST WINAPI ILCreateFromPathW(LPWSTR path);
+LPITEMIDLIST WINAPI ILCreateFromPathAW(LPVOID path);
DWORD WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList);
HRESULT WINAPI StrRetToStrN (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl);
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index 230a38b..1e3dd3f 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -17,7 +17,8 @@
#include "shell32_main.h"
/*************************************************************************
- * SHChangeNotifyRegister [SHELL32.2]
+ * SHChangeNotifyRegister [SHELL32.2]
+ *
* NOTES
* Idlist is an array of structures and Count specifies how many items in the array
* (usually just one I think).
@@ -35,7 +36,7 @@
return 0;
}
/*************************************************************************
- * SHChangeNotifyDeregister [SHELL32.4]
+ * SHChangeNotifyDeregister [SHELL32.4]
*/
DWORD WINAPI
SHChangeNotifyDeregister(LONG x1)
@@ -43,7 +44,7 @@
return 0;
}
/*************************************************************************
- * NTSHChangeNotifyRegister [SHELL32.640]
+ * NTSHChangeNotifyRegister [SHELL32.640]
* NOTES
* Idlist is an array of structures and Count specifies how many items in the array
* (usually just one I think).
@@ -60,7 +61,7 @@
return 0;
}
/*************************************************************************
- * NTSHChangeNotifyDeregister [SHELL32.641]
+ * NTSHChangeNotifyDeregister [SHELL32.641]
*/
DWORD WINAPI NTSHChangeNotifyDeregister(LONG x1)
{ FIXME(shell,"(0x%08lx):stub.\n",x1);
@@ -68,7 +69,7 @@
}
/*************************************************************************
- * ParseField [SHELL32.58]
+ * ParseField [SHELL32.58]
*
*/
DWORD WINAPI ParseFieldA(LPCSTR src, DWORD field, LPSTR dst, DWORD len)
@@ -95,7 +96,7 @@
}
/*************************************************************************
- * PickIconDlg [SHELL32.62]
+ * PickIconDlg [SHELL32.62]
*
*/
DWORD WINAPI PickIconDlg(DWORD x,DWORD y,DWORD z,DWORD a)
@@ -104,7 +105,7 @@
}
/*************************************************************************
- * GetFileNameFromBrowse [SHELL32.63]
+ * GetFileNameFromBrowse [SHELL32.63]
*
*/
DWORD WINAPI GetFileNameFromBrowse(HWND howner, LPSTR targetbuf, DWORD len, DWORD x, LPCSTR suffix, LPCSTR y, LPCSTR cmd)
@@ -117,7 +118,7 @@
}
/*************************************************************************
- * SHGetSettings [SHELL32.68]
+ * SHGetSettings [SHELL32.68]
*
*/
DWORD WINAPI SHGetSettings(DWORD x,DWORD y,DWORD z)
@@ -126,7 +127,7 @@
}
/*************************************************************************
- * SHShellFolderView_Message [SHELL32.73]
+ * SHShellFolderView_Message [SHELL32.73]
*
* PARAMETERS
* hwndCabinet defines the explorer cabinet window that contains the
@@ -146,34 +147,25 @@
}
/*************************************************************************
- * OleStrToStrN [SHELL32.78]
- *
- * NOTES
- * exported by ordinal
- * FIXME
- * wrong implemented OleStr is NOT wide string !!!! (jsch)
+ * OleStrToStrN [SHELL32.78]
*/
-BOOL WINAPI
-OleStrToStrN (LPSTR lpMulti, INT nMulti, LPCWSTR lpWide, INT nWide) {
- return WideCharToMultiByte (0, 0, lpWide, nWide,
- lpMulti, nMulti, NULL, NULL);
+BOOL WINAPI OleStrToStrN (LPSTR lpMulti, INT nMulti, LPCWSTR lpWide, INT nWide)
+{
+ TRACE(shell,"%s %x %s %x\n", lpMulti, nMulti, debugstr_w(lpWide), nWide);
+ return WideCharToMultiByte (0, 0, lpWide, nWide, lpMulti, nMulti, NULL, NULL);
}
/*************************************************************************
- * StrToOleStrN [SHELL32.79]
- *
- * NOTES
- * exported by ordinal
- * FIXME
- * wrong implemented OleStr is NOT wide string !!!! (jsch)
-*/
-BOOL WINAPI
-StrToOleStrN (LPWSTR lpWide, INT nWide, LPCSTR lpMulti, INT nMulti) {
- return MultiByteToWideChar (0, 0, lpMulti, nMulti, lpWide, nWide);
+ * StrToOleStrN [SHELL32.79]
+ */
+BOOL WINAPI StrToOleStrN (LPWSTR lpWide, INT nWide, LPCSTR lpMulti, INT nMulti)
+{
+ TRACE(shell,"%s %x %s %x\n", debugstr_w(lpWide), nWide, lpMulti, nMulti);
+ return MultiByteToWideChar (0, 0, lpMulti, nMulti, lpWide, nWide);
}
/*************************************************************************
- * RegisterShellHook [SHELL32.181]
+ * RegisterShellHook [SHELL32.181]
*
* PARAMS
* hwnd [I] window handle
@@ -186,7 +178,7 @@
FIXME(shell,"(0x%08x,0x%08lx):stub.\n",hwnd,y);
}
/*************************************************************************
- * ShellMessageBoxW [SHELL32.182]
+ * ShellMessageBoxW [SHELL32.182]
*
* Format and output errormessage.
*
@@ -219,7 +211,7 @@
}
/*************************************************************************
- * ShellMessageBoxA [SHELL32.183]
+ * ShellMessageBoxA [SHELL32.183]
*/
INT __cdecl
ShellMessageBoxA(HMODULE hmod,HWND hwnd,DWORD idText,DWORD idTitle,DWORD uType,LPCVOID arglist)
@@ -244,7 +236,7 @@
}
/*************************************************************************
- * SHRestricted [SHELL32.100]
+ * SHRestricted [SHELL32.100]
*
* walks through policy table, queries <app> key, <type> value, returns
* queried (DWORD) value.
@@ -284,7 +276,7 @@
}
/*************************************************************************
- * SHCreateDirectory [SHELL32.165]
+ * SHCreateDirectory [SHELL32.165]
*
* NOTES
* exported by ordinal
@@ -305,7 +297,7 @@
}
/*************************************************************************
- * SHFree [SHELL32.195]
+ * SHFree [SHELL32.195]
*
* NOTES
* free_ptr() - frees memory using IMalloc
@@ -320,7 +312,7 @@
}
/*************************************************************************
- * SHAlloc [SHELL32.196]
+ * SHAlloc [SHELL32.196]
*
* NOTES
* void *task_alloc(DWORD len), uses SHMalloc allocator
@@ -334,7 +326,7 @@
}
/*************************************************************************
- * OpenRegStream [SHELL32.85]
+ * OpenRegStream [SHELL32.85]
*
* NOTES
* exported by ordinal
@@ -347,7 +339,7 @@
}
/*************************************************************************
- * SHRegisterDragDrop [SHELL32.86]
+ * SHRegisterDragDrop [SHELL32.86]
*
* NOTES
* exported by ordinal
@@ -358,7 +350,7 @@
}
/*************************************************************************
- * SHRevokeDragDrop [SHELL32.87]
+ * SHRevokeDragDrop [SHELL32.87]
*
* NOTES
* exported by ordinal
@@ -369,7 +361,7 @@
}
/*************************************************************************
- * RunFileDlg [SHELL32.61]
+ * RunFileDlg [SHELL32.61]
*
* NOTES
* Original name: RunFileDlg (exported by ordinal)
@@ -384,7 +376,7 @@
}
/*************************************************************************
- * ExitWindowsDialog [SHELL32.60]
+ * ExitWindowsDialog [SHELL32.60]
*
* NOTES
* exported by ordinal
@@ -397,7 +389,7 @@
}
/*************************************************************************
- * ArrangeWindows [SHELL32.184]
+ * ArrangeWindows [SHELL32.184]
*
*/
DWORD WINAPI
@@ -410,7 +402,7 @@
}
/*************************************************************************
- * SHCLSIDFromString [SHELL32.147]
+ * SHCLSIDFromString [SHELL32.147]
*
* NOTES
* exported by ordinal
@@ -426,7 +418,7 @@
/*************************************************************************
- * SignalFileOpen [SHELL32.103]
+ * SignalFileOpen [SHELL32.103]
*
* NOTES
* exported by ordinal
@@ -440,7 +432,7 @@
}
/*************************************************************************
- * SHAddToRecentDocs [SHELL32.234]
+ * SHAddToRecentDocs [SHELL32.234]
*
* PARAMETERS
* uFlags [IN] SHARD_PATH or SHARD_PIDL
@@ -459,7 +451,7 @@
return 0;
}
/*************************************************************************
- * SHFileOperation32 [SHELL32.242]
+ * SHFileOperation [SHELL32.242]
*
*/
DWORD WINAPI SHFileOperationAW(DWORD x)
@@ -469,7 +461,7 @@
}
/*************************************************************************
- * SHFileOperation32A [SHELL32.243]
+ * SHFileOperationA [SHELL32.243]
*
* NOTES
* exported by name
@@ -479,7 +471,7 @@
return 1;
}
/*************************************************************************
- * SHFileOperation32W [SHELL32.244]
+ * SHFileOperationW [SHELL32.244]
*
* NOTES
* exported by name
@@ -490,7 +482,7 @@
}
/*************************************************************************
- * SHChangeNotify [SHELL32.239]
+ * SHChangeNotify [SHELL32.239]
*
* NOTES
* exported by name
@@ -504,7 +496,7 @@
return 0;
}
/*************************************************************************
- * SHCreateShellFolderViewEx [SHELL32.174]
+ * SHCreateShellFolderViewEx [SHELL32.174]
*
* NOTES
* see IShellFolder::CreateViewObject
@@ -516,7 +508,7 @@
return 0;
}
/*************************************************************************
- * SHFind_InitMenuPopup [SHELL32.149]
+ * SHFind_InitMenuPopup [SHELL32.149]
*
* NOTES
* Registers the menu behind the "Start" button
@@ -533,7 +525,7 @@
return 0;
}
/*************************************************************************
- * FileMenu_InitMenuPopup [SHELL32.109]
+ * FileMenu_InitMenuPopup [SHELL32.109]
*
*/
HRESULT WINAPI FileMenu_InitMenuPopup (DWORD hmenu)
@@ -541,7 +533,7 @@
return 0;
}
/*************************************************************************
- * FileMenu_Create [SHELL32.114]
+ * FileMenu_Create [SHELL32.114]
*
* w retval from LoadBitmapA
*
@@ -552,7 +544,7 @@
return 0;
}
/*************************************************************************
- * FileMenu_TrackPopupMenuEx [SHELL32.116]
+ * FileMenu_TrackPopupMenuEx [SHELL32.116]
*
* PARAMETERS
* uFlags [in] according to TrackPopupMenuEx
@@ -567,7 +559,7 @@
return 0;
}
/*************************************************************************
- * SHWinHelp [SHELL32.127]
+ * SHWinHelp [SHELL32.127]
*
*/
HRESULT WINAPI SHWinHelp (DWORD v, DWORD w, DWORD x, DWORD z)
@@ -583,7 +575,7 @@
return 0;
}
/*************************************************************************
- * ShellExecuteEx [SHELL32.291]
+ * ShellExecuteEx [SHELL32.291]
*
*/
BOOL WINAPI ShellExecuteExAW (LPVOID sei)
@@ -592,7 +584,7 @@
return ShellExecuteExA (sei);
}
/*************************************************************************
- * ShellExecuteEx32A [SHELL32.292]
+ * ShellExecuteExA [SHELL32.292]
*
*/
BOOL WINAPI ShellExecuteExA (LPSHELLEXECUTEINFOA sei)
@@ -668,7 +660,7 @@
}
/*************************************************************************
- * ShellExecuteEx32W [SHELL32.293]
+ * ShellExecuteExW [SHELL32.293]
*
*/
BOOL WINAPI ShellExecuteExW (LPSHELLEXECUTEINFOW sei)
@@ -709,7 +701,7 @@
static LPUNKNOWN SHELL32_IExplorerInterface=0;
/*************************************************************************
- * SHSetInstanceExplorer [SHELL32.176]
+ * SHSetInstanceExplorer [SHELL32.176]
*
* NOTES
* Sets the interface
@@ -720,7 +712,7 @@
return (HRESULT) lpUnknown;
}
/*************************************************************************
- * SHGetInstanceExplorer [SHELL32.256]
+ * SHGetInstanceExplorer [SHELL32.256]
*
* NOTES
* gets the interface pointer of the explorer and a reference
@@ -737,7 +729,7 @@
return NOERROR;
}
/*************************************************************************
- * SHFreeUnusedLibraries [SHELL32.123]
+ * SHFreeUnusedLibraries [SHELL32.123]
*
* NOTES
* exported by name
@@ -747,7 +739,7 @@
return TRUE;
}
/*************************************************************************
- * DAD_ShowDragImage [SHELL32.137]
+ * DAD_ShowDragImage [SHELL32.137]
*
* NOTES
* exported by name
@@ -757,7 +749,7 @@
return 0;
}
/*************************************************************************
- * FileMenu_Destroy [SHELL32.118]
+ * FileMenu_Destroy [SHELL32.118]
*
* NOTES
* exported by name
@@ -767,7 +759,7 @@
return 0;
}
/*************************************************************************
- * SHRegCloseKey32 [NT4.0:SHELL32.505]
+ * SHRegCloseKey [NT4.0:SHELL32.505]
*
*/
HRESULT WINAPI SHRegCloseKey (HKEY hkey)
@@ -775,7 +767,7 @@
return RegCloseKey( hkey );
}
/*************************************************************************
- * SHRegOpenKey32A [SHELL32.506]
+ * SHRegOpenKeyA [SHELL32.506]
*
*/
HRESULT WINAPI SHRegOpenKeyA(HKEY hKey, LPSTR lpSubKey, LPHKEY phkResult)
@@ -785,7 +777,7 @@
}
/*************************************************************************
- * SHRegOpenKey32W [NT4.0:SHELL32.507]
+ * SHRegOpenKeyW [NT4.0:SHELL32.507]
*
*/
HRESULT WINAPI SHRegOpenKeyW (HKEY hkey, LPCWSTR lpszSubKey, LPHKEY retkey)
@@ -793,7 +785,7 @@
return RegOpenKeyW( hkey, lpszSubKey, retkey );
}
/*************************************************************************
- * SHRegQueryValueExA [SHELL32.509]
+ * SHRegQueryValueExA [SHELL32.509]
*
*/
HRESULT WINAPI SHRegQueryValueExA(DWORD u, LPSTR v, DWORD w, DWORD x,
@@ -803,7 +795,7 @@
return 0;
}
/*************************************************************************
- * SHRegQueryValue32W [NT4.0:SHELL32.510]
+ * SHRegQueryValueW [NT4.0:SHELL32.510]
*
*/
HRESULT WINAPI SHRegQueryValueW (HKEY hkey, LPWSTR lpszSubKey,
@@ -814,7 +806,7 @@
}
/*************************************************************************
- * SHRegQueryValueEx32W [NT4.0:SHELL32.511]
+ * SHRegQueryValueExW [NT4.0:SHELL32.511]
*
* FIXME
* if the datatype REG_EXPAND_SZ then expand the string and change
@@ -830,7 +822,7 @@
}
/*************************************************************************
- * ReadCabinetState [NT 4.0:SHELL32.651]
+ * ReadCabinetState [NT 4.0:SHELL32.651]
*
*/
HRESULT WINAPI ReadCabinetState(DWORD u, DWORD v)
@@ -838,7 +830,7 @@
return 0;
}
/*************************************************************************
- * WriteCabinetState [NT 4.0:SHELL32.652]
+ * WriteCabinetState [NT 4.0:SHELL32.652]
*
*/
HRESULT WINAPI WriteCabinetState(DWORD u)
@@ -846,7 +838,7 @@
return 0;
}
/*************************************************************************
- * FileIconInit [SHELL32.660]
+ * FileIconInit [SHELL32.660]
*
*/
BOOL WINAPI FileIconInit(BOOL bFullInit)
@@ -854,7 +846,7 @@
return 0;
}
/*************************************************************************
- * IsUserAdmin [NT 4.0:SHELL32.680]
+ * IsUserAdmin [NT 4.0:SHELL32.680]
*
*/
HRESULT WINAPI IsUserAdmin(void)
@@ -862,7 +854,7 @@
return TRUE;
}
/*************************************************************************
- * StrRetToStrN [SHELL32.96]
+ * StrRetToStrN [SHELL32.96]
*
* converts a STRRET to a normal string
*
@@ -905,7 +897,7 @@
}
/*************************************************************************
- * StrChrW [NT 4.0:SHELL32.651]
+ * StrChrW [NT 4.0:SHELL32.651]
*
*/
LPWSTR WINAPI StrChrW (LPWSTR str, WCHAR x )
@@ -922,7 +914,7 @@
}
/*************************************************************************
- * StrCmpNIW [NT 4.0:SHELL32.*]
+ * StrCmpNIW [NT 4.0:SHELL32.*]
*
*/
INT WINAPI StrCmpNIW ( LPWSTR wstr1, LPWSTR wstr2, INT len)
@@ -931,7 +923,7 @@
}
/*************************************************************************
- * SHAllocShared [SHELL32.520]
+ * SHAllocShared [SHELL32.520]
*
* NOTES
* parameter1 is return value from HeapAlloc
@@ -961,7 +953,7 @@
return hmem;
}
/*************************************************************************
- * SHLockShared [SHELL32.521]
+ * SHLockShared [SHELL32.521]
*
* NOTES
* parameter1 is return value from SHAllocShared
@@ -974,7 +966,7 @@
return GlobalLock(hmem);
}
/*************************************************************************
- * SHUnlockShared [SHELL32.522]
+ * SHUnlockShared [SHELL32.522]
*
* NOTES
* parameter1 is return value from SHLockShared
@@ -984,7 +976,7 @@
return GlobalUnlock(pmem);
}
/*************************************************************************
- * SHFreeShared [SHELL32.523]
+ * SHFreeShared [SHELL32.523]
*
* NOTES
* parameter1 is return value from SHAllocShared
@@ -996,7 +988,7 @@
}
/*************************************************************************
- * SetAppStartingCursor32 [SHELL32.99]
+ * SetAppStartingCursor [SHELL32.99]
*
*/
HRESULT WINAPI SetAppStartingCursor(HWND u, DWORD v)
@@ -1004,7 +996,7 @@
return 0;
}
/*************************************************************************
- * SHLoadOLE32 [SHELL32.151]
+ * SHLoadOLE [SHELL32.151]
*
*/
HRESULT WINAPI SHLoadOLE(DWORD u)
@@ -1012,7 +1004,7 @@
return S_OK;
}
/*************************************************************************
- * Shell_MergeMenus32 [SHELL32.67]
+ * Shell_MergeMenus [SHELL32.67]
*
*/
BOOL _SHIsMenuSeparator(HMENU hm, int i)
@@ -1147,11 +1139,10 @@
}
}
}
- return(uIDMax);
-
+ return(uIDMax);
}
/*************************************************************************
- * DriveType32 [SHELL32.64]
+ * DriveType [SHELL32.64]
*
*/
HRESULT WINAPI DriveType(DWORD u)
@@ -1159,7 +1150,7 @@
return 0;
}
/*************************************************************************
- * SHAbortInvokeCommand [SHELL32.198]
+ * SHAbortInvokeCommand [SHELL32.198]
*
*/
HRESULT WINAPI SHAbortInvokeCommand(void)
@@ -1167,7 +1158,7 @@
return 1;
}
/*************************************************************************
- * SHOutOfMemoryMessageBox [SHELL32.126]
+ * SHOutOfMemoryMessageBox [SHELL32.126]
*
*/
HRESULT WINAPI SHOutOfMemoryMessageBox(DWORD u, DWORD v, DWORD w)
@@ -1175,7 +1166,7 @@
return 0;
}
/*************************************************************************
- * SHFlushClipboard [SHELL32.121]
+ * SHFlushClipboard [SHELL32.121]
*
*/
HRESULT WINAPI SHFlushClipboard(void)
@@ -1183,7 +1174,7 @@
return 1;
}
/*************************************************************************
- * StrRChrW [SHELL32.320]
+ * StrRChrW [SHELL32.320]
*
*/
LPWSTR WINAPI StrRChrW(LPWSTR lpStart, LPWSTR lpEnd, DWORD wMatch)
@@ -1205,7 +1196,7 @@
return wptr;
}
/*************************************************************************
-* StrFormatByteSize [SHLWAPI]
+* StrFormatByteSize [SHLWAPI]
*/
LPSTR WINAPI StrFormatByteSizeA ( DWORD dw, LPSTR pszBuf, UINT cchBuf )
{ char buf[64];
@@ -1244,7 +1235,7 @@
return pszBuf;
}
/*************************************************************************
- * SHWaitForFileToOpen [SHELL32.97]
+ * SHWaitForFileToOpen [SHELL32.97]
*
*/
HRESULT WINAPI SHWaitForFileToOpen(DWORD u, DWORD v, DWORD w)
@@ -1252,7 +1243,7 @@
return 0;
}
/*************************************************************************
- * Control_FillCache_RunDLL [SHELL32.8]
+ * Control_FillCache_RunDLL [SHELL32.8]
*
*/
HRESULT WINAPI Control_FillCache_RunDLL(HWND hWnd, HANDLE hModule, DWORD w, DWORD x)
@@ -1260,7 +1251,7 @@
return 0;
}
/*************************************************************************
- * RunDLL_CallEntry16 [SHELL32.122]
+ * RunDLL_CallEntry16 [SHELL32.122]
* the name is propably wrong
*/
HRESULT WINAPI RunDLL_CallEntry16(DWORD v, DWORD w, DWORD x, DWORD y, DWORD z)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index aebb757..d0bba2e 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -496,7 +496,7 @@
return PathMatchSpecA( name, mask );
}
/*************************************************************************
- * PathSetDlgItemPath32AW [SHELL32.48]
+ * PathSetDlgItemPathAW [SHELL32.48]
* NOTES
* use PathCompactPath to make sure, the path fits into the control
*/
@@ -516,7 +516,7 @@
}
/*************************************************************************
- * PathQualify32AW [SHELL32.49]
+ * PathQualifyAW [SHELL32.49]
*/
BOOL WINAPI PathQualifyA(LPCSTR pszPath)
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
index 7c50323..8d1f6d4 100644
--- a/dlls/shell32/shlview.c
+++ b/dlls/shell32/shlview.c
@@ -303,7 +303,7 @@
lvColumn.cx = nColumn1;
strcpy(szString,"File");
- /*LoadString32A(shell32_hInstance, IDS_COLUMN1, szString, sizeof(szString));*/
+ /*LoadStringA(shell32_hInstance, IDS_COLUMN1, szString, sizeof(szString));*/
ListView_InsertColumnA(this->hWndList, 0, &lvColumn);
lvColumn.cx = nColumn2;
@@ -992,7 +992,7 @@
break;
case HDN_ENDTRACKA:
- TRACE(shell,"-- HDN_ENDTRACK32A %p\n",this);
+ TRACE(shell,"-- HDN_ENDTRACKA %p\n",this);
/*nColumn1 = ListView_GetColumnWidth(this->hWndList, 0);
nColumn2 = ListView_GetColumnWidth(this->hWndList, 1);*/
break;
@@ -1015,7 +1015,7 @@
break;
case LVN_GETDISPINFOA:
- TRACE(shell,"-- LVN_GETDISPINFO32A %p\n",this);
+ TRACE(shell,"-- LVN_GETDISPINFOA %p\n",this);
pidl = (LPITEMIDLIST)lpdi->item.lParam;
diff --git a/include/shell.h b/include/shell.h
index 9c802de..a18704e 100644
--- a/include/shell.h
+++ b/include/shell.h
@@ -196,6 +196,15 @@
LPARAM lParam;
} APPBARDATA, *PAPPBARDATA;
+#define SHGFI_LARGEICON 0x000000000 /* get large icon */
+#define SHGFI_SMALLICON 0x000000001 /* get small icon */
+#define SHGFI_OPENICON 0x000000002 /* get open icon */
+#define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
+#define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
+#define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
+#define SHGFI_UNKNOWN1 0x000000020
+#define SHGFI_UNKNOWN2 0x000000040
+#define SHGFI_UNKNOWN3 0x000000080
#define SHGFI_ICON 0x000000100 /* get icon */
#define SHGFI_DISPLAYNAME 0x000000200 /* get display name */
#define SHGFI_TYPENAME 0x000000400 /* get type name */
@@ -205,12 +214,7 @@
#define SHGFI_SYSICONINDEX 0x000004000 /* get system icon index */
#define SHGFI_LINKOVERLAY 0x000008000 /* put a link overlay on icon */
#define SHGFI_SELECTED 0x000010000 /* show icon in selected state */
-#define SHGFI_LARGEICON 0x000000000 /* get large icon */
-#define SHGFI_SMALLICON 0x000000001 /* get small icon */
-#define SHGFI_OPENICON 0x000000002 /* get open icon */
-#define SHGFI_SHELLICONSIZE 0x000000004 /* get shell size icon */
-#define SHGFI_PIDL 0x000000008 /* pszPath is a pidl */
-#define SHGFI_USEFILEATTRIBUTES 0x000000010 /* use passed dwFileAttribute */
+#define SHGFI_ATTR_SPECIFIED 0x000020000 /* get only specified attributes */
/****************************************************************************
* SHChangeNotifyRegister API
diff --git a/relay32/shell32.spec b/relay32/shell32.spec
index fe6931f..d2aa49d 100644
--- a/relay32/shell32.spec
+++ b/relay32/shell32.spec
@@ -33,7 +33,7 @@
25 stdcall ILCombine(ptr ptr) ILCombine
26 stub ILLoadFromStream@8
27 stub ILSaveToStream@8
- 28 stub SHILCreateFromPath@12
+ 28 stdcall SHILCreateFromPath (long long long) SHILCreateFromPathAW
29 stdcall PathIsRoot(ptr) PathIsRootAW
30 stdcall PathBuildRoot(ptr long) PathBuildRootA
31 stdcall PathFindExtension(ptr) PathFindExtensionAW
@@ -162,7 +162,7 @@
154 stdcall ILAppend (long long long) ILAppend
155 stdcall ILFree (ptr) ILFree
156 stdcall ILGlobalFree (ptr) ILGlobalFree
- 157 stdcall ILCreateFromPath (ptr) ILCreateFromPath
+ 157 stdcall ILCreateFromPath (ptr) ILCreateFromPathAW
158 stdcall PathGetExtension(str long long) PathGetExtensionAW
159 stub PathIsDirectory
160 stub SHNetConnectionDialog