shahine.com/omar/

homepage | Send mail to the author(s) contact

yet another Microsoft blogger

 Friday, December 31, 2004

Do Not Deliver Before

My buddy Reeves just pointed me to a sweet Outlook feature that I never knew about called Do not deliver before. In a recent post I commented on how I'm trying to get in the habit of not doing work email on weekends, vacations etc. Well one problem with this is I could be on a plane or a train and I want to hammer out some mails from my inbox (but don't want to send them, because that sets a bad example). Additionally, if people are on vacation, I know that my email will just sit in their inbox and drift down to the bottom and possibly get lost. Worse, if they check their email over their vacation, I don't want to create work for them and stress them out.

Here is a good example. It's 1 am, and I just thought of something I want to tell my manager and our admin. Well they are both on vacation till Monday. So what is the point of sending this to them now? It could get lost, or read and left in the inbox. Instead I have scheduled to have it delivered Monday afternoon.

So, using "Do not deliver before", you can just tell Outlook not to send the message before a specific date and time. To do this simply:

  1. In a new mail message select Options from the Toolbar (if you are using Word Mail)
  2. Click the Do not deliver before checkbox and enter a date and time.
  3. Hit send

Viola!

Update: Thanks to Chris Graham for letting me know that if you have an Outlook Deferred Deliver Rule this will override the per message option and deliver the mail according to those settings.

Posted Friday, December 31, 2004    Permalink    Comments [1]  View blog reactions

 

 Wednesday, December 29, 2004

Windows XP File Association Fixes

The other day I was unable to open a .cab file on my PC. I had no idea how the file association got messed up. At the same time my .zip file associates were bad. I stumbled onto this great site that has some registry entries you can download to fix some of these common problems.

Posted Wednesday, December 29, 2004    Permalink    Comments [0]  View blog reactions

 

 Tuesday, December 28, 2004

USB Devices

I have always wondered why Windows treats a USB device plugged into one port as a brand new usb device when plugged into another port. My Mac never did this, or at least it was never apparent. However, the fact of the matter is, Windows makes it very obvious to you when you've added new hardware, even if that is a USB KeyChain drive or something. I'm not sure if that is a good thing or a bad thing.

At least I know that this is because the device does not have a serial number (Thanks Raymond for the explanation):

"In other words: Things suck because (1) things were already in bad shape—this would not have been a problem if the device had a proper serial number—and (2) once you're in this bad state, the alternative sucks more. The USB stack is just trying to make the best of a bad situation without making it any worse."

This can pretty much some up most of technology. Compatibility is king.

Posted Tuesday, December 28, 2004    Permalink    Comments [2]  View blog reactions

 

 Monday, December 27, 2004

Misha

Misha

It’s been a while since I posed pics of Misha. He’s almost 2 years old! Can’t believe I have a cat, since I grew up a dog person and didn’t like cats much. What a convert I’ve become. I still love dogs, but have a special place in my heart for felines.

Also, I finally completed getting allergy shots every week for the past year. They really work. My asthma is practically non-existent, and Misha doesn’t bother me any more. Plus I’m off almost all my allergy medication, which rocks. Less medicine = good. I’ve been taking allergy pills for most of my life!

Posted Tuesday, December 28, 2004    Permalink    Comments [0]  View blog reactions

 

 Friday, December 24, 2004

RSS in Outlook and Newsgator

I've been using Newsgator Outlook Edition for over a year now and generally think it's a rock solid piece of software. However, today I installed it from all my computers. I've come to the conclusion that RSS in Outlook is not what *I* want. Dare Obasajo and Dan Crevier both discuss this recently. I've had some real problems dealing with the volume of RSS that I get in Outlook, and to be honest, I don't have the time to quickly and effectively deal with it. Furthermore, the presence of all these unread post items just plain stresses me out.

