[host] windows: move log path to %ProgramData%\Looking Glass (host)

Instead of using %windir%\Temp, which is not accessible by default and
contains a lot of unrelated files, as the location for our log files,
this commit moves it to %ProgramData%\Looking Glass (host), which will
be a dedicated directory just for the LG host log files. This applies
to both the host application logs and the service logs.

Also, we now switched to using PathCombineA from shlwapi.dll instead
of using snprintf, which greatly simplifies the code. PathCombineA
guarantees that the path would not overflow a buffer of MAX_PATH.
This commit is contained in:
Quantum
2021-01-28 20:39:05 -05:00
committed by Geoffrey McRae
parent fb916cbac1
commit 1761ea2b9b
4 changed files with 39 additions and 11 deletions

View File

@@ -30,4 +30,5 @@ struct MSG_CALL_FUNCTION
LPARAM lParam;
};
const char *getSystemLogDirectory(void);
LRESULT sendAppMessage(UINT Msg, WPARAM wParam, LPARAM lParam);