<?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[Anfängerfrage - DLL]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich würde gerne zum Testen die Funktion &quot;BlockInput&quot; von der DLL &quot;user32.dll&quot; aktivieren (TRUE) und dann wieder deaktivieren (FALSE).</p>
<p>Hier mein Code (Frage: Wo muss der Parameter &quot;TRUE&quot; hin?):</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;sstream&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
#include &lt;windows.h&gt;

string s = &quot;D:\\WINDOWS\\system32\\user32.dll&quot;;
HMODULE x = GetModuleHandle (s.c_str());
GetProcAddress (x,&quot;BlockInput,TRUE&quot;);
Sleep (5000);
GetProcAddress (x,&quot;BlockInput,FALSE&quot;);
system (&quot;pause &gt; NUL&quot;);
return 0;
</code></pre>
<p>So funktioniert der Code nicht (Compiler erkennt keine Fehler, aber die Funktion wird nicht aufgerufen).</p>
<p>Wie muss ich die Parameter korrekt eingeben?</p>
<p>Danke im Voraus!</p>
<p>MfG</p>
<p>Seikuassi</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/317385/anfängerfrage-dll</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Jul 2026 23:07:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/317385.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 06 Jun 2013 19:05:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Anfängerfrage - DLL on Thu, 06 Jun 2013 19:05:22 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich würde gerne zum Testen die Funktion &quot;BlockInput&quot; von der DLL &quot;user32.dll&quot; aktivieren (TRUE) und dann wieder deaktivieren (FALSE).</p>
<p>Hier mein Code (Frage: Wo muss der Parameter &quot;TRUE&quot; hin?):</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;sstream&gt;
#include &lt;stdlib.h&gt;
#include &lt;string.h&gt;
#include &lt;windows.h&gt;

