In Windows 7, how can I get programatically the system temporary folder?
The GetTempPath function is probably what you're looking for.
TCHAR buf [MAX_PATH];
if (GetTempPath (MAX_PATH, buf) != 0)
MessageBox (0, buf, _T("Temp path"), 0);
Have you given a try to GetTempPath()?
Retrieves the path of the directory designated for temporary files.
You can find a code sample here.
You could get the environment variable for the temp folder:
http://msdn.microsoft.com/en-us/library/ms683188%28VS.85%29.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With