<?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[DLL debuggen]]></title><description><![CDATA[<p>Hallo Forum.</p>
<p>Ich würde gerne eine selbstgeschriebene DLL debuggen, die ein Fremdprozess (in diesem Fall Matlab) aufruft. Ich habe es über &quot;An Prozess anhängen&quot; versucht, aber so geht es nicht.</p>
<p>Hat das schonmal jemand gemacht?</p>
<p>Danke im Voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/153438/dll-debuggen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Jul 2026 07:07:03 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/153438.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Jul 2006 05:20:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DLL debuggen on Mon, 17 Jul 2006 05:20:26 GMT]]></title><description><![CDATA[<p>Hallo Forum.</p>
<p>Ich würde gerne eine selbstgeschriebene DLL debuggen, die ein Fremdprozess (in diesem Fall Matlab) aufruft. Ich habe es über &quot;An Prozess anhängen&quot; versucht, aber so geht es nicht.</p>
<p>Hat das schonmal jemand gemacht?</p>
<p>Danke im Voraus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1098901</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1098901</guid><dc:creator><![CDATA[atlastraeger]]></dc:creator><pubDate>Mon, 17 Jul 2006 05:20:26 GMT</pubDate></item><item><title><![CDATA[Reply to DLL debuggen on Mon, 17 Jul 2006 05:50:43 GMT]]></title><description><![CDATA[<p>Ruf' in deiner DLL</p>
<pre><code class="language-cpp">DebugActiveProcess( DEBUG_ONLY_THIS_PROCESS );
</code></pre>
<p>auf. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> <a href="http://msdn.microsoft.com/library/en-us/debug/base/debugactiveprocess.asp?frame=true" rel="nofollow">DebugActiveProcess()</a></p>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1098905</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1098905</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Mon, 17 Jul 2006 05:50:43 GMT</pubDate></item><item><title><![CDATA[Reply to DLL debuggen on Mon, 17 Jul 2006 06:28:29 GMT]]></title><description><![CDATA[<p>Erst mal danke für den Tipp. Aber so ganz komme ich mit der MSDN nicht klar. Zu welchem Zeitpunkt muss ich das denn aufrufen, bei DllMain? Außerdem mache ich wohl noch irgendwas falsch, ich bekomme nämlich 0 zurück.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1098915</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1098915</guid><dc:creator><![CDATA[atlastraeger]]></dc:creator><pubDate>Mon, 17 Jul 2006 06:28:29 GMT</pubDate></item><item><title><![CDATA[Reply to DLL debuggen on Mon, 17 Jul 2006 06:41:08 GMT]]></title><description><![CDATA[<p>atlastraeger schrieb:</p>
<blockquote>
<p>Ich würde gerne eine selbstgeschriebene DLL debuggen, die ein Fremdprozess (in diesem Fall Matlab) aufruft. Ich habe es über &quot;An Prozess anhängen&quot; versucht, aber so geht es nicht.</p>
<p>Hat das schonmal jemand gemacht?</p>
</blockquote>
<p>Was geht nicht. Ich mache das permanent, gerade wenn ich Services und DLLs debugge die auch in Services verwendet werden.<br />
Viel wichtiger: Hast Du denn Debug Symbol mit erzeugen lassen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1098917</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1098917</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 17 Jul 2006 06:41:08 GMT</pubDate></item><item><title><![CDATA[Reply to DLL debuggen on Mon, 17 Jul 2006 07:11:26 GMT]]></title><description><![CDATA[<p>Gib' mal</p>
<pre><code class="language-cpp">#include &lt;string&gt;
#include &lt;windows.h&gt;

std::string get_errmsg( unsigned long error )
{
    void *buffer;
    FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
        0, error,
        MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ),
        reinterpret_cast&lt; char* &gt;( &amp;buffer ), 0, 0
    );

    std::string errmsg = std::string( reinterpret_cast&lt; char* &gt;( buffer ) );
    LocalFree( buffer );
    return errmsg;
}

// ...

BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
{

    if( fdwReason == DLL_PROCESS_ATTACH ) {

        if( DebugActiveProcess( DEBUG_ONLY_THIS_PROCESS ) ) {

            MessageBox( 0, get_errmsg( ).c_str( ), &quot;Error:&quot;, MB_OK );
        }
    }

    // ...
}
</code></pre>
<p>in deine DLL, würd' mich interessieren, was <em>GetLastError()</em> da in Textform liefert. Ach ja, das Projekt ist doch mit der Debug-Konfiguration Compiliert?</p>
<p>Greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1098927</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1098927</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Mon, 17 Jul 2006 07:11:26 GMT</pubDate></item><item><title><![CDATA[Reply to DLL debuggen on Mon, 17 Jul 2006 07:46:21 GMT]]></title><description><![CDATA[<p>ERROR_INVALID_PARAMETER sagt mir GetLastError()</p>
<p>Die DLL ist im Debug-Modus kompiliert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1098940</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1098940</guid><dc:creator><![CDATA[atlastraeger]]></dc:creator><pubDate>Mon, 17 Jul 2006 07:46:21 GMT</pubDate></item></channel></rss>