I'm trying to get multiple Outlook attachments from the clipboard.
When a user chooses multiple attachments and places them in the clipboard (or drag them), an IDataObject
is being created and is being placed in the clipboard.
I know that the file names can be found in the IDataObject
using CLIPFORMAT CFSTR_FILEDESCRIPTOR
that contains the virtual object names. Also, I from what I understand, the file content is being received using CLIPFORMAT CFSTR_FILECONTENTS
. But when I do that, I get only one file, and I don't understand how do I get the other files that have been copied to the clipboard.
I found that using the lindex
member in FORMATETC
I can get the other files, but for some reason it doesn't work.
Can anyone explain or give an example how can I get the other attachments (prefering C++)?