#ifdef 12 Posted 17 hours ago Is there any way/API to get a clipboard history (Win + V)? Share this post Link to post
Anders Melander 1782 Posted 15 hours ago AFAIK there's no such thing in Windows as a clipboard history. Applications, and libraries (.NET, UWP, etc.), that offer a clipboard history does so by monitoring the clipboard and making local copies of the content when stuff is copied onto the clipboard. This is why Windows' own clipboard history (WinKey+V) is always empty when you first invoke it. It needs to run in the background before it can collect data from the clipboard; Windows itself doesn't maintain a history. This is also why it is very limited what data is stored in the clipboard history; The clipboard history application doesn't support a lot of formats (mostly text and bitmaps) and some data is only valid at the time when they were copied and require that the data source is live when the data is pasted. You can use the drop target analyzer application from the Drag and Drop Component Suite to see the impact, in terms of requests made to the data source, of running the Windows clipboard history in the background. The drop source analyzer can be used to examine the difference between data copied directly from the clipboard and data that has been through the clipboard history. Share this post Link to post
Roger Cigol 103 Posted 13 hours ago 1 hour ago, Anders Melander said: This is why Windows' own clipboard history (WinKey+V) is always empty when you first invoke it Not sure about this. It's empty when you first start windows. But as soon as you start using the clip board with any application Windows does maintain a history and WinKey+V does allow you to choose. However I don't know a way of accessing these values programatically. But that doesn't mean there isn't a way..... Share this post Link to post
Anders Melander 1782 Posted 13 hours ago 17 minutes ago, Roger Cigol said: It's empty when you first start windows. But as soon as you start using the clip board with any application Windows does maintain a history On my system (Windows 10) the history only contains data copied after first Win+V. Win+V starts the "Clipboard User Service" (svchost.exe -k ClipboardSvcGroup -p). The service is set to manual start. Maybe it's set to auto start on your system? Anyway, the history is not part of the clipboard system. It's just an application on top of it, no different from one that you could write yourself. Trying to access the clipboard history data when there is no public API is IMO a waste of time when you can just replicate what it does. It's not that hard. Share this post Link to post