Scott Hanselman

ReleaseComObject and IsComObject

January 4, '06 Comments [2] Posted in Programming
Sponsored By

We had a COM Object that needed to have ReleaseComObject called on it. This worked fine, and happily for a while. Then, someone created a .NET object with the exact same signature so that it might easily replace the use of the COM object. However, this new assemebly is NOT a COM Object, so it's extraordinarily bad to call ReleaseComObject on it (in that it totally doesn't work.)

So, here's a good best practice if you're doing some crazy crap like this:

if(Marshal.IsComObject(foo)) Marshal.ReleaseComObject(foo);

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Can't download Quake4 or Condemned on Xbox Live Marketplace and other bugs/features

January 3, '06 Comments [3] Posted in Z | Gaming | Bugs
Sponsored By

I've been mucho impressed that one can download game demos on the Xbox 360's Live Marketplace. The NBA Live Demo is crazy amazing, and is a game I wouldn't ordinarily try, so the demo is a great way to potentially cross-sell me. A few days ago the news broke that Quake 4 had a demo posted on the Live Marketplace. However, when I visit the marketplace it's just not there. I had no idea what's going on. It just isn't listed in the interface.

Turns out that since I have the family settings set to "T" (Teen) games (all others need a password) then the Xbox Live Marketplace won't show any "M" (Mature) rated name. Very cool that they respect the family settings, but not cool that I'm missing out on even the option to see potential demos. I should be prompted for the password when I attempt to download the demo, just as I am when I put in an "M" rated disc like "Condemned."

FIX: Change your family settings temporarily to download these demos.

On another note, there's a weird progress bar bug where the download bar jumps to 50% if you pause the download in the middle. It will still successfully download if you let it finish, but your pretty much hosed if you want to know how much is actually downloaded. It'd have been nice if they included a kbps or speedometer. I wonder if they'll patch the Dashboard one day.

UPDATE:  A kind member of the Xbox Live team read this post and sent me this very useful information. Thanks!

We've already updated the dashboard software once through Live.  You can see the version information by navigating to the System blade and selecting Console Settings -> System Info.  If you see only 1888, then your console is not yet updated.  If you see 2241, then you're fully up-to-date (at the time of this writing).

I can't comment publicly on the two issues -- download progress, skin previews -- raised in your post and user comments, but I think you could reasonably assume that like all other software there are some known bugs and less-than-perfect experiences that were too minor to delay the release.  Your Xbox 360 will only become better and more functional as we continue to improve and add to the system software.

P.S. In order to include a picture of Z occasionally, without turning this into a personal blog with random pics, I'll hide an updated picture here. Enjoy. :)

Now playing: Ashanti - Every Lil' Thing

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

2006 Resolution - Prepare

December 30, '05 Comments [10] Posted in Z | XML | Tools
Sponsored By

Now that I'm a dad, I've been thinking more and more about preparing my family for the unknown. I'm not a paranoid or an alarmist (at least, I don't think I am, but that doesn't mean they're not after me...) but I do think that there's little excuse for not being prepared; certainly not when we've seen Tsunamis, Earthquakes, and Hurricanes in just the last year.

Here's a good New Year's resolution and a great time to do it.

Get prepared.

Here's what I've done and what I'm doing. Thanks to Patrick Cauldwell (the most prepared fellow I know, a HAM Radio operator and CERT member, IMHO) for the spur into action.

Make an [encrypted] Emergency Getaway Drive

Everyone's got a few USB Thumbdrives around. My favorite is a 2GIG, but I really should get a smaller 128 that would fit on a keychain. There's a great article at the NYTimes that offers some pointers as to what you should save on your drive:

SCAN: Some important documents are on paper and you will want copies of them with you: tax returns for the last three years (Form 1040 is all you will need in an emergency), a recent pay stub, birth certificates, marriage license, the deed to your home and insurance policy pages that list your coverage. If you do not have a scanner or a printer with a flat scanner, take the pile of documents down to a copy center like Kinko's to scan. Record the image files on the U.S.B. drive. [NYTimes]

In order to be secure, you'll want to make sure everything on your drive is encrypted. I use two programs to manage my data securely, one for passwords, and one for disks.

I've tried a million "password management" tools and the only one I've stuck with is Keith Brown's Password Minder. It meets all my criteria: It's lightweight, zero install, written in .NET, source is available, and stores its data in XML. The next step is to encrypt your files.

Encrypt/Secure your Life

TruecryptNow, to encrypt important data on a disk, there's a number of options. My favorite is a fantastic Open Source system called TrueCrypt. It's also open source, and offers a number of attractive features for use with removable drivers. It can be used without installation (meaning it can be run off the USB disk directly,) its data files are indistinguishable from random data. You can encrypt an entire volume, or mount a disk file. Personally, I'm a fan of the "single opaque file I can mount" way of thinking.

TrueCrypt can create a traveler disk that includes an autorun.inf that will make mounting your USB drive automatic upon insertion. For example it created this Autorun.inf:

[autorun]
open=TrueCrypt\TrueCrypt.exe /q /a /e /m rm /v "\HanselmanPortable.tc"
shell=mount
action=Mount TrueCrypt Volume
shell\open\command=TrueCrypt\TrueCrypt.exe /e /m rm /v "\HanselmanPortable.tc"
shell\open=TrueCrypt Start
shell\mount\command=TrueCrypt\TrueCrypt.exe /q /a /e /m rm /v "\HanselmanPortable.tc"
shell\mount=TrueCrypt Mount
shell\dismount\command=TrueCrypt\TrueCrypt.exe /q /d
shell\dismount=TrueCrypt Dismount All

This autorun.inf gives you a friendly right-click series of extensions even though TrueCrypt isn't installed on the host system (see picture at right). TrueCrypt totally fits the bill for encrypting my personal data. If I lost my USB disk I wouldn't feel that my personal security had been compromised. It also includes support for Linux.

Have at least Three Days of Food and Water

The Red Cross sells a 3-day emergency preparedness kit in the form of a backpack. You can certainly put something together yourself from any home-supply store, and this is a nice form factor. We assembled two, one for each of our cars and we've put them in the trunks. Here's what they contain:

  • Backpack
  • Battery Powered Flashlight (batteries included)
  • Battery Powered Radio
  • Emergency Blanket
  • Food Bars (4,800 calories total) (~three Days of food)
  • Work Gloves (one pair)
  • Light Sticks (3 each one lasts 12 hours)
  • Moist Towelettes (6)
  • Breathing Mask
  • Plastic Sheeting (10'x10')
  • Rain Poncho
  • Personal First Aid Kit
  • Roll of Duct Tape
  • Water (2 quarts)
  • Water Container (2.5 gallon)
  • Whistle

While the plastic sheet and duct tape may seem alarmist if you assume they're for a gas attack from the commies, they would certainly help seal up broken windows in a car or home while we wait for the calvary. This pack is meant to be the "wait it out" pack. It would have made life a little more tolerable in New Orleans, I think, with food and water being less of a concern in the first 3-4 days.

Coordinate

Patrick suggests that you have two points of coordination. The first is "where will we meet up if we're separated." This might be a local mall parking lot or a field behind your house. Have a place. Second, have a person, out of state, that you will both call to check in. That person can act as a router for the other two individuals in case the cell-phone or local photo networks are having trouble.

Get a Safety Deposit Box or "3rd place"

Find a safe "3rd place" that isn't home or work, and store backups and important documents there. I'm a fan of the Safety Deposit Box, a secure lock box at our local bank branch. It's much safer than having a safe in your home that would likely be carted off by thieves. However, while your papers or backups are at your home, waiting to be taken off-site, have a fire box that is rated to resist a house fire for at least an hour and confirm that it's of sufficient quality that the CDs won't melt inside.

Formalize your [Offsite] Backup Strategy

Take your backups somewhere, perhaps to work, or preferably to your safety deposit box. Figure out a way to integrate it into your life. If you're already taking deposits to the bank monthly, take the backups with you.

Start dropping a DVD/CD in the mail to your parents once a month. Use a standard CD mailer you can get at any office supply shop. Perhaps buy 12, plus stamps, and pre-address them to your family. Then, burn your TrueCrypt volume or encrypted files to a DVD/CD and mail it away as another offsite backup.

Photograph your Stuff

This is one of those things that folks are always told to do, but never do. Now it's so easy, just do it. Take digital photos of all your important stuff, including macro (close up) photos of their serial and model numbers. Put them on the emergency drive as well along with scanned copies of your insurance policy.

Alert folks of Medical Conditions and History if needed

If you've got a medical condition, have a bracelet or necklace at least. I've even debated tattooing "Diabetic. Allergic Penicillin" to a forearm, because these are the kinds of things that make life and death difference in a pinch.

[Medicalert] sells a special USB flash drive on its Web site, www.medicalert.org, called the E-HealthKey for $85. SanDisk originally developed the product for the Army. Pop the flash drive into any computer and a screen flashes with your medical condition to alert emergency room personnel, for instance, to an allergy or your use of a pacemaker. [NYTimes]

Of course, this could be done yourself, also with an AutoRun.inf and a JPEG. The default image viewer would be launched, alerting folks to your condition.

What are some other easy preparedness tips that you have?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Watching Videos on the Xbox 360

December 29, '05 Comments [3] Posted in Gaming
Sponsored By

One of the most lamented aspects of the almost-perfect Xbox 360 media experience is the trouble folks have getting videos running on the device. However, from Videora, the same good people involved with PSPVideo9, comes a conversion application.

Videora's Xbox 360 Conversion software takes AVI, DivX, XviD, and QuickTime files and converts them to your choice of WMV, MPEG-1 or MPEG-2 format. We just grabbed a copy from Videora's website to give this a try, so there's more to follow. We're really intrigued by the $30 companion software that allows for "ITvCasting"; it appears that you can use RSS to subscribe to videos in WMV format and have them automatically downloaded to your WMCE PC for streaming on the 360. [HDBeat]

More and more I'm convinced that a PC in the closet will be feeding a device in the living room. It's just a nice bonus that this particular device plays games as well. Some of the solutions are a little Rube Goldberg-ian (like this) but the future is bright.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

"Unexpected Error 0x8ffe2740 Occurred" Error Message When You Try to Start a Web Site

December 29, '05 Comments [3] Posted in Musings
Sponsored By

Skype vs IISMental note: Skype will grab port 80 if it starts up before the IIS Web Server leading me to "Unexpected Error 0x8ffe2740 Occurred."

Fix: Turn off "Use port 80 and 443 as alternatives for incoming connections within Skype's options.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.