Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Antonio Sanguigni
2015-03-25 17:26 GMT+01:00 Graeme Geldenhuys : > On 2015-03-25 14:42, Antonio Sanguigni wrote: > I'm affair there must be something weird in your WinXP setup then. I > just tested again using WinXP and Maximus IDE (which uses the exact code > I posted earlier). Attached is a screenshot showing the

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Graeme Geldenhuys
On 2015-03-25 14:42, Antonio Sanguigni wrote: > Thanks Graeme, works well ... in Windows 7 here. Same code in Windows > XP nothing to do. :O I'm affair there must be something weird in your WinXP setup then. I just tested again using WinXP and Maximus IDE (which uses the exact code I posted earlie

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Antonio Sanguigni
2015-03-25 17:15 GMT+01:00 Pierre Free Pascal : > Are you sure that it is not specific to the executable that you run? > > Did you try if redirecting the output of this executable > to a file using simply Windows Console > executable.exe all args > outfile.txt > > you get the same results on Wi

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Pierre Free Pascal
essage d'origine- > De : fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal- > boun...@lists.freepascal.org] De la part de Antonio Sanguigni > Envoyé : mercredi 25 mars 2015 15:43 > À : FPC-Pascal users discussions > Objet : Re: [fpc-pascal] TProcess does not work in Win

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Antonio Sanguigni
2015-03-25 12:56 GMT+01:00 Graeme Geldenhuys : > I've used the following code in fpGUI's demo IDE and it works here under > FreeBSD, Linux and Win2000-Win7 (I don't have Win8 so can't test that). > > The following code executes the FPC compiler an captures the results and > triggers an event, whic

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Graeme Geldenhuys
On 2015-03-24 19:56, Antonio Sanguigni wrote: > My > problem is Windows XP I mean, the same code seems does not produce any > results. I've used the following code in fpGUI's demo IDE and it works here under FreeBSD, Linux and Win2000-Win7 (I don't have Win8 so can't test that). The following cod

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Antonio Sanguigni
2015-03-25 10:47 GMT+01:00 Pierre Free Pascal : > It could also be due to the problem we detected in fpmkunit: > If the stderr is a separate pipe and that pipe is full, > the inferior will stop until that pipe is read. > See this patch: > > http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packa

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Michael Van Canneyt
On Wed, 25 Mar 2015, Antonio Sanguigni wrote: Once more: Zero is a valid return value for read from a pipe. So it can perfectly be that read attempts 50 times returns 0, and only at read attempt 51 you get a positive result. That is why you must check isRunning, and not rely on the return va

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Antonio Sanguigni
> Once more: > Zero is a valid return value for read from a pipe. > > So it can perfectly be that read attempts 50 times returns 0, and only at > read attempt 51 you get a positive result. > > That is why you must check isRunning, and not rely on the return value of > readbytes. Thank you, this is

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Pierre Free Pascal
> -Message d'origine- > De : fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal- > boun...@lists.freepascal.org] De la part de Michael Van Canneyt > Envoyé : mercredi 25 mars 2015 09:54 > À : FPC-Pascal users discussions > Objet : Re: [fpc-pascal] TP

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Michael Van Canneyt
On Wed, 25 Mar 2015, Antonio Sanguigni wrote: 2015-03-25 8:41 GMT+01:00 Michael Van Canneyt : -- code --- procedure TBurpClient.Run; begin fOurProcess.Options := [poUsePipes] + [poNoConsole]; fOurProcess.Execute; while True do begin // make sure we have

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Antonio Sanguigni
2015-03-25 8:41 GMT+01:00 Michael Van Canneyt : >> -- code --- >> procedure TBurpClient.Run; >> begin >> fOurProcess.Options := [poUsePipes] + [poNoConsole]; >> fOurProcess.Execute; >> while True do >> begin >>// make sure we have room >>fMemStream.SetSiz

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Michael Van Canneyt
On Wed, 25 Mar 2015, Antonio Sanguigni wrote: 2015-03-25 5:01 GMT+01:00 leledumbo : 1. Define "does not produce any results." Simply I cannot get output from console app which I'm trying to run and capture. Again, this is happening just for windows xp. Same procedure (follow code) in Windo

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-25 Thread Antonio Sanguigni
2015-03-25 5:01 GMT+01:00 leledumbo : > 1. Define "does not produce any results." Simply I cannot get output from console app which I'm trying to run and capture. Again, this is happening just for windows xp. Same procedure (follow code) in Windows 7 is right. > 2. Show your code Yes, you are a

Re: [fpc-pascal] TProcess does not work in Windows XP

2015-03-24 Thread leledumbo
> Any tip ? 1. Define "does not produce any results." 2. Show your code -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/TProcess-does-not-work-in-Windows-XP-tp5721477p5721478.html Sent from the Free Pascal - General mailing list archive at Nabble.com. __

[fpc-pascal] TProcess does not work in Windows XP

2015-03-24 Thread Antonio Sanguigni
Hello, I know XP is an old OS but some customers of mine still have it ! I'm writing a little software which is calling a console program and I have the need to capture its output. My core TPRocess code is the same as fpc wiki for TProcess and it works very well in Windows 7. My problem is Window