Sercammus - 2011-07-30

Hi,

I encountered a very annoying problem in a program I was writing using Delphi 7: as soon as Andorra has been initialized (using the Andorra DirectX9 Plugin), the function SysUtils.Now() keeps returning the same value. The value is a normal time value, but it usually differs several minutes from the real time value. It does not correspond with the time the program started, the time Andorra was initialized or even with the time I build my project. I would really like to keep using both Andorra and the very commonly used SysUtils.Now(), and I am also a little scared that more functions from Delphi do not behave normally because of Andorra.

I already found that SysUtils.Now() breaks after line 1453 of AdDraws when calling AdAppl.Initialize(FWnd) a virtual abstract method from TAdClasses.Ad2DApplication:
function Initialize(AWnd:TAdWindowFramework):boolean;virtual;abstract;

I also checked out SysUtils.Now(), which (under Windows) uses GetLocalTime in kernel32.dll to obtain the current time value (there are other functions that use GetLocalTime as well, like SysUtils.Date(), SysUtils.Time() and probably others):
procedure GetLocalTime(var lpSystemTime: TSystemTime); stdcall;
{$EXTERNALSYM GetLocalTime}
implementation
procedure GetLocalTime; external kernel32 name 'GetLocalTime';

I write my programs using Delphi 7 under OS Windows 7. The problem does NOT occur when I use the Andorra OpenGL Plugin.

Please advise,

Sercammus