<?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 mit Klasse CRegKey]]></title><description><![CDATA[<p>also ich hab mehrere long variabeln die ich in der registry gespeichert haben möchte und die nach starten des programmes autom. aufgerufen werden.</p>
<p>kann mir einer erklären wie das richtig funzt ?</p>
<p>zum schreiben hab ich diesen code verwendet</p>
<pre><code>UpdateData(true); 

    CRegKey key; 
    key.Create(HKEY_LOCAL_MACHINE, &quot;Software\\Zielwasser\\Settings&quot;); 
    key.SetValue(m_pos1h, &quot;1h&quot;); 

    key.Close();
</code></pre>
<p>ich hab dann noch ein #include &lt;atlbase.h&gt; in die StdAfx.h reingeschrieben, aber est tut sich nix in der registry. ich hab mit sicherheit was ganz entscheidenes vergessen</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/80347/registry-mit-klasse-cregkey</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 23:23:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/80347.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 20 Jul 2004 12:47:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Registry mit Klasse CRegKey on Tue, 20 Jul 2004 12:47:41 GMT]]></title><description><![CDATA[<p>also ich hab mehrere long variabeln die ich in der registry gespeichert haben möchte und die nach starten des programmes autom. aufgerufen werden.</p>
<p>kann mir einer erklären wie das richtig funzt ?</p>
<p>zum schreiben hab ich diesen code verwendet</p>
<pre><code>UpdateData(true); 

    CRegKey key; 
    key.Create(HKEY_LOCAL_MACHINE, &quot;Software\\Zielwasser\\Settings&quot;); 
    key.SetValue(m_pos1h, &quot;1h&quot;); 

    key.Close();
</code></pre>
<p>ich hab dann noch ein #include &lt;atlbase.h&gt; in die StdAfx.h reingeschrieben, aber est tut sich nix in der registry. ich hab mit sicherheit was ganz entscheidenes vergessen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564425</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564425</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 20 Jul 2004 12:47:41 GMT</pubDate></item><item><title><![CDATA[Reply to Registry mit Klasse CRegKey on Tue, 20 Jul 2004 13:00:51 GMT]]></title><description><![CDATA[<p>bei mir gehts so:</p>
<pre><code>long AIT_Registry::InitKey(HKEY BaseKey, CString path)
{
	//Variables
	///////////
	DWORD Disposition;

	if(RegCreateKeyEx(BaseKey,path,0,NULL,REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &amp;hRegKey, &amp;Disposition) != ERROR_SUCCESS)
	{
		return -1; // Key could not be created or opened
	}
	else
	{
		return 0; // success
	}
}
</code></pre>
<pre><code>long AIT_Registry::SetKeyValueStr(HKEY BaseKey, CString path, CString RegistryKey, BYTE* value, DWORD length,INT regValue)
{
	if(RegKey.Open(BaseKey, path) != ERROR_SUCCESS)
	{
		return -1; // could not open the key
	}
	else
	{
		RegSetValueEx(hRegKey,RegistryKey,0,regValue,value,length);
		RegKey.Close();
		return 0; // success
	}
}
</code></pre>
<p>kann mir mal jemand sagen, wie man überprüft ob ein wert in der registry gesetzt ist? ich will nicht beim ersten mal auslesen sinnlose zeichen bekommen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564434</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564434</guid><dc:creator><![CDATA[- enForcer -]]></dc:creator><pubDate>Tue, 20 Jul 2004 13:00:51 GMT</pubDate></item><item><title><![CDATA[Reply to Registry mit Klasse CRegKey on Tue, 20 Jul 2004 14:24:07 GMT]]></title><description><![CDATA[<p>mit CRegKey ist das sinnvoller als mit HKey.</p>
<p>kann mir wer heldfen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564529</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564529</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 20 Jul 2004 14:24:07 GMT</pubDate></item><item><title><![CDATA[Reply to Registry mit Klasse CRegKey on Tue, 20 Jul 2004 14:26:31 GMT]]></title><description><![CDATA[<p>die variable RegKey ist bei mir vom typ cregkey</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564533</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564533</guid><dc:creator><![CDATA[- enForcer -]]></dc:creator><pubDate>Tue, 20 Jul 2004 14:26:31 GMT</pubDate></item><item><title><![CDATA[Reply to Registry mit Klasse CRegKey on Tue, 20 Jul 2004 17:18:17 GMT]]></title><description><![CDATA[<p>muss aber auch mit meinem code oben gehen. weiss nur nicht ob ich was im klassenassistent vergessen habe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564630</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564630</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 20 Jul 2004 17:18:17 GMT</pubDate></item><item><title><![CDATA[Reply to Registry mit Klasse CRegKey on Tue, 20 Jul 2004 19:08:08 GMT]]></title><description><![CDATA[<p>möööp habs hinbekommen</p>
<p>fehlte noch ein saveconfig <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/564696</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564696</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 20 Jul 2004 19:08:08 GMT</pubDate></item><item><title><![CDATA[Reply to Registry mit Klasse CRegKey on Tue, 20 Jul 2004 19:59:34 GMT]]></title><description><![CDATA[<p>freut mich für dich. kann mir da vielleicht noch jemand helfen?</p>
<ul>
<li>enForcer - schrieb:</li>
</ul>
<blockquote>
<p>kann mir mal jemand sagen, wie man überprüft ob ein wert in der registry gesetzt ist? ich will nicht beim ersten mal auslesen sinnlose zeichen bekommen.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/564730</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564730</guid><dc:creator><![CDATA[- enForcer -]]></dc:creator><pubDate>Tue, 20 Jul 2004 19:59:34 GMT</pubDate></item><item><title><![CDATA[Reply to Registry mit Klasse CRegKey on Tue, 20 Jul 2004 21:09:06 GMT]]></title><description><![CDATA[<p>also du hast den wert in die registry schon reingeschrieben und willst sie nun auslesen ? oder wie meinst du das ? wie meinst du das mit sinnlosen zeichen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564765</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564765</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 20 Jul 2004 21:09:06 GMT</pubDate></item><item><title><![CDATA[Reply to Registry mit Klasse CRegKey on Wed, 21 Jul 2004 05:45:08 GMT]]></title><description><![CDATA[<p>ich hab einen config-dialog und der liest die werte aus der registry aus. wenn da aber noch keine werte stehen, bekomme ich irgendwelche ascii-zeichen zurück. ich wollte nur wissen, wie man überprüft, ob eine variable in der registry schon angelegt wurde oder nicht</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564854</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564854</guid><dc:creator><![CDATA[- enf...]]></dc:creator><pubDate>Wed, 21 Jul 2004 05:45:08 GMT</pubDate></item><item><title><![CDATA[Reply to Registry mit Klasse CRegKey on Thu, 22 Jul 2004 21:50:51 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>die entsprechende Funktion (RegQueryValueEx) wird dann schon einen Fehler zurückliefern, wenn der Eintrag nicht existiert.</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/566436</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/566436</guid><dc:creator><![CDATA[Probe-Nutzer]]></dc:creator><pubDate>Thu, 22 Jul 2004 21:50:51 GMT</pubDate></item></channel></rss>