Unidac in a Windows Service?

Unidac in a Windows Service?

I have spent a lot of time trying to get a couple of applications using Unidac to work as a service. I can get these applications to work ok in GUI mode, but they will not run as a service. I can install the service ok, but when I try to Start the service, it basically times out.

I have varied everything I can think of - but as soon as I add a TUniConnection (in a datamodule), the service will not start. Without the DB stuff, the service starts just fine.

I am wondering if anyone has been able to achieve this? If it is not possible, it would be nice to know as I can focus on other solutions. If this IS possible, I would just love to know the secret! I have a feeling the problem is with multithreading issues with UniDac and a windows service.

I had a feeling I was able to do something along these lines with Delphi 7 and Windows 7 many years ago. I am currently using Windows 10 and Delphi 10.3 (and the most current version of Unidac).