Here are some of the issues with RSS in Outlook

  1. High Volume feeds, like blogs.msdn.com, or engadget are cumbersome to quickly read.
  2. High Volume feeds keep building up and there is no way for things to "fall off", they just stay around in Outlook till I do something with them.
  3. Search Folders do not help. All they do is make it take longer for me to get through RSS items.
  4. Outlook and it's mail centric view are not well suited for reading stuff that came from the web.
    1. Outlook doesn't download images till you click on the item. For engadget, I can read the web page a million times faster then the RSS items.
    2. I can scan an RSS web page with dozens of items a million times faster. I'm careful to say RSS Webpage because scanning just the web site with the custom colors, fonts, ads, images etc breaks up the flow of a consistent XSLT applied to an RSS feed.

The bottom line is this. I got really stressed out by having all these unread items in my Work Environment. RSS was no longer fun, and it was yet another thing I had to do before feeling like I could get closure on the day. This just isn't cool at all. Getting RSS out of Outlook makes it so I can focus on my work, and Outlook is my primary work tool.

Dare really hits the nail on the head:

"The major problem is that the Outlook mail reading paradigm has a fundamental assumption which turns out to be flawed. It assumes you want to read every item you get in your inbox. This flawed assumption leads to the kind of information overload that hampers the productivity of lots of people I know at work."

Like Dan mentions, I also don't read every item in my inbox, but I do need to triage every item in my inbox. Since I get anywhere from 50-200 items in my inbox (not including all the stuff filtered away), I don't have the time to triage 400 or so RSS items the same way that I triage my mail, and it turns out that the web based view of RSS allows me to do this much quicker, with less stress, and it's more fun. Plus it lets me focus on doing this on my own time, and not get distracted at work.

Additionally, I got tired of zillions of folders, and even more whenever folks decided to change the title of their blog (For Scoble, this happens monthly). Also, my Exchange quota, at 200 MB is not big enough for all the RSS I want to keep around.

So, what am I using for my RSS reading now? NewsGator Online. I happen to Love the UI for reading an managing RSS there. I get roaming, clips, folders, a feed list I can have on my blog, mobile support, and some nice Keyword feeds for my Ego (I can find any mention of my name in an RSS feed, and it works not like the Feedster feeds which flake out frequently). I'm also playing with Feeddemon 1.5 beta which support synchronization with NewsGator Online so I can have a rich offline RSS experience that also supports the web like way for viewing RSS.

So, the combination of NewsGator Online and optionally an RSS aggregator that synchronizes, and doesn't use Outlook plus has newspaper like views on RSS is my new RSS ticket.

Posted Friday, December 24, 2004    Permalink    Comments [2]  View blog reactions

 

 Thursday, December 23, 2004

Outlook Folder List Weirdness

Sometimes software just baffles me. A few days ago, my Outlook 2003 decided to quit remembering the collapsed state of my mail folders in the folder list. Just like that. Sometime last week. Basically, no matter how I change the folder expand/collapse state, whenever I quit and launch Outlook they are exactly where they were when I launched the previous time.

Now, this problem does not happen on 2 of my computers, just my laptop. I spent some time pulling my hair out and did what any good geek does when they can't fix something. I pave'd my machine using Remote Installation Services at work, installed a fresh copy of Tablet SP2, and then installed Office. Guess what? Problem still happens. I can't believe it. This problem really has me stumped. Has anyone else had this problem? What did you do about it?

Posted Friday, December 24, 2004    Permalink    Comments [3]  View blog reactions

 

dasBlog 1.7 progress

Well I plan on spending the next few days getting together a beta of dasBlog 1.7. I've been slowly doing some work on dasBlog the past few months (emphasis on slowly). To be honest I was pretty close to closing up shop on dasBlog and eventually writing something new from scratch, mostly because I felt there was to much to fix and a bunch of things were broken that I didn't feel like dealing with. However, thanks to some inspiration from Scott Hansselman and Clemens, I'm much more excited about continuing to work on the code. In the coming weeks I will get around to moving dasBlog from GotDotNet to SourceForge or some other place. GDN is just way to frustrating to use, and I'm the only person left contributing because of the hassles and issues with using Source Control over there. Dare did the same thing with RSS Bandit and a year later he seems happier for it.

