cURL / Mailing Lists / curl-library / Single Mail


RE: Win32 use of GetVersionEx()

From: Steve Holme <>
Date: Sun, 19 Jan 2014 15:06:27 +0000

On Sat, 18 Jan 2014, Myria wrote:

> Sorry for the delayed reply. That you've already committed is
> fine, as the critical issue was the VER_EQUAL instead of

I still can't believe that ended up in my pushed commit :(

Thanks again for pointing it out.

> > What about ASCII builds - won't using the wide function and
> > struct break that as a supported build platform?
> No, because builds intended for Windows 9x use already have
> to disable this code. Even without UNICODE #define'd, you can still
> explicitly call the W variants of Win32 functions should you desire.
> You just have to make sure that you don't break the interface
> expected by your library's users - and here, that's not a problem, as
> this is internal code.

Of course... I knew you could call either as the #defined simply points to
the W or A version but I had never thought of ever calling the wide variant
from an ASCII based app :-/

> It took me longer to write this reply than the sum of every computer
> will *ever* waste calling the A version.

But you did help me realise a couple of things so thank you - Even after
nearly 20 years of coding for Windows ;-)

> > If it was outside the function, or a modern version of a #define at
> > the top of the source file (for example) I would have no hesitation in
> > using static const DWORD but is there any benefit over just a const
> > DWORD? As such I haven't made either modification yet and await
> > feedback ;-)
> I don't think it matters in *this* case, but in general, it does matter.

Had it of been a c string or array/struct that wasn't going to change then I
would have declared it as static but I guess I'm a little lazy when it comes
to int type variables :(

Cheers again for your input - it is much appreciated.

Kind Regards

List admin:
Received on 2014-01-19