Is there a way to do 2-way linking?

Benjamin Thaut code at benjamin-thaut.de
Wed Feb 5 05:52:10 PST 2014


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


More information about the Digitalmars-d mailing list