<?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[WaitForDebugEvent: Fehler versteckt (kann ihn nicht finden)]]></title><description><![CDATA[<p>Hallo WinApi-Coder,</p>
<p>Irgendwo hier ist ein Fehler versteckt, kann ihn aber nicht finden. Das Program bricht sich immer selber ab :(. Ich benutze mingw compiler.</p>
<pre><code class="language-cpp">#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;windows.h&gt;

int main(int argc, char *argv[])
{
    DEBUG_EVENT *DBEvent;
    STARTUPINFO *startinfo;
    PROCESS_INFORMATION *pi;

    GetStartupInfo(startinfo);
    CreateProcessA(&quot;progdebug.exe&quot;, NULL, NULL, NULL, FALSE, DEBUG_PROCESS + DEBUG_ONLY_THIS_PROCESS, NULL, NULL, startinfo, pi);

    while(1)
    {
            WaitForDebugEvent(DBEvent, INFINITE);  
            if(DBEvent-&gt;dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT)
            {
                 MessageBox(0, &quot;Exit!!&quot;, &quot;Exit&quot;, MB_OK + MB_ICONINFORMATION);
                 break;                            
            }      
    }

    CloseHandle(pi-&gt;hProcess);
    CloseHandle(pi-&gt;hThread);

    system(&quot;PAUSE&quot;);	
    return 0;
}
</code></pre>
<p>Was ist da falsch? Danke.</p>
<p>Gruss, Tarrantel-X</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/185618/waitfordebugevent-fehler-versteckt-kann-ihn-nicht-finden</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Jul 2026 20:20:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/185618.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 Jun 2007 08:29:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WaitForDebugEvent: Fehler versteckt (kann ihn nicht finden) on Fri, 29 Jun 2007 08:29:33 GMT]]></title><description><![CDATA[<p>Hallo WinApi-Coder,</p>
<p>Irgendwo hier ist ein Fehler versteckt, kann ihn aber nicht finden. Das Program bricht sich immer selber ab :(. Ich benutze mingw compiler.</p>
<pre><code class="language-cpp">#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;windows.h&gt;

int main(int argc, char *argv[])
{
    DEBUG_EVENT *DBEvent;
    STARTUPINFO *startinfo;
    PROCESS_INFORMATION *pi;

    GetStartupInfo(startinfo);
    CreateProcessA(&quot;progdebug.exe&quot;, NULL, NULL, NULL, FALSE, DEBUG_PROCESS + DEBUG_ONLY_THIS_PROCESS, NULL, NULL, startinfo, pi);

    while(1)
    {
            WaitForDebugEvent(DBEvent, INFINITE);  
            if(DBEvent-&gt;dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT)
            {
                 MessageBox(0, &quot;Exit!!&quot;, &quot;Exit&quot;, MB_OK + MB_ICONINFORMATION);
                 break;                            
            }      
    }

    CloseHandle(pi-&gt;hProcess);
    CloseHandle(pi-&gt;hThread);

    system(&quot;PAUSE&quot;);	
    return 0;
}
</code></pre>
<p>Was ist da falsch? Danke.</p>
<p>Gruss, Tarrantel-X</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314718</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314718</guid><dc:creator><![CDATA[Tarrantel-X]]></dc:creator><pubDate>Fri, 29 Jun 2007 08:29:33 GMT</pubDate></item><item><title><![CDATA[Reply to WaitForDebugEvent: Fehler versteckt (kann ihn nicht finden) on Fri, 29 Jun 2007 08:35:36 GMT]]></title><description><![CDATA[<p>Der erste Parameter von WaitForDebugEvent muss ein Zeiger auf eine DEBUG_EVENT-Struktur sein. Der Zeiger, den du da übergibtst, zeigt irgendwo in den Speicher, aber nicht auf eine gültige Struktur, denn er ist nicht initialisiert.</p>
<p>Und gewöhn dir mal an, die Rückgabewerte von Funktionen wie CreateProcess und WaitForDebugEvent zu prüfen. Dazu sind sie da.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314721</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314721</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Fri, 29 Jun 2007 08:35:36 GMT</pubDate></item><item><title><![CDATA[Reply to WaitForDebugEvent: Fehler versteckt (kann ihn nicht finden) on Fri, 29 Jun 2007 08:46:47 GMT]]></title><description><![CDATA[<p>ja danke, es ist eh aussichtslos, hab keine winapi zur hand. werde wohl zu hause weitermachen müssen. danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1314731</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1314731</guid><dc:creator><![CDATA[Tarrantel-X]]></dc:creator><pubDate>Fri, 29 Jun 2007 08:46:47 GMT</pubDate></item></channel></rss>