title: Support for Windows 10 desktop applications on ARM - MFC and COM and OPOS work?
body: <p>I am trying to understand the barriers to porting a C++ MFC application that runs on x86 Windows 10 to an ARM Windows 10 device with the Qualcomm Snapdragon processor.</p>
  <p>The 32 bit application has the following characteristics:</p>
  <ul>
  <li>MFC with C++ used for the user interface</li>
  <li>C used for the business logic</li>
  <li>the source code is divided into about 30 different projects, some static libraries, some DLLs, some EXE</li>
  <li>relies on Windows API for multi-threading, semaphores, mutexes, cryptology</li>
  <li>uses COM objects from Third Party providers, OPOS Service Objects and OPOS Control objects</li>
  <li>relies on local instance of SQL Server Express using ADO for database</li>
  </ul>
  <p>This application compiles fine with Visual Studio 2015/2017/2019 targeting x86 and Windows 10.</p>
  <p><strong>My question is:</strong> what are the possible barriers to migrating this application to ARM Windows 10 using the Snapdragon processor?</p>
  <p>A secondary question is what would be an appropriate, low cost ARM Windows 10 device? Most Windows 10 ARM Snapdragon devices from HP, Samsung, and Lenovo seem to be in the US$800 and up pricing and I'd like something more inexpensive as in less than US$200.</p>
  <p>A side question: will the Snapdragon 410 processor work for initial testing and compatibility checks. I'm looking at the DragonBoard 410C from Arrow as a low cost test platform. <a href="https://www.arrow.com/en/products/dragonboard410c/arrow-development-tools" rel="nofollow noreferrer">https://www.arrow.com/en/products/dragonboard410c/arrow-development-tools</a></p>
  <blockquote>
  <p>This DragonBoard™ 410C based on 96Boards™ specification features the
  Qualcomm® Snapdragon™ 410 processor, a Quad-core ARM® Cortex™ A53 at
  up to 1.2GHz clock speed per core, capable of 32-bit and 64-bit
  operation.96Boards is a 32-bit and 64-bit ARM® Open Platform hosted by
  Linaro™ with the intension to serve the software/ maker and embedded
  OEM communities. DragonBoard 410C supports Android 5.1, Linux based on
  Debian and Win10 IoT Core advanced processing power, WLAN, Bluetooth,
  and GPS, all packed into a board the size of a credit card. It is
  designed to support feature-rich functionality, including multimedia,
  with the Qualcomm® Adreno™ 306 GPU, integrated ISP with up to 13 MP
  camera support, and 1080p HD video playback and capture with H.264
  (AVC).</p>
  </blockquote>
  <p>The DragonBoard 820C may be a more appropriate test hardware as it is closer to what most Windows 10 ARM Snapdragon product offerings are shipping with.  <a href="https://www.arrow.com/en/products/dragonboard820c/arrow-development-tools" rel="nofollow noreferrer">https://www.arrow.com/en/products/dragonboard820c/arrow-development-tools</a></p>
  <p><strong>What I have been able to find thus far</strong></p>
  <p>This posted question, <a href="https://stackoverflow.com/questions/31724673/win32-support-on-windows-10">Win32 support on Windows 10</a> , seems to be the closest to my question however there is no real answer. The accepted answer says &quot;There's no x86 Win32 emulation at all. You need to use a toolset designed for the platform.&quot; which appears to be wrong according to the following articles:</p>
  <ul>
  <li><a href="https://www.techradar.com/news/windows-10-on-arm-is-set-to-become-more-useful-with-emulation-for-traditional-64-bit-apps" rel="nofollow noreferrer">https://www.techradar.com/news/windows-10-on-arm-is-set-to-become-more-useful-with-emulation-for-traditional-64-bit-apps</a></li>
  </ul>
  <blockquote>
  <p>Right now, with Windows 10 on ARM laptops, it’s possible to run 32-bit
  x86 desktop software using emulation, but not dedicated 64-bit
  software like, say, Adobe’s Premiere Pro video editing app for
  example.</p>
  </blockquote>
  <ul>
  <li><p><a href="https://channel9.msdn.com/Events/Build/2017/P4171" rel="nofollow noreferrer">https://channel9.msdn.com/Events/Build/2017/P4171</a> is a video that mentions x86 emulation</p>
  </li>
  <li><p><a href="https://docs.microsoft.com/en-us/windows/uwp/porting/apps-on-arm-x86-emulation" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/windows/uwp/porting/apps-on-arm-x86-emulation</a> discusses x86 emulation</p>
  </li>
  </ul>
  <blockquote>
  <p>Emulation for x86 apps makes the rich ecosystem of Win32 apps
  available on ARM. This provides the user the magical experience of
  running an existing x86 win32 app without any modifications to the
  app. The app doesn’t even know that it is running on a Windows on ARM
  PC, unless it calls specific APIs (IsWoW64Process2)</p>
  </blockquote>
  <ul>
  <li><a href="https://www.howtogeek.com/309119/what-is-windows-10-on-arm-and-how-is-it-different-from-windows-rt/" rel="nofollow noreferrer">https://www.howtogeek.com/309119/what-is-windows-10-on-arm-and-how-is-it-different-from-windows-rt/</a></li>
  </ul>
  <blockquote>
  <p>Windows 10 on ARM is completely different [from Windows/RT]. This is the full Windows
  desktop experience. Microsoft has created a special emulator layer
  that allows traditional 32-bit desktop applications to run on ARM
  processors, so everything should “just work”. Microsoft even showed
  off a version of Windows 10 Professional on ARM, and said it supports
  all the usual advanced features you’d find on Windows 10 Professional.</p>
  <p>The emulation works completely transparently to both users and the
  programs they run. It uses the same WOW (Windows on Windows)
  technology that Windows uses to run 32-bit applications on 64-bit
  versions of Windows today. However, the x86-to-ARM emulation happens
  entirely in software.</p>
  </blockquote>
  <p><strong>Compiling for ARM with VS 2017 and software component considerations</strong></p>
  <p>This article, <a href="https://pete.akeo.ie/2017/05/compiling-desktop-arm-applications-with.html" rel="nofollow noreferrer">https://pete.akeo.ie/2017/05/compiling-desktop-arm-applications-with.html</a> , provides some details about compiling desktop applications for ARM using Visual Studio 2017.</p>
  <p>This article, <a href="https://support.microsoft.com/en-us/help/4521606/windows-10-arm-based-pc" rel="nofollow noreferrer">https://support.microsoft.com/en-us/help/4521606/windows-10-arm-based-pc</a> , under the section about limitations mentions:</p>
  <blockquote>
  <p>Drivers for hardware, games and apps will only work if they're
  designed for a Windows 10 ARM-based PC. For more info, check with the
  hardware manufacturer or the organization that developed the driver.
  Drivers are software programs that communicate with hardware
  devices—they're commonly used for antivirus and antimalware software,
  printing or PDF software, assistive technologies, CD and DVD
  utilities, and virtualization software.</p>
  <p>If a driver doesn’t work, the app or hardware that relies on it won’t
  work either (at least not fully). Peripherals and devices only work if
  the drivers they depend on are built into Windows 10, or if the
  hardware developer has released ARM64 drivers for the device.</p>
  </blockquote>
  <p>The article also says in the same section:</p>
  <blockquote>
  <p>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.</p>
  </blockquote>
  <p>Here is a Microsoft portal to Windows 10 on ARM documentation, <a href="https://docs.microsoft.com/en-us/windows/arm/" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/windows/arm/</a> with links to various resources on the page as well as a left hand sidebar with additional documentation links.</p>
  <p><strong>Some considerations and additional information</strong></p>
  <p><a href="https://stackoverflow.com/questions/54685795/can-sql-server-express-or-any-version-run-on-rpi">Can SQL Server Express (or any version) run on RPi?</a>  and the answer appears to be there is no ARM version of SQL Express. However there is a comment that says there is an ARM version of SQL Server Compact. SQL Server Compact has been replaced by SQL Server localDB however I'm not sure if there is an ARM version of that or not however it seems to use parts of SQL Server so an ARM version seems doubtful. See <a href="https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15</a></p>
  <p>On the other hand it looks like Microsoft is releasing Azure SQL Edge which does run on x64 and ARM64. <a href="https://azure.microsoft.com/en-us/services/sql-edge/" rel="nofollow noreferrer">https://azure.microsoft.com/en-us/services/sql-edge/</a></p>
  <p>This Developer Minute video from Microsoft describes the steps to enable ARM64 builds in Visual Studio. <a href="https://www.youtube.com/watch?v=OZtVBDeVqCE&amp;feature=youtu.be" rel="nofollow noreferrer">https://www.youtube.com/watch?v=OZtVBDeVqCE&amp;feature=youtu.be</a> and there are also instructions at this link <a href="https://blogs.windows.com/windowsdeveloper/2018/11/15/official-support-for-windows-10-on-arm-development/" rel="nofollow noreferrer">https://blogs.windows.com/windowsdeveloper/2018/11/15/official-support-for-windows-10-on-arm-development/</a></p>