0

I've written a COM automation server for excel that works as expected but sometimes gets restarted by excel. Does anyone know why this is, what's the best way to handle this and if there is anything I can do to prevent this?

It's an RTDServer. As stated in the documentation, the ServerTerminate interface should only be called by the host (Excel) in one of the following scenarios:

  1. The server didn't start correctly (and therefore didn't return
  2. All rtd's on a sheet have been deleted and thus the server no longer has context

http://msdn.microsoft.com/en-us/library/office/aa140060%28v=office.10%29.aspx

However, ServerTerminate does in fact get called when neither of the above conditions are met, which in combination with this leads me to believe that something else is going on. It also leads me to believe that the particular type of automation server (rtd) used is irrelevant as this could be a COM automation issue rather that one that is ties to a specific interface.

Pat Mustard
  • 1,852
  • 9
  • 31
  • 58
  • I believe this is a straight up question about com automation behavior and providing specific implementation detail is not relevant. However, if you need further detail, please see the edited post above. I made considerable efforts to find out why this behavior occurs but there is very little documentation available so I tried to trim down the question to what I believe is relevant. Please feel free to correct me if you can. – Pat Mustard Jan 27 '14 at 03:52
  • 1
    +1. Thanks for updating the post. Now it is clear what you mean (not every person uses terms correctly), but unfortunately I have no idea about that area. Hopefully someone can answer. – Alexei Levenkov Jan 27 '14 at 04:04

0 Answers0