When i do a copy then close the explorer window that i made a copy
from, it calls the GetData indicating a need to my private format, So
the method set the Global memory for the private structure, and
immediately after return, explorer throws access violation exception.
I think the Explorer calls OleFlushClipboard (). when i close that
window .
How can i know when to Empty the Clipboard before the Explorer calls
CDataObjectImpl::GetData ?
Thanks,
Assem
In a "Copy" operation, the very first thing that you do is call
OleSetClipboard(NULL). This empties the clipboard.
When you construct an IDataObject object from the pidl and place it on the
clipboard by OleSetClipboard, the clipboard owns the object and manages its
lifespan.