<?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]]></title><description><![CDATA[<p>Wie kann ich eine meber Variable in der Registry Speichern und nach programm neustart diese autom. auslesen lassen ?</p>
<p>hab das zum speichern gefunden:</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>wo definier ich den CRegKey ?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/80084/registry</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 14:49:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/80084.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 Jul 2004 10:16:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Registry on Sat, 17 Jul 2004 10:17:57 GMT]]></title><description><![CDATA[<p>Wie kann ich eine meber Variable in der Registry Speichern und nach programm neustart diese autom. auslesen lassen ?</p>
<p>hab das zum speichern gefunden:</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>wo definier ich den CRegKey ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/562605</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/562605</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 17 Jul 2004 10:17:57 GMT</pubDate></item><item><title><![CDATA[Reply to Registry on Sat, 17 Jul 2004 11:14:52 GMT]]></title><description><![CDATA[<p>Speichern kannst du deine Member Variable so:</p>
<pre><code>HKEY hKey; 
   RegCreateKeyEx(HKEY_LOCAL_MACHINE,&quot;Software\\Zielwasser\\Settings&quot;,0,0,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&amp;hKey,0); 

char String[50] = &quot;&quot;; 
strcpy (String,m_Var); 

RegSetValueEx(hKey,&quot;Test&quot;,0,REG_SZ,(CONST BYTE*)String, strlen(String)+1); 
RegCloseKey(hKey);
</code></pre>
<p>So wird in dem Key Test Alles reingeschrieben was in m_Var steht!</p>
<p>Und auslesen kannst du den Key so:</p>
<pre><code>HKEY hKey; 
   RegCreateKeyEx(HKEY_LOCAL_MACHINE,&quot;Software\\Zielwasser\\Settings&quot;,0,0,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&amp;hKey,0); 

DWORD dwData = 256; 
BYTE cDaten[256] = &quot;&quot;; 
RegQueryValueEx(hKey,&quot;Test&quot;,0,0,cDaten,&amp;dwData);

RegCloseKey(hKey);
</code></pre>
<p>in cDaten steht jetzt der gesamte Inhalt des Key`s Test !</p>
<p>Gruß<br />
:: NoName ::</p>
]]></description><link>https://www.c-plusplus.net/forum/post/562639</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/562639</guid><dc:creator><![CDATA[__NoName__]]></dc:creator><pubDate>Sat, 17 Jul 2004 11:14:52 GMT</pubDate></item><item><title><![CDATA[Reply to Registry on Sat, 17 Jul 2004 11:31:39 GMT]]></title><description><![CDATA[<p>folgende fehlermeldung kommt:</p>
<p>error C2664: 'strcpy' : Konvertierung des Parameters 2 von 'long' in 'const char *' nicht moeglich</p>
]]></description><link>https://www.c-plusplus.net/forum/post/562645</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/562645</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 17 Jul 2004 11:31:39 GMT</pubDate></item><item><title><![CDATA[Reply to Registry on Sat, 17 Jul 2004 12:26:50 GMT]]></title><description><![CDATA[<p>Ist deine Member-Variable die du verwendest eine CString ???</p>
<p>Gruß<br />
:: NoName ::</p>
]]></description><link>https://www.c-plusplus.net/forum/post/562670</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/562670</guid><dc:creator><![CDATA[__NoName__]]></dc:creator><pubDate>Sat, 17 Jul 2004 12:26:50 GMT</pubDate></item><item><title><![CDATA[Reply to Registry on Sat, 17 Jul 2004 13:41:02 GMT]]></title><description><![CDATA[<p>die ist long</p>
]]></description><link>https://www.c-plusplus.net/forum/post/562700</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/562700</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 17 Jul 2004 13:41:02 GMT</pubDate></item><item><title><![CDATA[Reply to Registry on Sat, 17 Jul 2004 13:56:12 GMT]]></title><description><![CDATA[<p>hmm, leider funktioniert das nur mit CString`s !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/562707</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/562707</guid><dc:creator><![CDATA[__NoName__]]></dc:creator><pubDate>Sat, 17 Jul 2004 13:56:12 GMT</pubDate></item><item><title><![CDATA[Reply to Registry on Sun, 18 Jul 2004 13:38:04 GMT]]></title><description><![CDATA[<p>kann mir keiner helfen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/563135</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/563135</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 18 Jul 2004 13:38:04 GMT</pubDate></item><item><title><![CDATA[Reply to Registry on Sun, 18 Jul 2004 14:18:49 GMT]]></title><description><![CDATA[<p>Kommt die Fehlermeldung bei dem Code fürs Eintrage in die Registry oder fürs Auslesen aus der Registry?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/563158</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/563158</guid><dc:creator><![CDATA[Max M.]]></dc:creator><pubDate>Sun, 18 Jul 2004 14:18:49 GMT</pubDate></item><item><title><![CDATA[Reply to Registry on Sun, 18 Jul 2004 17:04:50 GMT]]></title><description><![CDATA[<p>beim eintragen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/563255</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/563255</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 18 Jul 2004 17:04:50 GMT</pubDate></item><item><title><![CDATA[Reply to Registry on Mon, 19 Jul 2004 05:29:50 GMT]]></title><description><![CDATA[<p>Wenn du einen long hast un einen CString bzw const *char brauchst dann mach dir einen draus.</p>
<p>Strichwort:</p>
<p>CString-&gt;Format</p>
]]></description><link>https://www.c-plusplus.net/forum/post/563459</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/563459</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Mon, 19 Jul 2004 05:29:50 GMT</pubDate></item></channel></rss>