Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Windows 7 .NET Interop Sample Libraries

30 Mar 2009   #1

Windows 7 .NET Interop Sample Libraries

We've got .NET sample libraries and example for managed code developers to target Windows 7 new APIs!

Windows 7 offers new functionality that developers can exploit in their applications to provide enhanced experiences and productivity for their end users. Included among these new features is the ability to add custom Tasks to the Taskbar Jump Lists, support the new Libraries and make your application Library aware, allow enhanced user interaction with Multi-Touch, and extend the application to “react” to its surroundings by adopting the Sensor and Location platform. You can read about these and many more new Windows 7 features in the Windows Engineering blog, Channel 9 videos, in earlier posts, and on The Windows Blog.

The Windows 7 Beta SDK is a great source of documentation and examples for using these new sets of APIs. However, most of the examples are written in native code similar to Windows 7 APIs which are all native C, C++, and COM APIs, which makes the life of managed code developers a bit hard. For that reason, Microsoft created the Windows Vista Bridge project that makes it easier for managed code developers to use Windows OS-specific APIs such as those described above. The current version of the Window Vista Bridge, version 1.4 contains many useful “Windows Vista” features such as Restart and Recovery, Search, Power Awareness and other Shell integrations. However the current version doesn’t include any Windows 7 features. It will support key Windows 7 APIs in the near future, but until then, we have developed an intermediate set of solutions for supporting managed code developers who wish to target Windows 7 Beta today and not wait for the time the Windows API Code Pack for the .NET Library (the new name of Windows Vista Bridge) will be available.

NOTE: It is important to be aware that these solutions are not the “official libraries”; they come with no support or any sort of warranty -- in other words, use them at your own risk!

With that caveat in place, we can go ahead and introduce some new managed code wrappers that will allow managed code developers to use the Windows 7 Taskbar, manipulate Libraries, add Multi-Touch support for WinForms or WPF 3.5 SP1, and enable Sensors and Location in their applications.


The Taskbar Sample .NET Interop Library allows developers to:
  • Create and manipulate JumpLists including tasks and items
  • Display Dynamic Overlay Icons, Thumbnail Toolbars
  • Use the Taskbar progress bar
  • Control Custom Thumbnail Preview, and custom Preview also known as – AeroPeek
The Windows 7 Taskbar Sample .NET Interop Library is available for download and include 4 demos showcasing all the Taskbar features.


Libraries are new in Windows 7 and provide a logical representation of the user’s data on his local computer and on remote computers. With Libraries, the user can define which physical folders are mapped to which library and achieve better search quality and easier “maintenance” of his content. In Windows 7, it is important for developers to

enable their applications to become Library-aware by supporting Libraries. This will integrate the user's application and Windows experiences and maintain the integrity of your applications in various scenarios

The Windows 7 Library Sample .NET Interop Library allows developers to:
  • Manipulate and control the libraries in Windows 7 including create a new library or delete an existing one
  • Add or remove physical locations to a Library
  • Set an icon for each library
  • Enumerate the contents of a given library's physical location (the actual folders) to track down and map all the items in that library
The last point is very important since the Library root (that is the Library itself) is not a real directory (there is no “c:\Libraries” or anything similar); it is just a logical location. In order to get to the actual items within the Library, you need to enumerate the contents through the listed physical folders.

The Windows 7 Library Sample .NET Interop Library is available for download, and we will provide a series of posts and Channel 9 Screencasts showing how to use the Libraries and Taskbar in Managed Code applications.

Sensor and Location Platform

The Sensor and Location platform provides a new and unified set of APIs for sensory inputs, for example Accelerometer, Light Sensors, or Location GPS are just few examples of sensors. This unified set of APIs makes it easy to consume sensory inputs and simplifies the Windows developer's life.

The Sensor and Location .NET Interop Sample Library provides an abstraction of the native Sensor and Location API and provides strongly typed objects for specific sensors and for its Sensor Data Report. For example, a Light Sensor has a strongly typed LightDataReport object.

With the Sensor and Location .NET Interop Sample Library, developers are able to create strongly typed custom sensor objects as well as use three built-in sensors: Accelerometer3D Sensors, Light Sensors, and Touch Array Sensors. These sensors are part of the Windows 7 Sensor Development kit.

This library also provides a unified location API for asking the common question of, "Where am I?" The nice thing about the Location platform is that developers can use the same APIs regardless of the underlying technology that is actually providing the answers, such as GPS, Wi-Fi triangulation, or IP Resolver.

The Library also includes a few demos like a light-aware MSDN Reader that changes the way the content displays according to the amount of light picked up by the Light Sensor.

The Sensor and Sensor and Location .NET Interop Sample Library is available for download, and make sure to read the prerequisites.


One of the most popular features in Windows 7 is Multi-Touch support. As was presented during PDC 2008, Windows 7 Developing Multi-Touch Applications, the current API is native and in the near future Windows Presentation Foundation (WPF) 4 will include full support of Multi-Touch in Windows 7. However, for the time being, the Multi-Touch Sample .NET Interop Libraryprovides developers with full Multi-Touch functionality for both WinForms and WPF 3.5 SP1. The library includes few demos for reference, including detailed samples showcasing Multi-Touch gestures support, Manipulation and Inertia for both WinForms and WPF.

You can download the Multi-Touch Sample .NET Interop Library from.

A small and friendly reminder: These are just sample code; they are not supported and are based on the Windows 7 Beta SDK, which means they WILL CHANGE by RTM time. Make sure you stay alert for updates on the Windows Bridge status for the official Managed code libraries supporting Windows 7.


My System SpecsSystem Spec

 Windows 7 .NET Interop Sample Libraries

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar help and support threads
Thread Forum
Use voice sample to recreate a different sample
I have a recording of my friends voice, is there some kind of program or code I can use to recreate his voice, and let him say a different sentence than the one I recorded? Any kind of help is appreciated.
Sound & Audio
Sample Preview Program for Windows 7?
Hi, was looking for a bit of help with audio samples in Windows 7. For the last few years have been using Mac but now have changed over to a PC using Windows 7. Wondered is there a software program like Red Snapper or Audio Finder for Windows 7 so you go through your sound files and preview...
Sound & Audio
Free Sample Chapters from Microsoft Windows 7 Books
Download these free preview chapters from soon-to-be-published Microsoft Press books about Windows 7. Windows 7 Inside Out Windows 7 Resource Kit Windows 7 Step by Step Windows 7 for Developers Windows 7 Inside Out Learn how to become an expert on Windows 7—from the inside out! This book...
Windows 7 Libraries .NET Sample Library – an Overview
Windows 7 Taskbar .NET Sample Library – an Overview
Windows 7 Sensor and Location .NET Interop Sample Libra

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 01:06.

Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App