Hi everybody. No, I have not forgotten about you. When I got back from LA I had a
lot more work piled up than I planned on, then I took a few days off to work on a
few things around the house, and then the last week I have been fighting off a cold.
But I should be able to make more posts in the future because I finally, after 1 ½
months of fighting with my telco, got DSL connected. I will not go into details, but
they messed things up so bad that I would have switched to cable a long time ago if
I would have been able to keep my home e-mail address.
So what have I been working on lately? Mostly code cleanup. Over the years a VS has
been written using different wrapper libraries that has made upgrading the automation
code to be a bit of a pain. After some changes, most of the automation model now uses
ATL, and adding new interfaces to an object is a breeze. What kinds of new interfaces? Well,
we have a new one called LifetimeInforamtion that will let you find out if an object
is still around. For example, suppose you have an Add-in that has a reference on a
Command object. Then code in a macro runs which calls Command.Delete on the command
the Add-in has a reference on. If the Add-in starts to call methods or properties
on that Command object, those methods/properties will fail and you would not know
why. Using the LifetimeInformation.HasBeenDeleted property you can determine if the
object has been deleted. Remember zombies from my 10/10 post? This property lets you
find out if something is zombied. While this new interface is not too useful for development,
it is debugging helper, allowing you to look in on an object’s lifetime.
Before I go, I want to say hello to a few people. First, for those I spoke with at
PDC -- either at the conference or at the hotel, and to those who asked me to sign
their copy of the book, I enjoyed hearing (both the good and the bad) about how you
are using VS. Keep sending the suggestions our way. Second, I want to say hello to
the folks over at the VSNetAddin Yahoo group. If you are interested in the VS Automation
Model, this group is a very valuable resource for tips, tricks, and help for when
you get stuck. I frequently read their messages; although I don’t get to respond too
often (usually because somebody replies before I get a chance to).