Is it possible to install multiple instances of the same delphi service application?

前端 未结 6 1567
遥遥无期
遥遥无期 2020-12-06 02:24

I have a service application built in Delphi that works great. It does exactly what I want it to do and all is happy. All is fine until I want to run two (or more) instanc

6条回答
  •  不思量自难忘°
    2020-12-06 03:02

    Wrap all of your code into a class that inherits from TThread.

    When your service starts it will read a number from a settings file or from the registry and create that many instances of your class.

    Each instance runs independently.

    To change the number of running instances you could shut down the service, edit the setting (in a file or registry) and restart the service.

提交回复
热议问题