mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 20:36:35 +00:00
[SHELL32][BROWSEUI] -Demote some uselass error prints and promote some others that make sense to have. Avoid a case that would logically hit an error as initialization of the shell browser is still under way,
svn path=/trunk/; revision=75712
This commit is contained in:
parent
7396067b2a
commit
a051cd5754
4 changed files with 22 additions and 23 deletions
|
@ -1379,18 +1379,22 @@ LRESULT CALLBACK CShellBrowser::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam,
|
|||
previousMessage = pThis->m_pCurrentMsg;
|
||||
pThis->m_pCurrentMsg = &msg;
|
||||
|
||||
CComPtr<IMenuBand> menuBand;
|
||||
hResult = pThis->GetMenuBand(IID_PPV_ARG(IMenuBand, &menuBand));
|
||||
if (SUCCEEDED(hResult) && menuBand.p != NULL)
|
||||
/* If the shell browser is initialized, let the menu band preprocess the messages */
|
||||
if (pThis->fCurrentDirectoryPIDL)
|
||||
{
|
||||
hResult = menuBand->TranslateMenuMessage(&msg, &lResult);
|
||||
if (hResult == S_OK)
|
||||
return lResult;
|
||||
uMsg = msg.message;
|
||||
wParam = msg.wParam;
|
||||
lParam = msg.lParam;
|
||||
CComPtr<IMenuBand> menuBand;
|
||||
hResult = pThis->GetMenuBand(IID_PPV_ARG(IMenuBand, &menuBand));
|
||||
if (SUCCEEDED(hResult) && menuBand.p != NULL)
|
||||
{
|
||||
hResult = menuBand->TranslateMenuMessage(&msg, &lResult);
|
||||
if (hResult == S_OK)
|
||||
return lResult;
|
||||
uMsg = msg.message;
|
||||
wParam = msg.wParam;
|
||||
lParam = msg.lParam;
|
||||
}
|
||||
menuBand.Release();
|
||||
}
|
||||
menuBand.Release();
|
||||
|
||||
handled = pThis->ProcessWindowMessage(hWnd, uMsg, wParam, lParam, lResult, 0);
|
||||
ATLASSERT(pThis->m_pCurrentMsg == &msg);
|
||||
|
|
|
@ -400,7 +400,7 @@ HRESULT STDMETHODCALLTYPE CTravelLog::GetTravelEntry(IUnknown *punk, int iOffset
|
|||
HRESULT hResult;
|
||||
|
||||
hResult = FindRelativeEntry(iOffset, &destinationEntry);
|
||||
if (FAILED_UNEXPECTEDLY(hResult))
|
||||
if (FAILED(hResult))
|
||||
return hResult;
|
||||
hResult = destinationEntry->QueryInterface(IID_PPV_ARG(ITravelEntry, ppte));
|
||||
if (FAILED_UNEXPECTEDLY(hResult))
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <wine/debug.h>
|
||||
#include <wine/list.h>
|
||||
#include <process.h>
|
||||
#include <shellutils.h>
|
||||
|
||||
#include "pidl.h"
|
||||
|
||||
|
@ -170,7 +171,7 @@ static void DeleteNode(LPNOTIFICATIONLIST item)
|
|||
queued = InterlockedCompareExchange(&item->wQueuedCount, 0, 0);
|
||||
if (queued != 0)
|
||||
{
|
||||
TRACE("Not freeing, still %d queued events\n", queued);
|
||||
ERR("Not freeing, still %d queued events\n", queued);
|
||||
return;
|
||||
}
|
||||
TRACE("Freeing for real! %p (%d) \n", item, item->cidl);
|
||||
|
@ -276,13 +277,6 @@ SHChangeNotifyRegister(
|
|||
InterlockedIncrement(&item->wQueuedCount);
|
||||
QueueUserAPC( _AddDirectoryProc, m_hThread, (ULONG_PTR) &item->apidl[i] );
|
||||
}
|
||||
else
|
||||
{
|
||||
CHAR buffer[MAX_PATH];
|
||||
if (!SHGetPathFromIDListA( item->apidl[i].pidl, buffer ))
|
||||
strcpy( buffer, "<unknown>" );
|
||||
ERR("_OpenDirectory failed for %s\n", buffer);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -661,16 +655,16 @@ BOOL _OpenDirectory(LPNOTIFYREGISTER item)
|
|||
return TRUE;
|
||||
|
||||
hr = SHGetDesktopFolder(&psfDesktop);
|
||||
if (!SUCCEEDED(hr))
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return FALSE;
|
||||
|
||||
hr = IShellFolder_GetDisplayNameOf(psfDesktop, item->pidl, SHGDN_FORPARSING, &strFile);
|
||||
IShellFolder_Release(psfDesktop);
|
||||
if (!SUCCEEDED(hr))
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return FALSE;
|
||||
|
||||
hr = StrRetToBufW(&strFile, NULL, item->wstrDirectory, _countof(item->wstrDirectory));
|
||||
if (!SUCCEEDED(hr))
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return FALSE;
|
||||
|
||||
TRACE("_OpenDirectory %s\n", debugstr_w(item->wstrDirectory));
|
||||
|
@ -685,6 +679,7 @@ BOOL _OpenDirectory(LPNOTIFYREGISTER item)
|
|||
|
||||
if (item->hDirectory == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
ERR("_OpenDirectory failed for %s\n", debugstr_w(item->wstrDirectory));
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
|
|
|
@ -1245,7 +1245,7 @@ BOOL WINAPI ReadCabinetState(CABINETSTATE *cs, int length)
|
|||
if ( (r != ERROR_SUCCESS) || (cs->cLength < sizeof(*cs)) ||
|
||||
(cs->cLength != length) )
|
||||
{
|
||||
ERR("Initializing shell cabinet settings\n");
|
||||
TRACE("Initializing shell cabinet settings\n");
|
||||
memset(cs, 0, sizeof(*cs));
|
||||
cs->cLength = sizeof(*cs);
|
||||
cs->nVersion = 2;
|
||||
|
|
Loading…
Reference in a new issue