shahine.com/omar/

homepage | Send mail to the author(s) contact

yet another Microsoft blogger

# Wednesday, September 01, 2004

System.Drawing.Imaging performance fix in .NET 1.1 SP1

A few months ago I encountered a significant performance problem with System.Drawing.Imaging.

I found that by using the new Method performance was 93x faster (on average) for loading jpegs.

You can download the update here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=a8f5654f-088e-40b2-bbdb-a83353618b38&DisplayLang=en

Specifically, this update adds a new method to System.Drawing.Imaging:

System.Drawing.Image.FromStream(Stream stream, bool useICM, bool validateImageData)

This is essentially a new signature for an existing method:

System.Drawing.Image.FromStream(Stream stream, bool useICM)

As you can see, validateImageData is a new parameter. Setting it to true is the default behavior that we have today (essentially the same as calling FromStream(Stream stream, bool useICM)).

So I made a change to my application. Before my code looked like this:

using (Image photo = Image.FromFile(this.fileInfo.FullName, true))
{
    //do stuff
}

So I changed it to:

using (FileStream fs = new FileStream(this.fileInfo.FullName, FileMode.Open, FileAccess.ReadWrite))
{
    using (Image photo = Image.FromStream(fs, true, false))
    {
        // do stuff
    }
}

Posted Wednesday, September 01, 2004    Permalink    Comments [1]  View blog reactions

 

# Thursday, August 26, 2004

Portable Media Center Review

If you've been wondering about PMC check out this excellent review by Corey Gouker.

I've been dogfooding (testing) a Creative Zen device since the very early days (months ago) and love it. I just leave it plugged into my MCE over night and it sync'es tv shows and audio.

Since all my music is ripped as lossless WMA, I can have WMP transcode from losless to 160 KPbs allowing me to listen to lossless music on my Media Center and take all my music with me on my PMC. I happen to love the UI and the Album Art for Music. I find it so natural to browse my music collection by looking at album covers.

Posted Friday, August 27, 2004    Permalink    Comments [0]  View blog reactions

 

# Sunday, August 08, 2004

El Alamein

Most people who visit Egypt don't get a chance to see the memorials commemorating the Battle of El Alamein. I've been twice since it's only about 2 hours from the town I used to spend my summers (near Alexandria). This picture below is one of the most powerful images I have ever photographed. I just found it today and thought I would share.

The stark contrast between the German, British and Italian memorials is notable. It's fascinating how each country chose to commemorate its dead. You can see some of the pics I took in 2000 in my gallery.

Posted Monday, August 09, 2004    Permalink    Comments [0]  View blog reactions

 

Vonage

So I bit the bullet and got service from Vonage. Last week my modem arrived and I proceeded to lay out my network topology. I am really pleased with the service. Most notably I am saving money (about $230 a year). I chose the 14.99 plan which includes 500 minutes a month (local and long distance). I still get free incoming calls and calls to other Vonage users are free. I use my phone very little (but don't want to rely on cell for everything since my wife and I want a shared number), so this is a big savings over my previous service. I get things for free that I used to pay for like Called ID and Call Waiting, but I also get free voicemail that is sent as an e-mail attachment (with voice mail notification on phones that support it), Simulring (you can have two phones ring at the same time, like your office or mobile), call forwarding after x seconds, and lots of other features. Call quality is excellent. In short I am very pleased. I chose to continue to use my existing phone number and that isn't set up yet, but they give you a free virtual number to use (it maps to your phone). Lastly, international calls are super cheap. Easily > 60% what ATT was offering me without having to pay for the privilege of cheaper rates.

<shameless plug>
if you decide to get Vonage and you want a free month of service, leave a comment or send me an email (click the email icon or contact button) and I will send you a referral. You and I will both get a free month of service.
</shameless plug>

Setup

There were some complications because I guess I am picky. Here is the deal.

Before Vonage:

Broadband = Comcast Cable Modem

Router = Microsoft MN-700 Router/Wireless AP

Now with Vonage, I have a new Motorola Voice Terminal which is also a router. However, it has less functionality than my Microsoft router, primarily it lacks support for UPnP and is very no frills. Why do I care about UPnP? Well UPnP allows my Windows PCees to negotiate ports dynamically on the router. That means things like Messenger File Sharing, Remote Assistance and Even XBOX Live work w/o having to manually configure anything. I like this.

However, the Motorola Voice Terminal implements a very crucial feature when it comes to VoIP. Essentially, it will prioritize voice packets over data packets, otherwise known as Quality of Service (QoS). This is crucial as you do not want to hear static or loose your connection if you are downloading stuff from the web. Taking advantage of this requires that you place your Motorola Voice Terminal upstream from all your internet traffic. So, here is how I did it.

Configure Motorola Voice Terminal
  1. Connect PC to the Motorola Voice Terminal
  2. Wait for DHCP to assign you an IP address. It should be 192.168.102.X.
  3. Launch IE and enter 192.168.102.1. This is the address of the Motorola Voice Terminal.
  4. Go to the Advanced Page
  5. Disable NAT/DHCP server (this was an error, it should be enabled)
  6. Enable DMZ and enter 192.168.102.2. You will later assign this address to your router, in this case my Microsoft MN-700.
  7. Click Save Changes
  8. Click Reboot.
Configure Network

Now that your Motorola Voice Terminal is connected you can proceed with your network set up.

  1. Plug Cable Modem or DSL modem into Cable or Phone Line
  2. Plug Ethernet cable between Cable Modem or DSL Modem into the WAN port of the Motorola Voice Terminal
  3. Plug your router (MN-700) into the Motorola Voice Terminal by connecting an Ethernet cable between the PC port on the Motorola Voice Terminal and the router Modem port (or WAN port).
  4. Plug your PC, or in my case my home network into the LAN ports of the router
Configure Router

Now we will configure the router (MN-700). These steps will vary depending on your router manufacturer, these steps are specific to my router.

  1. Wait for your PC to retreive an IP address from the router
  2. Type in the gateway address of your router (192.168.2.1)
  3. Go to the WAN configuration page.
  4. Copy down the gateway and DNS server information (if it is not located on this page to back to the main router home page).
  5. Change the way the router obtains the WAN IP address from Dynamic to Static
  6. Enter 192.168.102.2 in the IP address that we configured from step 6 when configuring the Motorola Voice Terminal.
  7. Fill in the remainder of the information (DNS, Gateway etc) that you copied down from step 4.

This last part is important because it basically instructs the Motorola Voice Terminal to pass through all web traffic it receives to your Router. This is essentially the same configuration you would have if you plugged the router directly in to the Cable or DSL modem. However, the Motorola Voice Terminal will still be able to prioritize the voice data higher than all the internet traffic on your network. Additionally by disabling the DHCP and NAT server on the Motorola Voice Terminal you are allowing your router to do it's job and continue to act as the DHCP/NAT/Firewall on your network allowing UPnP to function. (you don't need to disable DHCP/NAT/Firewall on your Motorola Voice Terminal. The DMZ passthrough will take care of sending all IP data to your Router).

A final note. In my apartment I have a closet where all my CAT-5, Cable and Phone lines terminate. This allows me to connect the Vonage modem to my phone switch and all my phone in my apartment are now on the Vonage network. Cool.

Here is a diagram of my network.

Update: There is an error above. DHCP/NAT should be enabled on the Vonage Router. I mistakenly said it should be disabled.

Posted Sunday, August 08, 2004    Permalink    Comments [18]  View blog reactions

 

# Wednesday, July 28, 2004

Send to OneNote from Outlook PowerToy Released

At long last, my PowerToy is live! Send to OneNote from Outlook lets you send Mail, Post items and Sticky Notes to OneNote (note, this was previously called Outlook2OneNote).

While you are there I also recommend Send to OneNote from Internet Explorer.

Both of these use the OneNoteImporter that Donovan created.

A lot of folks at Microsoft were instrumental in dogfooding the product as well as answering my never ending questions about managed programmability in Office 2003. Special thanks to Siew Moi Khor and Misha Shneerson for showing me the light.

