Your ADO is broken

I found today that Microsoft has violated the holy rules of COM and broken their msado15.dll. The violation occurs after the installation of Windows 7 Service Pack 1 (version 6.1.7601.17514).

What’s happened is Microsoft has changed a few function signatures due to a 64bit problem, and changed the class IDs while they are at it. Thus, backwards compatibility has been broken, making COM absolutely useless. Executables compiling on Windows7 SP1 will now only run on Windows7 SP1. We’ll have to assume that any other alternatives were carefully thought through and resulted in the world ending, because on face value this looks like a terrible fix.

In this epic saga spanning five months, we’ve still not reached a warm fuzzy conclusion. The best solution seems to be reverting this change made in the service pack and created a new set of 64bit functions. This would probably break all ADO code compiled in the last five months, but at least the last 15 years would work again.

In the meantime, here’s our official workarounds:

  1. Use late binding. Because, you know, type safety and efficiency aren’t all that.
  2. Uninstall Service Pack 1. I think they are laughing at us.
  3. Temporary workaround for C++ developers. Yay!

So we’ll go for the only attractive option, #3. Details are here: http://support.microsoft.com/kb/2517589, but it basically boils down to installing and registering a file called “Msado60_Backcompat”, which is a truly ironic name if you remember what the whole point of COM is.

Except I’d deviate a little from the recommended steps, because forcing your team to install and register these files is a bit inefficient, and playing around in your common files location is plain nasty. There’s also no indication on how to swap them in and out for 32 and 64 bit builds. So here’s my lazy “it-just-works” method for Visual Studio 2010:

  1. In your 3rd party area of your source control, create a branch for Microsoft and Ado. Then branch off for the 64bit and 32bit versions. ie


    3rd Party
    =>Microsoft
    ====>Ado
    ======>x86
    ======>x64

  2. Download the 64 and 32 bit .tlb files, place them in their respective folders and rename them both to “msado60_Backcompat.tlb”.
  3. Check these files in.
  4. Open up properties for your project, and under C/C++ add the path to your tlb files.
    Shows the proprties screen in Visual Studio 2010. The path to the new ADO .tlb file has been added to the additional Directories field,
    Add the path to the .tlb file to Additional Directories

    Don’t forget Release settings!
  5. Do the same for your 64 bit version.
  6. Change the #import "msado15.dll" part in your code to #import "msado60_Backcompat.tlb"
  7. Recompile, build, wait for the next hotfix to come along and destroy your working programs.

Meanwhile, your programs will just work using COM black magic that nobody really understands.

I can only assume everyone who understands COM at Microsoft who could have prevented this fairly fundamental error from occurring has gone mad, senile or died. I know they are keen to get us all writing .NET code (I hear that’s what the cool kids are doing these days), but if no-one understands the technology that .NET is built on, we’re in trouble. I imagine in the near future, mythical COM developers will be held up in great esteem like a lost Mayan civilisation, revered as demi-gods with alien intelligence and magical powers. Or starving as unemployable geeks crying into their RSI-riddled hands.

Ben there, Dan that! Game Review

This weekend saw me playing a ridiculously funny point n’ click adventure game from indie company Size Five games.

The game – Ben there, Dan that! – stars its authors, Ben and Dan, playing themselves in a parody of the genre that never takes itself too seriously. There is so much wild nodding toward the classics it almost hurts. With joy.

Ben There, Dan That screenshot
Ben and Dan explore an alternate universe where everyone has superpowers.

In the game you control Ben, who, after dezombifying dead Dan in a jungle, finds the first major task of the day is to get the television back working in time for Magnum P.I.. And then, as these types of games are want to go, a long series of improbable events occur, involving you picking up every item that isn’t nailed down and attempting to combine them in bizarre ways. What is especially nice about Ben there, Dan that! is the love and attention that has gone into each response. You will click and try things that are completely stupid, and most games of this type offer a “You cannot do that” message. Here, it is different. Most “Look”, “Talk”, “Use” or “Dan” interactions have their own unique responses and are actually funny! There’s bags of dialogue in this game, all of it written well in proper, British humour. I laughed audibly at least twice, with the rest of the dialogue keeping me internally happy throughout the adventure.

If you’ve ever played any of the old LucasArts games – the original versions of Monkey Island, Sam and Max, Maniac Mansion, Day of the Tentacle – then you will feel at home here. Not only because the game was created using the Adventure Game Studio, but because Dan and Ben have played and loved these old games, and it shows. They seem to be around my age too, and it was fun to pick up references from the Teenage Mutant Ninja Turtles, Bill & Ted, Back to the Future, Indiana Jones and Star Wars.

