Createfile in Vista
-
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
-
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
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
-
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
-
Thanks, that has cured it. Now I have to see how to run the program in debug mode within VisualStudio, but as administrator. Raymond
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
-
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
-
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 ..