Subject Re: [firebird-support] gfix and gstat
Author Dimitry Sibiryakov
On 2 Mar 2004 at 15:49, Nols Smit wrote:

>When I execute the command in a Dos screen it works fine but when I execute
>it via Delphi (as shown below) then it's not creating the output file.
>
> s := 'gstat.exe -user SYSDBA -password masterkey -data ClientDB.gdb
>> stats.txt';
> StrPcopy(A,s);
> H := WinExec(A, SW_HIDE);

Don't use WinExec on win32. Use CreateProcess. Look at STARTUPINFO
structure and you'll find hStd* members which are exactly what you
need: handles for redirecting child process' console input/output.

SY, Dimitry Sibiryakov.