com4j
com4j copied to clipboard
Fix unadvise/EventProxy.close()
Unadvising COM events needs to be done in the context of the owning COM object just as advising them needs to. Therefor closing an EventProxy has to perform the actual unadvise task within the COMThread of the Wrapper for which advise() was used. The fix forwards the proper COMThread during EventProxy creation and executes the unadvise task with its help.