This code extracts your iTunes library into a cursor, where it can be interrogated. It can also read in shared libraries (though some properties aren't available) - the iTunes COM SDK can be downloaded from Apple.
local oiTunes as iTunesLib.iTunesApp