Clipboard - why is it so limited?

E

emma middlebrook

Hi

Needed a title like that to get you reading :)

Having never programmed for the Clipboard before, I expected it to
work as follows: multiple data formats can be supported by just
storing the data, keyed by the format name. After the application that
has placed a custom format into the Clipboard has closed, the data
should still be there and later, after another instance of that
application has been created, you should still be able to Paste that
data back in. But you can't!! Instead, the IDataObject reference is
put in the Clipboard meaning that the 'source' application must still
be alive. Closing it down means you lose the data. Can someone explain
to me a good reason for this? It seems extremely limiting - the data
doesn't 'need' the application - it's just data.

Emma Middlebrook
(e-mail address removed)
 
A

Aaron Queenan

Rendering a clipboard format can be very expensive in terms of CPU and
memory.

For example, suppose someone has selected "Copy" of a 2GB file in Explorer.
Copying the file data to the clipboard would take ages and consume a massive
amount of memory. By storing the reference, the file doesn't need to be
loaded into memory in several clipboard formats, but programs that need to
access the clipboard data can.

Regards
Aaron Queenan.

: Hi
:
: Needed a title like that to get you reading :)
:
: Having never programmed for the Clipboard before, I expected it to
: work as follows: multiple data formats can be supported by just
: storing the data, keyed by the format name. After the application that
: has placed a custom format into the Clipboard has closed, the data
: should still be there and later, after another instance of that
: application has been created, you should still be able to Paste that
: data back in. But you can't!! Instead, the IDataObject reference is
: put in the Clipboard meaning that the 'source' application must still
: be alive. Closing it down means you lose the data. Can someone explain
: to me a good reason for this? It seems extremely limiting - the data
: doesn't 'need' the application - it's just data.
:
: Emma Middlebrook
: (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top