Possible Duplicate:
How to get the application executable name in Windows (C++ Win32 or C++/CLI)?
I can find what directory the process is running in using GetCurrentDirectory()
, but what about finding the directory the executabke resides in?
Possible Duplicate:
How to get the application executable name in Windows (C++ Win32 or C++/CLI)?
I can find what directory the process is running in using GetCurrentDirectory()
, but what about finding the directory the executabke resides in?
In visual C++, we use
CString m_sAppFolder = __targv[0] ;
which returns a string like "C:\blah\blah\executable_name.exe"