Completely unloading and reloading a COM addin while host is still running

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

Completely unloading and reloading a COM addin while host is still running
 
nwein




Posts: 544
Joined: 2011-03-28
I'm at loss. In my tests, turning an add-in off leaves the loader dll file locked if I use that code line.

You're right, the loader is locked, however, it does allow to move it to another location. What i'm doing is basically moving the file to a temp folder, and replace my add-in folder with the new loader (although new loaders don't update as rapidly as you may know).
The updater add-in has a task to delete stuff from the temp folder on a set interval, as long as the files are not in use.
So while you might be correct that the loader doesn't actually get updated during the add-in update process, it will eventually get updated, whenever the host is restarted at any point in the future (and in reality, even though our users hardly ever restart anything, they do restart their machine or Office applications once in a blue moon, and at that time, the new loader, if there is any of course, will get loaded).

Please check your Junk Email. If it isn't there, please provide another email address and I'll resend it.

It's not in my junk, but I've sent you an email with an address in it.
Thanks!
Posted 12 Feb, 2019 10:27:15 Top
Andrei Smolin


Add-in Express team


Posts: 16317
Joined: 2006-05-11
Hello Nir,

Although we've found a way that seemingly allows us not to lock the loader, you should be aware that the default behavior will be left as is; you will be required to use that property to achieve your goals. Moreover, we've found that using your approach with Office from Windows Store may create severe problems for you, the developer. I suppose that I'll post a blog about these problems on Friday; I'll post a link here.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Feb, 2019 07:44:42 Top
nwein




Posts: 544
Joined: 2011-03-28
Thanks you Andrei.
I'm not sure I know what is
Office from Windows Store
but at least for us everything currently seems fine.
And, as you mentioned above, you can prevent the loader from being locked, all the better
Posted 20 Feb, 2019 09:53:59 Top
Andrei Smolin


Add-in Express team


Posts: 16317
Joined: 2006-05-11
Hello Nir,

Please check https://www.add-in-express.com/creating-addins-blog/2019/02/27/office-from-store-issues/.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 28 Feb, 2019 06:18:45 Top