title: how to use the GetFileVersionInfo function?
body: <p>I have this code - that is returning the file version (into a struct)
  I'm using as example the shell32.dll 
  but there are some values that I don't understand their meanings , and would love to get an explanation.</p>
  
  <p>here is the code :</p>
  
  <pre><code>void GetFileVersion( PCHAR pFilePath  ,PVERSION pRetVersion)
  {
  DWORD               dwSize              = 0;
  BYTE                *pVersionInfo       = NULL;
  VS_FIXEDFILEINFO    *pFileInfo          = NULL;
  UINT                pLenFileInfo        = 0;
  
  
  /*getting the file version info size */
  dwSize = GetFileVersionInfoSize( pFilePath, NULL );
  if ( dwSize == 0 )
  {
      printf( "Error in GetFileVersionInfoSize: %d\n", GetLastError() );
      return;
  }
  
  pVersionInfo = new BYTE[ dwSize ]; /*allocation of space for the verison size */
  
  if ( !GetFileVersionInfo( pFilePath, 0, dwSize, pVersionInfo ) ) /*entering all info     data to pbVersionInfo*/
  {
      printf( "Error in GetFileVersionInfo: %d\n", GetLastError() );
      delete[] pVersionInfo;
      return;
  }
  
  if ( !VerQueryValue( pVersionInfo, TEXT("\\"), (LPVOID*) &amp;pFileInfo, &amp;pLenFileInfo ) )
  {
      printf( "Error in VerQueryValue: %d\n", GetLastError() );
      delete[] pVersionInfo;
      return;
  }
  
  
  /*checking if the allocation succeeded */
  if (NULL == pRetVersion)
  {
      printf("Allocation failed! \n" , GetLastError());
      return;
  }
  
  
  pRetVersion-&gt;major  =  ( pFileInfo-&gt;dwFileVersionMS &gt;&gt; 16 ) &amp; 0xffff ;
  pRetVersion-&gt;minor  =  ( pFileInfo-&gt;dwFileVersionMS) &amp; 0xffff;
  pRetVersion-&gt;hotfix =  ( pFileInfo-&gt;dwFileVersionLS &gt;&gt;  16 ) &amp; 0xffff;
  pRetVersion-&gt;other  =  ( pFileInfo-&gt;dwFileVersionLS) &amp; 0xffff;      
  
  }
  </code></pre>
  
  <ol>
  <li><p>what is the the meaning of dwSize ? is this only the file version size? where can I see it while clicking on the shell32.dll?</p></li>
  <li><p>pLenFileinfo - what is this size ? </p></li>
  <li><p>when I look at the struct of <code>VS_FIXEDFILEINFO</code> there is only the version info information , Is there a wae to get for example : <code>File description</code> , <code>Date modified</code> , <code>Original filename</code> etc ? (all the other properties that are inside the "Details" )?</p></li>
  </ol>
  
  <p>thanks !!!!!</p>