<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Tufan Erdinc's Weblog</title><subtitle type="html" /><id>http://blogs.msdn.com/tufane/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/tufane/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/tufane/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2006-01-31T02:32:00Z</updated><entry><title>How to run a command using IVSLaunchPad?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/tufane/archive/2006/10/03/How-to-run-a-command-using-IVSLaunchPad.aspx" /><id>http://blogs.msdn.com/tufane/archive/2006/10/03/How-to-run-a-command-using-IVSLaunchPad.aspx</id><published>2006-10-03T21:38:00Z</published><updated>2006-10-03T21:38:00Z</updated><content type="html">&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Please remember that the code below comes with a &lt;A href="http://blogs.msdn.com/tufane/archive/2006/01/31/520043.aspx"&gt;&lt;STRONG&gt;&lt;FONT color=#006bad&gt;Disclaimer&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#2b91af size=2&gt;&amp;nbsp;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;In a VS package&lt;/FONT&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; This function is the callback used to execute a command when the a menu item is clicked.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; See the Initialize method to see how the menu item is associated to this function using&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; the OleMenuCommandService service and the MenuCommand class.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; MenuItemCallback(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;object&lt;/FONT&gt;&lt;FONT size=2&gt; sender, &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;EventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;IVsLaunchPad&lt;/FONT&gt;&lt;FONT size=2&gt; lp = GetService(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;typeof&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SVsLaunchPad&lt;/FONT&gt;&lt;FONT size=2&gt;)) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;as&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;IVsLaunchPad&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;IVsOutputWindow&lt;/FONT&gt;&lt;FONT size=2&gt; ow = GetService(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;typeof&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;SVsOutputWindow&lt;/FONT&gt;&lt;FONT size=2&gt;)) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;as&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;IVsOutputWindow&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Guid&lt;/FONT&gt;&lt;FONT size=2&gt; owguid = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;Guid&lt;/FONT&gt;&lt;FONT size=2&gt;();&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;int&lt;/FONT&gt;&lt;FONT size=2&gt; exCd = ow.CreatePane(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ref&lt;/FONT&gt;&lt;FONT size=2&gt; owguid,&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"temp pane"&lt;/FONT&gt;&lt;FONT size=2&gt;, 1, 1);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;IVsOutputWindowPane&lt;/FONT&gt;&lt;FONT size=2&gt; owp;&lt;/P&gt;
&lt;P&gt;ow.GetPane(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ref&lt;/FONT&gt;&lt;FONT size=2&gt; owguid, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; owp);&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;uint&lt;/FONT&gt;&lt;FONT size=2&gt; exitcode = 0;&lt;/P&gt;
&lt;P&gt;lp.ExecCommand(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;null&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"c:\\temp\\myTempApp.exe"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"c:\\temp\\"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/P&gt;
&lt;P&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;uint&lt;/FONT&gt;&lt;FONT size=2&gt;)Microsoft.VisualStudio.Shell.Interop.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;_LAUNCHPAD_FLAGS&lt;/FONT&gt;&lt;FONT size=2&gt;.LPF_PipeStdoutToOutputWindow,&lt;/P&gt;
&lt;P&gt;owp, (&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;uint&lt;/FONT&gt;&lt;FONT size=2&gt;)Microsoft.VisualStudio.Shell.Interop.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;VSTASKCATEGORY&lt;/FONT&gt;&lt;FONT size=2&gt;.CAT_USER, &lt;/P&gt;
&lt;P&gt;0,&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;""&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;null&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;out&lt;/FONT&gt;&lt;FONT size=2&gt; exitcode, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;null&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;}&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=786505" width="1" height="1"&gt;</content><author><name>tufane</name><uri>http://blogs.msdn.com/members/tufane.aspx</uri></author></entry><entry><title>Getting Macro project properties</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/tufane/archive/2006/01/31/520047.aspx" /><id>http://blogs.msdn.com/tufane/archive/2006/01/31/520047.aspx</id><published>2006-01-31T05:41:00Z</published><updated>2006-01-31T05:41:00Z</updated><content type="html">&lt;p&gt;I was trying to get properties of a Macro project and I came up with the following. Please remember that the code below comes with a &lt;a HREF="/tufane/archive/2006/01/31/520043.aspx"&gt;Disclaimer&lt;/a&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p&gt;Hope it helps&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p&gt;Tufan&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;Sub&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt; GetMacroPrjProperties() &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;Dim&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt; projectPath &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; &lt;span style="COLOR: blue"&gt;String&lt;/span&gt; = &lt;span style="COLOR: maroon"&gt;"Macros\MyMacros"&lt;/span&gt; &lt;span style="COLOR: green"&gt;'Get the Macro Explorer window and activate it&lt;/span&gt;&lt;br/&gt;&lt;span style="COLOR: blue"&gt;Dim&lt;/span&gt; macrosWin &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; Window = DTE.Windows.Item(Constants.vsWindowKindMacroExplorer) macrosWin.Activate() &lt;span style="COLOR: green"&gt;'Get the UIHierarchy for Macro Explorer&lt;/span&gt;&lt;br/&gt;&lt;span style="COLOR: blue"&gt;Dim&lt;/span&gt; macroExpl &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; UIHierarchy = macrosWin.Object &lt;/span&gt;&lt;br/&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;Dim&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt; macroProjectHierarchy &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; UIHierarchyItem = macroExpl.GetItem(projectPath) &lt;/span&gt;&lt;br/&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: green"&gt;'Get the Properties window and activate it&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt; &lt;/span&gt;&lt;br/&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;Dim&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt; propWin &lt;span style="COLOR: blue"&gt;As&lt;/span&gt; EnvDTE.Window = DTE.Windows.Item(Constants.vsWindowKindProperties)&lt;br/&gt;propWin.Activate() &lt;span style="COLOR: green"&gt;'Select the Macro Project which will also set the SelectionContainer for Properties window&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style="FONT-SIZE: 10pt"&gt;macroProjectHierarchy.Select(vsUISelectionType.vsUISelectionTypeSelect) &lt;span style="COLOR: green"&gt;'DTE.SelectedItems.SelectionContainer.Item(1) should get you a VSMacroHierarchyLib.IProjectProps&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style="FONT-SIZE: 10pt"&gt;Debug.Print(DTE.SelectedItems.SelectionContainer.Item(1).Name)&lt;br/&gt;Debug.Print(DTE.SelectedItems.SelectionContainer.Item(1).StorageFormat)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue"&gt;End&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt"&gt; &lt;span style="COLOR: blue"&gt;Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=520047" width="1" height="1"&gt;</content><author><name>tufane</name><uri>http://blogs.msdn.com/members/tufane.aspx</uri></author></entry><entry><title>The required disclaimer</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/tufane/archive/2006/01/31/520043.aspx" /><id>http://blogs.msdn.com/tufane/archive/2006/01/31/520043.aspx</id><published>2006-01-31T05:38:00Z</published><updated>2006-01-31T05:38:00Z</updated><content type="html">&lt;font color=#000080&gt;These postings&amp;nbsp;are provided "AS IS" with no warranties, and confers no rights. The content of this site are my own personal opinions and do not represent my employer's view in anyway. In addition, my thoughts and opinions often change, and as a weblog is intended to provide a semi-permanent point in time snapshot you should not consider out of date posts to reflect my current thoughts and opinions.&lt;/font&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=520043" width="1" height="1"&gt;</content><author><name>tufane</name><uri>http://blogs.msdn.com/members/tufane.aspx</uri></author></entry><entry><title>About Me</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/tufane/archive/2006/01/31/520040.aspx" /><id>http://blogs.msdn.com/tufane/archive/2006/01/31/520040.aspx</id><published>2006-01-31T05:32:00Z</published><updated>2006-01-31T05:32:00Z</updated><content type="html">&lt;p&gt;&lt;font color=#0000ff&gt;I am a member of the Visual Studio Extensibility Team. I am mainly responsible for the quality of the Macros, Project Policy, Build Object Model and Text Editor Object Model.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff&gt;I will try to share my experience on these areas using this blog space.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=520040" width="1" height="1"&gt;</content><author><name>tufane</name><uri>http://blogs.msdn.com/members/tufane.aspx</uri></author></entry></feed>