Question

Ituneslib api stopped working with itunes 9.0. (exception in first interaction)
Is there an alternative API ? has anyone found a solution for it ?

It works perfectly in several computers with itunes 8.x, and just doesn't open (doesn't create COM object with itunes 9.x)

Any workarounds ?

Was it helpful?

Solution

Perhaps the iTunes 9.0 installation damaged the COM registration entries? Are you using x64 or x32? What version of Windows?

iTunes COM works fine with iTunes 9.0.2.25

Running:

Console.WriteLine("Version = {0}", (new iTunesLib.iTunesAppClass()).Version);

returns

Version = 9.0.2.25

for me. One way to check quickly is to try and instantiate thye iTunes COM object yourself without the interop libs. Say like this:

var itunes = Activator.CreateInstance(Type.GetTypeFromProgID("iTunes.Application", true));
Console.WriteLine(itunes!=null?"All ok":"Did not work");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top