The AssociationClosed Event is provided in both COM & .NET versions, but by default disabled.
The reason why we do not encourage developers to use this event is that it is very easy for people to misuse it. A typical and very common mistake is assuming the end of one association is the end of transfer of one Study, or Series, etc. This is explained more fully in Some Systems Behave Badly when sent One Image Per Association
However, there are certain situations where AssociationClosed can/should be used, for example:
To enable AssociationClosed event, one need to do the following:
So, in COM, if you need to use it you have to first enable it either by adding a real registry entry “DisableAssociationClosed” in the registry:
or using DicomGlobal function:
Dim g As New DicomGlobal g.RegWord("DisableAssociationClosed") = 0