<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://summsoft.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Melody's VSTA Blog : VSTA v 1</title><link>http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/VSTA+v+1/default.aspx</link><description>Tags: VSTA v 1</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>Post Build Events in VSTA</title><link>http://summsoft.com/blogs/melodys_vsta_blog/archive/2008/02/19/post-build-events-and-vsta.aspx</link><pubDate>Tue, 19 Feb 2008 18:56:00 GMT</pubDate><guid isPermaLink="false">ff090588-e3d7-4538-8ee9-e75ea04444bb:806</guid><dc:creator>Melody</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://summsoft.com/blogs/melodys_vsta_blog/rsscomments.aspx?PostID=806</wfw:commentRss><comments>http://summsoft.com/blogs/melodys_vsta_blog/archive/2008/02/19/post-build-events-and-vsta.aspx#comments</comments><description>&lt;p&gt;Post build events are very important in VSTA (versions 1 and 2).&amp;nbsp; They are used to install files in the GAC, organize DLL's for add-in discovery, and in VSTA v 2, to rebuild the pipeline.&amp;nbsp; &lt;br&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.summsoft.com/blogs/melodys_vsta_blog/attachment/806.ashx"&gt;Here are the files used &lt;/a&gt;in post build events by the ShapeApp samples, the commands which run them, and some information about them.&lt;br&gt;&lt;/p&gt;&lt;p&gt;File:&amp;nbsp; InstallInGAC.bat&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right:0px;"&gt;
&lt;p&gt;Description:&amp;nbsp; Used by a proxy to install the proxy assembly in the GAC.&lt;/p&gt;
&lt;p&gt;Command: call "$(ProjectDir)InstallInGac.bat" "$(TargetPath)"&lt;/p&gt;Notes:&amp;nbsp; This file changed from VSTA v 1 to VSTA v 2.&amp;nbsp; The VSTA v&amp;nbsp;1 InstallInGAC.bat file&amp;nbsp;looks for&amp;nbsp;the GACutil tool in &lt;font size="2"&gt;%programfiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil where Visual Studio 2005 places it.&amp;nbsp; The VSTA v 2 InstallInGAC.bat file looks for the GACutil&amp;nbsp;in &lt;font size="2"&gt;%WindowsSDKPath%bin\ (WindowsSDKPath is read from the registry) where Visual Studio 2008 places it.&amp;nbsp; We offer a version, &lt;a href="http://www.summsoft.com/blogs/melodys_vsta_blog/attachment/806.ashx"&gt;InstallInGAC_0508.bat&lt;/a&gt;, which looks in both locations and will work with Visual Studio 2005 and Visual Studio 2008.&amp;nbsp; &lt;br&gt;&lt;/font&gt;&lt;/font&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;Command for our version:&amp;nbsp; Call "$(ProjectDir)InstallInGac_0508.bat" "$(TargetPath)"&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&amp;nbsp;&lt;br&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p dir="ltr"&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;File:&amp;nbsp; InstallForVB.bat&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Description:&amp;nbsp; Used by a proxy to copy the proxy assembly into the pipeline and rebuild it.&lt;br&gt;&lt;/p&gt;&lt;p&gt;Commands: call "$(ProjectDir)InstallForVB.bat" "$(TargetPath)"&lt;/p&gt;Notes:&amp;nbsp; This file is new for VSTA v 2 and is generally used together with the InstallInGAC file.&lt;br&gt; &lt;/blockquote&gt;&lt;br&gt;&lt;p dir="ltr"&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;File:&amp;nbsp; InstallAddIn.js&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Description:&amp;nbsp; Used by add-ins to move the assembly to %My Documents%\&amp;lt;HostID&amp;gt;\AppAddIns in a folder with the same name as the assembly.&lt;br&gt;
  &lt;/p&gt;
  &lt;p&gt;Commands: cscript "$(ProjectDir)InstallAddIn.js" "$(TargetPath)" "ShapeAppCSharp\AppAddIns\$(TargetName)"&lt;/p&gt;
