views:

198

answers:

3

what is its data structure? is it xml based? how can it distinguish different content types? text, image, files...

+1  A: 

Quick, lazy Google search got this; hope it helps a bit:

http://msdn.microsoft.com/en-us/library/system.windows.clipboard.aspx

Joey Adams
+5  A: 

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

taspeotis
+8  A: 

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.

Lothar
Not true. The clipboard can hold data in several different formats at once.
Kobi
You are right i forgot about this. So we can see it as dictionary with the format integer number as the hash key and sequences of bytes as values.
Lothar