Najd wrote:
> Hi All,
> I'm developping a DLL that requiers the path of the Temp directory of
> the user logged. I used GetTempPath(), GetEnvironmentVariable() and
> ExpandEnvironmentStrings(), but the 3 methodes returns the system temp
> path: "C:\WINDOWS\Temp".
The C++ way to get the "TEMP" environment variable is
std::getenv("TEMP");
That works for me.
OT note: on some systems, the system temp path is the only temp path,
and C++ can't do anything about it. If the user wants it that way,
don't argue.
HTH,
Michiel Salters
|