VirtualBox

Changeset 15954 in vbox for trunk


Ignore:
Timestamp:
Jan 14, 2009 7:46:17 PM (16 years ago)
Author:
vboxsync
Message:

IPRT: Added Windows 2008 and Windows 7 OS detection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/RTSystemQueryOSInfo-win.cpp

    r11356 r15954  
    6767    kRTWinOSType_2003,
    6868    kRTWinOSType_VISTA,
     69    kRTWinOSType_2008,
     70    kRTWinOSType_7,
    6971    kRTWinOSType_NT_UNKNOWN = 199,
    7072    kRTWinOSType_NT_LAST    = kRTWinOSType_UNKNOWN
     
    147149{
    148150    RTWINOSTYPE enmVer         = kRTWinOSType_UNKNOWN;
     151    BYTE  const bProductType   = pOSInfoEx->wProductType;
    149152    DWORD const dwPlatformId   = pOSInfoEx->dwPlatformId;
    150153    DWORD const dwMinorVersion = pOSInfoEx->dwMinorVersion;
     
    197200        else if (   dwMajorVersion == 6
    198201                 && dwMinorVersion == 0)
    199             enmVer = kRTWinOSType_VISTA;
    200         /** @todo check Windows Server 2008! */
     202        {
     203            if (bProductType != VER_NT_WORKSTATION)
     204                enmVer = kRTWinOSType_2008;
     205            else
     206                enmVer = kRTWinOSType_VISTA;
     207        }
     208        else if (   dwMajorVersion == 6
     209                 && dwMinorVersion == 1)
     210            enmVer = kRTWinOSType_7;
    201211        else
    202212            enmVer = kRTWinOSType_NT_UNKNOWN;
     
    364374                    break;
    365375                }
     376                case kRTWinOSType_2008:         strcpy(szTmp, "Windows 2008"); break;
     377                case kRTWinOSType_7:            strcpy(szTmp, "Windows 7"); break;
    366378
    367379                case kRTWinOSType_NT_UNKNOWN:
Note: See TracChangeset for help on using the changeset viewer.

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