All Tags » C# (RSS)

Browse Blog Posts by Tags

Showing related tags and posts for the Blogs application. See all tags in the site
  • IPC Port Error

    Q : What do you know about this error? It happens sometimes after clicking “Start Debuging” triangle button on VSTA IDE window. A : Add InitializeLifetimeService() method to the class that implements IExternalDebugHost as shown below. == ShapeAppMacroRecordingCSharp sample should add InitializeLifetimeService...
    Posted to VSTA Q & A Blog by BillL on 06-03-2009
    Filed under: Filed under: , , ,
  • dllexport in C#

    Because C# does not provide a dllexport equivalent, you'll need to add a CPP shim into the mix that can get an instance of the managed class from the CLR. Here's the quick walkthrough: 1. Add a cpp library to the VSTA integration solution 2. Reference the VSTA Integration assembly from the cpp...
    Posted to VSTA Q & A Blog by BillL on 06-03-2009
    Filed under: Filed under: , , , ,
  • Intercept DTE Commands in C#

    Here's some sample C# code showing how to intercept DTE commands. _dispCommandEvents_BeforeExecuteEventHandler has a parameter that allows you to cancel execution of the command if that is what you want to do. private EnvDTE. CommandEvents mCommandNewProject; // set up events for IDE commands cmd...
    Posted to VSTA Q & A Blog by BillL on 05-28-2009
    Filed under: Filed under: ,
  • Migrating a VB template to C#

    Q : How do I migrate my VB template to C#? Do you have sort of a template for making a template? I'm using VSTA version 1. A : The best thing to do would be to take a look at the ShapeAppCSharp sample templates included with the SDK. You can base your templates off these. The vstemplate and xxproj...
    Posted to VSTA Q & A Blog by BillL on 05-28-2009
    Filed under: Filed under: , , ,
  • C++/COM/C# Sample

    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...
    Posted to VSTA Q & A Blog by BillL on 05-26-2009
    Filed under: Filed under: , , , ,
  • C# Startup and Shutdown hookup

    VB and C# hook into events very differently. A VB template can use “ Handles Me .Startup” and “ Handles Me .Shutdown” in the AppAddIn.vb file to hookup the events. C# requires this code to be explicitly executed, so you’ll need to add some hookup code. This is done in the...
    Posted to VSTA Q & A Blog by BillL on 05-22-2009
    Filed under: Filed under: , ,
  • Translating a template from VB to C#.

    Q : I'm having trouble actually creating a new add-in project using the template. I have the several files that make up the template. I took the .vstemplate file from the VB version and edited it to match the file names of the C# edition. I stuck all the files into a zip file. I ran "vsta /hostid...
    Posted to VSTA Q & A Blog by BillL on 05-22-2009
    Filed under: Filed under: , , , ,
  • Preserving 'hidden' elements in a COM interop assembly

    If you are shipping interop assemblies or PIAs of COM type libraries, you may have some elements in your type library marked as hidden. But, C# and VB Intellisense show these hidden elements anyway. This problem can be fixed with some low level work. This information may help you with the task. To create...
Page 1 of 1 (8 items)
Copyright Summit Software Company, 2008. All rights reserved.