<?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[WriteProcessMemory - Memory unprotecten]]></title><description><![CDATA[<p>hallo</p>
<p>ich hab hier diesen code der mir 2 offsets patchen soll. jedoch sind die beiden stellen im speicher protected. meine frage ist also wie ich diese unprotecten kann dass ich sie patchen kann.</p>
<pre><code>#include &lt;string.h&gt;
#include &lt;iostream&gt;
#include &lt;windows.h&gt;

using namespace std;
int main() {

   HWND hwnd;
   HANDLE handle;
   DWORD id;

   unsigned address1 = 0x6F868D0;
   unsigned address2 = 0x6F868CA;

   int inject1 = 0x384;
   int inject2 = 0x5A0;

   DWORD br;

   hwnd = FindWindow(0, &quot;PK&quot;);
   cout &lt;&lt; &quot;Window found -&gt; hwnd=&quot; &lt;&lt; hwnd &lt;&lt; endl;
   GetWindowThreadProcessId(hwnd, &amp;id);
   cout &lt;&lt; &quot;ProcessID=&quot; &lt;&lt; id &lt;&lt; endl;

   handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, id);

   if(WriteProcessMemory(handle,(LPVOID)address1, &amp;inject1, sizeof(inject1), &amp;br)) {
      cout &lt;&lt; &quot;Injected first address - Done&quot; &lt;&lt; endl;
   } else {
      cout &lt;&lt; &quot;Injected first address - Failed&quot; &lt;&lt; endl;
   }

   if(WriteProcessMemory(handle,(LPVOID)address2, &amp;inject2, sizeof(inject2), &amp;br)) {
      cout &lt;&lt; &quot;Injected second address - Done&quot; &lt;&lt; endl;
   } else {
      cout &lt;&lt; &quot;Injected second address - Failed&quot; &lt;&lt; endl;
   }

   CloseHandle(handle);
   system(&quot;PAUSE&quot;);
   return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/231954/writeprocessmemory-memory-unprotecten</link><generator>RSS for Node</generator><lastBuildDate>Thu, 09 Apr 2026 13:16:22 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/231954.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 Jan 2009 17:08:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WriteProcessMemory - Memory unprotecten on Sat, 17 Jan 2009 17:08:52 GMT]]></title><description><![CDATA[<p>hallo</p>
<p>ich hab hier diesen code der mir 2 offsets patchen soll. jedoch sind die beiden stellen im speicher protected. meine frage ist also wie ich diese unprotecten kann dass ich sie patchen kann.</p>
<pre><code>#include &lt;string.h&gt;
#include &lt;iostream&gt;
#include &lt;windows.h&gt;

using namespace std;
int main() {

   HWND hwnd;
   HANDLE handle;
   DWORD id;

   unsigned address1 = 0x6F868D0;
   unsigned address2 = 0x6F868CA;

   int inject1 = 0x384;
   int inject2 = 0x5A0;

   DWORD br;

   hwnd = FindWindow(0, &quot;PK&quot;);
   cout &lt;&lt; &quot;Window found -&gt; hwnd=&quot; &lt;&lt; hwnd &lt;&lt; endl;
   GetWindowThreadProcessId(hwnd, &amp;id);
   cout &lt;&lt; &quot;ProcessID=&quot; &lt;&lt; id &lt;&lt; endl;

   handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, id);

   if(WriteProcessMemory(handle,(LPVOID)address1, &amp;inject1, sizeof(inject1), &amp;br)) {
      cout &lt;&lt; &quot;Injected first address - Done&quot; &lt;&lt; endl;
   } else {
      cout &lt;&lt; &quot;Injected first address - Failed&quot; &lt;&lt; endl;
   }

   if(WriteProcessMemory(handle,(LPVOID)address2, &amp;inject2, sizeof(inject2), &amp;br)) {
      cout &lt;&lt; &quot;Injected second address - Done&quot; &lt;&lt; endl;
   } else {
      cout &lt;&lt; &quot;Injected second address - Failed&quot; &lt;&lt; endl;
   }

   CloseHandle(handle);
   system(&quot;PAUSE&quot;);
   return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1647248</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1647248</guid><dc:creator><![CDATA[solfreki]]></dc:creator><pubDate>Sat, 17 Jan 2009 17:08:52 GMT</pubDate></item><item><title><![CDATA[Reply to WriteProcessMemory - Memory unprotecten on Sat, 17 Jan 2009 17:11:22 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-5.html" rel="nofollow">volkard</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/1647252</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1647252</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sat, 17 Jan 2009 17:11:22 GMT</pubDate></item><item><title><![CDATA[Reply to WriteProcessMemory - Memory unprotecten on Sat, 17 Jan 2009 17:34:20 GMT]]></title><description><![CDATA[<p>das geht mit <a href="http://msdn.microsoft.com/en-us/library/aa366899(VS.85).aspx" rel="nofollow">VirtualProtectEx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1647263</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1647263</guid><dc:creator><![CDATA[helferlein]]></dc:creator><pubDate>Sat, 17 Jan 2009 17:34:20 GMT</pubDate></item><item><title><![CDATA[Reply to WriteProcessMemory - Memory unprotecten on Sat, 17 Jan 2009 20:38:33 GMT]]></title><description><![CDATA[<p>hm damit gings immernoch nicht. ich habe gelesen das es gehen soll wenn ich SeDebugPrivilege aktiviere. allerdings wie muesste ich das machen? irgendwie finde ich dazu nix passendes</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1647402</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1647402</guid><dc:creator><![CDATA[solfreki]]></dc:creator><pubDate>Sat, 17 Jan 2009 20:38:33 GMT</pubDate></item><item><title><![CDATA[Reply to WriteProcessMemory - Memory unprotecten on Sat, 17 Jan 2009 21:13:39 GMT]]></title><description><![CDATA[<p>Schlag nach in der MSDN und Du findest<br />
<a href="http://msdn.microsoft.com/en-us/library/aa446619(VS.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa446619(VS.85).aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1647425</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1647425</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sat, 17 Jan 2009 21:13:39 GMT</pubDate></item></channel></rss>