GetTempPathA returning incorrect user folder
GetTempPathA returning incorrect user folder I need to access the user specific temp folder on windows, which is supposed to be doable with the GetTempPathA() I have something along the lines of: char buff[512]; GetTempPath(500,buff); strcat(buff,"specific_folder_in_temp\file.txt"); FILE f*; f = fopen(buff,"w"); However, instead of returning the expected C:Usersuser.nameAppDataLocalTemp... I'm getting C:UsersUSER~1.NAMAppDataLocalTemp... This results in my code failing. Any tips as to what I might be doing wrong? What does GetTempPathW return? And what is the values of your TMP, TEMP, and USERPROFILE environment variables? (Type set at command prompt to see your env) – selbie Jul 2 at 5:47 set As the environment variables TMP or TEMP may use short path, you cou...