Click here to Skip to main content
15,915,600 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to get application path Pin
toxcct30-Jan-07 22:35
toxcct30-Jan-07 22:35 
AnswerRe: how to get application path Pin
Michael Dunn30-Jan-07 22:11
sitebuilderMichael Dunn30-Jan-07 22:11 
GeneralRe: how to get application path Pin
Naveen30-Jan-07 22:26
Naveen30-Jan-07 22:26 
QuestionFinding verion info of a dll .. How ? Pin
Sakthiu30-Jan-07 20:06
Sakthiu30-Jan-07 20:06 
AnswerRe: Finding verion info of a dll .. How ? Pin
Mark Salsbery30-Jan-07 20:11
Mark Salsbery30-Jan-07 20:11 
GeneralRe: Finding verion info of a dll .. How ? Pin
Sakthiu30-Jan-07 23:19
Sakthiu30-Jan-07 23:19 
GeneralRe: Finding verion info of a dll .. How ? Pin
Hamid_RT31-Jan-07 1:45
Hamid_RT31-Jan-07 1:45 
GeneralRe: Finding verion info of a dll .. How ? Pin
Mark Salsbery31-Jan-07 6:41
Mark Salsbery31-Jan-07 6:41 
Here's one way to read the VERSIONINFO resource of a file (if it exists)
LPCTSTR pszFileName = _T("C:\\TEST.DLL");
DWORD FVHandle;
 
DWORD dwSize = ::GetFileVersionInfoSize(pszFileName, &FVHandle);
if (dwSize)
{
   void *pVersionData = (LPVOID)new BYTE[dwSize];
 
   if (::GetFileVersionInfo(pszFileName, FVHandle, dwSize, pVersionData))
   {
      TCHAR szSubBlockName[256];
      UINT nSize;
 
      // Get fixed file version info
      const VS_FIXEDFILEINFO *pFixedFileInfo;
      _tcscpy(szSubBlockName,_T("\\"));
      if (::VerQueryValue(pVersionData, szSubBlockName, (void **)&pFixedFileInfo, &nSize))
      {
         // version info in VS_FIXEDFILEINFO struct pointed to by pFixedFileInfo
      }
   }
 
   delete[] (BYTE *)pVersionData;
}

Strings like company name, program name, copyright, etc. in a VERSIONINFO resource can exist in
several languages so it's slightly trickier retrieving those.

Mark
AnswerRe: Finding verion info of a dll .. How ? Pin
benjymous30-Jan-07 21:45
benjymous30-Jan-07 21:45 
QuestionSHBrowseForFolderA Title Width Pin
arunperi30-Jan-07 20:03
arunperi30-Jan-07 20:03 
QuestionRe: SHBrowseForFolderA Title Width Pin
prasad_som30-Jan-07 21:45
prasad_som30-Jan-07 21:45 
AnswerRe: SHBrowseForFolderA Title Width Pin
Hamid_RT31-Jan-07 1:42
Hamid_RT31-Jan-07 1:42 
QuestionWorking with win 32 timers. Pin
Suresh H30-Jan-07 19:42
Suresh H30-Jan-07 19:42 
AnswerRe: Working with win 32 timers. Pin
prasad_som30-Jan-07 19:54
prasad_som30-Jan-07 19:54 
GeneralRe: Working with win 32 timers. Pin
Suresh H30-Jan-07 20:26
Suresh H30-Jan-07 20:26 
AnswerRe: Working with win 32 timers. Pin
prasad_som30-Jan-07 20:33
prasad_som30-Jan-07 20:33 
GeneralRe: Working with win 32 timers. Pin
Suresh H30-Jan-07 21:30
Suresh H30-Jan-07 21:30 
AnswerRe: Working with win 32 timers. Pin
prasad_som30-Jan-07 21:40
prasad_som30-Jan-07 21:40 
GeneralRe: Working with win 32 timers. Pin
Suresh H30-Jan-07 22:13
Suresh H30-Jan-07 22:13 
AnswerRe: Working with win 32 timers. Pin
prasad_som30-Jan-07 22:30
prasad_som30-Jan-07 22:30 
AnswerRe: Working with win 32 timers. Pin
Don Box30-Jan-07 19:59
Don Box30-Jan-07 19:59 
AnswerRe: Working with win 32 timers. Pin
Hamid_RT31-Jan-07 1:31
Hamid_RT31-Jan-07 1:31 
GeneralRe: Working with win 32 timers. Pin
Suresh H31-Jan-07 18:47
Suresh H31-Jan-07 18:47 
GeneralRe: Working with win 32 timers. Pin
Hamid_RT31-Jan-07 20:07
Hamid_RT31-Jan-07 20:07 
QuestionVS .NET std::hex, LNK2019, Release Build Pin
Jeffrey Walton30-Jan-07 19:04
Jeffrey Walton30-Jan-07 19:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.