[fpc-pascal] Re: WSAGetLastError returns 0 when it shouldn't but I cannot see why
luca at ventoso.org
Thu Feb 28 12:07:37 CET 2008
En/na L ha escrit:
>> Found the problem using my brute force writeln('') skills. It is an
>> issue with freepascal's stack or something to do with buggy threads
>> methinks. As it is when you call lasterror within another procedure
>> with local variables.. they are corrupted or something.
> Aha.. I changed the by Value parameter to a CONST parameter in the error
> procedure (Perror).. And this solves the issue..
> So something to do with calling by Value within a thread versus a const
This seriously worries me, since I use threads extensively, and I mostly
use call by value parameters.
More information about the fpc-pascal