Forum Discussion

Jozef Izso's avatar
Jozef Izso
Iron Contributor
Dec 04, 2022
Solved

Microsoft Office ARM64 and native COM add-ins

Hi, we are developing native add-ins for Microsoft Office based on Windows COM. We are evaluating Windows 11 ARM64 system with native MS Office ARM64.

 

When we build a native COM add-in for ARM64 platform, Office application will not load the code as it results in error combase.dll: ReturnHr(1) tid(10d8) 800700C1 %1 is not a valid Win32 application.

'POWERPNT.EXE' (Win32): Loaded 'C:\dev\NetOffice\NativeAddinSample\ARM64\Debug\NativeAddinLib.dll'. Symbols loaded.
'POWERPNT.EXE' (Win32): Unloaded 'C:\dev\NetOffice\NativeAddinSample\ARM64\Debug\NativeAddinLib.dll'
onecore\com\combase\objact\dllcache.cxx(2058)\combase.dll!00007FF9ECF171BC: (caller: 00007FF9ECEA8BCC) ReturnHr(1) tid(10d8) 800700C1 %1 is not a valid Win32 application.
onecore\com\combase\objact\dllcache.cxx(1968)\combase.dll!00007FF9ECF1722C: (caller: 00007FF9ECEA8BCC) ReturnHr(2) tid(10d8) 800700C1 %1 is not a valid Win32 application.

 

Our add-ins compiled for x64 platform does work but the performance is noticeably slower when compared to native ARM64 code.

 

We use regsvr32.exe from System32 to register the addin so the library is registered as InprocServer32 type.

C:\Windows\System32\regsvr32.exe ARM64\Debug\NativeAddinLib.dll

 

This article does not document the COM inproc server registration for Windows 11 ARM64: https://learn.microsoft.com/en-us/windows/win32/winprog64/process-interoperability

 

What can we do to support MS Office ARM64 natively?

 

  • The solution is to build the project as Arm64X binary for ARM64EC platform.

    https://learn.microsoft.com/en-us/windows/arm/arm64x-build

1 Reply

  • Jozef Izso's avatar
    Jozef Izso
    Iron Contributor
    The solution is to build the project as Arm64X binary for ARM64EC platform.

    https://learn.microsoft.com/en-us/windows/arm/arm64x-build

Resources