A game like this will ultimately live and die by its puzzles and its dialogues. The puzzles are fun and I only really got stuck once – I didn’t quite have to resort to a walkthrough but I had a bit of an aimless wander until I stumbled across the solution. The game isn’t frustrating and nor is it that challenging, but that is okay because the storyline unfolds in such a way that you are incredibly curious to see what happens next.

The adventure itself only lasts 2 or 3 hours, and, as it is with this type of game, offers little replay value. But that is more a criticism of the genre rather than this game. Those couple of hours are well spent. There is also a sequel.

In conclusion then: A game that is genuinely hilarious and fun. Highly recommended.

And now for the amazing news: You can get this game and its sequel on steam for just 74p! You can’t have much fun for under a pound these days, but here is the exception to the rule.

A few more reviews of the same game:

WordPress Plugins used on WebBiscuit

One of the main advantages of moving to WordPress is that there are a zillion and one exciting plugins out there.

Here are the three I am using on this WebBiscuit site:

  • SyntaxHighligher Evolved – Great for showing snippets of code, highlighted and formatted so nicely. No complaints with it so far, but I’ve not thrown any scary code at it yet.
  • Google Analyticator – Hook the site up to Google Analysis. Pretty graphs!
  • AddToAny: Share/Bookmark/Email Buttons – for the little share buttons on the bottom of each post. I don’t really like how it adds the icons to feeds though.

If you can think of it, there will be a plugin for it. I’ll never have to write code again.

Unfortunate captcha codes

A CAPTCHA code is a randomly generated series of letters to prove how human we are when using internet services. The idea behind them is that computers cannot easily read the letters and so before using the service we enter a number with our superior human eyes and intellect to prove we are not machines. Remember this if you’re having nightmares about Terminators, Dalaks or HAL.

In all of their innocence, computers can attempt to offend us without even knowing it. I was using a site today and a CAPTCHA code was generated for me. Here it is:
Generated CAPTCHA code reading 'fuknwp'

All our biscuits are in a new tin

The domain names are now linked over to the new site. This may have broken old links to the site, so if you find your way here with a “page not found” error, let me know and I’ll redirect the old page to the new. I’ve already redirected a couple of pages.

Here’s how to do it:
1) Open your .htaccess file in the root of your site (it may be hidden if you’re using an ftp client)
2) A file not found error is also known as a 301 error. Add a line to this file, in the following format:
Redirect 301
For example, I my old software page lived at http://www.webbiscuit.co.uk/software.aspx, so I added the following line:

Redirect 301 /Software.aspx http://www.webbiscuit.co.uk/software/

So if you do find any lost biscuits out there on the web, let me know and I’ll redirect them to our nice warm lovely home.

On the move

I’ve pulled over a few articles, the popular Palette Parser and edited some of the fluff pages that have been hanging round. We’re almost there, in our new home.

Initial impressions:
I like it quite a lot. Adding/shifting/hiding content is super easy. I love the code highlighter. I’ve been using Syntax Highlighter Evolved for the lovely highlighting over on the article pages.
I’ve also found a really nice theme that reminds me of biscuits. It’s Blend 1.5 by James R Whitehead of Spectacu.la. I need to tweak it slightly – you will be delighted to know I have already bought a packet of photogenic biscuits – but so far it’s all working well.

Next stop, transferring domains. www.webbiscuit.co.uk and www.webbiscuit.com, here you come.

A New Biscuit Tin

With a tear in his eye and a pocket full of biscuits, WebBiscuit has decided to finally leave home and stride out for pastures new.   Moving onto WordPress, Biscuitechnology has unfortunately been placed on the shelf to go stale.

While designing my own blogging/CMS system was fun, moving onto an established and popular technology means I can now concentrate on writing software.  Server and website maintenance is a fun but time-chomping process.  With the valuable time saved I’ll now be able to write more code, blog and eat more biscuits.  Everyone wins.

Over the next few days, I shall be migrating/retiring content from the oringinal site.

Things I need to do

  1. Find a suitable colour theme
  2. Find a good wordpress editor
  3. Become quite wordy
  4. Port over old content
  5. Redirect domains

Oh!  And here is a first for the site: you can now leave comments.  Any advice for the first points?