<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Version Anzeigen]]></title><description><![CDATA[<p>So ich hab mal wieder eine Frage:</p>
<p>Und zwar gibt es unter Ressourcen ja &quot;Version&quot; und dort kann man jede Menge schöne Sachen eintragen, wie Beschreibung, Name, Versions Info etc. wie kann ich das alles einfach nur anzeigen lassen, wenn ich bei mir im Menü auf Info klicke. Möchte damit nix machen, es nur anzeigen lassen.</p>
<p>Gruß Marco</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/75152/version-anzeigen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 05:38:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/75152.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 27 May 2004 18:16:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Version Anzeigen on Thu, 27 May 2004 18:16:53 GMT]]></title><description><![CDATA[<p>So ich hab mal wieder eine Frage:</p>
<p>Und zwar gibt es unter Ressourcen ja &quot;Version&quot; und dort kann man jede Menge schöne Sachen eintragen, wie Beschreibung, Name, Versions Info etc. wie kann ich das alles einfach nur anzeigen lassen, wenn ich bei mir im Menü auf Info klicke. Möchte damit nix machen, es nur anzeigen lassen.</p>
<p>Gruß Marco</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/528563</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/528563</guid><dc:creator><![CDATA[Nerion]]></dc:creator><pubDate>Thu, 27 May 2004 18:16:53 GMT</pubDate></item><item><title><![CDATA[Reply to Version Anzeigen on Fri, 28 May 2004 07:50:19 GMT]]></title><description><![CDATA[<p><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/versioninformation.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/versioninformation.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/528759</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/528759</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Fri, 28 May 2004 07:50:19 GMT</pubDate></item><item><title><![CDATA[Reply to Version Anzeigen on Fri, 28 May 2004 08:46:16 GMT]]></title><description><![CDATA[<p>Gruß</p>
<p>IcemanX</p>
<p>*.cpp Datei</p>
<pre><code>#include &quot;crVersionsInfo.h&quot;    
//-----------------------------------------------------------------
// Klasse zum Auslesen der Versionsinformationen aus den Windows-Exe und DLLs
//-----------------------------------------------------------------
// Verwendung:
// Füllen einer Memo-Komponente mit Vesions-Informationen des
// Windows-Notepads:
// TCRVerInfo * pVer = new TCRVerInfo(&quot;C:\\WINDOWS\\NOTEPAD.EXE&quot;);
// for(int ilCount = 0; ilCount &lt; 10; ilCount++)
// { Memo1 -&gt; Lines -&gt; Add(pVer -&gt; GetVerInfo(ilCount)); }
// if(pVer != NULL) { delete pVer; pVer = NULL; }
// Anstatt ilCount kann der Funktion GetVerInfo()-Funktion eine der unten
// aufgelisteten Konstanten übergeben werden
//-----------------------------------------------------------------

//-------------------------------------------------------------------
// Konstruktor der TCRVerInfo - Klasse
//-------------------------------------------------------------------
TCRVerInfo::TCRVerInfo(AnsiString slExeName)
{
  DWORD handle; // Dummy, Windows does not use this parameter.
  DWORD size;
  if(!FileExists(slExeName)) { slExeName = Application -&gt; ExeName; }

  size = GetFileVersionInfoSize(slExeName.c_str(), &amp;handle);

  if(size == 0)
    return; // No file information

  char *buffer = new char [size];
  bool status = GetFileVersionInfo(slExeName.c_str(), 0, size, buffer);
  if(!status)
  {
    delete [] buffer;
    return;
  }

  // Extract the language ID
  UINT datasize;
  unsigned short *translation;

  /*status =*/ VerQueryValue( buffer, &quot;\\VarFileInfo\\Translation&quot;,
    (void **) &amp;translation, &amp;datasize);

  // Here we create a prefix string that is the same for all the keys.
  AnsiString prefix = &quot;\\StringFileInfo\\&quot;
      + AnsiString::IntToHex(translation [0], 4)
      + AnsiString::IntToHex(translation [1], 4);

  // Extract all the version information.
  company_name         = GetVersionKey(buffer, prefix, &quot;CompanyName&quot;);
  file_description         = GetVersionKey(buffer, prefix, &quot;FileDescription&quot;);
  file_version         = GetVersionKey(buffer, prefix, &quot;FileVersion&quot;);
  internal_name        = GetVersionKey(buffer, prefix, &quot;InternalName&quot;);
  legal_copyright         = GetVersionKey(buffer, prefix, &quot;LegalCopyright&quot;);
  legal_trademarks         = GetVersionKey(buffer, prefix, &quot;LegalTrademarks&quot;);
  original_filename  = GetVersionKey(buffer, prefix, &quot;OriginalFilename&quot;);
  product_name         = GetVersionKey(buffer, prefix, &quot;ProductName&quot;);
  product_version         = GetVersionKey(buffer, prefix, &quot;ProductVersion&quot;);
  file_comments        = GetVersionKey(buffer, prefix, &quot;Comments&quot;);
  delete [] buffer;
  return;
}

//--------------------------------------------------------------------
// Extrahiert Versions-Info aus dem buffer
//-------------------------------------------------------------------
char* TCRVerInfo::GetVersionKey(char *buffer,
                             const AnsiString &amp;prefix,
                             char *key)
{
  char *data;
  UINT datasize;
  AnsiString fullkey = prefix + &quot;\\&quot; + key;
  bool status = VerQueryValue(buffer, fullkey.c_str(),
    (void **) &amp;data, &amp;datasize);
  if(status)
    return(data);
  else
    return(&quot;&quot;);
}

//-------------------------------------------------------------------
// Gibt die Vesions-Infos zurück
//-------------------------------------------------------------------
AnsiString TCRVerInfo::GetVerInfo(int ilId)
{
  switch (ilId)
  {
    case VI_COMPANY_NAME      : return company_name;
    case VI_FILE_DESCRIPTION  : return file_description;
    case VI_FILE_VERSION      : return file_version;
    case VI_INTERNAL_NAME     : return internal_name;
    case VI_LEGAL_COPYRIGHT   : return legal_copyright;
    case VI_LEGAL_TRADEMARKS  : return legal_trademarks;
    case VI_ORIGINAL_FILENAME : return original_filename;
    case VI_PRODUCT_NAME      : return product_name;
    case VI_PRODUCT_VERSION   : return product_version;
    case VI_FILE_COMMENTS     : return file_comments;
    default                   : return file_version;
  }
}
</code></pre>
<p>*.h Datei</p>
<pre><code>#include &lt;vcl.h&gt;

//----------------------------------------------------------------
// Konstanten für die Verwendung als Parameter mit der
// Funktion GetVerInfo(int ilId):
//-----------------------------------------------------------------

const int VI_COMPANY_NAME      = 0;      // Firmen-Name
const int VI_FILE_DESCRIPTION  = 1;      // Dateibeschreibung
const int VI_FILE_VERSION      = 2;      // Versionsnummer
const int VI_INTERNAL_NAME     = 3;      // Interner Name
const int VI_LEGAL_COPYRIGHT   = 4;      // Copyright-Info
const int VI_LEGAL_TRADEMARKS  = 5;      // Warenzeichen
const int VI_ORIGINAL_FILENAME = 6;      // Orig.-Dateiname
const int VI_PRODUCT_NAME      = 7;      // Produktname
const int VI_PRODUCT_VERSION   = 8;      // Produkt-Version
const int VI_FILE_COMMENTS     = 9;      // Kommentare

//---------------------------------------------------------------------
// Klassendeklaration
//-------------------------------------------------------------------

__declspec(dllexport) class TCRVerInfo
{
  private:
    AnsiString company_name;
    AnsiString file_description;
    AnsiString file_version;
    AnsiString internal_name;
    AnsiString legal_copyright;
    AnsiString legal_trademarks;
    AnsiString original_filename;
    AnsiString product_name;
    AnsiString product_version;
    AnsiString file_comments;

  protected:
  char *GetVersionKey(char *buffer,
                           const AnsiString &amp;prefix,
                           char *key);

  public:
    // Konstuktor (als Parameter wird der Dateiname übergeben)
    TCRVerInfo(AnsiString slExeName);
    // Funktion gibt die angeforderte Ver-Info zurück:
    AnsiString GetVerInfo(int ilId);
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/528794</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/528794</guid><dc:creator><![CDATA[IcemanX]]></dc:creator><pubDate>Fri, 28 May 2004 08:46:16 GMT</pubDate></item></channel></rss>