Getting full path to my application - How?
I want to put version information in my About box and an audit table in my db. To do this, I call GetFileVersionInfoSize(), which requires a full path to my exe. Surely there is a MFC or WinAPI call that will get me that info. Can someone point me to the call?
thanx
Here is the code u can use
char szAppPath[MAX_PATH] = "";
CString strAppDirectory;
::GetModuleFileName(0, szAppPath, sizeof(szAppPath) - 1);
// Extract directory
// Note, that the extra spaces around \\ are only for display //reasons here...
strAppDirectory = szAppPath;//AfxMessageBox(strAppDirectory );
strAppDirectory = strAppDirectory.Left(strAppDirectory.ReverseFind('\\'));