Hacker News new | ask | show | jobs
by bennysomething 1476 days ago
Genuine question, why is it even possible to lock the clip board?
2 comments

An application doing a paste needs to query the available clipboard formats and then ask for the data from one of them. This wouldn't work reliably if other applications could simultaneously change the clipboard. So the OpenClipboard API locks the clipboard and applications need to remember to call CloseClipboard.
I have tried to track this down - it seems like at some point it was not possible. My guess is Vista is when the lock was implemented. I've come up blank repeatedly.

I am sure Raymond Chen knows. Looks like comments are allowed on his blog too!