Changeset 21219 in vbox
- Timestamp:
- Jul 5, 2009 1:44:53 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49536
- Location:
- trunk
- Files:
-
- 22 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VMMDev.h
r21218 r21219 28 28 */ 29 29 30 #ifndef ___VBox_V BoxDev_h31 #define ___VBox_V BoxDev_h30 #ifndef ___VBox_VMMDev_h 31 #define ___VBox_VMMDev_h 32 32 33 33 #include <VBox/cdefs.h> 34 34 35 35 RT_C_DECLS_BEGIN 36 37 /** @defgroup grp_vmmdev VMM Device 38 * 39 * Note! This interface cannot be changed, it can only be extended! 40 * 41 * @{ 42 */ 36 43 37 44 /** Mouse capability bits … … 78 85 * For now: 4 megabyte. 79 86 */ 80 #define VMMDEV_RAM_SIZE (4 * 256 * PAGE_SIZE)87 #define VMMDEV_RAM_SIZE (4 * 256 * PAGE_SIZE) 81 88 82 89 /** Size of VMMDev heap region accessible by guest. 83 * ( must be a power of two (pci range))90 * (Must be a power of two (pci range).) 84 91 */ 85 #define VMMDEV_HEAP_SIZE (4*PAGE_SIZE)92 #define VMMDEV_HEAP_SIZE (4 * PAGE_SIZE) 86 93 94 /** @} */ 87 95 RT_C_DECLS_END 88 96 89 97 #endif 98 -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp
r20478 r21219 23 23 24 24 #include <iprt/log.h> 25 #include <VBox/VMMDev.h> 25 26 #include <VBox/VBoxGuest.h> 26 #include <VBox/VBoxDev.h>27 27 #include <VBox/VBoxVideo.h> 28 28 -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp
r20201 r21219 1 /* $Id: $ */ 1 2 /** @file 2 * 3 * VBoxSeamless - Display notifications 4 * 3 * VBoxSeamless - Display notifications. 5 4 */ 6 5 … … 26 25 #include <VBoxHook.h> 27 26 #include <VBoxDisplay.h> 28 #include <VBox/V BoxDev.h>27 #include <VBox/VMMDev.h> 29 28 #include <iprt/assert.h> 30 29 #include "helpers.h" … … 58 57 { 59 58 Log(("VBoxTray: Could not get module handle of USER32.DLL!\n")); 60 return VERR_NOT_IMPLEMENTED; 59 return VERR_NOT_IMPLEMENTED; 61 60 } 62 61 else if (OSinfo.dwMajorVersion >= 5) /* APIs available only on W2K and up! */ 63 62 { 64 *(uintptr_t *)&gCtx.pfnChangeDisplaySettingsEx = (uintptr_t)GetProcAddress(hUser, "ChangeDisplaySettingsExA"); 63 *(uintptr_t *)&gCtx.pfnChangeDisplaySettingsEx = (uintptr_t)GetProcAddress(hUser, "ChangeDisplaySettingsExA"); 65 64 Log(("VBoxTray: pfnChangeDisplaySettingsEx = %p\n", gCtx.pfnChangeDisplaySettingsEx)); 66 65 67 *(uintptr_t *)&gCtx.pfnEnumDisplayDevices = (uintptr_t)GetProcAddress(hUser, "EnumDisplayDevicesA"); 66 *(uintptr_t *)&gCtx.pfnEnumDisplayDevices = (uintptr_t)GetProcAddress(hUser, "EnumDisplayDevicesA"); 68 67 Log(("VBoxTray: pfnEnumDisplayDevices = %p\n", gCtx.pfnEnumDisplayDevices)); 69 68 } … … 75 74 { 76 75 Log(("VBoxTray: Warning, display for platform not handled yet!\n")); 77 return VERR_NOT_IMPLEMENTED; 76 return VERR_NOT_IMPLEMENTED; 78 77 } 79 78 … … 94 93 bool result = false; 95 94 96 if( pCtx->pfnEnumDisplayDevices ) 95 if( pCtx->pfnEnumDisplayDevices ) 97 96 { 98 97 INT devNum = 0; … … 115 114 &dispDevice.DeviceKey[0], 116 115 dispDevice.StateFlags)); 117 116 118 117 if (dispDevice.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) 119 118 { 120 119 Log(("Primary device.\n")); 121 120 122 121 if (strcmp(&dispDevice.DeviceString[0], "VirtualBox Graphics Adapter") == 0) 123 122 result = true; 124 123 125 124 break; 126 125 } 127 126 128 127 FillMemory(&dispDevice, sizeof(DISPLAY_DEVICE), 0); 129 128 130 129 dispDevice.cb = sizeof(DISPLAY_DEVICE); 131 130 132 131 devNum++; 133 132 } 134 133 } 135 134 else /* This must be NT 4 or something really old, so don't use EnumDisplayDevices() here ... */ 136 { 135 { 137 136 Log(("Checking for active VBox display driver (NT or older)...\n")); 138 137 … … 154 153 { 155 154 BOOL fModeReset = (Width == 0 && Height == 0 && BitsPerPixel == 0); 156 155 157 156 DISPLAY_DEVICE DisplayDevice; 158 157 159 158 ZeroMemory(&DisplayDevice, sizeof(DisplayDevice)); 160 159 DisplayDevice.cb = sizeof(DisplayDevice); 161 160 162 161 /* Find out how many display devices the system has */ 163 162 DWORD NumDevices = 0; 164 163 DWORD i = 0; 165 164 while (EnumDisplayDevices (NULL, i, &DisplayDevice, 0)) 166 { 165 { 167 166 Log(("[%d] %s\n", i, DisplayDevice.DeviceName)); 168 167 … … 174 173 else if (!(DisplayDevice.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER)) 175 174 { 176 175 177 176 Log(("ResizeDisplayDevice: Found secondary device. err %d\n", GetLastError ())); 178 177 NumDevices++; 179 178 } 180 179 181 180 ZeroMemory(&DisplayDevice, sizeof(DisplayDevice)); 182 181 DisplayDevice.cb = sizeof(DisplayDevice); 183 182 i++; 184 183 } 185 184 186 185 Log(("ResizeDisplayDevice: Found total %d devices. err %d\n", NumDevices, GetLastError ())); 187 186 188 187 if (NumDevices == 0 || Id >= NumDevices) 189 188 { … … 191 190 return FALSE; 192 191 } 193 192 194 193 DISPLAY_DEVICE *paDisplayDevices = (DISPLAY_DEVICE *)alloca (sizeof (DISPLAY_DEVICE) * NumDevices); 195 194 DEVMODE *paDeviceModes = (DEVMODE *)alloca (sizeof (DEVMODE) * NumDevices); 196 195 RECTL *paRects = (RECTL *)alloca (sizeof (RECTL) * NumDevices); 197 196 198 197 /* Fetch information about current devices and modes. */ 199 198 DWORD DevNum = 0; 200 199 DWORD DevPrimaryNum = 0; 201 200 202 201 ZeroMemory(&DisplayDevice, sizeof(DISPLAY_DEVICE)); 203 202 DisplayDevice.cb = sizeof(DISPLAY_DEVICE); 204 203 205 204 i = 0; 206 205 while (EnumDisplayDevices (NULL, i, &DisplayDevice, 0)) 207 { 206 { 208 207 Log(("ResizeDisplayDevice: [%d(%d)] %s\n", i, DevNum, DisplayDevice.DeviceName)); 209 208 210 209 BOOL bFetchDevice = FALSE; 211 210 … … 218 217 else if (!(DisplayDevice.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER)) 219 218 { 220 219 221 220 Log(("ResizeDisplayDevice: Found secondary device. err %d\n", GetLastError ())); 222 221 bFetchDevice = TRUE; 223 222 } 224 223 225 224 if (bFetchDevice) 226 225 { … … 230 229 return FALSE; 231 230 } 232 231 233 232 paDisplayDevices[DevNum] = DisplayDevice; 234 233 235 234 /* First try to get the video mode stored in registry (ENUM_REGISTRY_SETTINGS). 236 235 * A secondary display could be not active at the moment and would not have … … 245 244 return FALSE; 246 245 } 247 246 248 247 if ( paDeviceModes[DevNum].dmPelsWidth == 0 249 248 || paDeviceModes[DevNum].dmPelsHeight == 0) … … 265 264 } 266 265 } 267 266 268 267 Log(("ResizeDisplayDevice: %dx%dx%d at %d,%d\n", 269 268 paDeviceModes[DevNum].dmPelsWidth, … … 272 271 paDeviceModes[DevNum].dmPosition.x, 273 272 paDeviceModes[DevNum].dmPosition.y)); 274 273 275 274 paRects[DevNum].left = paDeviceModes[DevNum].dmPosition.x; 276 275 paRects[DevNum].top = paDeviceModes[DevNum].dmPosition.y; … … 279 278 DevNum++; 280 279 } 281 280 282 281 ZeroMemory(&DisplayDevice, sizeof(DISPLAY_DEVICE)); 283 282 DisplayDevice.cb = sizeof(DISPLAY_DEVICE); 284 283 i++; 285 284 } 286 285 287 286 /* Width, height equal to 0 means that this value must be not changed. 288 287 * Update input parameters if necessary. … … 320 319 } 321 320 #endif /* Log */ 322 321 323 322 /* Without this, Windows will not ask the miniport for its 324 323 * mode table but uses an internal cache instead. … … 336 335 paDeviceModes[i].dmPelsWidth = paRects[i].right - paRects[i].left; 337 336 paDeviceModes[i].dmPelsHeight = paRects[i].bottom - paRects[i].top; 338 337 339 338 /* On Vista one must specify DM_BITSPERPEL. 340 339 * Note that the current mode dmBitsPerPel is already in the DEVMODE structure. 341 340 */ 342 341 paDeviceModes[i].dmFields = DM_POSITION | DM_PELSHEIGHT | DM_PELSWIDTH | DM_BITSPERPEL; 343 342 344 343 if ( i == Id 345 344 && BitsPerPixel != 0) … … 361 360 Log(("ResizeDisplayDevice: ChangeDisplaySettingsEx position err %d\n", GetLastError ())); 362 361 } 363 362 364 363 /* A second call to ChangeDisplaySettings updates the monitor. */ 365 LONG status = ChangeDisplaySettings(NULL, 0); 364 LONG status = ChangeDisplaySettings(NULL, 0); 366 365 Log(("ResizeDisplayDevice: ChangeDisplaySettings update status %d\n", status)); 367 366 if (status == DISP_CHANGE_SUCCESSFUL || status == DISP_CHANGE_BADMODE) … … 386 385 VBoxGuestFilterMaskInfo maskInfo; 387 386 DWORD cbReturned; 388 387 389 388 maskInfo.u32OrMask = VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST; 390 389 maskInfo.u32NotMask = 0; -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxMemBalloon.cpp
r10777 r21219 1 /* $Id: $ */ 1 2 /** @file 2 * 3 * VBoxMemBalloon - Memory balloon notification 4 * 3 * VBoxMemBalloon - Memory balloon notification. 5 4 */ 6 5 … … 131 130 Log(("VBoxMemBalloonThread: DeviceIoControl (balloon) failed with %d\n", GetLastError())); 132 131 } 133 } 132 } 134 133 else 135 134 { … … 143 142 } 144 143 } 145 } 144 } 146 145 while (!fTerminate); 147 146 -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxRestore.cpp
r10777 r21219 1 /* $Id: $ */ 1 2 /** @file 2 * 3 * VBoxRestore - Restore notification 4 * 3 * VBoxRestore - Restore notification. 5 4 */ 6 5 … … 25 24 #include "VBoxRestore.h" 26 25 #include <VBoxDisplay.h> 27 #include <VBox/V BoxDev.h>26 #include <VBox/VMMDev.h> 28 27 #include <VBoxGuestInternal.h> 29 28 #include <iprt/assert.h> … … 71 70 HDC hdc; 72 71 BOOL ret; 73 72 74 73 /* Check VRDP activity */ 75 74 hdc = GetDC(HWND_DESKTOP); … … 138 137 /** @todo Don't poll, but wait for connect/disconnect events */ 139 138 PostMessage(gToolWindow, WM_VBOX_CHECK_VRDP, 0, 0); 140 } 139 } 141 140 else 142 141 { … … 150 149 } 151 150 } 152 } 151 } 153 152 while (!fTerminate); 154 153 -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxSeamless.cpp
r11430 r21219 1 /* $Id: $ */ 1 2 /** @file 2 *3 3 * VBoxSeamless - Seamless windows 4 *5 4 */ 6 5 … … 26 25 #include <VBoxHook.h> 27 26 #include <VBoxDisplay.h> 28 #include <VBox/V BoxDev.h>27 #include <VBox/VMMDev.h> 29 28 #include <iprt/assert.h> 30 29 #include "helpers.h" … … 255 254 } 256 255 #endif 257 if ( !gCtx.lpRgnData 256 if ( !gCtx.lpRgnData 258 257 || (gCtx.lpRgnData->rdh.dwSize + gCtx.lpRgnData->rdh.nRgnSize != cbSize) 259 258 || memcmp(gCtx.lpRgnData, lpRgnData, cbSize)) … … 392 391 } 393 392 } 394 } 393 } 395 394 else 396 395 { … … 403 402 } 404 403 } 405 } 404 } 406 405 while (!fTerminate); 407 406 -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxStatistics.cpp
r10777 r21219 1 /* $Id: $ */ 1 2 /** @file 2 *3 3 * VBoxStats - Guest statistics notification 4 *5 4 */ 6 5 … … 27 26 #include "VBoxMemBalloon.h" 28 27 #include <VBoxDisplay.h> 29 #include <VBox/V BoxDev.h>28 #include <VBox/VMMDev.h> 30 29 #include <VBox/VBoxGuest.h> 31 30 #include <VBoxGuestInternal.h> … … 138 137 139 138 Assert(gCtx.pfnGlobalMemoryStatusEx && gCtx.pfnNtQuerySystemInformation); 140 if ( !gCtx.pfnGlobalMemoryStatusEx 139 if ( !gCtx.pfnGlobalMemoryStatusEx 141 140 || !gCtx.pfnNtQuerySystemInformation) 142 141 return; … … 192 191 { 193 192 if (gCtx.ullLastCpuLoad_Kernel == 0) 194 { 193 { 195 194 /* first time */ 196 195 gCtx.ullLastCpuLoad_Idle = pProcInfo->IdleTime.QuadPart; … … 291 290 Log(("VBoxStatsThread: DeviceIoControl (stat) failed with %d\n", GetLastError())); 292 291 } 293 } 292 } 294 293 else 295 294 { … … 304 303 } 305 304 /* Report statistics to the host */ 306 if ( gCtx.uStatInterval 305 if ( gCtx.uStatInterval 307 306 && gCtx.pfnNtQuerySystemInformation) 308 307 { 309 308 VBoxStatsReportStatistics(pCtx); 310 309 } 311 } 310 } 312 311 while (!fTerminate); 313 312 -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxVRDP.cpp
r13836 r21219 1 /* $Id$ */ 1 2 /** @file 2 *3 3 * VBoxVRDP - VBox VRDP connection notification 4 *5 4 */ 6 5 … … 26 25 #include "VBoxTray.h" 27 26 #include "VBoxVRDP.h" 28 #include <VBox/V BoxDev.h>27 #include <VBox/VMMDev.h> 29 28 #include <VBoxGuestInternal.h> 30 29 #include <iprt/assert.h> -
trunk/src/VBox/Additions/WINNT/VBoxTray/testcase/tstSessionHack.cpp
r10541 r21219 1 /* $Id: $ */ 1 2 /** @file 2 *3 3 * tstSessionHack 4 *5 4 */ 6 5 … … 21 20 */ 22 21 #define _WIN32_WINNT 0x0500 23 #include < windows.h>24 #include <VBox/V BoxDev.h>22 #include <Windows.h> 23 #include <VBox/VMMDev.h> 25 24 #include <VBox/VBoxGuest.h> 26 25 #include <VBoxGuestInternal.h> … … 52 51 else 53 52 printf("Removing session hack\n"); 54 53 55 54 if (!DeviceIoControl (gVBoxDriver, (argc == 1) ? VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION : VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION, NULL, 0, NULL, 0, &cbReturned, NULL)) 56 55 { -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.cpp
r21170 r21219 55 55 56 56 #include "VBoxGuestInternal.h" 57 #include <VBox/VMMDev.h> /* VMMDEV_RAM_SIZE */ 57 58 #include <VBox/VBoxGuest.h> 58 #include <VBox/VBoxDev.h> /* VMMDEV_RAM_SIZE */59 59 #include <VBox/version.h> 60 60 #include <iprt/initterm.h> -
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r21170 r21219 27 27 #define LOG_GROUP LOG_GROUP_DEFAULT 28 28 #include "VBoxGuestInternal.h" 29 #include <VBox/V BoxDev.h> /* for VMMDEV_RAM_SIZE */29 #include <VBox/VMMDev.h> /* for VMMDEV_RAM_SIZE */ 30 30 #include <VBox/log.h> 31 31 #include <iprt/mem.h> -
trunk/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest
r21137 r21219 53 53 ${PATH_ROOT}/include/VBox/types.h=>include/VBox/types.h \ 54 54 ${PATH_ROOT}/include/VBox/ostypes.h=>include/VBox/ostypes.h \ 55 ${PATH_ROOT}/include/VBox/V BoxDev.h=>include/VBox/VBoxDev.h \55 ${PATH_ROOT}/include/VBox/VMMDev.h=>include/VBox/VMMDev.h \ 56 56 ${PATH_ROOT}/include/VBox/VBoxGuest.h=>include/VBox/VBoxGuest.h \ 57 57 ${PATH_ROOT}/include/VBox/VBoxGuestLib.h=>include/VBox/VBoxGuestLib.h \ -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSeamless.cpp
r21211 r21219 27 27 #include <iprt/string.h> 28 28 29 #include <VBox/V BoxDev.h>29 #include <VBox/VMMDev.h> 30 30 #include <VBox/log.h> 31 31 -
trunk/src/VBox/Additions/linux/module/files_vboxadd
r14218 r21219 45 45 ${PATH_ROOT}/include/VBox/types.h=>include/VBox/types.h \ 46 46 ${PATH_ROOT}/include/VBox/ostypes.h=>include/VBox/ostypes.h \ 47 ${PATH_ROOT}/include/VBox/V BoxDev.h=>include/VBox/VBoxDev.h \47 ${PATH_ROOT}/include/VBox/VMMDev.h=>include/VBox/VMMDev.h \ 48 48 ${PATH_ROOT}/include/VBox/VBoxGuest.h=>include/VBox/VBoxGuest.h \ 49 49 ${PATH_ROOT}/include/VBox/VBoxGuestLib.h=>include/VBox/VBoxGuestLib.h \ -
trunk/src/VBox/Additions/linux/module/vboxmod.c
r20965 r21219 68 68 69 69 #include <VBox/log.h> 70 #include <VBox/V BoxDev.h>70 #include <VBox/VMMDev.h> 71 71 #include <iprt/asm.h> 72 72 #include <iprt/assert.h> -
trunk/src/VBox/Additions/x11/vboxvideo/vboxutils.c
r21218 r21219 19 19 */ 20 20 21 #include <VBox/VMMDev.h> 21 22 #include <VBox/VBoxGuest.h> 22 23 #include <VBox/VBoxGuestLib.h> 23 #include <VBox/VBoxDev.h>24 24 25 25 #ifndef PCIACCESS -
trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
r21062 r21219 28 28 29 29 #define LOG_GROUP LOG_GROUP_DEV_VMM 30 #include <VBox/V BoxDev.h>30 #include <VBox/VMMDev.h> 31 31 #include <VBox/VBoxGuest.h> 32 32 #include <VBox/log.h> -
trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.cpp
r13837 r21219 32 32 #include <VBox/log.h> 33 33 #include <iprt/asm.h> 34 #include <VBox/V BoxDev.h>34 #include <VBox/VMMDev.h> 35 35 #include "MouseImpl.h" 36 36 #include "DisplayImpl.h" -
trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.cpp
r13837 r21219 29 29 #endif 30 30 #include <VBox/pdm.h> 31 #include <VBox/V BoxDev.h>31 #include <VBox/VMMDev.h> 32 32 #include <VBox/VBoxGuest.h> 33 33 #include <VBox/cfgm.h> -
trunk/src/VBox/Main/ConsoleImpl.cpp
r21188 r21219 82 82 #endif 83 83 84 #include <VBox/V BoxDev.h>84 #include <VBox/VMMDev.h> 85 85 86 86 #include <VBox/HostServices/VBoxClipboardSvc.h> -
trunk/src/VBox/Main/GuestImpl.cpp
r18113 r21219 30 30 #include "Logging.h" 31 31 32 #include <VBox/V BoxDev.h>32 #include <VBox/VMMDev.h> 33 33 #include <iprt/cpputils.h> 34 34 -
trunk/src/VBox/Main/MouseImpl.cpp
r20990 r21219 30 30 #include <VBox/pdmdrv.h> 31 31 #include <iprt/asm.h> 32 #include <VBox/V BoxDev.h>32 #include <VBox/VMMDev.h> 33 33 34 34 /** -
trunk/src/VBox/Main/VMMDevInterface.cpp
r18637 r21219 28 28 29 29 #include <VBox/pdmdrv.h> 30 #include <VBox/V BoxDev.h>30 #include <VBox/VMMDev.h> 31 31 #include <VBox/VBoxGuest.h> 32 32 #include <VBox/shflsvc.h>
Note:
See TracChangeset
for help on using the changeset viewer.