0

I can use windows-rs to get IDispatch and use it to get prop or call method, but i cannot listen to events. For example, i get a IDispatch 'app', how to listen to it's event 'Close'?

I tried IConnectionPointContainer, but failed to define sink object

Xiangshi Yin
  • 31
  • 1
  • 3
  • 2
    Please show what you've tried, and why/how it failed. In case you haven't come across it, here's Raymond Chen's [Introduction to COM connection points](https://devblogs.microsoft.com/oldnewthing/20130611-00/?p=4113) which lays out the fundamentals of the connection point model. – IInspectable May 04 '23 at 22:48
  • `use windows::{EventRegistrationTokenTable, EventRegistrationToken}` – Jishan Shaikh May 05 '23 at 05:06
  • @JishanShaikh `EventRegistrationToken` is used by the Windows Runtime when registering delegates for events. I'm unable to find `EventRegistrationTokenTable` in the `windows` crate. It appears to be a .NET-only internal database. Neither one applies to COM connection points (which I believe this question is about). – IInspectable May 08 '23 at 17:58

0 Answers0