|
1 | 1 | # -*- coding: UTF-8 -*- |
2 | 2 | # A part of NonVisual Desktop Access (NVDA) |
3 | | -# Copyright (C) 2006-2022 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Patrick Zajda, Joseph Lee, |
| 3 | +# Copyright (C) 2006-2023 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Patrick Zajda, Joseph Lee, |
4 | 4 | # Babbage B.V., Mozilla Corporation, Julien Cochuyt, Leonard de Ruijter |
5 | 5 | # This file is covered by the GNU General Public License. |
6 | 6 | # See the file COPYING for more details. |
@@ -628,11 +628,11 @@ def _get_appPath(self): |
628 | 628 | self.appPath = path.value if path else None |
629 | 629 | return self.appPath |
630 | 630 |
|
631 | | - def _get_is64BitProcess(self): |
| 631 | + def _get_is64BitProcess(self) -> bool: |
632 | 632 | """Whether the underlying process is a 64 bit process. |
633 | 633 | @rtype: bool |
634 | 634 | """ |
635 | | - if os.environ.get("PROCESSOR_ARCHITEW6432") not in ("AMD64","ARM64"): |
| 635 | + if winVersion.getWinVer().processorArchitecture not in ("AMD64","ARM64"): |
636 | 636 | # This is 32 bit Windows. |
637 | 637 | self.is64BitProcess = False |
638 | 638 | return False |
@@ -733,7 +733,7 @@ def _get_appArchitecture(self) -> str: |
733 | 733 | processMachine = ctypes.wintypes.USHORT() |
734 | 734 | ctypes.windll.kernel32.IsWow64Process2(self.processHandle, ctypes.byref(processMachine), None) |
735 | 735 | if not processMachine.value: |
736 | | - self.appArchitecture = os.environ.get("PROCESSOR_ARCHITEW6432") |
| 736 | + self.appArchitecture = winVersion.getWinVer().processorArchitecture |
737 | 737 | else: |
738 | 738 | # On ARM64, two 32-bit architectures are supported: x86 (via emulation) and ARM (natively). |
739 | 739 | self.appArchitecture = archValues2ArchNames[processMachine.value] |
|
0 commit comments