Get the temporary path as a string.
int get_temp_path( LPSTR lpBuffer, int nBufferSize )
0 = return by WinAPI GetTempPath
1 = return TEMP folder in Origin ini path
2 = failure
EX1
void get_temp_path_ex1() { char szTemp[MAXFULLPATH]; int nTempPathType = get_temp_path(szTemp, MAXFULLPATH); if(0 == nTempPathType) { printf("Temp path is %s\n which is the standard location and is writable.\n", szTemp); } else if(1 == nTempPathType) { printf("For some reason the standard windows temp path is not writable, so we have to use Origin's user files path as the temp path\n%s\n", szTemp); } else out_str("Error getting a valid temp path"); }
origin.h