Fixing iTunes

I’ve been having trouble getting Mugshot to pick up what I was playing in iTunes. The Music Radar just wouldn’t pick up anything from iTunes. I’m running iTunes 7.0.2. I’d usually play music via Windows Media Player, but Mugshot doesn’t currently support that; therefore, iTunes it is.

Looking at the code in client\windows\HippoUI\iTunesMonitor.cpp, I saw this:

// iTunesLib
#import <libid:9E93C96F-CF0D-43F6-8BA8-B807A3370712> named_guids raw_dispinterfaces

So, the code tries to register for use of the iTunes COM interfaces. Unfortunately, searching through the Windows registry, I couldn’t find any sign of that GUID. I also took a look at all of the type libraries that the system did know about, using the free Type Library Viewer from iTripoli. I couldn’t find any sign of the iTunes type library, although I could see an iTunes admin library and an iTunes Outlook addin.

You can usually register DLLs with regsvr32. Unfortunately, the iTunesApp class is in the main iTunes type library, which is represented by iTunes.exe. You can’t register an exe with regsvr32. I could have created the registry entries by hand, but that seemed like a fragile way of fixing things.

To resolve the problem, I re-ran the iTunes installer and chose the “repair” option. Once I’d done that, the correct registry entries were created and the iTunes type library was usable. Mugshot now advertises what I’m listening to, if I have iTunes running šŸ™‚

Technorati tags: , , , ,

10 thoughts on “Fixing iTunes”

  1. they really, really, REALLY need to get a mac version of mugshot up and running soon … my iTunes library is on my mac šŸ™

  2. that annoys me…presumably mugshot is some trendy software (I’ll go read your earlier posts when I’ve finished this and probably have to eat my words) for some kind of social networking, or something…
    Why does one have to be such a geek to make things work. I mean, looking at libraries. Wha?!!

  3. You know what else bugs me…that post on debugging the error messages! It bugs me because it might just become useful – my flickr uploader has stopped working and issues a really beautiful error message that is not disimilar to the one in your post.
    It’s nearly 10pm here. I’ll deal with that tomorrow.

  4. I don’t know, because Kelly sees them, but she’s on Windows (and would prefer to be on Mac, but, well…). Time for a bug report? I’ll leave you to it.

    Incidentally, bit of an issue, but if I listen to a stream, then you only see the name of the stream and not the name of the track. May be an iTunes issue, or may be Mugshot not querying properly when the source is a stream (I can see some code around podcasts in the source, but nothing about streams).

  5. Aha – I found that you don’t need to reinstall iTunes.

    In fact, you can just type itunes.exe /regserver at the command prompt. This causes the iTunes binary to re-register itself.

Leave a Reply