diff --git a/dlls/shell32/cpanelfolder.c b/dlls/shell32/cpanelfolder.c index 0b41c079eed..90585686823 100644 --- a/dlls/shell32/cpanelfolder.c +++ b/dlls/shell32/cpanelfolder.c @@ -552,10 +552,13 @@ ISF_ControlPanel_fnGetAttributesOf(IShellFolder2 * iface, UINT cidl, LPCITEMIDLI HRESULT hr = S_OK; - TRACE("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut); + TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08lx))\n", + This, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); - if ((!cidl) ||(!apidl) ||(!rgfInOut)) - return E_INVALIDARG; + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) + return E_INVALIDARG; if (*rgfInOut == 0) *rgfInOut = ~0; @@ -566,6 +569,8 @@ ISF_ControlPanel_fnGetAttributesOf(IShellFolder2 * iface, UINT cidl, LPCITEMIDLI apidl++; cidl--; } + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; TRACE("-- result=0x%08lx\n", *rgfInOut); return hr; diff --git a/dlls/shell32/shfldr_desktop.c b/dlls/shell32/shfldr_desktop.c index c2c200b474f..ffea8f97e14 100644 --- a/dlls/shell32/shfldr_desktop.c +++ b/dlls/shell32/shfldr_desktop.c @@ -430,10 +430,12 @@ static HRESULT WINAPI ISF_Desktop_fnGetAttributesOf (IShellFolder2 * iface, IGenericSFImpl *This = (IGenericSFImpl *)iface; HRESULT hr = S_OK; - TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", - This, cidl, apidl, *rgfInOut); + TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08lx))\n", + This, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); - if (!cidl || !apidl || !rgfInOut) + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) return E_INVALIDARG; if (*rgfInOut == 0) @@ -446,6 +448,8 @@ static HRESULT WINAPI ISF_Desktop_fnGetAttributesOf (IShellFolder2 * iface, apidl++; cidl--; } + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; TRACE ("-- result=0x%08lx\n", *rgfInOut); diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index c1e5ee82114..1403fa8f15b 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -576,10 +576,12 @@ IShellFolder_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl, HRESULT hr = S_OK; - TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, - *rgfInOut); + TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08lx))\n", This, cidl, apidl, + rgfInOut, rgfInOut ? *rgfInOut : 0); - if ((!cidl) || (!apidl) || (!rgfInOut)) + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) return E_INVALIDARG; if (*rgfInOut == 0) @@ -591,6 +593,8 @@ IShellFolder_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl, apidl++; cidl--; } + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; TRACE ("-- result=0x%08lx\n", *rgfInOut); diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c index 0a97a204496..70e8463c70b 100644 --- a/dlls/shell32/shfldr_mycomp.c +++ b/dlls/shell32/shfldr_mycomp.c @@ -428,9 +428,12 @@ static HRESULT WINAPI ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface, IGenericSFImpl *This = (IGenericSFImpl *)iface; HRESULT hr = S_OK; - TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut); + TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08lx))\n", + This, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); - if (!cidl || !apidl || !rgfInOut) + if (!rgfInOut) + return E_INVALIDARG; + if (cidl && !apidl) return E_INVALIDARG; if (*rgfInOut == 0) @@ -443,6 +446,8 @@ static HRESULT WINAPI ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface, apidl++; cidl--; } + /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ + *rgfInOut &= ~SFGAO_VALIDATE; TRACE ("-- result=0x%08lx\n", *rgfInOut); return hr;