Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET

SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET

Scheduled Pinned Locked Moved C / C++ / MFC
question
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nitheesh George
    wrote on last edited by
    #1

    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

    S L 2 Replies Last reply
    0
    • N Nitheesh George

      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

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • N Nitheesh George

        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

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        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

        S L 2 Replies Last reply
        0
        • L Lost User

          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

          S Offline
          S Offline
          Stuart Dootson
          wrote on last edited by
          #4

          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

          L 1 Reply Last reply
          0
          • S Stuart Dootson

            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

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            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

            S N 2 Replies Last reply
            0
            • L Lost User

              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

              S Offline
              S Offline
              Stuart Dootson
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • L Lost User

                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

                N Offline
                N Offline
                Nitheesh George
                wrote on last edited by
                #7

                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

                L 1 Reply Last reply
                0
                • N Nitheesh George

                  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

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  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

                  1 Reply Last reply
                  0
                  • L Lost User

                    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

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    > Raymond Chen described a method for determining whether a folder is part of the recycle bin Very bad "method". (and avoid this poor blog (plenty of wrong notions, not professional at all..))

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups