Who is the system owner of the clipboard?
While reading about the clipboard in MSDN I came across this line:
After a memory object is placed on the clipboard, ownership of that memory handle is transferred to the system. When the clipb开发者_运维百科oard is emptied and the memory object has one of the following clipboard formats, the system frees the memory object by calling the specified function: ... (http://msdn.microsoft.com/en-us/library/ms649014%28VS.85%29.aspx - Memory and the Clipboard section).
What I don't quite understand is "who is the system"? a SYSTEM process? clipboard owner process???
Thanks for your help! :-)
What do you mean "Operating System" ?! There is no "operating system" process. Which process is actually freeing the object?
Well, there is, the process is called "System". But that's not relevant here, every Windows app that messes with the clipboard loads user32.dll. The "system". Kernel32.dll is another important one that every Windows app loads. Windows is pretty cool like that, you only pay for the bits of the operating system that you actually use. And the memory required for the code in those DLLs is shared by every process. That was really important back in the days that Windows NT had to boot with 16 megabytes of memory.
No separate process is required.
Getting these different instances of system DLLs to work together is Microsoft's headache. But it is also a very important strategy to prevent a crashing process from taking down the operating system with it.
Saying the system in the documentation is a way of letting you know that it's not documented exactly where it happens and it's subject to change. And Don't Hold Your Breath Waiting For It. The system is generally the operating system [1], which isn't just one process. It's comprised of a gazillion applications that uses dynamic libraries in processes, communicating with each other at different levels of depth, ranging from lower level kernel mode up to higher level user mode. Somewhere in all of that, the clipboard is handled.
Now, please don't accept this answer, but wait for Hans'.
[1] Quoting Raymond Chen: "I can't believe I had to say that."
精彩评论