Sorry for my English,
some function, for example "GetTempPath" or "GetEnvironmentVariable", if used from IDE works only the first time.
If i run program more than one time from IDE, they returns bad value, but if i run the compiled program they work correctly.
For example:
*********************************
function WinTemp:string;
Var AppoPChar:Pchar;
begin
getmem (AppoPChar, MAX_PATH);
GetTempPath (MAX_PATH, AppoPChar);
Result:=AppoPChar;
FreeMem (AppoPChar, MAX_PATH);
end;
*********************************
Appo:=WinTemp;
The first time the value of Appo is 'C:\Documents and Settings\BONMAR\Impostazioni locali\Temp\'
After first time the value of Appo is 'C:\WINDOWS\'
It's a bug?