Computer Chess Club Archives


Search

Terms

Messages

Subject: One more time Delphi and UCI

Author: Martin Bauer

Date: 14:33:01 04/21/02


Hello,

a few days ago i asked for delphi and UCI: how to listen at stdin while
calculating a move. Now I tried to fix the problem by following the given hints.

My application is NOT a console application, so i tried to listen at stdin with
a delphi tread object. It works in normal mode, but not if i start my engine
with the Fritz7 GUI.

Then I tried the given hints with the createthread() command:

******************************************************
unit Main;
interface
uses [...]
const [...some const declarations]
type[...some type declarations]
var[...some other variable]
  Threadid : THandle;

implementation
[...]
procedure listen_sdtin;
begin
  // listening at stdin and processing the commands
end;
[... many other functions for calculating the best move ...]

initialization
   createthread(nil,0,@listen_sdtin,nil,0,Threadid);
// creating the tread to listen stdin.
******************************************************

but now I get a "access violation" (I hope I translated correctly) when the
engine starts calculating, there is no problem while identyfing the engine. The
problem is hard to find, because with the Fritz GUI I can't debug the program.
But there are problems with delphi threads and the VCL, you must use the
synchronize() command. So I thought this may be the problem and now I made a
console application - but the same problem: access violation. There are no
errors when compiling.

Any Ideas?

Regards

Martin




This page took 0.06 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.