* Make use of the wine debug functions and turn DbgPrints into TRACE/WARN/ERR.
[SHELL32]
* Turn some DbgPrints into TRACEs.
svn path=/branches/shell-experiments/; revision=63912
precomp.h)
add_executable(explorer ${SOURCE} explorer.rc)
-target_link_libraries(explorer uuid)
+target_link_libraries(explorer uuid wine)
set_module_type(explorer win32gui UNICODE)
add_importlibs(explorer
advapi32
#include "resource.h"
#include "comcsup.h"
+#include <wine/debug.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(explorernew);
+
/* dynamic imports due to lack of support in msvc linker libs */
typedef INT (APIENTRY *REGSHELLHOOK)(HWND, DWORD);
#ifdef UNICODE
{
IOleCommandTarget * pOct = pItem;
HRESULT * phr = pData;
- DbgPrint("Initializing SSO %p\n", pOct);
+ TRACE("Initializing SSO %p\n", pOct);
*phr = IOleCommandTarget_Exec(pOct, &CGID_ShellServiceObject, OLECMDID_NEW, OLECMDEXECOPT_DODEFAULT, NULL, NULL);
return SUCCEEDED(*phr);
}
static int CALLBACK ShutdownAllCallback(void* pItem, void* pData)
{
IOleCommandTarget * pOct = pItem;
- DbgPrint("Shutting down SSO %p\n", pOct);
+ TRACE("Shutting down SSO %p\n", pOct);
IOleCommandTarget_Exec(pOct, &CGID_ShellServiceObject, OLECMDID_SAVE, OLECMDEXECOPT_DODEFAULT, NULL, NULL);
return TRUE;
}
static int CALLBACK DeleteAllEnumCallback(void* pItem, void* pData)
{
IOleCommandTarget * pOct = pItem;
- DbgPrint("Releasing SSO %p\n", pOct);
+ TRACE("Releasing SSO %p\n", pOct);
IUnknown_Release(pOct);
return TRUE;
}
hdpa = DPA_Create(5);
- DbgPrint("Enumerating Shell Service Ojbect GUIDs...\n");
+ TRACE("Enumerating Shell Service Ojbect GUIDs...\n");
if (RegOpenKey(HKEY_LOCAL_MACHINE,
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ShellServiceObjectDelayLoad",
&hkey))
{
- DbgPrint("ERROR: RegOpenKey failed.\n");
+ ERR("RegOpenKey failed.\n");
return HRESULT_FROM_WIN32(GetLastError());
}
if (type != REG_SZ)
{
- DbgPrint("WARNING: Value type was not REG_SZ.\n");
+ WARN("Value type was not REG_SZ.\n");
continue;
}
hr = CLSIDFromString(value, &clsid);
if (FAILED(hr))
{
- DbgPrint("ERROR: CLSIDFromString failed %08x.\n", hr);
+ ERR("CLSIDFromString failed %08x.\n", hr);
goto cleanup;
}
hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IOleCommandTarget, (VOID**) &pOct);
if (FAILED(hr))
{
- DbgPrint("ERROR: CoCreateInstance failed %08x.\n", hr);
+ ERR("CoCreateInstance failed %08x.\n", hr);
goto cleanup;
}
if (ret != ERROR_NO_MORE_ITEMS)
{
- DbgPrint("ERROR: RegEnumValueW failed %08x.\n", ret);
+ ERR("RegEnumValueW failed %08x.\n", ret);
hr = HRESULT_FROM_WIN32(GetLastError());
goto cleanup;
}
}
else
{
- DbgPrint("IStartMenuSite::QueryInterface queried unsupported interface: "
+ TRACE("IStartMenuSite::QueryInterface queried unsupported interface: "
"{0x%8x,0x%4x,0x%4x,{0x%2x,0x%2x,0x%2x,0x%2x,0x%2x,0x%2x,0x%2x,0x%2x}}\n",
riid->Data1, riid->Data2, riid->Data3, riid->Data4[0], riid->Data4[1],
riid->Data4[2], riid->Data4[3], riid->Data4[4], riid->Data4[5],
OUT HWND *phwnd)
{
IStartMenuSiteImpl *This = IStartMenuSiteImpl_from_ITrayPriv(iface);
- DbgPrint("ITrayPriv::GetWindow\n");
+ TRACE("ITrayPriv::GetWindow\n");
*phwnd = ITrayWindow_GetHWND(This->Tray);
if (*phwnd != NULL)
IStartMenuSiteImpl_ContextSensitiveHelp(IN OUT ITrayPriv *iface,
IN BOOL fEnterMode)
{
- DbgPrint("ITrayPriv::ContextSensitiveHelp\n");
+ TRACE("ITrayPriv::ContextSensitiveHelp\n");
return E_NOTIMPL;
}
IStartMenuSiteImpl *This = IStartMenuSiteImpl_from_ITrayPriv(iface);
- DbgPrint("ITrayPriv::Execute\n");
+ TRACE("ITrayPriv::Execute\n");
hShlwapi = GetModuleHandle(TEXT("SHLWAPI.DLL"));
if (hShlwapi != NULL)
IN PVOID Unknown3,
IN PVOID Unknown4)
{
- DbgPrint("ITrayPriv::Unknown(0x%p,0x%p,0x%p,0x%p)\n", Unknown1, Unknown2, Unknown3, Unknown4);
+ TRACE("ITrayPriv::Unknown(0x%p,0x%p,0x%p,0x%p)\n", Unknown1, Unknown2, Unknown3, Unknown4);
return E_NOTIMPL;
}
static BOOL
ShowUndockMenuItem(VOID)
{
- DbgPrint("ShowUndockMenuItem() not implemented!\n");
+ TRACE("ShowUndockMenuItem() not implemented!\n");
/* FIXME: How do we detect this?! */
return FALSE;
}
static BOOL
ShowSynchronizeMenuItem(VOID)
{
- DbgPrint("ShowSynchronizeMenuItem() not implemented!\n");
+ TRACE("ShowSynchronizeMenuItem() not implemented!\n");
/* FIXME: How do we detect this?! */
return FALSE;
}
UINT uLastItemsCount = 5; /* 5 menu items below the last separator */
TCHAR szUser[128];
- DbgPrint("ITrayPriv::AppendMenu\n");
+ TRACE("ITrayPriv::AppendMenu\n");
hMenu = LoadPopupMenu(hExplorerInstance,
MAKEINTRESOURCE(IDM_STARTMENU));
#endif
if (FAILED(hr))
{
- DbgPrint("CoCreateInstance failed: %x\n", hr);
+ TRACE("CoCreateInstance failed: %x\n", hr);
goto cleanup;
}
(PVOID *)&pOws);
if (FAILED(hr))
{
- DbgPrint("IMenuPopup_QueryInterface failed: %x\n", hr);
+ TRACE("IMenuPopup_QueryInterface failed: %x\n", hr);
goto cleanup;
}
hr = IObjectWithSite_SetSite(pOws, (IUnknown *)pSms);
if (FAILED(hr))
{
- DbgPrint("IObjectWithSite_SetSite failed: %x\n", hr);
+ TRACE("IObjectWithSite_SetSite failed: %x\n", hr);
goto cleanup;
}
/* Everything is initialized now. Let's get the IMenuBand interface. */
if (FAILED(hr))
{
- DbgPrint("IMenuPopup_QueryInterface failed: %x\n", hr);
+ TRACE("IMenuPopup_QueryInterface failed: %x\n", hr);
goto cleanup;
}
hr = IMenuPopup_GetClient(pMp, &pUnk);
if (FAILED(hr))
{
- DbgPrint("IMenuPopup_GetClient failed: %x\n", hr);
+ TRACE("IMenuPopup_GetClient failed: %x\n", hr);
goto cleanup;
}
hr = IUnknown_QueryInterface(pUnk, &IID_IBandSite, (PVOID *)&pBs);
if (FAILED(hr))
{
- DbgPrint("IUnknown_QueryInterface pBs failed: %x\n", hr);
+ TRACE("IUnknown_QueryInterface pBs failed: %x\n", hr);
goto cleanup;
}
hr = IBandSite_EnumBands(pBs, 0, &dwBandId);
if (FAILED(hr))
{
- DbgPrint("IBandSite_EnumBands failed: %x\n", hr);
+ TRACE("IBandSite_EnumBands failed: %x\n", hr);
goto cleanup;
}
hr = IBandSite_GetBandObject(pBs, dwBandId, &IID_IMenuBand, (PVOID *)&pMb);
if (FAILED(hr))
{
- DbgPrint("IBandSite_GetBandObject failed: %x\n", hr);
+ TRACE("IBandSite_GetBandObject failed: %x\n", hr);
goto cleanup;
}
if (!CreateProcessW(NULL, szCmdLineExp, NULL, NULL, FALSE, 0, NULL, dir, &si, &info))
{
- DbgPrint("Failed to run command (%lu)\n", GetLastError());
+ TRACE("Failed to run command (%lu)\n", GetLastError());
return INVALID_RUNCMD_RETURN;
}
- DbgPrint("Successfully ran command\n");
+ TRACE("Successfully ran command\n");
if (wait)
{ /* wait for the process to exit */
WCHAR *szValue = NULL;
if (hkRoot == HKEY_LOCAL_MACHINE)
- DbgPrint("processing %ls entries under HKLM\n", szKeyName);
+ TRACE("processing %ls entries under HKLM\n", szKeyName);
else
- DbgPrint("processing %ls entries under HKCU\n", szKeyName);
+ TRACE("processing %ls entries under HKCU\n", szKeyName);
res = RegOpenKeyExW(hkRoot,
L"Software\\Microsoft\\Windows\\CurrentVersion",
&hkWin);
if (res != ERROR_SUCCESS)
{
- DbgPrint("RegOpenKey failed on Software\\Microsoft\\Windows\\CurrentVersion (%ld)\n", res);
+ TRACE("RegOpenKey failed on Software\\Microsoft\\Windows\\CurrentVersion (%ld)\n", res);
goto end;
}
{
if (res == ERROR_FILE_NOT_FOUND)
{
- DbgPrint("Key doesn't exist - nothing to be done\n");
+ TRACE("Key doesn't exist - nothing to be done\n");
res = ERROR_SUCCESS;
}
else
- DbgPrint("RegOpenKeyEx failed on run key (%ld)\n", res);
+ TRACE("RegOpenKeyEx failed on run key (%ld)\n", res);
goto end;
}
NULL);
if (res != ERROR_SUCCESS)
{
- DbgPrint("Couldn't query key info (%ld)\n", res);
+ TRACE("Couldn't query key info (%ld)\n", res);
goto end;
}
if (i == 0)
{
- DbgPrint("No commands to execute.\n");
+ TRACE("No commands to execute.\n");
res = ERROR_SUCCESS;
goto end;
cbMaxCmdLine);
if (szCmdLine == NULL)
{
- DbgPrint("Couldn't allocate memory for the commands to be executed\n");
+ TRACE("Couldn't allocate memory for the commands to be executed\n");
res = ERROR_NOT_ENOUGH_MEMORY;
goto end;
cchMaxValue * sizeof(*szValue));
if (szValue == NULL)
{
- DbgPrint("Couldn't allocate memory for the value names\n");
+ TRACE("Couldn't allocate memory for the value names\n");
res = ERROR_NOT_ENOUGH_MEMORY;
goto end;
&cbDataLength);
if (res != ERROR_SUCCESS)
{
- DbgPrint("Couldn't read in value %lu - %ld\n", i, res);
+ TRACE("Couldn't read in value %lu - %ld\n", i, res);
continue;
}
if (bDelete && (res = RegDeleteValueW(hkRun, szValue)) != ERROR_SUCCESS)
{
- DbgPrint("Couldn't delete value - %lu, %ld. Running command anyways.\n", i, res);
+ TRACE("Couldn't delete value - %lu, %ld. Running command anyways.\n", i, res);
}
if (type != REG_SZ)
{
- DbgPrint("Incorrect type of value #%lu (%lu)\n", i, type);
+ TRACE("Incorrect type of value #%lu (%lu)\n", i, type);
continue;
}
res = runCmd(szCmdLine, NULL, bSynchronous, FALSE);
if (res == INVALID_RUNCMD_RETURN)
{
- DbgPrint("Error running cmd #%lu (%lu)\n", i, GetLastError());
+ TRACE("Error running cmd #%lu (%lu)\n", i, GetLastError());
}
- DbgPrint("Done processing cmd #%lu\n", i);
+ TRACE("Done processing cmd #%lu\n", i);
}
res = ERROR_SUCCESS;
if (hkWin != NULL)
RegCloseKey(hkWin);
- DbgPrint("done\n");
+ TRACE("done\n");
return res == ERROR_SUCCESS ? TRUE : FALSE;
}
res = GetWindowsDirectoryW(gen_path, sizeof(gen_path) / sizeof(gen_path[0]));
if (res == 0)
{
- DbgPrint("Couldn't get the windows directory - error %lu\n", GetLastError());
+ TRACE("Couldn't get the windows directory - error %lu\n", GetLastError());
return 100;
}
if (!SetCurrentDirectoryW(gen_path))
{
- DbgPrint("Cannot set the dir to %ls (%lu)\n", gen_path, GetLastError());
+ TRACE("Cannot set the dir to %ls (%lu)\n", gen_path, GetLastError());
return 100;
}
if (res && bNormalBoot && (SHRestricted(REST_NOCURRENTUSERRUNONCE) == 0))
res = ProcessRunKeys(HKEY_CURRENT_USER, L"RunOnce", TRUE, FALSE);
- DbgPrint("Operation done\n");
+ TRACE("Operation done\n");
return res ? 0 : 101;
}
else
*phwnd = ITrayWindow_GetHWND(This->Tray);
- DbgPrint("ITaskBand::GetWindow(0x%p->0x%p)\n", phwnd, *phwnd);
+ TRACE("ITaskBand::GetWindow(0x%p->0x%p)\n", phwnd, *phwnd);
if (*phwnd != NULL)
return S_OK;
IN OUT DESKBANDINFO *pdbi)
{
ITaskBandImpl *This = ITaskBandImpl_from_IDeskBand(iface);
- DbgPrint("ITaskBand::GetBandInfo(0x%x,0x%x,0x%p) hWnd=0x%p\n", dwBandID, dwViewMode, pdbi, This->hWnd);
+ TRACE("ITaskBand::GetBandInfo(0x%x,0x%x,0x%p) hWnd=0x%p\n", dwBandID, dwViewMode, pdbi, This->hWnd);
/* NOTE: We could save dwBandID in the instance in case we need it later... */
is the task band */
This->dwBandID = dwBandID;
- DbgPrint("H: %d, Min: %d,%d, Integral.y: %d Actual: %d,%d\n", (dwViewMode & DBIF_VIEWMODE_VERTICAL) == 0,
+ TRACE("H: %d, Min: %d,%d, Integral.y: %d Actual: %d,%d\n", (dwViewMode & DBIF_VIEWMODE_VERTICAL) == 0,
pdbi->ptMinSize.x, pdbi->ptMinSize.y, pdbi->ptIntegral.y,
pdbi->ptActual.x,pdbi->ptActual.y);
IDeskBarImpl_SetClient(IN OUT IDeskBar *iface,
IN IUnknown *punkClient)
{
- DbgPrint("IDeskBar::SetClient(0x%p)\n", punkClient);
+ TRACE("IDeskBar::SetClient(0x%p)\n", punkClient);
return E_NOTIMPL;
}
IDeskBarImpl_GetClient(IN OUT IDeskBar *iface,
OUT IUnknown **ppunkClient)
{
- DbgPrint("IDeskBar::GetClient(0x%p)\n", ppunkClient);
+ TRACE("IDeskBar::GetClient(0x%p)\n", ppunkClient);
return E_NOTIMPL;
}
IDeskBarImpl_OnPosRectChangeDB(IN OUT IDeskBar *iface,
IN RECT *prc)
{
- DbgPrint("IDeskBar::OnPosRectChangeDB(0x%p=(%d,%d,%d,%d))\n", prc, prc->left, prc->top, prc->right, prc->bottom);
+ TRACE("IDeskBar::OnPosRectChangeDB(0x%p=(%d,%d,%d,%d))\n", prc, prc->left, prc->top, prc->right, prc->bottom);
if (prc->bottom - prc->top == 0)
return S_OK;
ITaskBandImpl_GetClassID(IN OUT IPersistStream *iface,
OUT CLSID *pClassID)
{
- DbgPrint("ITaskBand::GetClassID(0x%p)\n", pClassID);
+ TRACE("ITaskBand::GetClassID(0x%p)\n", pClassID);
/* We're going to return the (internal!) CLSID of the task band interface */
*pClassID = CLSID_ITaskBand;
return S_OK;
ITaskBandImpl_Load(IN OUT IPersistStream *iface,
IN IStream *pStm)
{
- DbgPrint("ITaskBand::Load called\n");
+ TRACE("ITaskBand::Load called\n");
/* Nothing to do */
return S_OK;
}
ITaskBandImpl_GetSizeMax(IN OUT IPersistStream *iface,
OUT ULARGE_INTEGER *pcbSize)
{
- DbgPrint("ITaskBand::GetSizeMax called\n");
+ TRACE("ITaskBand::GetSizeMax called\n");
/* We don't need any space for the task band */
pcbSize->QuadPart = 0;
return S_OK;
ITaskBandImpl *This = ITaskBandImpl_from_IObjectWithSite(iface);
HRESULT hRet = E_FAIL;
- DbgPrint("ITaskBand::SetSite(0x%p)\n", pUnkSite);
+ TRACE("ITaskBand::SetSite(0x%p)\n", pUnkSite);
/* Release the current site */
if (This->punkSite != NULL)
{
/* Attempt to create the task switch window */
- DbgPrint("CreateTaskSwitchWnd(Parent: 0x%p)\n", hWndParent);
+ TRACE("CreateTaskSwitchWnd(Parent: 0x%p)\n", hWndParent);
This->hWnd = CreateTaskSwitchWnd(hWndParent,
This->Tray);
if (This->hWnd != NULL)
}
else
{
- DbgPrint("CreateTaskSwitchWnd() failed!\n");
+ TRACE("CreateTaskSwitchWnd() failed!\n");
IUnknown_Release(OleWindow);
hRet = E_FAIL;
}
IUnknown_Release(OleWindow);
}
else
- DbgPrint("Querying IOleWindow failed: 0x%x\n", hRet);
+ TRACE("Querying IOleWindow failed: 0x%x\n", hRet);
}
return hRet;
OUT VOID **ppvSite)
{
ITaskBandImpl *This = ITaskBandImpl_from_IObjectWithSite(iface);
- DbgPrint("ITaskBand::GetSite(0x%p,0x%p)\n", riid, ppvSite);
+ TRACE("ITaskBand::GetSite(0x%p,0x%p)\n", riid, ppvSite);
if (This->punkSite != NULL)
{
IN LPARAM lParam,
OUT LRESULT *plrResult)
{
- DbgPrint("ITaskBand: IWinEventHandler::ProcessMessage(0x%p, 0x%x, 0x%p, 0x%p, 0x%p)\n", hWnd, uMsg, wParam, lParam, plrResult);
+ TRACE("ITaskBand: IWinEventHandler::ProcessMessage(0x%p, 0x%x, 0x%p, 0x%p, 0x%p)\n", hWnd, uMsg, wParam, lParam, plrResult);
return E_NOTIMPL;
}
if (This->hWnd == hWnd ||
IsChild(This->hWnd, hWnd))
{
- DbgPrint("ITaskBand::ContainsWindow(0x%p) returns S_OK\n", hWnd);
+ TRACE("ITaskBand::ContainsWindow(0x%p) returns S_OK\n", hWnd);
return S_OK;
}
PTASK_GROUP CurrentGroup;
PTASK_ITEM CurrentTaskItem, LastTaskItem;
- DbgPrint("Tasks dump:\n");
+ TRACE("Tasks dump:\n");
if (This->IsGroupingEnabled)
{
CurrentGroup = This->TaskGroups;
while (CurrentGroup != NULL)
{
- DbgPrint("- Group PID: 0x%p Tasks: %d Index: %d\n", CurrentGroup->dwProcessId, CurrentGroup->dwTaskCount, CurrentGroup->Index);
+ TRACE("- Group PID: 0x%p Tasks: %d Index: %d\n", CurrentGroup->dwProcessId, CurrentGroup->dwTaskCount, CurrentGroup->Index);
CurrentTaskItem = This->TaskItems;
LastTaskItem = CurrentTaskItem + This->TaskItemCount;
{
if (CurrentTaskItem->Group == CurrentGroup)
{
- DbgPrint(" + Task hwnd: 0x%p Index: %d\n", CurrentTaskItem->hWnd, CurrentTaskItem->Index);
+ TRACE(" + Task hwnd: 0x%p Index: %d\n", CurrentTaskItem->hWnd, CurrentTaskItem->Index);
}
CurrentTaskItem++;
}
{
if (CurrentTaskItem->Group == NULL)
{
- DbgPrint("- Task hwnd: 0x%p Index: %d\n", CurrentTaskItem->hWnd, CurrentTaskItem->Index);
+ TRACE("- Task hwnd: 0x%p Index: %d\n", CurrentTaskItem->hWnd, CurrentTaskItem->Index);
}
CurrentTaskItem++;
}
LastTaskItem = CurrentTaskItem + This->TaskItemCount;
while (CurrentTaskItem != LastTaskItem)
{
- DbgPrint("- Task hwnd: 0x%p Index: %d\n", CurrentTaskItem->hWnd, CurrentTaskItem->Index);
+ TRACE("- Task hwnd: 0x%p Index: %d\n", CurrentTaskItem->hWnd, CurrentTaskItem->Index);
CurrentTaskItem++;
}
}
return -1;
}
- DbgPrint("Updated button %d for hwnd 0x%p\n", TaskItem->Index, TaskItem->hWnd);
+ TRACE("Updated button %d for hwnd 0x%p\n", TaskItem->Index, TaskItem->hWnd);
return TaskItem->Index;
}
TaskSwitchWnd_UpdateIndexesAfterButtonInserted(This,
iIndex);
- DbgPrint("Added button %d for hwnd 0x%p\n", iIndex, TaskItem->hWnd);
+ TRACE("Added button %d for hwnd 0x%p\n", iIndex, TaskItem->hWnd);
TaskItem->Index = iIndex;
This->ToolbarBtnCount++;
if (!GetWindowThreadProcessId(hWnd,
&dwProcessId))
{
- DbgPrint("Cannot get process id of hwnd 0x%p\n", hWnd);
+ TRACE("Cannot get process id of hwnd 0x%p\n", hWnd);
return NULL;
}
}
else if (TaskItem == NULL)
{
- DbgPrint("Active TaskItem now NULL\n");
+ TRACE("Active TaskItem now NULL\n");
}
}
hWnd);
if (TaskItem == NULL)
{
- DbgPrint("Add window 0x%p\n", hWnd);
+ TRACE("Add window 0x%p\n", hWnd);
TaskItem = TaskSwitchWnd_AllocTaskItem(This);
if (TaskItem != NULL)
{
{
if (TaskItem != NULL)
{
- DbgPrint("Activate window 0x%p on button %d\n", TaskItem->hWnd, TaskItem->Index);
+ TRACE("Activate window 0x%p on button %d\n", TaskItem->hWnd, TaskItem->Index);
}
TaskSwitchWnd_CheckActivateTaskItem(This, TaskItem);
if (TaskItem == NULL)
{
- DbgPrint("Activate window 0x%p, could not find task\n", hWnd);
+ TRACE("Activate window 0x%p, could not find task\n", hWnd);
}
return TaskSwitchWnd_ActivateTaskItem(This, TaskItem);
hWnd);
if (TaskItem != NULL)
{
- DbgPrint("Delete window 0x%p on button %d\n", hWnd, TaskItem->Index);
+ TRACE("Delete window 0x%p on button %d\n", hWnd, TaskItem->Index);
TaskSwitchWnd_DeleteTaskItem(This,
TaskItem);
return TRUE;
}
//else
- //DbgPrint("Failed to delete window 0x%p\n", hWnd);
+ //TRACE("Failed to delete window 0x%p\n", hWnd);
return FALSE;
}
hWnd);
if (TaskItem != NULL)
{
- DbgPrint("Flashing window 0x%p on button %d\n", hWnd, TaskItem->Index);
+ TRACE("Flashing window 0x%p on button %d\n", hWnd, TaskItem->Index);
TaskSwitchWnd_FlashTaskItem(This,
TaskItem);
return TRUE;
case APPCOMMAND_BROWSER_HOME:
case APPCOMMAND_LAUNCH_MAIL:
default:
- DbgPrint("Shell app command %d unhandled!\n", (INT)GET_APPCOMMAND_LPARAM(lParam));
+ TRACE("Shell app command %d unhandled!\n", (INT)GET_APPCOMMAND_LPARAM(lParam));
break;
}
{
if (hshell_msg[i].msg == (INT)wParam)
{
- DbgPrint("Shell message %ws unhandled (lParam = 0x%p)!\n", hshell_msg[i].msg_name, lParam);
+ TRACE("Shell message %ws unhandled (lParam = 0x%p)!\n", hshell_msg[i].msg_name, lParam);
found = 1;
break;
}
}
if (!found)
{
- DbgPrint("Shell message %d unhandled (lParam = 0x%p)!\n", (INT)wParam, lParam);
+ TRACE("Shell message %d unhandled (lParam = 0x%p)!\n", (INT)wParam, lParam);
}
break;
}
bIsMinimized = IsIconic(TaskItem->hWnd);
bIsActive = (TaskItem == This->ActiveTaskItem);
- DbgPrint("Active TaskItem %p, selected TaskItem %p\n", This->ActiveTaskItem, TaskItem);
+ TRACE("Active TaskItem %p, selected TaskItem %p\n", This->ActiveTaskItem, TaskItem);
if (This->ActiveTaskItem)
- DbgPrint("Active TaskItem hWnd=%p, TaskItem hWnd %p\n", This->ActiveTaskItem->hWnd, TaskItem->hWnd);
+ TRACE("Active TaskItem hWnd=%p, TaskItem hWnd %p\n", This->ActiveTaskItem->hWnd, TaskItem->hWnd);
- DbgPrint("Valid button clicked. HWND=%p, IsMinimized=%s, IsActive=%s...\n",
+ TRACE("Valid button clicked. HWND=%p, IsMinimized=%s, IsActive=%s...\n",
TaskItem->hWnd, bIsMinimized ? "Yes" : "No", bIsActive ? "Yes" : "No");
if (!bIsMinimized && bIsActive)
WM_SYSCOMMAND,
SC_MINIMIZE,
0);
- DbgPrint("Valid button clicked. App window Minimized.\n");
+ TRACE("Valid button clicked. App window Minimized.\n");
}
else
{
WM_SYSCOMMAND,
SC_RESTORE,
0);
- DbgPrint("Valid button clicked. App window Restored.\n");
+ TRACE("Valid button clicked. App window Restored.\n");
}
SetForegroundWindow(TaskItem->hWnd);
- DbgPrint("Valid button clicked. App window Activated.\n");
+ TRACE("Valid button clicked. App window Activated.\n");
}
}
}
else if (IsEqualIID(riid,
&IID_IWinEventHandler))
{
- DbgPrint("ITaskBandSite: IWinEventHandler queried!\n");
+ TRACE("ITaskBandSite: IWinEventHandler queried!\n");
*ppvObj = NULL;
return E_NOINTERFACE;
}
if (SUCCEEDED(hRet))
{
/* Load the stream */
- DbgPrint("IBandSiteStreamCallback::OnLoad intercepted the task band CLSID!\n");
+ TRACE("IBandSiteStreamCallback::OnLoad intercepted the task band CLSID!\n");
}
return hRet;
if (!SUCCEEDED(hRet))
{
- DbgPrint("IBandSiteStreamCallback::OnLoad(0x%p, 0x%p, 0x%p) returns 0x%x\n", pStm, riid, pvObj, hRet);
+ TRACE("IBandSiteStreamCallback::OnLoad(0x%p, 0x%p, 0x%p) returns 0x%x\n", pStm, riid, pvObj, hRet);
}
return hRet;
stream. We use it to intercept the default behavior when the task
band is saved to the stream */
/* FIXME: Implement */
- DbgPrint("IBandSiteStreamCallback::OnSave(0x%p, 0x%p) returns E_NOTIMPL\n", pUnk, pStm);
+ TRACE("IBandSiteStreamCallback::OnSave(0x%p, 0x%p) returns E_NOTIMPL\n", pUnk, pStm);
return E_NOTIMPL;
}
}
}
- //DbgPrint("ITrayBandSite::ProcessMessage: WM_NOTIFY for 0x%p, From: 0x%p, Code: NM_FIRST-%u...\n", hWnd, nmh->hwndFrom, NM_FIRST - nmh->code);
+ //TRACE("ITrayBandSite::ProcessMessage: WM_NOTIFY for 0x%p, From: 0x%p, Code: NM_FIRST-%u...\n", hWnd, nmh->hwndFrom, NM_FIRST - nmh->code);
break;
}
};
shell behavior! */
if (This->WindowEventHandler != NULL)
{
- /*DbgPrint("Calling IWinEventHandler::ProcessMessage(0x%p, 0x%x, 0x%p, 0x%p, 0x%p) This->hWndRebar=0x%p\n", hWnd, uMsg, wParam, lParam, plResult, This->hWndRebar);*/
+ /*TRACE("Calling IWinEventHandler::ProcessMessage(0x%p, 0x%x, 0x%p, 0x%p, 0x%p) This->hWndRebar=0x%p\n", hWnd, uMsg, wParam, lParam, plResult, This->hWndRebar);*/
hRet = IWinEventHandler_OnWinEvent(This->WindowEventHandler,
hWnd,
uMsg,
if (uMsg == WM_NOTIFY)
{
const NMHDR *nmh = (const NMHDR *)lParam;
- DbgPrint("ITrayBandSite->IWinEventHandler::ProcessMessage: WM_NOTIFY for 0x%p, From: 0x%p, Code: NM_FIRST-%u returned 0x%x\n", hWnd, nmh->hwndFrom, NM_FIRST - nmh->code, hRet);
+ TRACE("ITrayBandSite->IWinEventHandler::ProcessMessage: WM_NOTIFY for 0x%p, From: 0x%p, Code: NM_FIRST-%u returned 0x%x\n", hWnd, nmh->hwndFrom, NM_FIRST - nmh->code, hRet);
}
else
{
- DbgPrint("ITrayBandSite->IWinEventHandler::ProcessMessage(0x%p,0x%x,0x%p,0x%p,0x%p->0x%p) returned: 0x%x\n", hWnd, uMsg, wParam, lParam, plResult, *plResult, hRet);
+ TRACE("ITrayBandSite->IWinEventHandler::ProcessMessage(0x%p,0x%x,0x%p,0x%p,0x%p->0x%p) returned: 0x%x\n", hWnd, uMsg, wParam, lParam, plResult, *plResult, hRet);
}
}
}
CLSCTX_INPROC_SERVER,
&IID_IShellService,
(PVOID*)&pSs);
- DbgPrint("CoCreateInstance(CLSID_IShellBandSiteMenu) for IShellService returned: 0x%x\n", hRet);
+ TRACE("CoCreateInstance(CLSID_IShellBandSiteMenu) for IShellService returned: 0x%x\n", hRet);
if (!SUCCEEDED(hRet))
return hRet;
{
hRet = IPersistStream_Load(pPStm,
pStm);
- DbgPrint("IPersistStream_Load() returned 0x%x\n", hRet);
+ TRACE("IPersistStream_Load() returned 0x%x\n", hRet);
IPersistStream_Release(pPStm);
}
hRet = ITrayBandSiteImpl_LoadFromStream(This,
pStm);
- DbgPrint("Loaded user bands settings: 0x%x\n", hRet);
+ TRACE("Loaded user bands settings: 0x%x\n", hRet);
IStream_Release(pStm);
}
else
hRet = ITrayBandSiteImpl_LoadFromStream(This,
pStm);
- DbgPrint("Loaded default user bands settings: 0x%x\n", hRet);
+ TRACE("Loaded default user bands settings: 0x%x\n", hRet);
IStream_Release(pStm);
}
else
break;
}
default:
- DbgPrint("NotifyMessage received with unknown code %d.\n", data->notify_code);
+ TRACE("NotifyMessage received with unknown code %d.\n", data->notify_code);
break;
}
SendMessage(parentHWND,
RECT rcTray;
rcTray = This->rcTrayWnd[This->Position];
-// DbgPrint("CheckTray: %d: %d,%d,%d,%d\n", This->Position, rcTray.left, rcTray.top, rcTray.right, rcTray.bottom);
+// TRACE("CheckTray: %d: %d,%d,%d,%d\n", This->Position, rcTray.left, rcTray.top, rcTray.right, rcTray.bottom);
/* Move the tray window */
SetWindowPos(This->hWnd,
&rcScreen,
&This->TraySize,
&This->rcTrayWnd[Pos]);
-// DbgPrint("rcTrayWnd[%d(%d)]: %d,%d,%d,%d\n", Pos, This->Position, This->rcTrayWnd[Pos].left, This->rcTrayWnd[Pos].top, This->rcTrayWnd[Pos].right, This->rcTrayWnd[Pos].bottom);
+// TRACE("rcTrayWnd[%d(%d)]: %d,%d,%d,%d\n", Pos, This->Position, This->rcTrayWnd[Pos].left, This->rcTrayWnd[Pos].top, This->rcTrayWnd[Pos].right, This->rcTrayWnd[Pos].bottom);
}
/* Determine which monitor we are on. It shouldn't matter which docked
break;
default:
- DbgPrint("ITrayWindow::ExecContextMenuCmd(%u): Unhandled Command ID!\n", uiCmd);
+ TRACE("ITrayWindow::ExecContextMenuCmd(%u): Unhandled Command ID!\n", uiCmd);
bHandled = FALSE;
break;
}
CMF_NORMAL,
&pcm)))
{
- DbgPrint("ITrayBandSite::AddContextMenus succeeded!\n");
+ TRACE("ITrayBandSite::AddContextMenus succeeded!\n");
*(IContextMenu **)ppcmContext = pcm;
}
}
ITrayWindowImpl *This = impl_from_IShellDesktopTray(iface);
ITrayWindow *tray = ITrayWindow_from_impl(This);
- DbgPrint("IShellDesktopTray::QueryInterface(0x%p, 0x%p)\n", riid, ppvObj);
+ TRACE("IShellDesktopTray::QueryInterface(0x%p, 0x%p)\n", riid, ppvObj);
return ITrayWindowImpl_QueryInterface(tray,
riid,
ppvObj);
ITrayWindowImpl *This = impl_from_IShellDesktopTray(iface);
ITrayWindow *tray = ITrayWindow_from_impl(This);
- DbgPrint("IShellDesktopTray::Release()\n");
+ TRACE("IShellDesktopTray::Release()\n");
return ITrayWindowImpl_Release(tray);
}
ITrayWindowImpl *This = impl_from_IShellDesktopTray(iface);
ITrayWindow *tray = ITrayWindow_from_impl(This);
- DbgPrint("IShellDesktopTray::AddRef()\n");
+ TRACE("IShellDesktopTray::AddRef()\n");
return ITrayWindowImpl_AddRef(tray);
}
ITrayWindowImpl_IShellDesktopTray_GetState(IN OUT IShellDesktopTray *iface)
{
/* FIXME: Return ABS_ flags? */
- DbgPrint("IShellDesktopTray::GetState() unimplemented!\n");
+ TRACE("IShellDesktopTray::GetState() unimplemented!\n");
return 0;
}
OUT HWND *phWndTray)
{
ITrayWindowImpl *This = impl_from_IShellDesktopTray(iface);
- DbgPrint("IShellDesktopTray::GetTrayWindow(0x%p)\n", phWndTray);
+ TRACE("IShellDesktopTray::GetTrayWindow(0x%p)\n", phWndTray);
*phWndTray = This->hWnd;
return S_OK;
}
IN HWND hWndDesktop)
{
ITrayWindowImpl *This = impl_from_IShellDesktopTray(iface);
- DbgPrint("IShellDesktopTray::RegisterDesktopWindow(0x%p)\n", hWndDesktop);
+ TRACE("IShellDesktopTray::RegisterDesktopWindow(0x%p)\n", hWndDesktop);
This->hWndDesktop = hWndDesktop;
return S_OK;
IN DWORD dwUnknown1,
IN DWORD dwUnknown2)
{
- DbgPrint("IShellDesktopTray::Unknown(%u,%u) unimplemented!\n", dwUnknown1, dwUnknown2);
+ TRACE("IShellDesktopTray::Unknown(%u,%u) unimplemented!\n", dwUnknown1, dwUnknown2);
return S_OK;
}
mii.cch = _countof(label);
::GetMenuItemInfoW(menubase, i, TRUE, &mii);
- DbgPrint("Adding item %d label %S type %d\n", mii.wID, mii.dwTypeData, mii.fType);
+ TRACE("Adding item %d label %S type %d\n", mii.wID, mii.dwTypeData, mii.fType);
mii.fType |= MFT_RADIOCHECK;
mii.cch = _countof(label);
::GetMenuItemInfoW(menubase, i, TRUE, &mii);
- DbgPrint("Adding item %d label %S type %d\n", mii.wID, mii.dwTypeData, mii.fType);
+ TRACE("Adding item %d label %S type %d\n", mii.wID, mii.dwTypeData, mii.fType);
mii.fType |= MFT_RADIOCHECK;
mii.cch = _countof(label);
::GetMenuItemInfoW(menubase, i, TRUE, &mii);
- DbgPrint("Adding item %d label %S type %d\n", mii.wID, mii.dwTypeData, mii.fType);
+ TRACE("Adding item %d label %S type %d\n", mii.wID, mii.dwTypeData, mii.fType);
mii.fType |= MFT_RADIOCHECK;