Is there a way to do 2-way linking?

Jeroen Bollen jbinero at gmail.com
Wed Feb 5 07:36:21 PST 2014


On Wednesday, 5 February 2014 at 13:52:10 UTC, Benjamin Thaut 
wrote:
> Am 05.02.2014 14:21, schrieb Jeroen Bollen:
>> Is it possible to load in a dynamic library in D, and have the 
>> library
>> you just loaded call your own functions? Imagine having a 
>> plugin loader
>> and the plugins call methods like 'addButton()' from the host 
>> application.
>
> Yes, thats what core.runtime.loadLibrary is for.
> http://dlang.org/phobos/core_runtime.html#.Runtime.loadLibrary
>
> You can also always fall back to operating system functions 
> like, LoadLibrary and GetProcAddress for windows.
>
> Kind Regards
> Benjamin Thaut

How exactly does that work 2 ways? Can I just define the 
functions and not implement them in the library?


More information about the Digitalmars-d mailing list