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

前端 未结 6 1571
遥遥无期
遥遥无期 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 02:52

    Well yes it is possible to install multiple instances of the same service, you simply need to dynamically alter the name at install time (not runtime) however this does not make it desireable. (there is some sample code on Code project http://www.codeproject.com/KB/dotnet/MultipleInstNetWinService.aspx)

    I would however be inclined to rethink your approach, service processes themselves are really meant to be singleton, if you need multiple instances of a process being run, maybe your service should just control and manage the multiple processes rather than being the process.

提交回复
热议问题