The SDK contains samples in the following topic areas:
Windows SDK samples.NET Framework (managed code) samples Microsoft .NET Framework samples are installed with the SDK documents, providing a mechanism to view and browse samples in context of the rest of the documents. These samples fall into three main categories:
Sample document topics contain options for viewing and copying sample source files and for downloading sample projects as ZIP files to a user’s computer. Each sample topic contains at least one source code selection box that lists all the sample files. There is one box for each programming language provided by the sample. If a user is viewing this documentation on the Web instead of in local Help, a link to download the sample is provided. The .NET Framework samples are also available outside the documents, in .ZIP format installed to Program Files\Microsoft SDKs\Windows\[version number]\samples. This content can be deselected during SDK setup. The .ZIP files provide a mechanism to extract large subsets of samples at once. Win32 (unmanaged code) samples The Windows samples demonstrate Windows operating system features primarily using native code. These unmanaged Win32 samples are not included in the documentation. They are installed as loose files to subdirectories of \Program Files\Microsoft SDKs\Windows\[version number]\samples. This content can be deselected during SDK setup. A few samples with some managed code (PowerShell, Tablet PC) install with the Win32 samples. The Win32 samples directory layout for the Windows SDK is: \Begin Building the samplesBuilding samples under Windows Vista or later operating systems should be done in a directory outside of Program Files to which there is write access to avoid issues with file and registry virtualization. This makes it possible to maintain an unmodified copy of the SDK samples. To build from the command line:
It is important to specify the build platform when using MSBuild, otherwise the first platform listed in the solution or project file will be built. |