On 24 November 2012 01:08, Jonathan M Davis <span dir="ltr"><<a href="mailto:jmdavisProg@gmx.com" target="_blank">jmdavisProg@gmx.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">On Friday, November 23, 2012 15:15:41 Gor Gyolchanyan wrote:<br>
> As we all know, the WinAPI binding in druntime as well as the static<br>
> libraries of WinAPI, which come with DMD are in horrendous state.<br>
<br>
</div>I am not all that well acquainted with all of the issues involved with the<br>
Win32 API, so I'm probably not the best qualified to chime in on how they<br>
should be handled. However, I would point out that given that the Win32 API is<br>
effectively the system layer API for Windows, it should be fully supported in<br>
druntime (just like glibc should be fully supported for Linux by druntime),<br>
and as Walter points out, such a layer should be thin rather than trying to fix<br>
anything (that's the job of Phobos or other wrapper libraries). And since<br>
we're about to have 64-bit Windows support, druntime should be updated with<br>
whatever C prototypes are in the 64-bit Windows API (and I really don't know<br>
how those relate to the Win32 API other than the fact that as I understand it,<br>
64-bit Windows still uses some version of the Win32 API).<br>
<br>
So, I would hope that the various Windows Gurus around here could come to an<br>
agreement on how the Windows API bindings should be put into druntime and then<br>
someone (or several someones) would take the time to implement that. I don't<br>
think that we should continue with the approach that anyone doing anything<br>
serious with the Win32 API has to use a 3rd party project to do it. OS-level<br>
functions should be part of druntime for every OS that we support, and it's<br>
worthy of a bug report every time that we find an OS-level function that is not<br>
in druntime.<br></blockquote><div><br></div><div>I'm regularly annoyed by the quality of the druntime windows bindigs. I use this one: <a href="http://www.dsource.org/projects/bindings/wiki/WindowsApi">http://www.dsource.org/projects/bindings/wiki/WindowsApi</a></div>
<div>It's better.</div><div><br></div><div>I don't think there's really any room for opinion on the topic, the windows bindings should simply be complete, and correct.</div><div>It's a flat C api, I can't imagine anything in there that doesn't translate to D well.</div>
<div><br></div><div>As said before, the only details that might require some discussion are the handling of the windows version macro, and the unicode macro.</div><div>I would personally just expect to use them exactly as they are in C, and expect the user to supply the appropriate versions to D when compiling.</div>
</div></div>