Using IDataObject for Drag and Drop -- COM vs .Net

J

JP

Advice needed. I have a working control in VB.Net that does Drag&Drop
to/from Shell Folders. So far, I have not had to implement my own COM
IDataObject. However, as expected, the Shell Folders do Move & Copy
asynchronously and that makes it difficult to reliably update my
control's appearance. From the documentation, it appears that I should
be using the IDataObject's CFSTR_LOGICALPERFORMEDDROPEFFECT format to
determine what the actual result of a Drop is. My questions:
1. does CFSTR_LOGICALPERFORMEDDROPEFFECT actually give me the desired
result -- knowing the Final result of the Drop?
2. If so does it block until completion or do I have to block?
3. Is there any way to use .Net's DataObject to interact with this
format?
4. If the answers lead me to implementing my own IDataObject, is there
an example VB.Net or C# version?
This is a fairly minor inconvenience for my control, so I'd rather not
have to spend the time developing my own version of the COM IDataObject
interface from scratch.
I am aware of the IASyncOperation interface, so my questions could also
apply to that approach.

Thanks for any help!
 
J

JP

Nevermind. My concerns with the asynchronous behavior were left over
from an earlier attempt, which did behave asynchronously. Passing the
COM interface of the .Net DataObject to a Folder results in a
Synchronous operation, and therefore needs no ability to work with the
CFSTR_LOGICALPERFORMEDDROPEFFE­CT format. Undoubtedly the .Net
DataObject is doing that or its equivalent for me.
 
J

JP

Nevermind the nevermind. I had forgotten the optimized move problem.
My original question still stands. For Moves of small items it is
generally not a problem, however, for completeness sake, I would like
to at least consider interacting with the communication CFSTRxxxx
interfaces.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top