-
Q : When working with a COM host, such as the ShapeAppMFC sample included in the SDK, ProxyGen creates descriptor and proxy files which do not expose events due to the inheritance structure. Three types are generated for a class: the classType, IClassType, and _IClassTypeEvents. The classType implements...
-
Q : When I try to use ProxyGen to generate a descriptor file for ShapeAppCSharp.exe, it reports an unrecoverable error. No error code is given, but it reports that the exception has been thrown by a target of an invocation. I get the same error when I apply ProxyGen to a couple of my own projects - even...
-
Q : I can't use proxygen with a very simple C++/CLI program. After execute proxygen I always get the error: ProxyGen.exe Error: 10030 : The following file is not a valid managed assembly: (path to the executable) What is the problem? A : Prox ygen cannot run with /clr c++/cli mixed mode .exe assemblies;...
-
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...
-
Q : In VSTA, the developer has to use ProxyGen to create new objects and the end user can then use the "proxy objects." Why can't the end user just use the "origin objects?" A : Using the original objects may be possible. If the end user's customization does not need to be...
-
ProxyGen v2 only deals with public methods. If you wish to expose a method to VSTA it must be public, not internal. For example, the Application.ShowDrawingMenu method of the ShapeAppBasicCSharp sample does not appear in the descriptor or proxy files. From the SDK section " Architecture of Generated...
-
Q : Are there any issues with native 64-bit host applications as far as VSTA is concerned? Will there be any problems, say, with debugging add-ins when they are loaded by the native x64 app? A : VSTA 2.0 supports 64 bit platforms with no known issues, including debugging. The SDK documentation covers...
-
With VSTA v 2 it is possible to use generic parameters of intrinsic types with minimal effort. The example below demonstrates this with a method added to the ShapeApp.Application class which accepts a List<string>. Steps: 1) Create the proxy file ignoring the ProxyGen warnings: ProxyGen.exe Warning...
-
We have new downloads up including templates and a new tool AutoProxyGen which automates ProxyGen and can be used in build events. AutoProxyGen : This tool automates the process of using ProxyGen and can be used as a build event. AutoProxyGen includes workarounds for ProxyGen bugs including automatically...
-
The sample in this post shows how to support nested types and implicitly declared events in entry point classes (note that the nested type is in the entry point class, but is not an entry point). For types nested in an entry point class, the workaround in Part I is sufficient, no additional changes to...
-
ProxyGen does not support nested types; however, with a little manual editing of the descriptor and proxy files nested types can be supported in the Proxy. There are three kinds of nested types that will be covered in this blog series (non-entry point, entry point , and i mplicitly declared events )...
-
The proxy and host type map provider code files generated by ProxyGen in VSTA v 2 are not indented. Here's an easy fix. 3 ways to fix indentation: 1) Through the menu: Edit -> Advanced -> Format Document 2) Using short cuts: Ctrl + K then Ctrl + D 3) In a macro: DTE.ExecuteCommand("Edit.FormatDocument...
-
Microsoft recommends using Visual Studio 2008 for integrating VSTA v 2. However, if you choose to use Visual Studio 2005 the following will need to be addressed. 1) The framework VSTA v 2 uses the 3.5 framework. It is very important that references, like System.AddIn, point to the 3.5 versions and not...
-
One of the most common questions we see when someone begins an integration is why can't System.Windows.Forms and objects derived from that class be exposed to add-ins. Our typical answer is that System.Winows.Forms is not serializable and only serializable objects can pass through (or be exposed through...
-
Based on the SDK and our testing of the CTP release version of ProxyGen v 2, here are our finding. For additional informatoin on ProxyGen v 2 CTP release please see our ProxyGen v 2 CTP Release Supplement . If there are other version 1 issues you would like addressed, please let me know (submit questions...