PC Review


Reply
Thread Tools Rate Thread

Best way to start a process from .net cf app?

 
 
juvi
Guest
Posts: n/a
 
      30th Apr 2009
hello,

usually when I am starting an application/process through my .net cf
application I use the following:

system.diagnostics.process.start(...);

But the applications seems to take longer to start - is this correct?
I saw also the following way (are there advantages in using this one?):

ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "...";
startInfo.Arguments = "...";
Process.Start(startInfo);

thank you in advance.
 
Reply With Quote
 
 
 
 
Jesse Houwing
Guest
Posts: n/a
 
      30th Apr 2009
Hello juvi,

> hello,
>
> usually when I am starting an application/process through my .net cf
> application I use the following:
>
> system.diagnostics.process.start(...);
>
> But the applications seems to take longer to start - is this correct?
> I saw also the following way (are there advantages in using this
> one?):
>
> ProcessStartInfo startInfo = new ProcessStartInfo();
> startInfo.FileName = "...";
> startInfo.Arguments = "...";
> Process.Start(startInfo);
> thank you in advance.


It's exactly the same as far as I know. s.d.Process.Start() creates it's
own startinfo and passes that to the process.Start method internally.

When do applications seem longer to start is my question though... longer
than when you start them from the start menu?

It shouldn't really make any difference...

--
Jesse Houwing
jesse.houwing at sogeti.nl


 
Reply With Quote
 
Ignacio Machin ( .NET/ C# MVP )
Guest
Posts: n/a
 
      1st May 2009
On Apr 30, 2:49*pm, juvi <j...@discussions.microsoft.com> wrote:
> hello,
>
> usually when I am starting an application/process through my .net cf
> application I use the following:
>
> system.diagnostics.process.start(...);
>
> But the applications seems to take longer to start - is this correct?
> I saw also the following way (are there advantages in using this one?):
>
> ProcessStartInfo startInfo = new ProcessStartInfo();
> startInfo.FileName = "...";
> startInfo.Arguments = "...";
> Process.Start(startInfo);
>
> thank you in advance.


Hi,

No, it's the way to go.
Question, longer than when?
 
Reply With Quote
 
juvi
Guest
Posts: n/a
 
      1st May 2009
I think it takes longer than when starting a process from a native application.
 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      4th May 2009
Not much longer. I suppose that the first time in a managed application
that you P/Invoke CreateProcess() it might, conceivably take slightly longer
to get the address of the CreateProcess call, adjust the parameters to fit
the calling convention that you specify, etc., but that's going to be
measureed in microseconds or, maybe, milliseconds, not seconds. If you're
seeing that sort of difference, you or the overall system are responsible,
not the .NET CF. Maybe in one case, the application is loaded, but
smart-minimized? While in the other case, the application has to actually
be loaded and started (and maybe that application has a long process to
initialize on the first start?

Paul T.

"juvi" <(E-Mail Removed)> wrote in message
news:60848691-4130-4C17-A3C5-(E-Mail Removed)...
>I think it takes longer than when starting a process from a native
>application.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what permissions does a windows service need to execute another process? System.Diagnostics.Process process = System.Diagnostics.Process.Start(info); just local administrator? any specific permitions? Daniel Microsoft Windows 2000 Networking 1 13th Apr 2006 08:58 AM
what permissions does a windows service need to execute another process? System.Diagnostics.Process process = System.Diagnostics.Process.Start(info); just local administrator? any specific permitions? Daniel Microsoft Dot NET Framework 1 13th Apr 2006 04:56 AM
what permissions does a windows service need to execute another process? System.Diagnostics.Process process = System.Diagnostics.Process.Start(info); just local administrator? any specific permitions? Daniel Microsoft Windows 2000 0 12th Apr 2006 11:47 PM
what permissions does a windows service need to execute another process? System.Diagnostics.Process process = System.Diagnostics.Process.Start(info); just local administrator? any specific permitions? Daniel Microsoft C# .NET 0 12th Apr 2006 11:47 PM
what permissions does a windows service need to execute another process? System.Diagnostics.Process process = System.Diagnostics.Process.Start(info); just local administrator? any specific permitions? Daniel Microsoft Dot NET 0 12th Apr 2006 11:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:59 AM.