OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_WIN_WINDOWS_VERSION_H_ | 5 #ifndef BASE_WIN_WINDOWS_VERSION_H_ |
6 #define BASE_WIN_WINDOWS_VERSION_H_ | 6 #define BASE_WIN_WINDOWS_VERSION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 typedef void* HANDLE; | 9 typedef void* HANDLE; |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 namespace win { | 12 namespace win { |
13 | 13 |
14 // NOTE: Keep these in order so callers can do things like | 14 // NOTE: Keep these in order so callers can do things like |
15 // "if (GetWinVersion() > WINVERSION_2000) ...". It's OK to change the values, | 15 // "if (base::win::GetVersion() > base::win::VERSION_2000) ...". It's OK to |
16 // though. | 16 // change the values, though. |
17 enum Version { | 17 enum Version { |
18 VERSION_PRE_2000 = 0, // Not supported | 18 VERSION_PRE_2000 = 0, // Not supported |
19 VERSION_2000 = 1, // Not supported | 19 VERSION_2000 = 1, // Not supported |
20 VERSION_XP = 2, | 20 VERSION_XP = 2, |
21 VERSION_SERVER_2003 = 3, // Also includes Windows XP Professional x64 edition | 21 VERSION_SERVER_2003 = 3, // Also includes Windows XP Professional x64 edition |
22 VERSION_VISTA = 4, | 22 VERSION_VISTA = 4, |
23 VERSION_2008 = 5, | 23 VERSION_SERVER_2008 = 5, |
24 VERSION_WIN7 = 6, | 24 VERSION_WIN7 = 6, |
25 }; | 25 }; |
26 | 26 |
27 // Returns the running version of Windows. | 27 // Returns the running version of Windows. |
28 Version GetVersion(); | 28 Version GetVersion(); |
29 | 29 |
30 // Returns the major and minor version of the service pack installed. | 30 // Returns the major and minor version of the service pack installed. |
31 void GetServicePackLevel(int* major, int* minor); | 31 void GetServicePackLevel(int* major, int* minor); |
32 | 32 |
33 enum WindowsArchitecture { | 33 enum WindowsArchitecture { |
(...skipping 24 matching lines...) Expand all Loading... |
58 WOW64Status GetWOW64Status(); | 58 WOW64Status GetWOW64Status(); |
59 | 59 |
60 // Like GetWOW64Status(), but for the supplied handle instead of the current | 60 // Like GetWOW64Status(), but for the supplied handle instead of the current |
61 // process. | 61 // process. |
62 WOW64Status GetWOW64StatusForProcess(HANDLE process_handle); | 62 WOW64Status GetWOW64StatusForProcess(HANDLE process_handle); |
63 | 63 |
64 } // namespace win | 64 } // namespace win |
65 } // namespace base | 65 } // namespace base |
66 | 66 |
67 #endif // BASE_WIN_WINDOWS_VERSION_H_ | 67 #endif // BASE_WIN_WINDOWS_VERSION_H_ |
OLD | NEW |