Changeset 33966 in vbox
- Timestamp:
- Nov 11, 2010 10:32:07 AM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/VBoxTray
- Files:
-
- 10 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/Makefile.kmk
r32881 r33966 36 36 VBoxVRDP.cpp \ 37 37 VBoxRestore.cpp \ 38 helpers.cpp \38 VBoxHelpers.cpp \ 39 39 VBoxTray.rc 40 40 ifdef VBOX_WITH_GUEST_PROPS -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp
r32431 r33966 18 18 19 19 #include "VBoxTray.h" 20 #include " helpers.h"20 #include "VBoxHelpers.h" 21 21 22 22 #include <VBox/HostServices/VBoxClipboardSvc.h> -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp
r33595 r33966 18 18 #include <windows.h> 19 19 #include "VBoxTray.h" 20 #include "VBoxHelpers.h" 20 21 #include "VBoxSeamless.h" 21 22 #include <VBoxHook.h> … … 23 24 #include <VBox/VMMDev.h> 24 25 #include <iprt/assert.h> 25 #include "helpers.h"26 26 #include <malloc.h> 27 27 #include <VBoxGuestInternal.h> … … 367 367 && paDeviceModes[Id].dmBitsPerPel == BitsPerPixel) 368 368 { 369 Log(("VBoxTray: ResizeDisplayDevice: Already at desired resolution .\n"));369 Log(("VBoxTray: ResizeDisplayDevice: Already at desired resolution\n")); 370 370 return FALSE; 371 371 } 372 372 373 resizeRect(paRects, NumDevices, DevPrimaryNum, Id, Width, Height);373 hlpResizeRect(paRects, NumDevices, DevPrimaryNum, Id, Width, Height); 374 374 #ifdef Log 375 375 for (i = 0; i < NumDevices; i++) -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxHelpers.cpp
r33955 r33966 4 4 5 5 /* 6 * Copyright (C) 2006-20 07Oracle Corporation6 * Copyright (C) 2006-2010 Oracle Corporation 7 7 * 8 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 23 23 #include <VBoxGuestInternal.h> 24 24 25 #include " helpers.h"25 #include "VBoxHelpers.h" 26 26 #include "resource.h" 27 27 28 static unsigned nextAdjacentRectXP (RECTL *paRects, unsigned nRects, unsigned iRect) 29 { 30 unsigned i; 31 for (i = 0; i < nRects; i++) 32 { 33 if (paRects[iRect].right == paRects[i].left) 34 { 35 return i; 36 } 37 } 38 return ~0; 39 } 40 41 static unsigned nextAdjacentRectXN (RECTL *paRects, unsigned nRects, unsigned iRect) 42 { 43 unsigned i; 44 for (i = 0; i < nRects; i++) 45 { 46 if (paRects[iRect].left == paRects[i].right) 47 { 48 return i; 49 } 50 } 51 return ~0; 52 } 53 54 static unsigned nextAdjacentRectYP (RECTL *paRects, unsigned nRects, unsigned iRect) 55 { 56 unsigned i; 57 for (i = 0; i < nRects; i++) 58 { 59 if (paRects[iRect].bottom == paRects[i].top) 60 { 61 return i; 62 } 63 } 64 return ~0; 65 } 66 67 unsigned nextAdjacentRectYN (RECTL *paRects, unsigned nRects, unsigned iRect) 68 { 69 unsigned i; 70 for (i = 0; i < nRects; i++) 71 { 72 if (paRects[iRect].top == paRects[i].bottom) 73 { 74 return i; 75 } 76 } 77 return ~0; 78 } 79 80 void resizeRect(RECTL *paRects, unsigned nRects, unsigned iPrimary, unsigned iResized, int NewWidth, int NewHeight) 81 { 82 DDCLOG(("nRects %d, iPrimary %d, iResized %d, NewWidth %d, NewHeight %d\n", nRects, iPrimary, iResized, NewWidth, NewHeight)); 28 static unsigned hlpNextAdjacentRectXP(RECTL *paRects, unsigned nRects, unsigned uRect) 29 { 30 unsigned i; 31 for (i = 0; i < nRects; i++) 32 { 33 if (paRects[uRect].right == paRects[i].left) 34 return i; 35 } 36 return ~0; 37 } 38 39 static unsigned hlpNextAdjacentRectXN(RECTL *paRects, unsigned nRects, unsigned uRect) 40 { 41 unsigned i; 42 for (i = 0; i < nRects; i++) 43 { 44 if (paRects[uRect].left == paRects[i].right) 45 return i; 46 } 47 return ~0; 48 } 49 50 static unsigned hlpNextAdjacentRectYP(RECTL *paRects, unsigned nRects, unsigned uRect) 51 { 52 unsigned i; 53 for (i = 0; i < nRects; i++) 54 { 55 if (paRects[uRect].bottom == paRects[i].top) 56 return i; 57 } 58 return ~0; 59 } 60 61 static unsigned hlpNextAdjacentRectYN(RECTL *paRects, unsigned nRects, unsigned uRect) 62 { 63 unsigned i; 64 for (i = 0; i < nRects; i++) 65 { 66 if (paRects[uRect].top == paRects[i].bottom) 67 return i; 68 } 69 return ~0; 70 } 71 72 void hlpResizeRect(RECTL *paRects, unsigned nRects, unsigned uPrimary, 73 unsigned uResized, int iNewWidth, int iNewHeight) 74 { 75 DDCLOG(("nRects %d, iPrimary %d, iResized %d, NewWidth %d, NewHeight %d\n", nRects, uPrimary, uResized, iNewWidth, iNewHeight)); 83 76 84 77 RECTL *paNewRects = (RECTL *)alloca (sizeof (RECTL) * nRects); 85 78 memcpy (paNewRects, paRects, sizeof (RECTL) * nRects); 86 paNewRects[ iResized].right += NewWidth - (paNewRects[iResized].right - paNewRects[iResized].left);87 paNewRects[ iResized].bottom += NewHeight - (paNewRects[iResized].bottom - paNewRects[iResized].top);79 paNewRects[uResized].right += iNewWidth - (paNewRects[uResized].right - paNewRects[uResized].left); 80 paNewRects[uResized].bottom += iNewHeight - (paNewRects[uResized].bottom - paNewRects[uResized].top); 88 81 89 82 /* Verify all pairs of originally adjacent rectangles for all 4 directions. … … 98 91 { 99 92 /* Find the next adjacent original rect in x positive direction. */ 100 unsigned iNextRect = nextAdjacentRectXP(paRects, nRects, iRect);101 DDCLOG(("next %d -> %d\n", iRect, iNextRect)); 102 103 if (iNextRect == ~0 || iNextRect == iPrimary)93 unsigned iNextRect = hlpNextAdjacentRectXP(paRects, nRects, iRect); 94 DDCLOG(("next %d -> %d\n", iRect, iNextRect)); 95 96 if (iNextRect == ~0 || iNextRect == uPrimary) 104 97 { 105 98 continue; … … 126 119 { 127 120 /* Find the next adjacent original rect in x negative direction. */ 128 unsigned iNextRect = nextAdjacentRectXN(paRects, nRects, iRect);129 DDCLOG(("next %d -> %d\n", iRect, iNextRect)); 130 131 if (iNextRect == ~0 || iNextRect == iPrimary)121 unsigned iNextRect = hlpNextAdjacentRectXN(paRects, nRects, iRect); 122 DDCLOG(("next %d -> %d\n", iRect, iNextRect)); 123 124 if (iNextRect == ~0 || iNextRect == uPrimary) 132 125 { 133 126 continue; … … 154 147 { 155 148 /* Find the next adjacent original rect in y positive direction. */ 156 unsigned iNextRect = nextAdjacentRectYP(paRects, nRects, iRect);157 DDCLOG(("next %d -> %d\n", iRect, iNextRect)); 158 159 if (iNextRect == ~0 || iNextRect == iPrimary)149 unsigned iNextRect = hlpNextAdjacentRectYP(paRects, nRects, iRect); 150 DDCLOG(("next %d -> %d\n", iRect, iNextRect)); 151 152 if (iNextRect == ~0 || iNextRect == uPrimary) 160 153 { 161 154 continue; … … 182 175 { 183 176 /* Find the next adjacent original rect in x negative direction. */ 184 unsigned iNextRect = nextAdjacentRectYN(paRects, nRects, iRect);185 DDCLOG(("next %d -> %d\n", iRect, iNextRect)); 186 187 if (iNextRect == ~0 || iNextRect == iPrimary)177 unsigned iNextRect = hlpNextAdjacentRectYN(paRects, nRects, iRect); 178 DDCLOG(("next %d -> %d\n", iRect, iNextRect)); 179 180 if (iNextRect == ~0 || iNextRect == uPrimary) 188 181 { 189 182 continue; … … 210 203 } 211 204 212 int showBalloonTip (HINSTANCE hInst, HWND hWnd, UINT uID, const char *pszMsg, const char *pszTitle, UINT uTimeout, DWORD dwInfoFlags) 205 int hlpShowBalloonTip(HINSTANCE hInst, HWND hWnd, UINT uID, 206 const char *pszMsg, const char *pszTitle, 207 UINT uTimeout, DWORD dwInfoFlags) 213 208 { 214 209 NOTIFYICONDATA niData; -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxHelpers.h
r33955 r33966 1 1 /* $Id$ */ 2 2 /** @file 3 * helpers - Guest Additions Service helper functions header 3 * helpers - Guest Additions Service helper functions header. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 27 27 #endif /* !DEBUG_DISPLAY_CHANGE */ 28 28 29 void resizeRect(RECTL *paRects, unsigned nRects, unsigned iPrimary, unsigned iResized, int NewWidth, intNewHeight);30 int showBalloonTip(HINSTANCE hInst, HWND hWnd, UINT uID, const char *pszMsg, const char *pszTitle, UINT uTimeout, DWORD dwInfoFlags);29 extern void hlpResizeRect(RECTL *paRects, unsigned nRects, unsigned uPrimary, unsigned uResized, int iNewWidth, int iNewHeight); 30 extern int hlpShowBalloonTip(HINSTANCE hInst, HWND hWnd, UINT uID, const char *pszMsg, const char *pszTitle, UINT uTimeout, DWORD dwInfoFlags); 31 31 32 32 #endif /* !___VBOXTRAY_HELPERS_H */ -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxHostVersion.cpp
r31002 r33966 19 19 #include "VBoxHostVersion.h" 20 20 #include "VBoxTray.h" 21 #include " helpers.h"21 #include "VBoxHelpers.h" 22 22 23 23 #include <VBox/VBoxGuestLib.h> … … 26 26 /** @todo Move this part in VbglR3 and just provide a callback for the platform-specific 27 27 notification stuff, since this is very similar to the VBoxClient code. */ 28 int VBoxCheckHostVersion 28 int VBoxCheckHostVersion() 29 29 { 30 30 int rc; … … 51 51 "install option from the Devices menu.", pszGuestVersion, pszHostVersion); 52 52 53 rc = showBalloonTip(gInstance, gToolWindow, ID_TRAYICON, szMsg, szTitle, 5000, 0);53 rc = hlpShowBalloonTip(gInstance, gToolWindow, ID_TRAYICON, szMsg, szTitle, 5000, 0); 54 54 if (RT_FAILURE(rc)) 55 55 Log(("VBoxTray: Guest Additions update found; however: could not show version notifier balloon tooltip! rc = %d\n", rc)); -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxRestore.cpp
r33595 r33966 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 18 18 #include <windows.h> 19 19 #include "VBoxTray.h" 20 #include "VBoxHelpers.h" 20 21 #include "VBoxRestore.h" 21 22 #include <VBoxDisplay.h> … … 23 24 #include <VBoxGuestInternal.h> 24 25 #include <iprt/assert.h> 25 #include "helpers.h" 26 26 27 27 28 typedef struct _VBOXRESTORECONTEXT … … 64 65 void VBoxRestoreCheckVRDP() 65 66 { 66 DWORD ret;67 67 VBOXDISPIFESCAPE escape = {0}; 68 68 escape.escapeCode = VBOXESC_ISVRDPACTIVE; 69 /* Check VRDP activity */69 /* Check VRDP activity. */ 70 70 71 /* send to display driver*/72 ret = VBoxDispIfEscape(&gCtx.pEnv->dispIf, &escape, 0);73 Log(("VBoxTray: VBoxRestore Session -> VRDP activate state = %d\n", ret));71 /* Send to display driver. */ 72 DWORD dwRet = VBoxDispIfEscape(&gCtx.pEnv->dispIf, &escape, 0); 73 Log(("VBoxTray: VBoxRestoreCheckVRDP -> VRDP activate state = %d\n", dwRet)); 74 74 75 if ( ret != gCtx.fRDPState)75 if (dwRet != gCtx.fRDPState) 76 76 { 77 DWORD cbReturned; 78 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)) 77 DWORD cbReturnIgnored; 78 if (!DeviceIoControl(gCtx.pEnv->hDriver, 79 dwRet == NO_ERROR 80 ? VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION 81 : VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION, 82 NULL, 0, NULL, 0, &cbReturnIgnored, NULL)) 80 83 { 81 Log(("VBoxTray: VBoxRestore Thread: DeviceIOControl(CtlMask) failed, SeamlessChangeThread exited\n"));84 Log(("VBoxTray: VBoxRestoreCheckVRDP: DeviceIOControl failed, error = %ld\n", GetLastError())); 82 85 } 83 gCtx.fRDPState = ret;86 gCtx.fRDPState = dwRet; 84 87 } 85 88 } … … 127 130 /* did we get the right event? */ 128 131 if (waitEvent.u32EventFlagsOut & VMMDEV_EVENT_RESTORED) 129 PostMessage(gToolWindow, WM_VBOX _RESTORED, 0, 0);132 PostMessage(gToolWindow, WM_VBOXTRAY_VM_RESTORED, 0, 0); 130 133 else 131 134 /** @todo Don't poll, but wait for connect/disconnect events */ 132 PostMessage(gToolWindow, WM_VBOX _CHECK_VRDP, 0, 0);135 PostMessage(gToolWindow, WM_VBOXTRAY_VRDP_CHECK, 0, 0); 133 136 } 134 137 else -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxSeamless.cpp
r33595 r33966 18 18 #include <windows.h> 19 19 #include "VBoxTray.h" 20 #include "VBoxHelpers.h" 20 21 #include "VBoxSeamless.h" 21 22 #include <VBoxHook.h> … … 24 25 #include <iprt/assert.h> 25 26 #include <VBoxGuestInternal.h> 26 #include "helpers.h"27 27 28 28 typedef struct _VBOXSEAMLESSCONTEXT … … 324 324 if (waitEvent.u32EventFlagsOut & VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST) 325 325 { 326 Log(("VBoxTray: VBoxTray: going to get seamless change information .\n"));326 Log(("VBoxTray: VBoxTray: going to get seamless change information\n")); 327 327 328 328 /* We got at least one event. Read the requested resolution -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxSharedFolders.cpp
r33464 r33966 18 18 #include "VBoxSharedFolders.h" 19 19 #include "VBoxTray.h" 20 #include " helpers.h"20 #include "VBoxHelpers.h" 21 21 22 22 #include <iprt/mem.h> … … 105 105 if (chDrive > 'Z') 106 106 { 107 LogRel(("VBoxTray: No free driver letter found to assign shared folder \"%s\", aborting .\n", pszName));107 LogRel(("VBoxTray: No free driver letter found to assign shared folder \"%s\", aborting\n", pszName)); 108 108 break; 109 109 } -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp
r32622 r33966 15 15 */ 16 16 17 18 /******************************************************************************* 19 * Header Files * 20 *******************************************************************************/ 17 21 #include "VBoxTray.h" 22 #include "VBoxHelpers.h" 18 23 #include "VBoxSeamless.h" 19 24 #include "VBoxClipboard.h" … … 28 33 #include <VBoxGuestInternal.h> 29 34 30 #include "helpers.h"31 35 #include <sddl.h> 32 36 33 37 #include <iprt/buildconfig.h> 34 38 35 /* global variables */ 39 40 /******************************************************************************* 41 * Global Variables * 42 *******************************************************************************/ 36 43 HANDLE gVBoxDriver; 37 44 HANDLE gStopSem; … … 103 110 gNotifyIconData.uID = ID_TRAYICON; 104 111 gNotifyIconData.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; 105 gNotifyIconData.uCallbackMessage = WM_VBOX _TRAY;112 gNotifyIconData.uCallbackMessage = WM_VBOXTRAY_TRAY_ICON; 106 113 gNotifyIconData.hIcon = hIcon; 107 114 … … 140 147 static int vboxStartServices(VBOXSERVICEENV *pEnv, VBOXSERVICEINFO *pTable) 141 148 { 142 Log(("VBoxTray: Starting services ...\n"));149 Log(("VBoxTray: Starting services ...\n")); 143 150 144 151 pEnv->hStopEvent = CreateEvent(NULL, TRUE, FALSE, NULL); … … 152 159 while (pTable->pszName) 153 160 { 154 Log(("VBoxTray: Starting %s ...\n", pTable->pszName));161 Log(("VBoxTray: Starting %s ...\n", pTable->pszName)); 155 162 156 163 int rc = VINF_SUCCESS; … … 163 170 164 171 if (pTable->pfnInit) 165 {166 172 rc = pTable->pfnInit (pEnv, &pTable->pInstance, &fStartThread); 167 } 168 169 if (RT_FAILURE (rc)) 170 { 171 Log(("VBoxTray: Failed to initialize rc = %Rrc.\n", rc)); 173 174 if (RT_FAILURE(rc)) 175 { 176 Log(("VBoxTray: Failed to initialize rc = %Rrc\n", rc)); 172 177 } 173 178 else … … 176 181 { 177 182 unsigned threadid; 178 179 183 pTable->hThread = (HANDLE)_beginthreadex (NULL, /* security */ 180 184 0, /* stacksize */ … … 185 189 186 190 if (pTable->hThread == (HANDLE)(0)) 187 {188 191 rc = VERR_NOT_SUPPORTED; 189 190 } 191 192 if (RT_FAILURE (rc))193 {194 Log(("VBoxTray: Failed to start the thread.\n"));195 192 } 193 194 if (RT_SUCCESS(rc)) 195 pTable->fStarted = true; 196 else 197 { 198 Log(("VBoxTray: Failed to start the thread\n")); 196 199 if (pTable->pfnDestroy) 197 { 198 pTable->pfnDestroy (pEnv, pTable->pInstance); 199 } 200 } 201 else 202 { 203 pTable->fStarted = true; 200 pTable->pfnDestroy(pEnv, pTable->pInstance); 204 201 } 205 202 } … … 215 212 { 216 213 if (!pEnv->hStopEvent) 217 {218 214 return; 219 }220 215 221 216 /* Signal to all threads. */ … … 231 226 WaitForSingleObject(pTable->hThread, INFINITE); 232 227 233 CloseHandle 228 CloseHandle(pTable->hThread); 234 229 pTable->hThread = 0; 235 230 } 236 231 237 232 if (pTable->pfnDestroy) 238 {239 233 pTable->pfnDestroy (pEnv, pTable->pInstance); 240 }241 242 234 pTable->fStarted = false; 243 235 } … … 247 239 } 248 240 249 CloseHandle (pEnv->hStopEvent); 250 } 251 252 253 /** Attempt to force Windows to reload the cursor image by attaching to the 241 CloseHandle(pEnv->hStopEvent); 242 } 243 244 245 /** 246 * Attempt to force Windows to reload the cursor image by attaching to the 254 247 * thread of the window currently under the mouse, hiding the cursor and 255 248 * showing it again. This could fail to work in any number of ways (no 256 249 * window under the cursor, the cursor has moved to a different window while 257 250 * we are processing), but we just accept this, as the cursor will be reloaded 258 * at some point anyway. */ 251 * at some point anyway. 252 */ 259 253 void VBoxServiceReloadCursor(void) 260 254 { … … 340 334 if (GetVersionEx(&info)) 341 335 { 342 Log(("VBoxTray: Windows version major %d minor %d .\n", info.dwMajorVersion, info.dwMinorVersion));336 Log(("VBoxTray: Windows version major %d minor %d\n", info.dwMajorVersion, info.dwMinorVersion)); 343 337 gMajorVersion = info.dwMajorVersion; 344 338 } … … 451 445 /* Check in 10 seconds (@todo make seconds configurable) ... */ 452 446 SetTimer(gToolWindow, 453 WM_VBOX_CHECK_HOSTVERSION,447 TIMERID_VBOXTRAY_CHECK_HOSTVERSION, 454 448 10 * 1000, /* 10 seconds */ 455 449 NULL /* No timerproc */); … … 479 473 480 474 /* Only enable for message debugging, lots of traffic! */ 481 //Log(("VBoxTray: Wait result = %ld .\n", waitResult));475 //Log(("VBoxTray: Wait result = %ld\n", waitResult)); 482 476 483 477 if (waitResult == 0) 484 478 { 485 Log(("VBoxTray: Event 'Exit' triggered .\n"));479 Log(("VBoxTray: Event 'Exit' triggered\n")); 486 480 /* exit */ 487 481 break; … … 490 484 && (ghSeamlessNotifyEvent!=0)) /* Only jump in, if seamless is active! */ 491 485 { 492 Log(("VBoxTray: Event 'Seamless' triggered .\n"));486 Log(("VBoxTray: Event 'Seamless' triggered\n")); 493 487 494 488 /* seamless window notification */ … … 563 557 return rc; 564 558 565 LogRel(("VBoxTray: %s r%s started .\n", RTBldCfgVersion(), RTBldCfgRevisionStr()));559 LogRel(("VBoxTray: %s r%s started\n", RTBldCfgVersion(), RTBldCfgRevisionStr())); 566 560 567 561 gInstance = hInstance; 568 562 VBoxServiceStart(); 569 563 570 LogRel(("VBoxTray: Ended .\n"));564 LogRel(("VBoxTray: Ended\n")); 571 565 572 566 /* Release instance mutex. */ … … 590 584 { 591 585 case WM_CREATE: 592 Log(("VBoxTray: Tool window created .\n"));586 Log(("VBoxTray: Tool window created\n")); 593 587 s_uTaskbarCreated = RegisterWindowMessage(TEXT("TaskbarCreated")); 594 588 if (!s_uTaskbarCreated) … … 600 594 601 595 case WM_DESTROY: 602 Log(("VBoxTray: Tool window destroyed .\n"));603 KillTimer(gToolWindow, WM_VBOX_CHECK_HOSTVERSION);596 Log(("VBoxTray: Tool window destroyed\n")); 597 KillTimer(gToolWindow, TIMERID_VBOXTRAY_CHECK_HOSTVERSION); 604 598 break; 605 599 … … 607 601 switch (wParam) 608 602 { 609 case WM_VBOX _CHECK_HOSTVERSION:603 case WM_VBOXTRAY_CHECK_HOSTVERSION: 610 604 if (RT_SUCCESS(VBoxCheckHostVersion())) 611 605 { 612 606 /* After successful run we don't need to check again. */ 613 KillTimer(gToolWindow, WM_VBOX_CHECK_HOSTVERSION);607 KillTimer(gToolWindow, TIMERID_VBOXTRAY_CHECK_HOSTVERSION); 614 608 } 615 609 return 0; … … 621 615 break; 622 616 623 case WM_VBOX _TRAY:617 case WM_VBOXTRAY_TRAY_ICON: 624 618 switch (lParam) 625 619 { … … 644 638 break; 645 639 646 case WM_VBOX _RESTORED:640 case WM_VBOXTRAY_VM_RESTORED: 647 641 VBoxRestoreSession(); 648 642 break; 649 643 650 case WM_VBOX _CHECK_VRDP:644 case WM_VBOXTRAY_VRDP_CHECK: 651 645 VBoxRestoreCheckVRDP(); 652 646 break; -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.h
r31145 r33966 36 36 #include "VBoxDispIf.h" 37 37 38 #define WM_VBOX_RESTORED WM_APP + 1 39 #define WM_VBOX_CHECK_VRDP WM_APP + 2 40 #define WM_VBOX_CHECK_HOSTVERSION WM_APP + 3 41 #define WM_VBOX_TRAY WM_APP + 4 38 /* 39 * Windows messsages. 40 */ 42 41 42 /** 43 * General VBoxTray messages. 44 */ 45 #define WM_VBOXTRAY_TRAY_ICON WM_APP + 40 46 #define WM_VBOXTRAY_TRAY_DISPLAY_BALLOON WM_APP + 41 47 /** 48 * VM/VMMDev related messsages. 49 */ 50 #define WM_VBOXTRAY_VM_RESTORED WM_APP + 100 51 /** 52 * VRDP messages. 53 */ 54 #define WM_VBOXTRAY_VRDP_CHECK WM_APP + 301 55 /** 56 * Misc. utility functions. 57 */ 58 #define WM_VBOXTRAY_CHECK_HOSTVERSION WM_APP + 1000 59 60 61 /* The tray icon's ID. */ 43 62 #define ID_TRAYICON 2000 44 63 64 65 /* 66 * Timer IDs. 67 */ 68 #define TIMERID_VBOXTRAY_CHECK_HOSTVERSION 1000 45 69 46 70 /* The environment information for services. */ -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxVRDP.cpp
r33595 r33966 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2010 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 #include <windows.h> 21 21 #include "VBoxTray.h" 22 #include "VBoxHelpers.h" 22 23 #include "VBoxVRDP.h" 23 24 #include <VBox/VMMDev.h> 24 25 #include <VBoxGuestInternal.h> 25 26 #include <iprt/assert.h> 26 #include "helpers.h"27 27 28 28
Note:
See TracChangeset
for help on using the changeset viewer.