I want my program to throw an error when I try to create files in protected places, such as the root of the C: \ drive (for example: FILE* FileHandle = fopen("\\file.txt", a) ). Instead, the file is created in the virtual store in% APPDATA%.
How to disable this virtual store?
thanks
EDIT: just to be clear, I am not asking how to bypass the protection and create the file in a secure place. I want the file to be created by FAIL so that I can tell the user that he is an idiot.
c ++ windows file-io fopen virtualstore
Zain rizvi
source share