August 2005 - Posts

How to list all WinFS stores programmatically

If you want to list all your WinFS stores with a brief description in a application there is an easy way to do this. I am going to show you an example of how to do this with the StorageSearcher class.

using System;
using
System.Storage;
using
System.Collections.Generic;
using System.Text;

namespace
WinFSTesting
{
    class
Program
    {
        static void Main(string
[] args)
        {
            using (WinFSData wfsData = new WinFSData(@"\\localhost\Catalog\Stores"
))
            {
                StorageSearcher<StoreInfo> stores = wfsData.Items.FilterByType<StoreInfo
>();

                foreach (StoreInfo store in
stores)
                {
                    Console.WriteLine("Store: {0}"
, store.Name);
                    Console.WriteLine("\tComments: {0}"
, store.Comments);
                    Console.WriteLine("\tCreated: {0}"
, store.CreationTime);
                }
            }
        }
    }
}

What I do here is first to create a connection to the data stores with the WinFSData class. The parameter I put into WinFSData is the UNC path to the stores folder.

After that a I create an instance to StorageSearcher<T> that will contain all the StoreInfo filtered from the store. It is possible to change StoreInfo to Person, Document or whatever you want.

The next thing to do is to loop through the stores and show the data we want.

This is a very simple example, but if there are something you don´t understand, please leave a comment and I will do my best to answer you.

with 1 Comments

Channel 9 interview with the WinFS beta 1 team

Channel 9 released a video yesterday about WinFS with a couple of examples.

Go to Channel 9

with 0 Comments

WinFS installation

I have finally installed WinFS Beta 1 (must confess that I never thought I would actually do this since WinFS seemed to die until today when Microsoft released beta 1).

The installation worked very well and I didn´t have too change any settings att all, all I had to do was to click at continue a couple of times. Really smooth installation!

After the installation I had to restart my computer and after the restart a new icon had popped up in My Computer.

In that folder all the different WinFS Stores are collected. After the installation you should have a DefaultStore folder there, and if you right-click somewhere in the folder you can create new WinFS Stores.

I could only set C: as target volume even though I have both D: and E:. When you click Create a new WinFS Store should be there.

Visual Studio 2005

If you have Visual Studio 2005 Beta 2 you are allowed to program the WinFS after the installation.

Files that are included in the different projects:

WinFS Console Application

  • Program.cs - An ordinary console application

WinFS File Metadata Handler Library

  • FileMetadataHandler1.cs - Inherits System.Storage.FilePropertyManager.BaseFileMetadataHandler
  • FileMetadataHandlerInstaller.cs - Inherits System.Storage.FilePropertyManager.BaseFMHInstaller

WinFS Schema Library

  • HelperMethods.cs - Empty class file
  • keyfile.snk
  • Schema.xml - Contains a schema for WinFS

WinFS Sync Adapter Library

  • SyncAdapter1.cs - Inherits System.Storage.Sync.SyncAdapter
  • SyncAdapterInstaller.cs - Inherits System.Storage.Sync.AdapterInstaller

WinFS Windows Application

  • Form1.cs - Windows Form
  • Program.cs
with 0 Comments

What about the final name for WinFS?

As you may know WinFS is only the code name for Microsofts new file system, but what will the final name be like?

Guess 1:
Windows File Foundation - Horrible, isn´t it? This is one of my guests since the other fundamentals of Windows Vista (Avalon and Indigo) got their Windows Presentation Foundation and Windows Communication Foundation.

Guess 2:
Windows File System - This is because of their new names for Internet Explorer which will be Windows Internet Explorer instead of Microsoft Internet Explorer, Windows AntiSpyware, Windows OneCare etc.

These are just my speculations. :)

What do you think the final name should be?

with 3 Comments

WinFS Beta 1 is finally released!

I´m not kidding, it´s actually out!

Today Microsoft released beta 1 of their new file system WinFS including its SDK for MSDN Subscribers. The reason of why they release it this early is to give the PDC attendees time to evaulate it before the PDC next month.

I can´t wait to put my hands on my own copy. :)

