<?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[Fehler mit Keyboard-Hook]]></title><description><![CDATA[<p>Hallo,<br />
habe folgenden Code zur Deaktivierung bestimmter Tasten:</p>
<pre><code>#define _WIN32_WINNT 0x0400
#include &lt;Windows.h&gt;
HHOOK hhkLowLevelKybd;
...

int WINAPI WinMain(HINSTANCE hinstExe, HINSTANCE, LPSTR, int)
{
   // Install the low-level keyboard &amp; mouse hooks
   HHOOK hhkLowLevelKybd  = SetWindowsHookEx(WH_KEYBOARD_LL,
     LowLevelKeyboardProc, hinstExe, 0);
....
</code></pre>
<p>Erhalte aber folgende Fehlermeldung:<br />
E2034 Konvertierung von 'long (__stdcall *)(int,unsigned int,long)' nach 'int (__stdcall *)()' nicht möglich<br />
Keine Übereinstimmung des Typs beim Parameter 'lpfn' ('int (__stdcall *)()' erwartet, 'long (__stdcall *)(int,unsigned int,long)' erhalten)</p>
<p>Kann mir jemand helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/128932/fehler-mit-keyboard-hook</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Jul 2026 23:36:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/128932.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 08 Dec 2005 16:05:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehler mit Keyboard-Hook on Thu, 08 Dec 2005 16:05:33 GMT]]></title><description><![CDATA[<p>Hallo,<br />
habe folgenden Code zur Deaktivierung bestimmter Tasten:</p>
<pre><code>#define _WIN32_WINNT 0x0400
#include &lt;Windows.h&gt;
HHOOK hhkLowLevelKybd;
...

int WINAPI WinMain(HINSTANCE hinstExe, HINSTANCE, LPSTR, int)
{
   // Install the low-level keyboard &amp; mouse hooks
   HHOOK hhkLowLevelKybd  = SetWindowsHookEx(WH_KEYBOARD_LL,
     LowLevelKeyboardProc, hinstExe, 0);
....
</code></pre>
<p>Erhalte aber folgende Fehlermeldung:<br />
E2034 Konvertierung von 'long (__stdcall *)(int,unsigned int,long)' nach 'int (__stdcall *)()' nicht möglich<br />
Keine Übereinstimmung des Typs beim Parameter 'lpfn' ('int (__stdcall *)()' erwartet, 'long (__stdcall *)(int,unsigned int,long)' erhalten)</p>
<p>Kann mir jemand helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/937471</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/937471</guid><dc:creator><![CDATA[williman]]></dc:creator><pubDate>Thu, 08 Dec 2005 16:05:33 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler mit Keyboard-Hook on Thu, 08 Dec 2005 21:34:06 GMT]]></title><description><![CDATA[<p>Wie sieht denn Deine Funktion &quot;LowLevelKeyboardProc&quot; aus?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/937727</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/937727</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 08 Dec 2005 21:34:06 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler mit Keyboard-Hook on Fri, 09 Dec 2005 16:24:25 GMT]]></title><description><![CDATA[<pre><code>LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam)
    {

   BOOL fEatKeystroke = FALSE;

   if (nCode == HC_ACTION) {
      switch (wParam) {
      case WM_KEYDOWN:  case WM_SYSKEYDOWN:
      case WM_KEYUP:    case WM_SYSKEYUP:
         PKBDLLHOOKSTRUCT p = (PKBDLLHOOKSTRUCT) lParam;
         fEatKeystroke =
            ((p-&gt;vkCode == VK_TAB) &amp;&amp; ((p-&gt;flags &amp; LLKHF_ALTDOWN) != 0)) ||
            ((p-&gt;vkCode == VK_ESCAPE) &amp;&amp; ((p-&gt;flags &amp; LLKHF_ALTDOWN) != 0)) ||
            ((p-&gt;vkCode == VK_ESCAPE) &amp;&amp; ((GetKeyState(VK_CONTROL) &amp; 0x8000) != 0));
         break;
      }
   }
   return(fEatKeystroke ? 1 : CallNextHookEx(NULL, nCode, wParam, lParam));
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/937942</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/937942</guid><dc:creator><![CDATA[williman]]></dc:creator><pubDate>Fri, 09 Dec 2005 16:24:25 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler mit Keyboard-Hook on Fri, 09 Dec 2005 09:41:23 GMT]]></title><description><![CDATA[<p>Benutze<br />
#define STRICT<br />
bzw. füge STRICT in die Projektoptionen ein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/937949</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/937949</guid><dc:creator><![CDATA[JFierce7]]></dc:creator><pubDate>Fri, 09 Dec 2005 09:41:23 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler mit Keyboard-Hook on Fri, 09 Dec 2005 10:24:49 GMT]]></title><description><![CDATA[<p>Und Du hast auch im H-File die gleiche Definition?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/937980</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/937980</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Fri, 09 Dec 2005 10:24:49 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler mit Keyboard-Hook on Fri, 09 Dec 2005 16:27:34 GMT]]></title><description><![CDATA[<p>Habe den obigen Code zu LRESULT CALLBACK LowLevelKeyboardProc geändert.<br />
Funzt auch nicht mit STRICT.<br />
In einem H-File habe ich nichts dazu stehen!<br />
Lediglich in einer cpp des Hauptformulars habe ich unter FormDestroy stehen:</p>
<pre><code>UnhookWindowsHookEx(hhkLowLevelKybd);//Deinstall the low-level keyboard &amp; mouse hooks
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/938286</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/938286</guid><dc:creator><![CDATA[williman]]></dc:creator><pubDate>Fri, 09 Dec 2005 16:27:34 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler mit Keyboard-Hook on Fri, 09 Dec 2005 17:21:57 GMT]]></title><description><![CDATA[<p>STRICT muss vor<br />
#include &lt;winuser.h&gt;<br />
definiert werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/938323</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/938323</guid><dc:creator><![CDATA[JFierce7]]></dc:creator><pubDate>Fri, 09 Dec 2005 17:21:57 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler mit Keyboard-Hook on Fri, 09 Dec 2005 18:28:07 GMT]]></title><description><![CDATA[<p>Habe diese Lösung jetzt benutzt, funzt!!!<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-87816-and-highlight-is-strg+deaktivieren.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-87816-and-highlight-is-strg+deaktivieren.html</a><br />
Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/938371</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/938371</guid><dc:creator><![CDATA[williman]]></dc:creator><pubDate>Fri, 09 Dec 2005 18:28:07 GMT</pubDate></item></channel></rss>