merged back commited WINE patches

svn path=/trunk/; revision=7853
This commit is contained in:
Martin Fuchs 2004-01-23 21:44:15 +00:00
parent 049035cfea
commit 138cbd27ed
5 changed files with 31 additions and 19 deletions

View file

@ -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)
{

View file

@ -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);
}
/*************************************************************************

View file

@ -28,6 +28,8 @@
#include <stdarg.h>
#include <stdio.h>
#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;
}

View file

@ -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;

View file

@ -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);