Launching an application with Managed VC++

L

LordHog

Hello all,

I was wondering what is the best method of launching an
application/exectable from within the Managed VC++ environment? I have
found some information which describe CreateProcess and
ShellExecute(Ex), but I was wondering if there is a perferred way of
performing this task in Managed VC++ that use Windows Forms?

I am trying to launch Notepad from within my application and passing
it a filename as an argument. Any help is appreciated. Thanks

Sorry for posting this question also in microsoft.public.vc as
searching I saw this group was probably more appropriate.

Mark
 
B

Bruno van Dooren

I was wondering what is the best method of launching an
application/exectable from within the Managed VC++ environment? I have
found some information which describe CreateProcess and
ShellExecute(Ex), but I was wondering if there is a perferred way of
performing this task in Managed VC++ that use Windows Forms?

With .NET you can use the Process class. It has an overloaded start method
that you can use for specifying the command and the command arguments.
The process class also allows you to get Process parameters, kill it etc...

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 
L

LordHog

Bruno,

Thanks for the information. One of the hardest part frustrating
aspects of developing is knowing there is a class that encapsulates the
functionality, but the hard part is finding it.

I couldn't find any good information in the newsgroups with the search
terms I used for VC++, but once I changed my search criteria to C# (c#
launch program) I found the following URI

http://www.csharp-station.com/HowTo/ProcessStart.aspx

which all we have to do it convert it to VC++ syntax then we are
golden. Thanks once again Mr. Bruno as you have saved me and hopefully
others a few hours of searching.

Side question if this thread is still active, is there a site that
shows all the namespace and classes in the .NET v2.0?

Mark
 
B

Bruno van Dooren

Hi,
I couldn't find any good information in the newsgroups with the search
terms I used for VC++, but once I changed my search criteria to C# (c#
launch program) I found the following URI

http://www.csharp-station.com/HowTo/ProcessStart.aspx

which all we have to do it convert it to VC++ syntax then we are
golden.

If you are looking for information, it is often a good idea to also search
for C#, since it is often easier to find samples and articles for C#.
a very good source of information is www.codeproject.com
There are lots of good articles there, including articles and howto's on
Managed C++ and C++/CLI.
Side question if this thread is still active, is there a site that
shows all the namespace and classes in the .NET v2.0?

in MSDN (VS2003), select Visual studio .NET->.NET
framework->reference->class library.
that shows you the different namespaces. if you select a namespace you'll
see all interfaces and classes that are contained within those interfaces.
in MSDN(S2005) this is located in
..NET development->.NET framework SDK->Class Library Reference.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 
P

Peter Oliphant

If you are looking for information, it is often a good idea to also search
Which falls right in line with my theory that MS is trying to globally
replace C++ with C#....hehe

[==P==]
 
W

Willy Denoyette [MVP]

C# cannot and will not replace C++, even if MS would ever want to (which is
not the case anyway). And the samples the OP is talking about are C# vs.
C++/CLI. The first being released > 5 years by now, the latter is a released
a couple of months agor, see the difference?

Willy.


| >>If you are looking for information, it is often a good idea to also
search
| >>for C#, since it is often easier to find samples and articles for C#.
|
| Which falls right in line with my theory that MS is trying to globally
| replace C++ with C#....hehe
|
| [==P==]
|
|
| | > Hi,
| >
| >> I couldn't find any good information in the newsgroups with the search
| >> terms I used for VC++, but once I changed my search criteria to C# (c#
| >> launch program) I found the following URI
| >>
| >> http://www.csharp-station.com/HowTo/ProcessStart.aspx
| >>
| >> which all we have to do it convert it to VC++ syntax then we are
| >> golden.
| >
| > If you are looking for information, it is often a good idea to also
search
| > for C#, since it is often easier to find samples and articles for C#.
| > a very good source of information is www.codeproject.com
| > There are lots of good articles there, including articles and howto's on
| > Managed C++ and C++/CLI.
| >
| >> Side question if this thread is still active, is there a site that
| >> shows all the namespace and classes in the .NET v2.0?
| >
| > in MSDN (VS2003), select Visual studio .NET->.NET
| > framework->reference->class library.
| > that shows you the different namespaces. if you select a namespace
you'll
| > see all interfaces and classes that are contained within those
interfaces.
| > in MSDN(S2005) this is located in
| > .NET development->.NET framework SDK->Class Library Reference.
| >
| > --
| >
| > Kind regards,
| > Bruno.
| > (e-mail address removed)
| > Remove only "_nos_pam"
| >
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top