System requirements:

  • Microsoft® Windows® XP Professional with Service Pack 2 (SP2) or Microsoft Windows XP Home Edition with SP2.
  • A 2.0 gigahertz (GHz) Intel Pentium 4, or AMD Athlon, or compatible processor is required. 3.2 GHz or higher is recommended.
  • 512 megabytes (MB) of RAM or higher is recommended.
  • An NTFS file system partition with 700 MB of free space is required to install and run "WinFS" Beta 1.

    While WinFS runs with .NET Framework Beta 2 it´s compatible with Visual Studio 2005 Beta 2.

    The WinFS team has also got their own blog a http://blogs.msdn.com/winfs.

  • with 3 Comments

    I need a life :)

    I was just checking the stats at the ASP.NET Forums and that made me realize that I really needs a life. ;)

    By the way, if there are someone out there in the world who is looking for an experienced .NET developer with very good knowledges about C# and Visual Basic .NET, please contact me!

    with 0 Comments

    Articles about the new gridview control

    At Gridviewguy you can find some interesting articles about the gridview control (new in ASP.NET 2.0).
    with 0 Comments

    Microsoft Visual Studio Extensions for WinFX Beta 1

    The Visual Studio 2005 Extensions for WinFX Beta 1 provides developers with support for building WinFX applications using Beta 2 of Visual Studio 2005. This support includes XAML Intellisense support through schema extensions for the editor, project templates for the Windows Presentation Foundation (formerly known as “Avalon”) and the Windows Communication Foundation (formerly known as “Indigo”), and WinFX SDK documentation integration. It does not include a graphical design surface for either the Windows Presentation Foundation or the Windows Communication Foundation. There is more information about these WinFX technologies below.

    Note: This is a Beta release. Therefore, do not install these builds on machines you depend on. If you have a previous version of Avalon ("Windows Presentation Foundation"), Indigo ("Windows Communication Framework"), or .NET Framework 2.0 installed, you must read this before download.

    "Windows Communication Framework" is the name for Microsoft’s unified programming model for building connected systems, formerly known as code-name "Indigo". It extends the .NET Framework 2.0 with additional APIs for building secure, reliable, transacted Web services that interoperate with non-Microsoft platforms and integrate with existing investments. By combining the functionality of existing Microsoft distributed application technologies (ASMX, .NET Remoting, .NET Enterprise Services, Web Services Enhancements, and System.Messaging), Indigo delivers a single development framework that improves developer productivity and reduces organizations’ time to market.

    "Windows Presentation Foundation" is the name for Microsoft's unified presentation subsystem for Windows, formerly known as "Avalon". It consists of a display engine and a managed-code framework. "Windows Presentation Foundation" unifies how Windows creates, displays, and manipulates documents, media, and user interface. This enables developers and designers to create visually-stunning, differentiated user experiences that improve customer connection. When delivered, "Windows Presentation Foundation" will become Microsoft's strategic user interface (UI) technology.

    This Beta1 release requires Visual Studio 2005 Beta2 and the .NET Framework 2.0 beta 2. Additionally this release requires the Beta 1 releases of the WinFX SDK and the WinFX Runtime Components.

    Download

    with 0 Comments

    The August CTP of the SDK is out

    The August CTP of the SDK for Visual Studio 2005 is out.

    The August SDK adds 2 C# samples ( Package, MenusAndCommands ) that have been rewritten to our new quality level. It will work only with Visual Studio Beta2. This is unsupported and it’s not recommended to install this version of the SDK onto your main production machine - use with caution. We welcome your feedback through the extensibility newsgroups.

    Read more & download

    with 0 Comments

    From the Milky Way to quarks

    Check this cool java applet out:

    http://micro.magnet.fsu.edu/primer/java/scienceopticsu/powersof10/index.html

    Really nice done!

    with 0 Comments

    First Vista virus exploited

    It took only 8 days before the first virus for Windows Vista Beta 1 were written. The programmer who wrote it calls himself "Second Part To Hell" and is an Austrian hacker. The virus takes advantage of the new shell in windows vista (monad) and F-Secure has named it to "Danom" (Monad in reverse).

    Further reading

    with 0 Comments

    I just lost the game!

    Warning: If you are playing the game, you´ve got 30 minutes to forget you read this.

    If you were not playing the game, you are now...

    Rules

    1. To know The Game is to play The Game. One can never stop playing.
    2. To think of The Game is to lose The Game.
    3. When one loses The Game, one must announce to all present that one has lost. (For example, “I just lost The Game!")
    4. To hear about a loss is to earn thirty minutes to forget about The Game.

    More info about the game

    with 1 Comments

    Personalize Google

    Now you can personalize google with news, weather, economics etc.

    Visit google

    with 0 Comments