<?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[wieder der Regeditor]]></title><description><![CDATA[<p>Hallo!</p>
<p>Vielleicht können sich noch manche an meinen Post von vor längerer Zeit erinnern.<br />
Ich hab das Problem, dass ich beim RegEditor immer den String aus dem letzten Schleifendurchlauf in den neuen reinkopieren muss, ein &quot;\&quot; dranhängen muss und dann den ausgewählten String ergänzen muss.<br />
Höhrt sich nicht schwer an, hatte auch ne Lösung war aber unsauber, da der erste String hätte leer bleiben müssen und es muss ne bessere Lösung geben.</p>
<p>Hier mal der Code, ich hoffe ihr versteht dann was ich meine:</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]=&quot;&quot;;
char doubleslash[2]=&quot;\\&quot;;

int nummer;
int rc;

HKEY rootkey[4];

int regeditor(void)

{

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;

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(

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

rc=RegOpenKeyEx(hkey,path[i],0,KEY_ALL_ACCESS,&amp;newkey[k]); //Stelle von beiden wechseln //hkey in rootkey ändern //zähler einbauen

hkey=newkey[k];

k=k+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)

{
char kA[255];

unsigned long int valueindex=0;
unsigned long int valuesize=sizeof(kA);
unsigned long int type[30];

char byte[200];
char SZ[250];
unsigned long int dword;

unsigned long int bytesize=sizeof(byte);
unsigned long int SZsize=sizeof(SZ);
unsigned long int dwordsize=sizeof(dword);
for (;valueindex&lt;values;valueindex++)
{
RegEnumValue(subkey,valueindex,kA,&amp;valuesize,NULL,&amp;type[valueindex],NULL,NULL);

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

if(type[valueindex]==REG_BINARY)  //type-array
{
printf(&quot;binaray &quot;);

//RegGetValue(rootkey[parameter], path[i],value[valueindex],RRF_RT_REG_BINARY,NULL,&amp;byte,&amp;bytesize);
printf(&quot;%x&quot;,byte);
}
if(type[valueindex]==REG_SZ)
{
printf(&quot;string &quot;);
//RegGetValue(rootkey[parameter], path[i],value[valueindex],RRF_RT_REG_SZ,NULL,&amp;SZ,&amp;SZsize);
printf(&quot;%s&quot;, SZ);
}
if(type[valueindex]==REG_DWORD)
{
printf(&quot;Zahl &quot;);
//RegGetValue(rootkey[parameter], path[i],value[valueindex],RRF_RT_REG_DWORD,NULL,&amp;dword,&amp;dwordsize);
printf(&quot;%i&quot;,dword);
}

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

}

return 0;
}

int main()

{

regeditor();

return 0;
}
</code></pre>
<p>Vielen Dank,</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/180369/wieder-der-regeditor</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Jul 2026 05:25:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/180369.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 01 May 2007 21:32:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to wieder der Regeditor on Tue, 01 May 2007 21:32:27 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Vielleicht können sich noch manche an meinen Post von vor längerer Zeit erinnern.<br />
Ich hab das Problem, dass ich beim RegEditor immer den String aus dem letzten Schleifendurchlauf in den neuen reinkopieren muss, ein &quot;\&quot; dranhängen muss und dann den ausgewählten String ergänzen muss.<br />
Höhrt sich nicht schwer an, hatte auch ne Lösung war aber unsauber, da der erste String hätte leer bleiben müssen und es muss ne bessere Lösung geben.</p>
<p>Hier mal der Code, ich hoffe ihr versteht dann was ich meine:</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]=&quot;&quot;;
char doubleslash[2]=&quot;\\&quot;;

int nummer;
int rc;

HKEY rootkey[4];

int regeditor(void)

{

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;

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(

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

rc=RegOpenKeyEx(hkey,path[i],0,KEY_ALL_ACCESS,&amp;newkey[k]); //Stelle von beiden wechseln //hkey in rootkey ändern //zähler einbauen

hkey=newkey[k];

k=k+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)

{
char kA[255];

unsigned long int valueindex=0;
unsigned long int valuesize=sizeof(kA);
unsigned long int type[30];

char byte[200];
char SZ[250];
unsigned long int dword;

unsigned long int bytesize=sizeof(byte);
unsigned long int SZsize=sizeof(SZ);
unsigned long int dwordsize=sizeof(dword);
for (;valueindex&lt;values;valueindex++)
{
RegEnumValue(subkey,valueindex,kA,&amp;valuesize,NULL,&amp;type[valueindex],NULL,NULL);

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

if(type[valueindex]==REG_BINARY)  //type-array
{
printf(&quot;binaray &quot;);

//RegGetValue(rootkey[parameter], path[i],value[valueindex],RRF_RT_REG_BINARY,NULL,&amp;byte,&amp;bytesize);
printf(&quot;%x&quot;,byte);
}
if(type[valueindex]==REG_SZ)
{
printf(&quot;string &quot;);
//RegGetValue(rootkey[parameter], path[i],value[valueindex],RRF_RT_REG_SZ,NULL,&amp;SZ,&amp;SZsize);
printf(&quot;%s&quot;, SZ);
}
if(type[valueindex]==REG_DWORD)
{
printf(&quot;Zahl &quot;);
//RegGetValue(rootkey[parameter], path[i],value[valueindex],RRF_RT_REG_DWORD,NULL,&amp;dword,&amp;dwordsize);
printf(&quot;%i&quot;,dword);
}

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

}

return 0;
}

int main()

{

regeditor();

return 0;
}
</code></pre>
<p>Vielen Dank,</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1277211</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1277211</guid><dc:creator><![CDATA[Muhi89]]></dc:creator><pubDate>Tue, 01 May 2007 21:32:27 GMT</pubDate></item><item><title><![CDATA[Reply to wieder der Regeditor on Tue, 01 May 2007 21:53:34 GMT]]></title><description><![CDATA[<p>das Problem liegt zwischen Zeile 90 und 100, wo ich was ausgeschnitten habe.</p>
<p>da sollte dann der Code hinkommen.</p>
<p>hier mal der lückenlose Code:</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;

unsigned long int zaehler=0;

int rc=0;
int k=0;

char singlestring[200]=&quot;&quot;;
char doubleslash[2]=&quot;\\&quot;;

int nummer;
int rc;

HKEY rootkey[4];

int regeditor(void)

{

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;

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+1],path[i]);

if(i!=0)
{
lstrcat(path[i+1],doubleslash);
}
lstrcat(path[i+1],string[i]);

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

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

i=i+1;

hkey=newkey[k];

k=k+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)

{
char kA[255];

unsigned long int valueindex=0;
unsigned long int valuesize=sizeof(kA);
unsigned long int type[30];

char byte[200];
char SZ[250];
unsigned char dword=0;
unsigned char euda=0;

unsigned long int bytesize=sizeof(byte);
unsigned long int SZsize=sizeof(SZ);
unsigned long int dwordsize=sizeof(euda);

char value[20][255];

int rc;

for (;valueindex&lt;values;valueindex++)
{
RegEnumValue(subkey,valueindex,kA,&amp;valuesize,NULL,&amp;type[valueindex],NULL,NULL);

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

if(type[valueindex]==REG_BINARY) 
{
printf(&quot; binaray &quot;);

//RegGetValue(rootkey[parameter], path[i],value[valueindex],RRF_RT_REG_BINARY,NULL,&amp;byte,&amp;bytesize);
printf(&quot;%x&quot;,byte);
}
if(type[valueindex]==REG_SZ)
{
printf(&quot; string &quot;);
//RegQueryValue(rootkey[parameter], path[i],value[valueindex],&amp;SZsize);
printf(&quot;%s&quot;, SZ);
}
if(type[valueindex]==REG_DWORD)
{
printf(&quot; Zahl &quot;);

rc=RegQueryValueEx(subkey,value[valueindex],NULL,NULL,&amp;dword,&amp;dwordsize);

printf(&quot;%i&quot;,rc);
//RegGetValue(rootkey[parameter], path[i],value[valueindex],RRF_RT_REG_DWORD,NULL,&amp;dword,&amp;dwordsize);
printf(&quot;%i\n&quot;,dword);
}

valuesize=sizeof(kA);
//printf(&quot;%s\n&quot;,kA);

}

return 0;
}

int main()

{

regeditor();

return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1277219</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1277219</guid><dc:creator><![CDATA[Muhi89]]></dc:creator><pubDate>Tue, 01 May 2007 21:53:34 GMT</pubDate></item><item><title><![CDATA[Reply to wieder der Regeditor on Tue, 01 May 2007 22:01:00 GMT]]></title><description><![CDATA[<p>ich will übrigens einen Trojaner programmieren</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1277222</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1277222</guid><dc:creator><![CDATA[Muhi89]]></dc:creator><pubDate>Tue, 01 May 2007 22:01:00 GMT</pubDate></item><item><title><![CDATA[Reply to wieder der Regeditor on Tue, 01 May 2007 22:03:05 GMT]]></title><description><![CDATA[<p>&gt; 20 Zeilen, Out Of Memory</p>
<p>Na dann mal viel Spaß beim Suchen...</p>
<p>Unregistrierter schrieb:</p>
<blockquote>
<p>ich will übrigens einen Trojaner programmieren</p>
</blockquote>
<p>So wie es aussieht, wird die Welt wohl davon verschont bleiben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1277223</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1277223</guid><dc:creator><![CDATA[keksekekse]]></dc:creator><pubDate>Tue, 01 May 2007 22:03:05 GMT</pubDate></item><item><title><![CDATA[Reply to wieder der Regeditor on Tue, 01 May 2007 22:06:01 GMT]]></title><description><![CDATA[<p>Ich weiss nicht welches blöde Arschloch das geschrieben hat ich wars nicht, ich finds echt scheisse, da mich das Problem schon länger wurmt und ich jetzt erhofft hatte endlich Hilfe zu bekommen.</p>
<p>Ab jetzt werd ich mich immer einloggen um mir solche Scheisse zu ersparen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1277226</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1277226</guid><dc:creator><![CDATA[Muhi89]]></dc:creator><pubDate>Tue, 01 May 2007 22:06:01 GMT</pubDate></item><item><title><![CDATA[Reply to wieder der Regeditor on Tue, 01 May 2007 22:06:56 GMT]]></title><description><![CDATA[<p>Entschuldigung das &quot;Arschloch&quot; nehm ich zurück</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1277228</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1277228</guid><dc:creator><![CDATA[Muhi89]]></dc:creator><pubDate>Tue, 01 May 2007 22:06:56 GMT</pubDate></item><item><title><![CDATA[Reply to wieder der Regeditor on Tue, 01 May 2007 23:18:18 GMT]]></title><description><![CDATA[<p>keksekekse schrieb:</p>
<blockquote>
<p>Unregistrierter schrieb:</p>
<blockquote>
<p>ich will übrigens einen Trojaner programmieren</p>
</blockquote>
<p>So wie es aussieht, wird die Welt wohl davon verschont bleiben.</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
<p>PS: Dein Code ist unübersichtlich und damit schlecht lesbar...glaube nicht, dass sich das so jemand angucken wird.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1277253</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1277253</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Tue, 01 May 2007 23:18:18 GMT</pubDate></item><item><title><![CDATA[Reply to wieder der Regeditor on Thu, 03 May 2007 13:31:59 GMT]]></title><description><![CDATA[<p>Hmmm dann versuch ich mal den Code leserlicher zu machen und poste ihn erneut.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1278121</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1278121</guid><dc:creator><![CDATA[Muhi89]]></dc:creator><pubDate>Thu, 03 May 2007 13:31:59 GMT</pubDate></item><item><title><![CDATA[Reply to wieder der Regeditor on Thu, 03 May 2007 14:08:41 GMT]]></title><description><![CDATA[<p>Der Code ist doch völliger Blödsinn. Wenn ein Subkey mehr als 30 Unterschlüssel hat schmiert Dir das Ding doch schon weg.</p>
<p>Du musst das ganze schon rekursiv bauen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1278144</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1278144</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Thu, 03 May 2007 14:08:41 GMT</pubDate></item><item><title><![CDATA[Reply to wieder der Regeditor on Thu, 03 May 2007 15:17:56 GMT]]></title><description><![CDATA[<p>Muhi89 schrieb:</p>
<blockquote>
<p>Ab jetzt werd ich mich immer einloggen um mir solche Scheisse zu ersparen.</p>
</blockquote>
<p>Entweder Du bist der Unechte und auf Rückzugsgefecht oder Du hältst Dich nicht an Dein Versprechen.</p>
<p>Wer sich nicht einloggt, obwohl er einen Account hat, zeigt die genausoviel Gleichgültigkeit wie wenn ihm die Rechtschreibung egal ist und verdient ignoriert zu werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1278190</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1278190</guid><dc:creator><![CDATA[keksekekse]]></dc:creator><pubDate>Thu, 03 May 2007 15:17:56 GMT</pubDate></item><item><title><![CDATA[Reply to wieder der Regeditor on Fri, 04 May 2007 14:44:18 GMT]]></title><description><![CDATA[<p>So, mal eingeloggt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> ,</p>
<p>naja das is ja auch nur mal irgendeine Zahl, mir gehts eher ums Grundgerüst und ich seh mich da vor viele Probleme gestellt.</p>
<p>Was ich erreichen will:</p>
<p>-&gt;man wählt am Anfang einen &quot;Root-Key&quot;, dann werden alle Subkeys angezeigt und dann wählt man immer den zu öffnenden subkey aus und der wird dann wieder aufgelistet usw.<br />
-&gt;man soll dabei immer durch eine Eingabe alle &quot;Root-Keys&quot; sehen und von vorne beginnen können ohne, dass sich das mit dem restlichen Code in die Quere kommt.<br />
-&gt;man soll auch zurückspringen können also zb von KEY_1\KEY_2 zu KEY_1.</p>
<p>Vielleicht hat jemand ja ne Idee oder ne Konstruktive Kritik an meinem Code (ist wie gesagt nicht fertig sondern erst eine Rohversion sozusagen), dann postet sie bitte.</p>
<p>Selbst probier ichs schon länger, wer vielleicht meinen alten Post dazu kennt weiss das.</p>
<p>Mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1278851</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1278851</guid><dc:creator><![CDATA[muhi]]></dc:creator><pubDate>Fri, 04 May 2007 14:44:18 GMT</pubDate></item></channel></rss>