Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does the clipboard work in Windows?

What is its data structure? Is it XML-based? How can it distinguish between different content types, for example text, image, files etc.?

like image 863
proGress Avatar asked Jan 03 '10 05:01

proGress


2 Answers

It is a system wide bit bucket, which means it just holds a sequence of bytes and an integer value (a windows atom) which describes it's format - but does not ensure that the byte sequence is really this format.

The only feature other then this is that an application can decide if it wants the system to store the byte sequence or if the application keeps the data itself and only provide it when someone is requesting it.

So as you see it is an API and not a data structure.

like image 71
Lothar Avatar answered Sep 17 '22 06:09

Lothar


If you're using the Win32 API, here is the reference: http://msdn.microsoft.com/en-us/library/ms649014(VS.85).aspx

like image 23
ta.speot.is Avatar answered Sep 19 '22 06:09

ta.speot.is