Notes:&amp;nbsp; In the command above, replace ShapeAppCSharp with the HostID, or the value specified in the registry for the entry UserFilesFolderName.&amp;nbsp; This file is the same for VSTA v 1 and v 2.&amp;nbsp; This post build event moves the add-in assembly to a programatically searchable location, %My Documents%\&amp;lt;HostID&amp;gt;\AppAddIns.&amp;nbsp; &lt;br&gt;&lt;br&gt;In VSTA v 1, this location is used for the appAddInPath variable which is set in the Connect method and in the LoadAppAddIns method to load add-ins in the extension class.&lt;br&gt;&lt;br&gt;In VSTA v 2, this location is used for the AppLevelAddInPath variable which is used in the LoadAppLevelAddIns method to load add-ins in the VstaRunTimeIntegration class.&lt;br&gt;&lt;br&gt;The best way to get add-ins to use this post build event, is to specify it in the template.&amp;nbsp; Unfortunately, there is no way to add the InstallAddIn.js file and post build event through ProjectGen.&amp;nbsp; Instead, the template created by ProjectGen must be manually updated then (re)registered with VSTA.&amp;nbsp; For more information on how to do this, check out my blogs on&lt;a href="http://www.summsoft.com/blogs/melodys_vsta_blog/archive/2007/07/02/moving-and-organizing-dll-s-to-make-vsta-integration-easier.aspx"&gt; how to add this post build event&lt;/a&gt;, and &lt;a href="http://www.summsoft.com/blogs/melodys_vsta_blog/archive/2007/09/10/registering-templates-with-the-host-application.aspx"&gt;how to update an existing template&lt;/a&gt;.&lt;br&gt;
 &lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://summsoft.com/aggbug.aspx?PostID=806" width="1" height="1"&gt;</description><enclosure url="http://summsoft.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.00.08.06/PostBuildEvents.zip" length="3195" type="application/zip" /><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/vsta/default.aspx">vsta</category><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/add-in/default.aspx">add-in</category><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/templates/default.aspx">templates</category><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/VSTA+v+1/default.aspx">VSTA v 1</category><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/GAC/default.aspx">GAC</category><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/VSTA+v+2/default.aspx">VSTA v 2</category><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/Post+Build+Event/default.aspx">Post Build Event</category><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/pipeline/default.aspx">pipeline</category></item><item><title>Using VSTA to extend a host with Office</title><link>http://summsoft.com/blogs/melodys_vsta_blog/archive/2008/01/21/using-vsta-to-extend-a-host-with-office.aspx</link><pubDate>Mon, 21 Jan 2008 21:06:00 GMT</pubDate><guid isPermaLink="false">ff090588-e3d7-4538-8ee9-e75ea04444bb:852</guid><dc:creator>Melody</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://summsoft.com/blogs/melodys_vsta_blog/rsscomments.aspx?PostID=852</wfw:commentRss><comments>http://summsoft.com/blogs/melodys_vsta_blog/archive/2008/01/21/using-vsta-to-extend-a-host-with-office.aspx#comments</comments><description>VSTA can be used extend a host to use a new technology, like an Office application, without requiring any changes in the host.&amp;nbsp; One benefit of this is that the host is now compatible with any technology that can be accessed by an add-in.&lt;BR&gt;&lt;BR&gt;One example of this would be to use an Excel spreadsheet to enter data.&amp;nbsp; We have a simple example of this with ShapeAppCSharp (&lt;A href="http://www.summsoft.com/files/folders/vsta_samples/entry856.aspx"&gt;VSTA v 1 and&amp;nbsp;v 2 samples available here&lt;/A&gt;).&amp;nbsp; The VSTA add-in opens an excel spreadsheet and reads in data for shapes to be added to a drawing.&amp;nbsp; This allows Excel to be used as a data entry form to automate the host without making any changes to the host.&amp;nbsp; &lt;BR&gt;&lt;BR&gt;To use Office applications in VSTA, add references to the appropriate assemblies.&amp;nbsp; For VSTA v 1, to add a reference to the Excel application, choose the "Microsoft Excel # Object Library" from the COM tab of the Add References window, it should have a path like %ProgramFiles%\Microsoft Office\OFFICE#\EXCEL.EXE.&amp;nbsp; This will add the entries "Excel" and "Microsoft.Office.Core" (which can be removed) under references in the Solution Explorer.&amp;nbsp; When viewed in the Object Browser, the "Excel" entry is identified as Microsoft.Office.Interop.Excel.dll.&amp;nbsp; For VSTA v 2, the Microsoft.Office.Interop.Excel reference is listed on the .Net tab of the Add References window.&amp;nbsp; This change is due to the addition of the office libraries into Visual Studio 2008.&amp;nbsp; &lt;BR&gt;&lt;BR&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://summsoft.com/aggbug.aspx?PostID=852" width="1" height="1"&gt;</description><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/VSTA+v+1/default.aspx">VSTA v 1</category><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/VSTA+v+2/default.aspx">VSTA v 2</category><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/Excel/default.aspx">Excel</category><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/Office/default.aspx">Office</category></item><item><title>IPH Sample- Kill the VSTA Process With Host</title><link>http://summsoft.com/blogs/melodys_vsta_blog/archive/2008/01/10/check-out-the-iph-sample-kill-the-vsta-process-with-host.aspx</link><pubDate>Fri, 11 Jan 2008 02:53:00 GMT</pubDate><guid isPermaLink="false">ff090588-e3d7-4538-8ee9-e75ea04444bb:804</guid><dc:creator>Melody</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://summsoft.com/blogs/melodys_vsta_blog/rsscomments.aspx?PostID=804</wfw:commentRss><comments>http://summsoft.com/blogs/melodys_vsta_blog/archive/2008/01/10/check-out-the-iph-sample-kill-the-vsta-process-with-host.aspx#comments</comments><description>&lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font size="3"&gt;We have received many support requests in regards to the following scenario: The host application is "hard killed" and the vsta.exe process continues to run.&amp;nbsp; A "hard kill" can occur if the debugger is stopped, or the host application is terminated through the Task Manager.&amp;nbsp; In hard kill scenarios, the host never has the opportunity to shut down VSTA.&lt;br&gt;&lt;br&gt;The answer to this problem is an In-Host Provider (IPH).&amp;nbsp; VSTA makes In-Host Providers incredibly easy to use and the SDK (v1 and v2) provide excellent documentation and a walkthrough.&amp;nbsp; We now offer an IPH sample which addresses the above scenario.&lt;br&gt;&lt;br&gt;The &lt;a href="http://www.summsoft.com/files/folders/vsta_samples/entry851.aspx"&gt;IPH Sample- Kill VSTA With Host&lt;/a&gt; provides IPHs, registration files, and templates for VSTA v 1 and v 2.&amp;nbsp; The IPHs and registration files are set up for ShapeAppCSharp (VSTA v 1 and v2) and are easily adaptable for any host with either VSTA v 1 or v 2.&amp;nbsp; The templates may be used with ShapeAppAdvancedCSharp (VSTA v 1) and ShapeAppMacroRecording (VSTA v 2).&amp;nbsp; The sample also includes a walkthrough with instructions on how to incorporate the IPH with any host.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font size="3"&gt;&lt;a href="http://www.summsoft.com/files/folders/vsta_samples/entry851.aspx"&gt;Click here to go to the IPH Sample- Kill VSTA With Host download page.&lt;/a&gt;&lt;br&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Times New Roman"&gt;&lt;font size="3"&gt;Here is an excerpt from the walkthrough:&lt;br&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;b&gt;&lt;font size="3"&gt;A quick look at IPHs:&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman" size="3"&gt;For information on IPHs please refer to the VSTA SDK, they provide detailed information and a comprehensive walkthrough which shows how to make and use an IPH.&lt;span&gt;&amp;nbsp; &lt;/span&gt;Here is a summary explanation of IPHs.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.25in;text-indent:-0.15in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;IPHs are projects written in Visual Studio that implement the IInProcessHostInterface.&lt;span&gt;&amp;nbsp; &lt;/span&gt;For VSTA v 1, this interface is defined in Microsoft.VisualStudio.Tools.Applications.DesignTime and includes the method SetAdapter which takes in a HostAdapter.&lt;span&gt;&amp;nbsp; &lt;/span&gt;For VSTA v 2, this interface is defined in Microsoft.VisualStudio.Tools.Applications.DesignTime.v9.0 and includes the method SetAdapter which takes in an IVstaHostAdapter.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.25in;text-indent:-0.15in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;IPHs do not have a language requirement.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.25in;text-indent:-0.15in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;IPHs are associated with a project template.&lt;span&gt;&amp;nbsp; &lt;/span&gt;This association can be set by using ProjectGen, or editing the csproj or vbproj file (in a text editor like Notepad) of an existing template.&lt;span&gt;&amp;nbsp; &lt;/span&gt;All projects created based on the project template will use the IPH.&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.25in;text-indent:-0.15in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;Only one IPH can be associated with a template; however, one IPH may be used by multiple templates and hosts.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.25in;text-indent:-0.15in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;IPHs must be registered with the host and in the GAC.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.25in;text-indent:-0.15in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;The IPH runs in the same process as the VSTA DTE and has the same lifetime as the project that the IPH is associated with.&lt;span&gt;&amp;nbsp; &lt;/span&gt;Closing the project or the VSTA DTE kills the IPH, opening a different project in the VSTA DTE (only one project can be at a time in the VSTA DTE) kills the IPH.&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.25in;text-indent:-0.15in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;span style="font-family:Symbol;"&gt;&lt;span&gt;&lt;font size="3"&gt;·&lt;/font&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;An IPH can be set to run with Visual Studio as well as VSTA; however, that is not addressed in this sample.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.1in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman" size="3"&gt;To use an IPH the following steps must be completed (for more information, see the SDK)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.5in;text-indent:-0.25in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;span&gt;&lt;span&gt;&lt;font size="3"&gt;1)&lt;/font&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;Create an IPH project- a project with a class which implements the IInProcessHost interface.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.5in;text-indent:-0.25in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;span&gt;&lt;span&gt;&lt;font size="3"&gt;2)&lt;/font&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;Add IPH’s project’s dll to the GAC (IPH must to be strongly signed).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.5in;text-indent:-0.25in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;span&gt;&lt;span&gt;&lt;font size="3"&gt;3)&lt;/font&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;Add the IPH to the host’s registry hive.&lt;span&gt;&amp;nbsp; &lt;/span&gt;A GUID is required for this step and can be produced using the GuidGen tool.&lt;span&gt;&amp;nbsp; Add the entries for the IPH to the config hive, then delete the context hive and run setup to re-create it.&lt;br&gt; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.5in;text-indent:-0.25in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;span&gt;&lt;span&gt;&lt;font size="3"&gt;4)&lt;/font&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;Add the IPH to a project template.&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt 0.5in;text-indent:-0.25in;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;span&gt;&lt;span&gt;&lt;font size="3"&gt;5)&lt;/font&gt;&lt;span style="font-family:'Times New Roman';font-style:normal;font-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-size-adjust:none;font-stretch:normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt;Run setup to extract the template.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;b&gt;&lt;o:p&gt;&lt;font size="3"&gt;&amp;nbsp;&lt;/font&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;b&gt;&lt;font size="3"&gt;What this sample does:&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin:0in 0in 10pt;"&gt;

