What on earth is std.windows.d?

jcc7 jcc7_member at pathlink.com
Thu Mar 2 10:34:36 PST 2006


In article <du6s62$14pi$1 at digitaldaemon.com>, Don Clugston says...
>
>std.windows.d is really bizarre. It has many missing APIs, even some 
>from the early days of Windows.
>For example, it has GlobalUnlock(), but not GlobalLock().
>I found I had to add some function prototypes just so I could copy text 
>to the clipboard!
>eg, EmptyClipboard(), CloseClipboard() which I suspect date from Windows 
>1.0.

If Walter's Empire game used these function, I'd bet that Walter would have
included them in std.windows. ;)

>I believe that legal issues prevent redistribution of the Windows SDK, 
>but at least we could use the public domain files from the w32api project?
>
>http://cvs.sourceforge.net/viewcvs.py/mingw/w32api/#dirlist

We should be able to use those. We'd still have to convert them to D, but we
could use them legally. I've thought about working on this, but it'd take a lot
of work. And I haven't been in the mood to start such a large project.

>I realise that anyone doing serious Windows programming is going to want 
>the lastest SDK; but unsophisticated users should be able to use D 
>out-of-the-box.

I agree. We want to make everything as easy as possible for new D users. I don't
even think that an on-going project to add new headers would be as bad as the
first port. But the first "clean" port of the headers is a huge project.

>Bit of a 1.0 showstopper, I think. There doesn't seem to be much point 
>in including a windows.d that is so incomplete. Where did it come from?
>It should at least have all the APIs that are over ten years old <g>.

I'm pretty sure the "randomness" of it comes from Walter adding things that he
wanted to use in examples that he's ported to D. And he has purposely avoided
using automatic translation on Microsoft's headers so that he doesn't violate
MS's copyright.

jcc7



More information about the Digitalmars-d mailing list