Service project

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Curious

    #1

    Service project

    I have a .NET project whose final products are two background services
    that you can see, start, or stop in the "Services" panel.

    I have a folder containing the executables in the form of .dll
    and .exe. How can I use the executables to start the services?

  • DArnold

    #2
    Re: Service project

    Curious wrote:
    I have a .NET project whose final products are two background services
    that you can see, start, or stop in the "Services" panel.
    >
    I have a folder containing the executables in the form of .dll
    and .exe. How can I use the executables to start the services?
    >
    You have to use the .Net Framework Service Controller in code.

    Comment

    • Curious

      #3
      Re: Service project

      They're both defined as sub-classes of
      "System.Service Process.Service Base". I've built the executables. But
      don't know how to get the services started.

      Comment

      • Mr. Arnold

        #4
        Re: Service project


        "Curious" <fir5tsight@yah oo.comwrote in message
        news:1183329632 .437520.163460@ q69g2000hsb.goo glegroups.com.. .
        They're both defined as sub-classes of
        "System.Service Process.Service Base". I've built the executables. But
        don't know how to get the services started.
        >
        This is how I have done it which works the same way in VB or C#.Net

        Dim theServiceContr oller as System.ServiceP rocess.ServiceC ontroller
        me.theServiceCo ntroller = New System.ServiceP rocess.ServiceC ontroller()
        me.theServiceCo ntroller.Machin eName = "Curious"
        me.theServiceCo ntroller.Servic eName = "CuriousService "

        if (theServiceCont roller.Status = ServiceControll erStatus.Stoppe d) then
        theServiceContr oller.Start()
        end if


        Comment

        Working...