correct IShellFolder::GetAttributesOf() for the case *dwAttributes=0
authorMartin Fuchs <fuchs.martin@gmail.com>
Sun, 11 Apr 2004 13:24:29 +0000 (13:24 +0000)
committerMartin Fuchs <fuchs.martin@gmail.com>
Sun, 11 Apr 2004 13:24:29 +0000 (13:24 +0000)
svn path=/trunk/; revision=9081

reactos/lib/shell32/cpanelfolder.c
reactos/lib/shell32/shfldr_desktop.c
reactos/lib/shell32/shfldr_fs.c
reactos/lib/shell32/shfldr_mycomp.c

index 99a3674..334c2da 100644 (file)
@@ -556,6 +556,9 @@ ISF_ControlPanel_fnGetAttributesOf(IShellFolder2 * iface, UINT cidl, LPCITEMIDLI
     if ((!cidl) ||(!apidl) ||(!rgfInOut))
        return E_INVALIDARG;
 
+    if (*rgfInOut == 0)
+       *rgfInOut = ~0;
+
     while(cidl > 0 && *apidl) {
        pdump(*apidl);
        SHELL32_GetItemAttributes(_IShellFolder_(This), *apidl, rgfInOut);
index 4559912..21cbee1 100644 (file)
@@ -425,6 +425,9 @@ static HRESULT WINAPI ISF_Desktop_fnGetAttributesOf (IShellFolder2 * iface,
     if ((!cidl) || (!apidl) || (!rgfInOut))
        return E_INVALIDARG;
 
+    if (*rgfInOut == 0)
+       *rgfInOut = ~0;
+
     while (cidl > 0 && *apidl) {
        pdump (*apidl);
        SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut);
index 451df21..a383258 100644 (file)
@@ -509,6 +509,9 @@ IShellFolder_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST
     if ((!cidl) || (!apidl) || (!rgfInOut))
        return E_INVALIDARG;
 
+    if (*rgfInOut == 0)
+       *rgfInOut = ~0;
+
     while (cidl > 0 && *apidl) {
        pdump (*apidl);
        SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut);
index bc6bf16..a9bb194 100644 (file)
@@ -407,6 +407,9 @@ ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl, LPCITEMIDLIS
     if ((!cidl) || (!apidl) || (!rgfInOut))
        return E_INVALIDARG;
 
+    if (*rgfInOut == 0)
+       *rgfInOut = ~0;
+
     while (cidl > 0 && *apidl) {
        pdump (*apidl);
        SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut);