common: fix win32 event log source
The Windows "get_process_name" function uses the input buffer
to store the entire executable path, while the caller only
expects the filename.
The "get_process_name_cpp" function is using an insufficient
buffer, for which reason it will return "(unknown)" when the
executable path exceeds 32 characters.
Windows event log entries have the wrong source because of this.
We'll update "get_process_name" to use a separate buffer for the
full executable path and avoid requesting a larger buffer than
actually needed.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit
86c7c2f5be96e80d492447d6582131f1b2d3438d)