0

Is it possible to enumerate all applications that is listening for clipboard changes? I want to find all the PID.

Tried to google for it, but no one seems to done it before.

daisy
  • 22,498
  • 29
  • 129
  • 265
  • There's no such thing as `listening for clipboard changes`; there are no events. Although that's not stopping an applicaiton per say, to poll the clipboard for data. – Trevor Dec 18 '19 at 15:13
  • @Çöđěxěŕ There is. SetClipboardViewer provides this very functionality and triggers a message anytime the clipboard is changed. – Martin Dec 18 '19 at 15:28
  • @Çöđěxěŕ https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setclipboardviewer – Martin Dec 18 '19 at 15:29
  • @Martin in c#, can you show how this is implemented then? – Trevor Dec 18 '19 at 15:30
  • 1
    @Çöđěxěŕ https://stackoverflow.com/questions/621577/clipboard-event-c-sharp – daisy Dec 18 '19 at 15:31
  • @Çöđěxěŕ No, but this article describes it precisely: https://web.archive.org/web/20131104125500/http://www.radsoftware.com.au/articles/clipboardmonitor.aspx. It's not complicated to call out to Win32 functions in C# – Martin Dec 18 '19 at 15:32
  • Nice, didn't know this, learn something new everyday! I guess I could have said, there's not a managed way... – Trevor Dec 18 '19 at 15:38

0 Answers0