[fpc-devel] Bug in SysUtils.GetTempFileName?

Daniël Mantione daniel.mantione at freepascal.org
Fri Sep 1 09:48:17 CEST 2006



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
> missing!)

> 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?

There exists a wrapper in rtl/win/sysutils.pp, which is necessary because 
otherwise a "uses sysutils" would not be enough to use this function. Both 
the Windows specific and the platform independend one do not use syscall
and are therefore compatible with each other.

Daniël


More information about the fpc-devel mailing list