Author Topic: [Coding] Debug clipboard access with care  (Read 1317 times)

fixer

  • Administrator
  • Hero Member
  • *****
  • Posts: 1581
[Coding] Debug clipboard access with care
« on: July 04, 2017, 07:10:05 pm »
If you tried to debug (especially trace) clipboard access then you probably know it may not work as expected. Paste doesn't paste even when everything looks fine. And it works without debugger. So what's the problem? The problem is Windows kernel checks access rights to the clipboard, and CheckProcessForClipboardAccess function has some interesting check: the window doing it must be foreground. And when you debug... that's right, your debugger is foreground and not the debuggee.