Wednesday, May 18, 2005

iTunes and COM Programming?

I have been hooked on iTunes now for over a year. I love the software, the store is great, and it allows me to sleep soundly at night knowing that my digital music collection is legal. I was using iTunes before I got an iPod last December. For a while I have wanted a tool on the windows platform that would allow me to publish my recently played iTunes to the web. I have seen some of these tools written in AppleScript for the Mac platform, however, I haven’t seen it in the windows realm yet. Last night I decided that I needed something to work on programming wise and so I did a Google search for “Hacking iTunes for PC” and came across an article explaining how one could use some Apple SDK’s to create custom visualizations. While I wasn’t in the market for visualizations, on the same page, I found that apple has an SDK called iTunes COM for Windows. In theory, this SDK will give me the tools that I need to create my little play-list publishing tool.

All was fine and dandy; I downloading the SKD, unzipping and then opening in Visual Studio was no problem at all. That is where the joy began and ended. Once again, I am faced with the fact that I must be the world’s biggest newbie when it comes to programming. Truth be told, I know nothing about COM, and following the example in the documentation about how to instantiate an instance of the iTunes COM object proved to be dismal last night. The error said that I couldn’t create an instance of an abstract interface. That would make sense, but I don’t think that Apple would be sending me an abstract interface. The SDK consists of two files a header file and a C source file. I am pretty sure it has something to do with what I call the Visual Studio learning curve. Typing code is one thing. Making sure that all of the little switches and toggles are correctly set is another story all together.

Hopeful Resolution:
This morning I found a book at Amazon that purports to teach one how to use COM. I guess that is a starting point. I said that I was bored, and wanted to learn something new. I guess this will be my opportunity. Maybe in a few weeks I will actually be able to build that little iTunes tool!

Plea for Sage Advice:
If you have any advice about COM programming, or good resources to learn it, please drop me a line.

No comments: