Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#519 sdkddkver.h

closed-fixed
Earnie Boyd
w32api (251)
2012-07-29
2012-07-06
Earnie Boyd
No

Microsoft is now using a sdkddkver.h file to help define which versions of the OS are supported. It is mostly documented at http://msdn.microsoft.com/en-us/library/aa383745\(VS.85).aspx with a few items of the patch coming from comments on social.microsoft.com.

Discussion

1 2 > >> (Page 1 of 2)
  • Keith Marshall
    Keith Marshall
    2012-07-07

    Looks good to me, but there are two aspects which don't seem quite right: as I read MSDN, (and Raymond Chen's blog, at http://blogs.msdn.com/b/oldnewthing/archive/2007/04/11/2079137.aspx\), Microsoft's current intent is that we should no longer define WINVER or _WIN32_WINNT, but rather we should define only NTDDI_VERSION, and leave sdkddkver.h to provide appropriately consistent definitions for all of WINVER, _WIN32_WINNT, and even _WIN32_IE; (at least, in theory -- some community comments suggest that it doesn't quite work,in practice). Your implementation omits _WIN32_IE entirely, and, unless I'm missing something, reverses the associativity of the relationship between NTDDI_VERSION and _WIN32_WINNT/WINVER.

    Additionally, this

    +#ifndef WINVER
    +# ifdef _WIN32_WINNT
    +# define WINVER _WIN32_WINNT
    +# else
    +# warning WINVER is defaulting to _WIN32_WINNT_WIN2K
    +# define WINVER _WIN32_WINNT_WIN2K
    +# endif
    +#endif

    block can never be reached with _WIN32_WINNT remaining undefined, (it is immediately preceded by a block which ensures that it is defined), so the inner #Ifdef ... #else is redundant: the #else clause can NEVER be reached. You may wish to revise this logic.

     
  • Earnie Boyd
    Earnie Boyd
    2012-07-12

    I've updated the patch file to check for a defined NTDDI_VERSION to default _WIN32_WINNT. If both are defined but not matching I give an error stating so. I also added NTDDI_WIN6 and NTDDI_WIN6SP1 but the other macros are meaningless since the service pack they represent do not exist.

     
  • Keith Marshall
    Keith Marshall
    2012-07-12

    > I've updated the patch file ...

    I don't see that here; perhaps you've just not yet gotten around to uploading it?

     
  • Peter Rosin
    Peter Rosin
    2012-07-12

    > ...but the other macros are meaningless...

    Even so, they are there in the PSDK. Not that I care all that much...

     
  • Earnie Boyd
    Earnie Boyd
    2012-07-12

    Guess I must have forgot to click the Upload button. The file is changed now, I removed the older version.

    We cannot just copy PSDK.

     
  • Earnie Boyd
    Earnie Boyd
    2012-07-16

    • assigned_to: ir0nh34d --> earnie
     
  • Earnie Boyd
    Earnie Boyd
    2012-07-16

    Any other comments on this? I prefer not to add MACRO for service packs that do not exist. I would like to commit this to CVS soon.

     
1 2 > >> (Page 1 of 2)