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

  • Thread starter Thread starter juvi
  • Start date Start date
J

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.
 
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...
 
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?
 
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.
 
Back
Top