Open GoogleCodeExporter opened 9 years ago
As noted in Issue #2 by mikesmithlonergan on 28 June 2007:
There are a few other approaches that might give you some joy (if only as a
substitute to the broken functionality you've already beaten on):
- system.environment.getfolderpath()
- p/invoke to Shell32's GetFolder() API using the constant
FOLDERID_RecycleBinFolder
(http://msdn2.microsoft.com/en-us/library/ms645244.aspx)
- [I believe there's some method as part of the system.management namespace as
well
that can retrieve 'special folders', but I can't find it]
As a last resort, you could try a p/invoke to SHGetFolderPath and leverage the
CSIDL
constant CSIDL_BITBUCKET
(http://msdn2.microsoft.com/en-us/library/ms649274.aspx)
Original comment by andrew.h...@gmail.com
on 28 Jun 2007 at 12:09
Tagging as Microsoft Bug. I attempted another solution with ActiveX, but
received
"Access Denied" messages when trying to descend into the Recycle Bin. The
Recycle
Bin is apparently a "linked folder", similar to your user folder in Vista, and
it
doesn't play nice with the published APIs.
I also attempted the namespace approach described above and ALSO got Access
Denied.
I cannot find any way around this issue. The MS APIs claim that it works, but
it
doesn't, and even if it did, the Sidebar API's unfathomable failure to
distinguish
between bins on different drives makes it crazy to attempt until MS fixes
things.
Original comment by andrew.h...@gmail.com
on 12 Dec 2007 at 7:30
Original issue reported on code.google.com by
andrew.h...@gmail.com
on 19 Jun 2007 at 2:24