Having said that, version 1.7 has some unbelievable performance improvements. Scott Hansselman did some amazing work under the hood and increased Runtime and RSS performance a great deal. Furthermore he added a Referral Spam Blacklist, a CAPTCHA solution for comments, and an IP address Blocker. I just installed the bits on my site and it's amazing how much faster things are. My ISP should be much happier.

There is another important change in 1.7. Due to a very unfortunate bug that has existed since 1.3 or so, the dayentry.xml and dayextra.xml files were created based on UTC for dayentry and local server time for dayextra. This meant that when dasBlog went to go write a referral or trackback to the dayextra file for a lot of folks that file was the wrong file. In my case since my server is in GMT -5, any attempted writes to this file between midnight GMT and 5 am were lost. I came up with a fairly clever way of fixing it, but this does mean that for users who first install 1.7 there is a one time hit where dasBlog goes and loads all the old files, creates new ones with UTC file names, and then backs up all the old ones. This can take a while if you have a lot of entries and dayextra files.

Anyway, I plan on finishing up some final things and posting a beta to GDN before the new year. If you want something sooner to play with leave me a comment and I'll send you mail when it's ready.

Posted Friday, December 24, 2004    Permalink    Comments [5]  View blog reactions

 

 Tuesday, December 21, 2004

Santiago, Chile and e-mail

Sunday my wife and I returned from an awesome vacation in Santiago, Chile. It was the first time this year that I went email/internet free for 6 full days. I did bring along my tablet so I could offload the gigantic photos that my Nikon D70 takes, but other than doing that I didn't touch the machine. I did carry my Audiovox 5600 around, but only got 3 phone calls. At $2.99 a minute for international roaming, I didn't want very many.

Not doing email for a few days at Microsoft is a hard decision some times. You are essentially postponing the inevitable. At least one full day going through a couple hundred unread items when you first sync up. Since we had a 2 hour layover in Miami on the way back, I ponied up $6 for T-mobile wifi, watched in horror as Outlook downloaded 35 MB of email, and then spent the next 8 or so hours getting my inbox back down to pre-vacation levels (5 messages or so). Not only that, but this was a very stressful 8 hours as I watched the past week unfold between my eyes.

Anyway, my wife and I were thankful for my time away from email. I think from now on I am going to spend real honest to goodness vacation time (the 3 weeks I get a year) not doing any work e-mail. I think doing e-mail on your vacation sets a bad precedent that basically tells your co-workers that you are always available to respond to issues and problems. I think the same is true for weekends and evenings. For the past few weeks I've tried to not respond to e-mails on Saturday etc.

Back to Chile. What a cool country. This is now the second South American country I have visited (Brazil being the other). Chile is a very modern country, and has a lot in common with California. Excellent wines, rocky and beautiful coastline, and enormous mountains. The Wine is a heck of a lot cheaper though. At the nicest restaurants I never paid more than $11 for a bottle. Furthermore, I never paid more than $55 for a three course meal with wine for two. And this is with a weak dollar (about 10-15% weaker than normal). Pisco Sour's are great drinks, I happen to like the Peruvian variety better. Much like Capirina, the national drink of Brazil.

While we were there, Lora and I roamed the city for 2 full days, visited 2 wineries (Concha y Toro, and Undurraga), visited the beach towns of Viña del Mar and Valparaiso and took a tour up the Andes to see some ski villages (of course it was summer when we were there). Concha y Toro, and Undurraga are both two of the large wineries, and comparable to say Robert Mondavi and Neibalm-Coppola in size and quality. We liked Undurraga a lot more, and they happen to have a really cool wine bottle design that only they are licensed to use in Chile.

Furthermore, we discovered a new wine varietal, Camenere, that is only readily planted in Chile as most of the world population of this grape was killed by Phylloxera.

Overall it was a fantastic trip, and we'll definitely return to Chile to check out the North and South of the country that we didn't get to see this time around.

 

Posted Wednesday, December 22, 2004    Permalink    Comments [0]  View blog reactions

 

 Tuesday, December 07, 2004

Outlook Wish List

