diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c index f64dbec3262..c20dec3d4aa 100644 --- a/dlls/shell32/autocomplete.c +++ b/dlls/shell32/autocomplete.c @@ -140,7 +140,7 @@ HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVO lpac->txtbackup = NULL; lpac->quickComplete = NULL; - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (lpac), riid, ppv))) { + if (FAILED (IUnknown_QueryInterface (_IUnknown_ (lpac), riid, ppv))) { IUnknown_Release (_IUnknown_ (lpac)); return E_NOINTERFACE; } @@ -262,7 +262,7 @@ static HRESULT WINAPI IAutoComplete2_fnInit( This->hwndEdit = hwndEdit; - if (!SUCCEEDED (IUnknown_QueryInterface (punkACL, &IID_IEnumString, (LPVOID*)&This->enumstr))) { + if (FAILED (IUnknown_QueryInterface (punkACL, &IID_IEnumString, (LPVOID*)&This->enumstr))) { TRACE("No IEnumString interface\n"); return E_NOINTERFACE; } diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c index 91e8cc35b8e..da72e065296 100644 --- a/dlls/shell32/brsfolder.c +++ b/dlls/shell32/brsfolder.c @@ -225,15 +225,15 @@ static void InitializeTreeView( browse_info *info ) } else { IShellFolder *lpsfDesktop; hr = SHGetDesktopFolder(&lpsfDesktop); - if (!SUCCEEDED(hr)) { + if (FAILED(hr)) { WARN("SHGetDesktopFolder failed! hr = %08x\n", hr); return; } hr = IShellFolder_BindToObject(lpsfDesktop, pidlParent, 0, &IID_IShellFolder, (LPVOID*)&lpsfParent); IShellFolder_Release(lpsfDesktop); } - - if (!SUCCEEDED(hr)) { + + if (FAILED(hr)) { WARN("Could not bind to parent shell folder! hr = %08x\n", hr); return; } @@ -244,8 +244,8 @@ static void InitializeTreeView( browse_info *info ) lpsfRoot = lpsfParent; hr = IShellFolder_AddRef(lpsfParent); } - - if (!SUCCEEDED(hr)) { + + if (FAILED(hr)) { WARN("Could not bind to root shell folder! hr = %08x\n", hr); IShellFolder_Release(lpsfParent); return; @@ -253,7 +253,7 @@ static void InitializeTreeView( browse_info *info ) flags = BrowseFlagsToSHCONTF( info->lpBrowseInfo->ulFlags ); hr = IShellFolder_EnumObjects( lpsfRoot, info->hWnd, flags, &pEnumChildren ); - if (!SUCCEEDED(hr)) { + if (FAILED(hr)) { WARN("Could not get child iterator! hr = %08x\n", hr); IShellFolder_Release(lpsfParent); IShellFolder_Release(lpsfRoot); diff --git a/dlls/shell32/cpanelfolder.c b/dlls/shell32/cpanelfolder.c index 10d2c9d8279..aec19f18aa1 100644 --- a/dlls/shell32/cpanelfolder.c +++ b/dlls/shell32/cpanelfolder.c @@ -143,7 +143,7 @@ HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOI sf->pidlRoot = _ILCreateControlPanel(); /* my qualified pidl */ sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); - if (!SUCCEEDED(IUnknown_QueryInterface(_IUnknown_(sf), riid, ppv))) { + if (FAILED(IUnknown_QueryInterface(_IUnknown_(sf), riid, ppv))) { IUnknown_Release(_IUnknown_(sf)); return E_NOINTERFACE; } diff --git a/dlls/shell32/dragdrophelper.c b/dlls/shell32/dragdrophelper.c index 9c3f236f061..d101457ac79 100644 --- a/dlls/shell32/dragdrophelper.c +++ b/dlls/shell32/dragdrophelper.c @@ -77,7 +77,7 @@ HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, dth->ref = 0; dth->lpVtbl = &vt_IDropTargetHelper; - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (dth), riid, ppv))) { + if (FAILED (IUnknown_QueryInterface (_IUnknown_ (dth), riid, ppv))) { IUnknown_Release (_IUnknown_ (dth)); return E_NOINTERFACE; } diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c index 9a9218e3781..564b10322a1 100644 --- a/dlls/shell32/pidl.c +++ b/dlls/shell32/pidl.c @@ -1016,7 +1016,7 @@ static HRESULT WINAPI _ILParsePathW(LPCWSTR path, LPWIN32_FIND_DATAW lpFindFile, IShellFolder_Release(pSF); - if (!SUCCEEDED(ret) && ppidl) + if (FAILED(ret) && ppidl) *ppidl = NULL; TRACE("%s %p 0x%x\n", debugstr_w(path), ppidl ? *ppidl : NULL, prgfInOut ? *prgfInOut : 0); @@ -1461,7 +1461,7 @@ LPITEMIDLIST _ILCreateGuidFromStrA(LPCSTR szGUID) { IID iid; - if (!SUCCEEDED(SHCLSIDFromStringA(szGUID, &iid))) + if (FAILED(SHCLSIDFromStringA(szGUID, &iid))) { ERR("%s is not a GUID\n", szGUID); return NULL; @@ -1473,7 +1473,7 @@ LPITEMIDLIST _ILCreateGuidFromStrW(LPCWSTR szGUID) { IID iid; - if (!SUCCEEDED(SHCLSIDFromStringW(szGUID, &iid))) + if (FAILED(SHCLSIDFromStringW(szGUID, &iid))) { ERR("%s is not a GUID\n", debugstr_w(szGUID)); return NULL; diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c index bec99965430..a4f191a7407 100644 --- a/dlls/shell32/shellole.c +++ b/dlls/shell32/shellole.c @@ -181,7 +181,7 @@ HRESULT WINAPI SHCoCreateInstance( FreeLibrary( hLibrary ); hres = E_ACCESSDENIED; goto end; - } else if (! SUCCEEDED(hres = DllGetClassObject(myclsid, &IID_IClassFactory, (LPVOID*)&pcf))) { + } else if (FAILED(hres = DllGetClassObject(myclsid, &IID_IClassFactory, (LPVOID*)&pcf))) { TRACE("GetClassObject failed 0x%08x\n", hres); goto end; } diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c index df68feb443d..cc30b1f7c82 100644 --- a/dlls/shell32/shfldr_fs.c +++ b/dlls/shell32/shfldr_fs.c @@ -248,7 +248,7 @@ IFSFolder_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) sf->pclsid = (CLSID *) & CLSID_ShellFSFolder; sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) { + if (FAILED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) { IUnknown_Release (_IUnknown_ (sf)); return E_NOINTERFACE; } diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c index 213b5d49093..c6ff06ec9a1 100644 --- a/dlls/shell32/shfldr_mycomp.c +++ b/dlls/shell32/shfldr_mycomp.c @@ -119,7 +119,7 @@ HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LP sf->lpVtblPersistFolder2 = &vt_PersistFolder2; sf->pidlRoot = _ILCreateMyComputer (); /* my qualified pidl */ - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) + if (FAILED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) { IUnknown_Release (_IUnknown_ (sf)); return E_NOINTERFACE; diff --git a/dlls/shell32/shfldr_netplaces.c b/dlls/shell32/shfldr_netplaces.c index fd6b2358cf5..d0e98335806 100644 --- a/dlls/shell32/shfldr_netplaces.c +++ b/dlls/shell32/shfldr_netplaces.c @@ -103,7 +103,7 @@ HRESULT WINAPI ISF_NetworkPlaces_Constructor (IUnknown * pUnkOuter, REFIID riid, sf->lpVtblPersistFolder2 = &vt_NP_PersistFolder2; sf->pidlRoot = _ILCreateNetHood(); /* my qualified pidl */ - if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) + if (FAILED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) { IUnknown_Release (_IUnknown_ (sf)); return E_NOINTERFACE; diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c index 87975f126f6..66726920d6a 100644 --- a/dlls/shell32/shfldr_unixfs.c +++ b/dlls/shell32/shfldr_unixfs.c @@ -949,7 +949,7 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_BindToObject(IShellFolder2* iface } hr = CreateUnixFolder(NULL, &IID_IPersistFolder3, (void**)&persistFolder, clsidChild); - if (!SUCCEEDED(hr)) return hr; + if (FAILED(hr)) return hr; hr = IPersistFolder_QueryInterface(persistFolder, riid, ppvOut); if (SUCCEEDED(hr)) { @@ -1170,8 +1170,8 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetDisplayNameOf(IShellFolder2* i SHITEMID emptyIDL = { 0, { 0 } }; hr = IShellFolder_BindToObject(iface, pidl, NULL, &IID_IShellFolder, (void**)&pSubFolder); - if (!SUCCEEDED(hr)) return hr; - + if (FAILED(hr)) return hr; + hr = IShellFolder_GetDisplayNameOf(pSubFolder, (LPITEMIDLIST)&emptyIDL, uFlags, lpName); IShellFolder_Release(pSubFolder); } @@ -2081,7 +2081,7 @@ static HRESULT WINAPI UnixFolder_IDropTarget_Drop(IDropTarget *iface, IDataObjec InitFormatEtc(format, cfShellIDList, TYMED_HGLOBAL); hr = IDataObject_GetData(pDataObject, &format, &medium); - if (!SUCCEEDED(hr)) + if (FAILED(hr)) return hr; if (medium.tymed == TYMED_HGLOBAL) { diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c index 832d49787c5..c890e0d5dcb 100644 --- a/dlls/shell32/shlview.c +++ b/dlls/shell32/shlview.c @@ -384,7 +384,7 @@ static BOOL ShellView_InitList(IShellViewImpl * This) { for (i=0; 1; i++) { - if (!SUCCEEDED(IShellFolder2_GetDetailsOf(This->pSF2Parent, NULL, i, &sd))) + if (FAILED(IShellFolder2_GetDetailsOf(This->pSF2Parent, NULL, i, &sd))) break; lvColumn.fmt = sd.fmt; lvColumn.cx = sd.cxChar*8; /* chars->pixel */