<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div><br class="webkit-block-placeholder"></div><div>If you just want your external to link against another dll, that happens automatically with the MinGW build system.  There are lots of externals that do this that are included in Pd-extended (as well as the DLLs).  </div><div><br class="webkit-block-placeholder"></div><div>.hc</div><br><div><div>On Mar 12, 2008, at 4:05 PM, best boy wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> ok, thank you very much for your help<br>LoadLibrary() and GetProcAddress do the job now.<br>and it seems to work :)<br>bye<br>bb<br><br>&gt; From: <a href="mailto:martin.peach@sympatico.ca">martin.peach@sympatico.ca</a><br>&gt; To: <a href="mailto:ladataxi@hotmail.de">ladataxi@hotmail.de</a>; <a href="mailto:pd-dev@iem.at">pd-dev@iem.at</a><br>&gt; Subject: RE: [PD-dev] calling external code(.dll) from pd-external(win32xp)<br>&gt; Date: Wed, 12 Mar 2008 19:00:21 +0000<br>&gt; <br>&gt; best boy<br>&gt; <br>&gt; &gt;maybe this is a misunderstanding. i try to explain.<br>&gt; &gt;i want to write a pd external (which will be a dll on win).<br>&gt; &gt;this pd external should contain code to call functions from another dll <br>&gt; &gt;which is not pd-related<br>&gt; &gt;<br>&gt; <br>&gt; I think you would still use the same two functions: LoadLibrary to load the <br>&gt; dll and GetProcAddress to find the address of the function you want to call. <br>&gt; It won't make any difference if you call the dll from another dll or an exe.<br>&gt; LoadLibrary() and GetProcAddress() are part of the Windows API and not <br>&gt; related to pd.<br>&gt; <br>&gt; Martin<br>&gt; <br>&gt; &gt; &gt;<br>&gt; &gt; &gt; This little bit from s_loader.c shows how pd loads externals, which are <br>&gt; &gt;dlls<br>&gt; &gt; &gt; on Windows:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; #ifdef MSW<br>&gt; &gt; &gt;     {<br>&gt; &gt; &gt;         HINSTANCE ntdll = LoadLibrary(filename);<br>&gt; &gt; &gt;         if (!ntdll)<br>&gt; &gt; &gt;         {<br>&gt; &gt; &gt;             post("%s: couldn't load external scheduler lib ", filename);<br>&gt; &gt; &gt;             return (0);<br>&gt; &gt; &gt;         }<br>&gt; &gt; &gt;         externalmainfunc =<br>&gt; &gt; &gt;             (t_externalschedlibmain)GetProcAddress(ntdll, "main");<br>&gt; &gt; &gt;     }<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Martin<br>&gt; <br>&gt; <br><br><hr>Kostenlos bloggen + eigene Homepage + Fotospeicher = MSN Spaces <a href="http://clk.atdmt.com/GBL/go/mcrsddsp0020000048gbl/direct/01/" target="_new">Kostenlos!</a><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">PD-dev mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:PD-dev@iem.at">PD-dev@iem.at</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://lists.puredata.info/listinfo/pd-dev">http://lists.puredata.info/listinfo/pd-dev</a></div> </blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><br class="Apple-interchange-newline"></span><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><div><br></div><div>----------------------------------------------------------------------------<br></div><div><br class="khtml-block-placeholder"></div><div>"It is convenient to imagine a power beyond us because that means we don't have to examine our own lives.", from "The Idols of Environmentalism", by Curtis White</div><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span> </div><br></body></html>