Resolve SHGetPathFromIDListW -> SHGetPathFromIDListA call.
Remove Fixme comment in SHGetPathFromIDList as StrRetToStrN should take care of this. Get rid of some unsigned/signed comparison warnings with default warnings in MSVC.
This commit is contained in:
parent
1b7b31631d
commit
a1b709d32e
@ -912,9 +912,6 @@ HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int n
|
|||||||
* NULL returns FALSE
|
* NULL returns FALSE
|
||||||
* desktop pidl gives path to desktopdirectory back
|
* desktop pidl gives path to desktopdirectory back
|
||||||
* special pidls returning FALSE
|
* special pidls returning FALSE
|
||||||
*
|
|
||||||
* FIXME
|
|
||||||
* fnGetDisplayNameOf can return different types of OLEString
|
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath)
|
BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath)
|
||||||
{
|
{
|
||||||
@ -943,16 +940,27 @@ BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl, LPSTR pszPath)
|
|||||||
* SHGetPathFromIDListW [SHELL32.@]
|
* SHGetPathFromIDListW [SHELL32.@]
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
|
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
|
||||||
{ char sTemp[MAX_PATH];
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
STRRET str;
|
||||||
|
LPSHELLFOLDER shellfolder;
|
||||||
|
|
||||||
TRACE_(shell)("(pidl=%p)\n", pidl);
|
TRACE_(shell)("(pidl=%p,%p)\n", pidl, debugstr_w(pszPath));
|
||||||
|
pdump(pidl);
|
||||||
|
|
||||||
SHGetPathFromIDListA (pidl, sTemp);
|
if (!pidl) return FALSE;
|
||||||
MultiByteToWideChar( CP_ACP, 0, sTemp, -1, pszPath, MAX_PATH );
|
|
||||||
|
|
||||||
TRACE_(shell)("-- (%s)\n",debugstr_w(pszPath));
|
hr = SHGetDesktopFolder(&shellfolder);
|
||||||
|
if (SUCCEEDED(hr)) {
|
||||||
|
hr = IShellFolder_GetDisplayNameOf(shellfolder, pidl, SHGDN_FORPARSING, &str);
|
||||||
|
if (SUCCEEDED(hr)) {
|
||||||
|
StrRetToStrNW(pszPath, MAX_PATH, &str, pidl);
|
||||||
|
}
|
||||||
|
IShellFolder_Release(shellfolder);
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
TRACE_(shell)("-- %s, 0x%08lx\n",debugstr_w(pszPath), hr);
|
||||||
|
return SUCCEEDED(hr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
@ -1745,7 +1753,7 @@ DWORD _ILGetFileAttributes(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
|
|||||||
*/
|
*/
|
||||||
void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl)
|
void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl)
|
||||||
{
|
{
|
||||||
int i;
|
UINT i;
|
||||||
|
|
||||||
if (apidl)
|
if (apidl)
|
||||||
{
|
{
|
||||||
@ -1761,7 +1769,7 @@ void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl)
|
|||||||
*/
|
*/
|
||||||
LPITEMIDLIST * _ILCopyaPidl(LPITEMIDLIST * apidlsrc, UINT cidl)
|
LPITEMIDLIST * _ILCopyaPidl(LPITEMIDLIST * apidlsrc, UINT cidl)
|
||||||
{
|
{
|
||||||
int i;
|
UINT i;
|
||||||
LPITEMIDLIST * apidldest = (LPITEMIDLIST*)SHAlloc(cidl * sizeof(LPITEMIDLIST));
|
LPITEMIDLIST * apidldest = (LPITEMIDLIST*)SHAlloc(cidl * sizeof(LPITEMIDLIST));
|
||||||
if(!apidlsrc) return NULL;
|
if(!apidlsrc) return NULL;
|
||||||
|
|
||||||
@ -1778,7 +1786,7 @@ LPITEMIDLIST * _ILCopyaPidl(LPITEMIDLIST * apidlsrc, UINT cidl)
|
|||||||
*/
|
*/
|
||||||
LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida)
|
LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida)
|
||||||
{
|
{
|
||||||
int i;
|
UINT i;
|
||||||
LPITEMIDLIST * dst = (LPITEMIDLIST*)SHAlloc(cida->cidl * sizeof(LPITEMIDLIST));
|
LPITEMIDLIST * dst = (LPITEMIDLIST*)SHAlloc(cida->cidl * sizeof(LPITEMIDLIST));
|
||||||
|
|
||||||
if(!dst) return NULL;
|
if(!dst) return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user