Coming soon (probably): Windows SDK Version header
I'm excited to announce that in the RTM Windows SDK for Windows Server 2008 release, we'll be considering adding a new file to the SDK that many users have been asking for: a way to determine which build of the SDK is installed on disk, and a way to determine what the highest available versions are on the user's disk.
This has long been an ask both from the SDK MVPs and from the Visual C++ team, and the intent is that this file work as essentially a reference that you can leverage for more efficient programming. Rather than have to track down the highest OS version that SDK content is coded against, this macro will provide you that data right at your fingertips.
This is being considered as a DCR against that release, but due to the low cost of adding this file to the SDK release, I have every expectation that the DCR will pass.
Please, if you get a chance and you're interested in this functionality, post a comment with your opinions on it. Thanks!
/*
Copyright (c) Microsoft Corporation. All rights reserved.
Module Name:
WinSDKVer.h
Abstract:
Master include file for versioning the Windows SDK.
*/
#ifndef _INC_WINSDKVER
#define _INC_WINSDKVER
#pragma once
/* _WINSDOWSSDK version constants Note: In the below listing, the first two digits represent the operating system major version number. For Windows Vista, this is 06. The next two digits, 01, represent the operating system minor version number. For Windows Server 2008, this is 01. The remaining characters, 40D9, represent the build number of the operating system. The hexadecimal value 40D9 is 16601 decimal. The revision is the revision of the Windows SDK build and is an arbitrary number; in this case 01. That number will revise as each preliminary or RTM version of this SDK is released. */
#define WINDOWSSDK 0x060140D9
//Windows SDK for Windows Server 2008 is version 01
#define WINDOWSSDK_REVISION 0x7E
#define WINDOWSSDK_MAJOR_MASK 0xFF000000
#define WINDOWSSDK_MINOR_MASK 0x00FF0000
#define WINDOWSSDK_VERSION_MASK 0x00FF0000
#define WINDOWSSDK_MAJOR (ver) (ver>>24)
#define WINDOWSSDK_MINOR (ver) (ver&WINDOWSSDK_MINOR_MASK) >> 16)
#define WINDOWSSDK_VERSION (ver) (ver&WINDOWSSDK_VERSION_MASK)
// This list contains a list of all releases of the Windows SDK and will be appended with additional releases as they are added.
#define _WIN32_WINSDK_WS03_R2 0x0502 // Windows SDK for Windows Server 2003 R2
#define _WIN32_WINSDK_VISTA 0x0600 // Windows SDK for Windows Vista and .NET Framework 3.0
#define _WIN32_WINSDK_VISTA_UPDATE 0x0600 // Windows SDK for Windows Vista and .NET Framework 3.0 Update
#define _WIN32_WINSDK_VISTA_ORCAS 0x0600 // Windows SDK Components for Visual Studio 2008
#define _WIN32_WINSDK_WS08 0x0610 // Windows SDK for Windows Server 2008 and .NET Framework 3.5
// This term lists the highest product version for which the SDK can be written, per the list above.
#define _WIN32_MAXWINVER 0x0600
#define _WIN32_WINDOWS_MAXVER 0x0610
#define NTDDI_MAXVERSION 0x0610
#define _WIN32_IE_MAXVERSION 0x0700
#define _WIN32_WINNT_MAXVERSION 0x0600
#define WINVER_MAXWINVER 0x0600
#endif
Comments
- Anonymous
September 30, 2007
PingBack from http://www.artofbam.com/wordpress/?p=4120