Described is technology allowing computer programs to participate in the
copy and paste process at various times. A source program, from which
data is requested to be copied to the clipboard, may participate as
desired, including, for example, to cancel the copy, or to determine
which data formats will be placed on the clipboard, including one or more
custom data formats. A target program, to which data may be copied from
the clipboard, may also participate as desired, including, for example,
to cancel the paste, or to determine which data format will be pasted,
which may be a custom data format. In one implementation, events provide
notifications and APIs may be called to facilitate the communication.