<?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[kopiren&#x2F;einfügen abfangen]]></title><description><![CDATA[<p>hallo,<br />
ich bin gerade dabei ein Programm zu schreiben dass Events wie z.b: copy- Befehle abfängt bzw. nur bemerkt und dann protokolliert.</p>
<p>Wie kann man das am besten realisieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/234770/kopiren-einfügen-abfangen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 09:12:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/234770.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 22 Feb 2009 11:35:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to kopiren&#x2F;einfügen abfangen on Sun, 22 Feb 2009 11:35:50 GMT]]></title><description><![CDATA[<p>hallo,<br />
ich bin gerade dabei ein Programm zu schreiben dass Events wie z.b: copy- Befehle abfängt bzw. nur bemerkt und dann protokolliert.</p>
<p>Wie kann man das am besten realisieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1667968</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1667968</guid><dc:creator><![CDATA[manfredkaush]]></dc:creator><pubDate>Sun, 22 Feb 2009 11:35:50 GMT</pubDate></item><item><title><![CDATA[Reply to kopiren&#x2F;einfügen abfangen on Sun, 22 Feb 2009 11:40:46 GMT]]></title><description><![CDATA[<p>Ich glaub das wird mit C++ schwer und müsste man eher mit Asm machen, aber ich will dir nichts falsches erzählen und vielleicht hat jemand die Lösung... Man könnte das Kopieren und Einfügen z.B. prüfen, indem man schaut, ob Strg+V gedrückt wird, problem dabei ist aber, dass man auch mit der Maus kopieren und einfügen kann.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1667975</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1667975</guid><dc:creator><![CDATA[freaky]]></dc:creator><pubDate>Sun, 22 Feb 2009 11:40:46 GMT</pubDate></item><item><title><![CDATA[Reply to kopiren&#x2F;einfügen abfangen on Sun, 22 Feb 2009 11:41:52 GMT]]></title><description><![CDATA[<p>Standard C++ hat keine solche Möglichkeiten, es hat ja auch keine GUI Möglichkeiten. Du brauchst also eine API oder ein Framework, mit welchem du arbeiten kannst. Wir haben in diesem Forum verschiedene Abteilungen für Frameworks und APIs. Hier bist du aber definitiv falsch.</p>
<p>Auf welchem System arbeitest du denn? Und hast du schon ein Framework oder eine API, mit welcher du arbeitest? Mit diesen Information könnte man dich weiterleiten.</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1667977</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1667977</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Sun, 22 Feb 2009 11:41:52 GMT</pubDate></item><item><title><![CDATA[Reply to kopiren&#x2F;einfügen abfangen on Sun, 22 Feb 2009 12:23:10 GMT]]></title><description><![CDATA[<p>Ev. mit Detours: <a href="http://research.microsoft.com/en-us/projects/detours/" rel="nofollow">http://research.microsoft.com/en-us/projects/detours/</a><br />
Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1668011</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1668011</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Sun, 22 Feb 2009 12:23:10 GMT</pubDate></item><item><title><![CDATA[Reply to kopiren&#x2F;einfügen abfangen on Sun, 22 Feb 2009 16:35:00 GMT]]></title><description><![CDATA[<p>ich dachte eher an sowas wie hooks<br />
leider kann ich damit nicht viel anfangen und das was ich gefunden habe funktioniert nich so recht :</p>
<p><a href="http://www.tutorials.de/forum/c-c-tutorials/164662-tutorial-ueber-windows-hooks.html" rel="nofollow">http://www.tutorials.de/forum/c-c-tutorials/164662-tutorial-ueber-windows-hooks.html</a></p>
<pre><code class="language-cpp">fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include &quot;stdafx.h&quot;' to your source?
</code></pre>
<p>und wenn ich das mache wirft der compiler nur mit fehlermeldungen um sich</p>
<p>ich verwende Visual Studio 2008 und dort gibt es nur MFC-DLL-Projekte ?!<br />
Kann man nicht irgendwiewie eine normale DLL erstellen?</p>
<pre><code class="language-cpp">1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(1) : warning C4627: '#include &quot;hook.dll.h&quot;': skipped when looking for precompiled header use
1&gt;        Add directive to 'stdafx.h' or rebuild precompiled header
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(4) : error C2146: syntax error : missing ';' before identifier 'SHARED'
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(4) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(5) : error C2146: syntax error : missing ';' before identifier 'SHARED'
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(5) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(5) : error C2374: 'SHARED' : redefinition; multiple initialization
1&gt;        c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(4) : see declaration of 'SHARED'
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(13) : error C2146: syntax error : missing ';' before identifier 'BOOL'
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(13) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(20) : error C2065: 'MouseProc' : undeclared identifier
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(30) : error C2146: syntax error : missing ';' before identifier 'BOOL'
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(30) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(30) : error C2086: 'int DLLIMPORT' : redefinition
1&gt;        c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(13) : see declaration of 'DLLIMPORT'
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(50) : error C2664: 'FindWindowW' : cannot convert parameter 1 from 'const char [7]' to 'LPCWSTR'
1&gt;        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1&gt;c:\users\scholz\documents\visual studio 2008\hook\hook.dll\hook.dll\hook.dll.cpp(58) : error C2065: 'g_hMuseHook' : undeclared identifier
</code></pre>
<p>hook.dll.h hab ich dabei durch denn im tut beschriebenen Header ersetzt:</p>
<pre><code class="language-cpp">#include &quot;hook.dll.h&quot;
#include &quot;stdafx.h&quot;

HHOOK g_hMouseHook SHARED = NULL;
HINSTANCE g_hInst SHARED = NULL;

BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved)
{
	g_hInst =hInst;
	return TRUE;
}

DLLIMPORT BOOL InstallHook()
{
	if (g_hMouseHook != NULL)
	{
		return TRUE;
	}

	g_hMouseHook = SetWindowsHookEx(WH_MOUSE, MouseProc, g_hInst, 0);

	if (g_hMouseHook == NULL)
	{
		return FALSE;
	}

	return TRUE;
}

DLLIMPORT BOOL UninstallHook()
{
	if (g_hMouseHook != NULL)
	{
		UnhookWindowsHookEx(g_hMouseHook);
		g_hMouseHook = NULL;
	}
	 return TRUE;
}

LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam,LPARAM lParam)
{
	if (nCode &lt; 0)
		return CallNextHookEx(g_hMouseHook, nCode, wParam, lParam);

	if (nCode == HC_ACTION)
	{
		if ((wParam == WM_LBUTTONDOWN)||(wParam == WM_NCLBUTTONDOWN))
		{
			MOUSEHOOKSTRUCT *mhs = (MOUSEHOOKSTRUCT*)lParam;
			HWND caller = FindWindow(&quot;HOOKit&quot;, NULL);
			if (caller != NULL)
			{
				PostMessage(caller, WM_USER+123, 0 , MAKELPARAM (mhs-&gt;pt.x, mhs-&gt;pt.y));
			}
		}

	}
	return CallNextHookEx(g_hMuseHook, nCode, wParam, lParam);
}
</code></pre>
<p>genauso wie die hook.cll.cpp:</p>
<pre><code class="language-cpp">#include &quot;hook.dll.h&quot;
#include &quot;stdafx.h&quot;

HHOOK g_hMouseHook SHARED = NULL;
HINSTANCE g_hInst SHARED = NULL;

BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD reason, LPVOID reserved)
{
	g_hInst =hInst;
	return TRUE;
}

DLLIMPORT BOOL InstallHook()
{
	if (g_hMouseHook != NULL)
	{
		return TRUE;
	}

	g_hMouseHook = SetWindowsHookEx(WH_MOUSE, MouseProc, g_hInst, 0);

	if (g_hMouseHook == NULL)
	{
		return FALSE;
	}

	return TRUE;
}

DLLIMPORT BOOL UninstallHook()
{
	if (g_hMouseHook != NULL)
	{
		UnhookWindowsHookEx(g_hMouseHook);
		g_hMouseHook = NULL;
	}
	 return TRUE;
}

LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam,LPARAM lParam)
{
	if (nCode &lt; 0)
		return CallNextHookEx(g_hMouseHook, nCode, wParam, lParam);

	if (nCode == HC_ACTION)
	{
		if ((wParam == WM_LBUTTONDOWN)||(wParam == WM_NCLBUTTONDOWN))
		{
			MOUSEHOOKSTRUCT *mhs = (MOUSEHOOKSTRUCT*)lParam;
			HWND caller = FindWindow(&quot;HOOKit&quot;, NULL);
			if (caller != NULL)
			{
				PostMessage(caller, WM_USER+123, 0 , MAKELPARAM (mhs-&gt;pt.x, mhs-&gt;pt.y));
			}
		}

	}
	return CallNextHookEx(g_hMuseHook, nCode, wParam, lParam);
}
</code></pre>
<p>vllt könnt ihr mir weiterhelfen<br />
und <a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/9752">@Dravere</a> ich habe windows und verwende dabei winforms muss dir also recht geben</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1668177</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1668177</guid><dc:creator><![CDATA[manfredkaush]]></dc:creator><pubDate>Sun, 22 Feb 2009 16:35:00 GMT</pubDate></item><item><title><![CDATA[Reply to kopiren&#x2F;einfügen abfangen on Sun, 22 Feb 2009 19:02:40 GMT]]></title><description><![CDATA[<blockquote>
<p>Kann man nicht irgendwiewie eine normale DLL erstellen?</p>
</blockquote>
<p>Doch. Win32 Projekt, dann bei dem Wizard DLL wählen.<br />
Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1668281</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1668281</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Sun, 22 Feb 2009 19:02:40 GMT</pubDate></item><item><title><![CDATA[Reply to kopiren&#x2F;einfügen abfangen on Sun, 22 Feb 2009 19:04:31 GMT]]></title><description><![CDATA[<blockquote>
<p>ich dachte eher an sowas wie hooks</p>
</blockquote>
<p>Aja? Und was glaubst Du macht den detours?<br />
Simon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1668284</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1668284</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Sun, 22 Feb 2009 19:04:31 GMT</pubDate></item><item><title><![CDATA[Reply to kopiren&#x2F;einfügen abfangen on Mon, 23 Feb 2009 13:54:06 GMT]]></title><description><![CDATA[<p>ok danke<br />
habs jetzt gedownloadet mal sehn ob sich da was finden lässt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1668748</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1668748</guid><dc:creator><![CDATA[manfredkaush]]></dc:creator><pubDate>Mon, 23 Feb 2009 13:54:06 GMT</pubDate></item></channel></rss>