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. Windows API
  4. CSIDL for Users\Public folder?

CSIDL for Users\Public folder?

Scheduled Pinned Locked Moved Windows API
question
6 Posts 4 Posters 3 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.
  • V Offline
    V Offline
    virtualnik
    wrote on last edited by
    #1

    Hello, I could not find the CSIDL for the (typical path) c:\users\public folder. (I do not have the latest Vista Platform SDK, that may be the reason). You know, c:\users\username is CSIDL_PROFILE, but what is used for the public folders? Anyone can tell me? Thanks, Nikolaus

    J P 2 Replies Last reply
    0
    • V virtualnik

      Hello, I could not find the CSIDL for the (typical path) c:\users\public folder. (I do not have the latest Vista Platform SDK, that may be the reason). You know, c:\users\username is CSIDL_PROFILE, but what is used for the public folders? Anyone can tell me? Thanks, Nikolaus

      J Offline
      J Offline
      Jonathan Darka
      wrote on last edited by
      #2

      Hi, try here for the CSIDL's. But note: Beginning with Windows Vista, applications should use the SHGetKnownFolderPath function and the REFKNOWNFOLDERID type to determine the full path to this folder. Existing applications that use the SHGetFolderPath function and the CSIDL type will continue to work. The KNOWNFOLDERID can be found in the KnownFolders.h header file. regards,


      Jonathan Wilkes Darka [Xanya.net]

      V 1 Reply Last reply
      0
      • J Jonathan Darka

        Hi, try here for the CSIDL's. But note: Beginning with Windows Vista, applications should use the SHGetKnownFolderPath function and the REFKNOWNFOLDERID type to determine the full path to this folder. Existing applications that use the SHGetFolderPath function and the CSIDL type will continue to work. The KNOWNFOLDERID can be found in the KnownFolders.h header file. regards,


        Jonathan Wilkes Darka [Xanya.net]

        V Offline
        V Offline
        virtualnik
        wrote on last edited by
        #3

        hi, Thanks, but i already looked at the list of CSIDL's on msdn and there i have not found a define for the C:\users\public folder. The SHGetKnownFolderPath is not an option for me, as it adds dependency on vista and i do an "Win2K/XP or later" application. Anyway for now i use hard coded users\public and convert it to pidl and then back to displayname etc - seems to work so far. Guess its because some important folders on vista are hardcoded english strings anyway, but display in the UI language. Bye Nikolaus

        M 1 Reply Last reply
        0
        • V virtualnik

          hi, Thanks, but i already looked at the list of CSIDL's on msdn and there i have not found a define for the C:\users\public folder. The SHGetKnownFolderPath is not an option for me, as it adds dependency on vista and i do an "Win2K/XP or later" application. Anyway for now i use hard coded users\public and convert it to pidl and then back to displayname etc - seems to work so far. Guess its because some important folders on vista are hardcoded english strings anyway, but display in the UI language. Bye Nikolaus

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          virtualnik wrote:

          The SHGetKnownFolderPath is not an option for me, as it adds dependency on vista and i do an "Win2K/XP or later" application.

          Then use GetProcAddress() to get a pointer to the API. Hard-coding a directory name will make your code fail as soon as the app is run on another language OS.

          --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Ford, what's this fish doing in my ear?

          V 1 Reply Last reply
          0
          • M Michael Dunn

            virtualnik wrote:

            The SHGetKnownFolderPath is not an option for me, as it adds dependency on vista and i do an "Win2K/XP or later" application.

            Then use GetProcAddress() to get a pointer to the API. Hard-coding a directory name will make your code fail as soon as the app is run on another language OS.

            --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Ford, what's this fish doing in my ear?

            V Offline
            V Offline
            virtualnik
            wrote on last edited by
            #5

            Michael Dunn wrote:

            Then use GetProcAddress() to get a pointer to the API.

            Oh no, i had hoped to find a better solution than GetProcAddress'ing. If i remember the Win9x time with all its different ComCtrl etc versions... I really dont understand why "they" not just added a simple CSIDL_PUBLIC.

            Michael Dunn wrote:

            Hard-coding a directory name will make your code fail as soon as the app is run on another language OS.

            Actually i am using a german language vista... vista uses hard coded english strings for some folders, but displays them in the UI language (Program Files, Users, Public\Pictures, etc...). Windows has become a true multi-language app :-) Bye Nikolaus

            1 Reply Last reply
            0
            • V virtualnik

              Hello, I could not find the CSIDL for the (typical path) c:\users\public folder. (I do not have the latest Vista Platform SDK, that may be the reason). You know, c:\users\username is CSIDL_PROFILE, but what is used for the public folders? Anyone can tell me? Thanks, Nikolaus

              P Offline
              P Offline
              Paresh Chitte
              wrote on last edited by
              #6

              Would CSIDL_PERSONAL solve your purpose ? Regards, Paresh.

              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