C++20 WinAPI example of getting the canonical path to an executable file.
When the process is launched using a Long Path (> MAX_PATH)
When the process is launched using a Short Path (for example: C:\PROGRA~1\getCurrentExePath.exe)
When the process is launched using a relative path (for example: C:\dir0\..\getCurrentExePath.exe)
In case of any errors, the function throws an exception.
git clone https://github.com/NsPro04/getCurrentExePath.git
.\getCurrentExePath\getCurrentExePath.sln
Ctrl+Shift+B