<?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[Regkey anlegen, funzt nicht]]></title><description><![CDATA[<p>Hi, warum funzt das nicht? Fehler:<br />
error C2664: 'RegCreateKeyA' : cannot convert parameter 1 from 'char *' to 'struct HKEY__ *'<br />
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast</p>
<p>versteh ioch nicht...</p>
<pre><code class="language-cpp">void main(void)
{
	createKey(&quot;HKEY_CURRENT_USER&quot;, &quot;Software\\retrobla&quot;);
}

bool createKey(char *a, char *path)
{
	// ------------------------

// Create a key in registry
	// ------------------------

	unsigned char reg[10] = &quot;blabla&quot;;

	HKEY hKey;
	RegCreateKey(a,path,&amp;hKey);

	RegSetValueEx(hKey,&quot;blubb&quot;,0,REG_SZ,reg,sizeof(reg));
	RegCloseKey(hKey);

	return true;
}
</code></pre>
<p>mfg steppen</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/75343/regkey-anlegen-funzt-nicht</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 01:08:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/75343.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 30 May 2004 14:46:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Regkey anlegen, funzt nicht on Sun, 30 May 2004 14:46:00 GMT]]></title><description><![CDATA[<p>Hi, warum funzt das nicht? Fehler:<br />
error C2664: 'RegCreateKeyA' : cannot convert parameter 1 from 'char *' to 'struct HKEY__ *'<br />
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast</p>
<p>versteh ioch nicht...</p>
<pre><code class="language-cpp">void main(void)
{
	createKey(&quot;HKEY_CURRENT_USER&quot;, &quot;Software\\retrobla&quot;);
}

bool createKey(char *a, char *path)
{
	// ------------------------

// Create a key in registry
	// ------------------------

	unsigned char reg[10] = &quot;blabla&quot;;

	HKEY hKey;
	RegCreateKey(a,path,&amp;hKey);

	RegSetValueEx(hKey,&quot;blubb&quot;,0,REG_SZ,reg,sizeof(reg));
	RegCloseKey(hKey);

	return true;
}
</code></pre>
<p>mfg steppen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/529840</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/529840</guid><dc:creator><![CDATA[Steppen]]></dc:creator><pubDate>Sun, 30 May 2004 14:46:00 GMT</pubDate></item><item><title><![CDATA[Reply to Regkey anlegen, funzt nicht on Sun, 30 May 2004 14:55:46 GMT]]></title><description><![CDATA[<p>weil die Funktion anders aussieht:<br />
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/regcreatekey.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/regcreatekey.asp</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/529843</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/529843</guid><dc:creator><![CDATA[DrGreenthumb]]></dc:creator><pubDate>Sun, 30 May 2004 14:55:46 GMT</pubDate></item><item><title><![CDATA[Reply to Regkey anlegen, funzt nicht on Sun, 30 May 2004 15:05:35 GMT]]></title><description><![CDATA[<p>Im WinApi-Forum hättest du bestimmt bessere Aussicht auf Unterstützung. <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="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/529849</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/529849</guid><dc:creator><![CDATA[Crashcourt]]></dc:creator><pubDate>Sun, 30 May 2004 15:05:35 GMT</pubDate></item><item><title><![CDATA[Reply to Regkey anlegen, funzt nicht on Sun, 30 May 2004 15:07:24 GMT]]></title><description><![CDATA[<p>Crashcourt schrieb:</p>
<blockquote>
<p>Im WinApi-Forum hättest du bestimmt bessere Aussicht auf Unterstützung. <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="😉"
    /></p>
</blockquote>
<p>Vielleicht. In dem Fall mangelts aber eher an den absoluten Grundlagen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/529851</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/529851</guid><dc:creator><![CDATA[DrGreenthumb]]></dc:creator><pubDate>Sun, 30 May 2004 15:07:24 GMT</pubDate></item><item><title><![CDATA[Reply to Regkey anlegen, funzt nicht on Sun, 30 May 2004 15:26:17 GMT]]></title><description><![CDATA[<p>Allerdings, ich komme nicht wirklich mit, leider gibts auf der Seite kein Beispiel.</p>
<p>Außerdem:<br />
Note This function is provided only for compatibility with 16-bit versions of Windows.<br />
Würde doch heissen, dass die Funktion unter XP versagt?</p>
<p>P.S.<br />
ich habe sehr große Probleme vernünftig in C++ einzusteigen, weil mir irgendwie die Übersicht fehlt. Ich hab zwar ein C++ Buch, aber das kann ich vergessen.</p>
<p>Könnt ihr mir nicht ganz kurz die Funktion richtig zusammensetzen? Viel kann da ja nicht falsch sein. Es ist wesentlich leichter für mich an bestehenden Beispielen zu lernen..</p>
<p>mfg und danke<br />
steppen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/529864</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/529864</guid><dc:creator><![CDATA[Steppen]]></dc:creator><pubDate>Sun, 30 May 2004 15:26:17 GMT</pubDate></item><item><title><![CDATA[Reply to Regkey anlegen, funzt nicht on Sun, 30 May 2004 21:29:00 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=4" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/530017</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/530017</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sun, 30 May 2004 21:29:00 GMT</pubDate></item><item><title><![CDATA[Reply to Regkey anlegen, funzt nicht on Mon, 31 May 2004 07:43:08 GMT]]></title><description><![CDATA[<p>HKEY_CURRENT_USER ist eine Konstante - also nicht in &quot;&quot; setzen.</p>
<p>Ansonsten: <a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39373" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic.php?t=39373</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/530079</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/530079</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 31 May 2004 07:43:08 GMT</pubDate></item></channel></rss>