What is the status of dlls on windows?

Benjamin Thaut code at benjamin-thaut.de
Mon Oct 21 13:12:36 PDT 2013


Am 21.10.2013 02:05, schrieb TheFlyingFiddle:
> How complete is dll support on windows (32/64)? I'm specifically
> interested in D-to-D dlls.
>
> Can i:
>
> 1. Load phobos as a DLL
> 2. Throw exceptions over dll boundary
> 3. Use multiple threads with thread local storage in loaded dll.

D-to-D dlls are pretty much not useable because the "export" protection 
level is implemented in a way which makes it over complicated to use 
(you always need both .d and .di files) and even fails to export some 
important symbols.

If you want to export simple functions it will work. Exporting anything 
else (classes, structs, etc.) will just be overly complicated or not 
work at all.

See: http://d.puremagic.com/issues/show_bug.cgi?id=9816
and: http://wiki.dlang.org/DIP45

I tried to push DIP 45 for quite some time. The only response I got from 
Walter numerous times was that he didn't have time to take a look at it. 
The newsgroup discussion on the topic also only had 3 contributors. 
There doesn't seem to be much general interest in this topic because 
most people seem to be using D on linux. I'm planning to push this topic 
again to get some offical approval because I will never again put work 
into something D-related without getting it approved first.

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list