gpt4 book ai didi

winapi - 支持 ARM 上的 Windows 10 桌面应用程序 - MFC 和 COM 以及 OPOS 工作吗?

转载 作者:行者123 更新时间:2023-12-04 11:29:02 26 4
gpt4 key购买 nike

我试图了解将在 x86 Windows 10 上运行的 C++ MFC 应用程序移植到带有 Qualcomm Snapdragon 处理器的 ARM Windows 10 设备的障碍。
32位应用程序具有以下特点:

  • MFC 和 C++ 用于用户界面
  • C 用于业务逻辑
  • 源代码分为大约 30 个不同的项目,一些静态库,一些 DLL,一些 EXE
  • 依赖 Windows API 进行多线程、信号量、互斥锁、密码学
  • 使用来自第三方提供商的 COM 对象、OPOS 服务对象和 OPOS 控制对象
  • 依赖于使用 ADO 的 SQL Server Express 本地实例用于数据库

  • 此应用程序可与针对 x86 和 Windows 10 的 Visual Studio 2015/2017/2019 很好地编译。
    我的问题是:使用 Snapdragon 处理器将此应用程序迁移到 ARM Windows 10 的可能障碍是什么?
    第二个问题是什么是合适的低成本 ARM Windows 10 设备?惠普、三星和联想的大多数 Windows 10 ARM Snapdragon 设备的价格似乎都在 800 美元以上,我想要更便宜的东西,比如不到 200 美元。
    附带问题:Snapdragon 410 处理器是否可以用于初始测试和兼容性检查。我将 Arrow 的 DragonBoard 410C 视为低成本测试平台。 https://www.arrow.com/en/products/dragonboard410c/arrow-development-tools

    This DragonBoard™ 410C based on 96Boards™ specification features theQualcomm® Snapdragon™ 410 processor, a Quad-core ARM® Cortex™ A53 atup to 1.2GHz clock speed per core, capable of 32-bit and 64-bitoperation.96Boards is a 32-bit and 64-bit ARM® Open Platform hosted byLinaro™ with the intension to serve the software/ maker and embeddedOEM communities. DragonBoard 410C supports Android 5.1, Linux based onDebian and Win10 IoT Core advanced processing power, WLAN, Bluetooth,and GPS, all packed into a board the size of a credit card. It isdesigned to support feature-rich functionality, including multimedia,with the Qualcomm® Adreno™ 306 GPU, integrated ISP with up to 13 MPcamera support, and 1080p HD video playback and capture with H.264(AVC).


    DragonBoard 820C 可能是更合适的测试硬件,因为它更接近大多数 Windows 10 ARM Snapdragon 产品随附的产品。 https://www.arrow.com/en/products/dragonboard820c/arrow-development-tools
    到目前为止我能找到什么
    这个发布的问题, Win32 support on Windows 10 ,似乎最接近我的问题,但没有真正的答案。接受的答案是“根本没有 x86 Win32 仿真。您需要使用为该平台设计的工具集。”根据以下文章,这似乎是错误的:
  • https://www.techradar.com/news/windows-10-on-arm-is-set-to-become-more-useful-with-emulation-for-traditional-64-bit-apps

  • Right now, with Windows 10 on ARM laptops, it’s possible to run 32-bitx86 desktop software using emulation, but not dedicated 64-bitsoftware like, say, Adobe’s Premiere Pro video editing app forexample.


  • https://channel9.msdn.com/Events/Build/2017/P4171是一个提到 x86 仿真的视频
  • https://docs.microsoft.com/en-us/windows/uwp/porting/apps-on-arm-x86-emulation讨论 x86 仿真

  • Emulation for x86 apps makes the rich ecosystem of Win32 appsavailable on ARM. This provides the user the magical experience ofrunning an existing x86 win32 app without any modifications to theapp. The app doesn’t even know that it is running on a Windows on ARMPC, unless it calls specific APIs (IsWoW64Process2)


  • https://www.howtogeek.com/309119/what-is-windows-10-on-arm-and-how-is-it-different-from-windows-rt/

  • Windows 10 on ARM is completely different [from Windows/RT]. This is the full Windowsdesktop experience. Microsoft has created a special emulator layerthat allows traditional 32-bit desktop applications to run on ARMprocessors, so everything should “just work”. Microsoft even showedoff a version of Windows 10 Professional on ARM, and said it supportsall the usual advanced features you’d find on Windows 10 Professional.

    The emulation works completely transparently to both users and theprograms they run. It uses the same WOW (Windows on Windows)technology that Windows uses to run 32-bit applications on 64-bitversions of Windows today. However, the x86-to-ARM emulation happensentirely in software.


    使用 VS 2017 为 ARM 编译和软件组件注意事项
    本文, https://pete.akeo.ie/2017/05/compiling-desktop-arm-applications-with.html ,提供了有关使用 Visual Studio 2017 为 ARM 编译桌面应用程序的一些详细信息。
    本文, https://support.microsoft.com/en-us/help/4521606/windows-10-arm-based-pc ,在关于限制的部分下提到:

    Drivers for hardware, games and apps will only work if they'redesigned for a Windows 10 ARM-based PC. For more info, check with thehardware manufacturer or the organization that developed the driver.Drivers are software programs that communicate with hardwaredevices—they're commonly used for antivirus and antimalware software,printing or PDF software, assistive technologies, CD and DVDutilities, and virtualization software.

    If a driver doesn’t work, the app or hardware that relies on it won’twork either (at least not fully). Peripherals and devices only work ifthe drivers they depend on are built into Windows 10, or if thehardware developer has released ARM64 drivers for the device.


    文章在同一部分还说:

    64-bit (x64) apps won’t work. You'll need 64-bit (ARM64) apps, 32-bit(ARM32) apps, or 32-bit (x86) apps. You can usually find 32-bit (x86)versions of apps, but some app developers only offer 64-bit (x64)apps.


    这是 Windows 10 on ARM 文档的 Microsoft 门户, https://docs.microsoft.com/en-us/windows/arm/带有指向页面上各种资源的链接以及带有附加文档链接的左侧边栏。
    一些注意事项和附加信息
    Can SQL Server Express (or any version) run on RPi?答案似乎是没有 ARM 版本的 SQL Express。然而,有一条评论说有一个 ARM 版本的 SQL Server Compact。 SQL Server Compact 已被 SQL Server localDB 取代,但我不确定是否有 ARM 版本,但它似乎使用了 SQL Server 的一部分,因此 ARM 版本似乎值得怀疑。见 https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15
    另一方面,看起来微软正在发布可以在 x64 和 ARM64 上运行的 Azure SQL Edge。 https://azure.microsoft.com/en-us/services/sql-edge/
    Microsoft 的此开发人员纪要视频描述了在 Visual Studio 中启用 ARM64 构建的步骤。 https://www.youtube.com/watch?v=OZtVBDeVqCE&feature=youtu.be并且此链接中还有说明 https://blogs.windows.com/windowsdeveloper/2018/11/15/official-support-for-windows-10-on-arm-development/

    最佳答案

    我可能不得不面对的一个障碍是我使用“Visual Studio 安装程序项目”扩展来打包/分发我的软件(基于 MFC)来构建“.msi”安装程序文件。
    问题是该扩展(还)不包括针对 ARM64 系统的选项,所以我不得不推荐使用 x86版本。
    但是,我还没有能够测试这是否有效。该 MSI 文件是否将软件安装在正确的位置? (即,“Program Files (x86)”文件夹的相关“仿真”等效项。)
    还有一个问题是应该安装哪个 VC-RunTime Redistributable Package(s):x86 或 ARM64,还是两者?
    当然,我可以构建和打包针对 ARM64 的二进制文件,但是没有办法让 MSI 文件将其正确安装到“ native ”“程序文件”位置。

    关于winapi - 支持 ARM 上的 Windows 10 桌面应用程序 - MFC 和 COM 以及 OPOS 工作吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62600092/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com