Architecture of VSTO Add-In

add-in-architecture

The main design considerations of Office Application-Level Add-In Architecture are following:

  • Each add-in is loaded in new application domain so as to isolate it from main app and other add-ins. Thus if the add-in hangs whole app doesn’t crashes.
  • Security and Permission level checks performed on add-ins.
  • Clean shutdown of application and loaded add-ins.

The main components which take part in functioning of Application-Level Add-Ins are following:

Architecture Components

Runtime Loader

The component is named VSTOEE.dll and is responsible for loading the correct version of VSTO runtime when a document-level customization is opened or add-in is started.

Solution Loader

It is named VSTOLoader.dll. This is responsible forloading the VSTO application. It also creates a new Application Domain for eachadd-in and performs security checks on VSTO application.

Registry Entry

This is where the Office application discovers the add-ins installed and to be loaded.

Applications in the 2007 Microsoft Office system look for the Manifest entry under the key HKEY_CURRENT_USER\Software\Microsoft\Office\application name\Addins\add-in ID(or, for Visio, HKEY_CURRENT_USER\Software\Microsoft\Visio\Addins\add-in ID).

The Manifest entry specifies the full path of the deployment manifest.

Deployment Manifest and Application Manifest

The list of Deployment manifest indicates the add-ins installed. Each deployment manifest points to the correct version of an application manifest which in turn points to assembly paths and entry points.

Add-In Loading Process

  1. The Office Client application checks the registry installed add-ins.
  2. It loads Runtime Loader which in turn loads Solution Loader.
  3. SolutionLoader loads the .NET Runtime and managed portion of VSTO Runtime.
  4. Latest versions of Deployment and Application manifests are downloaded. Once security checks are passed, latest add-in assemblies are downloaded.
  5. New application domains are created for each add-in and add-ins are loaded into that app domain.
  6. Various entry point methods of Add-in are called before finally calling ThisAddIn_Startup method which is default event handler for Startup event.

(Text quoted from http://bit.ly/cGul3q)

architecture-of-outlook-add-in

Advertisements
This entry was posted in Concepts by Pranav. Bookmark the permalink.

About Pranav

A Software Engineer by profession and a Geek at heart. I love exploring new technologies and working on algorithmic problems. As of now, I write code for bread, butter and satisfaction. I like to develop applications, and generally that involves much more than writing code. It’s not just about hurling code, but producing something meaningful that has a measurable and positive impact, helps others and solves interesting problems.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s