Commit f6baf976 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

shell32: Use FAILED instead of !SUCCEEDED.

parent 443bfc99
...@@ -140,7 +140,7 @@ HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVO ...@@ -140,7 +140,7 @@ HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVO
lpac->txtbackup = NULL; lpac->txtbackup = NULL;
lpac->quickComplete = NULL; lpac->quickComplete = NULL;
if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (lpac), riid, ppv))) { if (FAILED (IUnknown_QueryInterface (_IUnknown_ (lpac), riid, ppv))) {
IUnknown_Release (_IUnknown_ (lpac)); IUnknown_Release (_IUnknown_ (lpac));
return E_NOINTERFACE; return E_NOINTERFACE;
} }
...@@ -262,7 +262,7 @@ static HRESULT WINAPI IAutoComplete2_fnInit( ...@@ -262,7 +262,7 @@ static HRESULT WINAPI IAutoComplete2_fnInit(
This->hwndEdit = hwndEdit; 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"); TRACE("No IEnumString interface\n");
return E_NOINTERFACE; return E_NOINTERFACE;
} }
......
...@@ -225,15 +225,15 @@ static void InitializeTreeView( browse_info *info ) ...@@ -225,15 +225,15 @@ static void InitializeTreeView( browse_info *info )
} else { } else {
IShellFolder *lpsfDesktop; IShellFolder *lpsfDesktop;
hr = SHGetDesktopFolder(&lpsfDesktop); hr = SHGetDesktopFolder(&lpsfDesktop);
if (!SUCCEEDED(hr)) { if (FAILED(hr)) {
WARN("SHGetDesktopFolder failed! hr = %08x\n", hr); WARN("SHGetDesktopFolder failed! hr = %08x\n", hr);
return; return;
} }
hr = IShellFolder_BindToObject(lpsfDesktop, pidlParent, 0, &IID_IShellFolder, (LPVOID*)&lpsfParent); hr = IShellFolder_BindToObject(lpsfDesktop, pidlParent, 0, &IID_IShellFolder, (LPVOID*)&lpsfParent);
IShellFolder_Release(lpsfDesktop); IShellFolder_Release(lpsfDesktop);
} }
if (!SUCCEEDED(hr)) { if (FAILED(hr)) {
WARN("Could not bind to parent shell folder! hr = %08x\n", hr); WARN("Could not bind to parent shell folder! hr = %08x\n", hr);
return; return;
} }
...@@ -244,8 +244,8 @@ static void InitializeTreeView( browse_info *info ) ...@@ -244,8 +244,8 @@ static void InitializeTreeView( browse_info *info )
lpsfRoot = lpsfParent; lpsfRoot = lpsfParent;
hr = IShellFolder_AddRef(lpsfParent); hr = IShellFolder_AddRef(lpsfParent);
} }
if (!SUCCEEDED(hr)) { if (FAILED(hr)) {
WARN("Could not bind to root shell folder! hr = %08x\n", hr); WARN("Could not bind to root shell folder! hr = %08x\n", hr);
IShellFolder_Release(lpsfParent); IShellFolder_Release(lpsfParent);
return; return;
...@@ -253,7 +253,7 @@ static void InitializeTreeView( browse_info *info ) ...@@ -253,7 +253,7 @@ static void InitializeTreeView( browse_info *info )
flags = BrowseFlagsToSHCONTF( info->lpBrowseInfo->ulFlags ); flags = BrowseFlagsToSHCONTF( info->lpBrowseInfo->ulFlags );
hr = IShellFolder_EnumObjects( lpsfRoot, info->hWnd, flags, &pEnumChildren ); hr = IShellFolder_EnumObjects( lpsfRoot, info->hWnd, flags, &pEnumChildren );
if (!SUCCEEDED(hr)) { if (FAILED(hr)) {
WARN("Could not get child iterator! hr = %08x\n", hr); WARN("Could not get child iterator! hr = %08x\n", hr);
IShellFolder_Release(lpsfParent); IShellFolder_Release(lpsfParent);
IShellFolder_Release(lpsfRoot); IShellFolder_Release(lpsfRoot);
......
...@@ -143,7 +143,7 @@ HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOI ...@@ -143,7 +143,7 @@ HRESULT WINAPI IControlPanel_Constructor(IUnknown* pUnkOuter, REFIID riid, LPVOI
sf->pidlRoot = _ILCreateControlPanel(); /* my qualified pidl */ sf->pidlRoot = _ILCreateControlPanel(); /* my qualified pidl */
sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); 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)); IUnknown_Release(_IUnknown_(sf));
return E_NOINTERFACE; return E_NOINTERFACE;
} }
......
...@@ -77,7 +77,7 @@ HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, ...@@ -77,7 +77,7 @@ HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid,
dth->ref = 0; dth->ref = 0;
dth->lpVtbl = &vt_IDropTargetHelper; dth->lpVtbl = &vt_IDropTargetHelper;
if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (dth), riid, ppv))) { if (FAILED (IUnknown_QueryInterface (_IUnknown_ (dth), riid, ppv))) {
IUnknown_Release (_IUnknown_ (dth)); IUnknown_Release (_IUnknown_ (dth));
return E_NOINTERFACE; return E_NOINTERFACE;
} }
......
...@@ -1016,7 +1016,7 @@ static HRESULT WINAPI _ILParsePathW(LPCWSTR path, LPWIN32_FIND_DATAW lpFindFile, ...@@ -1016,7 +1016,7 @@ static HRESULT WINAPI _ILParsePathW(LPCWSTR path, LPWIN32_FIND_DATAW lpFindFile,
IShellFolder_Release(pSF); IShellFolder_Release(pSF);
if (!SUCCEEDED(ret) && ppidl) if (FAILED(ret) && ppidl)
*ppidl = NULL; *ppidl = NULL;
TRACE("%s %p 0x%x\n", debugstr_w(path), ppidl ? *ppidl : NULL, prgfInOut ? *prgfInOut : 0); TRACE("%s %p 0x%x\n", debugstr_w(path), ppidl ? *ppidl : NULL, prgfInOut ? *prgfInOut : 0);
...@@ -1461,7 +1461,7 @@ LPITEMIDLIST _ILCreateGuidFromStrA(LPCSTR szGUID) ...@@ -1461,7 +1461,7 @@ LPITEMIDLIST _ILCreateGuidFromStrA(LPCSTR szGUID)
{ {
IID iid; IID iid;
if (!SUCCEEDED(SHCLSIDFromStringA(szGUID, &iid))) if (FAILED(SHCLSIDFromStringA(szGUID, &iid)))
{ {
ERR("%s is not a GUID\n", szGUID); ERR("%s is not a GUID\n", szGUID);
return NULL; return NULL;
...@@ -1473,7 +1473,7 @@ LPITEMIDLIST _ILCreateGuidFromStrW(LPCWSTR szGUID) ...@@ -1473,7 +1473,7 @@ LPITEMIDLIST _ILCreateGuidFromStrW(LPCWSTR szGUID)
{ {
IID iid; IID iid;
if (!SUCCEEDED(SHCLSIDFromStringW(szGUID, &iid))) if (FAILED(SHCLSIDFromStringW(szGUID, &iid)))
{ {
ERR("%s is not a GUID\n", debugstr_w(szGUID)); ERR("%s is not a GUID\n", debugstr_w(szGUID));
return NULL; return NULL;
......
...@@ -181,7 +181,7 @@ HRESULT WINAPI SHCoCreateInstance( ...@@ -181,7 +181,7 @@ HRESULT WINAPI SHCoCreateInstance(
FreeLibrary( hLibrary ); FreeLibrary( hLibrary );
hres = E_ACCESSDENIED; hres = E_ACCESSDENIED;
goto end; 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); TRACE("GetClassObject failed 0x%08x\n", hres);
goto end; goto end;
} }
......
...@@ -248,7 +248,7 @@ IFSFolder_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) ...@@ -248,7 +248,7 @@ IFSFolder_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
sf->pclsid = (CLSID *) & CLSID_ShellFSFolder; sf->pclsid = (CLSID *) & CLSID_ShellFSFolder;
sf->pUnkOuter = pUnkOuter ? pUnkOuter : _IUnknown_ (sf); 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)); IUnknown_Release (_IUnknown_ (sf));
return E_NOINTERFACE; return E_NOINTERFACE;
} }
......
...@@ -119,7 +119,7 @@ HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LP ...@@ -119,7 +119,7 @@ HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LP
sf->lpVtblPersistFolder2 = &vt_PersistFolder2; sf->lpVtblPersistFolder2 = &vt_PersistFolder2;
sf->pidlRoot = _ILCreateMyComputer (); /* my qualified pidl */ 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)); IUnknown_Release (_IUnknown_ (sf));
return E_NOINTERFACE; return E_NOINTERFACE;
......
...@@ -103,7 +103,7 @@ HRESULT WINAPI ISF_NetworkPlaces_Constructor (IUnknown * pUnkOuter, REFIID riid, ...@@ -103,7 +103,7 @@ HRESULT WINAPI ISF_NetworkPlaces_Constructor (IUnknown * pUnkOuter, REFIID riid,
sf->lpVtblPersistFolder2 = &vt_NP_PersistFolder2; sf->lpVtblPersistFolder2 = &vt_NP_PersistFolder2;
sf->pidlRoot = _ILCreateNetHood(); /* my qualified pidl */ 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)); IUnknown_Release (_IUnknown_ (sf));
return E_NOINTERFACE; return E_NOINTERFACE;
......
...@@ -949,7 +949,7 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_BindToObject(IShellFolder2* iface ...@@ -949,7 +949,7 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_BindToObject(IShellFolder2* iface
} }
hr = CreateUnixFolder(NULL, &IID_IPersistFolder3, (void**)&persistFolder, clsidChild); hr = CreateUnixFolder(NULL, &IID_IPersistFolder3, (void**)&persistFolder, clsidChild);
if (!SUCCEEDED(hr)) return hr; if (FAILED(hr)) return hr;
hr = IPersistFolder_QueryInterface(persistFolder, riid, ppvOut); hr = IPersistFolder_QueryInterface(persistFolder, riid, ppvOut);
if (SUCCEEDED(hr)) { if (SUCCEEDED(hr)) {
...@@ -1170,8 +1170,8 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetDisplayNameOf(IShellFolder2* i ...@@ -1170,8 +1170,8 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_GetDisplayNameOf(IShellFolder2* i
SHITEMID emptyIDL = { 0, { 0 } }; SHITEMID emptyIDL = { 0, { 0 } };
hr = IShellFolder_BindToObject(iface, pidl, NULL, &IID_IShellFolder, (void**)&pSubFolder); 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); hr = IShellFolder_GetDisplayNameOf(pSubFolder, (LPITEMIDLIST)&emptyIDL, uFlags, lpName);
IShellFolder_Release(pSubFolder); IShellFolder_Release(pSubFolder);
} }
...@@ -2081,7 +2081,7 @@ static HRESULT WINAPI UnixFolder_IDropTarget_Drop(IDropTarget *iface, IDataObjec ...@@ -2081,7 +2081,7 @@ static HRESULT WINAPI UnixFolder_IDropTarget_Drop(IDropTarget *iface, IDataObjec
InitFormatEtc(format, cfShellIDList, TYMED_HGLOBAL); InitFormatEtc(format, cfShellIDList, TYMED_HGLOBAL);
hr = IDataObject_GetData(pDataObject, &format, &medium); hr = IDataObject_GetData(pDataObject, &format, &medium);
if (!SUCCEEDED(hr)) if (FAILED(hr))
return hr; return hr;
if (medium.tymed == TYMED_HGLOBAL) { if (medium.tymed == TYMED_HGLOBAL) {
......
...@@ -384,7 +384,7 @@ static BOOL ShellView_InitList(IShellViewImpl * This) ...@@ -384,7 +384,7 @@ static BOOL ShellView_InitList(IShellViewImpl * This)
{ {
for (i=0; 1; i++) for (i=0; 1; i++)
{ {
if (!SUCCEEDED(IShellFolder2_GetDetailsOf(This->pSF2Parent, NULL, i, &sd))) if (FAILED(IShellFolder2_GetDetailsOf(This->pSF2Parent, NULL, i, &sd)))
break; break;
lvColumn.fmt = sd.fmt; lvColumn.fmt = sd.fmt;
lvColumn.cx = sd.cxChar*8; /* chars->pixel */ lvColumn.cx = sd.cxChar*8; /* chars->pixel */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment