<?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[Registry Wert hinzufügen?]]></title><description><![CDATA[<p>Ich möchte einen in der <strong>Path</strong> Umgebungsvariable ein Programm eintragen, da aber hier schon Einträge vorhanden sind möchte ich nicht diese überschreiben. Bisher hatte ich immer folgenden Code verwendet dieser überschreibt aber den ganzen Inhalt, es soll aber nur hinzugefügt werden:</p>
<pre><code class="language-cpp">void writeValue(HKEY KEY, string place, string name, string inhalt)
	{
		HKEY hkey;

		RegCreateKey(KEY, place.c_str(), &amp;hkey); 
		RegOpenKeyEx(KEY,(LPCTSTR)place.c_str(),0, KEY_ALL_ACCESS,&amp;hkey); 
		RegSetValueEx(hkey, name.c_str(), 0, REG_SZ, (unsigned char *)inhalt.c_str(), inhalt.length());
		RegCloseKey(hkey);
	}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/179370/registry-wert-hinzufügen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Jul 2026 16:54:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/179370.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Apr 2007 21:21:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Registry Wert hinzufügen? on Fri, 20 Apr 2007 21:21:29 GMT]]></title><description><![CDATA[<p>Ich möchte einen in der <strong>Path</strong> Umgebungsvariable ein Programm eintragen, da aber hier schon Einträge vorhanden sind möchte ich nicht diese überschreiben. Bisher hatte ich immer folgenden Code verwendet dieser überschreibt aber den ganzen Inhalt, es soll aber nur hinzugefügt werden:</p>
<pre><code class="language-cpp">void writeValue(HKEY KEY, string place, string name, string inhalt)
	{
		HKEY hkey;

		RegCreateKey(KEY, place.c_str(), &amp;hkey); 
		RegOpenKeyEx(KEY,(LPCTSTR)place.c_str(),0, KEY_ALL_ACCESS,&amp;hkey); 
		RegSetValueEx(hkey, name.c_str(), 0, REG_SZ, (unsigned char *)inhalt.c_str(), inhalt.length());
		RegCloseKey(hkey);
	}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1270294</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1270294</guid><dc:creator><![CDATA[kernel64]]></dc:creator><pubDate>Fri, 20 Apr 2007 21:21:29 GMT</pubDate></item><item><title><![CDATA[Reply to Registry Wert hinzufügen? on Fri, 20 Apr 2007 21:23:01 GMT]]></title><description><![CDATA[<p>Auslesen, erweitern, Reinschreiben</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1270298</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1270298</guid><dc:creator><![CDATA[:rolleyes:]]></dc:creator><pubDate>Fri, 20 Apr 2007 21:23:01 GMT</pubDate></item><item><title><![CDATA[Reply to Registry Wert hinzufügen? on Fri, 20 Apr 2007 21:33:33 GMT]]></title><description><![CDATA[<p>So in etwa, wenn was falsch bitte sagen:</p>
<pre><code class="language-cpp">void AddValue(HKEY KEY, string path, string name, string inhalt)
		{
			RegOpenKeyEx(KEY, path,0, KEY_READ, &amp;key);
			RegQueryValueEx(key, name, NULL, &amp;dwType, (BYTE *)szString, &amp;dwSize);
			RegCloseKey(key);

			string TMP = szString;
			TMP += inhalt;

			HKEY hkey;

			RegCreateKey(KEY, place.c_str(), &amp;hkey); 
			RegOpenKeyEx(KEY,(LPCTSTR)place.c_str(),0, KEY_ALL_ACCESS,&amp;hkey); 
			RegSetValueEx(hkey, name.c_str(), 0, REG_SZ, (unsigned char *)TMP.c_str(), TMP.length());
			RegCloseKey(hkey);			

		}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1270302</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1270302</guid><dc:creator><![CDATA[kernel64]]></dc:creator><pubDate>Fri, 20 Apr 2007 21:33:33 GMT</pubDate></item></channel></rss>