SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET
-
Hi, I wanted to get the path of Recycle Bin in vista. But when i used SHGetFolderPath with CSIDL_BITBUCKET , it returns E_FAIL. how can i get the path of Recycle bin in Vista. thanks Nitheesh
Jose Jo Martin http://www.simpletools.co.in
-
Hi, I wanted to get the path of Recycle Bin in vista. But when i used SHGetFolderPath with CSIDL_BITBUCKET , it returns E_FAIL. how can i get the path of Recycle bin in Vista. thanks Nitheesh
Jose Jo Martin http://www.simpletools.co.in
The Recycle Bin isn't a real folder - it's a virtual folder that aggregates the recycle bin folders from all drives that have them. Look at the documentation[^]:
CSIDL_BITBUCKET (FOLDERID_RecycleBinFolder)
The virtual folder that contains the objects in the user's Recycle Bin.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
Hi, I wanted to get the path of Recycle Bin in vista. But when i used SHGetFolderPath with CSIDL_BITBUCKET , it returns E_FAIL. how can i get the path of Recycle bin in Vista. thanks Nitheesh
Jose Jo Martin http://www.simpletools.co.in
While Stuart is correct that the Recycle Bin is considered a virtual folder... copies of the files and the INFO/INFO2 database are stored in multiple physical locations on mounted disk drive volumes. Raymond Chen described a method for determining whether a folder is part of the recycle bin: How can I tell that a directory is really a recycle bin?[^] As far as I know..all folders with COM class identifier CLSID_RecycleBin have always been created in the root of the volume. So in theory you would need to enumerate all folders in the volume root directory and use Raymond's function to determine if they are part of the recycle bin. Best Wishes, -David Delaune
-
While Stuart is correct that the Recycle Bin is considered a virtual folder... copies of the files and the INFO/INFO2 database are stored in multiple physical locations on mounted disk drive volumes. Raymond Chen described a method for determining whether a folder is part of the recycle bin: How can I tell that a directory is really a recycle bin?[^] As far as I know..all folders with COM class identifier CLSID_RecycleBin have always been created in the root of the volume. So in theory you would need to enumerate all folders in the volume root directory and use Raymond's function to determine if they are part of the recycle bin. Best Wishes, -David Delaune
So...I guess the best response to the OP would have been 'why do you want to do that? Because if you tell us what you really want to do, we can probably give you a better answer...'.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
So...I guess the best response to the OP would have been 'why do you want to do that? Because if you tell us what you really want to do, we can probably give you a better answer...'.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
This seems to be a recurring theme here on codeproject.com where a majority of the questions are poorly formed. When I determine that the author of the post does not know enough about the subject to properly form a question I try to include educational links and a brief summary in my comments to avoid future questions and elongated threads. Best Wishes, -David Delaune
-
This seems to be a recurring theme here on codeproject.com where a majority of the questions are poorly formed. When I determine that the author of the post does not know enough about the subject to properly form a question I try to include educational links and a brief summary in my comments to avoid future questions and elongated threads. Best Wishes, -David Delaune
Randor wrote:
This seems to be a recurring theme here on codeproject.com
Not just on CP - at work, I'm often asking people 'and your real question is???'
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
This seems to be a recurring theme here on codeproject.com where a majority of the questions are poorly formed. When I determine that the author of the post does not know enough about the subject to properly form a question I try to include educational links and a brief summary in my comments to avoid future questions and elongated threads. Best Wishes, -David Delaune
Hi David, Sorry for not describing what i am actually want to do. Here is my problem. I am doing a project in which i wanted to show the user the files in Recycle bin so that they can make sure that no necessary files are getting deleted in a mistake from the file system. And i am programmatically clearing the Recylcle bin using the API SHEmptyRecycleBin(). So when the user click on button with Caption "Open Recycle Bin" i need to show them with the files in it. thanks Nitheesh.
Jose Jo Martin http://www.simpletools.co.in
-
Hi David, Sorry for not describing what i am actually want to do. Here is my problem. I am doing a project in which i wanted to show the user the files in Recycle bin so that they can make sure that no necessary files are getting deleted in a mistake from the file system. And i am programmatically clearing the Recylcle bin using the API SHEmptyRecycleBin(). So when the user click on button with Caption "Open Recycle Bin" i need to show them with the files in it. thanks Nitheesh.
Jose Jo Martin http://www.simpletools.co.in
Nitheesh George wrote:
when the user click on button with Caption "Open Recycle Bin" i need to show them with the files in it.
A codeproject search provided this example: How to programmatically use the Recycle Bin[^] Best Wishes, -David Delaune
-
While Stuart is correct that the Recycle Bin is considered a virtual folder... copies of the files and the INFO/INFO2 database are stored in multiple physical locations on mounted disk drive volumes. Raymond Chen described a method for determining whether a folder is part of the recycle bin: How can I tell that a directory is really a recycle bin?[^] As far as I know..all folders with COM class identifier CLSID_RecycleBin have always been created in the root of the volume. So in theory you would need to enumerate all folders in the volume root directory and use Raymond's function to determine if they are part of the recycle bin. Best Wishes, -David Delaune