S
Sunny
According to the docs for RCW (framework ver. 2.0 and up): "The runtime
creates exactly one RCW for each COM object, regardless of the number of
references that exist on that object. The runtime maintains a single RCW per
process for each object."
It's different for ver. 1.1 - the sentence about "one per process" is missing.
As there may be multiple AppDomains per process, and actually this is what
happens when you have multiple Outlook addins, installed with Shim Wizard,
what is the expected behavior of Marshal.ReleaseComObject(object)?
As an example:
If in my AppDomain (my addin) I have reference to a Message object in
Outlook, and (as per all good practices I read about), I use a loop around
Marshal.ReleaseComObject(message), is it going to release really all
references in the process, thus breaking another addin, which may hold a
reference to the same message?
Is there a difference in the implementation of this functionality between
..Net 1.1 and 2.0, or it is only a documentation change?
Thanks
P.S. I'm cross-posting, as I do not know which is the best group for this
question.
creates exactly one RCW for each COM object, regardless of the number of
references that exist on that object. The runtime maintains a single RCW per
process for each object."
It's different for ver. 1.1 - the sentence about "one per process" is missing.
As there may be multiple AppDomains per process, and actually this is what
happens when you have multiple Outlook addins, installed with Shim Wizard,
what is the expected behavior of Marshal.ReleaseComObject(object)?
As an example:
If in my AppDomain (my addin) I have reference to a Message object in
Outlook, and (as per all good practices I read about), I use a loop around
Marshal.ReleaseComObject(message), is it going to release really all
references in the process, thus breaking another addin, which may hold a
reference to the same message?
Is there a difference in the implementation of this functionality between
..Net 1.1 and 2.0, or it is only a documentation change?
Thanks
P.S. I'm cross-posting, as I do not know which is the best group for this
question.