I know this question has been asked before but I still haven\'t seen a satisfactory answer, or a definitive \"no, this cannot be done\", so I\'ll ask again!
All I wa
In case you need to handle unicode paths for Windows:
#include
#include
int wmain(int argc, wchar_t * argv[])
{
HMODULE this_process_handle = GetModuleHandle(NULL);
wchar_t this_process_path[MAX_PATH];
GetModuleFileNameW(NULL, this_process_path, sizeof(this_process_path));
std::wcout << "Unicode path of this app: " << this_process_path << std::endl;
return 0;
}