On Tuesday, 31 March 2015 at 17:20:05 UTC, Charles wrote:
Hi guys,

What is the best (and/or official) source for win32 bindings?

I know there's this github project: https://github.com/AndrejMitrovic/DWinProgramming; however, it hasn't been touched in about 2 years. It's currently linked on the wiki (http://wiki.dlang.org/D_for_Win32).

I'm also aware that there's core.sys.windows.windows, but the documentation for this page is less than helpful: http://dlang.org/library/core/sys/windows/windows.html. It also seems to be missing portions of it that'd be useful (see github here: https://github.com/D-Programming-Language/druntime/tree/master/src/core/sys/windows).

So, perhaps, a better question is what do you use for win32 bindings? Are there any additional dependencies when building apps with either of these (beyond something like user32.dll for example)?

Thanks,
Charles

AFAIK, the bindings linked on the wiki page are the best you can get. If you want to use static linking, you must also download the latest Windows SDK (8.1) and transform winapi libs in OMF format using coffimplib (http://www.digitalmars.com/ctg/coffimplib.html)

Finally I ended up to use dynamic linking. When I need a function not present in std.c.windows, I translate it to D from windows C headers and I use the good old way to load it (LoadLibrary/GetProcAddress). If you are using Visual D, there is a nice menu item named "C++ Convert selection" that you can use to translate in place structs or enums copied from win C++ headers.




Reply via email to