Welcome to Office Zealot Sign in | Join | Help

Rebuilding Perfmon counters on XP

Perfmon is an extremely handy utility to track application performance. When tracing the performance of .NET applications(VSTO/IBF) on the Office platform, I find the counter counter "# of Stubs" provided by the performance object ".NET CLR Interop" very useful. This counter displays the count of RCWs created by the CLR.

I wanted to use this counter on my XP box, but when I opened Perfmon, I could only see a list of random numbers in the Performance Object drop down box! The fix for this has been documented in KB300956. However, the steps in the KB did not help me. It was this discussion on the Channel9 forum that helped me restore the Perfmon counters. I stumbled on this link after a lot of searching, so thought of posting it here for future reference. Also, having submitted a feedback to Microsoft Support, I hope the KB article will be updated someday! :)

Posted by desai | 0 Comments

Outlook 2007 and CDO

Recently I worked on an application that used CDO to open the Global Address Book. The application worked when it ran with Outlook 2003, but failed with the following exception when I used Outlook 2007.

System.Runtime.InteropServices.COMException was caught
Message="Retrieving the COM class factory for component with CLSID {3FA7DEB3-6438-101B-ACC1-00AA00423326} failed due to the following error: 80040154."

It turns out that CDO library is not shipped as a part of Office 2007 setup. If you are using CDO library to access Outlook objects and have plans to move your application to Office 2007, please make a note of this. The fix for this exception is to download CDO library from here and install it!

Posted by desai | 0 Comments

Sun in Microsoft Land!!

After a long time, the sun shone brightly in the Seattle skies and made its presence felt overhead. Another Sun is also making its presence felt here; if you take a ride in one of the King county Metro buses that criss-cross the Redmond campus and look at the Ad Banners overhead.

Sun Microsystems has come up with creative ads promoting OpenOffice. The ad shows people dressed in T-shirts that have witty one-liners printed on them.

Here are a few ones that caught my attention.

  • Stop giving a bully your lunch money.
  • By the people, for the people.
  • Compatible with expensive, closed and memory loving software.
  • Pick a vendor. Any Vendor.
  • Tired of being taken for a ride.
  • US-opoly.
  • We do windows, too.
  • Pre-historic reptilians welcome.
  • The ads also have been put up very strategically. This is for the first time that I have seen software being advertised in a public transit system!! I wonder if Microsoft will ever do this. It is good to see this new trend in advertising and promoting a software product.

    I for sure, feel tempted to check out the latest offering from OpenOffice after seeing these well-thought of ads!!

    Posted by desai | 0 Comments

    Tip for COM - .NET Interop developers

    I was trying my hands at creating a .NET 2.0 component that can be consumed by a COM application.
    One of the errors I got in the process of registering the .NET assembly was
    RegAsm : warning RA0000 : No types were registered.

    This was baffling!! I had done everything right and spent quite some time figuring out what could have gone wrong... until I had a look at the AssemblyInfo.cs. The ComVisible property for the assembly was set to false!! To access types in a .NET assembly from COM, this property should be set to true. Once I did it, I was able to successfully register the .NET assembly and consume it in my COM component. Be sure to remember this when developing COM - .NET interop applications!!

    Posted by desai | 18 Comments

    Editing Office Document properties without Office

    I wanted to access the properties of an Office document without using the Office Interops. This KB article describes exactly how to do that using VB.Net. On searching more, I came across this article on Code Project demonstrating how to do it in C#.
    Posted by desai | 0 Comments
    More Posts Next page »