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. Createfile in Vista

Createfile in Vista

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
6 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.
  • R Offline
    R Offline
    RaymondM
    wrote on last edited by
    #1

    I want to install the file data.bmp in system32: hFile = CreateFile((L"c:\\windows\\system32\\data.bmp"), GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, NULL); When I run this hFile is given a value, so I write to the file, and close it. Why doesn't it appear in system 32 ? I have no trouble writing to other folders, but not to Windows, or even to C:. The problem seems to be pecular to Vista, and certainly doesn't arise on XP. Raymond Mercier

    P 1 Reply Last reply
    0
    • R RaymondM

      I want to install the file data.bmp in system32: hFile = CreateFile((L"c:\\windows\\system32\\data.bmp"), GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, NULL); When I run this hFile is given a value, so I write to the file, and close it. Why doesn't it appear in system 32 ? I have no trouble writing to other folders, but not to Windows, or even to C:. The problem seems to be pecular to Vista, and certainly doesn't arise on XP. Raymond Mercier

      P Offline
      P Offline
      Perspx
      wrote on last edited by
      #2

      As with most Vista write problems, you are probably not running the process as an Administrator. You must do so to write to any system directories. Hope this helps, --Perspx

      "The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia

      R 1 Reply Last reply
      0
      • P Perspx

        As with most Vista write problems, you are probably not running the process as an Administrator. You must do so to write to any system directories. Hope this helps, --Perspx

        "The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia

        R Offline
        R Offline
        RaymondM
        wrote on last edited by
        #3

        Thanks, that has cured it. Now I have to see how to run the program in debug mode within VisualStudio, but as administrator. Raymond

        P 1 Reply Last reply
        0
        • R RaymondM

          Thanks, that has cured it. Now I have to see how to run the program in debug mode within VisualStudio, but as administrator. Raymond

          P Offline
          P Offline
          Perspx
          wrote on last edited by
          #4

          I think that if you run VS as Administrator then any projects you run in debug mode under it will also run as Administrator. Regards, --Perspx

          "The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia

          R 1 Reply Last reply
          0
          • P Perspx

            I think that if you run VS as Administrator then any projects you run in debug mode under it will also run as Administrator. Regards, --Perspx

            "The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia

            R Offline
            R Offline
            RaymondM
            wrote on last edited by
            #5

            Thanks again. It does as you say. Great game, this Vista ! Raymond

            N 1 Reply Last reply
            0
            • R RaymondM

              Thanks again. It does as you say. Great game, this Vista ! Raymond

              N Offline
              N Offline
              nisha00000
              wrote on last edited by
              #6

              in vista .. there is one compiled MFC source code in this code was developed XP,that code was not running in vista. But in vista we have 2 generate the source code and developed it then only its possible to achieve ..

              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