At which point during an Excel XLL startup is the HostApplication available?

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

At which point during an Excel XLL startup is the HostApplication available?
 
Jason Rodman




Posts: 33
Joined: 2016-11-01
I also went back and disabled all other plugins to make sure there was no conflict occurring. It still has the issue.
Posted 21 Apr, 2017 09:37:23 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Does it work if you call that property from a UDF?

I would also suggest that you update Office 2013.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 21 Apr, 2017 09:44:27 Top
Jason Rodman




Posts: 33
Joined: 2016-11-01
No, it doesn't. It causes excel to freeze. Waited 3 minutes and it still did not return while debugging and had to kill it. I tried it without debugging and it froze for 10 seconds and then finally returned an error:

"The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))"

Here is the code I added to my UDF:


try
{
   var app = Module.ExcelApp;
}
catch (Exception e)
{
   return e.Message;
}
Posted 21 Apr, 2017 09:56:41 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Jason Rodman writes:
"The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))"


Make sure you have your add-in only under the Active Application Add-ins heading in File | Options | Add-ins. Unload all Excel add-ins including XLA and XLAM. Start Excel, press Alt+F11 and make sure you have a single project listed in the Project pane (an analogue of Solution Explorer).

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 21 Apr, 2017 10:01:26 Top
Jason Rodman




Posts: 33
Joined: 2016-11-01
I followed all those steps and the same issue occurred. Only 2 active addins are listed, both are mine (com and xll versions of my addin). VBA has only one project listed for the current document. I am looking into updating office to see if just this version has issues. Also, could having the UDF marked as thread safe be an issue?
Posted 21 Apr, 2017 10:09:37 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
I can't tell. Try to modify that property.

Does your COM add-in calls into the XLL add-in or vice versa?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 21 Apr, 2017 10:11:12 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Note that we will be on holidays next Monday and Tuesday.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 21 Apr, 2017 10:17:44 Top
Jason Rodman




Posts: 33
Joined: 2016-11-01
It works in the UDF once I turn that option off. Its not a great solution because I need multi-threading to work for this addin for performance reasons. It also doesn't explain why it does't work from the initialize call with or without the timer.
Posted 21 Apr, 2017 10:19:56 Top
Jason Rodman




Posts: 33
Joined: 2016-11-01
Oh, to answer your question. No they do not talk to each other directly - but they share components that are static.
Posted 21 Apr, 2017 10:20:55 Top
Andrei Smolin


Add-in Express team


Posts: 14106
Joined: 2006-05-11
Next Wednesday, I would like to access your PC remotely. Would this be possible? If yes, I suggest using TeamViewer; in this case you'll need to send me your session ID and password.

Note that using the Excel object model from XLL is not recommended; see http://support.microsoft.com/kb/301443. Also, accessing the object model from several threads will crash Excel or cause RPC_E_SERVERCALL_RETRYLATER.

Sorry, my day is over.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 21 Apr, 2017 10:35:12 Top