Your best source of information and news about BIOS, secrets and microsoft on the internet

Vista ARTICLES TOP 50 Spyware Virus Vista SOFT Vista HELP

Windows 7 Libraries .NET Sample Library – an Overview


Libraries are the primary entry points to user data in Windows 7. They are the natural evolution from the user’s Known Folders, including those for documents, pictures, music, and videos. However, before jumping into the technicalities, let’s try to explain what a Library in Windows 7 is. A Windows 7 Library is a user-defined collection of content that represents the user’s data independently from the folder hierarchy. Users can unify and flatten the folder hierarchy by aggregating any number of physical locations (on their local machine or on remote machines) into a single view – which is the library. By including folders in Libraries, users tell Windows where their important data are located. In Windows 7 therefore, most applications should use a Library instead of the user’s Known Folders. It is important to note that as Libraries are an integral part of the Windows Shell, they play a greater role in the Windows 7 Explorer user experience. Accordingly, the importance and integration points of Libraries span multiple parts of the Windows Shell, including the Common File Dialog, Folder Picker, and the Windows Explorer Browser control (not Internet Explorer!).

This is the first post in a series of Library posts. It provides an overview of both the Windows 7 Library functionality and the Libraries Sample .NET Interop Library, which is a managed code wrapper and part of the Windows 7 .NET Interop Sample Libraries. The second post is all about Understanding Windows 7 Libraries. In future posts, we will dive into the internal implementation of Libraries as well as how to use the Libraries programming model and APIs.

If you are unfamiliar with and haven’t seen any demonstrations of the updated Windows 7 Shell and Libraries in action, I suggest you watch the Windows 7: Find and Organize Part 1 webcast on Channel 9. This will give you some context for the technical material we cover here.

Let’s review the Windows 7 Libraries .NET Interop Sample Library architecture and note the important classes. Please remember that the Libraries sample is part of the Taskbar and Libraries assembly. Since both Taskbar and the Libraries share many common integration points with the Windows Shell, it makes sense to have them grouped together and use the same Shell structures and methods.

Opening the solution reveals the following structure:

  • The Demos folder containing several demo projects that show the various aspects of both the Taskbar and Libraries wrappers as you can see from the image; we will focus on the Libraries
  • The Wrappers folder containing the Windows7.DesktopIntegration assembly, which is the main manager API for both the Taskbar and Libraries
  • A modified version of the Vista Bridge Sample Library - We based our code on the 1.4 version. And as mentioned before, the Windows Vista bridge Project will be superseded by the new Windows API Code Pack for the .NET Library
image

Let’s take a quick look at the main class that enables developers to take advantage of the new Library functionality. The ShellLibrary.cs file contains the ShellLibrary class, which is the main entry point for managed code developers. Using the ShellLibrary, developers can programmatically perform all Library operations, including:

 

The demos in the Libraries folder highlight all the above-mentioned Library functionality. Let’s review them:

image

 

image

 

Here are some additional resources for programming Windows 7 Libraries:

View Channel 9 videos:

Additional blog posts

 

Alon Fliess contributed to this post

Popularity: 1%


Written by Yochay Kiriaty. Read more great feeds at is source WEBSITE
no comments.
Read more articles on Libraries and Windows 7 for Developers Blog and Sample Code and otherSoftware and windows 7 and .Net and Developers and Microsoft.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> .