Shared libraries/DLLs
Jarrett Billingsley
kb3ctd2 at yahoo.com
Sat Feb 2 06:24:59 PST 2008
"Unknown W. Brackets" <unknown at simplemachines.org> wrote in message
news:fo0p7c$1tbq$1 at digitalmars.com...
> Okay.
>
> Example "plugin" example.d:
>
> ---
> module example;
>
> extern (C)
> export int foo();
Ohhh, _there_ it is; I think this bit got cut out of the original post :)
> I don't have the Linux loader in front of me but it's almost exactly the
> same and works just fine (LoadLibraryA => dlopen, GetProcAddress => dlsym,
> FreeLibrary => dlclose, with some dlerror logic in there.) But as stated,
> it appears that there's really no "reverse linking" of DLLs.
As in having DLLs link to symbols exported from the app? Right, it's not
possible without some hackery. I'm not sure how to do it but apparently it
can be done. I think there are restrictions on it, though.
DLLs really *are* an awful approximation of SOs :(
More information about the Digitalmars-d-learn
mailing list