Just to throw a spanner in the works.....
GetSpecialFolder(CSIDL_COMMON_APPDATA) does not work, it still virtualises! use GetEnvironmentVariable("ALLUSERSPROFILE", stringpointer, MAX_PATH);
Tim, can you clarify when GetSpecialFolder does not work please? I have called it when creating my sub-folder and writing the text file into it, then I've changed users (to another standard user) and called it to read the text file from it perfectly fine. So I'm confused as to when it won't work. Thanks! GetSpecialFolder(CSIDL_COMMON_APPDATA) does not work, it still virtualises! use GetEnvironmentVariable("ALLUSERSPROFILE", stringpointer, MAX_PATH);