Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Winboard problem (maybe Delphi only )

Author: Russell Reagan

Date: 09:30:41 08/23/03

Go up one level in this thread


On August 23, 2003 at 09:06:46, Steve Maughan wrote:

>One possibility to try would be to use 'CreateThreadEx' instead of
>'CreateThread'.  I know from your website that you use CreateThread in XiniX but
>someone told me that this is not consols safe - I've no idea why and no more
>infor thatn this.

Actually, not only is CreateThread() not console safe, but neither is
CreateThreadEx(). _beginthreadex() is the appropriate C run-time thread creation
call (and _endthread() for ending, IIRC). For some reason I can't even find
CreateThreadEx() on MSDN anymore, nor _beginthreadex/_endthread. But I have a
book on win-32 threads, and it says that if you are using any C run-time
libraries, you should use _beginthreadex/_endthread to avoid memory leaks. It
also noted that even if you don't directly make use of the C run-time, the
Windows libraries might (or C++ libraries for that matter). So the book I have
recommends always using _beginthreadex().

I don't know if this affects Tony's problem at all, since he isn't using C or
the C run-time stuff.



This page took 0 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.