Rudrashekhar X Das
Posts: 11
Joined: 2006-05-22
|
This is very strange, but solidly repeatable.
My project (Excel 2002, VS 2003, latest ADX loader) has UDFs and User Interface. Apparently if I start Excel normally by going to Programs/Excel, only one appDomain is created, and everything works great. But, the moment I save an excel file that uses my formulas, close Excel, and re-open it by double-clicking that file, it creates a separate AppDomain for the functions, and a separate one for the UI.
I have sent much more details to the support, but this is the gist of it.
Thanks! |
|
Rudrashekhar X Das
Posts: 11
Joined: 2006-05-22
|
This is getting even weirder, but it works!
If, during the handling of the AddinStartupComplete event (ADXAddinModule), you call Excel.Evaluate("=OneOfYourFunctions()"), everything will work fine!
Magic, mystery, don't know why... But this way only one AppDomain is created.
--Yuri |
|
Sergey Grischenko
Add-in Express team
Posts: 7235
Joined: 2004-07-05
|
Hi Yuri.
The ADX loader always loads the add-in in a separate application domain regardless whether you open Excel via the 'All Programs' menu or not.
I will look at your project and will reply you soon.
P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
|
|
Rudrashekhar X Das
Posts: 11
Joined: 2006-05-22
|
Thank you Sergey, we will release one version (because it apparently works OK so far), and will wait for your recommendations regarding the future versions.
Currently, both the UI forms and Excel Functions are loaded into the same appdomain because during the startup, the UI module uses Excel.Evaluate() to call one of our functions, which forces the functions to also be loaded into the same appdomain.
I don't know if its a hack, or a feature of Excel loading, or the ADX loader.
Thanks! |
|
Sergey Grischenko
Add-in Express team
Posts: 7235
Joined: 2004-07-05
|
Hi Yuri.
Thank you for the update. I will investigate this issue. |
|