Use IiTunes::CheckVersion() with the major and minor version of the type library to determine if the version of iTunes currently installed supports the interface you need.
IiTunes iTunes = new iTunesAppClass(); IITPlaylistCollection iPlaylists = iTunes.LibrarySource.Playlists; foreach (IITPlaylist iPlaylist in iPlaylists) { Console.WriteLine(iPlaylist.Name); }
Set iTunesApp = WScript.CreateObject("iTunes.Application")
Dim aPlaylist
For Each aPlaylist In iTunesApp.LibrarySource.Playlists
WScript.Echo(aPlaylist.Name)
Next
Specifically, the following properties were added: