Sign In
Tufan Erdinc's Weblog
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
Blog Home
Email Blog Author
Share this
RSS for posts
Atom
RSS for comments
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
No tags have been created or used yet.
Archive
Archives
October 2006
(1)
January 2006
(3)
How to run a command using IVSLaunchPad?
MSDN Blogs
>
Tufan Erdinc's Weblog
>
How to run a command using IVSLaunchPad?
How to run a command using IVSLaunchPad?
tufane
3 Oct 2006 2:38 PM
Comments
0
Please remember that the code below comes with a
Disclaimer
In a VS package
///
<summary>
///
This function is the callback used to execute a command when the a menu item is clicked.
///
See the Initialize method to see how the menu item is associated to this function using
///
the OleMenuCommandService service and the MenuCommand class.
///
</summary>
private
void
MenuItemCallback(
object
sender,
EventArgs
e)
{
IVsLaunchPad
lp = GetService(
typeof
(
SVsLaunchPad
))
as
IVsLaunchPad
;
IVsOutputWindow
ow = GetService(
typeof
(
SVsOutputWindow
))
as
IVsOutputWindow
;
Guid
owguid =
new
Guid
();
int
exCd = ow.CreatePane(
ref
owguid,
"temp pane"
, 1, 1);
IVsOutputWindowPane
owp;
ow.GetPane(
ref
owguid,
out
owp);
uint
exitcode = 0;
lp.ExecCommand(
null
,
"c:\\temp\\myTempApp.exe"
,
"c:\\temp\\"
,
(
uint
)Microsoft.VisualStudio.Shell.Interop.
_LAUNCHPAD_FLAGS
.LPF_PipeStdoutToOutputWindow,
owp, (
uint
)Microsoft.VisualStudio.Shell.Interop.
VSTASKCATEGORY
.CAT_USER,
0,
""
,
null
,
out
exitcode,
null
);
}
0 Comments
Blog - Comment List MSDN TechNet
Comments
Loading...
Leave a Comment
Name
Comment
Please add 7 and 4 and type the answer here:
Post