32bit to 64bit upgrade in Office 365

Add-in Express™ Support Service
That's what is more important than anything else

32bit to 64bit upgrade in Office 365
Office 365 Word 32 bit 
Tim Kempster


Guest


Dear Support

Quick question. Microsoft are apparently pushing an Office 365 update where Word is upgraded from 32 bit to 64 bit version if installed on a 64 bit Windows machine as an update.

If a user has an add-in installed built with add-in express will there be a problem here? Will the add-in continue to load OK or if at install time has the add-in been set to be the 32 bit version in some way?

I do know that add-in express add-ins are both 32 bit and 64 bit compatible but I'm not sure if this is accomplished at load time or install time of the add-in. In other words would upgrading Word underneath break the install of the add-in?

Regards

Tim
Posted 29 Aug, 2019 08:51:51 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello Tim,

When you install the add-in, adxregistrator.exe registers it for 32bit and 64bit Office versions; this is why your installer deploys both adxloader.dll and adxloader64.dll.

If the add-in assembly is built for the Any CPU platform, it will work with no problem.

A problem may occur if the add-in reads/writes to the registry: switching Office from 32bit to 64bit will cause the add-in to use the 64bit registry while data will be left in the 32bit registry.


Andrei Smolin
Add-in Express Team Leader
Posted 29 Aug, 2019 09:06:08 Top
Tim Kempster


Guest


Good to know thanks. So as long as all reg access for settings etc. is to HKCU we the add-in should survive an update of the underlying host application (in our case Windword.exe) from 32bit to 64 bit.
Posted 29 Aug, 2019 09:23:00 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
You are safe ONLY if your add-in does NOT store any data in the registry! Otherwise, you may need to write some code to retrieve that data from the registry of another bitness.


Andrei Smolin
Add-in Express Team Leader
Posted 29 Aug, 2019 09:33:36 Top
Tim Kempster


Guest


I don't think that is right because HKEY_CURRENT_USER is agnostic to 32bit/64bit so it is safe to write there as I posted before?
Posted 29 Aug, 2019 09:37:49 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
See https://stackoverflow.com/questions/8216472/why-cant-i-properly-read-32bit-registry-values-in-hkcu-on-64bit-machine. They needed to use Microsoft.Win32.OpenBaseKey to specify whether to open the 64 or 32-bit portion of the registry.


Andrei Smolin
Add-in Express Team Leader
Posted 29 Aug, 2019 09:59:35 Top
Tim Kempster


Guest


No HKCU is shared in .Net as per the microsoft documentation referenced in the link you posted above:-

https://docs.microsoft.com/en-us/windows/win32/winprog64/shared-registry-keys

Anyway doesn't matter. The point is that the add-in will load ok if the base host app is changed from 32bit to 64bit.
Posted 29 Aug, 2019 10:06:50 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Okay. I might misunderstand something.


Andrei Smolin
Add-in Express Team Leader
Posted 29 Aug, 2019 10:22:10 Top