Le 21/02/2013 16:58, Sven Barth a écrit :
On 21.02.2013 14:54, Antonio Fortuny wrote:
I have found one way to launch a new process and it works. The solution
uses CreateProcess whose parameters are set accordingly to MS
specifications: read
http://msdn.microsoft.com/en-us/library/ms885182.aspx

In the TProcess.Execute, the parameters build for the call to
CreateProcess must be adapted for WinCE. This function works either for
Win32 or WinCE

In that case you should be able to use TProcess if you set the Options
accordingly (no poNewProcessGroup, but poNewConsole instead). You can
With these parameters, launching of the new process still fails with same error code: 87
    with TProcess.Create(nil) do try
      ApplicationName := Config.PocketProgramName;
      Parameters.Clear;
      CommandLine := EmptyStr;
      Environment.Clear;
      Options := [poNewConsole];
      InheritHandles := False;
      try
        Execute;
      except
        got the exception error 87
      end

see the WinCE implementation for TProcess in
$fpcsrc/packages/fcl-process/src/wince/process.inc
I've seen that FInheritHandles is forced to true in the first line of the Execute method whatever value is set in the property, while MS says it is not supported and shlould be false.

Just in case: No StdIn/StdOut support on WinCE (at least not without
writing an additional driver).

Regards,
Sven


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to