in reply to Re: Re: Windows drag and drop
in thread Windows drag and drop
OK I think I understand you... I found a solution for my Win2K box but please bear in mind that
I fired up regedit to have a look in the registry:
It looks like the property of a filetype being able to accept dropped files, e.g. like batfile is stored in the registry under HKEY_CLASSES_ROOT\batfile\shellex\DropHandler
Anyway, I tested and was able to drop a text file onto a perl script which ran it - I think this was what you were looking for.
You may want to be more scientific that I was... no warranty express or implied...
Update: More poking around in the registry. That class ID (the nasty looking hex string above) represents the .exe drop handler which fits nicely. It is enabled in the same way (e.g. under ShellEx\DropHander for .bat, .cmd, .com, .exe, .pif, and also for .scr (screen savers!) and shcmdfile Explorer commands. OK off topic for Perl but I'd like to understand more about this. I think O'Reilly have a book on Windows NT Shell Extensions
Update2: After following Boo's link to MSDN I came across Microsoft's admonition:
It is not recommended that you copy existing file associations from the registry. This often leads to the propagation of poorly formed file associations. Instead, you should follow the steps outlined in...So there's some stern advice against following the instructions above... you have been warned!
Update3 (a bit OT):The O'Reilly book I found is Visual Basic Shell Programming Integrating Applications with the Windows Shell which is out of print, but there is more information on http://www.oreilly.com/catalog/vbshell/ including a link to read more about it online. I'm sure they had a non VB specific book too, but this looks interesting. Apologies if off-topic.
Cheerio!
Osfameron
|
|---|