Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Side by Side Diff: base/win/windows_version.h

Issue 6610029: Create a "GetWOW64Status()" utility function and make the rest of the codebas... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/win/windows_version.cc » ('j') | base/win/windows_version.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 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;
10
9 namespace base { 11 namespace base {
10 namespace win { 12 namespace win {
11 13
12 // NOTE: Keep these in order so callers can do things like 14 // NOTE: Keep these in order so callers can do things like
13 // "if (GetWinVersion() > WINVERSION_2000) ...". It's OK to change the values, 15 // "if (GetWinVersion() > WINVERSION_2000) ...". It's OK to change the values,
14 // though. 16 // though.
15 enum Version { 17 enum Version {
16 VERSION_PRE_2000 = 0, // Not supported 18 VERSION_PRE_2000 = 0, // Not supported
17 VERSION_2000 = 1, // Not supported 19 VERSION_2000 = 1, // Not supported
18 VERSION_XP = 2, 20 VERSION_XP = 2,
19 VERSION_SERVER_2003 = 3, 21 VERSION_SERVER_2003 = 3,
20 VERSION_VISTA = 4, 22 VERSION_VISTA = 4,
21 VERSION_2008 = 5, 23 VERSION_2008 = 5,
22 VERSION_WIN7 = 6, 24 VERSION_WIN7 = 6,
23 }; 25 };
24 26
25 // Returns the running version of Windows. 27 // Returns the running version of Windows.
26 Version GetVersion(); 28 Version GetVersion();
27 29
28 // Returns the major and minor version of the service pack installed. 30 // Returns the major and minor version of the service pack installed.
29 void GetServicePackLevel(int* major, int* minor); 31 void GetServicePackLevel(int* major, int* minor);
30 32
33 enum WOW64Status {
rvargas (doing something else) 2011/03/04 00:12:18 I would prefer if the enum was not a status (as in
Peter Kasting 2011/03/04 01:11:48 Hmm. I see your point. I can't think of anything
34 WOW64_DISABLED,
35 WOW64_ENABLED,
36 WOW64_UNKNOWN,
37 };
38
39 // Returns whether this process is running under WOW64 (the wrapper that allows
40 // 32-bit processes to run on 64-bit versions of Windows). This will return
41 // WOW64_DISABLED for both "32-bit Chrome on 32-bit Windows" and "64-bit Chrome
42 // on 64-bit Windows". WOW64_UNKNOWN means "an error occurred", e.g. the
43 // process does not have sufficient access rights to determine this.
44 WOW64Status GetWOW64Status();
45
46 // Like GetWOW64Status(), but for the supplied handle instead of the current
47 // process.
48 WOW64Status GetWOW64StatusForProcess(HANDLE process_handle);
49
31 } // namespace win 50 } // namespace win
32 } // namespace base 51 } // namespace base
33 52
34 #endif // BASE_WIN_WINDOWS_VERSION_H_ 53 #endif // BASE_WIN_WINDOWS_VERSION_H_
OLDNEW
« no previous file with comments | « no previous file | base/win/windows_version.cc » ('j') | base/win/windows_version.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698