CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2000
    Location
    NY, USA
    Posts
    632

    Windows Service Question

    I created Windows Service in VB.Net with the name MSFaxListener.
    It should listen Windows Fax Service events and update SQL Server database when fax job changes it's status. In order to do that in OnStart event of MSFaxListener I'm trying to connect to MS Fax Service.
    I set Startup Type of MSFaxListener to Automatic, so it starts and listens.
    Sometimes it doesn't connect to MS Fax Service. I think it is because MS Fax
    Service did not start before.
    I'm new to Windows services. So I do not know what to do to start
    MSFaxListener only after MS Fax Service started. I see Dependencies tab in
    MSFaxListener properties, but there is nothing.
    How do I make MSFaxListener be dependant on MS Fax Service?
    Is it a bad idea to try to connect to MS Fax Service in OnStart event of
    MSFaxListener? Maybe I need to move it somewhere else? In Timer for
    instance?

    Thank you

  2. #2
    Join Date
    Feb 2000
    Location
    OH - USA
    Posts
    1,892

    Re: Windows Service Question

    Open your *.vb class file in [Design Mode], Right-Click on the screen and select: "Add Installer".

    The IDE will add a new file called ProjectInstaller.vb. Open this file in [Design Mode] and select the "ServiceInstaller1" object.

    In the properties of this object, you will see "ServicesDependedOn". Put the Fax service name in there.
    Good Luck,
    Craig - CRG IT Solutions - Microsoft Gold Partner

    -My posts after 08/2015 = .NET 4.x and Visual Studio 2015
    -My posts after 11/2011 = .NET 4.x and Visual Studio 2012
    -My posts after 02/2010 = .NET 4.0 and Visual Studio 2010
    -My posts after 12/2007 = .NET 3.5 and Visual Studio 2008
    -My posts after 04/2007 = .NET 3.0 and Visual Studio 2005
    -My posts before 04/2007 = .NET 1.1/2.0

    *I do not follow all threads, so if you have a secondary question, message me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured