How do you call GetVersionEx (Windows)?

Yao G. yao.gomez at spam.gmail.com
Tue Aug 24 05:44:22 PDT 2010


On Mon, 23 Aug 2010 18:47:02 -0500, Andrej Mitrovic
<andrej.mitrovich at name.com> wrote:

> I think it might be this one:
>
> http://hp.vector.co.jp/authors/VA028375/d/windows.h.html
>
> But those are old as well. Not a big deal, c linkage seems really easy  
> from D. I don't think I'll have any problems using MSDN samples with a  
> few aliases sprinkled here and there. :)

I was referring to the *.lib files that are needed to link to the "extern"
functions (gdi32.lib, kernel32.lib, user32.lib, etc.). The ones that come
with DMD are very outdated (lib folder). I had a lot of linking issues
with those files. But as the japanese guy wrote on that page, maybe you
could create your own files using implib / coff2omf (sold separately).

Also, there's a project on dsource with more updated Windows API headers.
Look for the bindings projects. They use a combination of static ifs that
control what type of structures and functions will be defined (ASCI or
Unicode), and what Operating System will be targeted (almost like the
original C files).

For my projects, I rolled my own headers. They are based (like the ones on
dsource) on the MinGW32 project. But mine target Windows 2000 as minimal
O.S. and use exclusively UTF-32 (the ASCI versions are not defined). Also,
some functions for newer O.S. are declared as function pointers (so you
can link to them dynamically). They are incomplete, maybe buggy in some  
cases,
but I think that could come handy in my Windows projects.

-- 
Yao G.


More information about the Digitalmars-d-learn mailing list