Re: [fpc-pascal] Syserrormessage, parameter data type

2014-10-05 Thread Michael Van Canneyt
On Sat, 4 Oct 2014, Jürgen Hestermann wrote: In my programs I use this code quite often: SysErrorMessage(GetLastError); A closer look at SysErrorMessage shows that the ERRORCODE will not be used in this routine but only handed over to FormatMessageA which expects a DWORD! --

Re: [fpc-pascal] Syserrormessage, parameter data type

2014-10-05 Thread Jürgen Hestermann
Am 2014-10-05 um 12:10 schrieb Michael Van Canneyt: Not necessarily, because it is a cross-platform function and on other systems the error codes are not necessarily positive values. Unfortunately, this kind of windows-api-creep is found throughout the RTL. The proper procedure is probably to

Re: [fpc-pascal] Syserrormessage, parameter data type

2014-10-05 Thread Michael Van Canneyt
On Sun, 5 Oct 2014, Jürgen Hestermann wrote: Am 2014-10-05 um 12:10 schrieb Michael Van Canneyt: Not necessarily, because it is a cross-platform function and on other systems the error codes are not necessarily positive values. Unfortunately, this kind of windows-api-creep is found througho

Re: [fpc-pascal] Syserrormessage, parameter data type

2014-10-05 Thread leledumbo
> But the current situation is wrong for *all* plattforms FormatMessage doesn't exist on non-Windows platform. SysErrorMessage doesn't call FormatMessage on Linux for instance. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Syserrormessage-parameter-data-type

[fpc-pascal] TCP sample

2014-10-05 Thread Fabrício Srdic
Hi list, Is there any example about how to build a synchronous TCP server using fcl-net? Regards ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Syserrormessage, parameter data type

2014-10-05 Thread Sven Barth
Am 05.10.2014 12:28 schrieb "Jürgen Hestermann" : > > > Am 2014-10-05 um 12:10 schrieb Michael Van Canneyt: > >> Not necessarily, because it is a cross-platform function and on other systems the error codes are not necessarily positive values. >> Unfortunately, this kind of windows-api-creep is fou

Re: [fpc-pascal] *** GMX Spamverdacht *** Re: Syserrormessage, parameter data type

2014-10-05 Thread Jürgen Hestermann
Am 2014-10-05 um 19:04 schrieb leledumbo: But the current situation is wrong for *all* plattforms FormatMessage doesn't exist on non-Windows platform. SysErrorMessage doesn't call FormatMessage on Linux for instance. Then it would make even less sense to use INTEGER in SysErrormessage. The ve

Re: [fpc-pascal] Syserrormessage, parameter data type

2014-10-05 Thread Jürgen Hestermann
Am 2014-10-05 um 20:21 schrieb Sven Barth: Please note that GetLastError is Windows-specific. The cross platform function in SysUtils is called GetLastOSError which does return Integer. And why does a function SysErrorMessage exist that expects an INTEGER and handes this over to FormatMessage

Re: [fpc-pascal] Syserrormessage, parameter data type

2014-10-05 Thread Sven Barth
On 06.10.2014 07:20, Jürgen Hestermann wrote: Am 2014-10-05 um 20:21 schrieb Sven Barth: Please note that GetLastError is Windows-specific. The cross platform function in SysUtils is called GetLastOSError which does return Integer. And why does a function SysErrorMessage exist that expects an