Professional Documents
Culture Documents
1. Welcome
Welcome to the Microsoft Windows Software Development Kit (SDK) for Windows 7 and .NET Framework 4.
The Windows SDK contains a set of tools, code samples, documentation, compilers, headers, and libraries that
developers can use to create applications that run on Microsoft Windows. You can use the Windows SDK to
write applications using the native (Win32/COM) or managed (.NET Framework) programming model.
For access to additional resources and information, such as downloads, forum posts, and the Windows SDK team
blog, go to the Windows SDK Developer Center.
1.1 What’s New in the Windows SDK for Windows 7 and .NET Framework 4 Release?
Smaller/Faster: at less than 600MB, this SDK is one third the size of the Windows 7 RTM SDK; it installs
faster and has a smaller footprint.
Cleaner setup: features on setup screens have been grouped into native, managed, and common
buckets to help you choose the components you need faster.
New Microsoft Help System v1.0: this brand new system was first introduced with Visual Studio
2010. You can import just the content you need from the MSDN cloud, and update it according to your
schedule.
Visual C++ 2010 compilers/CRT with improved compilation performance and speed. These are the
same compilers and toolset that ships with Visual Studio 2010.
New command line build environment that uses MSBuild 4.0, now the common Microsoft build system
for all languages, and supporting the new Visual C++ project type .vcxproj.
1.2 What Does the Windows SDK for Windows 7 and .NET Framework 4 Support?
Operating Systems: You can install this SDK on and/or create applications for Windows 7, Server 2008
R2, Server 2008, XPSP3, Vista, and Windows Server 2003 R2.
Platform architecture: you can install this SDK on and/or create applications for platform chipsets X86,
X64, and IA64 (Itanium).
.NET Framework: you can use the SDK resources to create applications that target .NET Framework
versions 2.0, 3.0, 3.5, 4.
Visual Studio: you can use the resources in this SDK with Visual Studio versions 2005, 2008, and 2010,
including Express editions. (Not all features work with all versions of Visual Studio. For example, you
can’t use the .NET 4 tools with Visual Studio 2008.)
Setup/Install options: Win SDK v7.1 will be available through an ISO or a Web setup download and
install experience. Web setup allows you to install selected components of the SDK without having to
download the entire SDK. The DVD ISO setup allows you to download the entire SDK to install later, or
share among different computers.
1.3.1 Documentation
The DExplore document viewer that shipped with previous SDKs is no longer delivered via the SDK, and
documentation is no longer delivered in-box with the SDK. You’ll be prompted at the end of SDK setup to
download documentation to your computer using the Microsoft Help System if you wish to do so.
1.3.3 Tools
The following tools were included in the Windows SDK for Server 2008 and .NET Framework 3.5 release, but are
not included in this release:
Tools Removed in the Windows SDK for Windows 7 and .Net Framework 4
UISpy.exe
Wpt_arch.msi
2. License Agreement
The contents included in the Windows SDK are licensed to you, the end user. Your use of the SDK is subject to
the terms of an End User License Agreement (EULA) accompanying the SDK and located in the \License
subdirectory. You must read and accept the terms of the EULA before you access or use the SDK. If you do not
agree to the terms of the EULA, you are not authorized to use the SDK.
4. Build Environment
4.1 Moving From the VCBuild to the MSBuild 4.0 Environment
Visual C++ 2010 moved to newer build system (MSBuild v4.0) to provide better performance, scalability and
extensibility. In order for the build system migration to happen the project file format in Visual C++ 2010 had to
change to a different format in order to be compatible with the new MSBuild v4.0 file format (earlier versions of
Visual C++ have used VCBuild as their build system). The extension of the new Visual C++ 2010 project file has
been changed from “.vcproj” to “.vcxproj”. Project files with the “.vcproj” extension can be upgraded using the
vcupgrade tool (included in this release of the SDK). For more information on how to upgrade a project file, see
section titled “Upgrading Projects to Visual C++ 2010.”
Usage:
VCUpgrade [options] <project file>
Options:
-nologo Suppresses the copyright message
-nocolor Do not output error and warning messages in color
-overwrite Overwrite existing files
-PersistFramework Keep the Target Framework Version while upgrading. (-p)
The vcupgrade tool can upgrade any project version from VC6 through VC 2008 to the VC 2010 format, and
returns a success message if the conversion succeeded. If unsuccessful, a message listing conversion errors is
returned.
5. Documentation
The new Microsoft Help System allows you to view documents on the MSDN Library using a standard browser,
and select documents to download from the MSDN Online content publication web site (MSDN cloud) to your
computer for viewing when a connection to the Internet is unavailable or undesired. You can download, update
or delete content on your own schedule.
The Microsoft Help System is also delivered via Visual Studio 2010.
If you select the Microsoft Help System during SDK setup, you will be prompted at the end of SDK setup to
import documentation to your computer using the Help Library Manager. You will be prompted to select a
location for content to be stored on your computer’s hard drive. You may select the default location to store
content on your computer at this time only. The content store location cannot be changed later.
Microsoft Help System is the replacement for the Document Explorer (DExplore) help viewer that was delivered
in earlier versions of the Windows SDK. The Document Explorer has been deprecated.
The vcupgrade tool cannot upgrade a project which has a reference to another project.
Proposed workaround:
Run the tool from the solution directory.
6.1.3 Windows 7 SDK with Visual C++ 2005: Failure to compile in Debug mode.
If your usage scenario matches the one listed below, you will be unable to debug in the Windows SDK command
line build environment or Visual Studio 2005 SP1.
Symptom: You have an .lib file or an .obj file that exposes C interfaces that was built by using Microsoft Visual
C++ 2008 or for Windows 7. You add this file to a project as a link dependency. When you build the project in
Microsoft Visual Studio 2005 Service Pack 1 (SP1) to generate an .exe file or a .dll file, you may receive the
following link error:
Fatal error LNK1103: debugging information corrupt
Cause: This problem occurs because of a compatibility issue between Visual Studio 2005 and Visual Studio 2008
versions. For more information, see the Microsoft Support page for the patch:
http://support.microsoft.com/kb/949009/.
Fix: Install the patch for Visual Studio 2005 SP1 available from: http://support.microsoft.com/kb/949009/.
6.1.4 Platform Used in /p:platform=[target platform] and setenv [target platform] Must Match
If you encounter one of the following error messages, make sure that platform in /p:platform=[target platform]
and setenv [target platform] match.
Error messages:
You are attempting to build an AMD64 application from an x86 environment.
You are attempting to build an Itanium (IA64) application from an x86 environment.
You are attempting to build a Win32 application from an x64 environment.
You are attempting to build an Itanium (IA64) application from an x64 environment.
You are attempting to build a Win32 application from an Itanium (IA64) environment.
You are attempting to build an AMD64 application from an Itanium (IA64) environment.
6.2.2 Documentation about the Windows SDK is not available on the MSDN Cloud
A new Windows SDK node will be created in the MSDN cloud for the RTM release of the SDK. This node will
contain Windows SDK specific content. This content is not available for the Beta release of the SDK.
6.2.3 Microsoft Help System remains after uninstall of the Windows SDK
Help Viewer is a separate entry in Programs and Features (Add/Remove Programs in pre-Vista OSes) and will not
be uninstalled when the Windows SDK is uninstalled. The Help Viewer must be uninstalled separately.
6.2.4 Help Library Manager will not update/synch content if Internet connection is not available
The Help Library Manager requires an Internet connection in order to connect to the MSDN cloud to update or
synch content. If you attempt to synch offline content with updated documentation available in the MSDN
cloud, you will receive an error message that a network connectivity problem has occurred.
6.2.6 The Help Viewer is not supported on computers with an Itanium (IA64) chip
The Help Viewer will not install on a computer that is using an Itanium (IA64) processor. A Help Viewer option
will not be available when installing the Windows SDK on a computer with an Itanium (IA64) processor.
6.2.7 Help Library Manager requires Administrator permission to update content
For security purposes, the Help Library Manager installs content to a location that is locked down to users who
are not members of the HelpLibraryUpdaters security group. Non-members cannot update, add or delete
content to the store. This security group is created during setup, and by default, it includes the administrators
group and the user account that created the local store. To enable support for multiple users (non-
administrators) to update content on the machine, an administrator must add the additional accounts to the
HelpLibraryUpdaters security group.
6.3.2 The Command-Line Environment for the Windows SDK Configuration Tool Supports Only
Visual Studio 2008
The command-line environment for The Windows SDK Version Selection tool supports only Visual Studio 2008. It
does not support earlier versions of Visual Studio.
In order for the tool to function correctly we recommend installing any Visual Studio 2008 Express edition to
obtain the required version of the MFC Runtime.
NOTE: This does not occur with the .NET Framework 4 version of GuidGen.exe.
6.3.5 OLE-COM Object Viewer (OLEView.exe) – error message appears and some tool functions
are unavailable if tool is not run for the first time with administrator permissions.
If the first run of the OLE-COM Object Viewer tool is not done with administrator permissions the following error
message will appear:
DllRegisterServer in IVIEWERS.DLL failed. OLEViewer will operate correctly without
this DLL, however you will not be able to use the interface viewers.
To avoid this issue use “Run as administrator” when you run the tool for the first time.
6.3.6 FXCop Setup is Now Located Under the Window SDK “\Bin” Directory.
The installer for FXCop, fxcopsetup.exe, is now located in [Program Files]\Microsoft
SDKs\Windows\v7.1\Bin\FXCop.
6.3.7 Windows SDK Configuration Tool Does Not Update Visual Studio 2008 Paths for Itanium
Headers and Libraries
Symptom: When the Windows SDK Configuration Tool is used to integrate the Windows 7 SDK with Visual
Studio 2008, the Visual C++ Directories for headers and libraries are set to point to the Windows 7 SDK
content for x86 and x64 platforms only. Visual Studio will still point to the IA64 headers, libraries and tools
that ship with Visual Studio 2008.
Fix: Open Visual Studio 2008, Select Tools->Options->Projects and Solutions->C++ Directories. From the
‘Platform’ drop-down, Select ‘Itanium’ and from the “Show directories for” drop-down select ‘Include files’.
Replace all instances of ‘WindowsSDKDirIA64’ with ‘WindowsSDKDir’. Select ‘Library files’ from the “Show
directories for” drop down menu and repeat the previous step.
6.3.8 Windows UI Automation May Fail When Using AccEvent or Inspect on Windows XP,
Windows Vista, Windows Server 2003 R2 or Windows Server 2008
AccEvent
Symptom in UIA Events Mode: Start AccEvent, Select Mode, Select UIA Event, Select Settings. An error occurs
stating “Accessible Event Watcher (32-bit UNICODE Release) has encountered a problem and needs to
close. We are sorry for the inconvenience.”
Symptom in WinEvents Mode: Start AccEvent, Select Mode menu, Select WinEvents (In Context) or WinEvents
(Out of Context), Select Events menu, Select Start Listening. At the bottom corner of the screen a message is
displays stating “Registration failed, Stopped”.
Cause: The latest Automation API is not present on the machine. For more information, see the Microsoft
Support page for the Windows Automation API: http://support.microsoft.com/kb/971513
Fix: Install the latest Windows Automation API available from: http://support.microsoft.com/kb/971513
Inspect
Symptom: When starting Inspect an error occurs stating “The program was unable to query the UI Automation
client interfaces. Please confirm that the latest framework is installed.”
Cause: The latest Automation API is not present on the machine. For more information, see the Microsoft
Support page for the Windows Automation API: http://support.microsoft.com/kb/971513
Fix: Install the latest Windows Automation API available from: http://support.microsoft.com/kb/971513
6.4 Samples
6.4.1.2 Building Samples Using Visual Studio 2010 or Windows SDK v7.1 (MSBuild 4.0)
Visual Studio 2010 and the Windows SDK v7.1 use the MSBuild 4.0 build environment. The Visual C++ compilers
shipped in the Windows SDK v7.2 are the same compilers that ship in Visual Studio 2010 RTM. All Native
samples project and solution files in the Windows SDK v7.1 must be upgraded prior to building using the
MSBuild 4.0 environment.
NOTE: For more information about upgrading sample to build in the MSBuild 4.0 build environment, see section
titled “Moving From the VCBuild to the MSBuild 4.0 Environment”.
6.4.2 Some C++ Samples will not Build in Visual Studio 2005
Some of the samples in the SDK contain v9.0 project files, which will not build in Visual Studio 2005. You cannot
downgrade the project files to a lower version. To workaround this issue, install Visual Studio 2008 or 2010
(Express or Retail SKU) or build the sample in the Windows SDK command line build environment.
fatal error C1083: Cannot open include file: 'afxwin.h': No such file or directory
To workaround this issue, install a non-Express version of Microsoft Visual Studio with the compatible MFC/ATL.
6.4.3.2 Windows Media Player Dependency
The Multimedia\WMP_11\dotNet\SchemaReader sample requires Windows Media Player 11 or later to be
installed.
6.4.3.3 Microsoft Management Console 3.0 Dependency
The samples in the \Samples\SysMgmt\MMC3.0 directory require Microsoft Management Console 3.0 or
later to be installed.
6.4.3.4 DirectX SDK Dependency
Some samples require the DirectX SDK (refer to the sample's readme for additional information).
6.4.3.5 msime.h Dependency
Some samples fail to build because the file msime.h is not found. Msime.h is not shipped with the Windows SDK.
Msime.h is for use by developers when customizing applications for the 2007 Microsoft Office System.
The affected samples are:
winui\Input\tsf\TSFApps\ImmPad-Interim
winui\Input\tsf\TSFApps\ImmPad-Level3-Step3
winui\Input\tsf\TSFApps\TsfPad-Hybrid
To workaround this issue, download msime.h from the Microsoft Download Center and copy to the Windows
SDK \Include directory.
6.4.4 Some Samples Require Microsoft Visual Studio 2005 and will not Build with Microsoft
Visual Studio 2008
A few unmanaged samples rely on mspbase.h, mtyp.h, or mfc80ud.lib. These files are included with Microsoft
Visual Studio 2005 and do not ship with Microsoft Visual Studio 2008.
1. mspbase.h
a. netds\Tapi\Tapi3\Cpp\Msp\MSPBase
b. netds\Tapi\Tapi3\Cpp\Msp\Sample
c. netds\Tapi\Tapi3\Cpp\pluggable
2. mtype.h
a. netds\Tapi\Tapi3\Cpp\tapirecv
b. netds\Tapi\Tapi3\Cpp\tapisend
3. mfc80ud.lib
a. Sysmgmt\Wmi\VC\AdvClient
fatal error LNK1112: module machine type 'x64' conflicts with target machine type
'x86'
For detailed instructions, see the Windows SDK Blog post "How to add 64-bit support to vcproj files."
Note: if you do not install libraries for all CPU architectures during SDK setup, some samples with Visual C++
project files might fail to build with this error for all configurations in the project file:
For example, if a sample has an x86 configuration and x86 libraries were not installed (these libraries are
installed by default when installing the SDK on all platforms), the sample will fail to compile.
This error occurs because platform configurations are listed alphabetically by default in a project or solution file
created by Visual Studio. If Debug|Itanium is a supported configuration, it will be listed first in the samples'
solution and/or project files. This configuration will be built first by default.
To workaround this issue, use a configuration switch to specify what platform you want to build for:
6.4.9 Windows Media Services SDK Plug-ins Fail to Build on Windows 2008 Server
The “Playlistparser” and “Authorization” plug-in samples should be available in Windows Media Services. The
user should be able to enable and disable the newly built plug-ins. However, the “Playlistparser” and
“Authorization” plug-ins fail to build and produce the following error:
HRESULT QueryInterface(
To workaround this issue, build the “Playlistparser” and “Authorization” plug-ins on Windows Vista or Windows
2003 Server and copy the plug-ins to Windows 2008 Server.
6.4.10 WSDAPI StockQuote and FileService samples may fail to build on the command line
(using msbuild) if Visual Studio 2008 is installed
The WSDAPI StockQuote and FileService samples may fail to build on the command line (using msbuild) if Visual
Studio 2008 is installed. These samples include project files which reference WSDL and XSD files, and msbuild
attempts to invoke sproxy.exe to process these files. Visual Studio 2008 does not include sproxy.exe, and
compilation fails if the tool is not present. Compiling from inside the Visual Studio IDE is unaffected.
It is not necessary to use sproxy to process these files. WsdCodeGen, a WSDL/XSD compiler for WSDAPI, can be
used to generate C++ code from these files. This generated code is already included in the sample.
If you encounter this error, you can remove the XSD and WSDL files from the affected project files and recompile
with msbuild:
StockQuote\StockQuoteContract\StockQuoteContract.vcproj: remove StockQuote.xsd,
StockQuote.wsdl, and StockQuoteService.wsdl
FileService\FileServiceContract\FileServiceContract.vcproj: remove FileService.wsdl
6.4.11 WinBase\RDC sample generates assertion failure when built in Visual Studio
You may receive an “Assertion failed” message when attempting to build this sample in Visual Studio. This is
caused by a post build instruction that attempts to register the COM component, but fails. To workaround this
issue, build the sample in Administrator mode. From the Start menu, Microsoft Visual Studio 2008, Visual Studio
Tools, then right click on a Visual Studio command prompt and select “Run as Administrator”.
6.5.1 The wincodec_proxy.h Header File is Missing From the Windows SDK for Windows 7 and
.NET Framework 4
Symptom: The wincodec_proxy.h header file is missing from the the Windows SDK for Windows 7 and .NET
Framework 4.
Fix: Download the wincodec_proxy.h header file from the Microsoft Code Gallery:
http://code.msdn.microsoft.com/wictools/Release/ProjectReleases.aspx?ReleaseId=2887
6.5.2 Warnings May Occur When Compiling Programs Containing the ws2tcpip.h Header
File
Symptom: Warnings occur when compiling programs containing the ws2tcpip.h header file.
Fix: Precede #include <ws2tcpip.h> with #pragma warning(push), #pragma warning(disable : 6386) and follow it
with #pragma warning(pop).
Cause: This warning is reported because intafe.h and comutil.h have conflicting definitions of
INTSAFE_E_ARITHMETIC_OVERFLOW.
Workaround: Intsafe.h must be included in the code before comutil.h and the warning will not occur.
Fix: This conflict is resolved in Visual Studio 2010 and later versions of the compiler package.
6.6.1 Windows SDK Configuration Tool (Command Line) Fails With Visual Studio 2005
This is not a supported scenario will not work with Visual Studio 2005.
7. Windows SDK Product Support and Feedback
The Windows SDK is provided as-is and is not supported by Microsoft. For technical support, there are a number
of options:
Copyright © 2010 Microsoft Corporation. All rights reserved. Legal Notices: http://www.microsoft.com/legal/.