Samples, Samples, Samples

My name is Barry Butterklee  and I’m the Samples PM on the Windows SDK team. With the release of the Windows SDK for Beta2 of Windows Vista and WinFX Runtime Components I wanted to take a moment to give you a quick tour of samples in the SDK.

As the successor to the Platform SDK and .NET Framework SDK v2.0,  the Windows SDK, contains samples that target Win32/Com APIs as well as samples that target WinFX APIs. Teams throughout Windows (and the SDK team itself) contribute samples to the SDK. To give you an idea of the scope of the sample content in the Windows SDK, here is a high-level breakdown of the new samples developed for the Windows SDK:

400+ Windows Presentation Foundation samples

100+ Windows Communication Foundation samples

50+ Windows Workflow Foundation samples

130+ New to Vista (Win32/COM-based) samples

15+ Cross technology samples that combine the several of the above areas

As you can see from the numbers above, there is a ton of new sample content in the Windows SDK – our sample contributors have been very busy!

Now some of you may be wondering with all these samples, how do I find them?  The simplest way to find these samples is to navigate in the SDK documentation to the topic, Samples and Tutorials for the Windows SDK. This page allows you to navigate either to the new WinFX samples or to a listing of the Windows Vista samples (Win32/COM-based). The Windows Vista samples are located in the SDK’s \Samples subdirectory.  Each WinFX sample has a page in the documentation where the source code is available to view and download; or they are available in bulk from a handful of .zip files located in the \Samples subdirectory.

The following is a quick FAQ to help you out when using samples in the SDK:

Q. I’m running Windows Vista Beta2 and I cannot build a sample inside the SDK’s \Samples directory, what’s wrong?

A. Samples should be copied to a personal folder that is not under “Program Files”.

Q. How do I build samples?

A. When building a sample

Either load the sample’s project or solution file into Visual Studio 2005, or

Open an SDK command window to build the sample on the command line.

Q. What tool do I use to build sample code from an SDK command prompt?

A. For C# and Visual Basic use msbuild.exe, for C++ use vcbuild.exe (or nmake if there is only a makefile)

Q. Do I need Visual Studio 2005 in order to build SDK samples?

A. Some samples may have specific dependencies on Visual Studio 2005-specific features (such as ATL); but mostly Visual Studio 2005 is not a requirement to build samples.

Q. Are there any special caveats about some of the samples in the SDK?

A. Please check the SDK Readme for a complete description of known sample issues.


Any comments or feedback about samples in the SDK is greatly appreciated!

Comments (4)

  1. keeron says:

    Are there plans for adding managed samples (e.g. C#) for the native APIs added in Vista? Like the new search, security (UAC), etc? It would be useful for people building managed applications for Vista and wanting to make use of some of the new APIs.

    Also, certain APIs like the UAC, UI Automation, new Vista features – like RMS, Sync Center, don’t have enough samples.

    Would there be an "RC1" release of the SDK? or the next build is with the Vista RTM?


  2. Brian Cost says:

    Keeron, Thanks for the feedback.  Let me try to address your questions one by one.

    1.  Adding managed samples for new native APIs sets.  You mentioned search and security in particular.  Are there any other areas or APIs in particular you would especially like to see?  It would be great to hear from others in the community as well.  Having this information will help us better understand what is needed; though I cannot make any promises about producing specific samples.  Additionally, if you haven’t already, please do take a look at the Vista Bridge samples (demonstrates using several new native APIs from managed code) and let us know what you think – enter Vista Bridge in the SDK documentation search (local) and it is the first search result.

    2.  Not enough samples for UAC, UI Automation, RMS, and Sync Center.  I’ll let the product teams know!  Also, have you had a chance to review the following samples and were they useful for you:

    – SamplesWinUIUIAutomation – 2 samples here

    – SamplesSecurityRightsManagementServices – 8 samples here

    – SamplesNetDSSyncMgrSyncCenter – 1 sample here

    3. When does the SDK ship?  The Windows SDK ships on the same major milestones as the OS.

    thank you

    barry butterklee

  3. Scott Bailey says:

    Hi Barry,

    Thanks for your post regarding the samples in the Windows SDK. Since you’re asking for community feedback, I’d definitely like to see some samples for the WSDAPI eventually added to the documentation – either accessing it via managed code or using it via c++ / COM. The whole WSD API documentation is pretty sparse in its current condition but looks to offer some nice functionality.


    Scott Bailey

  4. Rod Stephens says:

    I’d also like to see managed CNG samples. We’re being told we should use CNG to make new Vista apps but I can’t even tell if it’s possible.

Skip to main content