From: Leo Davidson on
On Jan 30, 10:22 pm, Colin Peters <cpet...(a)coldmail.com> wrote:
> Indeed, the procedure can be complex. But who holds on to the data in
> between? You can copy from notepad, close notepad then start another app
> and paste. So the clipboard contents are persisted system wide. This is
> what I want to find out about.

Apps that set the clipboard can either copy the data into shared
memory, so that it's owned by the system and the app is free to exit,
or they can just put a flag into the clipboard which effectively says
"if anyone wants this data, call me back and I'll provide it."

Apps which do the latter often have a user-configurable option to
populate the clipboard with the actual data on exit, or clear the
clipboard on exit. (Assuming it's still the same thing in the
clipboard, of course.)

The "call me back" method is obviously a lot more complex so it's
usually only done when providing that data takes significant time/
memory and it's likely that the only thing requesting the data, if
anyone at all, will be the same app that put it there (allowing it to
short-circuit most of that work).
From: m on
IIRC the interactions are complex and the semantics date back to the pre-NT
shared memory & cooperative multi-tasking environment and are overlain with
COM in many cases. For more details look at SetClipboardData in MSDN.
There are several system defied formats, but applications frequently
register other 'custom' formats using RegisterClipboadFormat.


"Colin Peters" <cpeters(a)coldmail.com> wrote in message
news:e3rAsqfoKHA.1544(a)TK2MSFTNGP02.phx.gbl...
> Indeed, the procedure can be complex. But who holds on to the data in
> between? You can copy from notepad, close notepad then start another app
> and paste. So the clipboard contents are persisted system wide. This is
> what I want to find out about.
>
>
> Pavel A. wrote:
>> Some apps handle copy&paste in quite non trivial ways.
>>
>> Example: copy from IE and paste into OneNote and notepad.
>> Notepad instantly pastes the plain text.
>> By contrast, onenote takes a *lot* of time to complete the paste, it
>> apparently talks to the browser.
>> --pa
>>
>> "Colin Peters" <cpeters(a)coldmail.com> wrote in message
>> news:eP5u$SeoKHA.4648(a)TK2MSFTNGP06.phx.gbl...
>>
>>> Jonathan de Boyne Pollard wrote:
>>>
>>>>>
>>>>>
>>>>> Can someone recommend any documentation that explains what process is
>>>>> responsible for administering the clipboard.
>>>>>
>>>> Possibly. Given that you use the singular "process", what that
>>>> documentation will tell you won't be what you're expecting. (-:
>>>>
>>>
>>> Well, what I was after was some kind of description about what happens
>>> when you call the API to put something on or off the clipboard. I assume
>>> there's some mechanism at play to ensure that when two processes try to
>>> copy at the same time (because the amount of data is large) that they
>>> are somehow coordinated. Its really this kind of detail I'm after.
>>>
>>> I'm not even sure I'm on the right newsgroup.
>>
>>
From: Pavel A. on
Another interesting example: Copy a large file from a VMware virtual
machine,
and paste it on the host (or v.v.). Obviously, it won't be copied via the
clipboard.

--pa


"m" <m(a)b.c> wrote in message news:O5fliq6oKHA.5696(a)TK2MSFTNGP04.phx.gbl...
> IIRC the interactions are complex and the semantics date back to the
> pre-NT shared memory & cooperative multi-tasking environment and are
> overlain with COM in many cases. For more details look at
> SetClipboardData in MSDN. There are several system defied formats, but
> applications frequently register other 'custom' formats using
> RegisterClipboadFormat.
>
>
> "Colin Peters" <cpeters(a)coldmail.com> wrote in message
> news:e3rAsqfoKHA.1544(a)TK2MSFTNGP02.phx.gbl...
>> Indeed, the procedure can be complex. But who holds on to the data in
>> between? You can copy from notepad, close notepad then start another app
>> and paste. So the clipboard contents are persisted system wide. This is
>> what I want to find out about.
>>
>>
>> Pavel A. wrote:
>>> Some apps handle copy&paste in quite non trivial ways.
>>>
>>> Example: copy from IE and paste into OneNote and notepad.
>>> Notepad instantly pastes the plain text.
>>> By contrast, onenote takes a *lot* of time to complete the paste, it
>>> apparently talks to the browser.
>>> --pa
>>>
>>> "Colin Peters" <cpeters(a)coldmail.com> wrote in message
>>> news:eP5u$SeoKHA.4648(a)TK2MSFTNGP06.phx.gbl...
>>>
>>>> Jonathan de Boyne Pollard wrote:
>>>>
>>>>>>
>>>>>>
>>>>>> Can someone recommend any documentation that explains what process is
>>>>>> responsible for administering the clipboard.
>>>>>>
>>>>> Possibly. Given that you use the singular "process", what that
>>>>> documentation will tell you won't be what you're expecting. (-:
>>>>>
>>>>
>>>> Well, what I was after was some kind of description about what happens
>>>> when you call the API to put something on or off the clipboard. I
>>>> assume there's some mechanism at play to ensure that when two processes
>>>> try to copy at the same time (because the amount of data is large) that
>>>> they are somehow coordinated. Its really this kind of detail I'm after.
>>>>
>>>> I'm not even sure I'm on the right newsgroup.
>>>
>>>