<?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[Problem mit Registry-Manager]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich schreibe ja gerade an einem Registry-Manager und was eig schon problemlos funktioniert ist das auflisten von Subkeys.</p>
<p>Wo ich aber ein Problem habe, sind die values.</p>
<p>Bei RegQueryKey bleibt values immer auf 0,<br />
habs öfter durch den Debugger rennen lassen, komme jedoch nicht auf den Fehler.</p>
<p>Könnt ihr mir da helfen?</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;winreg.h&gt;
#include &lt;stdio.h&gt;

int enumsubkeys(HKEY key);
int enumvalues(HKEY subkey);

extern SOCKET sendsock;
extern SOCKADDR_IN address;

int parameter=0;

unsigned long int subkeys=0;
unsigned long int values=0;
unsigned long int size=200;

unsigned long int index=0;

char string [20] [200];
char path [20] [200];
unsigned long int buffersize=200;

unsigned long int i;

unsigned long int subvalues;
char value[20][200];

unsigned long int zaehler=0;

int rc=0;
int k=0;

char singlestring[200];

int nummer;

int regeditor(void)

{

HKEY rootkey[4];
HKEY hkey;
HKEY newkey[20];

rootkey[0]=HKEY_USERS;
rootkey[1]=HKEY_CURRENT_USER;
rootkey[2]=HKEY_LOCAL_MACHINE;
rootkey[3]=HKEY_USERS;
rootkey[4]=HKEY_PERFORMANCE_DATA;

i=0;

if(i==0)
{
hkey=rootkey[parameter];
}

strcpy(path[0],singlestring);

do 
{

RegQueryInfoKey(hkey,NULL,NULL,NULL,&amp;subkeys, NULL,
		                NULL,&amp;values,NULL,NULL,NULL,NULL);

if(subkeys!=0)
{
rc=enumsubkeys(hkey); 
}
else
{

  if (values!=0)

    {
     enumvalues(hkey);  

    }

}

scanf(&quot;%i&quot;,&amp;nummer);

strcpy(path[i],string[nummer]);

memset(string,0,sizeof(string));

RegOpenKeyEx(hkey,path[i],0,KEY_ALL_ACCESS,&amp;newkey[k]); 
hkey=newkey[k];

k=k+1;
i=i+1;

}while(1);

	return 0;
}

int enumsubkeys(HKEY key)

{

for (zaehler=0,index=0;zaehler&lt;=(subkeys);index++,zaehler++)

{

RegEnumKey(key,index,string[zaehler],buffersize);
printf(&quot;%s\n&quot;,string[zaehler]);
Sleep(90);
}

return 0;
}

int enumvalues(HKEY subkey)

{

unsigned long int i;
unsigned long int valueindex=0;
unsigned long int values;
unsigned long int valuesize=sizeof(value);

unsigned long int *a;
RegQueryInfoKey(subkey,NULL,NULL,NULL,&amp;subvalues,
		                NULL,NULL,&amp;values,NULL,NULL,NULL,NULL);

for (i=0;i&lt;=values;valueindex++,i++)
{
RegEnumValue(subkey,valueindex,value[valueindex],&amp;valuesize,NULL,NULL,NULL,NULL);

printf(&quot;%s&quot;,value[valueindex]);

}

return 0;
}

int main()

{

regeditor();

return 0;
}
</code></pre>
<p>MFG</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/173582/problem-mit-registry-manager</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 21:37:21 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/173582.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 Feb 2007 13:09:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit Registry-Manager on Sat, 17 Feb 2007 13:09:07 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich schreibe ja gerade an einem Registry-Manager und was eig schon problemlos funktioniert ist das auflisten von Subkeys.</p>
<p>Wo ich aber ein Problem habe, sind die values.</p>
<p>Bei RegQueryKey bleibt values immer auf 0,<br />
habs öfter durch den Debugger rennen lassen, komme jedoch nicht auf den Fehler.</p>
<p>Könnt ihr mir da helfen?</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;winreg.h&gt;
#include &lt;stdio.h&gt;

int enumsubkeys(HKEY key);
int enumvalues(HKEY subkey);

extern SOCKET sendsock;
extern SOCKADDR_IN address;

int parameter=0;

unsigned long int subkeys=0;
unsigned long int values=0;
unsigned long int size=200;

unsigned long int index=0;

char string [20] [200];
char path [20] [200];
unsigned long int buffersize=200;

unsigned long int i;

unsigned long int subvalues;
char value[20][200];

unsigned long int zaehler=0;

int rc=0;
int k=0;

char singlestring[200];

int nummer;

int regeditor(void)

