<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
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>> From: martin.peach@sympatico.ca<br>> To: ladataxi@hotmail.de; pd-dev@iem.at<br>> Subject: RE: [PD-dev] calling external code(.dll) from pd-external(win32xp)<br>> Date: Wed, 12 Mar 2008 19:00:21 +0000<br>> <br>> best boy<br>> <br>> >maybe this is a misunderstanding. i try to explain.<br>> >i want to write a pd external (which will be a dll on win).<br>> >this pd external should contain code to call functions from another dll <br>> >which is not pd-related<br>> ><br>> <br>> I think you would still use the same two functions: LoadLibrary to load the <br>> dll and GetProcAddress to find the address of the function you want to call. <br>> It won't make any difference if you call the dll from another dll or an exe.<br>> LoadLibrary() and GetProcAddress() are part of the Windows API and not <br>> related to pd.<br>> <br>> Martin<br>> <br>> > ><br>> > > This little bit from s_loader.c shows how pd loads externals, which are <br>> >dlls<br>> > > on Windows:<br>> > ><br>> > > #ifdef MSW<br>> > > {<br>> > > HINSTANCE ntdll = LoadLibrary(filename);<br>> > > if (!ntdll)<br>> > > {<br>> > > post("%s: couldn't load external scheduler lib ", filename);<br>> > > return (0);<br>> > > }<br>> > > externalmainfunc =<br>> > > (t_externalschedlibmain)GetProcAddress(ntdll, "main");<br>> > > }<br>> > ><br>> > > Martin<br>> <br>> <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></body>
</html>