extern(Windows, "user32.dll")

Vladimir Panteleev via Digitalmars-d digitalmars-d at puremagic.com
Sun Feb 1 04:02:04 PST 2015


On Sunday, 1 February 2015 at 11:50:21 UTC, Benjamin Thaut wrote:
> Sorry, I did jump over the "not" in :

OK, I'm glad that was just a misunderstanding.

> No, you just need to wait like everyone else until I do the PR 
> for dmd / druntime / phobos for a full explanation. If you 
> don't want to wait until then just read the source code: 
> https://github.com/Ingrater/dmd/tree/DllSupport

OK, the explanation is no longer relevant.

But I haven't heard of this project before. In a few words, what 
does this do? Or a link to a DIP or existing discussion?

> Thats why its called a proof of concept, it doesn't mean its 
> perfect ;-)

OK, but you can't solve these problems without using DLL imports, 
can you?

> But the TLS issues are going to remain no matter if the dll is 
> loaded via LoadLibrary or not.

That's not how I understood it.

> Also there are TLS fixes in core.sys.windows.dll for Windows XP.

Cool, didn't know that. That argument isn't relevant, then.

> But still, adding a feature for the sole purpose to link 
> against Windows System Dlls is just overkill.
>
> But feel free to go ahead and try getting it past Andrei and 
> Walter. Just don't expect my support. Recently even the int[$] 
> = [1,2,3,4] feature was killed off because it could be 
> implemneted in a library. So I highly doubt that they are OK 
> with adding a feature for importing Windows System Dlls only.

But it's not just system Windows libraries, but all DLLs with a C 
interface. You won't need to mess with import libraries to load 
curl, or OpenSSL, or SQLite...


More information about the Digitalmars-d mailing list