
August 12th, 2004, 10:34 AM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
C# Windows Service Dependencies
I have written a windows service that starts automaticaly on windows boot and it do some jobs.
If I restart PC, or if I log off and then log on again my service is still started but is not working anymore.
My service use another service that is written from another manufacturer (this service can open communications to some hardver devices and communicate with them). It seems that on booting my service starts before that service it depends on so it is not working (I suppose that because on starting my service call that custom service to open communication to devices and after restart or log off I lost these opened communications to hardware devices that are controlled by that custom service).
How I can set that my windows service depends on this service? (I know the path of EXE file of that custom service and this service is listed in services.msc).
I see in C# initialization of windows service array ServicesToRun - so how I can reference and load that service I depend on to load before my service)?
I hope that it will resolve my problem...
|