<?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[Plugin Problem]]></title><description><![CDATA[<p>Hi,</p>
<p>Ich versuche mich auch gerade mal an Plugins. Einfach Plugins habe ich schon hinbekommen, aber das anzeigen eines Dialoges aus einer DLL haut bei mir einfach nicht hin. Die DLL Funktion sieht folgendermasen aus:</p>
<pre><code class="language-cpp">extern &quot;C&quot; PIMP3_API int MainFunc(void* pParent)
{
    CPluginDlg fenster;
    fenster.DoModal();
    return 42;
}
</code></pre>
<p>Die Routine zum laden des Plugins hat diese Form:</p>
<pre><code class="language-cpp">void CCHKCTExplorerView::OnExtrasFfneplugin() 
{
    // TODO: Code für Befehlsbehandlungsroutine hier einfügen
    typedef int (*LPMAINFUNC)(void*);
    LPMAINFUNC pMainFunc = NULL;

    CString csDLLName = &quot;D:\\Visual C Projekte\\CHKCT Explorer Plugins\\PI MP3\\Debug\\PI MP3.dll&quot;;
    HMODULE dll = LoadLibrary(csDLLName);
    if (dll==NULL)
    {
        MessageBox(&quot;Konnte das Plugin nicht laden!&quot;, &quot;Fehler&quot;, MB_ICONERROR);
        return;
    }

    pMainFunc = (LPMAINFUNC)GetProcAddress(dll, &quot;MainFunc&quot;);
    if (pMainFunc==NULL)
    {
        MessageBox(&quot;Die Funktione MainFunc konnte in der DLL nicht gefunden werden!&quot;,
            &quot;Fehler&quot;, MB_ICONERROR);
        return;
    }

    pMainFunc((void*)this);
}
</code></pre>
<p>So wie bei vielen anderen habe ich jetzt auch das Problem das der Dialog nicht angezeigt wird. Ich habs mal mit CFileDialog getestet und da hats wunderbar geklappt. Was ich beim debuggen so mitbekommen habe, ist das er anscheinend das Dialogtemplate nicht findet da er nicht in der DLL danach sucht sondern im Hauptprogramm. Dort ist dieser Dialog natürlich vollkommen unbekannt. Weiß jemand wie man das in den Griff bekommen könnte?</p>
<p>Vielen Dank im voraus<br />
George</p>
<p>[ Dieser Beitrag wurde am 15.06.2003 um 16:39 Uhr von <strong>GeorgeHomes</strong> editiert. ]</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/6204/plugin-problem</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 00:54:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/6204.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 15 Jun 2003 14:38:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Plugin Problem on Sun, 15 Jun 2003 14:38:00 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>Ich versuche mich auch gerade mal an Plugins. Einfach Plugins habe ich schon hinbekommen, aber das anzeigen eines Dialoges aus einer DLL haut bei mir einfach nicht hin. Die DLL Funktion sieht folgendermasen aus:</p>
<pre><code class="language-cpp">extern &quot;C&quot; PIMP3_API int MainFunc(void* pParent)
{
    CPluginDlg fenster;
    fenster.DoModal();
    return 42;
}
</code></pre>
<p>Die Routine zum laden des Plugins hat diese Form:</p>
<pre><code class="language-cpp">void CCHKCTExplorerView::OnExtrasFfneplugin() 
{
    // TODO: Code für Befehlsbehandlungsroutine hier einfügen
    typedef int (*LPMAINFUNC)(void*);
    LPMAINFUNC pMainFunc = NULL;

    CString csDLLName = &quot;D:\\Visual C Projekte\\CHKCT Explorer Plugins\\PI MP3\\Debug\\PI MP3.dll&quot;;
    HMODULE dll = LoadLibrary(csDLLName);
    if (dll==NULL)
    {
        MessageBox(&quot;Konnte das Plugin nicht laden!&quot;, &quot;Fehler&quot;, MB_ICONERROR);
        return;
    }

    pMainFunc = (LPMAINFUNC)GetProcAddress(dll, &quot;MainFunc&quot;);
    if (pMainFunc==NULL)
    {
        MessageBox(&quot;Die Funktione MainFunc konnte in der DLL nicht gefunden werden!&quot;,
            &quot;Fehler&quot;, MB_ICONERROR);
        return;
    }

    pMainFunc((void*)this);
}
</code></pre>
<p>So wie bei vielen anderen habe ich jetzt auch das Problem das der Dialog nicht angezeigt wird. Ich habs mal mit CFileDialog getestet und da hats wunderbar geklappt. Was ich beim debuggen so mitbekommen habe, ist das er anscheinend das Dialogtemplate nicht findet da er nicht in der DLL danach sucht sondern im Hauptprogramm. Dort ist dieser Dialog natürlich vollkommen unbekannt. Weiß jemand wie man das in den Griff bekommen könnte?</p>
<p>Vielen Dank im voraus<br />
George</p>
<p>[ Dieser Beitrag wurde am 15.06.2003 um 16:39 Uhr von <strong>GeorgeHomes</strong> editiert. ]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30108</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30108</guid><dc:creator><![CDATA[GeorgeHomes]]></dc:creator><pubDate>Sun, 15 Jun 2003 14:38:00 GMT</pubDate></item><item><title><![CDATA[Reply to Plugin Problem on Wed, 07 Jan 2009 09:00:18 GMT]]></title><description><![CDATA[<p>Schon mal die Suchfunktion benutzt ?</p>
<p>In disem Projekt kannst du sehen wie es gemacht wird.</p>
<p>[ Dieser Beitrag wurde am 16.06.2003 um 06:33 Uhr von <strong>Unix-Tom</strong> editiert. ]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30109</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30109</guid><dc:creator><![CDATA[Unix-Tom]]></dc:creator><pubDate>Wed, 07 Jan 2009 09:00:18 GMT</pubDate></item><item><title><![CDATA[Reply to Plugin Problem on Mon, 16 Jun 2003 19:51:00 GMT]]></title><description><![CDATA[<p>Doch ich hab die Suchfunktion schon benutzt. Bin auch auf den Nachfolgendes Beispeil gestoßen aber der bringt mir leider nen Feuchten weil der die DLL's nicht als Plugins sondern als &quot;Auslagerung&quot; für Dialoge verwendet. Er arbeitet ja mit der Lib Datei der DLL. Das ist bei Plugins aber in der Form nicht zu realisieren da ich ja keine Ahnung habe wie das Plugin aussieht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/30110</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/30110</guid><dc:creator><![CDATA[GeorgeHomes]]></dc:creator><pubDate>Mon, 16 Jun 2003 19:51:00 GMT</pubDate></item></channel></rss>