{

HKEY rootkey[4];
HKEY hkey;
HKEY newkey[20];

rootkey[0]=HKEY_USERS;
rootkey[1]=HKEY_CURRENT_USER;
rootkey[2]=HKEY_LOCAL_MACHINE;
rootkey[3]=HKEY_USERS;
rootkey[4]=HKEY_PERFORMANCE_DATA;

i=0;

if(i==0)
{
hkey=rootkey[parameter];
}

strcpy(path[0],singlestring);

do 
{

RegQueryInfoKey(hkey,NULL,NULL,NULL,&amp;subkeys, NULL,
		                NULL,&amp;values,NULL,NULL,NULL,NULL);

if(subkeys!=0)
{
rc=enumsubkeys(hkey); 
}
else
{

  if (values!=0)

    {
     enumvalues(hkey);  

    }

}

scanf(&quot;%i&quot;,&amp;nummer);

strcpy(path[i],string[nummer]);

memset(string,0,sizeof(string));

RegOpenKeyEx(hkey,path[i],0,KEY_ALL_ACCESS,&amp;newkey[k]); 
hkey=newkey[k];

k=k+1;
i=i+1;

}while(1);

	return 0;
}

int enumsubkeys(HKEY key)

{

for (zaehler=0,index=0;zaehler&lt;=(subkeys);index++,zaehler++)

{

RegEnumKey(key,index,string[zaehler],buffersize);
printf(&quot;%s\n&quot;,string[zaehler]);
Sleep(90);
}

return 0;
}

int enumvalues(HKEY subkey)

{

unsigned long int i;
unsigned long int valueindex=0;
unsigned long int values;
unsigned long int valuesize=sizeof(value);

unsigned long int *a;
RegQueryInfoKey(subkey,NULL,NULL,NULL,&amp;subvalues,
		                NULL,NULL,&amp;values,NULL,NULL,NULL,NULL);

for (i=0;i&lt;=values;valueindex++,i++)
{
RegEnumValue(subkey,valueindex,value[valueindex],&amp;valuesize,NULL,NULL,NULL,NULL);

printf(&quot;%s&quot;,value[valueindex]);

}

return 0;
}

int main()

