diff --git a/reactos/lib/shell32/shellole.c b/reactos/lib/shell32/shellole.c index ade449ec821..cc4f7067cfc 100644 --- a/reactos/lib/shell32/shellole.c +++ b/reactos/lib/shell32/shellole.c @@ -283,7 +283,7 @@ DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id) DWORD WINAPI SHCLSIDFromStringW (LPCWSTR clsid, CLSID *id) { TRACE("(%p(%s) %p)\n", clsid, debugstr_w(clsid), id); - return CLSIDFromString(clsid, id); + return CLSIDFromString((LPWSTR)clsid, id); } DWORD WINAPI SHCLSIDFromStringAW (LPVOID clsid, CLSID *id) { diff --git a/reactos/lib/shell32/shellpath.c b/reactos/lib/shell32/shellpath.c index 1b63d82c9b6..a28a35ea87c 100644 --- a/reactos/lib/shell32/shellpath.c +++ b/reactos/lib/shell32/shellpath.c @@ -236,29 +236,41 @@ void WINAPI PathRemoveExtensionAW(LPVOID lpszPath) /************************************************************************* * PathGetShortPathA [internal] */ -LPSTR WINAPI PathGetShortPathA(LPSTR lpszPath) +static void PathGetShortPathA(LPSTR pszPath) { - FIXME("%s stub\n", lpszPath); - return NULL; + CHAR path[MAX_PATH]; + + TRACE("%s\n", pszPath); + + if (GetShortPathNameA(pszPath, path, MAX_PATH)) + { + lstrcpyA(pszPath, path); + } } /************************************************************************* * PathGetShortPathW [internal] */ -LPWSTR WINAPI PathGetShortPathW(LPWSTR lpszPath) +static void PathGetShortPathW(LPWSTR pszPath) { - FIXME("%s stub\n", debugstr_w(lpszPath)); - return NULL; + WCHAR path[MAX_PATH]; + + TRACE("%s\n", debugstr_w(pszPath)); + + if (GetShortPathNameW(pszPath, path, MAX_PATH)) + { + lstrcpyW(pszPath, path); + } } /************************************************************************* * PathGetShortPath [SHELL32.92] */ -LPVOID WINAPI PathGetShortPathAW(LPVOID lpszPath) +VOID WINAPI PathGetShortPathAW(LPVOID pszPath) { if(SHELL_OsIsUnicode()) - return PathGetShortPathW(lpszPath); - return PathGetShortPathA(lpszPath); + PathGetShortPathW(pszPath); + PathGetShortPathA(pszPath); } /************************************************************************* diff --git a/reactos/lib/shell32/shfldr_mycomp.c b/reactos/lib/shell32/shfldr_mycomp.c index 6c24f87b019..61fc25c7ec5 100644 --- a/reactos/lib/shell32/shfldr_mycomp.c +++ b/reactos/lib/shell32/shfldr_mycomp.c @@ -28,6 +28,8 @@ #include #include +#define NONAMELESSUNION +#define NONAMELESSSTRUCT #include "winerror.h" #include "windef.h" #include "winbase.h" @@ -531,7 +533,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 * iface, if (SUCCEEDED (hr)) { strRet->uType = STRRET_CSTR; - lstrcpynA (strRet->cStr, szPath, MAX_PATH); + lstrcpynA (strRet->u.cStr, szPath, MAX_PATH); } TRACE ("-- (%p)->(%s)\n", This, szPath); @@ -612,33 +614,33 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 * iface, LPCI psd->fmt = MyComputerSFHeader[iColumn].fmt; psd->cxChar = MyComputerSFHeader[iColumn].cxChar; psd->str.uType = STRRET_CSTR; - LoadStringA (shell32_hInstance, MyComputerSFHeader[iColumn].colnameid, psd->str.cStr, MAX_PATH); + LoadStringA (shell32_hInstance, MyComputerSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH); return S_OK; } else { char szPath[MAX_PATH]; ULARGE_INTEGER ulBytes; - psd->str.cStr[0] = 0x00; + psd->str.u.cStr[0] = 0x00; psd->str.uType = STRRET_CSTR; switch (iColumn) { case 0: /* name */ hr = IShellFolder_GetDisplayNameOf (iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str); break; case 1: /* type */ - _ILGetFileType (pidl, psd->str.cStr, MAX_PATH); + _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH); break; case 2: /* total size */ if (_ILIsDrive (pidl)) { _ILSimpleGetText (pidl, szPath, MAX_PATH); GetDiskFreeSpaceExA (szPath, NULL, &ulBytes, NULL); - StrFormatByteSizeA (ulBytes.LowPart, psd->str.cStr, MAX_PATH); + StrFormatByteSizeA (ulBytes.u.LowPart, psd->str.u.cStr, MAX_PATH); } break; case 3: /* free size */ if (_ILIsDrive (pidl)) { _ILSimpleGetText (pidl, szPath, MAX_PATH); GetDiskFreeSpaceExA (szPath, &ulBytes, NULL, NULL); - StrFormatByteSizeA (ulBytes.LowPart, psd->str.cStr, MAX_PATH); + StrFormatByteSizeA (ulBytes.u.LowPart, psd->str.u.cStr, MAX_PATH); } break; } diff --git a/reactos/lib/shell32/shlfolder.c b/reactos/lib/shell32/shlfolder.c index 2eb9edcacc7..062e977688e 100644 --- a/reactos/lib/shell32/shlfolder.c +++ b/reactos/lib/shell32/shlfolder.c @@ -398,7 +398,7 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWO char ext[MAX_PATH]; if (!_ILGetExtension(pidl, ext, MAX_PATH) || strcasecmp(ext, "lnk")) - *pdwAttributes &= ~SFGAO_READONLY; + *pdwAttributes &= ~SFGAO_LINK; } } else { *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK; diff --git a/reactos/lib/shell32/undocshell.h b/reactos/lib/shell32/undocshell.h index 120e42bd92e..aa4f36e4f54 100644 --- a/reactos/lib/shell32/undocshell.h +++ b/reactos/lib/shell32/undocshell.h @@ -539,8 +539,6 @@ LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath); BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath); -LPVOID WINAPI PathGetShortPathAW(LPVOID lpszPath); - void WINAPI PathRemoveBlanksAW(LPVOID lpszPath); VOID WINAPI PathQuoteSpacesAW(LPVOID path);