Unregister ADX XLL while Excel is running

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

Unregister ADX XLL while Excel is running
Causes Excel to crash 
Henri Pellemans


Guest


Hi at ADX,

Until some time ago I received a warning if I wanted to unregister a ADX XLL while Excel is running. After one of the updates of ADX this warning is not fired anymore.

If I unregister while Excel is still running I receive a message that unregistering was succesful. When I close Excel and restart Excel then Excel crashes. If I restart Excel again and disable the add-in, Excel works fine again.

By coincidence I found this warning in the ADX source code. I refer to ADXLib/ADXXLLModule.cs starting at line 302. The default value [of showing an alert if Excel is running when uninstalled] is True. So somehow this value is changed in the process. Maybe 'uninstall' and 'unregister' are not the same?

My software:
Visual Studio 2010 PRO SP1 using VB.NET
Windows 7 PRO SP1 64-bit
ADX for .NET PRO most recent version
Excel 2010 PRO SP1 32-bit

Henri
Posted 25 Feb, 2012 02:08:04 Top
Eugene Astafiev


Guest


Hi Henri,

Could you please specify the build of Add-in Express you have currently installed?

Anyway, I will try to reproduce the issue on Monday. Thank you for the detailed description of the issue.
Posted 25 Feb, 2012 03:10:33 Top
Henri Pellemans


Guest


Hi Eugene,

I have ADX 2010 for Office and .NET Professional version 2010.6.6.3059

Best regards,

Henri
Posted 25 Feb, 2012 10:11:52 Top
Eugene Astafiev


Guest


Hi Henri,

Thank you. Could you please also specify the build number which worked as expected before installing a new one?
Posted 26 Feb, 2012 10:16:07 Top
Henri Pellemans


Guest


Hi Eugene, I don't remember that. If I may guess, I am almost sure that build 3056 did fire the warning [that Excel was running when trying to unregister]. So that version was OK. I am not sure about build 3057.

BTW, I just did another test: I created a new VB.NET ADX XLL and tried to register it while Excel was running. The messagebox displayed that registering was succesful. Then I closed Excel and restarted Excel. The UDF was not visible. The add-in was not available, I checked the add-in manager in Excel.

Then I registered the XLL while Excel was NOT running. The UDF was visible. Then I unregistered while Excel was running. The messagebox displayed it was succesful. Closed Excel and restarted Excel, causing Excel to crash. So the issue is reproducable. I've done it several times.

Best regards,

Henri
Posted 26 Feb, 2012 10:54:52 Top
Eugene Astafiev


Guest


Hi Henri,

I wasn't able to reproduce the issue. I tried this on different PCs with the latest version of Add-in Express installed. And they work like a charm. Do you have any other add-ins installed for Excel?

BTW, I just did another test: I created a new VB.NET ADX XLL and tried to register it while Excel was running. The messagebox displayed that registering was succesful. Then I closed Excel and restarted Excel. The UDF was not visible. The add-in was not available, I checked the add-in manager in Excel.


When you close Excel the recent windows registry changes are erased. That is why you can't find your add-in running after you restart Excel. You may check that your add-in is registered in the windows registry, please see the HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Options hive.
Posted 27 Feb, 2012 09:36:23 Top
Henri Pellemans


Guest


The issue does not occur on my Windows XP SP3 computer [also with Office 2010 and ADX .NET latest build].

On my Windows 7 SP1 computer I uninstalled ADX and reinstalled it. The issue remains, i.e. if I unregister a ADX XLL add-in while Excel is running, then close Excel, then start Excel, Excel crashes.

While thinking about the difference between my two computers:

I have another 'Master' XLL add-in with a lot of UDFs. As I continuously edit / update this Master XLL on my W7 computer the XLL is always registered, so each change to this XLL is immediately visible in Excel. On my WinXP computer a published version of this Master XLL is running. But in the past there was no problem registering two or more ADX XLL add-ins.

Furthermore I have two .xlam add-ins running: SOLVER.xlam and PUP7.xlam [from John Walkenbach].
Posted 27 Feb, 2012 14:46:59 Top
Eugene Astafiev


Guest


Hi Henri,

I have just tried to reproduce the issue on a PC with Windows 7 x64 and Office 2010 x86 (all updates are installed). And it works like a charm: I wasn't able to reproduce the issue.

Did you try to disable/uninstall all other XLL add-ins? Does it help?
Posted 28 Feb, 2012 03:24:21 Top
Henri Pellemans


Guest


Hi Eugene,

I disabled all add-ins.

If I register a new XLL addin, run Excel, then unregister the XLL while Excel is running, there is still no warning [messagebox] that Excel is running. However Excel does not crash anymore after restarting Excel.

I will perform some other tests, but not tonight, and I will keep you informed.

Henri
Posted 28 Feb, 2012 14:54:43 Top
Eugene Astafiev


Guest


Hi Henri,

As you may see the issue when Excel is crashed was caused by other installed Add-ins and doesn't relate to Add-in Express. Anyway, please try to reproduce the issue with a newly created empty add-in project without any other installed add-ins. Does it work as expected?

If I register a new XLL addin, run Excel, then unregister the XLL while Excel is running, there is still no warning [messagebox] that Excel is running.


This is by design in Add-in Express.
Posted 29 Feb, 2012 01:29:41 Top