[fpc-pascal]Compiler error on TProcess.Create
Michael Van Canneyt
michael.vancanneyt at wisa.be
Tue May 20 11:27:40 CEST 2003
On Mon, 19 May 2003, Ronald L Fox wrote:
> Aloha,
>
> Trying to use the TProcess object of fpc 1.0.6 for Win32 on Win2k and I've
> studied the process.txt file found in the FCL win32 source directory but
> can't get past a compiler error that claims "wrong number of parameters
> specified". Program source and compiler output follow. Can anyone see
> what my problem is?
>
> Mahalo,
> Ron
>
> program proctest;
>
> uses Process;
>
> var myProc : TProcess;
>
> begin
>
> myProc := TProcess.Create( 'c:\my-fpc\initest.exe', [ poNoConsole,
> poWaitOnExit ]);
>
> myProc.Execute;
> myProc.Destroy;
>
> end.
The readme file is outdated :/
Try this instead:
Myproc:=Tprocess.Create(Nil);
Myproc.Commandline:='c:\my-fpc\initest.exe';
Myproc.Options:=[poNoConsole,poWaitOnExit];
MyProc.Execute;
I'll adapt the readme file.
Michael.
More information about the fpc-pascal
mailing list