I want my namespace extension to support copy&paste and drag&drop both into
and out of it but am having trouble getting it to work the way the
documentation indicates it should and I am hoping somebody will be able to
My instance of IDataObject supports CF_HDROP and CFTSR_PREFERREDDROPEFFECT
from GetData and CFTSR_PERFORMEDDROPEFFECT and CFSTR_PASTESUCCEEDED from
When I drag an item from my namespace to the desktop DoDragDrop returns
DROPEFFECT_NONE and my data object's SetData function is called with
CFSTR_PERFORMEDDROPEFFECT set to DROPEFFECT_MOVE. This isn't exactly what
is supposed to happen according to the documentation, but it's not a
However, when I copy something from my namespace and paste it to the desktop
my SetData function is never called. The documentation indicates it should
call it with both of the formats I support if the paste actually succeeds.
I need to know if the paste succeeds in case a cut operation has ocurred so
I can update inside my namespace. So, how DOES the shell notify my data
object that a paste succeeded?
For that matter, when I try and notify the shell that a paste operation I
have done with it's data object has worked the process doesn't work like the
documentation indicates. My call to SetData with CFSTR_PERFORMEDDROPEFFECT
is rejected with E_INVALIDARG but my call with CFSTER_PASTESUCCEEDED works
and the shell deletes the files as it should. The two calls differ only in
the cfFormat member that is used. This becomes a problem when supporting
dragging files onto my namespace. How am I supposed to notify the shell
that the drag-and-drop operation succeeded and it should delete the files in
So my questions are:
1) How am I supposed to know when the shell has successfully done a paste
operation with my data object?
2) How am I supposed to communicate to the shell when I have done a paste
or drop operation with one of it's data objects?
If anybody can help me I would appreciate it,