string s = &quot;D:\\WINDOWS\\system32\\user32.dll&quot;;
HMODULE x = GetModuleHandle (s.c_str());
GetProcAddress (x,&quot;BlockInput,TRUE&quot;);
Sleep (5000);
GetProcAddress (x,&quot;BlockInput,FALSE&quot;);
system (&quot;pause &gt; NUL&quot;);
return 0;
</code></pre>
<p>So funktioniert der Code nicht (Compiler erkennt keine Fehler, aber die Funktion wird nicht aufgerufen).</p>
<p>Wie muss ich die Parameter korrekt eingeben?</p>
<p>Danke im Voraus!</p>
<p>MfG</p>
<p>Seikuassi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2329078</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2329078</guid><dc:creator><![CDATA[Seikuassi]]></dc:creator><pubDate>Thu, 06 Jun 2013 19:05:22 GMT</pubDate></item><item><title><![CDATA[Reply to Anfängerfrage - DLL on Thu, 06 Jun 2013 19:10:35 GMT]]></title><description><![CDATA[<p>Kleine Änderung: Die Tastatur wird scheinbar die ersten 5 Sekunden gesperrt. Warum aber nicht die Maus? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Danke im Voraus!</p>
<p>MfG</p>
<p>Seikuassi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2329080</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2329080</guid><dc:creator><![CDATA[Seikuassi]]></dc:creator><pubDate>Thu, 06 Jun 2013 19:10:35 GMT</pubDate></item><item><title><![CDATA[Reply to Anfängerfrage - DLL on Thu, 06 Jun 2013 19:44:33 GMT]]></title><description><![CDATA[<p>Ich will den Compiler sehen, wo das kompiliert.<br />
Zeig uns deinen richtigen Code.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2329086</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2329086</guid><dc:creator><![CDATA[Nathan_logoff]]></dc:creator><pubDate>Thu, 06 Jun 2013 19:44:33 GMT</pubDate></item><item><title><![CDATA[Reply to Anfängerfrage - DLL on Thu, 06 Jun 2013 19:52:46 GMT]]></title><description><![CDATA[<blockquote>
<p>Wo muss der Parameter &quot;TRUE&quot; hin?</p>
</blockquote>
<p>Antwort/Lösung:<br />
<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms646290%28v=vs.85%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/ms646290(v=vs.85).aspx</a><br />
oder<br />
TastaturHooks</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2329090</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2329090</guid><dc:creator><![CDATA[Alexey]]></dc:creator><pubDate>Thu, 06 Jun 2013 19:52:46 GMT</pubDate></item><item><title><![CDATA[Reply to Anfängerfrage - DLL on Fri, 07 Jun 2013 09:50:56 GMT]]></title><description><![CDATA[<p>Lösung 1:<br />
Du macht es wie Alexey es andeutet. Du includierst windows.h, sorgst in deinen Projekteinstellungen dass User32.lib eingebunden wird (Visual Studio: Einstellungen -&gt; Linker -&gt; Eingabe) und rufst einfach die Funktion auf.</p>
<p>DLL's ala User32 werden aber vermutlich standardmäßig von allen Windows Projekten mit eingebunden.</p>
<p>Lösung 2:<br />
Du lädst die DLL zur Laufzeit, was komplexer ist und bei user32.dll einfach sinnlos ist, da die DLL schon von deinem Programm geladen ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2329183</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2329183</guid><dc:creator><![CDATA[Bitte ein Bit]]></dc:creator><pubDate>Fri, 07 Jun 2013 09:50:56 GMT</pubDate></item><item><title><![CDATA[Reply to Anfängerfrage - DLL on Fri, 07 Jun 2013 12:38:46 GMT]]></title><description><![CDATA[<blockquote>
<p>Ich will den Compiler sehen, wo das kompiliert.<br />
Zeig uns deinen richtigen Code.</p>
</blockquote>
<p>Ich verstehe nicht ganz... Ich habe die Datei mit Dev-C++ (MinGW32) kompiliert. Und das, wie schon gesagt, ohne Fehler.</p>
<blockquote>
<p>Antwort/Lösung:<br />
[url]<a href="http://msdn.microsoft.com" rel="nofollow">http://msdn.microsoft.com</a> ....... s646290%28v=vs.85%29.aspx[/url]</p>
</blockquote>
<p>Habe ich ja schon gemacht.<br />
Damit es keine Kommunikationsprobleme zw. uns gibt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /> , bitte ich euch ganz einfach einen C++-Code zu schreiben, der eine Message Box aufruft, in dem man kein Handle übergibt (NULL), den Haupttext &quot;Hallo&quot;, den Titel &quot;Test&quot; und die Option &quot;MB_OK&quot; übergibt (ohne den Befehl &quot;MessageBox&quot;, sondern per DLL aufruft).<br />
Ich will einfach nur sehen, wie man dann in C++ die Funktion aufruft.</p>
<p>Danke im Voraus!</p>
<p>MfG</p>
<p>Seikuassi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2329224</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2329224</guid><dc:creator><![CDATA[Seikuassi]]></dc:creator><pubDate>Fri, 07 Jun 2013 12:38:46 GMT</pubDate></item><item><title><![CDATA[Reply to Anfängerfrage - DLL on Fri, 07 Jun 2013 12:52:24 GMT]]></title><description><![CDATA[<p>Der Code setzt in irgend eine Aktion/Event:</p>
<pre><code>BlockInput(TRUE)
</code></pre>
<p>und wenn wieder entsperren willst dann:</p>
<pre><code>BlockInput(FALSE)
</code></pre>
<p>fertig !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2329228</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2329228</guid><dc:creator><![CDATA[Alexey]]></dc:creator><pubDate>Fri, 07 Jun 2013 12:52:24 GMT</pubDate></item><item><title><![CDATA[Reply to Anfängerfrage - DLL on Fri, 07 Jun 2013 12:55:45 GMT]]></title><description><![CDATA[<p>Seikuassi schrieb:</p>
<blockquote>
<p>ich würde gerne zum Testen die Funktion &quot;BlockInput&quot; von der DLL &quot;user32.dll&quot; aktivieren (TRUE) und dann wieder deaktivieren (FALSE).</p>
</blockquote>
<p><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms683212(v=vs.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/ms683212(v=vs.85).aspx</a></p>
<pre><code>FARPROC WINAPI GetProcAddress(
  _In_  HMODULE hModule,
  _In_  LPCSTR lpProcName
);
</code></pre>
<p>@ Seikuassi<br />
Was machst du da für einen Unsinn?</p>
<p>Wenn du eine Funktion ich nennen es mal &quot;deaktivieren&quot; willst dann mach einen Globalen API Hook ...</p>
<p>Du scheinst aber gar nicht zu wissen was GetProcAddress überhaupt macht.</p>
<p>Wo hast du eigentlich diesen lustigen Quelltext her?^^ (Ich hoffe mal nur kopiert und nicht selber geschrieben. <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>
]]></description><link>https://www.c-plusplus.net/forum/post/2329230</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2329230</guid><dc:creator><![CDATA[Bassmaster]]></dc:creator><pubDate>Fri, 07 Jun 2013 12:55:45 GMT</pubDate></item></channel></rss>