<?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[Ich bekomm die KeyboardProc nich in die SetWindowsHookEx rein...hilfe!]]></title><description><![CDATA[<p>hi...<br />
ich habe hier meine KeyboardProc</p>
<pre><code class="language-cpp">LRESULT CALLBACK KeyboardProc( int ncode, WPARAM wParam, LPARAM lParam );
</code></pre>
<p>wenn ich nun diese funktion in SetWindowsHookEx übergeben will gibt mir der compiler folgende fehlermeldungen.</p>
<pre><code>[C++ Error] Unit1.cpp(28): E2034 Cannot convert 'long (__stdcall *)(int,unsigned int,long)' to 'int (__stdcall *)()'
[C++ Error] Unit1.cpp(28): E2342 Type mismatch in parameter 'lpfn' (wanted 'int (__stdcall *)()', got 'long (__stdcall *)(int,unsigned int,long)')
</code></pre>
<p>wieso ist das so?</p>
<p>Gruß tobi.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/177173/ich-bekomm-die-keyboardproc-nich-in-die-setwindowshookex-rein-hilfe</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 06:19:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/177173.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Mar 2007 18:17:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ich bekomm die KeyboardProc nich in die SetWindowsHookEx rein...hilfe! on Wed, 28 Mar 2007 18:17:41 GMT]]></title><description><![CDATA[<p>hi...<br />
ich habe hier meine KeyboardProc</p>
<pre><code class="language-cpp">LRESULT CALLBACK KeyboardProc( int ncode, WPARAM wParam, LPARAM lParam );
</code></pre>
<p>wenn ich nun diese funktion in SetWindowsHookEx übergeben will gibt mir der compiler folgende fehlermeldungen.</p>
<pre><code>[C++ Error] Unit1.cpp(28): E2034 Cannot convert 'long (__stdcall *)(int,unsigned int,long)' to 'int (__stdcall *)()'
[C++ Error] Unit1.cpp(28): E2342 Type mismatch in parameter 'lpfn' (wanted 'int (__stdcall *)()', got 'long (__stdcall *)(int,unsigned int,long)')
</code></pre>
<p>wieso ist das so?</p>
<p>Gruß tobi.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1254900</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1254900</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Wed, 28 Mar 2007 18:17:41 GMT</pubDate></item><item><title><![CDATA[Reply to Ich bekomm die KeyboardProc nich in die SetWindowsHookEx rein...hilfe! on Thu, 29 Mar 2007 08:01:03 GMT]]></title><description><![CDATA[<p>T0bi schrieb:</p>
<blockquote>
<p>wieso ist das so?</p>
</blockquote>
<p>Weil C typsicher ist und SetWindowsHookEx() einen Parameter vom Typ int (*) (void) aka HOOKPROC erwartet. Du mußt den Funktionszeiger casten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1255126</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1255126</guid><dc:creator><![CDATA[audacia|off]]></dc:creator><pubDate>Thu, 29 Mar 2007 08:01:03 GMT</pubDate></item></channel></rss>