it works for both windows 32 and 64 bit environments which is cool. Also on the sourceforge project page is jacobgen, which automatically creates .java files for the COM objects. So everything that the iTunes com offers, jacobgen will create java files with the corresponding methods to interact with it. Very Cool!!! I had some trouble getting it to work for a long time. There is an example batch file included in jacobgen that I had to edit.
Here is the batch file code I used to run jacobgen...
REM run this from the root directory of the Jacobgen project
REM it will spit out the interface classes for a dll you pass in as a parameter
REM sample command line while sitting in the JACOBGEN project directory
REM The following command built a sample in the jacob directory I have
REM installed near my jacobgen project directory.
REM $ docs/run_jacobgen.bat -destdir:"..\jacob\samples" -listfile:"jacobgenlog.txt" -package:com.jacobgen.microsoft.msword "C:\Program Files\Microsoft Office\OFFICE11\MSWORD.OLB"
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_16
REM put the dll in the path where we can find it
rem %JRE% -Xint com.jacob.jacobgen.Jacobgen %1 %2 %3 %4 %5
java -Xint com.jacob.jacobgen.Jacobgen %1 %2 %3 %4 %5
REM run.bat -destdir:"c:\jacob\itunes" -listfile:"jacobgenlog.txt" -package:com.apple.itunes "C:\Program Files (x86)\itunes\itunes.exe"
To use the batch file. Open a command prompt and change directories until you get to the jacobgen directory. Place the batch file in the root jacobgen directory. Copy and paste the last line minus the letters REM into the command line and press enter. Jacobgen will place the created java files in the destdir. The main difference between my batch file and the example one is I use the java command.
Of course in the end, I didn't use the generated code. There is no documentation created with it obviously, and all kinds of errors were thrown in Netbeans. Instead, I downloaded this package http://dot-totally.co.uk/software/itunescon/ and in conjunction with JACOB, I can now control iTunes. I already have my program identifying the audio file in the iTunes library that correspond to the duplicate files found when searching for files with iteration counts appended to the end, so in conjunction with deleting the actual files, I should now be able to remove them from the iTunes library.
My next idea is since I share music throughout my home network, deleting files from the folder from one computer's library will not be reflected in other iTunes libraries until a user tries to play a song that is removed and therefore orphaned. In essence I'm going to try to add an option that will locate orphaned files, even if they are not apparent to the user.