<?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 auslesen]]></title><description><![CDATA[<p>ich möchte aus der registry auslesen, wo programm XY hininstalliert ist, dies steht in der registry unter: HKEY_LOCAL_MACHINE\SOFTWARE\(Firma)\(Software) im Schlüssel &quot;InstallationDirectory&quot;</p>
<p>folgendes habe ich programmiert, leider funktioniert es nicht so wie es soll. er erkennt zwar die länge des strings, list aber nicht den string selber ein.</p>
<pre><code>HKEY hKey = NULL;
	char* pBuffer = (char*) malloc(1024);
	unsigned long nLength = 0;

	char *temp = (char*) malloc(1024);

	if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, &quot;SOFTWARE\\(Firma)\\(Software)&quot;, NULL, KEY_EXECUTE, &amp;hKey) == ERROR_SUCCESS)
	{
		DWORD dwError = RegQueryValueEx(hKey, &quot;InstallationDirectory&quot; , NULL, NULL, (PUCHAR)pBuffer, &amp;nLength);

		if (hKey)
			RegCloseKey(hKey);
	}

	strcpy(temp, (char*)pBuffer);
	printf(temp);
</code></pre>
<p>ich habe auch bereits den halben tag das i-net, dieses forum und msdn durchsucht, woran es liegen kann, hab aber nichts gefunden.</p>
<p>ich freue mich auf hilfestellungen jeder art.</p>
<p>LordMogli</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/82237/registry-auslesen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 05:08:55 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/82237.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 09 Aug 2004 15:09:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Registry auslesen on Mon, 09 Aug 2004 15:09:44 GMT]]></title><description><![CDATA[<p>ich möchte aus der registry auslesen, wo programm XY hininstalliert ist, dies steht in der registry unter: HKEY_LOCAL_MACHINE\SOFTWARE\(Firma)\(Software) im Schlüssel &quot;InstallationDirectory&quot;</p>
<p>folgendes habe ich programmiert, leider funktioniert es nicht so wie es soll. er erkennt zwar die länge des strings, list aber nicht den string selber ein.</p>
<pre><code>HKEY hKey = NULL;
	char* pBuffer = (char*) malloc(1024);
	unsigned long nLength = 0;

	char *temp = (char*) malloc(1024);

	if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, &quot;SOFTWARE\\(Firma)\\(Software)&quot;, NULL, KEY_EXECUTE, &amp;hKey) == ERROR_SUCCESS)
	{
		DWORD dwError = RegQueryValueEx(hKey, &quot;InstallationDirectory&quot; , NULL, NULL, (PUCHAR)pBuffer, &amp;nLength);

		if (hKey)
			RegCloseKey(hKey);
	}

	strcpy(temp, (char*)pBuffer);
	printf(temp);
