Dev Luv: Guidelines for Developing Visio Managed COM Add-ins

If you are developing a Visio (or any Office) managed-code COM add-in, these resources will come in handy:

1. This PIA article is the best place to start to learn more about installing and using Office 2003 PIAs.

2. If Microsoft provides an official PIA, always use PIAs. Yes, you can roll your own interop assembly (aren’t tools great?) but use interop assemlies only if Microsoft does not provide a PIA. In Visio’s case, we started providing a PIA with the Visio 2002 (in the Office XP PIA download). We started providing a PIA installed as part of the Visio product setup with the Visio 2003 release.

3. This KB article provides information about designing Office XP add-ins and Office 2003 add-ins by using the .NET Framework.

4. Without exception, use an unmanaged shim for security to isolate one managed add-in from others through AppDomains and other details. This article describes why and how.

By the way, if you are also building a smart-tag managed COM add-in, there’s some additional information to track (note that these smart tag links are not specifically for Visio development – I’m providing them just in case you also do smart tag development in managed code). If you are building a managed COM add-in that will be used in Office 2003 only or Office XP only, it is highly recommend to use VSTO loader (also called the otkloadr.dll) that is shipped with Office 2003. For detailed info on using VSTO loader, see the Office 2003 Smart Tag SDK. It is not recommended to build a smart tag managed COM add-in that will be used in Office 2003 and downlevel versions of Office (such as Office XP also). This article talks about why. To learn more about migration of managed smart tag COM add-ins from one version to another, check out this article.

Mai-lan

This posting is provided "AS IS" with no warranties, and confers no rights