-
It is possible to support the “new” operator in VSTA add-ins. Integration styles which do not use a full proxy, such as NoRuntime and ProxyShim, can easily support this feature. All that is required is public constructor methods in the host application. In the ShapeAppDyanmicProgrammingModelCSharp...
-
Summit now offers the he ShapeAppDynamicProgrammingModelCSharp_ProxyShim sample which is based both the VSTA 2.0 SDK sample ShapeAppDyanmicProgrammingModelCSharp and the Microsoft endorsed ShapeAppMacroRecordingCSharp-NoRuntime sample. This sample references the VSTA runtime and uses the auto-generated...
-
For VSTA integrations, there are a variety of ways in which the host can load and interact with add-ins. Three styles of interest are SDK, NoRuntime, and ProxyShim. Each style of integration has many pros and cons to consider before deciding on which type is best for a particular host. SDK style: This...
-
There are many different ways to manage add-ins. Below are some common add-in management styles which can be used alone, combined, or used side by side. 1) Basic: all interactions between the host and add-ins are executed in the Startup and Shutdown methods of the add-in. This is demonstrated in the...
-
Q : I have a problem with loading VB add-ins. The method call: ObjectModel::Collection<AddInToken^>^ addInToken = AddInStore::FindAddIn(IEntryPoint::typeid, AddInStoreExtensions::DefaultPipelinePath, FilePath, TypeName); returns an empty collection when called on a dll created using VB. The FilePath...
-
For chapter three, I will be introducing a framework from Microsoft called the Managed Extensibility Framework, or MEF ( MEF on CodePlex , MEF on MSDN ). If you are not familiar with MEF, you will certainly get more out of this post if you read the MEF overview and programming guide ( MEF Overview ,...
-
Here is the second chapter in my integration journey. If you have not looked at the first blog post , it would be a good idea to look there first, because that post will explain the application I am working with and my idea behind it. First, let’s look at a few things that have changed since my...
-
Q : Here is a question about VSTA multi threads. I have a function to create a new project file. It works fine when I just run the line of code in VSTA. But it failed when debugging. I looked into it and found no difference except for the executing thread. When I run the macro, the main thread calls...
-
You can change a proxy to make the methods within the hostType class accessible by: 1) Remove the abstract keyword from the type declaration (drawback- add-ins will now be able to write code like “Application app = new Application();” instead of being forced to use factory methods). 2) Replace...
-
Q : What can you tell me about the communication and the transfer of the arguments between the host OM and proxy? A : I believe currently there is no further documentation on this (btw, the on-line documentation is more current than the documentation included with the SDK so please refer to that; although...
-
There is a known issue with inheritance for COM apps in ProxyGen. The events are not inherited by the interface returned to the add-in and casting won’t fix this. The simple workaround is to add the missing inheritance to the proxy or to the descriptor file. We have a tool AutoProxyGen which accepts...
-
These are the steps to enable in-process debugging in ShapeAppMacroRecording sample’s VstaDesignTimeIntegration class: 1. private int currentProcessID; internal void Connect(Application hostApplication) { currentProcessID = System.Diagnostics.Process.GetCurrentProcess().Id; 2. int IExternalDebugHost...
-
Q : I have a couple of questions that I hope you can answer: 1) It seems that any time the VSTA documentation discusses running end-user-code, it refers to that user code as an “addin,” even if that code comes from a macro recording. Therefore, is it fair to say that all code that end-users...
-
Q : I have a couple of questions about version compatibility. 1) Will a compiled VSTA 2.0 add-in run in a VSTA 1.0 environment? 2) What about recompiling a VSTA 2.0 project in a 1.0 environment? Will this work? A : Due to the technical merit of VSTA’s runtime it was added to the .NET 3.5 framework...
-
Q : I'm having problem loading the addin dll's. I followed the ShapeAppMacroRecordingCSharp sample and used the following steps, 1. InstantiateServiceProvider() 2. LoadAddins() 'This function compiles the path for each dll to be loaded and invokes the LoadAddin() on each dll 3. LoadAddin...