想知道Windows剪贴板内部 [英] Want to know Windows Clipboard Internals

查看:109
本文介绍了想知道Windows剪贴板内部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对学习Windows系统内部结构以及工作原理很感兴趣。我倾向于在Windows上学习系统编程。在这种情况下,我很想知道关于Windows剪贴板内部功能的几件事:

I am interested in learning windows system internals and how things work. I am inclined towards learning system programming on windows. With that context, I am curious to know few things on how windows clipboard internally functions:


  • 当我们选择一些文本,图像时会发生什么等等,然后按
    Ctrl + C组合键?

  • 当我们在不同的应用程序中按Ctrl + V时会发生什么?

  • 复制的数据到底在哪里?复制的数据是否进入内核模式的内存中-在所有进程之间共享?

  • 复制的数据如何可用于其他进程?

  • What precisely happens when we select some text, image etc and press Ctrl + C ?
  • What precisely happens when we we press Ctrl + V in different application?
  • Where exactly the copied data resides? Does the copied data go into kernel mode memory - that is shared across all processes?
  • How the copied data becomes available to a different process?

我想从系统程序员的角度知道上述问题的答案。

I want to know the answer to the above questions from the system programmer's perspective.

另外,分享所有讨论Windows剪贴板内部结构的资源。

Also, share any resources that discuss about windows clipboard internals.

推荐答案

我的网站上有一些不错的资源: http://www.clipboardextender.com
讨论剪贴板查看器的实现,典型错误,操作和不。

I have some good resources on my site: http://www.clipboardextender.com It talks about clipboard viewer implementation, typical mistakes, do's and dont's.

基本上,剪贴板是一个共享内存区域,您可以将数据复制到其中(也就是复制,例如响应用户按下Ctrl + C的键)并复制数据来自(又名粘贴)。
数据可以同时以数十种常见格式和任意数量的程序员定义格式表示。

Basically the clipboard is a shared memory area that you copy data into (aka. "copy", such as in response to the user pressing Ctrl+C) and copy data from (aka "paste"). The data can be simultaneously represented in dozens of common formats, and any number of programmer-defined formats.

不可能完全备份剪贴板并像以前那样还原剪贴板,而又不影响其他程序,也不会带来负面的用户体验。查看延迟渲染以了解原因,并考虑Excel用户在电子表格中复制5000行x 255列并按Ctrl + V时将发生的情况。理解了这一点,您将了解延迟渲染的魔力(和陷阱)。

It is impossible to completely "backup" the clipboard and restore it like it was, without impacting other programs, and causing a negative user experience. Look into "delayed rendering" to see why, and consider what would happen when an Excel user copies 5000 rows x 255 columns in a spreadsheet, and presses Ctrl+V. Understand that, and you'll understand the magic (and pitfalls) of delayed rendering.

这篇关于想知道Windows剪贴板内部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