Changeset 54931 in vbox for trunk/src/VBox
- Timestamp:
- Mar 24, 2015 5:40:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/mp-win.cpp
r48935 r54931 101 101 /* 102 102 * Resolve the API dynamically (one try) as it requires XP w/ sp3 or later. 103 */ 103 */ 104 104 typedef BOOL (WINAPI *PFNGETLOGICALPROCINFO)(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION, PDWORD); 105 105 static PFNGETLOGICALPROCINFO s_pfnGetLogicalProcInfo = (PFNGETLOGICALPROCINFO)~(uintptr_t)0; … … 107 107 s_pfnGetLogicalProcInfo = (PFNGETLOGICALPROCINFO)RTLdrGetSystemSymbol("kernel32.dll", "GetLogicalProcessorInformation"); 108 108 109 if (s_pfnGetLogicalProcInfo) 109 /* 110 * Sadly, on XP and Server 2003, even if the API is present, it does not tell us 111 * how many physical cores there are (any package will look like a single core). 112 * That is worse than not using the API at all, so just skip it unless it's Vista+. 113 */ 114 bool fIsVistaOrLater = false; 115 OSVERSIONINFOEX OSInfoEx = { 0 }; 116 OSInfoEx.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); 117 if ( GetVersionEx((LPOSVERSIONINFO) &OSInfoEx) 118 && (OSInfoEx.dwPlatformId == VER_PLATFORM_WIN32_NT) 119 && (OSInfoEx.dwMajorVersion >= 6)) 120 fIsVistaOrLater = true; 121 122 if (s_pfnGetLogicalProcInfo && fIsVistaOrLater) 110 123 { 111 124 /*
Note:
See TracChangeset
for help on using the changeset viewer.