Skip to content

Windows 11 on ARM: "ARM64" is returned for app architecture for AMD64 applications #14403

@josephsl

Description

@josephsl

Hi,

Stemming from a discussion in #14397:

Background:

#7894 introduced a collection of properties for app modules, one of them being app architecture. The purpose of "app architecture" property is to inform humans and code about which machine architecture the app is designed for. This property internally asks IsWow64Process2 function to return the machine type the process is running under, which is used to figure out if a process is a WoW64 process (x86 on x64, for example). There is a design flaw: in Windows 11 on ARM, it is possible to run x64 apps, causing NVDA to think that this is an ARM64 process when it is not.

Steps to reproduce:

See #14397 for an example, but to recap: run AMD64 app on a Windows 11 on ARM machine and observe that, in NVDA Python Console, typing "focus.apModule.appArchitecture" returns "ARM64" when it should say "AMD64".

Actual behavior:

"ARM64" is returned as ap architecture property.

Expected behavior:

"AMD64" is returned.

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

Installed/portable

NVDA version:

2022.3.2

Windows version:

Windows 11 22H2 (build 22623 beta)

Name and version of other software in use when reproducing the issue:

None

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

None

If NVDA add-ons are disabled, is your problem still occurring?

Yes

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Yes

Solution:

In Windows 11 and later, ask kernel32.dll::GetProcessInformation to obtain actual process machine information (although GetProcessInformation is available in Windows 8 and later, Windows 11 is required since one of the parameters was made available with build 22000).

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    audience/nvda-devPR or issue is relevant to NVDA / Add-on developersp3https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priorityplatform/Windows11Issues specific to Windows 11triagedHas been triaged, issue is waiting for implementation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions