Page 1 of 1

[SOLVED] ZDbcIntfs.pas hangs when using in a DLL with last revision

Posted: 17.01.2019, 12:23
by EMartin
I use ZDbcIntfs.pas in a unit for referencing tiNone enum type, also use this unit in a DLL, but now the DLL hangs because of the timer creation.

fault code:

Code: Select all

{ TZDriverManager }
{**
  Constructs this object with default properties.
}
constructor TZDriverManager.Create;
begin
  FDriversCS := TCriticalSection.Create;
  FLogCS := TCriticalSection.Create;
  FDrivers := TZCollection.Create;
  FLoggingListeners := TZCollection.Create;
  FGarbageCollector := TZCollection.Create;
  FHasLoggingListener := False;
  FTimer := TZThreadTimer.Create(ClearGarbageCollector, 1000, True); //--> THIS LINE IS THE CULPRIT
end; 
and is invoked in:

Code: Select all

initialization
  DriverManager := TZDriverManager.Create;
  GlobalCriticalSection := TCriticalSection.Create;
Any help is appreciated.

Re: ZDbcIntfs.pas hangs when using in a DLL with last revision

Posted: 18.01.2019, 15:04
by EMartin
I know that the problem is because no message processing (at least in Windows) but I wan't to implement a DLL for database connections I just need the enum types.

Thanks.

Re: ZDbcIntfs.pas hangs when using in a DLL with last revision

Posted: 21.01.2019, 09:12
by marsupilami
Could you please try the latest revision? Egonhugeist probably has solved the problem.

Best regards,

Jan

Re: ZDbcIntfs.pas hangs when using in a DLL with last revision

Posted: 21.01.2019, 19:42
by EMartin
I can confirm that the problem has been solved.

Thank you.