Changeset 51224 in vbox for trunk/src/VBox/Additions
- Timestamp:
- May 9, 2014 11:16:06 AM (11 years ago)
- Location:
- trunk/src/VBox/Additions
- Files:
-
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/Makefile.kmk
r50460 r51224 37 37 VBoxDisplay.cpp \ 38 38 VBoxVRDP.cpp \ 39 VBoxRestore.cpp \40 39 VBoxIPC.cpp \ 41 40 VBoxHelpers.cpp \ -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp
r49891 r51224 177 177 VBoxSeamlessDestroy 178 178 }, 179 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING180 {181 "Restore",182 VBoxRestoreInit,183 VBoxRestoreThread,184 NULL /* pfnStop */,185 VBoxRestoreDestroy186 },187 #endif188 179 { 189 180 "VRDP", … … 1175 1166 return 0; 1176 1167 1177 case WM_VBOXTRAY_VM_RESTORED:1178 VBoxRestoreSession();1179 return 0;1180 1181 case WM_VBOXTRAY_VRDP_CHECK:1182 VBoxRestoreCheckVRDP();1183 return 0;1184 1185 1168 case WM_WTSSESSION_CHANGE: 1186 1169 { -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.h
r48070 r51224 74 74 */ 75 75 #define WM_VBOXTRAY_TRAY_ICON WM_APP + 40 76 /**77 * VM/VMMDev related messsages.78 */79 #define WM_VBOXTRAY_VM_RESTORED WM_APP + 10080 /**81 * VRDP messages.82 */83 #define WM_VBOXTRAY_VRDP_CHECK WM_APP + 30184 76 85 77 -
trunk/src/VBox/Additions/WINNT/include/VBoxGuestInternal.h
r44528 r51224 16 16 #define __VBoxGuestInternal_h__ 17 17 18 /** Uncomment to enable VRDP status checks */ 19 //#define VBOX_WITH_VRDP_SESSION_HANDLING 20 21 /** Uncomment to enable the guest management extension in VBoxService */ 22 #define VBOX_WITH_MANAGEMENT 23 24 /** IOCTL for VBoxGuest to enable a VRDP session */ 25 #define VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2100, METHOD_BUFFERED, FILE_WRITE_ACCESS, 0) 26 27 /** IOCTL for VBoxGuest to disable a VRDP session */ 28 #define VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2101, METHOD_BUFFERED, FILE_WRITE_ACCESS, 0) 29 18 /* no global definitions right now */ 30 19 31 20 #endif /* __VBoxGuestInternal_h__ */ -
trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
r50822 r51224 38 38 VBoxGuest_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxguest\) KBUILD_BASENAME=KBUILD_STR\(vboxguest\) DEBUG_HASH=2 DEBUG_HASH2=3 EXPORT_SYMTAB 39 39 VBoxGuest_DEFS.solaris = VBOX_SVN_REV=$(VBOX_SVN_REV) 40 VBoxGuest_DEFS.win = VBOX_GUESTDRV_WITH_RELEASE_LOGGER # VBOX_WITH_VRDP_SESSION_HANDLING40 VBoxGuest_DEFS.win = VBOX_GUESTDRV_WITH_RELEASE_LOGGER 41 41 VBoxGuest_DEFS.darwin = VBOX_GUESTDRV_WITH_RELEASE_LOGGER 42 42 ifeq ($(KBUILD_TYPE),release) -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp
r50822 r51224 742 742 } 743 743 744 /* 745 * First process Windows specific stuff which cannot be handled 746 * by the common code used on all other platforms. In the default case 747 * we then finally handle the common cases. 748 */ 749 switch (uCmd) 750 { 751 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING 752 case VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION: 744 /* Verify that it's a buffered CTL. */ 745 if ((pStack->Parameters.DeviceIoControl.IoControlCode & 0x3) == METHOD_BUFFERED) 746 { 747 /* 748 * Process the common IOCtls. 749 */ 750 size_t cbDataReturned; 751 int vrc = VBoxGuestCommonIOCtl(uCmd, &pDevExt->Core, pSession, pBuf, cbData, &cbDataReturned); 752 753 LogFlowFunc(("rc=%Rrc, pBuf=0x%p, cbData=%u, cbDataReturned=%u\n", 754 vrc, pBuf, cbData, cbDataReturned)); 755 756 if (RT_SUCCESS(vrc)) 753 757 { 754 LogRelFunc(("ENABLE_VRDP_SESSION: Currently: %sabled\n", 755 pDevExt->fVRDPEnabled? "en": "dis")); 756 if (!pDevExt->fVRDPEnabled) 758 if (RT_UNLIKELY( cbDataReturned > cbData 759 || cbDataReturned > pStack->Parameters.DeviceIoControl.OutputBufferLength)) 757 760 { 758 KUSER_SHARED_DATA *pSharedUserData = (KUSER_SHARED_DATA *)KI_USER_SHARED_DATA; 759 760 pDevExt->fVRDPEnabled = true; 761 LogRelFunc(("ENABLE_VRDP_SESSION: Current active console ID: 0x%08X\n", 762 pSharedUserData->ActiveConsoleId)); 763 pDevExt->ulOldActiveConsoleId = pSharedUserData->ActiveConsoleId; 764 pSharedUserData->ActiveConsoleId = 2; 761 LogFlowFunc(("Too much output data %u - expected %u!\n", cbDataReturned, cbData)); 762 cbDataReturned = cbData; 763 Status = STATUS_BUFFER_TOO_SMALL; 765 764 } 766 break; 765 if (cbDataReturned > 0) 766 cbOut = cbDataReturned; 767 767 } 768 769 case VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION: 768 else 770 769 { 771 LogRelFunc(("DISABLE_VRDP_SESSION: Currently: %sabled\n", 772 pDevExt->fVRDPEnabled? "en": "dis")); 773 if (pDevExt->fVRDPEnabled) 774 { 775 KUSER_SHARED_DATA *pSharedUserData = (KUSER_SHARED_DATA *)KI_USER_SHARED_DATA; 776 777 pDevExt->fVRDPEnabled = false; 778 LogFlowFunc(("DISABLE_VRDP_SESSION: Current active console ID: 0x%08X\n", 779 pSharedUserData->ActiveConsoleId)); 780 pSharedUserData->ActiveConsoleId = pDevExt->ulOldActiveConsoleId; 781 pDevExt->ulOldActiveConsoleId = 0; 782 } 783 break; 770 if ( vrc == VERR_NOT_SUPPORTED 771 || vrc == VERR_INVALID_PARAMETER) 772 Status = STATUS_INVALID_PARAMETER; 773 else if (vrc == VERR_OUT_OF_RANGE) 774 Status = STATUS_INVALID_BUFFER_SIZE; 775 else 776 Status = STATUS_UNSUCCESSFUL; 784 777 } 785 #else 786 /* Add at least one (bogus) fall through case to shut up MSVC! */ 787 case 0: 788 #endif 789 default: 790 { 791 /* 792 * Process the common IOCtls. 793 */ 794 size_t cbDataReturned; 795 int vrc = VBoxGuestCommonIOCtl(uCmd, &pDevExt->Core, pSession, pBuf, cbData, &cbDataReturned); 796 797 LogFlowFunc(("rc=%Rrc, pBuf=0x%p, cbData=%u, cbDataReturned=%u\n", 798 vrc, pBuf, cbData, cbDataReturned)); 799 800 if (RT_SUCCESS(vrc)) 801 { 802 if (RT_UNLIKELY(cbDataReturned > cbData)) 803 { 804 LogFlowFunc(("Too much output data %u - expected %u!\n", cbDataReturned, cbData)); 805 cbDataReturned = cbData; 806 Status = STATUS_BUFFER_TOO_SMALL; 807 } 808 if (cbDataReturned > 0) 809 cbOut = cbDataReturned; 810 } 811 else 812 { 813 if ( vrc == VERR_NOT_SUPPORTED 814 || vrc == VERR_INVALID_PARAMETER) 815 Status = STATUS_INVALID_PARAMETER; 816 else if (vrc == VERR_OUT_OF_RANGE) 817 Status = STATUS_INVALID_BUFFER_SIZE; 818 else 819 Status = STATUS_UNSUCCESSFUL; 820 } 821 break; 822 } 778 } 779 else 780 { 781 LogFlowFunc(("Not buffered request (%#x) - not supported\n", 782 pStack->Parameters.DeviceIoControl.IoControlCode)); 783 Status = STATUS_NOT_SUPPORTED; 823 784 } 824 785 -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r50826 r51224 301 301 * Global Variables * 302 302 *******************************************************************************/ 303 static const size_t cbChangeMemBalloonReq = RT_OFFSETOF(VMMDevChangeMemBalloon, aPhysPage[VMMDEV_MEMORY_BALLOON_CHUNK_PAGES]);303 static const uint32_t cbChangeMemBalloonReq = RT_OFFSETOF(VMMDevChangeMemBalloon, aPhysPage[VMMDEV_MEMORY_BALLOON_CHUNK_PAGES]); 304 304 305 305 #if defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) … … 427 427 pReq->header.rc = VERR_INTERNAL_ERROR; 428 428 pReq->hypervisorSize = cbHypervisor; 429 pReq->hypervisorStart = ( uintptr_t)RTR0MemObjAddress(hObj);429 pReq->hypervisorStart = (RTGCPTR32)(uintptr_t)RTR0MemObjAddress(hObj); 430 430 if ( uAlignment == PAGE_SIZE 431 431 && pReq->hypervisorStart & (_4M - 1)) … … 901 901 { 902 902 int rc, rc2; 903 unsigned i;904 903 905 904 #ifdef VBOX_GUESTDRV_WITH_RELEASE_LOGGER … … 957 956 RTListInit(&pDevExt->FreeList); 958 957 RTListInit(&pDevExt->SessionList); 959 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING960 pDevExt->fVRDPEnabled = false;961 #endif962 958 pDevExt->fLoggingEnabled = false; 963 959 pDevExt->f32PendingEvents = 0; … … 1905 1901 const VMMDevRequestType enmType = pReqHdr->requestType; 1906 1902 const uint32_t cbReq = pReqHdr->size; 1907 const uint32_t cbMinSize = vmmdevGetRequestSize(enmType);1903 const uint32_t cbMinSize = (uint32_t)vmmdevGetRequestSize(enmType); 1908 1904 1909 1905 LogFlowFunc(("Type=%d\n", pReqHdr->requestType)); … … 2508 2504 return rc; 2509 2505 } 2510 2511 2512 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING2513 /**2514 * Enables the VRDP session and saves its session ID.2515 *2516 * @returns VBox status code.2517 *2518 * @param pDevExt The device extention.2519 * @param pSession The session.2520 */2521 static int VBoxGuestCommonIOCtl_EnableVRDPSession(VBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession)2522 {2523 /* Nothing to do here right now, since this only is supported on Windows at the moment. */2524 return VERR_NOT_IMPLEMENTED;2525 }2526 2527 2528 /**2529 * Disables the VRDP session.2530 *2531 * @returns VBox status code.2532 *2533 * @param pDevExt The device extention.2534 * @param pSession The session.2535 */2536 static int VBoxGuestCommonIOCtl_DisableVRDPSession(VBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession)2537 {2538 /* Nothing to do here right now, since this only is supported on Windows at the moment. */2539 return VERR_NOT_IMPLEMENTED;2540 }2541 #endif /* VBOX_WITH_VRDP_SESSION_HANDLING */2542 2506 2543 2507 … … 2949 2913 break; 2950 2914 2951 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING2952 case VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION:2953 rc = VBoxGuestCommonIOCtl_EnableVRDPSession(pDevExt, pSession);2954 break;2955 2956 case VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION:2957 rc = VBoxGuestCommonIOCtl_DisableVRDPSession(pDevExt, pSession);2958 break;2959 #endif /* VBOX_WITH_VRDP_SESSION_HANDLING */2960 2915 case VBOXGUEST_IOCTL_SET_MOUSE_STATUS: 2961 2916 CHECKRET_SIZE("SET_MOUSE_STATUS", sizeof(uint32_t)); -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h
r50688 r51224 162 162 * #SessionSpinlock lock. */ 163 163 RTLISTANCHOR SessionList; 164 #ifdef VBOX_WITH_VRDP_SESSION_HANDLING165 bool fVRDPEnabled;166 #endif167 164 /** Flag indicating whether logging to the release log 168 165 * is enabled. */
Note:
See TracChangeset
for help on using the changeset viewer.