Since it's almost Christmas, here is what I want from Santa.

  1. A button that will prevent people from including me in the reply to an email (I call this the remove me from thread button)
    1. Here in Hotmail you get these ridiculously long threads that you get added to for no good reason, or you answer a question being asked, but then you proceed to get 500 responses as the issue drags on and on.
  2. A button that will prevent people from doing a “Reply All“ to an e-mail.
    1. Some times you just don't want people to abuse email and Reply All to threads, or they accidentally Reply All rather than Little-R to a thread
  3. Managed Programmability support (Current situation with PIAs is no good).
  4. Project Management features like Entourage.
  5. better IMAP.
  6. RSS Reader.
  7. Support Internet Style replies (Plain Text messages where quoted text goes on the bottom and messages are quoted using >.
  8. Support for Format-Flowed [Thanks to Dan Crevier for catching my mistake earlier and saying Quoted Printable] 
  9. A single mail editor that works well, and doesn't have toolbars that move randomly (Word Mail).
  10. A single mail editor that generated XHTML compact output.

It's a modest list with nothing fancy. Just the things that would make me happy. I could go on and on...

Posted Wednesday, December 08, 2004    Permalink    Comments [7]  View blog reactions

 

 Monday, December 06, 2004

When ReleaseComObject is necessary in Outlook

Some might tell you that you never need to call Marhal.ReleaseComObject when writing managed code in Outlook. Well there are two very specific situations in which you must call RCO or else you will encounter problems. They are:

  1. You create toolbar buttons in new Inspector windows
  2. You use the Explorer.ActiveExplorer() method.

This is also a good point to tell you that if you are going to call RCO, you need to use a shim or you will hose other add-ins that are running in the same Domain as Outlook (the default).

You may also wan to read Eric Carter's post on Getting Outlook to shut down which offers a different approach for problem #2. I'm not sure if his approach fixes the corrupted folder list. He makes some great points in that post, and sadly in my case it is in fact necessary to call RCO (as far as I can tell).

1. Creating a Toolbar in new Inspector Windows

It's pretty common for an add-in developer that has created a toolbar to wish to have them appear in the Inspector windows. My Send to OneNote Powertoy does this, and I didn't find out about this problem till a few users reported it. Some kind folks at Microsoft told me how to work around it.

Basically, what happens is this. Whenever you create or modify a new Sticky Note in Outlook, Outlook tries to add your toolbar button to the Inspector. However, you can't do that. Outlook deals with this by presenting the following two dialogs. The first happens if you Lock your computer, then unlock it. The second happens when you quit Outlook.

Exhibit A: "Could not complete the operation. One or more parameter values are not valid."

Exhibit B: "The note will close and your changes will not be saved."

The solution to this problem is to:

  1. Handle the OnNewInspector Event
  2. Call Marshal.ReleaseComObject on the Sticky Note Inspector

Handle the OneNewInspector Event

See code below:

public void OnStartupComplete(ref Array custom)
{
    this.ApplicationInspectors = this.ApplicationObject.Inspectors;

    try
    {
        this.ApplicationInspectors.NewInspector += 
             new InspectorsEvents_NewInspectorEventHandler(OnNewInspector);
    }
    catch (Exception e)
    {
        Debug.WriteLine(e);
    }
}

Where ApplicationInspectors is an instance of type Inspectors and ApplicationObject is an instance of Outlook.Application.

Call Marshal.ReleaseComObject on the Sticky Note Inspector

This is where you prevent the errors from happening.

private void OnNewInspector(Inspector inspector)
{
    object item = inspector.CurrentItem;
    if (item is NoteItem)
    {
        Marshal.ReleaseComObject(inspector);
        inspector = null;
    }
    else
    {
        / ... /
    }
    if (item != null)
    { 
        Marshal.ReleaseComObject(item);
        item = null;
    }
}

Problem solved. Now on to problem two which is more complicated.

2. Handling Explorers in Outlook

It is very common for an Outlook add-in to use the Explorer object. If you are adding toolbars to the Explorer, or you are manipulating such things as messages, contacts etc, or you wish to get the selected item you need to call Explorer.ActiveExplorer(). The problem with calling this is that you can run into a situation where if you do not call RCO on the ActiveExplorer then you can cause Outlook to not persist the collapsed state of the folder list (all items will be collapsed when you restart) or even worse, Outlook won't close. I've found that Send to OneNote has both these problems. I wasn't aware of the collapse folder list bug till a few days ago, but I've known about the Outlook shutdown bug for months, but I could not explain it. The problem only seemed to happen when you had many add-ins installed. If my add-in was living on its own in Outlook I never saw any problems.

In order to call Marshal.ReleaseComObject() on the Explorer that you are using you need to do some work.

  1. Create a custom ExplorerCloseEvent class that holds on to the Explorer object
  2. Handle the OnExplorerClose event
  3. Call Marshal.ReleaseComObject on the closing Explorer

The reason that you have to do this is because by default the Explorer.Close() event does not pass in the current Explorer, so you have to write your own class with it's own event handler to do this.

Create a custom ExplorerCloseEvent class that holds on to the Explorer object

public class OfficeExplorerCloseEvent : IDisposable
{
    private Outlook.ExplorerEvents_Event explorer;
    private Handler handler;

    public delegate void Handler(object sender, EventArgs args);

    public OfficeExplorerCloseEvent(object explorer, Handler handler)
    {
        if (explorer == null)
            throw new ArgumentNullException("explorer");
        if (handler == null)
            throw new ArgumentNullException("handler");

        this.explorer = (Outlook.ExplorerEvents_Event) explorer;
        this.handler = handler;

        HookEvent();
    }

    public object Explorer
    {
        get
        {
            return (this.explorer);
        }
    }

    public void Dispose()
    {
        this.explorer.Close -= 
            new Microsoft.Office.Interop.Outlook.ExplorerEvents_CloseEventHandler(this.ForwardExplorerEvent);
    }

    private void HookEvent()
    {
        this.explorer.Close +=
            new Microsoft.Office.Interop.Outlook.ExplorerEvents_CloseEventHandler(this.ForwardExplorerEvent);
    }

    private void ForwardExplorerEvent()
    {
        this.handler(this, new EventArgs());
    }
}

Handle the OnExplorerClose event. This code builds on the first code snippet of the OnStartupComplete() method.

public void OnStartupComplete(ref Array custom)
{
    this.ApplicationExplorers = this.ApplicationObject.Explorers;
    this.ApplicationInspectors = this.ApplicationObject.Inspectors;

    try
    {
        this.ApplicationInspectors.NewInspector += 
             new InspectorsEvents_NewInspectorEventHandler(OnNewInspector);
    }
    catch (Exception e)
    {
        Debug.WriteLine(e);
    }
    
    if (this.ApplicationObject.Explorers.Count > 0)
    {
        this.ApplicationExplorer = this.ApplicationObject.ActiveExplorer();
        new OfficeExplorerCloseEvent(this.ApplicationObject.ActiveExplorer(), 
            new OfficeExplorerCloseEvent.Handler(this.OnExplorerClose));
    }

    Marshal.ReleaseComObject(this.ApplicationObject.ActiveExplorer());
    Marshal.ReleaseComObject(this.ApplicationExplorer);
}

As you can see in the last two lines I call RCO on the ActiveExplorer and the ApplicationExplorer (which is just an instance of the current Explorer). I'm not 100% sure if you have to do this, but I gave up debugging this nonsense after a few hours and just left it in there.

You must also be sure to see if you have any existing Explorers before doing this as you don't want to hook the event unless Outlook is starting in UI mode (it can be instantiated through ActiveSync for example w/o any UI and in that case Explorers will not exist).

Call Marshal.ReleaseComObject on the closing Explorer

Now that we have hooked the OnExplorerClose lets see what we do in that Method.

private void OnExplorerClose(object sender, EventArgs args)
{
    Explorer explorer = ((OfficeExplorerCloseEvent) sender).Explorer as Explorer;
    ((IDisposable) sender).Dispose();


    while (true)
    {
        if (Marshal.ReleaseComObject(explorer) == 0)
        {
            break;
        }
    }


    explorer = null;

    GC.Collect();
    GC.WaitForPendingFinalizers();
}

In the above code snippet I am getting the Explorer instance that the OfficeExplorerCloseEvent is holding, and calling RCO on it till the RefCount is 0. This ensures that the are all disposed. Then I call the GarbageCollector to clean things up for me.

Final Thoughts

I hope this shows you that doing what appears to be straightforward with managed code in Outlook isn't. I could write a few more blog posts about things I've encountered, and probably will when time permits. I'm pretty excited because for the first time in months, Outlook is shutting down cleanly 100% of the time!

I would also like to thank all those folks that helped me with this problem, or provided code to guide me. I can't actually remember who helped me get this far...

Posted Tuesday, December 07, 2004    Permalink    Comments [5]  View blog reactions

 

Microsoft DigitalPersona (Biometric Fingerprint Reader)

Who ever said Microsoft doesn't innovate is just full of it. I just picked up the Microsoft Fingerprint Reader. This thing is so utterly cool. The software it comes with is awesome.

Basically it works like this. You install some software, reboot, plug in the reader and train it on any of your fingers. Now if you have a PC at home that is configured to use Fast User Switching, you just place your finger on the device and it automatically logs you in. It even knows which user to select.

But it gets better. On any web page, or Application, you can configure the device to enter your credentials. The UI is super cool, and it does an amazing job at guessing where the right text boxes are, and places this nice halo around the box to make the selection explicit. You can also point it to things if it cannot figure out what the username, password or signin buttons are. Finally you can configure it to select “Remember my password” and such. Below is a screen shot of what this looks like for logging into my blog.

I have also configured the device to enter my Microsoft Money Password, which is super cool.

Kudos to the Microsoft Hardware folks. This thing rocks. I wish my laptop had a biometric reader.

Posted Tuesday, December 07, 2004    Permalink    Comments [9]  View blog reactions

 

 Sunday, December 05, 2004

CleanSources

A while ago I lamented that the “Clean Project” button in VS.NET did nothing for .NET projects. I thought that it would be nice to have something that would empty the bin, obj, and setup folders of crusty stuff, or just nuke it if you plan on zipping your source to email to some one. There is really no need to send that stuff since the compiler will generate it all again later.

So I whipped up a little application called CleanSources that will do just that. The application will place a contextual menu when you right-click on a folder and it will then recursively go through and get rid of that stuff.

update: you really shuold get Jeff Atwood's Clean Sources Plus. It's much bettter than mine :-).

