Last weekend I started playing around with my “Device Blogger” project again – no I have not forgotten about it, just a little busy lately trying to get Beta 1 shipped. I also had a few problems with the project; there were a few bugs in the PD5 build of VS that was keeping me from testing out my project. I now have Beta 1 installed on my home computer, which has a fix for the bug, and I should be able to get something posted by this weekend.
I have also been spending a lot of time lately working on my IL Editor and Project samples for the next edition of our book. With the Beta 1 version of VS and the IAs from the VSIP SDK, I have now been able to convert my project package to C#. It has not gone as easily as converting the IL Editor to managed, but it has not been too painful. The first problem is the mass of code necessary to convert from C++ to C#. Project implementations are much larger than language services, so that means I need to convert more code. There are also some places where migrating C++ code to C# just does not work, an example of this is with VSITEMIDs. A VSITEMID is a token that you use to keep track of an item within a project. With C++ code, you allocate a data structure that holds information such as the path to the item, any children it may have, etc. When VS asks for the VSITEMID of that data structure, you cast the pointer into a VSITEMID (which is a typedef for a long) and pass that around. But with a language such as C#, you do not have the ability to cast a data structure into a VSITEMID. This was solved with a class that keeps track of a unique number that identifies the node. I am thinking of putting out a binary build of the project to let people play around with it and send feedback, weed out any bugs, etc. I will let you know once I get something stable enough to send out.