[PD-dev] calling external code(.dll) from pd-external(win32xp)
Martin Peach
martin.peach at sympatico.ca
Wed Mar 12 19:16:27 CET 2008
best boy wrote:
>
>hi,
>are there any examples (source.c) for calling a dll from within a pd
>external?
>
This little bit from s_loader.c shows how pd loads externals, which are dlls
on Windows:
#ifdef MSW
{
HINSTANCE ntdll = LoadLibrary(filename);
if (!ntdll)
{
post("%s: couldn't load external scheduler lib ", filename);
return (0);
}
externalmainfunc =
(t_externalschedlibmain)GetProcAddress(ntdll, "main");
}
Martin
More information about the Pd-dev
mailing list