<?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 Key lässt sich nicht löschen]]></title><description><![CDATA[<p>hallo zusammen,</p>
<p>ich übe mich gerade ide registry näher zu verstehen. einen schlüssel zu erstellen klappt wunderbar. leider bekomme ich diesen nicht wieder gelöscht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>vielleicht kann mir jemand sagen wo der fehler bei mir liegt:</p>
<pre><code>void __fastcall Tfrm_main::FormClose(TObject *Sender, TCloseAction &amp;Action)
{
	if(chk_auto-&gt;Checked)
	{
		HKEY hkey;
		HKEY KEY = HKEY_LOCAL_MACHINE;
		char place[100]= {&quot;Software\\Microsoft\\Windows\\CurrentVersion\\Run&quot;};
		char name[100]= {&quot;TimeSync&quot;};
		AnsiString pfad = Application-&gt;ExeName;
		char *value = new char[pfad.Length()+1];
		strcpy(value, pfad.c_str());

		RegOpenKeyEx(KEY,(LPCTSTR)place,0, KEY_ALL_ACCESS,&amp;hkey);
		RegSetValueEx(hkey, name, 0, REG_SZ, (BYTE *)value, strlen(value));
		RegCloseKey(hkey);
		return ;
	}
	else
	{
		HKEY hkey;
		HKEY KEY = HKEY_LOCAL_MACHINE;
		char place[100]= {&quot;Software\\Microsoft\\Windows\\CurrentVersion\\Run\\TimeSync&quot;};
		RegOpenKeyEx(KEY,(LPCTSTR)place,0, DELETE,&amp;hkey);
		RegDeleteKey(hkey,(LPCTSTR)place);
		RegCloseKey(hkey);
		return ;
	}
}
</code></pre>
<p>danke für eure mühen</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/154263/registry-key-lässt-sich-nicht-löschen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 09 Aug 2026 10:49:14 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/154263.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 25 Jul 2006 18:47:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Registry Key lässt sich nicht löschen on Tue, 25 Jul 2006 18:47:32 GMT]]></title><description><![CDATA[<p>hallo zusammen,</p>
<p>ich übe mich gerade ide registry näher zu verstehen. einen schlüssel zu erstellen klappt wunderbar. leider bekomme ich diesen nicht wieder gelöscht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>vielleicht kann mir jemand sagen wo der fehler bei mir liegt:</p>
<pre><code>void __fastcall Tfrm_main::FormClose(TObject *Sender, TCloseAction &amp;Action)
{
	if(chk_auto-&gt;Checked)
	{
		HKEY hkey;
		HKEY KEY = HKEY_LOCAL_MACHINE;
		char place[100]= {&quot;Software\\Microsoft\\Windows\\CurrentVersion\\Run&quot;};
		char name[100]= {&quot;TimeSync&quot;};
		AnsiString pfad = Application-&gt;ExeName;
		char *value = new char[pfad.Length()+1];
		strcpy(value, pfad.c_str());

		RegOpenKeyEx(KEY,(LPCTSTR)place,0, KEY_ALL_ACCESS,&amp;hkey);
		RegSetValueEx(hkey, name, 0, REG_SZ, (BYTE *)value, strlen(value));
		RegCloseKey(hkey);
		return ;
	}
	else
	{
		HKEY hkey;
		HKEY KEY = HKEY_LOCAL_MACHINE;
		char place[100]= {&quot;Software\\Microsoft\\Windows\\CurrentVersion\\Run\\TimeSync&quot;};
		RegOpenKeyEx(KEY,(LPCTSTR)place,0, DELETE,&amp;hkey);
		RegDeleteKey(hkey,(LPCTSTR)place);
		RegCloseKey(hkey);
		return ;
	}
}
</code></pre>
<p>danke für eure mühen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1104083</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1104083</guid><dc:creator><![CDATA[Avalon]]></dc:creator><pubDate>Tue, 25 Jul 2006 18:47:32 GMT</pubDate></item><item><title><![CDATA[Reply to Registry Key lässt sich nicht löschen on Tue, 25 Jul 2006 18:50:02 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>da du hier im Builder-Forum postest, schau dir in der BCB-Hilfe <em>TRegistry</em> an</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1104086</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1104086</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 25 Jul 2006 18:50:02 GMT</pubDate></item><item><title><![CDATA[Reply to Registry Key lässt sich nicht löschen on Tue, 25 Jul 2006 19:59:20 GMT]]></title><description><![CDATA[<p>hi akari,</p>
<p>hat sich nun erledigt. man sollte auch wissen was man löschen will, dann funzt es auch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> DeleteValue war das zauberwort <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>bin wohl heute schon zu lange dran :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1104154</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1104154</guid><dc:creator><![CDATA[Avalon]]></dc:creator><pubDate>Tue, 25 Jul 2006 19:59:20 GMT</pubDate></item></channel></rss>