<?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[[Detour] BitBlt]]></title><description><![CDATA[<p>Tag Jungs und Mädels,</p>
<p>Da ich mich nun seit geraumer Zeit mit Detours beschäftige wollte ich mich mal an die Funktion BitBlt setzen.<br />
Der Erste Detour war ein Versuch mit Sleep, was auch alles super geklappt hat.<br />
Nun habe ich alles genau so übernommen, doch er will einfach nicht injecten(egal welcher prozess).</p>
<pre><code class="language-cpp">typedef BOOL (WINAPI* BitBlt_t)(HDC hdcDest,int nXDest,int nYDest,int nWidth,int nHeight,HDC hdcSrc,int nXSrc,int nYSrc,DWORD dwRop);
BitBlt_t pBitBlt = NULL;
DWORD dwBitBlt;

BOOL WINAPI BitBlt_hook(HDC hdcDest,int nXDest,int nYDest,int nWidth,int nHeight,HDC hdcSrc,int nXSrc,int nYSrc,DWORD dwRop)
{
    MessageBox(0, L&quot;LOLz!11 SCREENSHOT&quot;, 0, 0);

    return pBitBlt(hdcDest,nXDest,nYDest,nWidth,nHeight,hdcSrc,nXSrc,nYSrc,dwRop);
}

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					  )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
	dwBitBlt = (DWORD)GetProcAddress(GetModuleHandle((LPCWSTR)&quot;gdi32.dll&quot;), &quot;BitBlt&quot;);
	pBitBlt = (BitBlt_t)DetourFunction((PBYTE)dwBitBlt, (PBYTE)BitBlt_hook);
	break;

	case DLL_PROCESS_DETACH:
	DetourRemove((PBYTE)dwBitBlt, (PBYTE)BitBlt_hook);
	break;
	}
	return TRUE;
}

//
</code></pre>
<p>PS: Injecte mit &quot;Winject&quot; (er vesucht es mit 2 Metoden [RemoteLoadLibary u. DetourInjecting])</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/218403/detour-bitblt</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 07:11:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/218403.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 20 Jul 2008 16:25:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Detour] BitBlt on Sun, 20 Jul 2008 16:25:13 GMT]]></title><description><![CDATA[<p>Tag Jungs und Mädels,</p>
<p>Da ich mich nun seit geraumer Zeit mit Detours beschäftige wollte ich mich mal an die Funktion BitBlt setzen.<br />
Der Erste Detour war ein Versuch mit Sleep, was auch alles super geklappt hat.<br />
Nun habe ich alles genau so übernommen, doch er will einfach nicht injecten(egal welcher prozess).</p>
<pre><code class="language-cpp">typedef BOOL (WINAPI* BitBlt_t)(HDC hdcDest,int nXDest,int nYDest,int nWidth,int nHeight,HDC hdcSrc,int nXSrc,int nYSrc,DWORD dwRop);
BitBlt_t pBitBlt = NULL;
DWORD dwBitBlt;

BOOL WINAPI BitBlt_hook(HDC hdcDest,int nXDest,int nYDest,int nWidth,int nHeight,HDC hdcSrc,int nXSrc,int nYSrc,DWORD dwRop)
{
    MessageBox(0, L&quot;LOLz!11 SCREENSHOT&quot;, 0, 0);

    return pBitBlt(hdcDest,nXDest,nYDest,nWidth,nHeight,hdcSrc,nXSrc,nYSrc,dwRop);
}

BOOL APIENTRY DllMain( HMODULE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					  )
{
	switch (ul_reason_for_call)
	{
	case DLL_PROCESS_ATTACH:
	dwBitBlt = (DWORD)GetProcAddress(GetModuleHandle((LPCWSTR)&quot;gdi32.dll&quot;), &quot;BitBlt&quot;);
	pBitBlt = (BitBlt_t)DetourFunction((PBYTE)dwBitBlt, (PBYTE)BitBlt_hook);
	break;

	case DLL_PROCESS_DETACH:
	DetourRemove((PBYTE)dwBitBlt, (PBYTE)BitBlt_hook);
	break;
	}
	return TRUE;
}

//
</code></pre>
<p>PS: Injecte mit &quot;Winject&quot; (er vesucht es mit 2 Metoden [RemoteLoadLibary u. DetourInjecting])</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1550305</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1550305</guid><dc:creator><![CDATA[THE_pigeon]]></dc:creator><pubDate>Sun, 20 Jul 2008 16:25:13 GMT</pubDate></item><item><title><![CDATA[Reply to [Detour] BitBlt on Sat, 27 Sep 2008 08:24:01 GMT]]></title><description><![CDATA[<p>hallo!</p>
<p>woran merkst du,dass er &quot;nicht injecten will&quot;?</p>
<p>an deiner stelle würde ich mir einen prozess suchen,der sicher bitblt benutzt,deine dll injecten(eventl vorher debug privilegien setzen) und dann ollydbg an den prozess attachen -&gt; alt + e -&gt; module liste anschauen ,ob dein modul dort auftaucht(vorrausgesetzt du unlinkst dein modul nicht(peb hiding) oder benutzt manuelles mapping)</p>
<p>falls es auftaucht ist es auch geladen,nächster schritt ist dann zu checken ob dein hook gesetzt ist:</p>
<p>strg + g -&gt; BitBlt -&gt; schaun welche opcodes an der adresse sind,ein gewöhnlicher jmp detour schreibt einen E9 opcode...</p>
<p>falls dein modul erst gar nicht geladen ist würde ich selbst einen loader schreiben und mit minimalcode testen (zb. einfach MsgBox in DLLMAIN),ist ja keine große sache <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1588901</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1588901</guid><dc:creator><![CDATA[MaxGru]]></dc:creator><pubDate>Sat, 27 Sep 2008 08:24:01 GMT</pubDate></item><item><title><![CDATA[Reply to [Detour] BitBlt on Sat, 27 Sep 2008 11:12:34 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-14199.html" rel="nofollow">Phoemuex</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-15.html" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-4.html" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1588994</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1588994</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sat, 27 Sep 2008 11:12:34 GMT</pubDate></item></channel></rss>