View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Another frustrated developer Another frustrated developer is offline
external usenet poster
 
Posts: 5
Default RTD Bug? or perhaps a feature?

Interesting....

It seems that Excel, although calling Server Terminate on the original DLL,
never lets go of it's reference to it, even after all workbooks are closed.

If a new Workbook is created it instantiates a new instance of the DLL and
places it's calls to this, when this workbook is closed it calls Server
Terminate and stops referencing the DLL (I can see the destructor being
called). But the original DLL reference lives on.

The only time it lets go is when the Excel Application is closed.

The reason this matters is that my local RTD server dll uses remoting to
call to the server and get it's data. In the RTD dll constructor I set up
the remoting configuration. If a second RTD dll object then tries to set up
the same configuration a RemotingException is thrown. I can catch this, and
just assume remoting is set up already, but if the original class ever gets
disposed of then the second will not be able to create remote calls.