*Handle cidl==0 in shfldr_desktop, shfldr_fs and shfldr_mycomp.
*Remove the dwAttributes member from the IGenericSFImpl class, it's not needed and can't be initialised in Initialize and InitializeEx.
This commit is contained in:
parent
3594e45ab6
commit
ea18de5f58
@ -69,8 +69,6 @@ typedef struct {
|
|||||||
LPWSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */
|
LPWSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */
|
||||||
LPITEMIDLIST pidlRoot; /* absolute pidl */
|
LPITEMIDLIST pidlRoot; /* absolute pidl */
|
||||||
|
|
||||||
int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */
|
|
||||||
|
|
||||||
UINT cfShellIDList; /* clipboardformat for IDropTarget */
|
UINT cfShellIDList; /* clipboardformat for IDropTarget */
|
||||||
BOOL fAcceptFmt; /* flag for pending Drop */
|
BOOL fAcceptFmt; /* flag for pending Drop */
|
||||||
} IGenericSFImpl;
|
} IGenericSFImpl;
|
||||||
@ -440,13 +438,21 @@ static HRESULT WINAPI ISF_Desktop_fnGetAttributesOf (IShellFolder2 * iface,
|
|||||||
|
|
||||||
if (*rgfInOut == 0)
|
if (*rgfInOut == 0)
|
||||||
*rgfInOut = ~0;
|
*rgfInOut = ~0;
|
||||||
|
|
||||||
|
if(cidl == 0) {
|
||||||
|
IShellFolder *psfParent = NULL;
|
||||||
|
LPCITEMIDLIST rpidl = NULL;
|
||||||
|
|
||||||
while (cidl > 0 && *apidl)
|
hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl);
|
||||||
{
|
if(SUCCEEDED(hr))
|
||||||
pdump (*apidl);
|
SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut);
|
||||||
SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut);
|
} else {
|
||||||
apidl++;
|
while (cidl > 0 && *apidl) {
|
||||||
cidl--;
|
pdump (*apidl);
|
||||||
|
SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut);
|
||||||
|
apidl++;
|
||||||
|
cidl--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
|
/* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
|
||||||
*rgfInOut &= ~SFGAO_VALIDATE;
|
*rgfInOut &= ~SFGAO_VALIDATE;
|
||||||
|
@ -76,8 +76,6 @@ typedef struct {
|
|||||||
|
|
||||||
LPITEMIDLIST pidlRoot; /* absolute pidl */
|
LPITEMIDLIST pidlRoot; /* absolute pidl */
|
||||||
|
|
||||||
int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */
|
|
||||||
|
|
||||||
UINT cfShellIDList; /* clipboardformat for IDropTarget */
|
UINT cfShellIDList; /* clipboardformat for IDropTarget */
|
||||||
BOOL fAcceptFmt; /* flag for pending Drop */
|
BOOL fAcceptFmt; /* flag for pending Drop */
|
||||||
} IGenericSFImpl;
|
} IGenericSFImpl;
|
||||||
@ -587,11 +585,21 @@ IShellFolder_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl,
|
|||||||
if (*rgfInOut == 0)
|
if (*rgfInOut == 0)
|
||||||
*rgfInOut = ~0;
|
*rgfInOut = ~0;
|
||||||
|
|
||||||
while (cidl > 0 && *apidl) {
|
if(cidl == 0){
|
||||||
pdump (*apidl);
|
IShellFolder *psfParent = NULL;
|
||||||
SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut);
|
LPCITEMIDLIST rpidl = NULL;
|
||||||
apidl++;
|
|
||||||
cidl--;
|
hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl);
|
||||||
|
if(SUCCEEDED(hr))
|
||||||
|
SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
while (cidl > 0 && *apidl) {
|
||||||
|
pdump (*apidl);
|
||||||
|
SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut);
|
||||||
|
apidl++;
|
||||||
|
cidl--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
|
/* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
|
||||||
*rgfInOut &= ~SFGAO_VALIDATE;
|
*rgfInOut &= ~SFGAO_VALIDATE;
|
||||||
|
@ -61,7 +61,6 @@ typedef struct {
|
|||||||
|
|
||||||
/* both paths are parsible from the desktop */
|
/* both paths are parsible from the desktop */
|
||||||
LPITEMIDLIST pidlRoot; /* absolute pidl */
|
LPITEMIDLIST pidlRoot; /* absolute pidl */
|
||||||
int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */
|
|
||||||
} IGenericSFImpl;
|
} IGenericSFImpl;
|
||||||
|
|
||||||
static struct IShellFolder2Vtbl vt_ShellFolder2;
|
static struct IShellFolder2Vtbl vt_ShellFolder2;
|
||||||
@ -438,13 +437,21 @@ static HRESULT WINAPI ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface,
|
|||||||
|
|
||||||
if (*rgfInOut == 0)
|
if (*rgfInOut == 0)
|
||||||
*rgfInOut = ~0;
|
*rgfInOut = ~0;
|
||||||
|
|
||||||
|
if(cidl == 0){
|
||||||
|
IShellFolder *psfParent = NULL;
|
||||||
|
LPCITEMIDLIST rpidl = NULL;
|
||||||
|
|
||||||
while (cidl > 0 && *apidl)
|
hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&rpidl);
|
||||||
{
|
if(SUCCEEDED(hr))
|
||||||
pdump (*apidl);
|
SHELL32_GetItemAttributes (psfParent, rpidl, rgfInOut);
|
||||||
SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut);
|
} else {
|
||||||
apidl++;
|
while (cidl > 0 && *apidl) {
|
||||||
cidl--;
|
pdump (*apidl);
|
||||||
|
SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut);
|
||||||
|
apidl++;
|
||||||
|
cidl--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
|
/* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
|
||||||
*rgfInOut &= ~SFGAO_VALIDATE;
|
*rgfInOut &= ~SFGAO_VALIDATE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user