Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Disclaimer</strong>: I'm neither an expert in Windows Shell programming nor in COM programming, and especially not in COM programming using .NET.</p> <p><strong>Disclaimer 2</strong>: Shell programming is rather complex and Windows Explorer is likely to crash. (Be sure to read the information on MSDN on debugging shell extensions.)</p> <p>This is what I can provide to answer your questions:</p> <ol> <li>The abID value of a SHITEMID is dertermined by the folder which contains the corresponding item. Therefore there a no valid or invalid information as this data is only meaingful to the folder. Windows Explorer will pass this data in order to identify a specific item. abID must not be system-unique but it will probably be unique in its containing folder (though this is not guaranteed). Under certain circumstances the SHITEMID may be persisted, so in some cases it must be valid after a reboot (because of this memory references in abID should be avoided).</li> <li>As I understand it, IDataObject::GetData will only be called if the actual data is required (and i may be wrong with this). So it should be fine, if you extract the data to a temp file in GetData and return a PIDL to that file (see <a href="http://support.microsoft.com/kb/132750/en-us" rel="nofollow noreferrer">http://support.microsoft.com/kb/132750/en-us</a>, though I remember that there was a convinient method for this offered by the shall, but I can't remember its name). Unfortunately I can't see a good way on when to delete the temp file (as a last resort you could do this when the IDataObject is destroyed, but this will result in may temp files which are not needed anymore).</li> <li>You would probably need to support custom PIDLs (including a custom PIDL manager) and implement a custom IShellFolder. Most documentation on shell extensions, however, is for C++ and many functions are not documented very well or not documented at all. For more information on PIDLs I would recommend reading <a href="http://msdn.microsoft.com/en-us/library/cc144090.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/cc144090.aspx</a> . Furthermore you should search for "Shell namespace extension" on the Internet as there might be some information on the topic. Also have a look into the examples provided by Windows SDK on this topic.</li> </ol> <p>I hope some information will be usefull to you.</p> <p><strong>Edit</strong>: You could also implement QueryGetData and EnumerableFormatEtc appropriately to indicate that your object does not support the format in question. Maybe Windows Explorer tries a different format then.</p> <p><strong>Edit 2</strong>: Though you've already settled on a solution, here is a some more information on how to drag and drop asynchronously (for large files), maybe you (or at least somebody looking for an answer to a simulary problem, who reads this) find it useful: <a href="http://msdn.microsoft.com/en-us/library/bb776904(VS.85).aspx#async" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/bb776904(VS.85).aspx#async</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload