VirtualBox

Ignore:
Timestamp:
Sep 6, 2010 12:57:48 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
65576
Message:

VBoxTray: Corrected some logging prefixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxSeamless.cpp

    r28800 r32249  
    5252int VBoxSeamlessInit(const VBOXSERVICEENV *pEnv, void **ppInstance, bool *pfStartThread)
    5353{
    54     Log(("VBoxSeamlessInit\n"));
     54    Log(("VBoxTray: VBoxSeamlessInit\n"));
    5555
    5656    *pfStartThread = false;
     
    6565    if (OSinfo.dwMajorVersion <= 4)         /* Windows NT 4.0 or older */
    6666    {
    67         Log(("VBoxSeamlessInit: Windows NT 4.0 or older not supported!\n"));
     67        Log(("VBoxTray: VBoxSeamlessInit: Windows NT 4.0 or older not supported!\n"));
    6868        return VERR_NOT_SUPPORTED;
    6969    }
     
    8585                             &vmmreqGuestCaps, sizeof(vmmreqGuestCaps), &cbReturned, NULL))
    8686        {
    87             Log(("VBoxSeamlessInit: VMMDevReq_ReportGuestCapabilities: error doing IOCTL, last error: %d\n", GetLastError()));
     87            Log(("VBoxTray: VBoxSeamlessInit: VMMDevReq_ReportGuestCapabilities: error doing IOCTL, last error: %d\n", GetLastError()));
    8888            return VERR_INVALID_PARAMETER;
    8989        }
     
    9595    else
    9696    {
    97         Log(("VBoxSeamlessInit: LoadLibrary failed with %d\n", GetLastError()));
     97        Log(("VBoxTray: VBoxSeamlessInit: LoadLibrary failed with %d\n", GetLastError()));
    9898        return VERR_INVALID_PARAMETER;
    9999    }
     
    105105void VBoxSeamlessDestroy(const VBOXSERVICEENV *pEnv, void *pInstance)
    106106{
    107     Log(("VBoxSeamlessDestroy\n"));
     107    Log(("VBoxTray: VBoxSeamlessDestroy\n"));
    108108    /* inform the host that we no longer support the seamless window mode */
    109109    VMMDevReqGuestCapabilities vmmreqGuestCaps = {0};
     
    115115                         &vmmreqGuestCaps, sizeof(vmmreqGuestCaps), &cbReturned, NULL))
    116116    {
    117         Log(("VMMDevReq_ReportGuestCapabilities: error doing IOCTL, last error: %d\n", GetLastError()));
     117        Log(("VBoxTray: VMMDevReq_ReportGuestCapabilities: error doing IOCTL, last error: %d\n", GetLastError()));
    118118    }
    119119
     
    161161        return TRUE;
    162162
    163     Log(("VBoxEnumFunc %x\n", hwnd));
     163    Log(("VBoxTray: VBoxEnumFunc %x\n", hwnd));
    164164    /* Only visible windows that are present on the desktop are interesting here */
    165165#ifndef MMSEAMLESS
     
    182182            && dwExStyle == (WS_EX_LAYERED|WS_EX_TOOLWINDOW|WS_EX_TRANSPARENT|WS_EX_TOPMOST))
    183183        {
    184             Log(("Filter out shadow window style=%x exstyle=%x\n", dwStyle, dwExStyle));
     184            Log(("VBoxTray: Filter out shadow window style=%x exstyle=%x\n", dwStyle, dwExStyle));
    185185            return TRUE;
    186186        }
     
    189189        if (strcmp(szWindowText, "Program Manager"))
    190190        {
    191             Log(("Enum hwnd=%x rect (%d,%d) (%d,%d)\n", hwnd, rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom));
    192             Log(("title=%s style=%x exStyle=%x\n", szWindowText, dwStyle, dwExStyle));
     191            Log(("VBoxTray: Enum hwnd=%x rect (%d,%d) (%d,%d)\n", hwnd, rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom));
     192            Log(("VBoxTray: title=%s style=%x exStyle=%x\n", szWindowText, dwStyle, dwExStyle));
    193193
    194194            HRGN hrgn = CreateRectRgn(0,0,0,0);
     
    198198            if (ret == ERROR)
    199199            {
    200                 Log(("GetWindowRgn failed with rc=%d\n", GetLastError()));
     200                Log(("VBoxTray: GetWindowRgn failed with rc=%d\n", GetLastError()));
    201201                SetRectRgn(hrgn, rectVisible.left, rectVisible.top, rectVisible.right, rectVisible.bottom);
    202202            }
     
    217217        else
    218218        {
    219             Log(("Enum hwnd=%x rect (%d,%d) (%d,%d) (ignored)\n", hwnd, rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom));
    220             Log(("title=%s style=%x\n", szWindowText, dwStyle));
     219            Log(("VBoxTray: Enum hwnd=%x rect (%d,%d) (%d,%d) (ignored)\n", hwnd, rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom));
     220            Log(("VBoxTray: title=%s style=%x\n", szWindowText, dwStyle));
    221221        }
    222222    }
     
    233233#ifndef MMSEAMLESS
    234234    GetWindowRect(GetDesktopWindow(), &param.rect);
    235     Log(("VBoxRecheckVisibleWindows desktop=%x rect (%d,%d) (%d,%d)\n", GetDesktopWindow(), param.rect.left, param.rect.top, param.rect.right, param.rect.bottom));
     235    Log(("VBoxTray: VBoxRecheckVisibleWindows desktop=%x rect (%d,%d) (%d,%d)\n", GetDesktopWindow(), param.rect.left, param.rect.top, param.rect.right, param.rect.bottom));
    236236#endif
    237237    EnumWindows(VBoxEnumFunc, (LPARAM)&param);
     
    255255#ifdef DEBUG
    256256                    RECT *lpRect = (RECT *)&lpRgnData->Buffer[0];
    257                     Log(("New visible region: \n"));
     257                    Log(("VBoxTray: New visible region: \n"));
    258258
    259259                    for (DWORD i=0;i<lpRgnData->rdh.nCount;i++)
    260260                    {
    261                         Log(("visible rect (%d,%d)(%d,%d)\n", lpRect[i].left, lpRect[i].top, lpRect[i].right, lpRect[i].bottom));
     261                        Log(("VBoxTray: visible rect (%d,%d)(%d,%d)\n", lpRect[i].left, lpRect[i].top, lpRect[i].right, lpRect[i].bottom));
    262262                    }
    263263#endif
     
    275275                    }
    276276                    else
    277                         Log(("Visible rectangles haven't changed; ignore\n"));
     277                        Log(("VBoxTray: Visible rectangles haven't changed; ignore\n"));
    278278                }
    279279                if (lpEscapeData != gCtx.lpEscapeData)
     
    305305    if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL))
    306306    {
    307         Log(("VBoxSeamlessThread: DeviceIOControl(CtlMask - or) succeeded\n"));
     307        Log(("VBoxTray: VBoxSeamlessThread: DeviceIOControl(CtlMask - or) succeeded\n"));
    308308    }
    309309    else
    310310    {
    311         Log(("VBoxSeamlessThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n"));
     311        Log(("VBoxTray: VBoxSeamlessThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n"));
    312312        return 0;
    313313    }
     
    321321        if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent), &waitEvent, sizeof(waitEvent), &cbReturned, NULL))
    322322        {
    323             Log(("VBoxSeamlessThread: DeviceIOControl succeded\n"));
     323            Log(("VBoxTray: VBoxSeamlessThread: DeviceIOControl succeded\n"));
    324324
    325325            /* are we supposed to stop? */
     
    327327                break;
    328328
    329             Log(("VBoxSeamlessThread: checking event\n"));
     329            Log(("VBoxTray: VBoxSeamlessThread: checking event\n"));
    330330
    331331            /* did we get the right event? */
    332332            if (waitEvent.u32EventFlagsOut & VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST)
    333333            {
    334                 Log(("VBoxTray: going to get seamless change information.\n"));
     334                Log(("VBoxTray: VBoxTray: going to get seamless change information.\n"));
    335335
    336336                /* We got at least one event. Read the requested resolution
     
    349349                    if (fSeamlessChangeQueried)
    350350                    {
    351                         Log(("VBoxSeamlessThread: mode change to %d\n", seamlessChangeRequest.mode));
     351                        Log(("VBoxTray: VBoxSeamlessThread: mode change to %d\n", seamlessChangeRequest.mode));
    352352
    353353                        switch(seamlessChangeRequest.mode)
     
    356356                            if (fWasScreenSaverActive)
    357357                            {
    358                                 Log(("Re-enabling the screensaver\n"));
     358                                Log(("VBoxTray: Re-enabling the screensaver\n"));
    359359                                ret = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, TRUE, NULL, 0);
    360360                                if (!ret)
    361                                     Log(("SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError()));
     361                                    Log(("VBoxTray: SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError()));
    362362                            }
    363363                            PostMessage(gToolWindow, WM_VBOX_REMOVE_SEAMLESS_HOOK, 0, 0);
     
    367367                            ret = SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, &fWasScreenSaverActive, 0);
    368368                            if (!ret)
    369                                 Log(("SystemParametersInfo SPI_GETSCREENSAVEACTIVE failed with %d\n", GetLastError()));
     369                                Log(("VBoxTray: SystemParametersInfo SPI_GETSCREENSAVEACTIVE failed with %d\n", GetLastError()));
    370370
    371371                            if (fWasScreenSaverActive)
    372                                 Log(("Disabling the screensaver\n"));
     372                                Log(("VBoxTray: Disabling the screensaver\n"));
    373373
    374374                            ret = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, NULL, 0);
    375375                            if (!ret)
    376                                 Log(("SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError()));
     376                                Log(("VBoxTray: SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError()));
    377377                            PostMessage(gToolWindow, WM_VBOX_INSTALL_SEAMLESS_HOOK, 0, 0);
    378378                            break;
     
    389389                    else
    390390                    {
    391                         Log(("VBoxSeamlessThread: error from DeviceIoControl VBOXGUEST_IOCTL_VMMREQUEST\n"));
     391                        Log(("VBoxTray: VBoxSeamlessThread: error from DeviceIoControl VBOXGUEST_IOCTL_VMMREQUEST\n"));
    392392                    }
    393393                    /* sleep a bit to not eat too much CPU while retrying */
     
    403403        else
    404404        {
    405             Log(("VBoxTray: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n"));
     405            Log(("VBoxTray: VBoxTray: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n"));
    406406            /* sleep a bit to not eat too much CPU in case the above call always fails */
    407407            if (WaitForSingleObject(pCtx->pEnv->hStopEvent, 10) == WAIT_OBJECT_0)
     
    418418    if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL))
    419419    {
    420         Log(("VBoxSeamlessThread: DeviceIOControl(CtlMask - not) succeeded\n"));
     420        Log(("VBoxTray: VBoxSeamlessThread: DeviceIOControl(CtlMask - not) succeeded\n"));
    421421    }
    422422    else
    423423    {
    424         Log(("VBoxSeamlessThread: DeviceIOControl(CtlMask) failed\n"));
    425     }
    426 
    427     Log(("VBoxSeamlessThread: finished seamless change request thread\n"));
     424        Log(("VBoxTray: VBoxSeamlessThread: DeviceIOControl(CtlMask) failed\n"));
     425    }
     426
     427    Log(("VBoxTray: VBoxSeamlessThread: finished seamless change request thread\n"));
    428428    return 0;
    429429}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette