Thursday, 21 October 2010

Connect to Skydrive as a network drive on windows 7

Windows 7 allows you to connect to your skydrive folders as network folders simply and easily, allowing you to copy and paste files without messing with all the web interface shizzle. The additional 25GB is great for passing your files too and from work, as shown here :

First open up your skydrive account and go into the folder that you want to share. In this example I've chosen the folder "New Folder".


As you can see above I've underlined two very important parts of the URL, these identify you account and your folder, which we'll use later. So... next step....

Open explorer and go to "my computer" then select the "Map Network Drive" option from the toolbar, when the setup screen appears the details similar to below but replace it with the number and folder name from the URL you looked at earlier.


As you can see the path is \\docs.live.net@SSL\<userid>\<foldername>, once you've entered this just press connect and enter your live username and password when prompted and then you're all done, your SkyDrive will appear in your drive listings :)

Ohh one more thing to remember, if you want to enter the "My Documents" or "Documents" default folder on skydrive you have to enter ^2Documents e.g. \\docs.live.com@SSL\170faf79965c6946\^2Documents don't ask why.

Tuesday, 19 October 2010

Anonymous Types

While creating a server/client app, I need to send a blob of information without the hassle of shared classes when using serialise / deserialise. After messing with my own serialiser (which worked and was ugly) I came across Anonymous Types. These little beauties let you create a type on the fly without prior declarations and are great for times when you need to store data for on a single occasion. Behold ....

MyData = New With {
      .ID = 999, 
      .Name = "SGs solarium",
      .Value = 999.99
      .Info = "Test anonymous types"
}

Later on you can then use the above like any other type.

As you can see by the lack of line continuation this is a 2010 only sample (maybe 2008, haven't tested that)