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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CreateDirectory() fails in vista os.

CreateDirectory() fails in vista os.

Scheduled Pinned Locked Moved C / C++ / MFC
help
4 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.
  • K Offline
    K Offline
    KASR1
    wrote on last edited by
    #1

    I am using CreateDirectory() method to create directory in some specified location. It fails in vista os. I need to know what could be the problem. Note: The user has adminstrative rights.

    S 1 Reply Last reply
    0
    • K KASR1

      I am using CreateDirectory() method to create directory in some specified location. It fails in vista os. I need to know what could be the problem. Note: The user has adminstrative rights.

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

      Have you tried using GetLastError[^] to get a more detailed error code?

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      V 1 Reply Last reply
      0
      • S Stuart Dootson

        Have you tried using GetLastError[^] to get a more detailed error code?

        Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

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

        Where are you trying to create the directory, if UAC is enabled and if you try to create in C: or on locations on the flash drive CreateDirectory could fail, in such a case your application has to run with admin rights

        S 1 Reply Last reply
        0
        • V vipin_nvk

          Where are you trying to create the directory, if UAC is enabled and if you try to create in C: or on locations on the flash drive CreateDirectory could fail, in such a case your application has to run with admin rights

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

          Hint: You're better off replying to the guy that actually asked the question rather than me - I was trying to help him, same as you.

          vipin_nvk wrote:

          in such a case your application has to run with admin rights

          He did already say "Note: The user has adminstrative rights"

          Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

          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