Posted Monday, December 06, 2004    Permalink    Comments [5]  View blog reactions

Clean.cs (1.4 KB)

 

CD/DVD Burning in XP

<rant>

I really want to know why the top two windows CD/DVD burning programs as such big fat junky programs. For many years I used Roxio Easy CD Creator. In fact, I used Toast on the Mac for many years (same company) and was super pleased with it. For a while Easy CD Creator annoyed me so I switched to Nero for a while, but I growingly got annoyed with all the junk they installed.

So after I got a DVD Burner and wanted to burn DVD Videos from my DV Camera I switched to Roxio Easy CD Creator 7. Now this looks like a nice program on the back of the box, but when you load it up you realize that it's one bloated unusable buggy program. For one thing they decided to rewrite all the standard windows controls like tabs, buttons, and menus. Now, when I see a program do something like this I wonder what a huge freaking waste of time it must have been for their developers to basically rewrite a bunch of UI Widgets that the OS gives you for free. Additionally, when you re-write OS widgets you introduce bugs and behaviors that the OS does not have, which in turn confuse your users. So, this is an immediate sign that the software is probably junk as those resources should be spent making a decent program.

Well the final straw for Roxio happened last night when I launched it to burn a DVD and it would not launch. I went to the web site and there was a honking 50 MB download that fixed this problem. Ugh. Not only that, but after installing it Roxio broke my CD Drive. Lucky for my google skills I found a KB article that instructed me to hack my registry to fix this problem. The KB article mentions version 5, but I guess Roxio still didn't learn it's lesson in Version 7. Even worse was I found this after 2 hours of taking my PC apart and fiddling around thinking my drive was dead.

