<?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=132521&amp;view=findpost&amp;p=1020482</guid>
        <pubDate>Sat, 18 Feb 2006 19:03:25 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1020482</link>
        <description><![CDATA[rmf: Всё, спасибо, нашел сам&#33;<br>C:&#092;Program Files&#092;Visual Studio 8&#092;VC&#092;crt&#092;src]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1020425</guid>
        <pubDate>Sat, 18 Feb 2006 17:04:17 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1020425</link>
        <description><![CDATA[rmf: Ну дык еслибы знал бы, написал бы&#33;<br>
(яж говорю, я с Delphi, и особо не понимаю, смысл этого- выделение, осовобождение памяти, и т.д. Как там легко сделать str1:=str1+str2+&#39;hello&#39;, а здесь... ф-ции вызывать)<br>
<br>
Ты где этот код взял(дай пожалуйста и на strrchr и strstr, а то я свои версии сделал, но не уверен что они безглючные, и лучше MS&#39;овских)? На Go To Defenition другое совсем&#33; <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2006-02-18T17:05:08+00:00">18.02.06, 17:05</time></span></span><br>
З.Ы. пасибо большое, столько времени потратил на меня&#33;]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1020372</guid>
        <pubDate>Sat, 18 Feb 2006 15:47:39 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1020372</link>
        <description><![CDATA[Hryak: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=132521&view=findpost&p=1020228'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>rmf &#064; <time class="tag-quote__quoted-time" datetime="2006-02-18T12:01:12+00:00">18.02.06, 12:01</time></span><div class='quote '>Как полностью замениить memset (ну и memcpy)?</div></div><br>
Ну напиши сам-то.<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">/***</div><div class="code_line">*char *memset(dst, val, count) - sets &quot;count&quot; bytes at &quot;dst&quot; to &quot;val&quot;</div><div class="code_line">*</div><div class="code_line">*Purpose:</div><div class="code_line">* &nbsp; &nbsp; &nbsp; Sets the first &quot;count&quot; bytes of the memory starting</div><div class="code_line">* &nbsp; &nbsp; &nbsp; at &quot;dst&quot; to the character value &quot;val&quot;.</div><div class="code_line">*</div><div class="code_line">*Entry:</div><div class="code_line">* &nbsp; &nbsp; &nbsp; void *dst - pointer to memory to fill with val</div><div class="code_line">* &nbsp; &nbsp; &nbsp; int val &nbsp; - value to put in dst bytes</div><div class="code_line">* &nbsp; &nbsp; &nbsp; size_t count - number of bytes of dst to fill</div><div class="code_line">*</div><div class="code_line">*Exit:</div><div class="code_line">* &nbsp; &nbsp; &nbsp; returns dst, with filled bytes</div><div class="code_line">*</div><div class="code_line">*Exceptions:</div><div class="code_line">*</div><div class="code_line">*******************************************************************************/</div><div class="code_line">&nbsp;</div><div class="code_line">void * __cdecl memset (</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;void *dst,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;int val,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;size_t count</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;void *start = dst;</div><div class="code_line">&nbsp;</div><div class="code_line">#if defined (_M_IA64) || defined (_M_AMD64)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;__declspec(dllimport)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;void RtlFillMemory( void *, size_t count, char );</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;RtlFillMemory( dst, count, (char)val );</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">#else &nbsp;/* defined (_M_IA64) || defined (_M_AMD64) */</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;while (count--) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*(char *)dst = (char)val;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dst = (char *)dst + 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">#endif &nbsp;/* defined (_M_IA64) || defined (_M_AMD64) */</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return(start);</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">/***</div><div class="code_line">*memcpy - Copy source buffer to destination buffer</div><div class="code_line">*</div><div class="code_line">*Purpose:</div><div class="code_line">* &nbsp; &nbsp; &nbsp; memcpy() copies a source memory buffer to a destination memory buffer.</div><div class="code_line">* &nbsp; &nbsp; &nbsp; This routine does NOT recognize overlapping buffers, and thus can lead</div><div class="code_line">* &nbsp; &nbsp; &nbsp; to propogation.</div><div class="code_line">*</div><div class="code_line">* &nbsp; &nbsp; &nbsp; For cases where propogation must be avoided, memmove() must be used.</div><div class="code_line">*</div><div class="code_line">*Entry:</div><div class="code_line">* &nbsp; &nbsp; &nbsp; void *dst = pointer to destination buffer</div><div class="code_line">* &nbsp; &nbsp; &nbsp; const void *src = pointer to source buffer</div><div class="code_line">* &nbsp; &nbsp; &nbsp; size_t count = number of bytes to copy</div><div class="code_line">*</div><div class="code_line">*Exit:</div><div class="code_line">* &nbsp; &nbsp; &nbsp; Returns a pointer to the destination buffer</div><div class="code_line">*</div><div class="code_line">*Exceptions:</div><div class="code_line">*******************************************************************************/</div><div class="code_line">&nbsp;</div><div class="code_line">void * __cdecl memcpy (</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;void * dst,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;const void * src,</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;size_t count</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;)</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;void * ret = dst;</div><div class="code_line">&nbsp;</div><div class="code_line">#if defined (_M_IA64)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;__declspec(dllimport)</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;void RtlCopyMemory( void *, const void *, size_t count );</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;RtlCopyMemory( dst, src, count );</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">#else &nbsp;/* defined (_M_IA64) */</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;/*</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; * copy from lower addresses to higher addresses</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; */</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;while (count--) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*(char *)dst = *(char *)src;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dst = (char *)dst + 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;src = (char *)src + 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">#endif &nbsp;/* defined (_M_IA64) */</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return(ret);</div><div class="code_line">}</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>Copyright &copy; Microsoft Corporation. All rights reserved.]]></description>
        <author>Hryak</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1020228</guid>
        <pubDate>Sat, 18 Feb 2006 12:01:12 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1020228</link>
        <description><![CDATA[rmf: Ну а как сделать? пишу что то типа <br>
<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">void *memset( void *dest, int i, size_t count )</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp; &nbsp;void *dst;</div><div class="code_line">&nbsp;&nbsp; &nbsp;RtlFillMemory(dst,count,i);</div><div class="code_line">&nbsp;&nbsp; &nbsp;return dst;</div><div class="code_line">}</div></ol></div></div></div></div><br>
<br>
а он пишет  warning C4717: &#39;memset&#39; : recursive on all control paths, function will cause runtime stack overflow<br>
<br>
и что это значит? опять эта ф-ция использует memset? Как полностью замениить memset (ну и memcpy)?]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1019530</guid>
        <pubDate>Fri, 17 Feb 2006 14:04:24 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1019530</link>
        <description><![CDATA[Adil: Используй RtlFillMemory и иже с ним из kernel32.lib. Тока на одноименные макросы не нарвись :) <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2006-02-17T14:22:43+00:00">17.02.06, 14:22</time></span></span><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">#ifdef RtlFillMemory</div><div class="code_line">#undef RtlFillMemory</div><div class="code_line">#endif</div><div class="code_line">extern &quot;C&quot; NTSYSAPI VOID NTAPI RtlFillMemory ( VOID UNALIGNED *Destination,</div><div class="code_line">&nbsp;&nbsp; &nbsp;SIZE_T Length,</div><div class="code_line">&nbsp;&nbsp; &nbsp;IN BYTE &nbsp;Fill</div><div class="code_line">&nbsp;&nbsp; &nbsp;);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;char ss[10];</div><div class="code_line">&nbsp;&nbsp; &nbsp;RtlFillMemory(ss,10,0x22);</div></ol></div></div></div></div>]]></description>
        <author>Adil</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018837</guid>
        <pubDate>Thu, 16 Feb 2006 21:19:26 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018837</link>
        <description><![CDATA[Hryak: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=132521&view=findpost&p=1018794'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>rmf &#064; <time class="tag-quote__quoted-time" datetime="2006-02-16T20:21:01+00:00">16.02.06, 20:21</time></span><div class='quote '>#pragma function(memset, memcpy), угу, 2 ошибки ичесли, а что она делает?</div></div><br>
Это указание компилятору не пытаться использовать встраиваемые версии данных фукнций.<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>т.е. FillMemory это не замена memset, а всего лишь вызов memset, и надо написать свой аналог memset? правильно понял?</div></div><br>
Да.]]></description>
        <author>Hryak</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018794</guid>
        <pubDate>Thu, 16 Feb 2006 20:21:01 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018794</link>
        <description><![CDATA[rmf: #pragma function(memset, memcpy), угу, 2 ошибки ичесли, а что она делает?<br><br>FillMemory - это макрос, и раскрывающийся в memset<br>т.е. FillMemory это не замена memset, а всего лишь вызов memset, и надо написать свой аналог memset? правильно понял?]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018786</guid>
        <pubDate>Thu, 16 Feb 2006 20:09:00 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018786</link>
        <description><![CDATA[Hryak: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=132521&view=findpost&p=1018777'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>rmf &#064; <time class="tag-quote__quoted-time" datetime="2006-02-16T19:56:31+00:00">16.02.06, 19:56</time></span><div class='quote '>ну и как это объяснить? memset использует FillMemory, или наоборот?</div></div><br>
FillMemory - это макрос, и раскрывающийся в memset (совсем дырявая голова стала :( ). Вообщем, напиши целиком свои функции, благо это несложно.<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>в Delphi IDE если нажать на Ctrl и мышкой на имя ф-ции, то показывается где она объявленна и её код,  в VS такое можно? </div></div><br>
Правая кнопка - &quot;Go To Definition&quot;<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><br>
&#092;myfunc.cpp(13) : error C2169: &#39;memcpy&#39; : intrinsic function, cannot be defined<br>
&#092;myfunc.cpp(18) : error C2169: &#39;memset&#39; : intrinsic function, cannot be defined</div></div><br>
<br>
Попробуй написать:<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">#pragma function(memset, memcpy)</div></ol></div></div></div></div>]]></description>
        <author>Hryak</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018777</guid>
        <pubDate>Thu, 16 Feb 2006 19:56:31 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018777</link>
        <description><![CDATA[rmf: Хм.. вот это я сглупил, точно, можно было создать ф-ции с этми именами, <br>
но вот ещё что случилось :) <br>
теперь показывает ошибку <br>
<br>
.&#092;myprj.cpp(129) : error C3861: &#39;memset&#39;: identifier not found<br>
на строку FillMemory(recvbuffer,1024,0); <br>
(ну и на другие тоже, где используются эти ф-ции)<br>
<br>
ну и как это объяснить? memset использует FillMemory, или наоборот?<br>
<br>
в Delphi IDE если нажать на Ctrl и мышкой на имя ф-ции, то показывается где она объявленна и её код,  в VS такое можно? <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2006-02-16T20:00:44+00:00">16.02.06, 20:00</time></span></span><br>
ой, и ещё ошибки:<br>
<br>
&#092;myfunc.cpp(13) : error C2169: &#39;memcpy&#39; : intrinsic function, cannot be defined<br>
&#092;myfunc.cpp(18) : error C2169: &#39;memset&#39; : intrinsic function, cannot be defined]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018758</guid>
        <pubDate>Thu, 16 Feb 2006 19:38:47 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018758</link>
        <description><![CDATA[Hryak: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=132521&view=findpost&p=1018727'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>rmf &#064; <time class="tag-quote__quoted-time" datetime="2006-02-16T19:15:35+00:00">16.02.06, 19:15</time></span><div class='quote '><div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Значит, кто-то продолжает их юзать.</div></div><br>
Кто? в коде нету их вызова&#33;</div></div><br>
Компилятор. Вполне может memset вставить на безобидную конструкцию вроде int a[1000] = { 0 };<br>
Выход - напиши свою функцию memset и memcpy, чтобы он не волновался]]></description>
        <author>Hryak</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018727</guid>
        <pubDate>Thu, 16 Feb 2006 19:15:35 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018727</link>
        <description><![CDATA[rmf: и на асме пробовал, далье программ типа вызова нескольких апи не решился пойти, решил на си остановится&#33;<br>
<br>
угу, получаю <br>
myprj.obj : error LNK2001: unresolved external symbol _memcpy<br>
myprj.obj : error LNK2001: unresolved external symbol _memset<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Значит, кто-то продолжает их юзать.</div></div><br>
Кто? в коде нету их вызова&#33;]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018711</guid>
        <pubDate>Thu, 16 Feb 2006 19:00:50 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018711</link>
        <description><![CDATA[Hryak: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=132521&view=findpost&p=1018693'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>rmf &#064; <time class="tag-quote__quoted-time" datetime="2006-02-16T18:41:35+00:00">16.02.06, 18:41</time></span><div class='quote '><div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Сам себе геморрой и ищешь.... 6к жалко. Офигеть...</div></div><br>
Мда... наверное ты прав, но на си я перехожу из-за маленького размера, хочется пользоватся этой возможностью по полной&#33;</div></div><br>
Переходи на ассемблер - там всего будет по-полной...<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>но блин, из списка вызываемых библиотек, и ф-ций исчез только strstr&#33;&#33;&#33; хотя заменил все ф-ции&#33; в чем может быть дело? :(</div></div><br>
Значит, кто-то продолжает их юзать. /NODEFAULLIB применял?]]></description>
        <author>Hryak</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018693</guid>
        <pubDate>Thu, 16 Feb 2006 18:41:35 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018693</link>
        <description><![CDATA[rmf: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Сам себе геморрой и ищешь.... 6к жалко. Офигеть...</div></div><br>
Мда... наверное ты прав, но на си я перехожу из-за маленького размера, хочется пользоватся этой возможностью по полной&#33;<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>4 - и после замены этих ф-ций, размер останется таким какой стал? 5.5 кило,</div></div><br>
<br>
Не думаю.</div></div><br>
6 кило, кода &gt; 500 строчек&#33;, это мне кажется оочень хороший результат&#33;<br>
<br>
но блин, из списка вызываемых библиотек, и ф-ций исчез только strstr и strrchr&#33;&#33;&#33; хотя заменил все ф-ции&#33; в чем может быть дело? :( (memcpy и memsetостались, хотя ниоткуда не вызываются&#33;)]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018659</guid>
        <pubDate>Thu, 16 Feb 2006 18:02:00 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018659</link>
        <description><![CDATA[Hryak: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=132521&view=findpost&p=1018639'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>rmf &#064; <time class="tag-quote__quoted-time" datetime="2006-02-16T17:30:34+00:00">16.02.06, 17:30</time></span><div class='quote '>1 - добавление библиотеки решит проблему с возможной ошибкой у меня в коде?</div></div><br>
Нет. Её решит только отказ от /ENTRY или нахождение и удаление того, что провоцирует появление секции .crt<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>2 - memcpy, memset, strstr, strchr занимают аж целых почти 6 килобайт?</div></div><br>
Не только они. Там еще много всякой всячины.<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>3 - Есть аналоги в апи для этих ф-ций? для ф-ций типа strcpy нашел lstrcpyA и т.д., для этих чета не видел&#33;</div></div><br>
memset - FillMemory, memcpy - CopyMemory, memmove - MoveMemory<br>
strchr, strstr сам напиши или вырежи из исходников CRT<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>4 -  и после замены этих ф-ций, размер останется таким какой стал? 5.5 кило,</div></div><br>
Не думаю.<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>и исчезнет ли msvcrt80.dll</div></div><br>
Наверное, только после опции компилера /NODEFAULTLIB<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>з.ы. совсем запутался сэтим vs c++</div></div><br>
Сам себе геморрой и ищешь.... 6к жалко. Офигеть...]]></description>
        <author>Hryak</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018639</guid>
        <pubDate>Thu, 16 Feb 2006 17:30:34 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018639</link>
        <description><![CDATA[rmf: Я на си перешел не давно(с delphi), нужно один проект переписать с Делфи на Си, и не очень всё понимаю.<br><br>Насчет динамической и статической вроде немного понял. Но опять же ничего у себя в коде не нашел  :( <br>в msdn&#39;е написанно(ну и ты выше написал, не обратил внимания сначала) что можно добавить библиотеку msvcrt.lib если используешь свою точку входа, и тоже исчезнет вся эта фигня, добавил, исчезла, и даж размер уменьшился вдвое ( 11 kb -&gt; 5.5 kb ), но опять добавился этот msvcrt80.dll(опять пришел к тому, с чего начинал).<br>в списках вызываемых ф-ций есть memcpy, memset, strstr, strchr.<br><br>1 - добавление библиотеки решит проблему с возможной ошибкой у меня в коде?<br><br>2 - memcpy, memset, strstr, strchr занимают аж целых почти 6 килобайт?<br><br>3 - Есть аналоги в апи для этих ф-ций? для ф-ций типа strcpy нашел lstrcpyA и т.д., для этих чета не видел&#33;<br><br>4 -  и после замены этих ф-ций, размер останется таким какой стал? 5.5 кило, и исчезнет ли msvcrt80.dll<br><br><br>з.ы. совсем запутался сэтим vs c++]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018604</guid>
        <pubDate>Thu, 16 Feb 2006 16:34:08 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018604</link>
        <description><![CDATA[Hryak: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=132521&view=findpost&p=1018585'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>rmf &#064; <time class="tag-quote__quoted-time" datetime="2006-02-16T16:07:17+00:00">16.02.06, 16:07</time></span><div class='quote '>Ок, примерно понял в чём проблема...<br>
в строке char* g_psz = f();<br>
т.е. если при объявлении присваивать то ничего не получается</div></div><br>
Да, но не всё. Происшедшее называется динамической инициализацией (в отличие от статической, когда значение может быть посчитано на этапе компиляции/линковки и просто записано в область памяти переменной, например: char* g_psz = &quot;abc&quot;;)<br>
Грубо говоря, в данной секции и содержатся указания стартовому коду (который я отключил через /ENTRY) выполнить функцию f() и её результат присвоить переменной g_psz. Лишь после всех инициализаций стартовый код зовет main().<br>
Аналогично - с вызовами конструкторов глобальных объектов.]]></description>
        <author>Hryak</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018585</guid>
        <pubDate>Thu, 16 Feb 2006 16:07:17 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018585</link>
        <description><![CDATA[rmf: Ок, примерно понял в чём проблема...<br>в строке char* g_psz = f();<br>т.е. если при объявлении присваивать то ничего не получается, а если в коде то все ок, а как можно исправить эту ошибку? просто в коде присваивать?]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018447</guid>
        <pubDate>Thu, 16 Feb 2006 13:31:28 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018447</link>
        <description><![CDATA[Hryak: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=132521&view=findpost&p=1018415'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>rmf &#064; <time class="tag-quote__quoted-time" datetime="2006-02-16T13:05:41+00:00">16.02.06, 13:05</time></span><div class='quote '>значит у меня могут быть ошибки, и программа может вылетиеть?</div></div><br>
Именно это я и хотел сказать.<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>а что в этом коде не так?</div></div><br>
А ты скомпильни и запусти  ;) <br>
Раз ты тут не видишь, то возможно, что и у себя что-то мог пропустить...]]></description>
        <author>Hryak</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018415</guid>
        <pubDate>Thu, 16 Feb 2006 13:05:41 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1018415</link>
        <description><![CDATA[rmf: честно говоря не очень понимаю...<br>значит у меня могут быть ошибки, и программа может вылетиеть?<br><br>а что в этом коде не так?]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1017875</guid>
        <pubDate>Wed, 15 Feb 2006 21:34:15 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1017875</link>
        <description><![CDATA[Hryak: Ты убрал одно из следствий (варнинг), а не причину самого варнинга.<br>
Вот тебе пример:<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">#include &#60;windows.h&#62;</div><div class="code_line">#pragma comment(linker, &quot;/ENTRY:main&quot;)</div><div class="code_line">&nbsp;</div><div class="code_line">//#pragma comment(linker, &quot;/MERGE:.CRT=.text&quot;)</div><div class="code_line">&nbsp;</div><div class="code_line">#pragma inline_depth(0)</div><div class="code_line">const char* f()</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp; &nbsp;return &quot;abc&quot;;</div><div class="code_line">}</div><div class="code_line">const char* g_psz = f();</div><div class="code_line">int main()</div><div class="code_line">{ &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;DWORD n;</div><div class="code_line">&nbsp;&nbsp; &nbsp;WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), g_psz, 3, &amp;n, 0);</div><div class="code_line">}</div></ol></div></div></div></div><br>
При раскомментировании прагмы варнинг пропадает, однако программа от этого не начинает работать правильно.<br>
Я не гарантирую 100%, что ты столкнешься с проблемами, однако сам я не видел .crt-секций, которые можно было бы просто игнорировать без последствий.]]></description>
        <author>Hryak</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1017763</guid>
        <pubDate>Wed, 15 Feb 2006 18:57:40 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1017763</link>
        <description><![CDATA[rmf: Кароче, искал я такие места в программе, не нашел ничего подозрительного, немного подумав, ввел строчку <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">#pragma comment(linker, &quot;/MERGE:.CRT=.text&quot;)</div></ol></div></div></div></div><br>
и помогло&#33; исчези и варнинги, и секция .crt, и размер файла уменьшился на пол кило&#33;]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1014605</guid>
        <pubDate>Sun, 12 Feb 2006 18:56:31 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1014605</link>
        <description><![CDATA[Hryak: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=132521&view=findpost&p=1014603'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>rmf &#064; <time class="tag-quote__quoted-time" datetime="2006-02-12T18:52:57+00:00">12.02.06, 18:52</time></span><div class='quote '>ни одного static&#39;a в проекте нету, а всё равно этот хренов crt, чё делать?</div></div><br>
Ну, а то же самое, только на глобальном уровне (не в функциях)?<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">int x = f();</div><div class="code_line">SomeClassWithCtorOrDtorOrVTable obj;</div></ol></div></div></div></div>]]></description>
        <author>Hryak</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1014603</guid>
        <pubDate>Sun, 12 Feb 2006 18:52:57 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1014603</link>
        <description><![CDATA[rmf: ни одного static&#39;a в проекте нету, а всё равно этот хренов crt, чё делать?]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1014551</guid>
        <pubDate>Sun, 12 Feb 2006 17:55:37 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1014551</link>
        <description><![CDATA[Hryak: Написано ведь:<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Global class variable with a constructor, destructor, or virtual function table.<br>
<br>
Global variable initialized with a non-compile-time constant.</div></div><br>
<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">static int x = f();</div><div class="code_line">static SomeClassWithCtorOrDtorOrVTable obj;</div></ol></div></div></div></div>]]></description>
        <author>Hryak</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1014399</guid>
        <pubDate>Sun, 12 Feb 2006 14:15:33 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1014399</link>
        <description><![CDATA[rmf: а что такое code with static initializers? <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2006-02-12T14:16:10+00:00">12.02.06, 14:16</time></span></span><br>
Ну пример что это такое,чтобы я знал что удалять/изменять?]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1014392</guid>
        <pubDate>Sun, 12 Feb 2006 14:08:55 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1014392</link>
        <description><![CDATA[Hryak: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>MSDN</span><div class='quote '>Some code introduced static initializers or terminators, but the CRT or its equivalent (which needs to run the static initializers or terminators) isn&#39;t run when the application starts. Examples of code that would cause this: <br>
<br>
Global class variable with a constructor, destructor, or virtual function table.<br>
<br>
Global variable initialized with a non-compile-time constant.<br>
<br>
To fix this problem, do one of the following: <br>
<br>
Remove all code with static initializers.<br>
<br>
Do not use /NOENTRY. After you remove /NOENTRY, you may also have to add msvcrt.lib, libcmt.lib, or libcmtd.lib to your linker command line.<br>
<br>
Add msvcrt.lib, libcmt.lib, or libcmtd.lib to your linker command line.<br>
<br>
If your project is built with /ENTRY, and if /ENTRY is passed a function other than _DllMainCRTStartup, the function must call CRT_INIT.</div></div>]]></description>
        <author>Hryak</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1014355</guid>
        <pubDate>Sun, 12 Feb 2006 12:39:15 +0000</pubDate>
        <title>Непонятный Warning</title>
        <link>https://forum.sources.ru/index.php?showtopic=132521&amp;view=findpost&amp;p=1014355</link>
        <description><![CDATA[rmf: При компиляции, после не понятно чего ставли появлятся варнинги и ненужная секция в файле<br>
<br>
LIBCMT.lib(mathfcns.obj) : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators<br>
<br>
LIBCMT.lib(cpu_disp.obj) : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators<br>
<br>
<br>
и секция .crt, как это можно убрать? в секции .crt нету ничего нужного:<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">29A04000: B0 21 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MOV AL,21</div><div class="code_line">29A04002: A0 29 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MOV AL,[00000029]</div><div class="code_line">29A04004: 74 22 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;JZ 29A04028</div><div class="code_line">29A04006: A0 29 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MOV AL,[00000029]</div><div class="code_line">29A04008: 00 00 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ADD [EAX],AL</div><div class="code_line">29A0400A: 00 00 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ADD [EAX],AL</div></ol></div></div></div></div><br>
<br>
и ADD [EAX],AL (т.е. симв. #0) идёт ещё много раз...]]></description>
        <author>rmf</author>
        <category>Visual C++ / MFC / WTL</category>
      </item>
	
      </channel>
      </rss>
	