Want to know Windows Clipboard Internals

I am interested in studying internal Windows systems and how it works. I tend to study system programming on windows. In this context, I am curious to learn a little about how the clipboard internally functions:

  • What exactly happens when we select text, image, etc. and press Ctrl + C?
  • What exactly happens when we press Ctrl + V in another application?
  • Where exactly is the data copied? Roaming data goes into kernel mode memory - is it a shared access to all processes?
  • How do the copied data become available for another process?

I want to know the answer to the above questions from the point of view of a system programmer.

Also, share any resources that discuss the internal elements of the Windows clipboard.

+4
source share
1 answer

I have good resources on my website: http://www.clipboardextender.com It talks about the implementation of the clipboard viewer, common errors, do and dont.

Basically, the clipboard is an area of ​​shared memory into which you copy data (for example, "copy", for example, in response to pressing Ctrl + C) and copy data from (aka "paste"). Data can be simultaneously presented in dozens of common formats and any number of formats defined by the programmer.

It is impossible to completely “copy” the clipboard and restore it, as it were, without affecting other programs and invoking a negative user interface. Look at “delayed rendering” to find out why and think about what happens when an Excel user copies 5000 rows x 255 columns to a spreadsheet and press Ctrl + V. Understand this and you will understand the magic (and pitfalls) of delayed rendering.

+2
source

Source: https://habr.com/ru/post/1381754/


All Articles