- Timestamp:
- Sep 6, 2010 12:57:48 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/VBoxTray
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
r32211 r32249 67 67 while ((format = EnumClipboardFormats (format)) != 0) 68 68 { 69 Log((" vboxClipboardChanged: format = 0x%08X\n", format));69 Log(("VBoxTray: vboxClipboardChanged: format = 0x%08X\n", format)); 70 70 switch (format) 71 71 { … … 141 141 HWND hwndNext = (HWND)lParam; 142 142 143 Log((" vboxClipboardProcessMsg: WM_CHANGECBCHAIN: hwndRemoved %p, hwndNext %p, hwnd %p\n", hwndRemoved, hwndNext, pCtx->hwnd));143 Log(("VBoxTray: vboxClipboardProcessMsg: WM_CHANGECBCHAIN: hwndRemoved %p, hwndNext %p, hwnd %p\n", hwndRemoved, hwndNext, pCtx->hwnd)); 144 144 145 145 if (hwndRemoved == pCtx->hwndNextInChain) … … 164 164 case WM_DRAWCLIPBOARD: 165 165 { 166 Log((" vboxClipboardProcessMsg: WM_DRAWCLIPBOARD, hwnd %p\n", pCtx->hwnd));166 Log(("VBoxTray: vboxClipboardProcessMsg: WM_DRAWCLIPBOARD, hwnd %p\n", pCtx->hwnd)); 167 167 168 168 if (GetClipboardOwner () != hwnd) … … 172 172 int vboxrc = vboxClipboardChanged(pCtx); 173 173 if (RT_FAILURE(vboxrc)) 174 Log((" vboxClipboardProcessMsg: vboxClipboardChanged failed, rc = %Rrc\n", vboxrc));174 Log(("VBoxTray: vboxClipboardProcessMsg: vboxClipboardChanged failed, rc = %Rrc\n", vboxrc)); 175 175 } 176 176 … … 209 209 UINT format = (UINT)wParam; 210 210 211 Log((" vboxClipboardProcessMsg: WM_RENDERFORMAT, format = %x\n", format));211 Log(("VBoxTray: vboxClipboardProcessMsg: WM_RENDERFORMAT, format = %x\n", format)); 212 212 switch (format) 213 213 { … … 240 240 { 241 241 /* Unsupported clipboard format is requested. */ 242 Log((" vboxClipboardProcessMsg: Unsupported clipboard format requested: %ld\n", u32Format));242 Log(("VBoxTray: vboxClipboardProcessMsg: Unsupported clipboard format requested: %ld\n", u32Format)); 243 243 EmptyClipboard(); 244 244 } … … 250 250 /* Preallocate a buffer, most of small text transfers will fit into it. */ 251 251 HANDLE hMem = GlobalAlloc(GMEM_DDESHARE | GMEM_MOVEABLE, cbPrealloc); 252 Log((" vboxClipboardProcessMsg: Preallocated handle hMem = %p\n", hMem));252 Log(("VBoxTray: vboxClipboardProcessMsg: Preallocated handle hMem = %p\n", hMem)); 253 253 254 254 if (hMem) 255 255 { 256 256 void *pMem = GlobalLock(hMem); 257 Log((" vboxClipboardProcessMsg: Locked pMem = %p, GlobalSize = %ld\n", pMem, GlobalSize(hMem)));257 Log(("VBoxTray: vboxClipboardProcessMsg: Locked pMem = %p, GlobalSize = %ld\n", pMem, GlobalSize(hMem))); 258 258 259 259 if (pMem) … … 261 261 /* Read the host data to the preallocated buffer. */ 262 262 int vboxrc = VbglR3ClipboardReadData(pCtx->u32ClientID, u32Format, pMem, cbPrealloc, &cb); 263 Log((" vboxClipboardProcessMsg: VbglR3ClipboardReadData returned with rc = %Rrc\n", vboxrc));263 Log(("VBoxTray: vboxClipboardProcessMsg: VbglR3ClipboardReadData returned with rc = %Rrc\n", vboxrc)); 264 264 265 265 if (RT_SUCCESS(vboxrc)) … … 280 280 /* The preallocated buffer is too small, adjust the size. */ 281 281 hMem = GlobalReAlloc(hMem, cb, 0); 282 Log((" vboxClipboardProcessMsg: Reallocated hMem = %p\n", hMem));282 Log(("VBoxTray: vboxClipboardProcessMsg: Reallocated hMem = %p\n", hMem)); 283 283 284 284 if (hMem) 285 285 { 286 286 pMem = GlobalLock(hMem); 287 Log((" vboxClipboardProcessMsg: Locked pMem = %p, GlobalSize = %ld\n", pMem, GlobalSize(hMem)));287 Log(("VBoxTray: vboxClipboardProcessMsg: Locked pMem = %p, GlobalSize = %ld\n", pMem, GlobalSize(hMem))); 288 288 289 289 if (pMem) … … 292 292 uint32_t cbNew = 0; 293 293 vboxrc = VbglR3ClipboardReadData(pCtx->u32ClientID, u32Format, pMem, cb, &cbNew); 294 Log(("V bglR3ClipboardReadData returned with rc = %Rrc, cb = %d, cbNew = %d\n", vboxrc, cb, cbNew));294 Log(("VBoxTray: VbglR3ClipboardReadData returned with rc = %Rrc, cb = %d, cbNew = %d\n", vboxrc, cb, cbNew)); 295 295 296 296 if (RT_SUCCESS (vboxrc) && cbNew <= cb) … … 345 345 346 346 hMem = GlobalReAlloc(hMem, cb, 0); 347 Log((" vboxClipboardProcessMsg: Reallocated hMem = %p\n", hMem));347 Log(("VBoxTray: vboxClipboardProcessMsg: Reallocated hMem = %p\n", hMem)); 348 348 349 349 if (hMem) … … 352 352 * size is 'cb' and format is 'format'. */ 353 353 HANDLE hClip = SetClipboardData(format, hMem); 354 Log((" vboxClipboardProcessMsg: WM_RENDERFORMAT hClip = %p\n", hClip));354 Log(("VBoxTray: vboxClipboardProcessMsg: WM_RENDERFORMAT hClip = %p\n", hClip)); 355 355 356 356 if (hClip) … … 395 395 if (FALSE == OpenClipboard(hwnd)) 396 396 { 397 Log((" vboxClipboardProcessMsg: WM_USER: Failed to open clipboard! Last error = %ld\n", GetLastError()));397 Log(("VBoxTray: vboxClipboardProcessMsg: WM_USER: Failed to open clipboard! Last error = %ld\n", GetLastError())); 398 398 } 399 399 else … … 405 405 if (u32Formats & VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT) 406 406 { 407 Log((" vboxClipboardProcessMsg: WM_USER: VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT\n"));407 Log(("VBoxTray: vboxClipboardProcessMsg: WM_USER: VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT\n")); 408 408 hClip = SetClipboardData(CF_UNICODETEXT, NULL); 409 409 } … … 411 411 if (u32Formats & VBOX_SHARED_CLIPBOARD_FMT_BITMAP) 412 412 { 413 Log((" vboxClipboardProcessMsg: WM_USER: VBOX_SHARED_CLIPBOARD_FMT_BITMAP\n"));413 Log(("VBoxTray: vboxClipboardProcessMsg: WM_USER: VBOX_SHARED_CLIPBOARD_FMT_BITMAP\n")); 414 414 hClip = SetClipboardData(CF_DIB, NULL); 415 415 } … … 418 418 { 419 419 UINT format = RegisterClipboardFormat ("HTML Format"); 420 Log((" vboxClipboardProcessMsg: WM_USER: VBOX_SHARED_CLIPBOARD_FMT_HTML 0x%04X\n", format));420 Log(("VBoxTray: vboxClipboardProcessMsg: WM_USER: VBOX_SHARED_CLIPBOARD_FMT_HTML 0x%04X\n", format)); 421 421 if (format != 0) 422 422 { … … 426 426 427 427 CloseClipboard(); 428 Log((" vboxClipboardProcessMsg: WM_USER: hClip = %p, err = %ld\n", hClip, GetLastError ()));428 Log(("VBoxTray: vboxClipboardProcessMsg: WM_USER: hClip = %p, err = %ld\n", hClip, GetLastError ())); 429 429 } 430 430 } break; … … 438 438 if (FALSE == OpenClipboard(hwnd)) 439 439 { 440 Log((" vboxClipboardProcessMsg: WM_USER: Failed to open clipboard! Last error = %ld\n", GetLastError()));440 Log(("VBoxTray: vboxClipboardProcessMsg: WM_USER: Failed to open clipboard! Last error = %ld\n", GetLastError())); 441 441 } 442 442 else … … 452 452 if (lp != NULL) 453 453 { 454 Log((" vboxClipboardProcessMsg: WM_USER + 1: CF_DIB\n"));454 Log(("VBoxTray: vboxClipboardProcessMsg: WM_USER + 1: CF_DIB\n")); 455 455 vboxrc = VbglR3ClipboardWriteData(pCtx->u32ClientID, VBOX_SHARED_CLIPBOARD_FMT_BITMAP, 456 456 lp, GlobalSize(hClip)); … … 473 473 if (uniString != NULL) 474 474 { 475 Log((" vboxClipboardProcessMsg: WM_USER + 1: CF_UNICODETEXT\n"));475 Log(("VBoxTray: vboxClipboardProcessMsg: WM_USER + 1: CF_UNICODETEXT\n")); 476 476 vboxrc = VbglR3ClipboardWriteData(pCtx->u32ClientID, VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT, 477 477 uniString, (lstrlenW(uniString) + 1) * 2); … … 496 496 if (lp != NULL) 497 497 { 498 Log((" vboxClipboardProcessMsg: WM_USER + 1: CF_HTML\n"));498 Log(("VBoxTray: vboxClipboardProcessMsg: WM_USER + 1: CF_HTML\n")); 499 499 vboxrc = VbglR3ClipboardWriteData(pCtx->u32ClientID, VBOX_SHARED_CLIPBOARD_FMT_HTML, 500 500 lp, GlobalSize(hClip)); … … 525 525 } 526 526 527 Log((" vboxClipboardProcessMsg returned with rc = %ld\n", rc));527 Log(("VBoxTray: vboxClipboardProcessMsg returned with rc = %ld\n", rc)); 528 528 return rc; 529 529 } … … 576 576 } 577 577 578 Log((" vboxClipboardInit returned with rc = %Rrc\n", rc));578 Log(("VBoxTray: vboxClipboardInit returned with rc = %Rrc\n", rc)); 579 579 return rc; 580 580 } … … 610 610 int VBoxClipboardInit(const VBOXSERVICEENV *pEnv, void **ppInstance, bool *pfStartThread) 611 611 { 612 Log(("V boxClipboardInit\n"));612 Log(("VBoxTray: VboxClipboardInit\n")); 613 613 if (gCtx.pEnv) 614 614 { … … 642 642 unsigned __stdcall VBoxClipboardThread(void *pInstance) 643 643 { 644 Log(("VBox ClipboardThread\n"));644 Log(("VBoxTray: VBoxClipboardThread\n")); 645 645 646 646 VBOXCLIPBOARDCONTEXT *pCtx = (VBOXCLIPBOARDCONTEXT *)pInstance; … … 655 655 if (RT_FAILURE(rc)) 656 656 { 657 Log(("VBox ClipboardThread: Failed to call the driver for host message! rc = %Rrc\n", rc));657 Log(("VBoxTray: VBoxClipboardThread: Failed to call the driver for host message! rc = %Rrc\n", rc)); 658 658 if (rc == VERR_INTERRUPTED) 659 659 { … … 672 672 else 673 673 { 674 Log(("VBox ClipboardThread: VbglR3ClipboardGetHostMsg u32Msg = %ld, u32Formats = %ld\n", u32Msg, u32Formats));674 Log(("VBoxTray: VBoxClipboardThread: VbglR3ClipboardGetHostMsg u32Msg = %ld, u32Formats = %ld\n", u32Msg, u32Formats)); 675 675 switch (u32Msg) 676 676 { … … 697 697 default: 698 698 { 699 Log(("VBox ClipboardThread: Unsupported message from host! Message = %ld\n", u32Msg));699 Log(("VBoxTray: VBoxClipboardThread: Unsupported message from host! Message = %ld\n", u32Msg)); 700 700 } 701 701 } … … 710 710 if (pCtx != &gCtx) 711 711 { 712 Log(("VBox ClipboardDestroy: invalid instance %p (our = %p)!\n", pCtx, &gCtx));712 Log(("VBoxTray: VBoxClipboardDestroy: invalid instance %p (our = %p)!\n", pCtx, &gCtx)); 713 713 pCtx = &gCtx; 714 714 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp
r28800 r32249 146 146 dispDevice.cb = sizeof(DISPLAY_DEVICE); 147 147 148 Log((" Checking for active VBox display driver (W2K+)...\n"));148 Log(("VBoxTray: Checking for active VBox display driver (W2K+)...\n")); 149 149 150 150 while (EnumDisplayDevices(NULL, … … 153 153 0)) 154 154 { 155 Log((" DevNum:%d\nName:%s\nString:%s\nID:%s\nKey:%s\nFlags=%08X\n\n",155 Log(("VBoxTray: DevNum:%d\nName:%s\nString:%s\nID:%s\nKey:%s\nFlags=%08X\n\n", 156 156 devNum, 157 157 &dispDevice.DeviceName[0], … … 163 163 if (dispDevice.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) 164 164 { 165 Log((" Primary device.\n"));165 Log(("VBoxTray: Primary device.\n")); 166 166 167 167 if (strcmp(&dispDevice.DeviceString[0], "VirtualBox Graphics Adapter") == 0) … … 185 185 else /* This must be NT 4 or something really old, so don't use EnumDisplayDevices() here ... */ 186 186 { 187 Log((" Checking for active VBox display driver (NT or older)...\n"));187 Log(("VBoxTray: Checking for active VBox display driver (NT or older)...\n")); 188 188 189 189 DEVMODE tempDevMode; … … 225 225 while (EnumDisplayDevices (NULL, i, &DisplayDevice, 0)) 226 226 { 227 Log((" [%d] %s\n", i, DisplayDevice.DeviceName));227 Log(("VBoxTray: [%d] %s\n", i, DisplayDevice.DeviceName)); 228 228 229 229 if (DisplayDevice.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) 230 230 { 231 Log((" ResizeDisplayDevice: Found primary device. err %d\n", GetLastError ()));231 Log(("VBoxTray: ResizeDisplayDevice: Found primary device. err %d\n", GetLastError ())); 232 232 NumDevices++; 233 233 } … … 235 235 { 236 236 237 Log((" ResizeDisplayDevice: Found secondary device. err %d\n", GetLastError ()));237 Log(("VBoxTray: ResizeDisplayDevice: Found secondary device. err %d\n", GetLastError ())); 238 238 NumDevices++; 239 239 } … … 244 244 } 245 245 246 Log((" ResizeDisplayDevice: Found total %d devices. err %d\n", NumDevices, GetLastError ()));246 Log(("VBoxTray: ResizeDisplayDevice: Found total %d devices. err %d\n", NumDevices, GetLastError ())); 247 247 248 248 if (NumDevices == 0 || Id >= NumDevices) 249 249 { 250 Log((" ResizeDisplayDevice: Requested identifier %d is invalid. err %d\n", Id, GetLastError ()));250 Log(("VBoxTray: ResizeDisplayDevice: Requested identifier %d is invalid. err %d\n", Id, GetLastError ())); 251 251 return FALSE; 252 252 } … … 266 266 while (EnumDisplayDevices (NULL, i, &DisplayDevice, 0)) 267 267 { 268 Log((" ResizeDisplayDevice: [%d(%d)] %s\n", i, DevNum, DisplayDevice.DeviceName));268 Log(("VBoxTray: ResizeDisplayDevice: [%d(%d)] %s\n", i, DevNum, DisplayDevice.DeviceName)); 269 269 270 270 BOOL bFetchDevice = FALSE; … … 272 272 if (DisplayDevice.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) 273 273 { 274 Log((" ResizeDisplayDevice: Found primary device. err %d\n", GetLastError ()));274 Log(("VBoxTray: ResizeDisplayDevice: Found primary device. err %d\n", GetLastError ())); 275 275 DevPrimaryNum = DevNum; 276 276 bFetchDevice = TRUE; … … 279 279 { 280 280 281 Log((" ResizeDisplayDevice: Found secondary device. err %d\n", GetLastError ()));281 Log(("VBoxTray: ResizeDisplayDevice: Found secondary device. err %d\n", GetLastError ())); 282 282 bFetchDevice = TRUE; 283 283 } … … 287 287 if (DevNum >= NumDevices) 288 288 { 289 Log((" ResizeDisplayDevice: %d >= %d\n", NumDevices, DevNum));289 Log(("VBoxTray: ResizeDisplayDevice: %d >= %d\n", NumDevices, DevNum)); 290 290 return FALSE; 291 291 } … … 302 302 ENUM_REGISTRY_SETTINGS, &paDeviceModes[DevNum])) 303 303 { 304 Log((" ResizeDisplayDevice: EnumDisplaySettings err %d\n", GetLastError ()));304 Log(("VBoxTray: ResizeDisplayDevice: EnumDisplaySettings err %d\n", GetLastError ())); 305 305 return FALSE; 306 306 } … … 321 321 * Do not return here, ignore the error and set the display info to 0x0x0. 322 322 */ 323 Log((" EnumDisplaySettings(ENUM_CURRENT_SETTINGS) err %d\n", GetLastError ()));323 Log(("VBoxTray: EnumDisplaySettings(ENUM_CURRENT_SETTINGS) err %d\n", GetLastError ())); 324 324 ZeroMemory(&paDeviceModes[DevNum], sizeof(DEVMODE)); 325 325 } 326 326 } 327 327 328 Log((" ResizeDisplayDevice: %dx%dx%d at %d,%d\n",328 Log(("VBoxTray: ResizeDisplayDevice: %dx%dx%d at %d,%d\n", 329 329 paDeviceModes[DevNum].dmPelsWidth, 330 330 paDeviceModes[DevNum].dmPelsHeight, … … 366 366 && paDeviceModes[Id].dmBitsPerPel == BitsPerPixel) 367 367 { 368 Log((" ResizeDisplayDevice: Already at desired resolution.\n"));368 Log(("VBoxTray: ResizeDisplayDevice: Already at desired resolution.\n")); 369 369 return FALSE; 370 370 } … … 374 374 for (i = 0; i < NumDevices; i++) 375 375 { 376 Log((" ResizeDisplayDevice: [%d]: %d,%d %dx%d\n",376 Log(("VBoxTray: ResizeDisplayDevice: [%d]: %d,%d %dx%d\n", 377 377 i, paRects[i].left, paRects[i].top, 378 378 paRects[i].right - paRects[i].left, … … 390 390 tempDevMode.dmSize = sizeof(DEVMODE); 391 391 EnumDisplaySettings((LPSTR)paDisplayDevices[i].DeviceName, 0xffffff, &tempDevMode); 392 Log((" ResizeDisplayDevice: EnumDisplaySettings last error %d\n", GetLastError ()));392 Log(("VBoxTray: ResizeDisplayDevice: EnumDisplaySettings last error %d\n", GetLastError ())); 393 393 } 394 394 … … 413 413 } 414 414 415 Log((" ResizeDisplayDevice: pfnChangeDisplaySettingsEx %x: %dx%dx%d at %d,%d\n",415 Log(("VBoxTray: ResizeDisplayDevice: pfnChangeDisplaySettingsEx %x: %dx%dx%d at %d,%d\n", 416 416 gCtx.pfnChangeDisplaySettingsEx, 417 417 paDeviceModes[i].dmPelsWidth, … … 423 423 LONG status = gCtx.pfnChangeDisplaySettingsEx((LPSTR)paDisplayDevices[i].DeviceName, 424 424 &paDeviceModes[i], NULL, CDS_NORESET | CDS_UPDATEREGISTRY, NULL); 425 Log((" ResizeDisplayDevice: ChangeDisplaySettingsEx position status %d, err %d\n", status, GetLastError ()));425 Log(("VBoxTray: ResizeDisplayDevice: ChangeDisplaySettingsEx position status %d, err %d\n", status, GetLastError ())); 426 426 } 427 427 428 428 /* A second call to ChangeDisplaySettings updates the monitor. */ 429 429 LONG status = gCtx.pfnChangeDisplaySettingsEx(NULL, NULL, NULL, 0, NULL); 430 Log((" ResizeDisplayDevice: ChangeDisplaySettings update status %d\n", status));430 Log(("VBoxTray: ResizeDisplayDevice: ChangeDisplaySettings update status %d\n", status)); 431 431 if (status == DISP_CHANGE_SUCCESSFUL || status == DISP_CHANGE_BADMODE) 432 432 { … … 455 455 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 456 456 { 457 Log(("VBox DisplayThread : DeviceIOControl(CtlMask - or) succeeded\n"));457 Log(("VBoxTray: VBoxDisplayThread : DeviceIOControl(CtlMask - or) succeeded\n")); 458 458 } 459 459 else 460 460 { 461 Log(("VBox DisplayThread : DeviceIOControl(CtlMask) failed, DisplayChangeThread exited\n"));461 Log(("VBoxTray: VBoxDisplayThread : DeviceIOControl(CtlMask) failed, DisplayChangeThread exited\n")); 462 462 return -1; 463 463 } … … 471 471 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent), &waitEvent, sizeof(waitEvent), &cbReturned, NULL)) 472 472 { 473 /*Log(("VBox DisplayThread : DeviceIOControl succeded\n"));*/473 /*Log(("VBoxTray: VBoxDisplayThread : DeviceIOControl succeded\n"));*/ 474 474 475 475 if (NULL == pCtx) { 476 Log(("VBox DisplayThread : Invalid context detected!\n"));476 Log(("VBoxTray: VBoxDisplayThread : Invalid context detected!\n")); 477 477 break; 478 478 } 479 479 480 480 if (NULL == pCtx->pEnv) { 481 Log(("VBox DisplayThread : Invalid context environment detected!\n"));481 Log(("VBoxTray: VBoxDisplayThread : Invalid context environment detected!\n")); 482 482 break; 483 483 } … … 487 487 break; 488 488 489 /*Log(("VBox DisplayThread : checking event\n"));*/489 /*Log(("VBoxTray: VBoxDisplayThread : checking event\n"));*/ 490 490 491 491 /* did we get the right event? */ 492 492 if (waitEvent.u32EventFlagsOut & VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST) 493 493 { 494 Log(("VBox DisplayThread : going to get display change information.\n"));494 Log(("VBoxTray: VBoxDisplayThread : going to get display change information.\n")); 495 495 496 496 /* We got at least one event. Read the requested resolution … … 522 522 if (fDisplayChangeQueried) 523 523 { 524 Log(("VBox DisplayThread : VMMDevReq_GetDisplayChangeRequest2: %dx%dx%d at %d\n", displayChangeRequest.xres, displayChangeRequest.yres, displayChangeRequest.bpp, displayChangeRequest.display));524 Log(("VBoxTray: VBoxDisplayThread : VMMDevReq_GetDisplayChangeRequest2: %dx%dx%d at %d\n", displayChangeRequest.xres, displayChangeRequest.yres, displayChangeRequest.bpp, displayChangeRequest.display)); 525 525 526 526 /* Horizontal resolution must be a multiple of 8, round down. */ … … 534 534 535 535 if (enmDriverType == VBOXDISPLAY_DRIVER_TYPE_WDDM) 536 Log(("VBox DisplayThread : Detected WDDM Driver\n"));536 Log(("VBoxTray: VBoxDisplayThread : Detected WDDM Driver\n")); 537 537 538 538 if (enmDriverType != VBOXDISPLAY_DRIVER_TYPE_UNKNOWN) … … 541 541 #endif 542 542 { 543 Log(("VBox DisplayThread : Display driver is active!\n"));543 Log(("VBoxTray: VBoxDisplayThread : Display driver is active!\n")); 544 544 545 545 if (pCtx->pfnChangeDisplaySettingsEx != 0) 546 546 { 547 Log(("VBox DisplayThread : Detected W2K or later.\n"));547 Log(("VBoxTray: VBoxDisplayThread : Detected W2K or later.\n")); 548 548 549 549 #ifdef VBOXWDDM … … 557 557 if (err == NO_ERROR) 558 558 { 559 Log(("VBox DisplayThread : VBoxDispIfResize succeeded\n"));559 Log(("VBoxTray: VBoxDisplayThread : VBoxDispIfResize succeeded\n")); 560 560 break; 561 561 } 562 Log(("VBox DisplayThread : VBoxDispIfResize failed err(%d)\n", err));562 Log(("VBoxTray: VBoxDisplayThread : VBoxDispIfResize failed err(%d)\n", err)); 563 563 } 564 564 #endif … … 575 575 else 576 576 { 577 Log(("VBox DisplayThread : Detected NT.\n"));577 Log(("VBoxTray: VBoxDisplayThread : Detected NT.\n")); 578 578 579 579 /* Single monitor NT. */ … … 585 585 if (EnumDisplaySettings(NULL, ENUM_REGISTRY_SETTINGS, &devMode)) 586 586 { 587 Log(("VBox DisplayThread : Current mode: %dx%dx%d at %d,%d\n", devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel, devMode.dmPosition.x, devMode.dmPosition.y));587 Log(("VBoxTray: VBoxDisplayThread : Current mode: %dx%dx%d at %d,%d\n", devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel, devMode.dmPosition.x, devMode.dmPosition.y)); 588 588 589 589 /* Check whether a mode reset or a change is requested. */ … … 603 603 { 604 604 /* All zero values means a forced mode reset. Do nothing. */ 605 Log(("VBox DisplayThread : Forced mode reset.\n"));605 Log(("VBoxTray: VBoxDisplayThread : Forced mode reset.\n")); 606 606 } 607 607 … … 611 611 && devMode.dmBitsPerPel == displayChangeRequest.bpp) 612 612 { 613 Log(("VBox DisplayThread : already at desired resolution.\n"));613 Log(("VBoxTray: VBoxDisplayThread : already at desired resolution.\n")); 614 614 break; 615 615 } … … 629 629 devMode.dmBitsPerPel = displayChangeRequest.bpp; 630 630 631 Log(("VBox DisplayThread : setting the new mode %dx%dx%d\n", devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel));631 Log(("VBoxTray: VBoxDisplayThread : setting the new mode %dx%dx%d\n", devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel)); 632 632 633 633 /* set the new mode */ … … 635 635 if (status != DISP_CHANGE_SUCCESSFUL) 636 636 { 637 Log(("VBox DisplayThread : error from ChangeDisplaySettings: %d\n", status));637 Log(("VBoxTray: VBoxDisplayThread : error from ChangeDisplaySettings: %d\n", status)); 638 638 639 639 if (status == DISP_CHANGE_BADMODE) … … 651 651 else 652 652 { 653 Log(("VBox DisplayThread : error from EnumDisplaySettings: %d\n", GetLastError ()));653 Log(("VBoxTray: VBoxDisplayThread : error from EnumDisplaySettings: %d\n", GetLastError ())); 654 654 break; 655 655 } … … 658 658 else 659 659 { 660 Log(("VBox DisplayThread : vboxDisplayDriver is not active.\n"));660 Log(("VBoxTray: VBoxDisplayThread : vboxDisplayDriver is not active.\n")); 661 661 } 662 662 … … 671 671 else 672 672 { 673 Log(("VBox DisplayThread : error from DeviceIoControl VBOXGUEST_IOCTL_VMMREQUEST\n"));673 Log(("VBoxTray: VBoxDisplayThread : error from DeviceIoControl VBOXGUEST_IOCTL_VMMREQUEST\n")); 674 674 /* sleep a bit to not eat too much CPU while retrying */ 675 675 /* are we supposed to stop? */ … … 686 686 } else 687 687 { 688 Log(("VBox DisplayThread : error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n"));688 Log(("VBoxTray: VBoxDisplayThread : error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n")); 689 689 /* sleep a bit to not eat too much CPU in case the above call always fails */ 690 690 if (WaitForSingleObject(pCtx->pEnv->hStopEvent, 10) == WAIT_OBJECT_0) … … 700 700 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 701 701 { 702 Log(("VBox DisplayThread : DeviceIOControl(CtlMask - not) succeeded\n"));702 Log(("VBoxTray: VBoxDisplayThread : DeviceIOControl(CtlMask - not) succeeded\n")); 703 703 } 704 704 else 705 705 { 706 Log(("VBox DisplayThread : DeviceIOControl(CtlMask) failed\n"));707 } 708 709 Log(("VBox DisplayThread : finished display change request thread\n"));706 Log(("VBoxTray: VBoxDisplayThread : DeviceIOControl(CtlMask) failed\n")); 707 } 708 709 Log(("VBoxTray: VBoxDisplayThread : finished display change request thread\n")); 710 710 return 0; 711 711 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxRestore.cpp
r28800 r32249 38 38 int VBoxRestoreInit(const VBOXSERVICEENV *pEnv, void **ppInstance, bool *pfStartThread) 39 39 { 40 Log(("VBox RestoreInit\n"));40 Log(("VBoxTray: VBoxRestoreInit\n")); 41 41 42 42 gCtx.pEnv = pEnv; … … 53 53 void VBoxRestoreDestroy(const VBOXSERVICEENV *pEnv, void *pInstance) 54 54 { 55 Log(("VBox RestoreDestroy\n"));55 Log(("VBoxTray: VBoxRestoreDestroy\n")); 56 56 return; 57 57 } … … 71 71 /* send to display driver */ 72 72 ret = VBoxDispIfEscape(&gCtx.pEnv->dispIf, &escape, 0); 73 Log(("VBox RestoreSession -> VRDP activate state = %d\n", ret));73 Log(("VBoxTray: VBoxRestoreSession -> VRDP activate state = %d\n", ret)); 74 74 75 75 if (ret != gCtx.fRDPState) … … 79 79 if (!DeviceIoControl (gCtx.pEnv->hDriver, ret == NO_ERROR ? VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION : VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION, NULL, 0, NULL, 0, &cbReturned, NULL)) 80 80 { 81 Log(("VBox RestoreThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n"));81 Log(("VBoxTray: VBoxRestoreThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n")); 82 82 } 83 83 gCtx.fRDPState = ret; … … 101 101 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 102 102 { 103 Log(("VBox RestoreThread: DeviceIOControl(CtlMask - or) succeeded\n"));103 Log(("VBoxTray: VBoxRestoreThread: DeviceIOControl(CtlMask - or) succeeded\n")); 104 104 } 105 105 else 106 106 { 107 Log(("VBox RestoreThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n"));107 Log(("VBoxTray: VBoxRestoreThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n")); 108 108 return 0; 109 109 } … … 117 117 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent), &waitEvent, sizeof(waitEvent), &cbReturned, NULL)) 118 118 { 119 Log(("VBox RestoreThread: DeviceIOControl succeded\n"));119 Log(("VBoxTray: VBoxRestoreThread: DeviceIOControl succeded\n")); 120 120 121 121 /* are we supposed to stop? */ … … 123 123 break; 124 124 125 Log(("VBox RestoreThread: checking event\n"));125 Log(("VBoxTray: VBoxRestoreThread: checking event\n")); 126 126 127 127 /* did we get the right event? */ … … 134 134 else 135 135 { 136 Log(("VBoxTray: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n"));136 Log(("VBoxTray: VBoxTray: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n")); 137 137 138 138 /* sleep a bit to not eat too much CPU in case the above call always fails */ … … 150 150 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 151 151 { 152 Log(("VBox RestoreThread: DeviceIOControl(CtlMask - not) succeeded\n"));152 Log(("VBoxTray: VBoxRestoreThread: DeviceIOControl(CtlMask - not) succeeded\n")); 153 153 } 154 154 else 155 155 { 156 Log(("VBox RestoreThread: DeviceIOControl(CtlMask) failed\n"));156 Log(("VBoxTray: VBoxRestoreThread: DeviceIOControl(CtlMask) failed\n")); 157 157 } 158 158 159 Log(("VBox RestoreThread: finished seamless change request thread\n"));159 Log(("VBoxTray: VBoxRestoreThread: finished seamless change request thread\n")); 160 160 return 0; 161 161 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxSeamless.cpp
r28800 r32249 52 52 int VBoxSeamlessInit(const VBOXSERVICEENV *pEnv, void **ppInstance, bool *pfStartThread) 53 53 { 54 Log(("VBox SeamlessInit\n"));54 Log(("VBoxTray: VBoxSeamlessInit\n")); 55 55 56 56 *pfStartThread = false; … … 65 65 if (OSinfo.dwMajorVersion <= 4) /* Windows NT 4.0 or older */ 66 66 { 67 Log(("VBox SeamlessInit: Windows NT 4.0 or older not supported!\n"));67 Log(("VBoxTray: VBoxSeamlessInit: Windows NT 4.0 or older not supported!\n")); 68 68 return VERR_NOT_SUPPORTED; 69 69 } … … 85 85 &vmmreqGuestCaps, sizeof(vmmreqGuestCaps), &cbReturned, NULL)) 86 86 { 87 Log(("VBox SeamlessInit: VMMDevReq_ReportGuestCapabilities: error doing IOCTL, last error: %d\n", GetLastError()));87 Log(("VBoxTray: VBoxSeamlessInit: VMMDevReq_ReportGuestCapabilities: error doing IOCTL, last error: %d\n", GetLastError())); 88 88 return VERR_INVALID_PARAMETER; 89 89 } … … 95 95 else 96 96 { 97 Log(("VBox SeamlessInit: LoadLibrary failed with %d\n", GetLastError()));97 Log(("VBoxTray: VBoxSeamlessInit: LoadLibrary failed with %d\n", GetLastError())); 98 98 return VERR_INVALID_PARAMETER; 99 99 } … … 105 105 void VBoxSeamlessDestroy(const VBOXSERVICEENV *pEnv, void *pInstance) 106 106 { 107 Log(("VBox SeamlessDestroy\n"));107 Log(("VBoxTray: VBoxSeamlessDestroy\n")); 108 108 /* inform the host that we no longer support the seamless window mode */ 109 109 VMMDevReqGuestCapabilities vmmreqGuestCaps = {0}; … … 115 115 &vmmreqGuestCaps, sizeof(vmmreqGuestCaps), &cbReturned, NULL)) 116 116 { 117 Log(("V MMDevReq_ReportGuestCapabilities: error doing IOCTL, last error: %d\n", GetLastError()));117 Log(("VBoxTray: VMMDevReq_ReportGuestCapabilities: error doing IOCTL, last error: %d\n", GetLastError())); 118 118 } 119 119 … … 161 161 return TRUE; 162 162 163 Log(("VBox EnumFunc %x\n", hwnd));163 Log(("VBoxTray: VBoxEnumFunc %x\n", hwnd)); 164 164 /* Only visible windows that are present on the desktop are interesting here */ 165 165 #ifndef MMSEAMLESS … … 182 182 && dwExStyle == (WS_EX_LAYERED|WS_EX_TOOLWINDOW|WS_EX_TRANSPARENT|WS_EX_TOPMOST)) 183 183 { 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)); 185 185 return TRUE; 186 186 } … … 189 189 if (strcmp(szWindowText, "Program Manager")) 190 190 { 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)); 193 193 194 194 HRGN hrgn = CreateRectRgn(0,0,0,0); … … 198 198 if (ret == ERROR) 199 199 { 200 Log((" GetWindowRgn failed with rc=%d\n", GetLastError()));200 Log(("VBoxTray: GetWindowRgn failed with rc=%d\n", GetLastError())); 201 201 SetRectRgn(hrgn, rectVisible.left, rectVisible.top, rectVisible.right, rectVisible.bottom); 202 202 } … … 217 217 else 218 218 { 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)); 221 221 } 222 222 } … … 233 233 #ifndef MMSEAMLESS 234 234 GetWindowRect(GetDesktopWindow(), ¶m.rect); 235 Log(("VBox RecheckVisibleWindows 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)); 236 236 #endif 237 237 EnumWindows(VBoxEnumFunc, (LPARAM)¶m); … … 255 255 #ifdef DEBUG 256 256 RECT *lpRect = (RECT *)&lpRgnData->Buffer[0]; 257 Log((" New visible region: \n"));257 Log(("VBoxTray: New visible region: \n")); 258 258 259 259 for (DWORD i=0;i<lpRgnData->rdh.nCount;i++) 260 260 { 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)); 262 262 } 263 263 #endif … … 275 275 } 276 276 else 277 Log(("V isible rectangles haven't changed; ignore\n"));277 Log(("VBoxTray: Visible rectangles haven't changed; ignore\n")); 278 278 } 279 279 if (lpEscapeData != gCtx.lpEscapeData) … … 305 305 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 306 306 { 307 Log(("VBox SeamlessThread: DeviceIOControl(CtlMask - or) succeeded\n"));307 Log(("VBoxTray: VBoxSeamlessThread: DeviceIOControl(CtlMask - or) succeeded\n")); 308 308 } 309 309 else 310 310 { 311 Log(("VBox SeamlessThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n"));311 Log(("VBoxTray: VBoxSeamlessThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n")); 312 312 return 0; 313 313 } … … 321 321 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent), &waitEvent, sizeof(waitEvent), &cbReturned, NULL)) 322 322 { 323 Log(("VBox SeamlessThread: DeviceIOControl succeded\n"));323 Log(("VBoxTray: VBoxSeamlessThread: DeviceIOControl succeded\n")); 324 324 325 325 /* are we supposed to stop? */ … … 327 327 break; 328 328 329 Log(("VBox SeamlessThread: checking event\n"));329 Log(("VBoxTray: VBoxSeamlessThread: checking event\n")); 330 330 331 331 /* did we get the right event? */ 332 332 if (waitEvent.u32EventFlagsOut & VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST) 333 333 { 334 Log(("VBoxTray: going to get seamless change information.\n"));334 Log(("VBoxTray: VBoxTray: going to get seamless change information.\n")); 335 335 336 336 /* We got at least one event. Read the requested resolution … … 349 349 if (fSeamlessChangeQueried) 350 350 { 351 Log(("VBox SeamlessThread: mode change to %d\n", seamlessChangeRequest.mode));351 Log(("VBoxTray: VBoxSeamlessThread: mode change to %d\n", seamlessChangeRequest.mode)); 352 352 353 353 switch(seamlessChangeRequest.mode) … … 356 356 if (fWasScreenSaverActive) 357 357 { 358 Log((" Re-enabling the screensaver\n"));358 Log(("VBoxTray: Re-enabling the screensaver\n")); 359 359 ret = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, TRUE, NULL, 0); 360 360 if (!ret) 361 Log((" SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError()));361 Log(("VBoxTray: SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError())); 362 362 } 363 363 PostMessage(gToolWindow, WM_VBOX_REMOVE_SEAMLESS_HOOK, 0, 0); … … 367 367 ret = SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, &fWasScreenSaverActive, 0); 368 368 if (!ret) 369 Log((" SystemParametersInfo SPI_GETSCREENSAVEACTIVE failed with %d\n", GetLastError()));369 Log(("VBoxTray: SystemParametersInfo SPI_GETSCREENSAVEACTIVE failed with %d\n", GetLastError())); 370 370 371 371 if (fWasScreenSaverActive) 372 Log((" Disabling the screensaver\n"));372 Log(("VBoxTray: Disabling the screensaver\n")); 373 373 374 374 ret = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, NULL, 0); 375 375 if (!ret) 376 Log((" SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError()));376 Log(("VBoxTray: SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError())); 377 377 PostMessage(gToolWindow, WM_VBOX_INSTALL_SEAMLESS_HOOK, 0, 0); 378 378 break; … … 389 389 else 390 390 { 391 Log(("VBox SeamlessThread: error from DeviceIoControl VBOXGUEST_IOCTL_VMMREQUEST\n"));391 Log(("VBoxTray: VBoxSeamlessThread: error from DeviceIoControl VBOXGUEST_IOCTL_VMMREQUEST\n")); 392 392 } 393 393 /* sleep a bit to not eat too much CPU while retrying */ … … 403 403 else 404 404 { 405 Log(("VBoxTray: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n"));405 Log(("VBoxTray: VBoxTray: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n")); 406 406 /* sleep a bit to not eat too much CPU in case the above call always fails */ 407 407 if (WaitForSingleObject(pCtx->pEnv->hStopEvent, 10) == WAIT_OBJECT_0) … … 418 418 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 419 419 { 420 Log(("VBox SeamlessThread: DeviceIOControl(CtlMask - not) succeeded\n"));420 Log(("VBoxTray: VBoxSeamlessThread: DeviceIOControl(CtlMask - not) succeeded\n")); 421 421 } 422 422 else 423 423 { 424 Log(("VBox SeamlessThread: DeviceIOControl(CtlMask) failed\n"));425 } 426 427 Log(("VBox SeamlessThread: 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")); 428 428 return 0; 429 429 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp
r31145 r32249 93 93 if (hIcon == NULL) 94 94 { 95 Log((" Could not load tray icon, err %08X\n", GetLastError()));95 Log(("VBoxTray: Could not load tray icon, err %08X\n", GetLastError())); 96 96 return FALSE; 97 97 } … … 112 112 if (!fCreated) 113 113 { 114 Log((" Could not create tray icon, err %08X\n", GetLastError()));114 Log(("VBoxTray: Could not create tray icon, err %08X\n", GetLastError())); 115 115 RT_ZERO(gNotifyIconData); 116 116 } … … 152 152 while (pTable->pszName) 153 153 { 154 Log((" Starting %s...\n", pTable->pszName));154 Log(("VBoxTray: Starting %s...\n", pTable->pszName)); 155 155 156 156 int rc = VINF_SUCCESS; … … 169 169 if (RT_FAILURE (rc)) 170 170 { 171 Log((" Failed to initialize rc = %Rrc.\n", rc));171 Log(("VBoxTray: Failed to initialize rc = %Rrc.\n", rc)); 172 172 } 173 173 else … … 192 192 if (RT_FAILURE (rc)) 193 193 { 194 Log((" Failed to start the thread.\n"));194 Log(("VBoxTray: Failed to start the thread.\n")); 195 195 196 196 if (pTable->pfnDestroy)
Note:
See TracChangeset
for help on using the changeset viewer.