Click to See Complete Forum and Search --> : Windows Service Question


vchapran
August 16th, 2005, 11:13 AM
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

Craig Gemmill
August 16th, 2005, 07:42 PM
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.