Note, if you install this PowerToy and you do not see the toolbar icons in your Outlook standard toolbar this is because the Outlook 2003 .NET Programmability Support is not enabled. To fix this you must:

  1. Uninstall the PowerToy if you have already installed it
  2. From the Start menu, select Control Panel, and click Add/Remove programs.
  3. Select Microsoft Office Professional Edition 2003, and then select Change.
  4. Select Add or Remove Features and click Next.
  5. Click Chose advanced customization of applications.
  6. Expand Microsoft Office Outlook, and confirm .NET Programmability Support is set to Run from My Computer.

update: seems Peter has found some bugs.

  1. Navigate to Selected Item is broken. It is supposed to take you to the OneNote page you created from the Outlook item
  2. Sometime the message header isn't coming across. Not sure about this one yet.

Posted Wednesday, July 28, 2004    Permalink    Comments [9]  View blog reactions

 

# Tuesday, July 20, 2004

Hotmail, now with less ads

If you have a paying relationship with MSN (you are an MSN subscriber or Hotmail Extra Storage user) you no longer see any banner ads when using Hotmail.

Just one of many enhancements coming to a hotmail near you ;-).

This also marks my first release as part of the Hotmail Team. Shipping a version of Hotmail is nothing like shipping client bits, and I enjoyed contributing to this release. More details soon.

PS - some one else noticed some other changes.

Posted Wednesday, July 21, 2004    Permalink    Comments [7]  View blog reactions

 

Outlook Security Dialog and Palm

Now let me tell you, I loath this dialog as much as the next guy, however, I just discovered something appalling today.

Palm (the makers of the PDA etc) ship this application called Pocket Mirror (I think its third party?) that synchronizes Outlook with Palm handhelds like my wife’s Treo 600. I was shocked today when I watched as the dialog appeared and disappeared on my wife’s laptop. Yes, they are programmatically dismissing this dialog themselves. Rather than sign their code, or use Extended MAPI or bother to consult MSDN, they just decided, we’ll decide for the user. Nice.

 

Posted Wednesday, July 21, 2004    Permalink    Comments [6]  View blog reactions

 

# Sunday, July 18, 2004

Tiny USB Flash Drive

I just got a SanDisk Cruzer Micro 256MB at Amazon.com last week, and I can't believe how small it is. 256 MB, USB 2.0 and it comes with a crypto program for encryping files. I wanted the 512 MB version, but the 256 MB was only $40. It's now on my minimalist keychain.

Posted Monday, July 19, 2004    Permalink    Comments [1]  View blog reactions

 

Nikon RAW image thumbnails in XP Explorer shell

I've been mildly annoyed by the fact that I can't see thumbnails of my Nikon NEF (RAW) image files in the XP Shell. Luckily someone has a product that takes care of this.

http://www.softwhile.com/product_nv.html

Update: check out this post for another software package:

Posted Monday, July 19, 2004    Permalink    Comments [2]  View blog reactions

 

# Friday, July 09, 2004

Portable Media Center

Amazon now has Portable Media Centers available for purchase.

Creative Labs 20 GB Zen Portable Media Center

Samsung Yepp YH-999 20 GB Portable Media Center

I've got the Creative PMC device and it's just sweet. I'll blog more about it when I can, but these devices are super cool. I still have an iPod that my wife uses, but I've switched over to this puppy.

Posted Friday, July 09, 2004    Permalink    Comments [2]  View blog reactions

 

# Thursday, July 08, 2004

Explorer Status Bar fixed in XP SP2

Holy cow, how did I miss this gem?

[Tony Schreiner]

New Pet Peeves Fixed

The disappearing status bar bug should be gone for good. We also fixed most of the scenarios where the URL you were typing in the address bar would get stomped or disrupted if a navigation happened while you were typing.

I could go NUTTY just turning that status bar back on only to have it disappear for no apparent reason. This alone is worth the upgrade ;-).

Posted Friday, July 09, 2004    Permalink    Comments [8]  View blog reactions

 

Hotmail Tips

Reeves has some great Hotmail tips. One of them is very important. I just started forwarding all my e-mail to hotmail from another mail account. Many of these messages were being junked. This is because hotmail sees that the message is not address to “me”, being my hotmail address. The solution is to add your forwarding address as a mailing list.

