Changeset 10777 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Jul 21, 2008 2:17:40 PM (17 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/VBoxTray
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
r10552 r10777 214 214 rc = VBoxHGCMParmUInt32Get (&parms.size, &u32Size); 215 215 216 dprintf(("vboxClipboardReadData: actual size = %d, rc = %d\n", u32Size, rc));216 Log (("vboxClipboardReadData: actual size = %d, rc = %d\n", u32Size, rc)); 217 217 218 218 if (VBOX_SUCCESS (rc)) … … 234 234 // if (vboxClipboardIsSameAsLastSent (pCtx, u32Format, pv, cb)) 235 235 // { 236 // dprintf(("vboxClipboardWriteData: The data to be sent are the same as the last sent.\n"));236 // Log (("vboxClipboardWriteData: The data to be sent are the same as the last sent.\n")); 237 237 // return VINF_SUCCESS; 238 238 // } … … 266 266 while ((format = EnumClipboardFormats (format)) != 0) 267 267 { 268 dprintf(("vboxClipboardChanged: format 0x%08X\n", format));268 Log (("vboxClipboardChanged: format 0x%08X\n", format)); 269 269 switch (format) 270 270 { … … 315 315 HWND hwndNext = (HWND)lParam; 316 316 317 dprintf(("vboxClipboardProcessMsg: WM_CHANGECBCHAIN: hwndRemoved %p, hwndNext %p, hwnd %p\n", hwndRemoved, hwndNext, pCtx->hwnd));317 Log (("vboxClipboardProcessMsg: WM_CHANGECBCHAIN: hwndRemoved %p, hwndNext %p, hwnd %p\n", hwndRemoved, hwndNext, pCtx->hwnd)); 318 318 319 319 if (hwndRemoved == pCtx->hwndNextInChain) … … 336 336 case WM_DRAWCLIPBOARD: 337 337 { 338 dprintf(("vboxClipboardProcessMsg: WM_DRAWCLIPBOARD, hwnd %p\n", pCtx->hwnd));338 Log (("vboxClipboardProcessMsg: WM_DRAWCLIPBOARD, hwnd %p\n", pCtx->hwnd)); 339 339 340 340 if (GetClipboardOwner () != hwnd) … … 360 360 UINT format = (UINT)wParam; 361 361 362 dprintf(("vboxClipboardProcessMsg: WM_RENDERFORMAT, format %x\n", format));362 Log (("vboxClipboardProcessMsg: WM_RENDERFORMAT, format %x\n", format)); 363 363 364 364 switch (format) … … 402 402 /* Preallocate a buffer, most of small text transfers will fit into it. */ 403 403 HANDLE hMem = GlobalAlloc (GMEM_DDESHARE | GMEM_MOVEABLE, cbPrealloc); 404 dprintf(("hMem %p\n", hMem));404 Log(("hMem %p\n", hMem)); 405 405 406 406 if (hMem) 407 407 { 408 408 void *pMem = GlobalLock (hMem); 409 dprintf(("pMem %p, GlobalSize %d\n", pMem, GlobalSize (hMem)));409 Log(("pMem %p, GlobalSize %d\n", pMem, GlobalSize (hMem))); 410 410 411 411 if (pMem) … … 413 413 /* Read the host data to the preallocated buffer. */ 414 414 int vboxrc = vboxClipboardReadData (pCtx, u32Format, pMem, cbPrealloc, &cb); 415 dprintf(("vboxClipboardReadData vboxrc %d\n", vboxrc));415 Log(("vboxClipboardReadData vboxrc %d\n", vboxrc)); 416 416 417 417 if (VBOX_SUCCESS (rc)) … … 423 423 /* The preallocated buffer is too small, adjust the size. */ 424 424 hMem = GlobalReAlloc (hMem, cb, 0); 425 dprintf(("hMem %p\n", hMem));425 Log(("hMem %p\n", hMem)); 426 426 427 427 if (hMem) 428 428 { 429 429 pMem = GlobalLock (hMem); 430 dprintf(("pMem %p, GlobalSize %d\n", pMem, GlobalSize (hMem)));430 Log(("pMem %p, GlobalSize %d\n", pMem, GlobalSize (hMem))); 431 431 432 432 if (pMem) … … 435 435 uint32_t cbNew = 0; 436 436 vboxrc = vboxClipboardReadData (pCtx, u32Format, pMem, cb, &cbNew); 437 dprintf(("vboxClipboardReadData vboxrc %d, cb = %d, cbNew = %d\n", vboxrc, cb, cbNew));437 Log(("vboxClipboardReadData vboxrc %d, cb = %d, cbNew = %d\n", vboxrc, cb, cbNew)); 438 438 439 439 if (VBOX_SUCCESS (vboxrc) && cbNew <= cb) … … 468 468 469 469 hMem = GlobalReAlloc (hMem, cb, 0); 470 dprintf(("hMem %p\n", hMem));470 Log(("hMem %p\n", hMem)); 471 471 472 472 if (hMem) … … 476 476 */ 477 477 HANDLE hClip = SetClipboardData (format, hMem); 478 dprintf(("WM_RENDERFORMAT hClip %p\n", hClip));478 Log(("WM_RENDERFORMAT hClip %p\n", hClip)); 479 479 480 480 if (hClip) … … 532 532 if (u32Formats & VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT) 533 533 { 534 dprintf(("window proc WM_USER: VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT\n"));534 Log(("window proc WM_USER: VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT\n")); 535 535 536 536 hClip = SetClipboardData (CF_UNICODETEXT, NULL); … … 539 539 if (u32Formats & VBOX_SHARED_CLIPBOARD_FMT_BITMAP) 540 540 { 541 dprintf(("window proc WM_USER: VBOX_SHARED_CLIPBOARD_FMT_BITMAP\n"));541 Log(("window proc WM_USER: VBOX_SHARED_CLIPBOARD_FMT_BITMAP\n")); 542 542 543 543 hClip = SetClipboardData (CF_DIB, NULL); … … 547 547 { 548 548 UINT format = RegisterClipboardFormat ("HTML Format"); 549 dprintf(("window proc WM_USER: VBOX_SHARED_CLIPBOARD_FMT_HTML 0x%04X\n", format));549 Log(("window proc WM_USER: VBOX_SHARED_CLIPBOARD_FMT_HTML 0x%04X\n", format)); 550 550 if (format != 0) 551 551 { … … 556 556 CloseClipboard(); 557 557 558 dprintf(("window proc WM_USER: hClip %p, err %d\n", hClip, GetLastError ()));558 Log(("window proc WM_USER: hClip %p, err %d\n", hClip, GetLastError ())); 559 559 } 560 560 else 561 561 { 562 dprintf(("window proc WM_USER: failed to open clipboard\n"));562 Log(("window proc WM_USER: failed to open clipboard\n")); 563 563 } 564 564 } break; … … 583 583 if (lp != NULL) 584 584 { 585 dprintf(("CF_DIB\n"));585 Log(("CF_DIB\n")); 586 586 587 587 vboxClipboardWriteData (pCtx, VBOX_SHARED_CLIPBOARD_FMT_BITMAP, … … 606 606 if (uniString != NULL) 607 607 { 608 dprintf(("CF_UNICODETEXT\n"));608 Log(("CF_UNICODETEXT\n")); 609 609 610 610 vboxClipboardWriteData (pCtx, VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT, … … 633 633 if (lp != NULL) 634 634 { 635 dprintf(("CF_HTML\n"));635 Log(("CF_HTML\n")); 636 636 637 637 vboxClipboardWriteData (pCtx, VBOX_SHARED_CLIPBOARD_FMT_HTML, … … 748 748 int rc = VINF_SUCCESS; 749 749 750 dprintf(("VboxClipboardInit\n"));750 Log (("VboxClipboardInit\n")); 751 751 752 752 if (gCtx.pEnv) … … 766 766 rc = vboxClipboardInit (&gCtx); 767 767 768 dprintf(("vboxClipboardInit: rc = %d\n", rc));768 Log (("vboxClipboardInit: rc = %d\n", rc)); 769 769 770 770 if (VBOX_SUCCESS (rc)) … … 791 791 VBOXCLIPBOARDCONTEXT *pCtx = (VBOXCLIPBOARDCONTEXT *)pInstance; 792 792 793 dprintf(("VBoxClipboardThread\n"));793 Log(("VBoxClipboardThread\n")); 794 794 795 795 /* Open the new driver instance to not interfere with other callers. */ … … 821 821 NULL)) 822 822 { 823 dprintf(("Failed to call the driver for host message.\n"));823 Log(("Failed to call the driver for host message.\n")); 824 824 825 825 /* Wait a bit before retrying. */ … … 847 847 if (VBOX_SUCCESS (rc)) 848 848 { 849 dprintf(("vboxClipboardHostEvent u32Msg %d, u32Formats %d\n", u32Msg, u32Formats));849 Log(("vboxClipboardHostEvent u32Msg %d, u32Formats %d\n", u32Msg, u32Formats)); 850 850 851 851 switch (u32Msg) … … 873 873 default: 874 874 { 875 dprintf(("Unsupported message from host!!!"));875 Log(("Unsupported message from host!!!")); 876 876 } 877 877 } … … 898 898 } 899 899 900 dprintf(("processed host event rc = %d\n", rc));900 Log(("processed host event rc = %d\n", rc)); 901 901 } 902 902 … … 912 912 if (pCtx != &gCtx) 913 913 { 914 dprintf(("VBoxClipboardDestroy: invalid instance %p (our %p)!!!\n", pCtx, &gCtx));914 Log(("VBoxClipboardDestroy: invalid instance %p (our %p)!!!\n", pCtx, &gCtx)); 915 915 916 916 pCtx = &gCtx; -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp
r10552 r10777 57 57 if (NULL == hUser) 58 58 { 59 dprintf(("VBoxTray: Could not get module handle of USER32.DLL!\n"));59 Log(("VBoxTray: Could not get module handle of USER32.DLL!\n")); 60 60 return VERR_NOT_IMPLEMENTED; 61 61 } … … 63 63 { 64 64 *(uintptr_t *)&gCtx.pfnChangeDisplaySettingsEx = (uintptr_t)GetProcAddress(hUser, "ChangeDisplaySettingsExA"); 65 dprintf(("VBoxTray: pfnChangeDisplaySettingsEx = %p\n", gCtx.pfnChangeDisplaySettingsEx));65 Log(("VBoxTray: pfnChangeDisplaySettingsEx = %p\n", gCtx.pfnChangeDisplaySettingsEx)); 66 66 67 67 *(uintptr_t *)&gCtx.pfnEnumDisplayDevices = (uintptr_t)GetProcAddress(hUser, "EnumDisplayDevicesA"); 68 dprintf(("VBoxTray: pfnEnumDisplayDevices = %p\n", gCtx.pfnEnumDisplayDevices));68 Log(("VBoxTray: pfnEnumDisplayDevices = %p\n", gCtx.pfnEnumDisplayDevices)); 69 69 } 70 70 else if (OSinfo.dwMajorVersion <= 4) /* Windows NT 4.0 */ … … 74 74 else /* Unsupported platform */ 75 75 { 76 dprintf(("VBoxTray: Warning, display for platform not handled yet!\n"));76 Log(("VBoxTray: Warning, display for platform not handled yet!\n")); 77 77 return VERR_NOT_IMPLEMENTED; 78 78 } 79 79 80 dprintf(("VBoxTray: Display init successful.\n"));80 Log(("VBoxTray: Display init successful.\n")); 81 81 82 82 *pfStartThread = true; … … 101 101 dispDevice.cb = sizeof(DISPLAY_DEVICE); 102 102 103 dprintf(("Checking for active VBox display driver (W2K+)...\n"));103 Log(("Checking for active VBox display driver (W2K+)...\n")); 104 104 105 105 while (EnumDisplayDevices(NULL, … … 108 108 0)) 109 109 { 110 dprintf(("DevNum:%d\nName:%s\nString:%s\nID:%s\nKey:%s\nFlags=%08X\n\n",110 Log(("DevNum:%d\nName:%s\nString:%s\nID:%s\nKey:%s\nFlags=%08X\n\n", 111 111 devNum, 112 112 &dispDevice.DeviceName[0], … … 118 118 if (dispDevice.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) 119 119 { 120 dprintf(("Primary device.\n"));120 Log(("Primary device.\n")); 121 121 122 122 if (strcmp(&dispDevice.DeviceString[0], "VirtualBox Graphics Adapter") == 0) … … 135 135 else /* This must be NT 4 or something really old, so don't use EnumDisplayDevices() here ... */ 136 136 { 137 dprintf(("Checking for active VBox display driver (NT or older)...\n"));137 Log(("Checking for active VBox display driver (NT or older)...\n")); 138 138 139 139 DEVMODE tempDevMode; … … 165 165 while (EnumDisplayDevices (NULL, i, &DisplayDevice, 0)) 166 166 { 167 dprintf(("[%d] %s\n", i, DisplayDevice.DeviceName));167 Log(("[%d] %s\n", i, DisplayDevice.DeviceName)); 168 168 169 169 if (DisplayDevice.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) 170 170 { 171 dprintf(("Found primary device. err %d\n", GetLastError ()));171 Log(("Found primary device. err %d\n", GetLastError ())); 172 172 NumDevices++; 173 173 } … … 175 175 { 176 176 177 dprintf(("Found secondary device. err %d\n", GetLastError ()));177 Log(("Found secondary device. err %d\n", GetLastError ())); 178 178 NumDevices++; 179 179 } … … 184 184 } 185 185 186 dprintf(("Found total %d devices. err %d\n", NumDevices, GetLastError ()));186 Log(("Found total %d devices. err %d\n", NumDevices, GetLastError ())); 187 187 188 188 if (NumDevices == 0 || Id >= NumDevices) 189 189 { 190 dprintf(("Requested identifier %d is invalid. err %d\n", Id, GetLastError ()));190 Log(("Requested identifier %d is invalid. err %d\n", Id, GetLastError ())); 191 191 return FALSE; 192 192 } … … 206 206 while (EnumDisplayDevices (NULL, i, &DisplayDevice, 0)) 207 207 { 208 dprintf(("[%d(%d)] %s\n", i, DevNum, DisplayDevice.DeviceName));208 Log(("[%d(%d)] %s\n", i, DevNum, DisplayDevice.DeviceName)); 209 209 210 210 BOOL bFetchDevice = FALSE; … … 212 212 if (DisplayDevice.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) 213 213 { 214 dprintf(("Found primary device. err %d\n", GetLastError ()));214 Log(("Found primary device. err %d\n", GetLastError ())); 215 215 DevPrimaryNum = DevNum; 216 216 bFetchDevice = TRUE; … … 219 219 { 220 220 221 dprintf(("Found secondary device. err %d\n", GetLastError ()));221 Log(("Found secondary device. err %d\n", GetLastError ())); 222 222 bFetchDevice = TRUE; 223 223 } … … 227 227 if (DevNum >= NumDevices) 228 228 { 229 dprintf(("%d >= %d\n", NumDevices, DevNum));229 Log(("%d >= %d\n", NumDevices, DevNum)); 230 230 return FALSE; 231 231 } … … 238 238 ENUM_REGISTRY_SETTINGS, &paDeviceModes[DevNum])) 239 239 { 240 dprintf(("EnumDisplaySettings err %d\n", GetLastError ()));240 Log(("EnumDisplaySettings err %d\n", GetLastError ())); 241 241 return FALSE; 242 242 } 243 243 244 dprintf(("%dx%d at %d,%d\n",244 Log(("%dx%d at %d,%d\n", 245 245 paDeviceModes[DevNum].dmPelsWidth, 246 246 paDeviceModes[DevNum].dmPelsHeight, … … 281 281 && paDeviceModes[Id].dmBitsPerPel == BitsPerPixel) 282 282 { 283 dprintf(("VBoxDisplayThread : already at desired resolution.\n"));283 Log(("VBoxDisplayThread : already at desired resolution.\n")); 284 284 return FALSE; 285 285 } 286 286 287 287 resizeRect(paRects, NumDevices, DevPrimaryNum, Id, Width, Height); 288 #ifdef dprintf288 #ifdef Log 289 289 for (i = 0; i < NumDevices; i++) 290 290 { 291 dprintf(("[%d]: %d,%d %dx%d\n",291 Log(("[%d]: %d,%d %dx%d\n", 292 292 i, paRects[i].left, paRects[i].top, 293 293 paRects[i].right - paRects[i].left, 294 294 paRects[i].bottom - paRects[i].top)); 295 295 } 296 #endif /* dprintf*/296 #endif /* Log */ 297 297 298 298 /* Without this, Windows will not ask the miniport for its … … 321 321 } 322 322 323 dprintf(("calling pfnChangeDisplaySettingsEx %x\n", gCtx.pfnChangeDisplaySettingsEx));323 Log(("calling pfnChangeDisplaySettingsEx %x\n", gCtx.pfnChangeDisplaySettingsEx)); 324 324 325 325 gCtx.pfnChangeDisplaySettingsEx((LPSTR)paDisplayDevices[i].DeviceName, 326 326 &paDeviceModes[i], NULL, CDS_NORESET | CDS_UPDATEREGISTRY, NULL); 327 327 328 dprintf(("ChangeDisplaySettings position err %d\n", GetLastError ()));328 Log(("ChangeDisplaySettings position err %d\n", GetLastError ())); 329 329 } 330 330 331 331 /* A second call to ChangeDisplaySettings updates the monitor. */ 332 332 LONG status = ChangeDisplaySettings(NULL, 0); 333 dprintf(("ChangeDisplaySettings update status %d\n", status));333 Log(("ChangeDisplaySettings update status %d\n", status)); 334 334 if (status == DISP_CHANGE_SUCCESSFUL || status == DISP_CHANGE_BADMODE) 335 335 { … … 358 358 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 359 359 { 360 dprintf(("VBoxDisplayThread : DeviceIOControl(CtlMask - or) succeeded\n"));360 Log(("VBoxDisplayThread : DeviceIOControl(CtlMask - or) succeeded\n")); 361 361 } 362 362 else 363 363 { 364 dprintf(("VBoxDisplayThread : DeviceIOControl(CtlMask) failed, DisplayChangeThread exited\n"));364 Log(("VBoxDisplayThread : DeviceIOControl(CtlMask) failed, DisplayChangeThread exited\n")); 365 365 return -1; 366 366 } … … 374 374 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent), &waitEvent, sizeof(waitEvent), &cbReturned, NULL)) 375 375 { 376 dprintf(("VBoxDisplayThread : DeviceIOControl succeded\n"));376 Log(("VBoxDisplayThread : DeviceIOControl succeded\n")); 377 377 378 378 if (NULL == pCtx) { 379 dprintf(("VBoxDisplayThread : Invalid context detected!\n"));379 Log(("VBoxDisplayThread : Invalid context detected!\n")); 380 380 break; 381 381 } 382 382 383 383 if (NULL == pCtx->pEnv) { 384 dprintf(("VBoxDisplayThread : Invalid context environment detected!\n"));384 Log(("VBoxDisplayThread : Invalid context environment detected!\n")); 385 385 break; 386 386 } … … 390 390 break; 391 391 392 dprintf(("VBoxDisplayThread : checking event\n"));392 Log(("VBoxDisplayThread : checking event\n")); 393 393 394 394 /* did we get the right event? */ 395 395 if (waitEvent.u32EventFlagsOut & VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST) 396 396 { 397 dprintf(("VBoxDisplayThread : going to get display change information.\n"));397 Log(("VBoxDisplayThread : going to get display change information.\n")); 398 398 399 399 /* We got at least one event. Read the requested resolution … … 425 425 if (fDisplayChangeQueried) 426 426 { 427 dprintf(("VBoxDisplayThread : VMMDevReq_GetDisplayChangeRequest2: %dx%dx%d at %d\n", displayChangeRequest.xres, displayChangeRequest.yres, displayChangeRequest.bpp, displayChangeRequest.display));427 Log(("VBoxDisplayThread : VMMDevReq_GetDisplayChangeRequest2: %dx%dx%d at %d\n", displayChangeRequest.xres, displayChangeRequest.yres, displayChangeRequest.bpp, displayChangeRequest.display)); 428 428 429 429 /* Horizontal resolution must be a multiple of 8, round down. */ … … 435 435 if (isVBoxDisplayDriverActive (pCtx)) 436 436 { 437 dprintf(("VBoxDisplayThread : Display driver is active!\n"));437 Log(("VBoxDisplayThread : Display driver is active!\n")); 438 438 439 439 if (pCtx->pfnChangeDisplaySettingsEx != 0) 440 440 { 441 dprintf(("VBoxDisplayThread : Detected W2K or later."));441 Log(("VBoxDisplayThread : Detected W2K or later.")); 442 442 443 443 /* W2K or later. */ … … 452 452 else 453 453 { 454 dprintf(("VBoxDisplayThread : Detected NT.\n"));454 Log(("VBoxDisplayThread : Detected NT.\n")); 455 455 456 456 /* Single monitor NT. */ … … 462 462 if (EnumDisplaySettings(NULL, ENUM_REGISTRY_SETTINGS, &devMode)) 463 463 { 464 dprintf(("VBoxDisplayThread : Current mode: %dx%dx%d at %d,%d\n", devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel, devMode.dmPosition.x, devMode.dmPosition.y));464 Log(("VBoxDisplayThread : Current mode: %dx%dx%d at %d,%d\n", devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel, devMode.dmPosition.x, devMode.dmPosition.y)); 465 465 466 466 /* Check whether a mode reset or a change is requested. */ … … 480 480 { 481 481 /* All zero values means a forced mode reset. Do nothing. */ 482 dprintf(("VBoxDisplayThread : Forced mode reset.\n"));482 Log(("VBoxDisplayThread : Forced mode reset.\n")); 483 483 } 484 484 … … 488 488 && devMode.dmBitsPerPel == displayChangeRequest.bpp) 489 489 { 490 dprintf(("VBoxDisplayThread : already at desired resolution.\n"));490 Log(("VBoxDisplayThread : already at desired resolution.\n")); 491 491 break; 492 492 } … … 506 506 devMode.dmBitsPerPel = displayChangeRequest.bpp; 507 507 508 dprintf(("VBoxDisplayThread : setting the new mode %dx%dx%d\n", devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel));508 Log(("VBoxDisplayThread : setting the new mode %dx%dx%d\n", devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel)); 509 509 510 510 /* set the new mode */ … … 512 512 if (status != DISP_CHANGE_SUCCESSFUL) 513 513 { 514 dprintf(("VBoxDisplayThread : error from ChangeDisplaySettings: %d\n", status));514 Log(("VBoxDisplayThread : error from ChangeDisplaySettings: %d\n", status)); 515 515 516 516 if (status == DISP_CHANGE_BADMODE) … … 528 528 else 529 529 { 530 dprintf(("VBoxDisplayThread : error from EnumDisplaySettings: %d\n", GetLastError ()));530 Log(("VBoxDisplayThread : error from EnumDisplaySettings: %d\n", GetLastError ())); 531 531 break; 532 532 } … … 535 535 else 536 536 { 537 dprintf(("VBoxDisplayThread : vboxDisplayDriver is not active.\n"));537 Log(("VBoxDisplayThread : vboxDisplayDriver is not active.\n")); 538 538 } 539 539 … … 548 548 else 549 549 { 550 dprintf(("VBoxDisplayThread : error from DeviceIoControl VBOXGUEST_IOCTL_VMMREQUEST\n"));550 Log(("VBoxDisplayThread : error from DeviceIoControl VBOXGUEST_IOCTL_VMMREQUEST\n")); 551 551 /* sleep a bit to not eat too much CPU while retrying */ 552 552 /* are we supposed to stop? */ … … 561 561 } else 562 562 { 563 dprintf(("VBoxDisplayThread : error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n"));563 Log(("VBoxDisplayThread : error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n")); 564 564 /* sleep a bit to not eat too much CPU in case the above call always fails */ 565 565 if (WaitForSingleObject(pCtx->pEnv->hStopEvent, 10) == WAIT_OBJECT_0) … … 575 575 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 576 576 { 577 dprintf(("VBoxDisplayThread : DeviceIOControl(CtlMask - not) succeeded\n"));577 Log(("VBoxDisplayThread : DeviceIOControl(CtlMask - not) succeeded\n")); 578 578 } 579 579 else 580 580 { 581 dprintf(("VBoxDisplayThread : DeviceIOControl(CtlMask) failed\n"));582 } 583 584 dprintf(("VBoxDisplayThread : finished display change request thread\n"));581 Log(("VBoxDisplayThread : DeviceIOControl(CtlMask) failed\n")); 582 } 583 584 Log(("VBoxDisplayThread : finished display change request thread\n")); 585 585 return 0; 586 586 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxMemBalloon.cpp
r10541 r10777 47 47 DWORD cbReturned; 48 48 49 dprintf(("VBoxMemBalloonInit\n"));49 Log(("VBoxMemBalloonInit: Init\n")); 50 50 51 51 gCtx.pEnv = pEnv; … … 56 56 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_CTL_CHECK_BALLOON_MASK, NULL, 0, &dwMemBalloonSize, sizeof(dwMemBalloonSize), &cbReturned, NULL)) 57 57 { 58 dprintf(("VBoxMemBalloonInit: new balloon size %d MB\n", dwMemBalloonSize));58 Log(("VBoxMemBalloonInit: new balloon size %d MB\n", dwMemBalloonSize)); 59 59 gCtx.uMemBalloonSize = dwMemBalloonSize; 60 60 } 61 61 else 62 dprintf(("VBoxMemBalloonInit: DeviceIoControl (balloon) failed with %d\n", GetLastError()));62 Log(("VBoxMemBalloonInit: DeviceIoControl (balloon) failed with %d\n", GetLastError())); 63 63 64 64 *pfStartThread = true; … … 70 70 void VBoxMemBalloonDestroy(const VBOXSERVICEENV *pEnv, void *pInstance) 71 71 { 72 dprintf(("VBoxMemBalloonDestroy\n"));72 Log(("VBoxMemBalloonDestroy\n")); 73 73 return; 74 74 } … … 95 95 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 96 96 { 97 dprintf(("VBoxMemBalloonThread: DeviceIOControl(CtlMask - or) succeeded\n"));97 Log(("VBoxMemBalloonThread: DeviceIOControl(CtlMask - or) succeeded\n")); 98 98 } 99 99 else 100 100 { 101 dprintf(("VBoxMemBalloonThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n"));101 Log(("VBoxMemBalloonThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n")); 102 102 return 0; 103 103 } … … 111 111 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent), &waitEvent, sizeof(waitEvent), &cbReturned, NULL)) 112 112 { 113 dprintf(("VBoxMemBalloonThread: DeviceIOControl succeded\n"));113 Log(("VBoxMemBalloonThread: DeviceIOControl succeded\n")); 114 114 115 115 /* are we supposed to stop? */ … … 117 117 break; 118 118 119 dprintf(("VBoxMemBalloonThread: checking event\n"));119 Log(("VBoxMemBalloonThread: checking event\n")); 120 120 121 121 /* did we get the right event? */ … … 125 125 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_CTL_CHECK_BALLOON_MASK, NULL, 0, &dwMemBalloonSize, sizeof(dwMemBalloonSize), &cbReturned, NULL)) 126 126 { 127 dprintf(("VBoxMemBalloonThread: new balloon size % MB\n", dwMemBalloonSize));127 Log(("VBoxMemBalloonThread: new balloon size % MB\n", dwMemBalloonSize)); 128 128 pCtx->uMemBalloonSize = dwMemBalloonSize; 129 129 } 130 130 else 131 dprintf(("VBoxMemBalloonThread: DeviceIoControl (balloon) failed with %d\n", GetLastError()));131 Log(("VBoxMemBalloonThread: DeviceIoControl (balloon) failed with %d\n", GetLastError())); 132 132 } 133 133 } 134 134 else 135 135 { 136 dprintf(("VBoxMemBalloonThread: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n"));136 Log(("VBoxMemBalloonThread: 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 dprintf(("VBoxMemBalloonThread: DeviceIOControl(CtlMask - not) succeeded\n"));152 Log(("VBoxMemBalloonThread: DeviceIOControl(CtlMask - not) succeeded\n")); 153 153 } 154 154 else 155 155 { 156 dprintf(("VBoxMemBalloonThread: DeviceIOControl(CtlMask) failed\n"));156 Log(("VBoxMemBalloonThread: DeviceIOControl(CtlMask) failed\n")); 157 157 } 158 158 159 dprintf(("VBoxMemBalloonThread: finished mem balloon change request thread\n"));159 Log(("VBoxMemBalloonThread: finished mem balloon change request thread\n")); 160 160 return 0; 161 161 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxRestore.cpp
r10541 r10777 43 43 int VBoxRestoreInit(const VBOXSERVICEENV *pEnv, void **ppInstance, bool *pfStartThread) 44 44 { 45 dprintf(("VBoxRestoreInit\n"));45 Log(("VBoxRestoreInit\n")); 46 46 47 47 gCtx.pEnv = pEnv; … … 58 58 void VBoxRestoreDestroy(const VBOXSERVICEENV *pEnv, void *pInstance) 59 59 { 60 dprintf(("VBoxRestoreDestroy\n"));60 Log(("VBoxRestoreDestroy\n")); 61 61 return; 62 62 } … … 77 77 /* send to display driver */ 78 78 ret = ExtEscape(hdc, VBOXESC_ISVRDPACTIVE, 0, NULL, 0, NULL); 79 dprintf(("VBoxRestoreSession -> VRDP activate state = %d\n", ret));79 Log(("VBoxRestoreSession -> VRDP activate state = %d\n", ret)); 80 80 ReleaseDC(HWND_DESKTOP, hdc); 81 81 … … 86 86 if (!DeviceIoControl (gCtx.pEnv->hDriver, (ret) ? VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION : VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION, NULL, 0, NULL, 0, &cbReturned, NULL)) 87 87 { 88 dprintf(("VBoxRestoreThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n"));88 Log(("VBoxRestoreThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n")); 89 89 } 90 90 gCtx.fRDPState = ret; … … 108 108 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 109 109 { 110 dprintf(("VBoxRestoreThread: DeviceIOControl(CtlMask - or) succeeded\n"));110 Log(("VBoxRestoreThread: DeviceIOControl(CtlMask - or) succeeded\n")); 111 111 } 112 112 else 113 113 { 114 dprintf(("VBoxRestoreThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n"));114 Log(("VBoxRestoreThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n")); 115 115 return 0; 116 116 } … … 124 124 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent), &waitEvent, sizeof(waitEvent), &cbReturned, NULL)) 125 125 { 126 dprintf(("VBoxRestoreThread: DeviceIOControl succeded\n"));126 Log(("VBoxRestoreThread: DeviceIOControl succeded\n")); 127 127 128 128 /* are we supposed to stop? */ … … 130 130 break; 131 131 132 dprintf(("VBoxRestoreThread: checking event\n"));132 Log(("VBoxRestoreThread: checking event\n")); 133 133 134 134 /* did we get the right event? */ … … 141 141 else 142 142 { 143 dprintf(("VBoxTray: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n"));143 Log(("VBoxTray: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n")); 144 144 145 145 /* sleep a bit to not eat too much CPU in case the above call always fails */ … … 157 157 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 158 158 { 159 dprintf(("VBoxRestoreThread: DeviceIOControl(CtlMask - not) succeeded\n"));159 Log(("VBoxRestoreThread: DeviceIOControl(CtlMask - not) succeeded\n")); 160 160 } 161 161 else 162 162 { 163 dprintf(("VBoxRestoreThread: DeviceIOControl(CtlMask) failed\n"));163 Log(("VBoxRestoreThread: DeviceIOControl(CtlMask) failed\n")); 164 164 } 165 165 166 dprintf(("VBoxRestoreThread: finished seamless change request thread\n"));166 Log(("VBoxRestoreThread: finished seamless change request thread\n")); 167 167 return 0; 168 168 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxSeamless.cpp
r10552 r10777 55 55 int VBoxSeamlessInit(const VBOXSERVICEENV *pEnv, void **ppInstance, bool *pfStartThread) 56 56 { 57 dprintf(("VBoxSeamlessInit\n"));57 Log(("VBoxSeamlessInit\n")); 58 58 59 59 *pfStartThread = false; … … 68 68 if (OSinfo.dwMajorVersion <= 4) /* Windows NT 4.0 or older */ 69 69 { 70 dprintf(("VBoxSeamlessInit: Windows NT 4.0 or older not supported!"));70 Log(("VBoxSeamlessInit: Windows NT 4.0 or older not supported!")); 71 71 return VERR_NOT_SUPPORTED; 72 72 } … … 88 88 &vmmreqGuestCaps, sizeof(vmmreqGuestCaps), &cbReturned, NULL)) 89 89 { 90 dprintf(("VBoxSeamlessInit: VMMDevReq_ReportGuestCapabilities: error doing IOCTL, last error: %d\n", GetLastError()));90 Log(("VBoxSeamlessInit: VMMDevReq_ReportGuestCapabilities: error doing IOCTL, last error: %d\n", GetLastError())); 91 91 return VERR_INVALID_PARAMETER; 92 92 } … … 98 98 else 99 99 { 100 dprintf(("VBoxSeamlessInit: LoadLibrary failed with %d\n", GetLastError()));100 Log(("VBoxSeamlessInit: LoadLibrary failed with %d\n", GetLastError())); 101 101 return VERR_INVALID_PARAMETER; 102 102 } … … 108 108 void VBoxSeamlessDestroy(const VBOXSERVICEENV *pEnv, void *pInstance) 109 109 { 110 dprintf(("VBoxSeamlessDestroy\n"));110 Log(("VBoxSeamlessDestroy\n")); 111 111 /* inform the host that we no longer support the seamless window mode */ 112 112 VMMDevReqGuestCapabilities vmmreqGuestCaps = {0}; … … 118 118 &vmmreqGuestCaps, sizeof(vmmreqGuestCaps), &cbReturned, NULL)) 119 119 { 120 dprintf(("VMMDevReq_ReportGuestCapabilities: error doing IOCTL, last error: %d\n", GetLastError()));120 Log(("VMMDevReq_ReportGuestCapabilities: error doing IOCTL, last error: %d\n", GetLastError())); 121 121 } 122 122 … … 164 164 return TRUE; 165 165 166 dprintf(("VBoxEnumFunc %x\n", hwnd));166 Log(("VBoxEnumFunc %x\n", hwnd)); 167 167 /* Only visible windows that are present on the desktop are interesting here */ 168 168 if ( GetWindowRect(hwnd, &rectWindow) … … 179 179 && dwExStyle == (WS_EX_LAYERED|WS_EX_TOOLWINDOW|WS_EX_TRANSPARENT|WS_EX_TOPMOST)) 180 180 { 181 dprintf(("Filter out shadow window style=%x exstyle=%x\n", dwStyle, dwExStyle));181 Log(("Filter out shadow window style=%x exstyle=%x\n", dwStyle, dwExStyle)); 182 182 return TRUE; 183 183 } … … 186 186 if (strcmp(szWindowText, "Program Manager")) 187 187 { 188 dprintf(("Enum hwnd=%x rect (%d,%d) (%d,%d)\n", hwnd, rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom));189 dprintf(("title=%s style=%x exStyle=%x\n", szWindowText, dwStyle, dwExStyle));188 Log(("Enum hwnd=%x rect (%d,%d) (%d,%d)\n", hwnd, rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom)); 189 Log(("title=%s style=%x exStyle=%x\n", szWindowText, dwStyle, dwExStyle)); 190 190 191 191 HRGN hrgn = CreateRectRgn(0,0,0,0); … … 195 195 if (ret == ERROR) 196 196 { 197 dprintf(("GetWindowRgn failed with rc=%d\n", GetLastError()));197 Log(("GetWindowRgn failed with rc=%d\n", GetLastError())); 198 198 SetRectRgn(hrgn, rectVisible.left, rectVisible.top, rectVisible.right, rectVisible.bottom); 199 199 } … … 214 214 else 215 215 { 216 dprintf(("Enum hwnd=%x rect (%d,%d) (%d,%d) (ignored)\n", hwnd, rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom));217 dprintf(("title=%s style=%x\n", szWindowText, dwStyle));216 Log(("Enum hwnd=%x rect (%d,%d) (%d,%d) (ignored)\n", hwnd, rectWindow.left, rectWindow.top, rectWindow.right, rectWindow.bottom)); 217 Log(("title=%s style=%x\n", szWindowText, dwStyle)); 218 218 } 219 219 } … … 229 229 230 230 GetWindowRect(GetDesktopWindow(), ¶m.rect); 231 dprintf(("VBoxRecheckVisibleWindows desktop=%x rect (%d,%d) (%d,%d)\n", GetDesktopWindow(), param.rect.left, param.rect.top, param.rect.right, param.rect.bottom));231 Log(("VBoxRecheckVisibleWindows desktop=%x rect (%d,%d) (%d,%d)\n", GetDesktopWindow(), param.rect.left, param.rect.top, param.rect.right, param.rect.bottom)); 232 232 EnumWindows(VBoxEnumFunc, (LPARAM)¶m); 233 233 … … 248 248 #ifdef DEBUG 249 249 RECT *lpRect = (RECT *)&lpRgnData->Buffer[0]; 250 dprintf(("New visible region: \n"));250 Log(("New visible region: \n")); 251 251 252 252 for (DWORD i=0;i<lpRgnData->rdh.nCount;i++) 253 253 { 254 dprintf(("visible rect (%d,%d)(%d,%d)\n", lpRect[i].left, lpRect[i].top, lpRect[i].right, lpRect[i].bottom));254 Log(("visible rect (%d,%d)(%d,%d)\n", lpRect[i].left, lpRect[i].top, lpRect[i].right, lpRect[i].bottom)); 255 255 } 256 256 #endif … … 267 267 } 268 268 else 269 dprintf(("Visible rectangles haven't changed; ignore\n"));269 Log(("Visible rectangles haven't changed; ignore\n")); 270 270 } 271 271 if (lpRgnData != gCtx.lpRgnData) … … 297 297 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 298 298 { 299 dprintf(("VBoxSeamlessThread: DeviceIOControl(CtlMask - or) succeeded\n"));299 Log(("VBoxSeamlessThread: DeviceIOControl(CtlMask - or) succeeded\n")); 300 300 } 301 301 else 302 302 { 303 dprintf(("VBoxSeamlessThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n"));303 Log(("VBoxSeamlessThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n")); 304 304 return 0; 305 305 } … … 313 313 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent), &waitEvent, sizeof(waitEvent), &cbReturned, NULL)) 314 314 { 315 dprintf(("VBoxSeamlessThread: DeviceIOControl succeded\n"));315 Log(("VBoxSeamlessThread: DeviceIOControl succeded\n")); 316 316 317 317 /* are we supposed to stop? */ … … 319 319 break; 320 320 321 dprintf(("VBoxSeamlessThread: checking event\n"));321 Log(("VBoxSeamlessThread: checking event\n")); 322 322 323 323 /* did we get the right event? */ 324 324 if (waitEvent.u32EventFlagsOut & VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST) 325 325 { 326 dprintf(("VBoxTray: going to get seamless change information.\n"));326 Log(("VBoxTray: going to get seamless change information.\n")); 327 327 328 328 /* We got at least one event. Read the requested resolution … … 341 341 if (fSeamlessChangeQueried) 342 342 { 343 dprintf(("VBoxSeamlessThread: mode change to %d\n", seamlessChangeRequest.mode));343 Log(("VBoxSeamlessThread: mode change to %d\n", seamlessChangeRequest.mode)); 344 344 345 345 switch(seamlessChangeRequest.mode) … … 348 348 if (fWasScreenSaverActive) 349 349 { 350 dprintf(("Re-enabling the screensaver\n"));350 Log(("Re-enabling the screensaver\n")); 351 351 ret = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, TRUE, NULL, 0); 352 352 if (!ret) 353 dprintf(("SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError()));353 Log(("SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError())); 354 354 } 355 355 PostMessage(gToolWindow, WM_VBOX_REMOVE_SEAMLESS_HOOK, 0, 0); … … 359 359 ret = SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, &fWasScreenSaverActive, 0); 360 360 if (!ret) 361 dprintf(("SystemParametersInfo SPI_GETSCREENSAVEACTIVE failed with %d\n", GetLastError()));361 Log(("SystemParametersInfo SPI_GETSCREENSAVEACTIVE failed with %d\n", GetLastError())); 362 362 363 363 if (fWasScreenSaverActive) 364 dprintf(("Disabling the screensaver\n"));364 Log(("Disabling the screensaver\n")); 365 365 366 366 ret = SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, NULL, 0); 367 367 if (!ret) 368 dprintf(("SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError()));368 Log(("SystemParametersInfo SPI_SETSCREENSAVEACTIVE failed with %d\n", GetLastError())); 369 369 PostMessage(gToolWindow, WM_VBOX_INSTALL_SEAMLESS_HOOK, 0, 0); 370 370 break; … … 381 381 else 382 382 { 383 dprintf(("VBoxSeamlessThread: error from DeviceIoControl VBOXGUEST_IOCTL_VMMREQUEST\n"));383 Log(("VBoxSeamlessThread: error from DeviceIoControl VBOXGUEST_IOCTL_VMMREQUEST\n")); 384 384 } 385 385 /* sleep a bit to not eat too much CPU while retrying */ … … 395 395 else 396 396 { 397 dprintf(("VBoxTray: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n"));397 Log(("VBoxTray: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n")); 398 398 /* sleep a bit to not eat too much CPU in case the above call always fails */ 399 399 if (WaitForSingleObject(pCtx->pEnv->hStopEvent, 10) == WAIT_OBJECT_0) … … 410 410 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 411 411 { 412 dprintf(("VBoxSeamlessThread: DeviceIOControl(CtlMask - not) succeeded\n"));412 Log(("VBoxSeamlessThread: DeviceIOControl(CtlMask - not) succeeded\n")); 413 413 } 414 414 else 415 415 { 416 dprintf(("VBoxSeamlessThread: DeviceIOControl(CtlMask) failed\n"));417 } 418 419 dprintf(("VBoxSeamlessThread: finished seamless change request thread\n"));416 Log(("VBoxSeamlessThread: DeviceIOControl(CtlMask) failed\n")); 417 } 418 419 Log(("VBoxSeamlessThread: finished seamless change request thread\n")); 420 420 return 0; 421 421 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxStatistics.cpp
r10552 r10777 57 57 DWORD cbReturned; 58 58 59 dprintf(("VBoxStatsInit\n"));59 Log(("VBoxStatsInit\n")); 60 60 61 61 gCtx.pEnv = pEnv; … … 71 71 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST(req.header.size), &req, req.header.size, &req, req.header.size, &cbReturned, NULL)) 72 72 { 73 dprintf(("VBoxStatsInit: new statistics interval %d seconds\n", req.u32StatInterval));73 Log(("VBoxStatsInit: new statistics interval %d seconds\n", req.u32StatInterval)); 74 74 gCtx.uStatInterval = req.u32StatInterval * 1000; 75 75 } 76 76 else 77 dprintf(("VBoxStatsInit: DeviceIoControl failed with %d\n", GetLastError()));77 Log(("VBoxStatsInit: DeviceIoControl failed with %d\n", GetLastError())); 78 78 79 79 /* NtQuerySystemInformation might be dropped in future releases, so load it dynamically as per Microsoft's recommendation */ … … 83 83 *(uintptr_t *)&gCtx.pfnNtQuerySystemInformation = (uintptr_t)GetProcAddress(hMod, "NtQuerySystemInformation"); 84 84 if (gCtx.pfnNtQuerySystemInformation) 85 dprintf(("gCtx.pfnNtQuerySystemInformation = %x\n", gCtx.pfnNtQuerySystemInformation));86 else 87 { 88 dprintf(("NTDLL.NtQuerySystemInformation not found!!\n"));85 Log(("gCtx.pfnNtQuerySystemInformation = %x\n", gCtx.pfnNtQuerySystemInformation)); 86 else 87 { 88 Log(("NTDLL.NtQuerySystemInformation not found!!\n")); 89 89 return VERR_NOT_IMPLEMENTED; 90 90 } … … 97 97 *(uintptr_t *)&gCtx.pfnGlobalMemoryStatusEx = (uintptr_t)GetProcAddress(hMod, "GlobalMemoryStatusEx"); 98 98 if (gCtx.pfnGlobalMemoryStatusEx) 99 dprintf(("gCtx.GlobalMemoryStatusEx = %x\n", gCtx.pfnGlobalMemoryStatusEx));99 Log(("gCtx.GlobalMemoryStatusEx = %x\n", gCtx.pfnGlobalMemoryStatusEx)); 100 100 else 101 101 { 102 102 /** @todo now fails in NT4; do we care? */ 103 dprintf(("KERNEL32.GlobalMemoryStatusEx not found!!\n"));103 Log(("KERNEL32.GlobalMemoryStatusEx not found!!\n")); 104 104 return VERR_NOT_IMPLEMENTED; 105 105 } … … 111 111 *(uintptr_t *)&gCtx.pfnGetPerformanceInfo = (uintptr_t)GetProcAddress(hMod, "GetPerformanceInfo"); 112 112 if (gCtx.pfnGetPerformanceInfo) 113 dprintf(("gCtx.pfnGetPerformanceInfo= %x\n", gCtx.pfnGetPerformanceInfo));113 Log(("gCtx.pfnGetPerformanceInfo= %x\n", gCtx.pfnGetPerformanceInfo)); 114 114 /* failure is not fatal */ 115 115 } … … 123 123 void VBoxStatsDestroy(const VBOXSERVICEENV *pEnv, void *pInstance) 124 124 { 125 dprintf(("VBoxStatsDestroy\n"));125 Log(("VBoxStatsDestroy\n")); 126 126 return; 127 127 } … … 176 176 } 177 177 else 178 dprintf(("GetPerformanceInfo failed with %d\n", GetLastError()));178 Log(("GetPerformanceInfo failed with %d\n", GetLastError())); 179 179 } 180 180 … … 227 227 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST(req.header.size), &req, req.header.size, &req, req.header.size, &cbReturned, NULL)) 228 228 { 229 dprintf(("VBoxStatsReportStatistics: new statistics reported successfully!\n"));230 } 231 else 232 dprintf(("VBoxStatsReportStatistics: DeviceIoControl (stats report) failed with %d\n", GetLastError()));229 Log(("VBoxStatsReportStatistics: new statistics reported successfully!\n")); 230 } 231 else 232 Log(("VBoxStatsReportStatistics: DeviceIoControl (stats report) failed with %d\n", GetLastError())); 233 233 } 234 234 … … 252 252 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 253 253 { 254 dprintf(("VBoxStatsThread: DeviceIOControl(CtlMask - or) succeeded\n"));254 Log(("VBoxStatsThread: DeviceIOControl(CtlMask - or) succeeded\n")); 255 255 } 256 256 else 257 257 { 258 dprintf(("VBoxStatsThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n"));258 Log(("VBoxStatsThread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n")); 259 259 return 0; 260 260 } … … 268 268 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent), &waitEvent, sizeof(waitEvent), &cbReturned, NULL)) 269 269 { 270 dprintf(("VBoxStatsThread: DeviceIOControl succeded\n"));270 Log(("VBoxStatsThread: DeviceIOControl succeded\n")); 271 271 272 272 /* are we supposed to stop? */ … … 274 274 break; 275 275 276 dprintf(("VBoxStatsThread: checking event\n"));276 Log(("VBoxStatsThread: checking event\n")); 277 277 278 278 /* did we get the right event? */ … … 285 285 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST(req.header.size), &req, req.header.size, &req, req.header.size, &cbReturned, NULL)) 286 286 { 287 dprintf(("VBoxStatsThread: new statistics interval %d seconds\n", req.u32StatInterval));287 Log(("VBoxStatsThread: new statistics interval %d seconds\n", req.u32StatInterval)); 288 288 pCtx->uStatInterval = req.u32StatInterval * 1000; 289 289 } 290 290 else 291 dprintf(("VBoxStatsThread: DeviceIoControl (stat) failed with %d\n", GetLastError()));291 Log(("VBoxStatsThread: DeviceIoControl (stat) failed with %d\n", GetLastError())); 292 292 } 293 293 } 294 294 else 295 295 { 296 dprintf(("VBoxStatsThread: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n"));296 Log(("VBoxStatsThread: error 0 from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n")); 297 297 298 298 /* sleep a bit to not eat too much CPU in case the above call always fails */ … … 316 316 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 317 317 { 318 dprintf(("VBoxStatsThread: DeviceIOControl(CtlMask - not) succeeded\n"));318 Log(("VBoxStatsThread: DeviceIOControl(CtlMask - not) succeeded\n")); 319 319 } 320 320 else 321 321 { 322 dprintf(("VBoxStatsThread: DeviceIOControl(CtlMask) failed\n"));323 } 324 325 dprintf(("VBoxStatsThread: finished statistics change request thread\n"));322 Log(("VBoxStatsThread: DeviceIOControl(CtlMask) failed\n")); 323 } 324 325 Log(("VBoxStatsThread: finished statistics change request thread\n")); 326 326 return 0; 327 327 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp
r10552 r10777 31 31 #include <malloc.h> 32 32 #include <VBoxGuestInternal.h> 33 #include <iprt/string.h>34 33 35 34 #include "helpers.h" … … 45 44 HWND gToolWindow; 46 45 47 48 /* prototypes */ 46 /* Prototypes */ 49 47 VOID DisplayChangeThread(void *dummy); 50 48 LRESULT CALLBACK VBoxToolWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); 51 52 53 #ifdef DEBUG54 /**55 * Helper function to send a message to WinDbg56 *57 * @param String message string58 */59 void WriteLog(char *String, ...)60 {61 DWORD cbReturned;62 CHAR Buffer[1024];63 VMMDevReqLogString *pReq = (VMMDevReqLogString *)Buffer;64 65 va_list va;66 67 va_start(va, String);68 69 vmmdevInitRequest(&pReq->header, VMMDevReq_LogString);70 RTStrPrintfV(pReq->szString, sizeof(Buffer)-sizeof(*pReq), String, va);71 OutputDebugStringA(pReq->szString);72 pReq->header.size += strlen(pReq->szString);73 74 printf("%s\n", pReq->szString);75 76 FILE* pFh = fopen("c:\\VBoxTrayDebug.txt", "at");77 78 /* Does maybe not work on Vista (write protection when starting without admin rights),79 so do this check! */80 if (NULL != pFh)81 {82 fprintf(pFh, "%s", pReq->szString);83 fclose(pFh);84 }85 86 DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST(pReq->header.size), pReq, pReq->header.size,87 pReq, pReq->header.size, &cbReturned, NULL);88 89 va_end (va);90 return;91 }92 #endif93 94 95 49 96 50 /* The service table. */ … … 150 104 static int vboxStartServices (VBOXSERVICEENV *pEnv, VBOXSERVICEINFO *pTable) 151 105 { 152 dprintf(("VBoxTray: Starting services...\n"));106 Log(("VBoxTray: Starting services...\n")); 153 107 154 108 pEnv->hStopEvent = CreateEvent(NULL, TRUE, FALSE, NULL); … … 162 116 while (pTable->pszName) 163 117 { 164 dprintf(("Starting %s...\n", pTable->pszName));118 Log(("Starting %s...\n", pTable->pszName)); 165 119 166 120 int rc = VINF_SUCCESS; … … 179 133 if (VBOX_FAILURE (rc)) 180 134 { 181 dprintf(("Failed to initialize rc = %Vrc.\n", rc));135 Log(("Failed to initialize rc = %Vrc.\n", rc)); 182 136 } 183 137 else … … 202 156 if (VBOX_FAILURE (rc)) 203 157 { 204 dprintf(("Failed to start the thread.\n"));158 Log(("Failed to start the thread.\n")); 205 159 206 160 if (pTable->pfnDestroy) … … 263 217 void WINAPI VBoxServiceStart(void) 264 218 { 265 dprintf(("VBoxTray: Start\n"));219 Log(("VBoxTray: Leaving service main function")); 266 220 267 221 VBOXSERVICEENV svcEnv; … … 279 233 if (gVBoxDriver == INVALID_HANDLE_VALUE) 280 234 { 281 dprintf(("VBoxTray: could not open VBox Guest Additions driver! Please install / start it first! rc = %d\n", GetLastError()));235 Log(("VBoxTray: Could not open VBox Guest Additions driver! Please install / start it first! rc = %d\n", GetLastError())); 282 236 status = ERROR_GEN_FAILURE; 283 237 } 284 238 285 dprintf(("VBoxTray: Driver h %p, st%p\n", gVBoxDriver, status));239 Log(("VBoxTray: Driver Handle = %p, Status = %p\n", gVBoxDriver, status)); 286 240 287 241 if (status == NO_ERROR) … … 298 252 } 299 253 300 dprintf(("VBoxTray: Class st %p\n", status));254 Log(("VBoxTray: Class st %p\n", status)); 301 255 302 256 if (status == NO_ERROR) … … 325 279 } 326 280 327 dprintf(("VBoxTray: Window h %p, st%p\n", gToolWindow, status));281 Log(("VBoxTray: Window Handle = %p, Status = %p\n", gToolWindow, status)); 328 282 329 283 if (status == NO_ERROR) … … 332 286 if (gStopSem == NULL) 333 287 { 334 dprintf(("VBoxTray: CreateEvent for Stopping failed: rc = %d\n", GetLastError()));288 Log(("VBoxTray: CreateEvent for Stopping failed: rc = %d\n", GetLastError())); 335 289 return; 336 290 } … … 349 303 ret = SetSecurityDescriptorDacl(SecAttr.lpSecurityDescriptor, TRUE, 0, FALSE); 350 304 if (!ret) 351 dprintf(("SetSecurityDescriptorDacl failed with %d\n", GetLastError()));305 Log(("VBoxTray: SetSecurityDescriptorDacl failed with %d\n", GetLastError())); 352 306 353 307 info.dwOSVersionInfoSize = sizeof(info); 354 308 if (GetVersionEx(&info)) 355 309 { 356 dprintf(("VBoxTray: Windows version major %d minor %d\n", info.dwMajorVersion, info.dwMinorVersion));310 Log(("VBoxTray: Windows version major %d minor %d\n", info.dwMajorVersion, info.dwMinorVersion)); 357 311 dwMajorVersion = info.dwMajorVersion; 358 312 } … … 375 329 *(uintptr_t *)&pfnConvertStringSecurityDescriptorToSecurityDescriptorA = (uintptr_t)GetProcAddress(hModule, "ConvertStringSecurityDescriptorToSecurityDescriptorA"); 376 330 377 dprintf(("pfnConvertStringSecurityDescriptorToSecurityDescriptorA = %x\n", pfnConvertStringSecurityDescriptorToSecurityDescriptorA));331 Log(("VBoxTray: pfnConvertStringSecurityDescriptorToSecurityDescriptorA = %x\n", pfnConvertStringSecurityDescriptorToSecurityDescriptorA)); 378 332 if (pfnConvertStringSecurityDescriptorToSecurityDescriptorA) 379 333 { … … 381 335 SDDL_REVISION_1, &pSD, NULL); 382 336 if (!ret) 383 dprintf(("ConvertStringSecurityDescriptorToSecurityDescriptorA failed with %d\n", GetLastError()));337 Log(("VBoxTray: ConvertStringSecurityDescriptorToSecurityDescriptorA failed with %d\n", GetLastError())); 384 338 385 339 ret = GetSecurityDescriptorSacl(pSD, &fSaclPresent, &pSacl, &fSaclDefaulted); 386 340 if (!ret) 387 dprintf(("GetSecurityDescriptorSacl failed with %d\n", GetLastError()));341 Log(("VBoxTray: GetSecurityDescriptorSacl failed with %d\n", GetLastError())); 388 342 389 343 ret = SetSecurityDescriptorSacl(SecAttr.lpSecurityDescriptor, TRUE, pSacl, FALSE); 390 344 if (!ret) 391 dprintf(("SetSecurityDescriptorSacl failed with %d\n", GetLastError()));345 Log(("VBoxTray: SetSecurityDescriptorSacl failed with %d\n", GetLastError())); 392 346 } 393 347 } … … 399 353 if (ghSeamlessNotifyEvent == NULL) 400 354 { 401 dprintf(("VBoxTray: CreateEvent for Seamless failed: rc = %d\n", GetLastError()));355 Log(("VBoxTray: CreateEvent for Seamless failed: rc = %d\n", GetLastError())); 402 356 return; 403 357 } … … 441 395 sprintf(ndata.szTip, "Sun xVM VirtualBox Guest Additions %d.%d.%dr%d", VBOX_VERSION_MAJOR, VBOX_VERSION_MINOR, VBOX_VERSION_BUILD, VBOX_SVN_REV); 442 396 443 dprintf(("VBoxTray: ndata.hWnd %08X, ndata.hIcon = %p\n", ndata.hWnd, ndata.hIcon));397 Log(("VBoxTray: ndata.hWnd %08X, ndata.hIcon = %p\n", ndata.hWnd, ndata.hIcon)); 444 398 445 399 /* Boost thread priority to make sure we wake up early for seamless window notifications (not sure if it actually makes any difference though) */ … … 457 411 dwEventCount = 1; 458 412 459 dprintf(("VBoxTray: Number of events to wait in main loop: %ld\n", dwEventCount));413 Log(("VBoxTray: Number of events to wait in main loop: %ld\n", dwEventCount)); 460 414 461 415 while(true) … … 464 418 waitResult = waitResult - WAIT_OBJECT_0; 465 419 466 dprintf(("VBoxTray: Wait result = %ld.\n", waitResult));420 Log(("VBoxTray: Wait result = %ld.\n", waitResult)); 467 421 468 422 if (waitResult == 0) 469 423 { 470 dprintf(("VBoxTray: Event 'Exit' triggered.\n"));424 Log(("VBoxTray: Event 'Exit' triggered.\n")); 471 425 /* exit */ 472 426 break; … … 474 428 else if ((waitResult == 1) && (ghSeamlessNotifyEvent!=0)) /* Only jump in, if seamless is active! */ 475 429 { 476 dprintf(("VBoxTray: Event 'Seamless' triggered.\n"));430 Log(("VBoxTray: Event 'Seamless' triggered.\n")); 477 431 478 432 /* seamless window notification */ … … 485 439 while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) 486 440 { 487 dprintf(("VBoxTray: msg %p\n", msg.message));441 Log(("VBoxTray: msg %p\n", msg.message)); 488 442 if (msg.message == WM_QUIT) 489 443 { 490 dprintf(("VBoxTray: WM_QUIT!\n"));444 Log(("VBoxTray: WM_QUIT!\n")); 491 445 SetEvent(gStopSem); 492 446 continue; … … 499 453 { 500 454 fTrayIconCreated = Shell_NotifyIcon(NIM_ADD, &ndata); 501 dprintf(("VBoxTray: fTrayIconCreated = %d, err %08X\n", fTrayIconCreated, GetLastError ()));502 } 503 } 504 } 505 506 dprintf(("VBoxTray: returned from main loop, exiting...\n"));455 Log(("VBoxTray: fTrayIconCreated = %d, err %08X\n", fTrayIconCreated, GetLastError ())); 456 } 457 } 458 } 459 460 Log(("VBoxTray: Returned from main loop, exiting ...\n")); 507 461 508 462 /* remove the system tray icon */ 509 463 Shell_NotifyIcon(NIM_DELETE, &ndata); 510 464 511 dprintf(("VBoxTray: waiting for display change thread...\n"));465 Log(("VBoxTray: waiting for display change thread ...\n")); 512 466 513 467 vboxStopServices (&svcEnv, vboxServiceTable); 514 468 515 dprintf(("VBoxTray: destroying tool window...\n"));469 Log(("VBoxTray: Destroying tool window ...\n")); 516 470 517 471 /* destroy the tool window */ … … 524 478 CloseHandle(ghSeamlessNotifyEvent); 525 479 526 dprintf(("VBoxTray: leaving service main function\n"));480 Log(("VBoxTray: Leaving service main function\n")); 527 481 528 482 return; … … 539 493 if ( (hMutexAppRunning != NULL) 540 494 && (GetLastError() == ERROR_ALREADY_EXISTS)) 541 {495 { 542 496 /* Close the mutex for this application instance. */ 543 497 CloseHandle (hMutexAppRunning); 544 498 hMutexAppRunning = NULL; 545 499 return 0; 546 } 547 548 dprintf(("VBoxTray: Started.\n")); 500 } 501 502 int rc = RTR3Init(false); 503 if (RT_FAILURE(rc)) 504 return rc; 505 506 rc = VbglR3Init(); 507 if (RT_FAILURE(rc)) 508 return rc; 509 510 Log(("VBoxTray: Started.\n")); 549 511 550 512 gInstance = hInstance; 551 513 VBoxServiceStart(); 552 514 553 dprintf(("VBoxTray: Ended.\n"));515 Log(("VBoxTray: Ended.\n")); 554 516 555 517 /* Release instance mutex. */ … … 559 521 } 560 522 523 VbglR3Term(); 561 524 return 0; 562 525 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.h
r8857 r10777 30 30 #include <process.h> 31 31 32 #include <iprt/initterm.h> 33 #include <iprt/string.h> 34 35 #include <VBox/version.h> 32 36 #include <VBox/VBoxGuest.h> 33 #include <VBox/version.h> 34 37 #include <VBox/Log.h> 35 38 36 39 #define WM_VBOX_RESTORED 0x2005 -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxVRDP.cpp
r10552 r10777 98 98 * The parameter has to be disabled. 99 99 */ 100 dprintf(("Saving %s\n", parameters[i].name));100 Log(("VBoxTray: vboxExperienceSet: Saving %s\n", parameters[i].name)); 101 101 102 102 /* Save the current value. */ … … 132 132 if (parameters[i].cbSavedValue > sizeof (parameters[i].achSavedValue)) 133 133 { 134 dprintf(("not enough space %d > %d\n", parameters[i].cbSavedValue, sizeof (parameters[i].achSavedValue)));134 Log(("VBoxTray: vboxExperienceSet: Not enough space %d > %d\n", parameters[i].cbSavedValue, sizeof (parameters[i].achSavedValue))); 135 135 break; 136 136 } … … 148 148 } 149 149 150 dprintf(("Disabling %s\n", parameters[i].name));150 Log(("VBoxTray: vboxExperienceSet: Disabling %s\n", parameters[i].name)); 151 151 152 152 /* Disable the feature. */ … … 203 203 if (parameters[i].level > level) 204 204 { 205 dprintf(("Restoring %s\n", parameters[i].name));205 Log(("VBoxTray: vboxExperienceRestore: Restoring %s\n", parameters[i].name)); 206 206 207 207 /* Restore the feature. */ … … 273 273 int VBoxVRDPInit(const VBOXSERVICEENV *pEnv, void **ppInstance, bool *pfStartThread) 274 274 { 275 dprintf(("VBoxVRDPInit\n"));275 Log(("VBoxTray: VBoxVRDPInit\n")); 276 276 277 277 gCtx.pEnv = pEnv; … … 299 299 void VBoxVRDPDestroy(const VBOXSERVICEENV *pEnv, void *pInstance) 300 300 { 301 dprintf(("VBoxVRDPDestroy\n"));301 Log(("VBoxTray: VBoxVRDPDestroy\n")); 302 302 VBOXVRDPCONTEXT *pCtx = (VBOXVRDPCONTEXT *)pInstance; 303 303 vboxExperienceRestore (pCtx->level); … … 323 323 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 324 324 { 325 dprintf(("VBoxVRDPThread: DeviceIOControl(CtlMask - or) succeeded\n"));325 Log(("VBoxTray: VBoxVRDPThread: DeviceIOControl(CtlMask - or) succeeded\n")); 326 326 } 327 327 else 328 328 { 329 dprintf(("VBoxVRDPThread: DeviceIOControl(CtlMask) failed\n"));329 Log(("VBoxTray: VBoxVRDPThread: DeviceIOControl(CtlMask) failed\n")); 330 330 return 0; 331 331 } … … 339 339 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent), &waitEvent, sizeof(waitEvent), &cbReturned, NULL)) 340 340 { 341 dprintf(("VBoxVRDPThread: DeviceIOControl succeded\n"));341 Log(("VBoxTray: VBoxVRDPThread: DeviceIOControl succeded\n")); 342 342 343 343 /* are we supposed to stop? */ … … 345 345 break; 346 346 347 dprintf(("VBoxVRDPThread: checking event\n"));347 Log(("VBoxTray: VBoxVRDPThread: checking event\n")); 348 348 349 349 /* did we get the right event? */ … … 367 367 &cbReturned, NULL)) 368 368 { 369 dprintf(("VBoxVRDPThread: u8VRDPActive = %d, level %d\n", vrdpChangeRequest.u8VRDPActive, vrdpChangeRequest.u32VRDPExperienceLevel));369 Log(("VBoxTray: VBoxVRDPThread: u8VRDPActive = %d, level %d\n", vrdpChangeRequest.u8VRDPActive, vrdpChangeRequest.u32VRDPExperienceLevel)); 370 370 371 371 if (vrdpChangeRequest.u8VRDPActive) … … 380 380 pCtx->fSavedThemeEnabled = pCtx->pfnIsThemeActive (); 381 381 382 dprintf(("VBoxVRDPThread: pCtx->fSavedThemeEnabled = %d\n", pCtx->fSavedThemeEnabled));382 Log(("VBoxTray: VBoxVRDPThread: pCtx->fSavedThemeEnabled = %d\n", pCtx->fSavedThemeEnabled)); 383 383 384 384 if (pCtx->fSavedThemeEnabled) … … 398 398 /* @todo the call returns S_OK but theming remains disabled. */ 399 399 HRESULT hrc = pCtx->pfnEnableTheming (TRUE); 400 dprintf(("VBoxVRDPThread: enabling theme rc = 0x%08X\n", hrc));400 Log(("VBoxTray: VBoxVRDPThread: enabling theme rc = 0x%08X\n", hrc)); 401 401 pCtx->fSavedThemeEnabled = FALSE; 402 402 } … … 410 410 else 411 411 { 412 dprintf(("VBoxTray: error from DeviceIoControl VBOXGUEST_IOCTL_VMMREQUEST\n"));412 Log(("VBoxTray: VBoxVRDPThread: Error from DeviceIoControl VBOXGUEST_IOCTL_VMMREQUEST\n")); 413 413 414 414 /* sleep a bit to not eat too much CPU in case the above call always fails */ … … 423 423 else 424 424 { 425 dprintf(("VBoxTray: error from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n"));425 Log(("VBoxTray: VBoxVRDPThread: Error from DeviceIoControl VBOXGUEST_IOCTL_WAITEVENT\n")); 426 426 427 427 /* sleep a bit to not eat too much CPU in case the above call always fails */ … … 438 438 if (DeviceIoControl (gVBoxDriver, VBOXGUEST_IOCTL_CTL_FILTER_MASK, &maskInfo, sizeof (maskInfo), NULL, 0, &cbReturned, NULL)) 439 439 { 440 dprintf(("VBoxVRDPThread: DeviceIOControl(CtlMask - not) succeeded\n"));440 Log(("VBoxTray: VBoxVRDPThread: DeviceIOControl(CtlMask - not) succeeded\n")); 441 441 } 442 442 else 443 443 { 444 dprintf(("VBoxVRDPThread: DeviceIOControl(CtlMask) failed\n"));445 } 446 447 dprintf(("VBoxVRDPThread: finished VRDP change request thread\n"));444 Log(("VBoxTray: VBoxVRDPThread: DeviceIOControl(CtlMask) failed\n")); 445 } 446 447 Log(("VBoxTray: VBoxVRDPThread: Finished VRDP change request thread\n")); 448 448 return 0; 449 449 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/helpers.h
r8155 r10777 24 24 // #define DEBUG_DISPLAY_CHANGE 25 25 26 #ifndef DDCLOG 27 void SvcDebugOut2(char *String, ...); 28 # ifdef DEBUG_DISPLAY_CHANGE 29 # define DDCLOG(a) dprintf(a) 30 # else 31 # define DDCLOG(a) do {} while (0) 32 # endif /* DEBUG_DISPLAY_CHANGE */ 33 #endif /* DDCLOG */ 34 35 #ifdef DEBUG 36 void WriteLog(char *String, ...); 37 #define dprintf(a) do { WriteLog a; } while (0) 26 #ifdef DEBUG_DISPLAY_CHANGE 27 #define DDCLOG(a) Log(a) 38 28 #else 39 #define dprintf(a) do {} while (0)40 #endif /* DEBUG */29 #define DDCLOG(a) do {} while (0) 30 #endif /* DEBUG_DISPLAY_CHANGE */ 41 31 42 32 void resizeRect(RECTL *paRects, unsigned nRects, unsigned iPrimary, unsigned iResized, int NewWidth, int NewHeight);
Note:
See TracChangeset
for help on using the changeset viewer.