shell32: Use FAILED instead of !SUCCEEDED.

This commit is contained in:
Michael Stefaniuc 2008-10-08 01:32:38 +02:00 committed by Alexandre Julliard
parent 443bfc99ad
commit f6baf97629
11 changed files with 22 additions and 22 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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) {

View File

@ -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 */