<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 05.11.2013 14:48, schrieb Richard
Mace:<br>
</div>
<blockquote
cite="mid:CAK+KT39-O0cfitRf4s-ypETAmumCTUOThNABgZadjf71MXerpg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif">Hi All,<br>
</div>
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif">I have got the
following code from the wiki for creating and reading from an
external process. Effectively, I want to capture all of the
output from the process "handle.exe", into a StringList so
that I can read it to make sure that everything went OK,
however, when I run the following code, I am getting a
"RunError(103) on the line: WriteLn('-- Going to run: ' +
OurCommand);<br>
<br>
</div>
<div class="gmail_default"
style="font-family:arial,helvetica,sans-serif">Any ideas what
I'm doing wrong please?<br>
</div>
</div>
</blockquote>
Is your application (that one which calls handle.exe) compiled as a
GUI application or not? (check in the project settings) If it is
compiled as a GUI application then disable the option and recompile.
An additional console window should now appear when you run the
application from within Lazarus in which you'll see your output.<br>
Reason: on Windows the I/O is closed on startup if the application
is compiled as a GUI program (Delphi compatible)<br>
Alternatively you could use a Memo. Either you directly use
YourMemo.Add('...') or if you want to keep using Writeln, I have a
unit sent somewhere on the mailing list some days ago that allows
you to assign a memo or edit to a TextFile so that you could use
either Writeln(YourFile, '...') or you could override "Output" so
that you could keep using Writeln('...').<br>
<br>
Regards,<br>
Sven<br>
</body>
</html>