If you want to understand what options you have when it comes to junk mail, safe lists etc, check out the post.

Oh, and in other news, starting yesterday Hotmail now Scans and Cleans infected messages. We are the only company (I know of) that does this for free.

Posted Friday, July 09, 2004    Permalink    Comments [5]  View blog reactions

 

# Wednesday, July 07, 2004

MCE vs Tivo

Paul has a great write up on MCE and Tivo. I ditched my Tivo 2 years ago for my custom built MCE box. In that time period I've been dogfooding (running alpha and beta builds)various versions of Media Center about 75% of that time. 1.0 had a lot of little gotchas and issues, especially if you built one yourself. My machine runs 24/7 and has rarely missed recordings and only crashed once in 2 years.

Today the product is a lot more stable and the team is doing some amazing work right now (can't talk about it yet). Needless to day, MCE gets better and better every day (literally).

If you want something that doesn't just record TV (for me the Music, Photo, Video, Napster and Newsgator 10 foot experiences are just superb). And mine passed WAF (Wife Acceptance Factor) with flying colors.

Posted Thursday, July 08, 2004    Permalink    Comments [4]  View blog reactions

 

# Monday, June 28, 2004

Tiger

I spent some time this evening watching Jimmy play with Tiger. Today there is nothing really in the Mac OS that gets me excited (other than Entourage 2004 and Virtual PC!). Watching some of the subtle effects, the cool widgets, the awesome animation, search, made me envy a mac for the first time in a very long time.

Yes, I love Longhorn, and yes I went to the PDC and drank the kool-aid. However, as I sit here and look at my Tablet PC I realize that I'm not going to see any real change for 2 or more years. I won't see applications that take advantage of that stuff for longer. Well that makes me sad. Granted, I can't handwrite on a Mac, can't use OneNote, can't run all the media in my house and so on. But that still doesn't change the fact that I smile when I look at Tiger... it's so pretty, and inviting.

You see, it occurred to me while watching Jimmy. Apple elicits amazing emotional response. I couldn't help but feel happy just watching all the new features. I don't have this attachment to my PC. It's really a tool that I use to get x or y done. It's a really important tool, and one I rely on (and run my life on). But I don't really think searching for a file on Windows XP is fun (actually I never find anything so, it's definitely not fun).

Anyway, Tiger looks very cool (and very stable for an Apple OS that isn't shipping for 8 or so months). And I can't help but feel that Longhorn is to far off for me to pay any attention to. I may have to go to another PDC to find the love.

But please, grow up Apple. Everyone copies everyone. I can think of a few feature in Entourage that ended up in Mail.app, and the Address Book after we did them. It's really sad that they must market their product(s) in this manner, and I think it reflects the way that upper management at Apple behaves and views Microsoft... it's no secret and this becomes pretty obvious once you start dealing with them. Apple's will retain their 3% market share because they are cool, and people like them. That should be good enough.

Posted Tuesday, June 29, 2004    Permalink    Comments [6]  View blog reactions

 

# Wednesday, June 23, 2004

80 hour weeks...

For the past 5 weeks (other than a trip to Alaska planned a year ago) I have been living work, breathing work, and dreaming about work (not by design). And today the news is out.

Hotmail is aggresively moving to make storage a non issue any more (in light of gmail and yahoo's recent offerings). It's been incredibly fun, challenging and scary all at the same time. I'm really glad to be part of such a kick ass team... hotmail is going to be cool again!

Exective Summary of changes

  • Free users get 250 MB
  • Premium users ($19.99 a yr) get 2 GB of mail

In other news, Dick Craddock is joining my team as our Development Manager. This is so awesome. Dick worked on Internet Mail and News for the Mac, then Outlook Express, then became the Product Unit Manager for the Mac Internet Product Unit (which was merged into the Mac Business Unit) where we shipped OE 5 and IE 5 and rocked the house. He then left to work on MS TV and stuff, and is back in the e-mail game after taking a nice long sabbatical. Last week we had a little offsite in Redmond and it was funny how many former Mac folks were in the room...

Posted Thursday, June 24, 2004    Permalink    Comments [7]  View blog reactions