Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
App modules/product name and version: use kernel32::GetPackageFullNam…
…e to obtain product info for immersive (hosted) apps (nvaccess#10114) * App modules/product name and version: obtain product info for immersive (hosted) apps via kernel32::GetPackageFullName function. Re nvaccess#10108. On Windows 8 and later, some apps can run inside a container. This is the case for WinRT/UWP apps, some web apps, and converted desktop apps (such as Microsoft Office 365 downloaded from Microsoft Store). For these apps, kernel32.dll::GetPackageFullName returns the 'real' product info such as name and version. Because it'll be returned in a serialized string representation, parse the first two values (name and version). To accomodate this change, the former method of obtaining product name and version via file version info has been moved to an internal function inside product info setter method. This function will be invoked if: * This is Windows 7/Server 2008 R2 (no support for containers yet). * An immersive app that is really a native pap (such as File Explorer). * Converted desktop apps that will not expose version info via file version info structure (such as Notepad in 20H1 Preview build 18963 and later). For consistency with immersive app info structure, the modified function will return a 2-tuple that records product name and version in that order. * App module handler/product name and version: _executableFileInfo -> _getExecutableFileInfo. Re nvaccess#10108. Reviewed by Mick Curran (NV Access): because of what the internal function does, it is better to give it a more descriptive name than just 'executable file info'. * App module handler/product name and version for immersive apps: typo fix. * Product name and version: separate executable file info function to its own method in base pap module. Re nvaccess#10108. Suggested by Leonard de Ruijter (Babbage): transform executable file info function from an internal one to a private method in base app module for ease of future maintenance.
- Loading branch information