Now none of this would be a problem if Windows was able to write to DVD like Mac OS X. And none of this would be a problem if Microsoft made a program like iDVD that allowed me to burn high quality DVDs of my Home Videos, or backup my pictures to DVD+RW. Longhorn will surely deliver some acceptable level of DVD writing as it does with CD-ROMs, and expose APIs to do this so developers can spend less time writing DVD burning code, and more time writing quality software. However, we all know that in the case of Easy CD Creator it won't matter as they will do all this anyway.

Well, now that I have ranted this topic off my chest there is good news. I found an excellent program called CopyToDVD which behaves and acts as I expect. It looks and feels like a Windows program, installs in under a minute, and does it's job nicely. It doesn't hack up your system, screw up your DVD drive, nor does it require that you reboot to use it. And best of all it's $40.

</rant>

Posted Monday, December 06, 2004    Permalink    Comments [4]  View blog reactions

 

 Friday, December 03, 2004

Programming iTunes vs WMP in .NET

I find it creepy that it's a million times easier to write managed code against iTunes than Windows Media Player. That just seems wrong. A few weeks ago when I was playing with the iRiver H320 I wanted to sync meta data from WMP to the iRiver so that I could browse by artist and album. Well the problem is that there are all these scary interfaces (like IWMHeaderInfo, IWMHeaderInfo2 and IWMHeaderInfo3)  and to figure out how to extract meta data for DRM'ed files took me a few hours (just to find the right interface). Then it felt like screen scraping to actually get the tags (Artist, Album etc) from the files themselves.

