<p>Am 05.10.2014 12:28 schrieb "Jürgen Hestermann" <<a href="mailto:juergen.hestermann@gmx.de">juergen.hestermann@gmx.de</a>>:<br>
><br>
><br>
> Am 2014-10-05 um 12:10 schrieb Michael Van Canneyt:<br>
><br>
>> Not necessarily, because it is a cross-platform function and on other systems the error codes are not necessarily positive values.<br>
>> Unfortunately, this kind of windows-api-creep is found throughout the RTL.<br>
>><br>
>> The proper procedure is probably to introduce TSysErrorCode which depends on the platform, and replace integer/dword with that.<br>
>> Please file a bug-report, so we do not forget this.<br>
><br>
><br>
> But the current situation is wrong for *all* plattforms because the sequence DWORD-INTEGER-DWORD<br>
> does not work and when it becomes INTEGER-INTEGER-DWORD it doesn't work either.<br>
> The FormatMessageA call within SysErrorMessage expects DWORD too but an INTEGER is provided.</p>
<p>Please note that GetLastError is Windows-specific. The cross platform function in SysUtils is called GetLastOSError which does return Integer.</p>
<p>Regards,<br>
Sven</p>