shell32: Cast-qual warnings fix.
This commit is contained in:
parent
dcd5e173f8
commit
27a06a5d75
|
@ -634,29 +634,31 @@ DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
|
||||||
UINT flags )
|
UINT flags )
|
||||||
{
|
{
|
||||||
INT len;
|
INT len;
|
||||||
LPWSTR temppath;
|
LPWSTR temppath = NULL;
|
||||||
|
LPCWSTR pathW;
|
||||||
DWORD ret;
|
DWORD ret;
|
||||||
SHFILEINFOW temppsfi;
|
SHFILEINFOW temppsfi;
|
||||||
|
|
||||||
if (flags & SHGFI_PIDL)
|
if (flags & SHGFI_PIDL)
|
||||||
{
|
{
|
||||||
/* path contains a pidl */
|
/* path contains a pidl */
|
||||||
temppath = (LPWSTR) path;
|
pathW = (LPCWSTR)path;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0);
|
len = MultiByteToWideChar(CP_ACP, 0, path, -1, NULL, 0);
|
||||||
temppath = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
|
temppath = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
|
||||||
MultiByteToWideChar(CP_ACP, 0, path, -1, temppath, len);
|
MultiByteToWideChar(CP_ACP, 0, path, -1, temppath, len);
|
||||||
|
pathW = temppath;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (psfi && (flags & SHGFI_ATTR_SPECIFIED))
|
if (psfi && (flags & SHGFI_ATTR_SPECIFIED))
|
||||||
temppsfi.dwAttributes=psfi->dwAttributes;
|
temppsfi.dwAttributes=psfi->dwAttributes;
|
||||||
|
|
||||||
if (psfi == NULL)
|
if (psfi == NULL)
|
||||||
ret = SHGetFileInfoW(temppath, dwFileAttributes, NULL, sizeof(temppsfi), flags);
|
ret = SHGetFileInfoW(pathW, dwFileAttributes, NULL, sizeof(temppsfi), flags);
|
||||||
else
|
else
|
||||||
ret = SHGetFileInfoW(temppath, dwFileAttributes, &temppsfi, sizeof(temppsfi), flags);
|
ret = SHGetFileInfoW(pathW, dwFileAttributes, &temppsfi, sizeof(temppsfi), flags);
|
||||||
|
|
||||||
if (psfi)
|
if (psfi)
|
||||||
{
|
{
|
||||||
|
@ -678,8 +680,7 @@ DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(flags & SHGFI_PIDL))
|
HeapFree(GetProcessHeap(), 0, temppath);
|
||||||
HeapFree(GetProcessHeap(), 0, temppath);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue