andrewhayden / folderslice

Automatically exported from code.google.com/p/folderslice
0 stars 0 forks source link

Future enhancement: Gadget should consider Recycle Bin when possible #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Drag a drive (C:) to the gadget
2. Note that C: doesn't take up 100% of drive C's space.  The Recycle Bin
comprises the rest of the space.

What is the expected output? What do you see instead?
Ideally, gadget should exclude the Recycle Bin from its "used space"
calculations since this doesn't count as used space according to "My Computer"

Please use labels and text to provide additional information.
As noted in Issue #2:
http://code.google.com/p/folderslice/issues/detail?id=2

This issue is for tracking purposes, so that if/when Microsoft patches the
bug with the "RecycleBinPath" well-known path, we can fix the behavior.

Original issue reported on code.google.com by andrew.h...@gmail.com on 19 Jun 2007 at 2:24

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago
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