Posted by Mike Saunders on June 13, 2007 at 08:29:17:
In Reply to: TEMP Folder posted by Jim Guerber on June 12, 2007 at 17:54:26:
The GetTempPath function checks for the existence of environment variables in the following order and uses the first path found:
The path specified by the TMP environment variable.
The path specified by the TEMP environment variable.
The path specified by the USERPROFILE environment variable.
The Windows directory
Perhaps you do not have a TMP Variable defined and the function is falling thorugh to finding the TEMP variable.
If we are talking about the USERPROFILE perhaps this
if(!GetEnvironmentVariable("TEMP",TempPath,sizeof(TempPath)-1))
should be this
if(!GetEnvironmentVariable("USERPROFILE",TempPath,sizeof(TempPath)-1))