Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to run multiple instances of a service

how to run multiple instances of a service

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Michael Olsen
    wrote on last edited by
    #1

    Hello all, I have a problem figuring out how to start a service more than once at a time. it seems to be posible, but all my tries to date have failed. Could anyone help me with this problem? in advance, thanks Michael Olsen

    M 1 Reply Last reply
    0
    • M Michael Olsen

      Hello all, I have a problem figuring out how to start a service more than once at a time. it seems to be posible, but all my tries to date have failed. Could anyone help me with this problem? in advance, thanks Michael Olsen

      M Offline
      M Offline
      Michael P Butler
      wrote on last edited by
      #2

      Michael Olsen wrote: Could anyone help me with this problem? A Windows service by its very nature can only be run once. You'd have to have a different service name for each instance you want to run. Why do you want to have multiple instances of a service? Michael CP Blog [^]

      M 1 Reply Last reply
      0
      • M Michael P Butler

        Michael Olsen wrote: Could anyone help me with this problem? A Windows service by its very nature can only be run once. You'd have to have a different service name for each instance you want to run. Why do you want to have multiple instances of a service? Michael CP Blog [^]

        M Offline
        M Offline
        Michael Olsen
        wrote on last edited by
        #3

        Thanks for the reply. The service is a kind of router, and with multiple instances more customers could be serviced (on diferent ports) without mixing. like acidentialy sending data to another customer. I had hoped this could be done by starting the same service multiple times listening to different ports. Michael Olsen

        M 1 Reply Last reply
        0
        • M Michael Olsen

          Thanks for the reply. The service is a kind of router, and with multiple instances more customers could be serviced (on diferent ports) without mixing. like acidentialy sending data to another customer. I had hoped this could be done by starting the same service multiple times listening to different ports. Michael Olsen

          M Offline
          M Offline
          Michael P Butler
          wrote on last edited by
          #4

          Michael Olsen wrote: I had hoped this could be done by starting the same service multiple times listening to different ports. I'm no expert on this, but I think the "correct" way would be to have one service that has multiple threads. One thread per port. Michael CP Blog [^]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups