<?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[Problem mit SuspendThread + Handle von DebugEvent.u.CreateThread.hThread]]></title><description><![CDATA[<p>Seit gegruesst,</p>
<p>mein Programm versucht sich mit DebugActiveProcess an einen Prozess zu haengen und im spaeteren Verlauf alle Threads schlafen zu legen(wie des halt jeder normale Debugger kann).</p>
<p>Nachdem ich mich mit DebugActiveProcess angehaengt habe, warte ich auf die DEBUG_EVENTS, die direkt danach gesendet werden, um mich ueber den aktuellen stand des Prozesses aufklaeren, und speicher die Threadhandels, sobald der DebugEventCode CREATE_THREAD_DEBUG_EVENT ist, in einem Array.<br />
Zu einem spaeteren Zeitpunkt versuche ich mit SuspendThread + die vorher gespeicherten Handels die Threads schalfen zu legen.<br />
Leider klappt das nicht.</p>
<p>return value -1<br />
und<br />
GetLastError liefert: 6 (invalid handle value).</p>
<p>Aber laut der MSDN:</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>CREATE_THREAD_DEBUG_INFO Structure</p>
<p>Members</p>
<p>hThread</p>
<p>A handle to the thread whose creation caused the debugging event. If this member is NULL, the handle is not valid. Otherwise, the debugger has THREAD_GET_CONTEXT, THREAD_SET_CONTEXT, and THREAD_SUSPEND_RESUME access to the thread, allowing the debugger to read from and write to the registers of the thread and control execution of the thread.</p>
</blockquote>
<p>Sollte alles funktioniern.</p>
<p>Waere ueber hilfe erfreut <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>
<p>Peace &amp; Blessed Love C0de4Fun</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/240436/problem-mit-suspendthread-handle-von-debugevent-u-createthread-hthread</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Apr 2026 08:35:55 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/240436.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 06 May 2009 15:20:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit SuspendThread + Handle von DebugEvent.u.CreateThread.hThread on Wed, 06 May 2009 15:20:15 GMT]]></title><description><![CDATA[<p>Seit gegruesst,</p>
<p>mein Programm versucht sich mit DebugActiveProcess an einen Prozess zu haengen und im spaeteren Verlauf alle Threads schlafen zu legen(wie des halt jeder normale Debugger kann).</p>
<p>Nachdem ich mich mit DebugActiveProcess angehaengt habe, warte ich auf die DEBUG_EVENTS, die direkt danach gesendet werden, um mich ueber den aktuellen stand des Prozesses aufklaeren, und speicher die Threadhandels, sobald der DebugEventCode CREATE_THREAD_DEBUG_EVENT ist, in einem Array.<br />
Zu einem spaeteren Zeitpunkt versuche ich mit SuspendThread + die vorher gespeicherten Handels die Threads schalfen zu legen.<br />
Leider klappt das nicht.</p>
<p>return value -1<br />
und<br />
GetLastError liefert: 6 (invalid handle value).</p>
<p>Aber laut der MSDN:</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>CREATE_THREAD_DEBUG_INFO Structure</p>
<p>Members</p>
<p>hThread</p>
<p>A handle to the thread whose creation caused the debugging event. If this member is NULL, the handle is not valid. Otherwise, the debugger has THREAD_GET_CONTEXT, THREAD_SET_CONTEXT, and THREAD_SUSPEND_RESUME access to the thread, allowing the debugger to read from and write to the registers of the thread and control execution of the thread.</p>
</blockquote>
<p>Sollte alles funktioniern.</p>
<p>Waere ueber hilfe erfreut <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>
<p>Peace &amp; Blessed Love C0de4Fun</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1706572</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1706572</guid><dc:creator><![CDATA[C0de4Fun]]></dc:creator><pubDate>Wed, 06 May 2009 15:20:15 GMT</pubDate></item></channel></rss>