It's great that Apple is exposing a decent COM Interop library from iTunes that in turn exposes a nice managed interface in .NET, but geez... I should not have to wait for Longhorn to do the same thing on my PC.

BTW - if you have an iRiver H320 and want to get the meta data from WMP, the version of TDT that I built can be found here.

Posted Friday, December 03, 2004    Permalink    Comments [3]  View blog reactions

 

 Thursday, December 02, 2004

Spaces posting API

Folks have been complaining that there is no posting API for Spaces. Not so fast. There is a very lightweight URL based API you can use to post. See Scott's post below.

Quote [Scott Isaacs]

Blog It! Toolbar Button

My first tip.  The BlogIt toolbar button!

Spaces has a special URL that makes it easy to post entries into your blog, http://spaces.msn.com/blogit.aspx.  This URL, when supplied with the proper arguments, can pre-populate your blog entry page. 

Before I explain the technical details, let me introduce the unofficial Blog It toolbar button.  The Blog It toolbar button is a little tool I wrote that allows you to quickly blog any web page.  If you see something you want to blog, select some text, and click the Blog It toolbar button. Please visit http://www.siteexperts.com/blogging/blogit.htm to get your own blog it toolbar button. Also, if you have any improvements, please let me know (the button is implemented using basic DHTML so feel free to look under the hoods).  Note: The toolbar button only runs in Internet Explorer and is not endorsed nor supported by Microsoft.

Obviously, you will need to create your own MSN Space (I recommend doing that first!)

Technical Details: The blogit.aspx is very simple and is how the blog it buttons below each blog entry work. There are a number of querystring arguments that are mapped directly into your blog.  You can specify one or many of these arguments. ?Title=title&Description=Description&Trackback=Trackback&SourceURL=SourceURL

Title: This preopulates the title string of your blog entry page.
Description: This preopulates the body of your blog entry page. (typically the selected text)
SourceURL: This renders above the description in body of your blog entry page (typically the URL of the page being blogged)
Trackback: This prepopulates the trackback field (and pings when posted).

These arguments can either be submitted as a form post or as a standard http get.  NOTE: If you are not logged in when blog it is called, you will first be asked to log in (otherwise how would we know where to send you :-).

Posted Friday, December 03, 2004    Permalink    Comments [3]  View blog reactions