VirtualBox

Changeset 21219 in vbox


Ignore:
Timestamp:
Jul 5, 2009 1:44:53 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49536
Message:

VBox/VBoxDev.h -> VBox/VMMDev.h

Location:
trunk
Files:
22 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VMMDev.h

    r21218 r21219  
    2828 */
    2929
    30 #ifndef ___VBox_VBoxDev_h
    31 #define ___VBox_VBoxDev_h
     30#ifndef ___VBox_VMMDev_h
     31#define ___VBox_VMMDev_h
    3232
    3333#include <VBox/cdefs.h>
    3434
    3535RT_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 */
    3643
    3744/** Mouse capability bits
     
    7885 *  For now: 4 megabyte.
    7986 */
    80 #define VMMDEV_RAM_SIZE (4 * 256 * PAGE_SIZE)
     87#define VMMDEV_RAM_SIZE                                     (4 * 256 * PAGE_SIZE)
    8188
    8289/** 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).)
    8491 */
    85 #define VMMDEV_HEAP_SIZE (4*PAGE_SIZE)
     92#define VMMDEV_HEAP_SIZE                                    (4 * PAGE_SIZE)
    8693
     94/** @} */
    8795RT_C_DECLS_END
    8896
    8997#endif
     98
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp

    r20478 r21219  
    2323
    2424#include <iprt/log.h>
     25#include <VBox/VMMDev.h>
    2526#include <VBox/VBoxGuest.h>
    26 #include <VBox/VBoxDev.h>
    2727#include <VBox/VBoxVideo.h>
    2828
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp

    r20201 r21219  
     1/* $Id: $ */
    12/** @file
    2  *
    3  * VBoxSeamless - Display notifications
    4  *
     3 * VBoxSeamless - Display notifications.
    54 */
    65
     
    2625#include <VBoxHook.h>
    2726#include <VBoxDisplay.h>
    28 #include <VBox/VBoxDev.h>
     27#include <VBox/VMMDev.h>
    2928#include <iprt/assert.h>
    3029#include "helpers.h"
     
    5857    {
    5958        Log(("VBoxTray: Could not get module handle of USER32.DLL!\n"));
    60         return VERR_NOT_IMPLEMENTED; 
     59        return VERR_NOT_IMPLEMENTED;
    6160    }
    6261    else if (OSinfo.dwMajorVersion >= 5)        /* APIs available only on W2K and up! */
    6362    {
    64         *(uintptr_t *)&gCtx.pfnChangeDisplaySettingsEx = (uintptr_t)GetProcAddress(hUser, "ChangeDisplaySettingsExA"); 
     63        *(uintptr_t *)&gCtx.pfnChangeDisplaySettingsEx = (uintptr_t)GetProcAddress(hUser, "ChangeDisplaySettingsExA");
    6564        Log(("VBoxTray: pfnChangeDisplaySettingsEx = %p\n", gCtx.pfnChangeDisplaySettingsEx));
    6665
    67         *(uintptr_t *)&gCtx.pfnEnumDisplayDevices = (uintptr_t)GetProcAddress(hUser, "EnumDisplayDevicesA"); 
     66        *(uintptr_t *)&gCtx.pfnEnumDisplayDevices = (uintptr_t)GetProcAddress(hUser, "EnumDisplayDevicesA");
    6867        Log(("VBoxTray: pfnEnumDisplayDevices = %p\n", gCtx.pfnEnumDisplayDevices));
    6968    }
     
    7574    {
    7675        Log(("VBoxTray: Warning, display for platform not handled yet!\n"));
    77         return VERR_NOT_IMPLEMENTED; 
     76        return VERR_NOT_IMPLEMENTED;
    7877    }
    7978
     
    9493    bool result = false;
    9594
    96     if( pCtx->pfnEnumDisplayDevices ) 
     95    if( pCtx->pfnEnumDisplayDevices )
    9796    {
    9897        INT devNum = 0;
     
    115114                          &dispDevice.DeviceKey[0],
    116115                          dispDevice.StateFlags));
    117    
     116
    118117            if (dispDevice.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE)
    119118            {
    120119                Log(("Primary device.\n"));
    121    
     120
    122121                if (strcmp(&dispDevice.DeviceString[0], "VirtualBox Graphics Adapter") == 0)
    123122                    result = true;
    124    
     123
    125124                break;
    126125            }
    127    
     126
    128127            FillMemory(&dispDevice, sizeof(DISPLAY_DEVICE), 0);
    129    
     128
    130129            dispDevice.cb = sizeof(DISPLAY_DEVICE);
    131    
     130
    132131            devNum++;
    133132        }
    134133    }
    135134    else    /* This must be NT 4 or something really old, so don't use EnumDisplayDevices() here  ... */
    136     {       
     135    {
    137136        Log(("Checking for active VBox display driver (NT or older)...\n"));
    138137
     
    154153{
    155154    BOOL fModeReset = (Width == 0 && Height == 0 && BitsPerPixel == 0);
    156    
     155
    157156    DISPLAY_DEVICE DisplayDevice;
    158157
    159158    ZeroMemory(&DisplayDevice, sizeof(DisplayDevice));
    160159    DisplayDevice.cb = sizeof(DisplayDevice);
    161    
     160
    162161    /* Find out how many display devices the system has */
    163162    DWORD NumDevices = 0;
    164163    DWORD i = 0;
    165164    while (EnumDisplayDevices (NULL, i, &DisplayDevice, 0))
    166     { 
     165    {
    167166        Log(("[%d] %s\n", i, DisplayDevice.DeviceName));
    168167
     
    174173        else if (!(DisplayDevice.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER))
    175174        {
    176            
     175
    177176            Log(("ResizeDisplayDevice: Found secondary device. err %d\n", GetLastError ()));
    178177            NumDevices++;
    179178        }
    180        
     179
    181180        ZeroMemory(&DisplayDevice, sizeof(DisplayDevice));
    182181        DisplayDevice.cb = sizeof(DisplayDevice);
    183182        i++;
    184183    }
    185    
     184
    186185    Log(("ResizeDisplayDevice: Found total %d devices. err %d\n", NumDevices, GetLastError ()));
    187    
     186
    188187    if (NumDevices == 0 || Id >= NumDevices)
    189188    {
     
    191190        return FALSE;
    192191    }
    193    
     192
    194193    DISPLAY_DEVICE *paDisplayDevices = (DISPLAY_DEVICE *)alloca (sizeof (DISPLAY_DEVICE) * NumDevices);
    195194    DEVMODE *paDeviceModes = (DEVMODE *)alloca (sizeof (DEVMODE) * NumDevices);
    196195    RECTL *paRects = (RECTL *)alloca (sizeof (RECTL) * NumDevices);
    197    
     196
    198197    /* Fetch information about current devices and modes. */
    199198    DWORD DevNum = 0;
    200199    DWORD DevPrimaryNum = 0;
    201    
     200
    202201    ZeroMemory(&DisplayDevice, sizeof(DISPLAY_DEVICE));
    203202    DisplayDevice.cb = sizeof(DISPLAY_DEVICE);
    204    
     203
    205204    i = 0;
    206205    while (EnumDisplayDevices (NULL, i, &DisplayDevice, 0))
    207     { 
     206    {
    208207        Log(("ResizeDisplayDevice: [%d(%d)] %s\n", i, DevNum, DisplayDevice.DeviceName));
    209        
     208
    210209        BOOL bFetchDevice = FALSE;
    211210
     
    218217        else if (!(DisplayDevice.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER))
    219218        {
    220            
     219
    221220            Log(("ResizeDisplayDevice: Found secondary device. err %d\n", GetLastError ()));
    222221            bFetchDevice = TRUE;
    223222        }
    224        
     223
    225224        if (bFetchDevice)
    226225        {
     
    230229                return FALSE;
    231230            }
    232        
     231
    233232            paDisplayDevices[DevNum] = DisplayDevice;
    234            
     233
    235234            /* First try to get the video mode stored in registry (ENUM_REGISTRY_SETTINGS).
    236235             * A secondary display could be not active at the moment and would not have
     
    245244                return FALSE;
    246245            }
    247            
     246
    248247            if (   paDeviceModes[DevNum].dmPelsWidth == 0
    249248                || paDeviceModes[DevNum].dmPelsHeight == 0)
     
    265264                }
    266265            }
    267            
     266
    268267            Log(("ResizeDisplayDevice: %dx%dx%d at %d,%d\n",
    269268                    paDeviceModes[DevNum].dmPelsWidth,
     
    272271                    paDeviceModes[DevNum].dmPosition.x,
    273272                    paDeviceModes[DevNum].dmPosition.y));
    274                    
     273
    275274            paRects[DevNum].left   = paDeviceModes[DevNum].dmPosition.x;
    276275            paRects[DevNum].top    = paDeviceModes[DevNum].dmPosition.y;
     
    279278            DevNum++;
    280279        }
    281        
     280
    282281        ZeroMemory(&DisplayDevice, sizeof(DISPLAY_DEVICE));
    283282        DisplayDevice.cb = sizeof(DISPLAY_DEVICE);
    284283        i++;
    285284    }
    286    
     285
    287286    /* Width, height equal to 0 means that this value must be not changed.
    288287     * Update input parameters if necessary.
     
    320319    }
    321320#endif /* Log */
    322    
     321
    323322    /* Without this, Windows will not ask the miniport for its
    324323     * mode table but uses an internal cache instead.
     
    336335        paDeviceModes[i].dmPelsWidth  = paRects[i].right - paRects[i].left;
    337336        paDeviceModes[i].dmPelsHeight = paRects[i].bottom - paRects[i].top;
    338        
     337
    339338        /* On Vista one must specify DM_BITSPERPEL.
    340339         * Note that the current mode dmBitsPerPel is already in the DEVMODE structure.
    341340         */
    342341        paDeviceModes[i].dmFields = DM_POSITION | DM_PELSHEIGHT | DM_PELSWIDTH | DM_BITSPERPEL;
    343        
     342
    344343        if (   i == Id
    345344            && BitsPerPixel != 0)
     
    361360        Log(("ResizeDisplayDevice: ChangeDisplaySettingsEx position err %d\n", GetLastError ()));
    362361    }
    363    
     362
    364363    /* A second call to ChangeDisplaySettings updates the monitor. */
    365     LONG status = ChangeDisplaySettings(NULL, 0); 
     364    LONG status = ChangeDisplaySettings(NULL, 0);
    366365    Log(("ResizeDisplayDevice: ChangeDisplaySettings update status %d\n", status));
    367366    if (status == DISP_CHANGE_SUCCESSFUL || status == DISP_CHANGE_BADMODE)
     
    386385    VBoxGuestFilterMaskInfo maskInfo;
    387386    DWORD cbReturned;
    388    
     387
    389388    maskInfo.u32OrMask = VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST;
    390389    maskInfo.u32NotMask = 0;
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxMemBalloon.cpp

    r10777 r21219  
     1/* $Id: $ */
    12/** @file
    2  *
    3  * VBoxMemBalloon - Memory balloon notification
    4  *
     3 * VBoxMemBalloon - Memory balloon notification.
    54 */
    65
     
    131130                    Log(("VBoxMemBalloonThread: DeviceIoControl (balloon) failed with %d\n", GetLastError()));
    132131            }
    133         } 
     132        }
    134133        else
    135134        {
     
    143142            }
    144143        }
    145     } 
     144    }
    146145    while (!fTerminate);
    147146
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxRestore.cpp

    r10777 r21219  
     1/* $Id: $ */
    12/** @file
    2  *
    3  * VBoxRestore - Restore notification
    4  *
     3 * VBoxRestore - Restore notification.
    54 */
    65
     
    2524#include "VBoxRestore.h"
    2625#include <VBoxDisplay.h>
    27 #include <VBox/VBoxDev.h>
     26#include <VBox/VMMDev.h>
    2827#include <VBoxGuestInternal.h>
    2928#include <iprt/assert.h>
     
    7170    HDC  hdc;
    7271    BOOL ret;
    73    
     72
    7473    /* Check VRDP activity */
    7574    hdc = GetDC(HWND_DESKTOP);
     
    138137                /** @todo Don't poll, but wait for connect/disconnect events */
    139138                PostMessage(gToolWindow, WM_VBOX_CHECK_VRDP, 0, 0);
    140         } 
     139        }
    141140        else
    142141        {
     
    150149            }
    151150        }
    152     } 
     151    }
    153152    while (!fTerminate);
    154153
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxSeamless.cpp

    r11430 r21219  
     1/* $Id: $ */
    12/** @file
    2  *
    33 * VBoxSeamless - Seamless windows
    4  *
    54 */
    65
     
    2625#include <VBoxHook.h>
    2726#include <VBoxDisplay.h>
    28 #include <VBox/VBoxDev.h>
     27#include <VBox/VMMDev.h>
    2928#include <iprt/assert.h>
    3029#include "helpers.h"
     
    255254                    }
    256255#endif
    257                     if (    !gCtx.lpRgnData 
     256                    if (    !gCtx.lpRgnData
    258257                        ||  (gCtx.lpRgnData->rdh.dwSize + gCtx.lpRgnData->rdh.nRgnSize != cbSize)
    259258                        ||  memcmp(gCtx.lpRgnData, lpRgnData, cbSize))
     
    392391                }
    393392            }
    394         } 
     393        }
    395394        else
    396395        {
     
    403402            }
    404403        }
    405     } 
     404    }
    406405    while (!fTerminate);
    407406
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxStatistics.cpp

    r10777 r21219  
     1/* $Id: $ */
    12/** @file
    2  *
    33 * VBoxStats - Guest statistics notification
    4  *
    54 */
    65
     
    2726#include "VBoxMemBalloon.h"
    2827#include <VBoxDisplay.h>
    29 #include <VBox/VBoxDev.h>
     28#include <VBox/VMMDev.h>
    3029#include <VBox/VBoxGuest.h>
    3130#include <VBoxGuestInternal.h>
     
    138137
    139138    Assert(gCtx.pfnGlobalMemoryStatusEx && gCtx.pfnNtQuerySystemInformation);
    140     if (    !gCtx.pfnGlobalMemoryStatusEx 
     139    if (    !gCtx.pfnGlobalMemoryStatusEx
    141140        ||  !gCtx.pfnNtQuerySystemInformation)
    142141        return;
     
    192191    {
    193192        if (gCtx.ullLastCpuLoad_Kernel == 0)
    194         {   
     193        {
    195194            /* first time */
    196195            gCtx.ullLastCpuLoad_Idle    = pProcInfo->IdleTime.QuadPart;
     
    291290                    Log(("VBoxStatsThread: DeviceIoControl (stat) failed with %d\n", GetLastError()));
    292291            }
    293         } 
     292        }
    294293        else
    295294        {
     
    304303        }
    305304        /* Report statistics to the host */
    306         if (    gCtx.uStatInterval 
     305        if (    gCtx.uStatInterval
    307306            &&  gCtx.pfnNtQuerySystemInformation)
    308307        {
    309308            VBoxStatsReportStatistics(pCtx);
    310309        }
    311     } 
     310    }
    312311    while (!fTerminate);
    313312
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxVRDP.cpp

    r13836 r21219  
     1/* $Id$ */
    12/** @file
    2  *
    33 * VBoxVRDP - VBox VRDP connection notification
    4  *
    54 */
    65
     
    2625#include "VBoxTray.h"
    2726#include "VBoxVRDP.h"
    28 #include <VBox/VBoxDev.h>
     27#include <VBox/VMMDev.h>
    2928#include <VBoxGuestInternal.h>
    3029#include <iprt/assert.h>
  • trunk/src/VBox/Additions/WINNT/VBoxTray/testcase/tstSessionHack.cpp

    r10541 r21219  
     1/* $Id: $ */
    12/** @file
    2  *
    33 * tstSessionHack
    4  *
    54 */
    65
     
    2120 */
    2221#define _WIN32_WINNT 0x0500
    23 #include <windows.h>
    24 #include <VBox/VBoxDev.h>
     22#include <Windows.h>
     23#include <VBox/VMMDev.h>
    2524#include <VBox/VBoxGuest.h>
    2625#include <VBoxGuestInternal.h>
     
    5251    else
    5352        printf("Removing session hack\n");
    54  
     53
    5554    if (!DeviceIoControl (gVBoxDriver, (argc == 1) ? VBOXGUEST_IOCTL_ENABLE_VRDP_SESSION : VBOXGUEST_IOCTL_DISABLE_VRDP_SESSION, NULL, 0, NULL, 0, &cbReturned, NULL))
    5655    {
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.cpp

    r21170 r21219  
    5555
    5656#include "VBoxGuestInternal.h"
     57#include <VBox/VMMDev.h>                /* VMMDEV_RAM_SIZE */
    5758#include <VBox/VBoxGuest.h>
    58 #include <VBox/VBoxDev.h>               /* VMMDEV_RAM_SIZE */
    5959#include <VBox/version.h>
    6060#include <iprt/initterm.h>
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r21170 r21219  
    2727#define LOG_GROUP   LOG_GROUP_DEFAULT
    2828#include "VBoxGuestInternal.h"
    29 #include <VBox/VBoxDev.h> /* for VMMDEV_RAM_SIZE */
     29#include <VBox/VMMDev.h> /* for VMMDEV_RAM_SIZE */
    3030#include <VBox/log.h>
    3131#include <iprt/mem.h>
  • trunk/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest

    r21137 r21219  
    5353    ${PATH_ROOT}/include/VBox/types.h=>include/VBox/types.h \
    5454    ${PATH_ROOT}/include/VBox/ostypes.h=>include/VBox/ostypes.h \
    55     ${PATH_ROOT}/include/VBox/VBoxDev.h=>include/VBox/VBoxDev.h \
     55    ${PATH_ROOT}/include/VBox/VMMDev.h=>include/VBox/VMMDev.h \
    5656    ${PATH_ROOT}/include/VBox/VBoxGuest.h=>include/VBox/VBoxGuest.h \
    5757    ${PATH_ROOT}/include/VBox/VBoxGuestLib.h=>include/VBox/VBoxGuestLib.h \
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSeamless.cpp

    r21211 r21219  
    2727#include <iprt/string.h>
    2828
    29 #include <VBox/VBoxDev.h>
     29#include <VBox/VMMDev.h>
    3030#include <VBox/log.h>
    3131
  • trunk/src/VBox/Additions/linux/module/files_vboxadd

    r14218 r21219  
    4545    ${PATH_ROOT}/include/VBox/types.h=>include/VBox/types.h \
    4646    ${PATH_ROOT}/include/VBox/ostypes.h=>include/VBox/ostypes.h \
    47     ${PATH_ROOT}/include/VBox/VBoxDev.h=>include/VBox/VBoxDev.h \
     47    ${PATH_ROOT}/include/VBox/VMMDev.h=>include/VBox/VMMDev.h \
    4848    ${PATH_ROOT}/include/VBox/VBoxGuest.h=>include/VBox/VBoxGuest.h \
    4949    ${PATH_ROOT}/include/VBox/VBoxGuestLib.h=>include/VBox/VBoxGuestLib.h \
  • trunk/src/VBox/Additions/linux/module/vboxmod.c

    r20965 r21219  
    6868
    6969#include <VBox/log.h>
    70 #include <VBox/VBoxDev.h>
     70#include <VBox/VMMDev.h>
    7171#include <iprt/asm.h>
    7272#include <iprt/assert.h>
  • trunk/src/VBox/Additions/x11/vboxvideo/vboxutils.c

    r21218 r21219  
    1919 */
    2020
     21#include <VBox/VMMDev.h>
    2122#include <VBox/VBoxGuest.h>
    2223#include <VBox/VBoxGuestLib.h>
    23 #include <VBox/VBoxDev.h>
    2424
    2525#ifndef PCIACCESS
  • trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp

    r21062 r21219  
    2828
    2929#define LOG_GROUP LOG_GROUP_DEV_VMM
    30 #include <VBox/VBoxDev.h>
     30#include <VBox/VMMDev.h>
    3131#include <VBox/VBoxGuest.h>
    3232#include <VBox/log.h>
  • trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.cpp

    r13837 r21219  
    3232#include <VBox/log.h>
    3333#include <iprt/asm.h>
    34 #include <VBox/VBoxDev.h>
     34#include <VBox/VMMDev.h>
    3535#include "MouseImpl.h"
    3636#include "DisplayImpl.h"
  • trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.cpp

    r13837 r21219  
    2929#endif
    3030#include <VBox/pdm.h>
    31 #include <VBox/VBoxDev.h>
     31#include <VBox/VMMDev.h>
    3232#include <VBox/VBoxGuest.h>
    3333#include <VBox/cfgm.h>
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r21188 r21219  
    8282#endif
    8383
    84 #include <VBox/VBoxDev.h>
     84#include <VBox/VMMDev.h>
    8585
    8686#include <VBox/HostServices/VBoxClipboardSvc.h>
  • trunk/src/VBox/Main/GuestImpl.cpp

    r18113 r21219  
    3030#include "Logging.h"
    3131
    32 #include <VBox/VBoxDev.h>
     32#include <VBox/VMMDev.h>
    3333#include <iprt/cpputils.h>
    3434
  • trunk/src/VBox/Main/MouseImpl.cpp

    r20990 r21219  
    3030#include <VBox/pdmdrv.h>
    3131#include <iprt/asm.h>
    32 #include <VBox/VBoxDev.h>
     32#include <VBox/VMMDev.h>
    3333
    3434/**
  • trunk/src/VBox/Main/VMMDevInterface.cpp

    r18637 r21219  
    2828
    2929#include <VBox/pdmdrv.h>
    30 #include <VBox/VBoxDev.h>
     30#include <VBox/VMMDev.h>
    3131#include <VBox/VBoxGuest.h>
    3232#include <VBox/shflsvc.h>
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette