[fpc-devel] Bug in SysUtils.GetTempFileName?
sergei_gorelkin at mail.ru
Fri Sep 1 17:02:15 CEST 2006
Friday, September 01, 2006, 11:48:17 AM, Daniël wrote:
DM> Op Fri, 1 Sep 2006, schreef Sergei Gorelkin:
>> function GetTempFileName(Dir,Prefix: PChar; uUnique: DWORD; TempFileName: PChar):DWORD;
>> (note that it's not compatible with WinApi because 'stdcall' is
>> Naturally, under Windows the function is not needed because it's contained in
>> WinApi. But then function declaration in interface must also be wrapped into
>> conditional section, otherwise how such code gets compiled?
DM> There exists a wrapper in rtl/win/sysutils.pp, which is necessary because
DM> otherwise a "uses sysutils" would not be enough to use this function. Both
DM> the Windows specific and the platform independend one do not use syscall
DM> and are therefore compatible with each other.
Ok, now I understand where does the implementation come from. Then the
bug is caused by missing 'stdcall' modifier in SysGetTempFileName() declaration
(rtl/win/sysutils.pp, line 79). Could you please add it?
More information about the fpc-devel