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

Unified 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, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/win/windows_version.cc » ('j') | base/win/windows_version.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/windows_version.h
===================================================================
--- base/win/windows_version.h (revision 76817)
+++ base/win/windows_version.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,6 +6,8 @@
#define BASE_WIN_WINDOWS_VERSION_H_
#pragma once
+typedef void* HANDLE;
+
namespace base {
namespace win {
@@ -28,6 +30,23 @@
// Returns the major and minor version of the service pack installed.
void GetServicePackLevel(int* major, int* minor);
+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
+ WOW64_DISABLED,
+ WOW64_ENABLED,
+ WOW64_UNKNOWN,
+};
+
+// Returns whether this process is running under WOW64 (the wrapper that allows
+// 32-bit processes to run on 64-bit versions of Windows). This will return
+// WOW64_DISABLED for both "32-bit Chrome on 32-bit Windows" and "64-bit Chrome
+// on 64-bit Windows". WOW64_UNKNOWN means "an error occurred", e.g. the
+// process does not have sufficient access rights to determine this.
+WOW64Status GetWOW64Status();
+
+// Like GetWOW64Status(), but for the supplied handle instead of the current
+// process.
+WOW64Status GetWOW64StatusForProcess(HANDLE process_handle);
+
} // namespace win
} // namespace base
« 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