summaryrefslogtreecommitdiffstats
path: root/base/win/win_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/win/win_util.cc')
-rw-r--r--base/win/win_util.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/base/win/win_util.cc b/base/win/win_util.cc
index 76d8c5d..93c086a 100644
--- a/base/win/win_util.cc
+++ b/base/win/win_util.cc
@@ -100,6 +100,17 @@ bool UserAccountControlIsEnabled() {
return (uac_enabled != 0);
}
+WindowsArchitecture GetWindowsArchitecture() {
+ SYSTEM_INFO system_info;
+ GetNativeSystemInfo(&system_info);
+ switch (system_info.wProcessorArchitecture) {
+ case PROCESSOR_ARCHITECTURE_INTEL: return X86_ARCHITECTURE;
+ case PROCESSOR_ARCHITECTURE_AMD64: return X64_ARCHITECTURE;
+ case PROCESSOR_ARCHITECTURE_IA64: return IA64_ARCHITECTURE;
+ default: return OTHER_ARCHITECTURE;
+ }
+}
+
bool SetAppIdForPropertyStore(IPropertyStore* property_store,
const wchar_t* app_id) {
DCHECK(property_store);