<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=80058&amp;view=findpost&amp;p=583813</guid>
        <pubDate>Thu, 20 Jan 2005 10:15:18 +0000</pubDate>
        <title>Изменение версии *.exe</title>
        <link>https://forum.sources.ru/index.php?showtopic=80058&amp;view=findpost&amp;p=583813</link>
        <description><![CDATA[-AdyOS-: Все заработало, апдейт делает без ошибок, вот только одна фигня - инфа в файле-то не обнавилась почему-то... :wall:]]></description>
        <author>-AdyOS-</author>
        <category>C/C++: Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=80058&amp;view=findpost&amp;p=583670</guid>
        <pubDate>Thu, 20 Jan 2005 08:48:32 +0000</pubDate>
        <title>Изменение версии *.exe</title>
        <link>https://forum.sources.ru/index.php?showtopic=80058&amp;view=findpost&amp;p=583670</link>
        <description><![CDATA[-AdyOS-: Спасибо&#33; Все заработало. Т.е. получить инфу удалось, но терерь возник другой вопрос - а каким образом вписать изменения?<br>
<br>
Нашел&#33; Как update делать. Правда, опять падает  :( вот в этом месте<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;if(UpdateResource(hUpdateRes, RT_VERSION, </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MAKEINTRESOURCE(VS_VERSION_INFO), </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;bufVer, dwSizeFVerInf) == FALSE) </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;throw(&quot;Cant UpdateResource&quot;);</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>-AdyOS-</author>
        <category>C/C++: Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=80058&amp;view=findpost&amp;p=583057</guid>
        <pubDate>Wed, 19 Jan 2005 16:59:51 +0000</pubDate>
        <title>Изменение версии *.exe</title>
        <link>https://forum.sources.ru/index.php?showtopic=80058&amp;view=findpost&amp;p=583057</link>
        <description><![CDATA[TrefptYc: Недавно на OSR-е ( и точнее в журналe NT Insider ) была как раз статья о том, как правильно обращаться с версиями проекта<br>http://osronline.com/article.cfm?id=359]]></description>
        <author>TrefptYc</author>
        <category>C/C++: Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=80058&amp;view=findpost&amp;p=582988</guid>
        <pubDate>Wed, 19 Jan 2005 15:48:21 +0000</pubDate>
        <title>Изменение версии *.exe</title>
        <link>https://forum.sources.ru/index.php?showtopic=80058&amp;view=findpost&amp;p=582988</link>
        <description><![CDATA[-AdyOS-: Попробывал вытащить эту инфу, но прога падает на выполнении VerQueryValue:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp;char buff[128]; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;char szResourceX [80]; </div><div class="code_line">&nbsp;&nbsp; &nbsp;char *pszResourceX = szResourceX;</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;LPDWORD lpdwHandleToZero = NULL; </div><div class="code_line">&nbsp;&nbsp; &nbsp;DWORD dwSizeFVerInf; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;CString DllName = szFileName; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;dwSizeFVerInf = ::GetFileVersionInfoSize((LPTSTR)(LPCTSTR)DllName, lpdwHandleToZero);</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;LPVOID lpFixedFileInf; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;lpFixedFileInf = new char[dwSizeFVerInf];</div><div class="code_line">&nbsp;&nbsp; &nbsp;BOOL bRet = ::GetFileVersionInfo(</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;(LPTSTR)(LPCTSTR)DllName,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;NULL,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;dwSizeFVerInf,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;lpFixedFileInf);</div><div class="code_line">&nbsp;&nbsp; &nbsp;if(bRet == FALSE)</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;VS_FIXEDFILEINFO *pFixedFileInfo; </div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;UINT uLen = 0; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;bRet = VerQueryValue(</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;(const LPVOID)lpFixedFileInf,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&quot;\&quot;, </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;(LPVOID *) (&amp;pFixedFileInfo),</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&amp;uLen);</div></ol></div></div></div></div>]]></description>
        <author>-AdyOS-</author>
        <category>C/C++: Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=80058&amp;view=findpost&amp;p=582953</guid>
        <pubDate>Wed, 19 Jan 2005 14:56:20 +0000</pubDate>
        <title>Изменение версии *.exe</title>
        <link>https://forum.sources.ru/index.php?showtopic=80058&amp;view=findpost&amp;p=582953</link>
        <description><![CDATA[trainer: Вспоминается мне, что номер версии хранится в двух видах - текстовом(Unicode) и двоичном. Windows, по видимому, использует двоичный вид.<br>
Двоичный вид - смещение 0x2E от начала строки VS_VERSION_INFO<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">struct { /* v4.v3.v2.v1 */</div><div class="code_line">&nbsp;&nbsp; unsigned short v1;</div><div class="code_line">&nbsp;&nbsp; unsigned short v2;</div><div class="code_line">&nbsp;&nbsp; unsigned short v3;</div><div class="code_line">&nbsp;&nbsp; unsigned short v4;</div><div class="code_line">}</div></ol></div></div></div></div>]]></description>
        <author>trainer</author>
        <category>C/C++: Прочее</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=80058&amp;view=findpost&amp;p=582921</guid>
        <pubDate>Wed, 19 Jan 2005 14:30:25 +0000</pubDate>
        <title>Изменение версии *.exe</title>
        <link>https://forum.sources.ru/index.php?showtopic=80058&amp;view=findpost&amp;p=582921</link>
        <description><![CDATA[-AdyOS-: Всем привет&#33;<br>Столкнулся с такой проблемой - нужно поменять версию у экзешника, т.е. поле FileVersion. Пытался это сделать через прогу Resource Editor и Restorator. Первая прога меняет в бинарнике соответсвующее поле, но винда почему-то в упрор выдает старую версию. Вторая же выдает ту же версию, что и винда (старую), но менять не дает&#33; Если бинарник открыть, то там FileVersion = new version, в чем же прикол,господа&#33;  :wall: <br>Может кто-нибудь уже встречался с такой бедой, знает чем помочь...Осень нада&#33;<br><br>ЗЫ: Restorator выдает два поля FileVersion: одно называется File version = старой версии (то что и выдает винда), и второе FileVersion = измененной версии в бинарнике. Т.е. надо каким-то макаром найти первый вариант...]]></description>
        <author>-AdyOS-</author>
        <category>C/C++: Прочее</category>
      </item>
	
      </channel>
      </rss>
	