Yep, I've played with it, and I can't get the D version to work as well
(DMD complains about OSVERSIONINFO and GetVersionEx undefined. The C
version below, however, seems to work well (compiles and runs fine with
DMC 8.45).

Trying to do this myself, my program failed to compile using
OSVERSIONINFO and GetVersionEx. Any Windows library I can link in?

std.c.windows.windows is missing quite a chunk of the Win32 API
definitions. Whenever something from Windows is undefined, all you need
do is look in the Windows headers for your C compiler and use that to
define them in your D module. Or am I missing something?

std.c.windows.windows is missing quite a chunk of the Win32 API
definitions. Whenever something from Windows is undefined, all you need
do is look in the Windows headers for your C compiler and use that to
define them in your D module. Or am I missing something?

Do you mean with copy+paste? Well, that might work. (Haven't tested it
yet, though.) Can we expect any legal problems from Microsoft? ;-)
Mathias

std.c.windows.windows is missing quite a chunk of the Win32 API
definitions. Whenever something from Windows is undefined, all you need
do is look in the Windows headers for your C compiler and use that to
define them in your D module. Or am I missing something?

Do you mean with copy+paste? Well, that might work. (Haven't tested it
yet, though.) Can we expect any legal problems from Microsoft? ;-)

The MSDN documentation is fair game I think. And it has callign conventions in
it. Not as fast as copy+paste, but it's something.
Sean