This is post number 8 in a series that describe new and updated samples in the Windows 7 SDK. The following table lists samples that pertain to Windows Base technologies, and are new to Windows 7 or updated to support Windows 7. This includes technologies such as Boot Configuration, Debugging, Device Foundation, Eventing, File Server Resource Manager (FSRM), iSCSI Software Initiator, IO, Monitor Services, Performance Counters, Registry, Services, Storage, Troubleshooting, Volume Shadow Copy Service (VSS), Windows Error Reporting, and more.
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 Base samples in the Windows SDK for Windows 7
C# WMI BCD Samples application and library
Demonstrates how to use the new Bcd boot configuration framework WMI classes using C# and .NET 2.
Demonstrates the dbghelp API.
RaiseFailFastException API Code Sample
Demonstrates how to use the RaiseFailFastException API. The RaiseFailFastException API differs from its RaiseException counterpart in that it bypasses any frame-based or vectored exception handlers, including the process' unhandled exception filter.
Devices and Printers Folder Extensibility Sample
Demonstrates how to create property pages and context menu handlers for devices in the Devices and Printers Folder. The sample solution contains two projects: a context menu project and a property page project. Each builds into its own DLL. If a client wants to implement a context menu and property page, then they could both just be built into the same DLL and share the same class factory.
Function Discovery Client Sample
Demonstrates the query and notification functionality of the Function Discovery APIs.
Function Discovery Provider Sample
Demonstrates how to write a fully functional PnP-X Function Discovery provider.
PnP-X Simple Thermostat Sample
Demonstrates an end-to-end scenario using PnP-X. It includes device samples using UPnP and WSD, a driver to install the devices in PnP, proxies to talk with the devices, and a client application that uses the devices through the proxies. Developers will find this sample when implementing end-to-end scenarios using PnP-X or just implementing small portions of a scenario, like a PnP-X compliant device.
Event Trace Controller Sample
Demonstrates use of control APIs for event tracing.
ETW Consumer Sample
Demonstrates the use of the Vista and Windows 7 TDH APIs for manifested event consumption.
Event Log Consumer Sample
Demonstrates Event Log consumption using Evt APIs
Demonstrates some of the configuration capabilities of Windows Event Log.
This sample retrieves log information, exports events into a log archive, saves the localized message information for the exported log archive, and clears the log.
Demonstrates some of the provider and event discovery capabilities of Windows Event Log.
Demonstrates the use of querying and rendering capabilities of Windows Event Log.
Demonstrates some of the subscription capabilities of Windows Event Log.
Advanced Eventing CSharp Sample
Demonstrates advanced eventing concepts. For an introductory sample, refer to Samples\WinBase\Eventing\Simple\CSharp
WPP Consumer Sample
Demonstrates consumption of WPP events
Retrieves properties and property definitions for FSRM Classification
Demonstrates retrieving FSRM property definitions and properties on a file using native C++ COM
Simple Content Classifier for FSRM
Demonstrates how to create a simple managed content classifier for FSRM
Managed FSRM property enumeration
Demonstrates how to enumerate and get property definitions and properties on files from FSRM
FSRM PowerShell Hosting Classifier
A sample classifier that can host powershell scripts for determining classification of files
FSRM Content Based Classification Using IFilter
Demonstrates the extensibility of the FSRM classification infrastructure by adding a custom classification module to the FSRM pipeline. This classifier Demonstrates how to use the streaming interface exposed in the IFsrmPropertyBag, and to leverage IFilters to classify content on application generated files such as .docx, .xsl etc.
FSRM Sample Classification Module
Demonstrates the extensibility of the FSRM classification infrastructure by adding a custom classification module to the FSRM pipeline. The classifier can be configured via parameters to classify files that contain a particular text string in its contents or file name.
Asynchronous Create and Cancellation sample
Demonstrates safe usage of the CancelSynchronousIo API to cancel a call to CreateFile that is made 'asynchronous' by posting it to another thread.
Extended File Handle API Sample
Demonstrates a new API, GetFileInformationByHandleEx, that was added in the Windows Vista timeframe that allows a user to query the file system for extended information for a given file handle. In addition, it demonstrates the use of another new API, OpenFileById, which can be used to open a handle to a file when the underlying file system supports opening the file by ID (eg. NTFS).
Winbase: Oplock Sample
Demonstrates the usage of the new oplock levels introduced in Windows 7.
iSCSI Initiator Sample
Demonstrates how to use the iSCSI initiator apis with the Microsoft iSCSI initiator service.
Service Status Change Notification API samples
Demonstrates usage of the Service Status Change Notification APIs in Vista. This sample implements a simple service that monitors the start and stop of other services using the notification APIs.
Perflib v2 Basic Sample
Demonstrates basic functionality of perflib v2. For global aggregation, refer to sample located under Samples\WinBase\PerfCounters\GlobalAggregation\CPP.
Performance Counters (C#)
Demonstrates providing performance counter data from a .Net application using System.Diagnostics.PerformanceData namespace.
Perflib v2 Global Aggregate Sample
Demonstrates the use of Global Aggregation functionality provided by performance counter infrastructure.
Simple utility which demonstrates the functions needed to access the registry. The sample goes up and down the branches of the registry tree, displaying the individual key's data values.
Demonstrates how to create and install a service.
Unmanaged code sample for Enhanced Storage
Demonstrates how to work with certificate and password silo devices using portable devices API.
Enhanced Storage Interop Library
Demonstrates Managed Interop Library for Enhanced Storage API's
Windows Troubleshooting - Advanced
Demonstrates how to use the Windows Troubleshooting Platform to solve a simple configuration issue.
Windows Troubleshooting - Simple
Express Writer sample application
Demonstrates the new Express Writer functionality
Demonstrates how to create a VSS sample writer
VSS Requester Sample
Demonstrates Volume Shadow Copy Service(VSS) requestor functionality and design.
Volume Shadow Copy Service Sample Provider
Demonstrates operation of a VSS hardware provider.
WerReportAddDump API Code Sample
Demonstrates how to use the Windows Error Reporting APIs to send a report that contains a dump file of the current process.
WerReportAddFile API Code Sample
Demonstrates how to use the Windows Error Reporting APIs to send a report that contains a custom file.
RegisterApplicationRecoveryCallback API Sample
Demonstrates how to use the RegisterApplicationRecoveryCallback API. The RegisterApplicationRecoveryCallback API registers a special callback that Windows Error Reporting will call prior to terminating the process due to a crash or a hang.
RegisterApplicationRestart API Code Sample
Demonstrates how to use the RegisterApplicationRestart API. The RegisterApplicationRestart API lets Windows Error Reporting restart the application automatically in the event that the application crashes or hangs, or has to be restarted due to an update.
WerRegisterFile API Code Sample
Demonstrates how to use the WerRegisterFile API. The WerRegisterFile API allows an application to include a custom file that is collected when WER creates an error report in the event that an application crashes or hangs.
WerRegisterMemoryBlock API Code Sample
Demonstrates how to use the WerRegisterMemoryBlock API. The WerRegisterMemoryBlock API allows an application to include a block of memory as part of the minidump file that WER generates in the event that an application crashes or hangs.
WER Runtime Exception Module Sample
Demonstrates how to use the runtime exception module technology introduced by WER in Windows 7 and Windows Server 2008 R2.
WerReportSetUIOption API Code Sample
Demonstrates how to customize the Windows Error Reporting UI when creating and submitting a generic report.
Program Manager for Samples
Windows SDK Team