RTD Notes - ittegrat/ExcelDna GitHub Wiki
Calling UpdateNotify on the main thread
The ExcelRtdServer helper in Excel-DNA goes to a lot of effort to always call IRtdEvent.UpdateNotify on the main Excel thread. The mechanism also throttles calls to UpdateNotify so that only a minimum number of calls to Excel are made, which might help Excel during ongoing calculations.
My understanding of the main-thread requirement of the UpdateNotify call comes from a Kenny Kerr blog post, and I agree with his understanding of the implied COM contract.
There is a bit of evidence in a discussion thread that describes problems experienced in a case where UpdateNotify is called from another thread.
Known bugs
- DisconnectData is not called when RTD is used from an array formula (fixed in Excel versions with Dynamic Arrays support)
- Nested async functions don't stabilize (https://groups.google.com/d/topic/exceldna/_jMmHIQ_KG8/discussion)
- RTD - Frequently Asked Questions: https://msdn.microsoft.com/en-us/library/aa140060%28v=office.10%29.aspx?f=255&MSPPError=-2147217396