I need to get temp path. So I tried GetTempPath() and std::getenv("TEMP"). The problem is that the result contains ~ symbol, for example C:\Users\OLEKSI~1.ALE\AppData\Local\Temp.
Is it possible to get full temp path like C:\Users\Oleksii\AppData\Local\Temp?
>Solution :
GetLongPathName function:
Converts the specified path to its long form.
DWORD GetLongPathNameW(
[in] LPCWSTR lpszShortPath,
[out] LPWSTR lpszLongPath,
[in] DWORD cchBuffer
);
DWORD GetLongPathNameA(
[in] LPCSTR lpszShortPath,
[out] LPSTR lpszLongPath,
[in] DWORD cchBuffer
);
Set lpszShortPath = short path with ~ symbols. Read result from lpszLongPath.