<?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=331933&amp;view=findpost&amp;p=2897233</guid>
        <pubDate>Thu, 19 May 2011 12:17:12 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897233</link>
        <description><![CDATA[NOCaut: Разобрался спасиб]]></description>
        <author>NOCaut</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897217</guid>
        <pubDate>Thu, 19 May 2011 11:59:02 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897217</link>
        <description><![CDATA[popsa: результаты возврата функций RegOpenKeyEx и RegQueryValueExW надо проверять.<br>Отладчиком пройдись да посмотри, что на самом деле кладется в твой буфер]]></description>
        <author>popsa</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897206</guid>
        <pubDate>Thu, 19 May 2011 11:43:33 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897206</link>
        <description><![CDATA[NOCaut: <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">void mmm()</div><div class="code_line">{</div><div class="code_line">HKEY hkSub = NULL; &nbsp; &nbsp;</div><div class="code_line">wchar_t buff[80]; &nbsp; &nbsp;</div><div class="code_line">DWORD dwMaxValueLen = sizeof(buff); &nbsp; &nbsp;</div><div class="code_line">// получить строку из реестра </div><div class="code_line">RegOpenKeyEx(HKEY_CURRENT_USER,_TEXT(&quot;Software\My Key&quot;),0, KEY_QUERY_VALUE | KEY_READ ,&amp;hkSub);</div><div class="code_line">RegQueryValueExW( hkSub, L&quot;FolderPath&quot;,NULL, NULL, (LPBYTE) buff, &amp;dwMaxValueLen);</div><div class="code_line">MessageBox(0,buff,L&quot;&quot;,0);</div><div class="code_line">}</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>NOCaut</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897144</guid>
        <pubDate>Thu, 19 May 2011 10:30:36 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897144</link>
        <description><![CDATA[NOCaut: Я про то что к  str неможна примерить -&gt;append.]]></description>
        <author>NOCaut</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897134</guid>
        <pubDate>Thu, 19 May 2011 10:25:11 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897134</link>
        <description><![CDATA[B.V.: buff является аналогом твоего wchar_t string[255]]]></description>
        <author>B.V.</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897094</guid>
        <pubDate>Thu, 19 May 2011 09:48:38 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897094</link>
        <description><![CDATA[NOCaut: Незнаю чем ето заменить:<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">long GetKeyValue(LPCWSTR str) {</div><div class="code_line">&nbsp;&nbsp;str-&#62;append((const WCHAR *)buff, (dwBuffLen / sizeof(WCHAR)));</div></ol></div></div></div></div> <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="2011-05-19T09:50:21+00:00">19.05.11, 09:50</time></span></span><br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Строка STL. Следующий вопрос по основам приведет к закрытию темы</div></div> Больше не буду ;) <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="2011-05-19T10:05:56+00:00">19.05.11, 10:05</time></span></span><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">&nbsp;&nbsp;str-&#62;append((const WCHAR *)buff, (dwBuffLen / sizeof(WCHAR)));</div></ol></div></div></div></div>]]></description>
        <author>NOCaut</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897093</guid>
        <pubDate>Thu, 19 May 2011 09:47:38 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897093</link>
        <description><![CDATA[B.V.: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=331933&view=findpost&p=2897069'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>NOCaut &#064; <time class="tag-quote__quoted-time" datetime="2011-05-19T09:21:05+00:00">19.05.11, 09:21</time></span><div class='quote '>Что ето за тип? </div></div><br>
Строка STL. Следующий вопрос по основам приведет к закрытию темы]]></description>
        <author>B.V.</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897086</guid>
        <pubDate>Thu, 19 May 2011 09:42:57 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897086</link>
        <description><![CDATA[Dem_max: в чем проблема заменить char на WCHAR ???????????]]></description>
        <author>Dem_max</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897077</guid>
        <pubDate>Thu, 19 May 2011 09:27:27 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897077</link>
        <description><![CDATA[NOCaut: Я использую одни типи а мне постоянно пишут какието новие типи незнакомие мне... И ето бил риторический вопрос) ммне нада WCHAR.<br><br>И я вобще непонимаю кто пишет без юникода сечас  :blink:]]></description>
        <author>NOCaut</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897072</guid>
        <pubDate>Thu, 19 May 2011 09:24:09 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897072</link>
        <description><![CDATA[trainer: тебя уже пора банить за систематическое игнорирование рекомендации почитать литературу по C/C++]]></description>
        <author>trainer</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897069</guid>
        <pubDate>Thu, 19 May 2011 09:21:05 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897069</link>
        <description><![CDATA[NOCaut: Что ето за тип? <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">typedef std::basic_string&#60;TCHAR&#62; tstring;</div></ol></div></div></div></div><br>
<br>
он будет работать с юникодом?]]></description>
        <author>NOCaut</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897056</guid>
        <pubDate>Thu, 19 May 2011 09:09:43 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897056</link>
        <description><![CDATA[popsa: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>return  _itow(*cData, string, 10);//у меня 1</div></div><br>
что ты хочешь сделать этой строчкой? полнейший бред.<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">typedef std::basic_string&#60;TCHAR&#62; tstring;</div><div class="code_line">long GetKeyValue(tstring *str) {</div><div class="code_line">&nbsp;&nbsp; &nbsp;long result = -1;</div><div class="code_line">&nbsp;&nbsp; &nbsp;HKEY hKey;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT(&quot;SOFTWARE\Microsoft\NetSh&quot;), NULL, KEY_READ, &amp;hKey) == ERROR_SUCCESS) { &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;BYTE buff[512];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;DWORD dwBuffLen = sizeof(buff); &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if(RegQueryValueEx(hKey, TEXT(&quot;rpc&quot;), NULL, NULL, buff, &amp;dwBuffLen) == ERROR_SUCCESS) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;str-&#62;append((const TCHAR *)buff, (dwBuffLen / sizeof(TCHAR))); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;result = 0L;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;RegCloseKey(hKey); &nbsp; &nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;&nbsp; &nbsp;return result;</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">//========================================================================</div><div class="code_line">int _tmain(int argc, _TCHAR* argv[])</div><div class="code_line">{</div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;tstring str;</div><div class="code_line">&nbsp;&nbsp; &nbsp;if(GetKeyValue(&amp;str) == 0L) {</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// считали</div><div class="code_line">&nbsp;&nbsp; &nbsp;} &nbsp; &nbsp; &nbsp; </div><div class="code_line">&nbsp;&nbsp; &nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;return 0;</div><div class="code_line">}</div></ol></div></div></div></div>]]></description>
        <author>popsa</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897033</guid>
        <pubDate>Thu, 19 May 2011 08:32:54 +0000</pubDate>
        <title>Как прочитать строку с реестра?</title>
        <link>https://forum.sources.ru/index.php?showtopic=331933&amp;view=findpost&amp;p=2897033</link>
        <description><![CDATA[NOCaut: Как прочитать строку с реестра?<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">wchar_t* GetFolderPath()</div><div class="code_line">{</div><div class="code_line">//Получаем значение параметра</div><div class="code_line">&nbsp;unsigned wchar_t cData[255]={0};</div><div class="code_line">&nbsp;DWORD BuffLen = sizeof cData;</div><div class="code_line">&nbsp;wchar_t string[255]={0};</div><div class="code_line">&nbsp;HKEY hKey;</div><div class="code_line">&nbsp;&nbsp;</div><div class="code_line">//Открываем ключ реестра</div><div class="code_line">&nbsp;if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, L&quot;SOFTWARE\My_Key&quot;, NULL, KEY_READ, &amp;hKey) == ERROR_SUCCESS)</div><div class="code_line">&nbsp;&nbsp; RegQueryValueEx(hKey, TEXT(&quot;FolderPath&quot;), NULL, NULL, (LPBYTE)cData, &amp;BuffLen);</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;return &nbsp;_itow(*cData, string, 10);</div><div class="code_line">&nbsp;//Закрываем ключ реестра</div><div class="code_line">&nbsp;RegCloseKey(hKey);</div><div class="code_line">&nbsp;</div><div class="code_line">}</div></ol></div></div></div></div>]]></description>
        <author>NOCaut</author>
        <category>C/C++: Системное программирование и WinAPI</category>
      </item>
	
      </channel>
      </rss>
	