Browse Blog Posts by Tags
-
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...
-
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...
-
Are you integrating VSTA with a COM object model? We’ve created a simplified approach to integration for host applications with COM OM that you may wish to consider. This approach makes it unnecessary for you to generate a proxy of your COM object model. It is demonstrated with this sample: “ShapeAppBasicMFC...
-
Q : I have a question regarding the project references to the proxies. As I understand it, I create the proxy dll’s for my COM type libraries. Then I make my VSTA projects reference those proxy assemblies. I envision I would do that as part of my project templates so that my users could use them...
-
Gary did some work using Delphi COM a few years back -- he integrated VBA into a Delphi application. Here's an example of the tiny managed proxy, called ObjectModelAgent. -Host app calls SetOM with IDispatch* or IUnknown* parameter. -Addin calls GetOM -Proxy layer code for GetOM marshals the COM...
-
Using an independent COM component (VSTOEE90.dll), and some code auto-generated by the Office tools, the VBA programmer can easily call managed code in a VSTA add-in assembly. The complete code necessary is shown in this screenshot of the VBA IDE. Excel 2007 VBA calls a managed class in VSTA Add-in:...
-
Please try this C++/COM/C# sample for VSTA 2.0 on how to: --load/unload different macro addins/projects --'show macros' whether the assembly is loaded in memory or not (ReflectionOnly). Sample demonstrates: 1. 'Load VCF' loading and unloading macro addins and their projects from a single...
-
Q : This is what I’d like to do and may you can help me with this. 1. Load a bare bones project that doesn’t have anything other than a simple blank class that I’d like to edit. 2. Not use AppAddIn’s at all(meaning no need to launch the myvbapp). 3. Load my COM dlls into the project...
-
Q : A COM .dll not discovering c++ component. How should I fix this? A : I'm not sure what folders the COM and C++ components typically reside in, but the COM dll is probably expecting the c++ component to be somewhere that it is not. Let's assume that the COM component will successfully load...
-
To avoid losing an event hook-up from a COM source it is necessary to hold a local reference to the source of the event to avoid unwanted garbage collection. This is a concern for VSTA hosts hooking into DTE events as well as VSTA add-ins which use a direct reference to a COM host instead of a proxy...
-
A new VB6 VSTA v 2 sample is available for download. Below is from the READ ME.doc included in the sample: There are many ways to integrate VSTA v 2.0 with a VB6 application. This sample demonstrates an advanced integration option (with seamless non-destructive debugging but no macro management) which...