extern(Windows, "user32.dll")

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Sun Feb 1 02:36:27 PST 2015


"Vladimir Panteleev"  wrote in message 
news:kksyjkgkwdfqfwhqwldb at forum.dlang.org...

> extern(Windows, "kernel32.dll") DWORD GetVersion();

export would be a better fit than extern, or a pragma.  It's probably a good 
idea to check that all object formats can actually handle an impdef in a 
normal object file.  IIRC you also need a way to specify undecorated names 
for some windows DLLs.

Seems like a good idea. 



More information about the Digitalmars-d mailing list