</code></pre>
<p>ich habe auch bereits den halben tag das i-net, dieses forum und msdn durchsucht, woran es liegen kann, hab aber nichts gefunden.</p>
<p>ich freue mich auf hilfestellungen jeder art.</p>
<p>LordMogli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/578447</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/578447</guid><dc:creator><![CDATA[LordMogli]]></dc:creator><pubDate>Mon, 09 Aug 2004 15:09:44 GMT</pubDate></item><item><title><![CDATA[Reply to Registry auslesen on Mon, 09 Aug 2004 21:07:55 GMT]]></title><description><![CDATA[<p>wenn ich dich richtig verstanden habe dann willst du einen string aus der registry auslesen, den du eingibst. nur es funktioniert nicht bei dir</p>
<p>habe mir mal ne klasse geschrieben, in der ich es so gemacht habe:</p>
<pre><code class="language-cpp">#include &quot;registry.h&quot;

CRegistry Registry;

CString ReadCString(HKEY hHKEY, CString cPath, CString cKey, CString cDeafaltValue)
{
	CString cReturnValue;
	char	cbBuffer_long[355];

	if (Registry.Open(hHKEY, cPath))
	{
		Registry.ReadString(cKey, cbBuffer_long, 355);
		cReturnValue = cbBuffer_long;
	}

	if (cReturnValue != &quot;&quot;)
		return(cReturnValue);
	else
		return (cDeafaltValue);
}
</code></pre>
<p>guck mal auf <a href="http://gayfiles.de" rel="nofollow">gayfiles.de</a> nach CRegistryOperations, da hab ich die ganze klasse und da steht auch die registry.h drin (hoffe habe die aktuelle version hochgeladen ;))</p>
]]></description><link>https://www.c-plusplus.net/forum/post/578644</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/578644</guid><dc:creator><![CDATA[Red Skall]]></dc:creator><pubDate>Mon, 09 Aug 2004 21:07:55 GMT</pubDate></item><item><title><![CDATA[Reply to Registry auslesen on Mon, 09 Aug 2004 21:20:45 GMT]]></title><description><![CDATA[<p>Red Skall schrieb:</p>
<blockquote>
<p>guck mal auf <a href="http://gayfiles.de" rel="nofollow">gayfiles.de</a></p>
</blockquote>
<p>huh?<br />
die seite hat aber nicht viel mit &quot;gay&quot; zu tun <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/578656</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/578656</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Mon, 09 Aug 2004 21:20:45 GMT</pubDate></item><item><title><![CDATA[Reply to Registry auslesen on Tue, 10 Aug 2004 04:51:24 GMT]]></title><description><![CDATA[<p>ja, ne !? ;):D</p>
]]></description><link>https://www.c-plusplus.net/forum/post/578723</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/578723</guid><dc:creator><![CDATA[Red Skall]]></dc:creator><pubDate>Tue, 10 Aug 2004 04:51:24 GMT</pubDate></item><item><title><![CDATA[Reply to Registry auslesen on Tue, 10 Aug 2004 07:41:47 GMT]]></title><description><![CDATA[<p>Danke wird mir bestimmt weiterhelfen, werds gleich mal ausprobieren</p>
]]></description><link>https://www.c-plusplus.net/forum/post/578768</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/578768</guid><dc:creator><![CDATA[LordMogli]]></dc:creator><pubDate>Tue, 10 Aug 2004 07:41:47 GMT</pubDate></item><item><title><![CDATA[Reply to Registry auslesen on Tue, 10 Aug 2004 10:29:31 GMT]]></title><description><![CDATA[<p>danke an alle die mir geholfen haben, das auslesen funktioniert jetzt, auch wenn ich aus dem quellcode von Red Skall nur &quot;inspirationen&quot; entnommen habe</p>
<p>thx@all</p>
]]></description><link>https://www.c-plusplus.net/forum/post/578880</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/578880</guid><dc:creator><![CDATA[LordMogli]]></dc:creator><pubDate>Tue, 10 Aug 2004 10:29:31 GMT</pubDate></item><item><title><![CDATA[Reply to Registry auslesen on Mon, 16 Aug 2004 12:00:35 GMT]]></title><description><![CDATA[<p>damit auch andere die lsg sehen</p>
<pre><code class="language-cpp">HKEY hKey = NULL;

	const size_t nBuffer = 128;
	char pBuffer[nBuffer];
	memset(pBuffer, 0, nBuffer);

	DWORD nLength					= nBuffer;
	char *temp						= (char*) malloc(1024);

	printf(&quot;narf&quot;);
	if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, &quot;SOFTWARE\\Firma\\produkt&quot;, NULL, KEY_EXECUTE, &amp;hKey) == ERROR_SUCCESS)
	{
		DWORD dwError = RegQueryValueEx(hKey, &quot;InstallationDirectory&quot;, NULL, NULL, (LPBYTE)pBuffer,	&amp;nLength);

		if (hKey)
			RegCloseKey(hKey);
	}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/583698</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/583698</guid><dc:creator><![CDATA[LordMogli]]></dc:creator><pubDate>Mon, 16 Aug 2004 12:00:35 GMT</pubDate></item><item><title><![CDATA[Reply to Registry auslesen on Mon, 16 Aug 2004 12:02:43 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/26a0.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--warning"
      title=":warning:"
      alt="⚠"
    /> Oder schaut doch einfach mal in die FAQ <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/583701</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/583701</guid><dc:creator><![CDATA[C-O-M-M-A-N-D-E-R]]></dc:creator><pubDate>Mon, 16 Aug 2004 12:02:43 GMT</pubDate></item></channel></rss>