{

regeditor();

return 0;
}
</code></pre>
<p>MFG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230066</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230066</guid><dc:creator><![CDATA[muhi]]></dc:creator><pubDate>Sat, 17 Feb 2007 13:09:07 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Registry-Manager on Sat, 17 Feb 2007 14:58:19 GMT]]></title><description><![CDATA[<p>Bitte helft mir ich komm da einfach nicht weiter....obwohl ich schon viel ausgebessert habe.</p>
<p>Jetzt werden zumindest schon ein paar values angezeigt aber mir ist unklar wie ich das beheben könnte.</p>
<p>Hier mal der verbesserte Code, falls mir jmd helfen will.</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;winreg.h&gt;
#include &lt;stdio.h&gt;

int enumsubkeys(HKEY key);
int enumvalues(HKEY subkey);

extern SOCKET sendsock;
extern SOCKADDR_IN address;

int parameter=0;

unsigned long int subkeys=0;
unsigned long int values=0;
unsigned long int size=200;

unsigned long int index=0;

char string [30] [200];
char path [30] [200];
unsigned long int buffersize=200;

unsigned long int i;

unsigned long int subvalues;
char value[20][255];

unsigned long int zaehler=0;

int rc=0;
int k=0;

char singlestring[200];

int nummer;

int regeditor(void)

{

HKEY rootkey[4];
HKEY hkey;
HKEY newkey[20];

rootkey[0]=HKEY_USERS;
rootkey[1]=HKEY_CURRENT_USER;
rootkey[2]=HKEY_LOCAL_MACHINE;
rootkey[3]=HKEY_USERS;
rootkey[4]=HKEY_PERFORMANCE_DATA;

i=0;

if(i==0)
{
hkey=rootkey[parameter];
}

strcpy(path[0],singlestring);

do 
{

RegQueryInfoKey(hkey,NULL,NULL,NULL,&amp;subkeys, NULL,
		                NULL,&amp;values,NULL,NULL,NULL,NULL);

if(subkeys!=0)
{
rc=enumsubkeys(hkey); 
}
else
{

  if (values!=0)

    {
     enumvalues(hkey);  

    }

}

scanf(&quot;%i&quot;,&amp;nummer);

strcpy(path[i],string[nummer]);

memset(string,0,sizeof(string));

RegOpenKeyEx(hkey,path[i],0,KEY_ALL_ACCESS,&amp;newkey[k]); 
hkey=newkey[k];

k=k+1;
i=i+1;

}while(1);

return 0;
}

int enumsubkeys(HKEY key)

{

for (zaehler=0,index=0;zaehler&lt;=(subkeys);index++,zaehler++)

{

RegEnumKey(key,index,string[zaehler],buffersize);
printf(&quot;%s\n&quot;,string[zaehler]);
Sleep(90);
}

return 0;
}

int enumvalues(HKEY subkey)

{

unsigned long int valueindex=0;
unsigned long int valuesize=254;
unsigned long int *a;

char kA[255];
        NULL,NULL,&amp;values,NULL,NULL,NULL,NULL);

for (;valueindex&lt;=30;valueindex++)
{
RegEnumValue(subkey,valueindex,kA,&amp;valuesize,NULL,NULL,NULL,NULL);

printf(&quot;%s\n&quot;,kA);

}

return 0;
}

int main()

{

regeditor();

return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1230135</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230135</guid><dc:creator><![CDATA[muhi]]></dc:creator><pubDate>Sat, 17 Feb 2007 14:58:19 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Registry-Manager on Sat, 17 Feb 2007 18:54:57 GMT]]></title><description><![CDATA[<p>RegEnumValue () hat die unangenehme Eigenschaft, nach Aufruf den Wert des 4. Parameters zu verändern.</p>
<pre><code class="language-cpp">// Zeile 126 :

valuesize = sizeof(kA); // !!! muss immer wieder neu gesetzt werden !!!
RegEnumValue(subkey,valueindex,kA,&amp;valuesize,NULL,NULL,NULL,NULL);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1230265</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230265</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 17 Feb 2007 18:54:57 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Registry-Manager on Sun, 18 Feb 2007 01:23:53 GMT]]></title><description><![CDATA[<p>DANKE!! es funzt jetzt prima <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230391</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230391</guid><dc:creator><![CDATA[Muhi89]]></dc:creator><pubDate>Sun, 18 Feb 2007 01:23:53 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Registry-Manager on Sun, 18 Feb 2007 01:37:14 GMT]]></title><description><![CDATA[<p>Ein letztes Problem hab ich aber leider noch,</p>
<p>Wenn ich beim ersten Mal zb einen Subkey wähle, der keine Unterschlüssel hat, gehts im Programm nicht wirklich weiter.</p>
<p>Auch hier konnte ich mit dem Debugger noch nichts finden.</p>
<p>MFG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230394</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230394</guid><dc:creator><![CDATA[Muhi89]]></dc:creator><pubDate>Sun, 18 Feb 2007 01:37:14 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Registry-Manager on Sun, 18 Feb 2007 02:14:08 GMT]]></title><description><![CDATA[<p>ok, hat sich erledigt,thx,</p>
<p>jedoch hat sich zeitgleich ein anderes Problem ergeben :D,</p>
<p>wie soll ich einen binären wert ausgeben? (Konsole)</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230400</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230400</guid><dc:creator><![CDATA[Muhi89]]></dc:creator><pubDate>Sun, 18 Feb 2007 02:14:08 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Registry-Manager on Sun, 18 Feb 2007 02:20:04 GMT]]></title><description><![CDATA[<blockquote>
<p>Wenn ich beim ersten Mal zb einen Subkey wähle, der keine Unterschlüssel hat, gehts im Programm nicht wirklich weiter.</p>
</blockquote>
<p>Wahrscheinlich ein Problem in der Ablaufsteuerung.</p>
<p>Gehe das Programm mal mit dem Debugger im Einzelschritt durch und suche die Stelle, an der das Programm dann abbricht bzw. hängenbleibt.</p>
<p>Irgendwo muss eine Schleife sein, die mit Subkeys ohne Unterschlüssel nichts anfangen kann.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230401</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230401</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 18 Feb 2007 02:20:04 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Registry-Manager on Sun, 18 Feb 2007 02:23:30 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>im Grunde genommen war das Problem gar keins, da Standartstrings etc (die leer sind) nicht angezeigt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230402</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230402</guid><dc:creator><![CDATA[Muhi89]]></dc:creator><pubDate>Sun, 18 Feb 2007 02:23:30 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Registry-Manager on Sun, 18 Feb 2007 11:25:58 GMT]]></title><description><![CDATA[<p>Leider steht in der FAQ nichts darüber wie ich binäre Keys auslese und ausgebe, kann mir da jmd helfen?</p>
<p>Sollte die letzte Hürde sein.</p>
<p>MFG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230492</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230492</guid><dc:creator><![CDATA[Muhi89]]></dc:creator><pubDate>Sun, 18 Feb 2007 11:25:58 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Registry-Manager on Sun, 18 Feb 2007 11:49:59 GMT]]></title><description><![CDATA[<p>Reicht es viell wenn ich einen binären Wert der in einem char array gespeichert wurde per printf hexadezimal ausgebe?</p>
<p>Mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1230516</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1230516</guid><dc:creator><![CDATA[Muhi89]]></dc:creator><pubDate>Sun, 18 Feb 2007 11:49:59 GMT</pubDate></item></channel></rss>