Feed: Microsoft Windows SDK Blog - AggScore: 75.0
SecAnnotate can be used to analyze your assemblies, especially APTCA assemblies in order to find transparency violations without needing code coverage from a test case. The static analysis provided by SecAnnotate is valuable in ensuring that your assembly is fully correct from a transparency perspective. You can get the tool now in beta form here, and read an in-depth article on the .NET Security Blog about how this tool might be used for a simple APTCA library.
Karin Meier-Magruder
Program Manager
The Windows 7 SDK comes with several components, including tools, documentation, headers and libraries, and samples. In this series of blogs, I’ll go through a number of sample that particularly target the new features in Windows 7. I’ll talk about how to build and run them and what the requirements are for each.
Samples have been one of the most valuable educational tools out there and Windows SDK sure has all those samples needed to educate yourself about any aspect of Windows programming.
For the rest of this article, I’ll assume the default location for the Windows 7 SDK root folder, which is “C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples”
Direct2D and DirectWrite samples
New to Windows 7 are Direct2D and Direct3D, which are part of the DirectX family. These technologies are aimed at providing a better and faster developer and user experience for creating 2D graphics and text
Direct2D (or D2D) is a native immediate-mode 2D graphics rendering API that is built on top of Direct3D, and offers some compelling performance and visual quality improvements over GDI and GDI+. DirectWrite supports high-quality text rendering, resolution-independent outline fonts, and full Unicode text and layout support.
I’m not going to go into detail about these technologies now. But, you can always Bing them or directly visit the MSDN portals for Direct2d and DirectWrite, where you’ll find a wealth of information about each and how they interoperate together or with their other family member, Dirct3D.
Samples included in the Windows 7 SDK
The samples that illustrate Direct2D are installed by default under “C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\multimedia\Direct2D”. Similarly, the DirectWrite samples are installed to “C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\multimedia\DirectWrite”. (The blog post New Win32 Samples in Windows SDK for Windows 7: Multimedia describes all multimedia samples in native code that were updated for Windows 7.)
All of the Direct2D and DirectWrite samples come preconfigured with Visual Studio 2008 solution and project files.
Other than Visual Studio 2008, and the Win32 headers and libraries that are installed with the Windows SDK, the only prerequisite you might need is DirectX SDK. It is needed for only two Direct3D samples that require a compiler shader that ships with DirectX SDK. Both samples interop with D3D. (See the blog post Development with Windows SDK & DirectX SDK when Visual Studio 2008 is installed for more information on working with both the Windows SDK and the DirectX SDK.)
Here are the available samples.
Direct2D Samples (C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\
Multimedia\Direct2D):
| Sample | Description | Location |
| Simple "Hello, World" Direct2D application that draws text to the screen. | Demonstrates how to use Direct2D to draw the text, “Hello, World.” | Direct2DHelloWorld |
| Direct3D/Direct2D Interoperability Sample | Demonstrates how to use Direct2D to project 2D content onto a 3D surface. | DXGI Interoperation Sample |
| GDI/Direct2D Interoperability Sample | Demonstrates how to write Direct2D content to a GDI DC. | GdiInteropSample |
| Direct2D Geometry Realization Sample | Demonstrates how to use meshes and A8 render targets to improve performance when rendering complex shapes. | GeometryRealizationSample |
| Interactive 3D Text Sample | Demonstrates how to use DirectWrite and Direct2D to create editable 3D text. | Interactive3dTextSample |
| Direct2D ListView Control Sample | Demonstrates how to use Direct2D to create a list view control. | ListViewSample |
| Direct2D Antialiasing Sample | Demonstrates different antialiasing rendering modes. | MSAARenderingSample |
| Direct2D Saving an Image as a File Example | Demonstrates how to write Direct2D content to an image file. | SaveAsImageFileSample |
| Simple Direct2D Application | Demonstrates a simple Direct2D application. It draws text, images, shapes, and creates a pattern. | SimpleDirect2DApplication |
| Direct2D Animate Along a Path Sample | Demonstrates how to animate an object along a geometric path. | SimplePathAnimationSample |
| Direct2D Text Animation Sample | Demonstrates different ways to render animated text. | TextAnimationSample |
DirectWrite Samples (C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\Multimedia\DirectWrite):
| Sample | Description | Location |
| A Choose Font Dialog Using DirectWrite | Demonstrates choosing a font face, size and weight. | ChooseFont |
| Custom Font Loader Sample | Demonstrates how to load a custom font embedded in an application using DirectWrite. | CustomFont |
| DirectWrite Custom Layout Sample | Demonstrates how a custom layout can utilize the information from script itemization, bidi analysis, line breaking analysis, and shaping to accomplish text measurement and fitting, line breaking, basic justification, and drawing. | CustomLayout |
| Font Enumeration Sample | Demonstrates how to enumerate fonts using DirectWrite and outputs the font family names to the console. | FontEnumeration |
| DirectWrite - GDI Interoperation Sample | Demonstrates how DirectWrite can convert from GDI font objects and display DirectWrite text on a GDI surface. | GdiInterop |
| Hello World using DirectWrite | Demonstrates how to use DirectWrite to render simple text, text with multiple formats, and customized text with a custom renderer. | HelloWorld |
| DirectWrite layout sample | Demonstrates various DirectWrite features such as: Glyph rendering, Complex script shaping, Script analysis, Bidi ordering (?abc?), Line breaking, Font fallback, Font enumeration, ClearType rendering, OpenType styles, Inline objects, Trimming, and Selection hit-testing. | PadWrite |
| DirectWrite Text Rendering Sample | Demonstrates the rendering capabilities of DirectWrite, both to a DIB and a Direct2D surface. | RenderTest |
| A simple version of Hello World with DirectWrite | A version of the DirectWrite Hello World sample that uses simple text only. | SimpleHelloWorld |
| DirectWrite Text Dialog Sample | Demonstrates font enumeration, changing font face, style, weight, underline, and size using DirectWrite. Displays the changes in real time. | TextDialogSample |
Building SDK samples in the “Program Files” directory
When building Samples, you should do so in a directory outside C:\Program Files to which you have write access. Copying to a location other than C:\Program Files makes it possible to maintain a pristine copy of the SDK samples and avoid issues when writing to files and directories located under C:\Program Files.
If you wish to build the samples in the “Program Files” directory, which is a secured Windows folder, Visual Studio 2008 may ask you to run with elevated permissions. (Click on the images to enlarge them.)
Use the Windows SDK Configuration Tool to set the Current SDK
Building the SDK samples with Visual Studio 2008 should be straightforward after you install Windows SDK and Use the Windows SDK Configuration Tool to set the Windows 7 SDK as the “current” SDK for MSBuild and VCBuild. Running this tool will update the Windows 7 SDK build environment and the Visual Studio 2008 IDE build environment to use the Windows 7 SDK headers, libraries and tools. You can also use this tool to switch it back again. (For more information, see the blog post Using the Win 7 SDK Build Environment with VS 2008.)
To run the GUI version of the Windows SDK Configuration Tool, go to Start, All Programs, Microsoft Windows SDK v7.0, Visual Studio Registration, Windows SDK Configuration Tool, and set the Windows SDK version to v7.0 for Visual Studio 2008. (Because this tool modifies registry settings, it needs elevated permissions to run.)
After the tool launches, select v7.0 from the drop down menu. (You may see something slightly different on your computer. In the screenshot below, you see two other versions of the SDK. v6.0A indicates the Windows SDK components that ship in-the-box with Visual Studio 2008. 7.0A indicates the Windows SDK components that ship in-the-box with Visual Studio 2010 BETA integrated SDK.)
Click Make Current, and you should see an output like this:
Now, restart Visual Studio 2008 and rebuild the solution and you will be building with the Windows 7 components:
Setting Visual C++ directories manually
You may wish to set the Visual C++ directories manually. However, if you have successfully configured Visual Studio directories using the Windows SDK Configuration tool, you won’t need to follow the manual steps below.
1. From the main Visual Studio menu, select Tools àOptions, and open the Project and Solutions | VC++ Directories property sheet. This is used to select the location of the folders Visual Studio needs to build and run Visual C++ solutions. (The Platform is the build/run target; the most common are Win32 (x86) or x64.) ![]()
2. We want to update the Include folders path, so In “Show directories for:”, select Include Files, and add the SDK include path, c:\Program Files\Microsoft SDKs\Windows\v7.0\Include, to the top of the list: ![]()
3. In the Libraries files directories, add C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib to the top of the list (Note, the x64 Library Files are under C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib\x64):
Remember, if you have successfully configured Visual Studio folders using WinSDK Configuration tool, you won’t need any of the manual steps above.
Troubleshooting
After building and running the solution, if you get a compilation error such as:” Fatal error C1083: Cannot open include file: 'd2d1.h': No such file or directory”
This means that Visual Studio 2008 cannot find the headers (and probably it won’t find the libraries too). This might happen for several reasons, for example if you had more than one version of Visual Studio when the SDK was installed.
Make sure you have told Visual Studio 2008 about the location of those file by using either the Windows SDK Configuration tool, or setting the VC++ directories manually, using instructions earlier in this post.
Running the samples
Now, back to building and running the Direct2D and DirectWrite samples. Here are some screen shots for the samples. (Click on the image to enlarge it.)
Simple Direct2D Application:
Direct2D Geometry realization Samples:
Remember, two of the Direct2D samples, DXGISample and Interactive3dTextSample, require that the DirectX SDK is installed on your machine. (See the blog post Development with Windows SDK & DirectX SDK when Visual Studio 2008 is installed for more information on working with both the Windows SDK and the DirectX SDK.)
Here are shots of the Direct2D Interactive 3D Text Sample, which shows the interaction between Direct3D (through DXGI), Direct2D and DirectWrite:
Here is the DirectWrite Simple Hello World sample:
Here is the Render Test Sample:
Here is the Custom layout sample in English and Arabic:
Mahmoud Saleh
Software Engineer
Windows C++ Team
Windows 7 and Windows Server 2008 R2 introduce the new framework for building web services in C++ code. Windows Web Services API (WWSAPI) supports the core set of protocols for SOAP-based web services. Developers can use WWSAPI in applications where they need to use native C/C++ code and they cannot take dependency on .Net Framework. Solutions built with this API require significantly less memory than WCF on the client side. On the server side, the API allows developers to achieve much higher throughput than WCF. You can find links to all online resources available to you to learn more about this new API on this page. WWS API is available on all versions of Windows 7 and Windows Server 2008 R2 and it can also be deployed to Windows XP, Vista, Server 2003 and Server 2008. The redistributable installers are available on a formal request to wwsredst@microsoft.com with a brief description of plans for using this runtime and the business contact information for your company.
The Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 plays a very important role in this story of enabling developers to connect their native C and C++ code to web services. Here is what Windows SDK delivers for this scenario:
1) webservices.h header is part of the set of headers installed. This header contains declarations of all functions and types that are part of the API. If Windows SDK did not contain this header, you would get the following error when trying to build code that uses WWSAPI:
> fatal error C1083: Cannot open include file: 'WebServices.h': No such file or directory
If you see this error when you try to use WWSAPI or build samples from MSDN, you need to:
a) Install Windows SDK for Windows 7.
b) Run the Windows SDK Configuration Tool to utilize the Windows 7 headers and libraries. Go to Start > All Programs > Microsoft Windows SDK v7.0 > Visual Studio Registration > Windows SDK Configuration Tool.
c) After these two steps, you should be able to compile the code that uses WWSAPI. To complete linking of your application, you will need webservices.lib.
2) webservices.lib library contains declarations of exports from the Windows Web Services Runtime DLL (webservices.dll). There are three versions of this library installed by Windows SDK for each of CPU architecture (x86, x64 and Itanium). After you completed steps 1.a. and 1.b. from above, you may still get LNK2001 errors for Ws*() functions used in your code. Here is an example of such errors:
1>SortServiceClient.obj : error LNK2001: unresolved external symbol _WsCreateError@12
1>SortServiceClient.obj : error LNK2001: unresolved external symbol _WsFreeError@4
1>SortServiceClient.obj : error LNK2001: unresolved external symbol _WsCloseServiceProxy@12
1>SortServiceClient.obj : error LNK2001: unresolved external symbol _WsFreeHeap@4
1>SortServiceClient.obj : error LNK2001: unresolved external symbol _WsCreateHeap@24
1>SortServiceClient.obj : error LNK2001: unresolved external symbol _WsOpenServiceProxy@16
1>sortservice.wsdl.obj : error LNK2001: unresolved external symbol _WsCreateServiceProxyFromTemplate@40
1>sortservice.wsdl.obj : error LNK2001: unresolved external symbol _WsCreateServiceEndpointFromTemplate@56
1>sortservice.wsdl.obj : error LNK2001: unresolved external symbol _WsCall@32
1>C:\C++ Project that uses WWSAPI.exe : fatal error LNK1120: 12 unresolved externals
To resolve these errors, you need to point VC++ linker to use webservices.lib to build the final binary. You can do this by opening properties of your project. Then browse to Linker options and add webservices.lib to the list of Additional Libraries. See picture below for details:
Once you do that, all linker errors should go away.
3)
Wsutil.exe is Windows Web Services Tool for generating C code from metadata that describes a web service. You are most likely to use this tool as the first step when you need to implement a client to an existing web services or create a new web service. This tool serves the same purpose as WCF Service Model Metadata Utility Tool (Svcutil.exe). There are many commands available in this tool, which you can read about by passing “/?” or “/help” option on the command line. However the core steps for using this tool are:
a. Save your metadata files somewhere on the local hard drive.
i. If you need to download metadata from a running web service, you can use svcutil.exe as follows:
> svcutil.exe /t:metadata
b. Run wsutil.exe on the SDK Shell prompt either as
> wsutil.exe *.wsdl *.xsd
or
> wsutil.exe /wsdl:
/xsd: /wsp:
When you run wsutil.exe, it is going to process each WSDL, XML schema and policy file and generates one C header and one C source file for each input file.
Please note that you need to provide all WSDL and XSD files at once. Passing an incomplete set will result in wsutil.exe issuing errors for references in the input files to non-present WSDL or XSD files. Make sure that you pass all WSDL and XSD files in one call to the wsutil.exe.
For more information please refer to the Windows Web Services API documentation on MSDN.
4) Wstrace.bat and wstracedump.exe are tools that help you with enabling and collecting Windows Web Services Tracing. With these tools you can:
1. Create and delete a trace log
2. Enable and disable tracing
3. Update the tracing level
4. Converting trace logs to CSV files
You can find a tutorial on how to use these tools with Windows 7 RC in this post on Nikola’s blog. For more information please refer to the WWSAPI documentation on MSDN.
5) 92 samples for WWSAPI. Each sample is a complete application that demonstrates how to use WWSAPI in a particular scenario end-to-end. Most of Service Model and Channel Layer samples come in pairs. One sample demonstrates the client side and another one demonstrates the server side. There is usually one example for showing how to use some functions from XML Layer. Assuming that you have not changed the default install path for Windows SDK, you can find all samples under this folder C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\Web\WWSAPI.
To build WWSAPI samples
1. Copy sample from C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\Web\WWSAPI to a some other folder with all other projects of yours
2. Open a sample in Visual Studio
3. Select Build Solution from the Build Menu.
4. Run the Windows SDK Configuration Tool to utilize the Windows 7 headers and libraries. Go to Start > All Programs > Microsoft Windows SDK v7.0 > Visual Studio Registration > Windows SDK Configuration Tool.
a. If you see any build errors, please make sure you have completed integrating Windows SDK with Visuals Studio.
b. If you still experience errors, please post your issue on the forum.
To run samples that demonstrate a scenario from both client and server sides, you should:
1. Run the sample for the server side of a scenario first. For example, run HttpCalculatorService first before running HttpCalculatorClient.
2. Run the sample that demonstrates the client side after the server side has started.
If the sample is not part of client-server pair, just run the sample after the build is completed.
For more information please refer to the Using Windows Web Services documentation on MSDN.
6) The Windows SDK also installs a local version of the MSDN documentation for WWSAPI. Once you install Windows SDK and integrate it with Visual Studio, pressing F1 should allow you to get documentation installed with Windows SDK. Please note however, that the online documentation tends to be more accurate because technical writers update online version more frequently.
As you can see, the Windows SDK plays a very important role in this scenario. To learn more about WWSAPI and how you can use it in your C++ code, please see these other resources:
1) Video recordings
a. Introduction to WWSAPI and a tutorial on building native C/C++ clients to web services using WWSAPI at PDC 2008.
b. Advantages for using native C/C++ code in building web services and key steps that developers have to take can be found in the session at TechEd 2009.
c. An open discussion about Windows Web Services API with answers to frequently asked questions can be found in a recording on Channel 9.
2) Follow links to all online resources available for building web services and clients to web services in C and C++ code on this page.
3) Follow Web Services in Native C++ code series of posts on Nikola’s blog and Hao’s blog.
If you have any questions or if you would like to participate in discussions about WWSAPI, please visit the forum or just comment on this post.
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience.
The MSDN Windows SDK Developer Center is the place to find resources and links to Windows SDK products, release notes, technical articles, and more.
In order to utilize DirectX SDK resources you should ensure that the DirectX SDK include, library, and executables directories are set correctly in Visual Studio 2008. The order in which Visual Studio 2008 looks for executable directories and library files is important. The Windows SDK directories should appear above the DirectX SDK directories.
The DirectX SDK includes some files that are also shipped in the Windows SDK. These files may also be installed with the Windows headers and libraries that are included in Visual Studio 2008. It's possible to get a mixture of different versions of DirectX files on your computer, depending on what versions of the Windows SDK, DirectX SDK, and Visual Studio you install.
The Windows SDK Configuration tool can be used set the Windows 7 SDK as the “current” SDK for MSBuild and VCBuild. This will update the Windows 7 SDK build environment and the Visual Studio 2008 build environment to use the Windows 7 SDK headers, libraries and tools. You can also use this tool to switch it back again. However, the configuration tool does not set the DirectX SDK paths. You will need to do this manually, following the instructions in this article.
If you have installed the DirectX SDK and wish to build an application in the Windows SDK command line build environment, or in the Visual Studio build environments, you will need to set the VC++ directory paths manually. If you wish to build with the Windows 7 headers and libraries, you should ensure that directory path for this content is found first, before the DirectX SDK content.
In the following example I have installed the November 2008 version of the Microsoft DirectX SDK on a computer with the Windows 7 SDK and Visual Studio 2008.
How to set the C++ Directories manually
1. Launch Visual Studio 2008.
2. Open the Tools menu and select Options…. The Options dialog box appears.
3. In the left pane of the Options dialog box, expand the Projects and Solutions node.
4. Under Project and Solutions, select VC++ Directories.
5. In the right pane, set the "Platform" drop-down list box to Win32® and the "Show directories for" drop-down list box to "Executable" files.
6. At the bottom of the list of executable file directories, create a new entry for the DirectX SDK: [drive]:\Program Files\Microsoft DirectX SDK [version]\Utilities\bin\x86 (If there is already such an entry, move it to the bottom of the list.)
7. Set the "Show directories for" drop-down list box to "Include" files.
8. At the bottom of the list of directories, create a new entry for the DirectX SDK: [drive]:\Program Files\Microsoft DirectX SDK [version]\Include (If there is already such an entry, move it to the bottom of the list.)
9. Set the "Show directories for" drop-down list box to "Library" files.
10. At the bottom of the list of directories, create a new entry for the DirectX SDK: [drive]:\Program Files\Microsoft DirectX SDK [version]\LibX86 (If there is already such an entry, move it to the bottom of the list.)
11. If you are developing an application to run on AMD64, you should repeat these steps to set the AMD64 paths by setting the "Platform" drop-down list box to X64 and providing the appropriate paths.
12. Click OK.
Karin Meier-Magruder
Program Manager
Windows C++ Team
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience.
The MSDN Windows SDK Developer Center is the place to find resources and links to Windows SDK products, release notes, technical articles, and more.
The Function Discovery API, introduced in Vista, serves as an abstraction layer between applications and devices. This API allows applications to discover devices by function rather than lower level details such as bus or connection type.
The Function Discovery Browser is a utility that displays information about devices in your local machine and connected via the network.
Its primary purpose is to assist driver and hardware developers to verify that programs accessing the Function Discovery API and hardware registering its attributes with the Function Discovery API are doing so correctly.
Layered categories are the namespaces of the abstract device types programmers would want to access.
Provider categories are namespaces of device and driver registrations.
For more information:
Using the Function Discovery Browser.
The Function Discovery Browser may be found in the Windows SDK for Windows 7 default install location of "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\fdbrowser.exe"
Curtis Smith
Developer
Windows C++ Team
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience.
The MSDN Windows SDK Developer Center is the place to find resources and links to Windows SDK products, release notes, technical articles, and more.
This post describes common installation problems with the Windows SDK for Windows 7 and .NET Framework 3.5 SP1 (released August 2009), and workarounds for each issue. The Windows SDK for Windows 7 is available for download in both ISO and Web Setup format. Web setup allows you to install a specific subset of the SDK you select without having to download the entire SDK. The DVD ISO setup allows you to download the entire SDK to install later.
Error:
During the installation of Windows SDK you receive an error similar to
An error occurred installing the Microsoft Windows SDK for Windows 7 package. Error: A file that is required cannot be installed because the cabinet file.
Or
Cabinet file does not have correct format
Cause:
This error usually occurs when you have a bad download of SDK Components or corrupted files.
Solution:
Running the Windows SDK web setup on some connections can sometimes have issues when downloading the files. We recommend that you clear the %temp%\sdksetup directory and retry your web setup. If that fails, switch over to the ISO setup for the Windows SDK.
For Windows 7 SDK please refer to the download page here http://www.microsoft.com/downloads/details.aspx?familyid=71DEB800-C591-4F97-A900-BEA146E4FAE1&displaylang=en
Error:
When using Web setup to install Windows SDK, you might receive an error similar to
"Unable to find the file SDKSetup.cab at the installation source. The most likely..."
Cause:
This error usually indicates a problem with underlying proxy issues or problems with network connection.
Solution:
Verify your network connection and try to install the SDK again. If the problem persists, download the ISO instead of using the Web Setup.
Error:
During the Windows SDK installation you encounter an error similar to
"A problem occurred while installing selected Windows SDK components.
Installation of the "Microsoft Windows SDK XXXXXX" product has reported the following error: Fatal error during
Installation."
Cause 1:
You are installing Windows SDK to a non fixed physical hard drive like a RAM/USB hard drive.
Solution:
Please change the install location of the Windows SDK during install options and install Windows SDK to a fixed physical hard drive.
Cause 2:
Network Connection is lost during installation when using web setup.
Solution:
Re try the Windows SDK installation and switch to ISO install if the problem persists.
Cause 3:
User cancelled the installation
Solution:
Reinstall Windows SDK either from Web Setup or ISO downloads.
Error:
During an attempt to install Windows SDK you receive an error similar to
A problem occurred while installing selected Windows SDK components.
Installation of the "Microsoft Windows SDK for Windows 7" product has reported the following error: Please refer to Samples\Setup\HTML\ConfigDetails.htm document for further information.
Cause:
This error usually occurs when you have a corrupted Document Explorer installation.
Solution:
Uninstall the document explorer and re try the Windows SDK Installation.
If uninstalling Document explorer fails with errors similar to “Unable to open key” please refer to the solution explained here to uninstall Document Explorer.
Error:
When installing using an ISO download you receive an error similar to
“Setup could not find the file WinSDK_amd64\WinSDK_amd64.msi at any of the specified source locations”.
Cause:
This problem usually occurs when you are installing from an ISO build for a different architecture.
Solution:
Windows SDK now have different ISO’s for different architectures. Please download the correct ISO based on your system platform and architecture type.
Error:
An attempt to install Windows SDK might fail with the following error
A problem occurred while installing selected Windows SDK components.
Unknown product: {E28FB85C-8E3E-4E12-B1E6-58A3AFC0AFB4}
Parameter name: productCodeCause:
Document Explorer has shared component dependencies which break if you delete VS 2008 or Windows SDK files/registry entries manually. If these Files/Registry entries are deleted manually, Document Explorer installer will not be able to access its installer components.
Solution:
Uninstall Document Explorer and retry installing Windows SDK. If you are experiencing problems uninstalling Document explorer please refer to the blog post here http://ctrlf5.net/?p=184.
Error:
An attempt to uninstall earlier Versions of Windows SDK may fail and Windows SDK setup reports error similar to
“Unable to find required source files in any of the source locations”.
Cause:
Some earlier versions of Windows SDK like the Windows SDK for Windows Server 2008, require source files to be able to uninstall the SDK. Windows SDK for Windows 7 does not require the source file to be able to uninstall.
Solution:
1. Download installer cleanup utility from http://support.microsoft.com/kb/290301
2. Select All Windows SDK related packed with the version number you are trying to remove.
a. Also select VCRedist and Document Explorer packages with the Windows SDK Version number. Do not select VcRedist/Document Explorer packages that have a different version number
b. Also Select Windows SDK .Net Development tools (It has .Net version number, something like 3.5.XXXXX)
3. Remove the selected packages
With this method, you will remove the installer cache, but the physical files remain on the disk. These will mostly get overwritten by the latest SDK but the behavior is not guaranteed.
Error:
When installing Windows SDK, you receive an error similar to
Unable to install Microsoft Visual C++ (error 1935)
Cause:
Usually this error occurs when files required by the installer are in use. Most probably the mscoree.dll is in use.
Solution:
Close all the application that are already in use and try the Windows SDK Installation again.
Finding Errors from the SDKSetup log:
On each install and uninstall session, SDKSetup creates a descriptive log in the System %temp% folder. (Usually it is C:\Users\UserName\AppData\Local\Temp). When an error occurs during the Windows SDK installation or un-installation, a more descriptive error message is logged towards the end of the log file. The current log file is named similar to SDKSetup_7.0.7000 1800.log and changes based on the Windows SDK you are using. You can also search for “error” within the log to verify if there are another errors during the installation. Ignore messages similar to ‘ErrorDialog = ErrorDialog’ and “Error Status: 0”.
Nanda Lella
Software Development Engineer
Windows C++ & SDK Team
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience.
The MSDN Windows SDK Developer Center is the place to find resources and links to Windows SDK products, release notes, technical articles, and more.
This post describes a problem with the Windows SDK Configuration Tool, which is used to set the version of Windows SDK headers, libraries and tools you wish to build with in the Visual Studio or Windows SDK build environments.
Issue: When you launch the Windows SDK Configuration Tool on a system which has Visual Studio 2005 or Visual Studio 2008 and the display format of the operating system is not English, an error may be thrown: “Your system does not have Visual Studio 2005 or Visual Studio 2008 installed."
This error will occur when the OS is Windows 7, Windows Vista, or Windows Server 2008, and Visual Studio 2005 or Visual Studio 2008 is installed. This error can be reproduced in the Windows 7 SDK and the Windows Server 2008 SDK.
Cause: With some non-English operating system display formats, the Windows SDK Configuration Tool is unable to parse the version number of Visual Studio as written in the registry.
Solution: There are two workarounds to the problem:
(1) Use the command-line version of Windows SDK Configuration Tool to change to the version of the Windows SDK you wish to target. For example to target the Windows 7 SDK go to the Windows SDK prompt by Clicking All Programs -> Select Microsoft Windows SDK v7.0 -> Select CMD shell. At the Windows SDK command prompt, type “ WindowsSdkVer.exe -version:v7.0 “ [without quotes]
(2) Change the OS Display Format to English (United States). Go to Control Panel and navigate to your Regional and Language Options. On the Formats tab ensure English (United States) is selected. You should now be able to use the Windows SDK Configuration Tool to target the appropriate build environment. Note: once you have changed the target you may return your OS Display Format to its original setting.
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience. The MSDN Windows SDK Developer Center is the place to find resources and links to Windows SDK products, release notes, technical articles, and more.
Window SDK Team
This article applies to the Windows SDK for Windows 7 and .NET Framework 3.5 SP1. Read these other posts to troubleshoot issues with the Windows SDK for Server 2008 and .NET Framework 3.5 or to troubleshoot issues with the Windows SDK Update for Vista and .NET Framework 3.0.
The Windows 7 SDK is available for download in ISO or Web Setup format. Web setup allows you to select a specific subset of the SDK so you do not have to download the entire SDK. The ISO setup allows you to download the entire SDK to burn to disk or a virtual drive, and install later. This release provides three platform-specific ISOs. Choose the ISO that matches the CPU platform (x86, x64, or Itanium) that you are installing on. If you are having problems downloading the correct ISO from the Microsoft Download Center, use these direct links:
- Download the X86 version: GRMSDK_EN_DVD.iso
- Download the AMD64 version: GRMSDKX_EN_DVD.iso
- Download the Itanium version: GRMSDKIAI_EN_DVD.iso
Running the Windows SDK web setup on some connections can sometimes have issues when downloading the files. We recommend that you clear the %temp%\sdksetup directory and retry your web setup. If that fails, switch over to the ISO setup for the Windows SDK.
Typical %temp%\sdksetup directory:
On Windows Vista or Windows 7: C:\%user%\AppData\Local\Temp\ SDKSetup_7.0.6918.0.log
On Windows XP: C:\Documents and Settings\%User%\Local Settings\ SDKSetup_7.0.6918.0.log
- Get the Web Install of the Windows SDK for Windows 7 http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505
- Get the ISO Downloads of the Windows SDK for Windows 7 http://www.microsoft.com/downloads/details.aspx?FamilyID=71deb800-c591-4f97-a900-bea146e4fae1
About ISO image files
Many products are posted as ISO image files. An ISO file is an exact representation of a CD or DVD, including the content and the logical format. ISO files end with an .ISO extension. The most common use of an image file is to write it to a blank CD-R or DVD-R. ISO image files can also be opened and their contents copied to a local folder, much like ZIP files. ISO files may also be virtually mounted and accessed as a device. These two methods of using ISO images are described below.
Copying the contents of ISO files to a drive
The contents of image files can be used as virtual discs using utilities such as ISObuster, Daemon Tools or Virtual CloneDrive for Windows. Using this method you can extract the files from an image file to a temporary folder on your hard drive, then run setup.
Writing ISO files to CD-R or DVD-R
Most CD-R/DVD-R writing software includes a feature to create a disc from an image file. Note: you must use the special "copy image to CD" or "burn image" functionality. See your software’s Help for detailed information. Common utilities for writing ISO file to recordable media such as DVD-R include Nero and Roxio. In Windows 7, you can burn and ISO by right-clicking the .iso file and selecting “Burn disc image”. After a CD/DVD-R has been written, you should verify that the file was successfully written. Many freeware programs are available for calculating the SDK SHA-1 hash value. Use an Internet search engine to search for “sha1 hash” to find a freeware program. Windows SDK for Windows 7 verification information:
File Name: GRMSDK_EN_DVD1.iso
Chip: X86
CRC#: 0xCA4FE79D
SHA1: 0x8695F5E6810D84153181695DA78850988A923F4E
================================================
File Name: GRMSDKX_EN_DVD1.iso
Chip: AMD64
CRC#: 0xB417A4F7
SHA1: 0x3393C98B8468CB3505557854922707510F8B65E1
================================================
File Name: GRMSDKIAI_EN_DVD1.iso
Chip: Itanium
CRC#: 0x5E0E4BEA
SHA1: 0xAE454215585A044EBE593E9F71FF1A4BC03D56A8
Other Resources
Windows SDK Online Release Notes http://download.microsoft.com/download/8/8/0/8808A472-6450-4723-9C87-977069714B27/ReleaseNotes_Win7RTMSDK.Htm
Windows SDK blog http://blogs.msdn.com/windowssdk
Windows SDK MSDN Developer Center http://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx
Windows SDK Developer Forum http://social.msdn.microsoft.com/forums/en-US/windowssdk/threads/
Issue: If you install the Windows SDK for Windows Server 2008 and .NET Framework 3.5, on top of Visual Studio 2008 Service Pack1, some CRT files will revert back to RTM version. (See this post for more information about this issue) This can cause conflicts when you install patches or updates such as the Security Update for Microsoft Visual Studio 2008 Service Pack 1: July 28, 2009 (KB971092), which may lead to compile errors similar to this:
· error C2039: '_Swap_adl' : is not a member of 'std' c:\program files\microsoft visual studio 9.0\vc\include\xutility 2764
· error C3861: '_Swap_adl': identifier not found c:\program files\microsoft visual studio 9.0\vc\include\xutility 2764
Cause: This problem occurs when you install the Windows SDK for Windows Server 2008 and .NET Framework 3.5 on top of a post-RTM Visual Studio 2008 Service Pack, Feature Pack, or QFE. Visual Studio 2008 and the Windows SDK share compiler and CRT packages. Because the Windows SDK v6.1 includes the RTM version of the CRT, installing the Windows SDK second causes any non-versioned CRT files to be reverted back to Visual Studio 2008 RTM version. When you install a service patch, the patch will assume that all the SP1 files are still present.
Workaround: Ensure that you are using the Visual Studio 2008 SP1 version of the CRT by installing the Windows SDK for Windows Server 2008 and .NET Framework 3.5 first, then re-installing Visual Studio 2008 SP1. Then you can apply the Security Update.
Caution: Running “Repair” on the Windows SDK will cause the CRT files to go back to RTM state and should be avoided.
Karin Meier-Magruder
Program Manager
Windows SDK Team
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience.
The MSDN Windows SDK Developer Center is the place to find resources and links to Windows SDK products, release notes, technical articles, and more.
Issue: If you install the Windows SDK for Windows Server 2008 and .NET Framework 3.5, on top of any post-RTM Visual Studio update (such as a Service Pack or Feature Pack), some CRT files will be reverted back to RTM version.
Cause: This problem occurs when you install the Windows SDK for Windows Server 2008 and .NET Framework 3.5 on top of any post-RTM Visual Studio update (such as a Service Pack or Feature Pack). Visual Studio 2008 and the Windows SDK share compiler and CRT packages. The Windows SDK v6.1 includes the RTM version of the CRT. Installing the Windows SDK on top of VS causes any non-versioned CRT files to be reverted back to Visual Studio 2008 RTM version. When you install a service patch, the patch will assume that all the SP1 files are still present.
Workaround: Ensure that you are using the Visual Studio 2008 SP1 version of the CRT by installing the Windows SDK for Windows Server 2008 and .NET Framework 3.5 first, then installing Visual Studio 2008 SP1. Then you can apply any security updates or patches.
Caution: Running “Repair” on the Windows SDK will cause the CRT files to go back to RTM state and should be avoided.
Karin Meier-Magruder
Program Manager
Windows SDK Team
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience.
The MSDN Windows SDK Developer Center is the place to find resources and links to Windows SDK products, release notes, technical articles, and more.
Changes have been made to the Windows SDK build environment and how the SDK interacts with MSBUILD and Visual Studio 2008. This post applies to the RTM release of the Windows SDK for Windows 7 and .NET Framework 3.5 SP1.
What changed with the Windows SDK for Windows 7?
The Windows SDK for Server 2008 sets a registry key upon installation to identify the SDK as the “current” SDK to use when building. This key is used by the VC++ toolset in both Visual Studio 2008 and in the Windows SDK build environment:
- On an X86 computer: HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows
- On an X64 or IA64 computer: HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows
The Windows SDK for Windows 7 does not set this key during installation in order to avoid unexpected changes to Visual Studio 2008. To set the Windows SDK used by Visual Studio, use the Windows SDK Configuration Tool.
Out-of-the-box experience with the Windows SDK for Windows 7
If you install the Windows SDK for Windows 7 on a clean computer and create an application with the SDK build environment, the SDK will use the Windows 7 headers, libraries and tools that are included with the SDK.
If Visual Studio 2008 is installed, MSBuild and/or VCBuild will default to the headers, libraries and tools that have been previously integrated with Visual Studio 2008, in most cases, this is the (Vista-level) Windows SDK v6.0a. If this is the case, the Windows SDK build environment will display a warning when launched.
How to use the Windows SDK for Windows 7 headers, libraries and tools with Visual Studio 2008
Use the Windows SDK Configuration Tool to set the Windows 7 SDK as the “current” SDK for MSBuild and VCBuild. This will update the Windows 7 SDK build environment and the Visual Studio 2008 IDE build environment to use the Windows 7 SDK headers, libraries and tools. You can also use this tool to switch it back again.
To run the GUI version of the Windows SDK Configuration Tool, go to Start, All Programs, Microsoft Windows SDK v7.0, Visual Studio Registration, Windows SDK Configuration Tool.
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience. The MSDN Windows SDK Developer Center is the place to find resources and links to Windows SDK products, release notes, technical articles, and more.
Karin Meier-Magruder
Program Manager
Windows SDK Team
The RTM release of the Windows SDK for Windows 7 and .NET Framework 3.5 SP1 is now available for download in both ISO and Web Setup format. Web setup allows you to install a specific subset of the SDK you select without having to download the entire SDK. The DVD ISO setup allows you to download the entire SDK to install later. This release of the SDK provides three ISO choices. Choosethe ISO that matches CPU platform (x86, x64, or Itanium) that you are installing on. Each ISO will allow you to build applications that target all CPU platforms. Thus if you install the x86 ISO (which only installs on x86 platforms), you will be able to create applications targeting x86, x64, and Itanium.
If you are having problems downloading the correct ISO from the Microsoft Download Center, use these direct links:
Platform Compatibility:
This release of the Windows SDK is compatible with Windows 7, Windows Server 2008 R2, Windows Server 2008, .NET Framework 3.5 Service Pack 1 , Windows Vista, and Windows XP.
Visual Studio Compatibility:
This release of the Windows SDK is compatible with Visual Studio 2008 SP1; including Visual Studio Express Editions.
What’s New:
Please check out the top-level Getting Started section in the SDK documentation for a full description of what’s new in the SDK as well as recent posts to this blog – such as New Win32 Samples in Windows SDK for Windows 7: Windows User Interface or New Tools in Windows SDK for Windows 7.
Troubleshooting:
If you are having problems downloading or installing this SDK, read Troubleshooting Windows 7 SDK Download/Install.
Learn More:
Stayed tuned to the Windows SDK blog as well as the Windows SDK MSDN Developer Center over the coming weeks for more information about the Windows SDK. As always, please look over the Release Notes for a description of known issues before you install the SDK.
Thank you,
Barry R. Butterklee
Windows SDK Release PM
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience.
The MSDN Windows SDK Developer Center is the place to find resources and links to Windows SDK products, release notes, technical articles, and more.
This is the post number 11, the final article in a series that describes new and updated samples in the Windows 7 SDK. The following is a new COM+ Spy sample that was updated to support Windows 7.
See also:
New Win32 Samples in Windows SDK for Windows 7: Networking and Related Services
New Win32 Samples in Windows SDK for Windows 7: Multimedia
New Win32 Samples in Windows SDK for Windows 7: Security
New Win32 Samples in Windows SDK for Windows 7: Systems Management
New Win32 Samples in Windows SDK for Windows 7: Open Packaging Conventions (OPC)
New Win32 Samples in Windows SDK for Windows 7: Tablet PC and MultiTouch
New Win32 Samples in Windows SDK for Windows 7: Web
New Win32 Samples in Windows SDK for Windows 7: Windows Base
New Win32 Samples in Windows SDK for Windows 7: Windows User Interface
New Win32 Samples in Windows SDK for Windows 7: Windows XML Paper Specification (XPS)
Over 1,200 samples were changed since the release of the Windows SDK for Windows 7 RC release. Many “new to Win 7” samples were added, simplified, or extended, and many older samples were updated to support Windows 7 as well as older operating systems.
For build instructions and additional information about the samples, see the Readme.txt files and other documents in the SDK sample folders. For general sample building instructions, refer to the Samples Reference page that installs with the Windows SDK, and the SDK Release Notes (under the Start menu, in All Programs > Microsoft Windows SDK v7.0). By default, Win32 samples are installed under the following path: C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples.
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience.
Updated Com+ Spy sample in the Windows SDK for Windows 7
|
Sample |
Description |
Install Location |
|
COM+ Spy |
The COM+ system event publisher publishes events using COM+ LCE services. The COMSpy sample application provides an example of a program which subscribes to these published events. COMSpy Demonstrates what is going on inside a COM+ process by displaying and logging event metrics. |
com\administration |
Karin Meier-Magruder
Program Manager for Samples
Windows SDK Team
This is post number 10 in a series that describes new and updated samples in the Windows 7 SDK. The following table lists samples that illustrate Windows XML Paper Specification (XPS), which provides users with a consistent document appearance regardless of where and how the document is viewed. These samples are new to Windows 7 or updated to support Windows 7.
See also:
New Win32 Samples in Windows SDK for Windows 7: Networking and Related Services
New Win32 Samples in Windows SDK for Windows 7: Multimedia
New Win32 Samples in Windows SDK for Windows 7: Security
New Win32 Samples in Windows SDK for Windows 7: Systems Management
New Win32 Samples in Windows SDK for Windows 7: Open Packaging Conventions (OPC)
New Win32 Samples in Windows SDK for Windows 7: Tablet PC and MultiTouch
New Win32 Samples in Windows SDK for Windows 7: Web
New Win32 Samples in Windows SDK for Windows 7: Windows Base
New Win32 Samples in Windows SDK for Windows 7: Windows User Interface
New Win32 Samples in Windows SDK for Windows 7: Windows XML Paper Specification (XPS)
New Win32 Samples in Windows SDK for Windows 7: Communication
Over 1,200 samples were changed since the release of the Windows SDK for Windows 7 RC release. Many “new to Win 7” samples were added, simplified, or extended, and many older samples were updated to support Windows 7 as well as older operating systems.
For build instructions and additional information about the samples, see the Readme.txt files and other documents in the SDK sample folders. For general sample building instructions, refer to the Samples Reference page that installs with the Windows SDK, and the SDK Release Notes (under the Start menu, in All Programs > Microsoft Windows SDK v7.0). By default, Win32 samples are installed under the following path: C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples.
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience.
New/updated Windows XML Paper Specification (XPS) samples in the Windows SDK for Windows 7
|
Sample |
Description |
Install Location |
|
demonstrates usage of XPS APIs along with DWrite |
Demonstrates how to use DWrite to place text on a page and create an xps document that includes that page. |
xps\FlowText |
|
Demonstrates how to load, modify and save xps file using new unmanaged XPS APIs |
Demonstrates how to load an xps file from a stream, add text to a page and then resave the file as xps package. |
xps\XpsLoadModifySave |
|
Direct printing of XPS object model |
The XpsOMPrint sample is a simple utility which demonstrates use of the XPS Object Model with the XPS Print API to programmatically create and print an XPS document. |
XPS\XpsOMPrint |
|
XPS Document Rollup sample |
Demonstrates use of the XPS Object Model to combine XPS Documents. |
Xps\XpsRollup |
Karin Meier-Magruder
Program Manager for Samples
Windows SDK Team
This is post number 9 in a series that describes new and updated samples in the Windows 7 SDK. The following table lists samples that pertain to Windows User Interface, and are new to Windows 7 or updated to support Windows 7. Technologies include Shell, Locations and Sensors, Sidebar, Sideshow, Windows Ribbon, Windows Search, and more. These samples are new to Windows 7 or updated to support Windows 7.
See also:
New Win32 Samples in Windows SDK for Windows 7: Networking and Related Services
New Win32 Samples in Windows SDK for Windows 7: Multimedia
New Win32 Samples in Windows SDK for Windows 7: Security
New Win32 Samples in Windows SDK for Windows 7: Systems Management
New Win32 Samples in Windows SDK for Windows 7: Open Packaging Conventions (OPC)
New Win32 Samples in Windows SDK for Windows 7: Tablet PC and MultiTouch
New Win32 Samples in Windows SDK for Windows 7: Web
New Win32 Samples in Windows SDK for Windows 7: Windows Base
New Win32 Samples in Windows SDK for Windows 7: Windows User Interface
New Win32 Samples in Windows SDK for Windows 7: Windows XML Paper Specification (XPS)
New Win32 Samples in Windows SDK for Windows 7: Communication
Over 1,200 samples were changed since the release of the Windows SDK for Windows 7 RC release. Many “new to Win 7” samples were added, simplified, or extended, and many older samples were updated to support Windows 7 as well as older operating systems.
For build instructions and additional information about the samples, see the Readme.txt files and other documents in the SDK sample folders. For general sample building instructions, refer to the Samples Reference page that installs with the Windows SDK, and the SDK Release Notes (under the Start menu, in All Programs > Microsoft Windows SDK v7.0). By default, Win32 samples are installed under the following path: C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples.
Send your thoughts to the Windows SDK Feedback alias. Tell us how you use the SDK and what we can do to improve your development experience.
New/updated Windows User Interface samples in the Windows SDK for Windows 7
|
Sample |
Description |
Install Location |
|
WinUI ChooseFont Sample |
Demonstrates how to use the ChooseFont with flags for Windows 7. |
winui\ChooseFont |
|
WinUI: CWMFEx Sample |
Demonstrates how to use the RegisterHotKey function with MOD_NOREPEAT to avoid generating multiple hotkey notifications when the user-defined 'b'+ ALT hotkey is being repeatly pressed. |
winui\CWMFEx |
|
Location API Gadget sample |
Demonstrates how to use the Location Platform to retrieve the current location and display that on a map. |
WinUI\Location\LocateMe.gadget |
|
Location API eventing sample |
Demonstrates how to access the Location Platform in an asynchronous (event driven) manner. |
WinUI\Location\LocationEvents |
|
Location API SetLocation Sample |
Demonstrates how to set the default location using the Location API. This sample requires Visual Studio to be built. This sample must be run as administrator for the call to IDefaultLocation::SetReport to succeed. This application retrieves the default civic address that is specified in Control Panel, and prints its fields. It then prompts the user to change the default civic address in Control Panel, prints the new values, and then sets the default location back to its original. |
winui\Location\SetLocation |
|
Location API Simple Location sample |
Simple Location Demonstrates how to access the Location Platform in a synchronous manner. |
WinUI\Location\SimpleLocation |
|
WinUI: RegisterHotKey Sample |
Demonstrates how to use the RegisterHotKey function with MOD_NOREPEAT to avoid generating multiple hotkey notifications when the user-defined 'b'+ ALT hotkey is being repeatly pressed. |
winui\RegisterHotKey |
|
Ambient Light Aware Sample |
Demonstrates how to use the Sensor Platform by reading data from Ambient Light Sensors on the computer and changing a label's font size to be optimized for the reported light conditions. |
WinUI\Sensors\AmbientLightAware |
|
ChangeNotifyWatcher Sample |
Demonstrates the ShellChangeNotify system. |
winui\shell\AppPlatform\ChangeNotifyWatcher |
|
Using and extending Common File Dialog |
Demonstrates the use of the different Common File Dialog APIs (IFileDialog, IFileSaveDialog, and associated interfaces) to create a custom file open/save dialog. Build and run CommonFileDialogSDKSample.exe and play with the File menu to see it in action. |
WinUI\Shell\AppPlatform\CommonFileDialog |
|
Common File Dialog Modes Sample |
Demonstrates how to use the Common File Dialog in different modes to pick files, containers (folders) or multiple items in a “basket” mode without dismissing the dialog. This sample also demonstrates how to use the Common File Dialog to pick both files and folders from the same dialog in “basket” mode. |
winui\Shell\AppPlatform\CommonFileDialogModes |
|
DragDrop Visuals Sample |
Demonstrates how to use the shell drag drop services to get the presentation features that shell drag drop supports for both targets and sources. This includes: 1) drop targets rendering the drag image 2) drop target provided drop tips 3) drag source populating the drag image information when using a custom data object 4) drag source enable drop tips 5) use the shell provided IDropSource implementation by calling SHDoDragDrop(). This handles many of the edge cases for you dealing with different types of targets |
winui\Shell\AppPlatform\DragDropVisuals |
|
Execute in Explorer Sample |
Demonstrates how to perform a ShellExecute in the Explorer Process. This is most useful when you are an elevated process that you want to run in an unelevated. The Windows Explorer runs unelevated most of the time so applications can use this code to take advantage of that. |
winui\Shell\AppPlatform\ExecInExplorer |
|
Explorer Browser Search Sample |
Demonstrates how to use the Explorer Browser control to embed Windows Explorer in an application. It then demonstrates how to simply implement instant search functionality with an in-memory search folder. |
winui\shell\AppPlatform\ExplorerBrowserSearch |
|
FileIsInUse |
Implemenets the IFileIsInUse interface. See the included docx file for a complete description. |
winui\Shell\AppPlatform\FileIsInUse |
|
FileOperations |
Demonstrates the use of the file operation API for performing actions such as copy/move/delete/rename on file system objects. |
WinUI\Shell\AppPlatform\FileOperations |
|
KnownFolders Sample |
Demonstrates registering a KnownFolder by directly writing the relevant registry keys and values. This sample showcases only the most common KnownFolder Definition fields and targets developers of managed code who would prefer registry access to COM interop. |
WinUI\Shell\AppPlatform\KnownFolders |
|
NamespaceTreeControl Sample |
Demonstrates how to implement a custom namespace tree control |
WinUI\Shell\AppPlatform\NamespaceTreeControl |
|
Parsing With Parameters Sample |
Demonstrates how to take advantage of shell helpers that use the parsing name interact with items via the shell programming model. |
winui\Shell\AppPlatform\ParsingWithParameters |
|
PropertyEdit Sample |
Demonstrates how to use the Property System APIs to read and write values to and from files. You can try this sample for reading/writing files on file types including .jpg, .tiff, .doc, .mp3, .wma files. (and more if they have property handlers associated with them.) You can also use this sample in conjunction with the Recipe Property Handler sample which Demonstrates a sample property handler for .recipe file to debug that handler. Usage: propertyedit [OPTIONS] [Filename] Options: -get <PropertyName> Get the value for the property defined by its Canonical Name in <propertyName> -set <PropertyName> Set the value for the property defined <PropertyValue> by <PropertyName> with value <PropertyValue> -enum Enumerate all the properties. -info <PropertyName> Get schema information on property. Examples: PropertyEdit -get “System.Author” foo.jpg PropertyEdit -set “System.Author” “John Doe” foo.jpg PropertyEdit -enum foo.jpg PropertyEdit -info “System.Author” |
WinUI\Shell\AppPlatform\PropertyEdit |
|
Property Schema API sample |
Demonstrates the use of the different Property System APIs to register/unregister custom property schemas, or get detailed information about properties alredy registered with the system. Run PropSchema.exe without any arguments to see usage information. |
WinUI\Shell\AppPlatform\PropertySchemas |
|
SearchFolder Sample |
Demonstrates the use of ISearchFolderItemFactory API to create search folders. Build and run SearchFolder.exe to it in action. |
WinUI\Shell\AppPlatform\SearchFolder |
|
Shell Library Backup Sample |
Demonstrates how to pick and interact with libraries as containers. ShellLibraryBackup is a fictional backup application that supports picking and backing up libraries in addition to folders. Libraries are the new storage location for user files in Windows 7. The Documents, Pictures, Music and Videos libraries provide a superset of functionality to users and they look a little different when discovered programmatically. |
winui\Shell\AppPlatform\ShellLibraryBackup |
|
Shell Library Command Line Sample (shlib.exe) |
Sample command-line interface for the IShellLibrary interface, providing programmatic access to inspect and manipulate Windows libraries files from the console. |
winui\Shell\AppPlatform\ShellLibraryCommandLine |
|
Shell Storage Sample |
Demonstrates how to use the IStorage and IStream APIs to create files and folders in shell containers like libraries or any container picked from either the folder picker dialog or the SHBrowseForFolder dialog. Also demonstrates how to save directly to to the shell item returned from the file dialog using these APIs. |
winui\Shell\AppPlatform\ShellStorage |
|
UsingImageFactory Sample |
Demonstrates the use of IShellItemImageFactory API to create file icons from existing image files. |
winui\shell\AppPlatform\UsingImageFactory |
|
UsingThumbnailProviders Sample |
Demonstrates how to call the IThumbnailProvider methods to retrieve a thumbnail for an image file. |
winui\shell\AppPlatform\UsingThumbnailProviders |
|
Shell: AppUserModelIDWindowProperty |
Demonstrates how to control the taskbar grouping behavior of an application's windows by setting the AppUserModelID on a window via the use of the IPropertyStore implementation for windows, obtained via SHGetPropertyStoreForWindow. |
winui\shell\AppShellIntegration\AppUserModelIDWindowProperty |
|
Automatic Jump List sample |
Demonstrates how to utilize the automatic Jump Lists in Windows 7, which are generated from information provided through SHAddToRecentDocs. Also Demonstrates how to set an application's jump list to show the Frequent category instead of Recent. |
WinUI\Shell\AppShellIntegration\AutomaticJumpList |
|
CreateProcess Verb Sample |
This demonstrates how implement a shell verb using the CreateProcess method CreateProcess based verbs depend on running a .exe and passing it a command line. This method is not as powerful as the DropTarget and DelegateExecute methods but it does achieve the desirable out of process behavior. |
winui\Shell\AppShellIntegration\CreateProcessVerb |
|
Custom Jump List Sample |
Demonstrates how to customize the Jump List for an application using ICustomDestinationList. |
WinUI\Shell\AppShellIntegration\CustomJumpList |
|
DropTarget Verb Sample |
Demonstrates how implement a shell verb using the DropTarget method this method is prefered for verb implementations that need to work on Windows XP as it provides the most flexibility, it is simple, and supports out of process activation. This sample implements a stand alone local server COM object but it is expected that the verb implementation will be integreated into existing applications. To do that have your main application object register a class factory for itself and have that object implement IDropTarget for the verbs of your application. Note that COM will launch your application if it is not already running and will connect to an already running instance of your application if it is already running. These are features of the COM based verb implementation methods. |
winui\Shell\AppShellIntegration\DropTargetVerb |
|
Execute Command Verb Sample |
Demonstrates how implement a shell verb using the ExecuteCommand method. This method is preferred for verb implementations as it provides the most flexibility, it is simple, and supports out of process activation. This sample implements a standalone local server COM object but it is expected that the verb implementation will be integrated into existing applications. to do that have your main application object register a class factory for itself and have that object implement IDropTarget for the verbs of your application. Note that COM will launch your application if it is not already running and will connect to an already running instance of your application if it is already running. These are features of the COM based verb implementation methods. |
winui\Shell\AppShellIntegration\ExecuteCommandVerb |
|
Explorer Command Verb Sample |
Demonstrates how implement a shell verb using the ExplorerCommand method. |
winui\shell\AppShellIntegration\ExplorerCommandVerb |
|
Shell: HomeGroup Sample |
Demonstrates how to determine homegroup membership status, enumerate top level items in the HomeGroup Shell Folder, and launch the HomeGroup Sharing Wizard. |
winui\shell\AppShellIntegration\HomeGroup |
|
Ideal Property Handler |
Demonstrates the implementation of an ideal property handler for an OleDoc File Format (.docfile-ms) or a fictional OpenMetadata format (.openmetadata-ms) which supports reading and writing properties and custom schema. |
winui\Shell\AppShellIntegration\IdealPropertyHandler |
|
NonDefaultDropMenuVerb Sample |
Demonstrates how to extend the non-default drag-and-drop context menu. |
winui\shell\AppShellIntegration\NonDefaultDropMenuVerb |
|
Shell: NotificationIcon Sample |
Demonstrates how to use the Shell_NotifyIcon and Shell_NotifyIconGetRect APIs to display a notification. |
winui\shell\AppShellIntegration\NotificationIcon |
|
Player Verb Sample |
Demonstrates how to create a verb that operates on shell items and containers to play items or add items to a queue. Particularly useful for media applications. |
winui\Shell\AppShellIntegration\PlayerVerbSample |
|
Playlist Creator Sample |
Demonstrates how to create a verb that operates on shell items and containers. In this case, the verb creates a playlist from the selected item or container. |
winui\Shell\AppShellIntegration\PlaylistCreator |
|
Playlist Property Handler |
Demonstrates the implementation of a property handler for the .WPL and .ZPL playlist file formats. |
winui\Shell\AppShellIntegration\PlaylistPropertyHandler |
|
Recipe Preview Handlers |
Demonstrates the use of the different Preview handler APIs to register a preview handler COM servers for custom file types. These API provide a mechanism to expose “live” content of files in the Preview Pane of Explorer. Build and register the dll. Navigate into the Recipes folder, enable Preview Pane in Explorer, and select a .recipe file to see live contents of the file show up in the Preview Pane. |
WinUI\Shell\AppShellIntegration\RecipePreviewHandler |
|
Recipe Property Handler |
This sample Demonstrates the creation of a sample property handler for an XML based .recipe file format. It supports Open Metadata. (handles all properties given to it by saving under <ExtendedProperties> section of the XML file) |
winui\Shell\AppShellIntegration\RecipePropertyHandler |
|
Sync and Share Verbs |
Demonstrates how to register a verb that extends the “Sync” and “Share” verbs in the Windows Explorer Command Bar. |
winui\Shell\AppShellIntegration\SyncAndShareVerbs |
|
Shell: TabThumbnails |
Demonstrates how an application can expose multiple switch targets (as for tabs) on the taskband and how to provide their thumbnails. |
winui\shell\AppShellIntegration\TabThumbnails |
|
Desktop Integration sample |
Demonstrates how to show peripheral status in the taskbar for an application window. Demonstrates both overlay icons and progress bars. |
winui\shell\AppShellIntegration\TaskbarPeripheralStatus |
|
Windows 7 Taskbar Integration sample |
Demonstrates how to add a thumbnail toolbar and respond to its commands. |
winui\Shell\AppShellIntegration\TaskbarThumbnailToolbar |
|
Drawing text on glass using Buffered Paint Theming APIs |
Drawing text on glass using Buffered Paint Theming APIs |
WinUI\Shell\AppShellIntegration\TextOnGlassBuffered |
|
Shell AppBar |
Demonstrates how to implement an application desktop toolbar that is resizable, can attach to any side of the screen, and allows itself to be hidden in the same way the Explorer taskbar automatically hides. |
winui\Shell\LegacySamples\AppBar |
|
Shell Fakemenu |
Demonstrates how an application can display a window that behaves in a similar manner as a menu. |
winui\Shell\LegacySamples\Fakemenu |
|
Building glass enabled deskbands |
Demonstrates the use of the different DeskBand API APIs to create a custom desk band. Build and register DeskBandSDKSample.dll and right-click on the Task Bar, expand “Toolbars” menu option and choose “DeskBand Sample”. You will see the newly created Desk Band show up on the Task Bar. |
WinUI\Shell\ShellExtensibility\DeskBands |
|
OpenSearch Sample |
Demonstrates a custom federated search provider with Visual Studio 2008 that connects to the AdventureWorks database. Uses ASP.NET to create a custom federated search provider. Queries are federated from Windows to the search provider using the OpenSearch standard. Results from this federated search provider are enumerated in the Windows Explorer as rich items in the view. Windows 7 understands search results that are returned in the RSS format. Other systems that support OpenSearch are compatible with Windows 7 federated search sources like Microsoft Search Server 2008 and other RSS-enabled clients. |
winui\shell\ShellExtensibility\OpenSearch |
|
Sidebar: IDesktopGadget Sample |
Demonstrates how to add a gadget programmatically. |
winui\sidebar\IDesktopGadget |
|
Gadgets: sdk_graphicsapi.gadget Sample |
Demonstrates key functionality the Windows Desktop Gadgets graphics library, for both text and images. |
winui\sidebar\sdk_graphicsapi.gadget |
|
SideShow Alarms Sample |
Demonstrates a application that sends notifications to a Windows SideShow-compatible device. The application registers with the platform and sends notifications based on user specified alarm times. Output: The application should open a window titled 'My Alarm' and allow you to set an alarm time. When the alarm time elapses, a notification is shown on the device. |
Winui\sideshow\Alarms |
|
SideShow HelloWorld Sample |
Demonstrates the creation of a simple Windows SideShow application. The application registers with the Simple Content Endpoint and pre-loads or sends a page with the string ‘Hello World’ to the device. |
Winui\sideshow\HelloWorld |
|
SideShow Pictures Sample |
Demonstrates the sending of pictures / images from a file to an Windows SideShow device. The application takes jpeg images from the Pictures directory and sends them to the device to be viewed. |
Winui\sideshow\Pictures |
|
SideShow Tasks Sample |
Uses the events and the Simple Content Format more extensively. The sample application gets its data from the TaskList.xml file in the sample folder. It uses the ContentMissing event to send content to the device. |
Winui\sideshow\tasks |
|
Simple UI Automation Provider sample |
Demonstrates how to implement UI Automation on a simple custom control. |
WinUI\UIAutomation\SimpleUIAProvider |
|
Windows Ribbon: ContextPopup sample |
Demonstrates the markup and code required to implement a Windows Ribbon application with various ContextPopups, with options to output Ribbon framework callbacks to a console window. |
winui\WindowsRibbon\ContextPopup |
|
Windows Ribbon: DropDownColorPicker sample |
Demonstrates the markup and code required to use a Windows Ribbon DropDownColorPicker control. |
winui\WindowsRibbon\DropDownColorPicker |
|
Windows Ribbon: FontControl sample |
Demonstrates the markup and code required to implement a FontControl within a Windows Ribbon application, with options to output various Ribbon Framework callbacks to a console window. |
winui\WindowsRibbon\FontControl |
|
Windows Ribbon: Gallery sample |
Demonstrates the markup and code required to use the different types of Gallery controls included in the Windows Ribbon framework. The sample includes code that can be used to dynamically populate items into the Galleries, and handle special Gallery previewing events that support Results-oriented UI. The sample also demonstrates how to create a Ribbon application that works properly in high DPI modes. |
winui\WindowsRibbon\Gallery |
|
Windows Ribbon: HTMLEditRibbon sample |
Demonstrates markup and code required to migrate an existing MFC application to use the Windows Ribbon. |
winui\WindowsRibbon\HTMLEditRibbon |
|
Windows Ribbon: SimpleRibbon sample |
Demonstrates the markup and code required to implement a very simple Win32 application with a Windows Ribbon. |
winui\WindowsRibbon\SimpleRibbon |
|
Windows Search Command Line |
Windows Search Command Line Utility console application to query the Windows Search index like FINDSTR /S and DIR /S |
winui\WindowsSearch\DSearch |
|
SearchEvents Sample |
Demonstrates how to implement and use the IRowsetEvents interface to monitor changes to items belonging to a query over a particular scope. This demo also Demonstrates how to use the IRowsetPrioritization interface to set the indexing speed and priority of items also belonging to that scope. |
winui\WindowsSearch\SearchEvents |
|
Structured Query Code Sample |
Demonstrates the Structured Query APIs. This sample program reads lines from the console, parses them using the system schema, and displays the resulting condition trees. |
winui\WindowsSearch\StructuredQuerySample |
|
Windows Search with OleDB |
Demonstrates how to query Windows Search or Windows Desktop Search using OleDB and C++ |
winui\WindowsSearch\WSOleDB |
Karin Meier-Magruder
Program Manager for Samples
Windows SDK Team