&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;font size="3"&gt;This IPH checks the Running Object Table (ROT) and the local
processes for an instance of the host and kills the VSTA.exe process if one is
not found.&lt;span&gt;&amp;nbsp; &lt;/span&gt;The ROT is checked for any
VSTA remote process (“…vstaremoteprocess…”).&lt;span&gt;&amp;nbsp;
&lt;/span&gt;This process is created when the host creates a VSTA v 1 DTE (for an
example see the EnsureIDE method of ShapeApp samples) during debugging or when run
as a stand alone exe.&lt;span&gt;&amp;nbsp; &lt;/span&gt;The local
processes are checked for an instance of the host, like “ShapeAppCSharp.exe” or
“ShapeAppCSharp.vshost.exe”, which would be created by running the application
as a standalone exe or debugging it with Visual Studio.&lt;span&gt;&amp;nbsp; &lt;/span&gt;This IPH can be used both during development
and for distribution.&lt;span&gt;&amp;nbsp; &lt;/span&gt;If an instance of
the host or VSTA remote process is not found (i.e. any instance of either) then
the IPH prompts the user to save and closes the VSTA DTE.&lt;span&gt;&amp;nbsp; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;


&lt;p class="MsoNormal"&gt;&lt;font face="Times New Roman"&gt;&lt;font face="Times New Roman"&gt;&lt;br&gt;&amp;nbsp;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://summsoft.com/aggbug.aspx?PostID=804" width="1" height="1"&gt;</description><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/VSTA+v+1/default.aspx">VSTA v 1</category><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/VSTA+v+2/default.aspx">VSTA v 2</category><category domain="http://summsoft.com/blogs/melodys_vsta_blog/archive/tags/In-Process+Host/default.aspx">In-Process Host</category></item></channel></rss>