To retrieve items from a clipboard, you must use the GetClipboardFiles
method. You must declare the types of data that you support (or NULL if
you recognise all datatypes) so that you are returned a recognisable
data format.
The most recent clip is always returned, so if you support text, audio
and image clips and the most recent clip is an audio file, any
text and image clips on the history buffer will be ignored by this routine.
If you want to scan all available clip items, set the Datatype parameter
to NULL and repeatedly call this method with incremented Index numbers until
the error code ERR_OutOfRange is returned.
On success this method will return a list of files (terminated with a
NULL entry) in the Files parameter. Each file is a readable clipboard
entry - how you read it depends on the resulting Datatype - although you may use
the IdentifyFile() function to determine a class that
supports the data. Note that the resulting Files array is a memory allocation that must be freed using
the FreeMemory() function.
If this method returns the CLF_DELETE flag in the Flags parameter,
you must delete the source files after successfully copying out the
data. If you are not successful in your operation, do not proceed with the deletion or
the user will have lost the original data. When cutting and pasting files
within the file system, simply using the file system's 'move file'
functionality may be useful for fast file transfer.
ERR_Okay | A matching clip was found and returned. |
ERR_Args | Arguments were not specified. |
ERR_OutOfRange | The specified Index is out of the range of the available clip items. |
ERR_NoData | No clip was available that matched the requested data type. |
|