473,406 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

OnStop VS OnShutdown in Service

TDC
At system start I get the OnStart. When the system shuts down, do I
*just* get an OnShutdown, or will I get both and OnStop and an
OnShutdown?

If you only get the OnShutdown, I find it odd that the MSDN states the
typical implementation is to override the OnStart and OnStop. Such a
statement makes me assume that the OnStop IS called at shutdown.

Anyone have experience in this area?
Tom

Nov 21 '05 #1
0 1415

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: n_o_s_p_a__m | last post by:
OK, When I run my assembly in a regular windows application, all the threads terminate gracefully, using the recommended "graceful" synchronization mechanisms (autoresetevents, volatile statics,...
1
by: n_o_s_p_a__m | last post by:
in my windows service, onstop is either doing one of 2 things: a) not giving my threads a chance to self terminate (which they always do "gracefully" b) unloading my custom trace listener...
0
by: Paul Lewis` | last post by:
Hello, I am trying to make a service which will shut a hanging process down. Before the OnShutdown function runs, windows asks if I would like to end the task. I cannot modify the hanging...
3
by: Matt C. | last post by:
This is my first attempt at writing a .NET service, and also my first attempt at using threads. I don't know what I'm doing. Below is some simplified code from my service class (inheriting from...
5
by: marccruz | last post by:
Hi, I am writing a Windows Service in C#. I want to gracefully fail the "protected override void OnStop()" function. To do this, I first tried throwing an Exception in the function. However,...
1
by: Croco Stimpy | last post by:
I have a service that must know when the OS shuts down, so it can perform some cleanup. I just found that the OnShutDown event never fires when the machine shuts down! I did some checking and...
0
by: Klaus Unterberg | last post by:
Hello, does anyone know, how to make an EventLog in service event OnShutdown? It seems that OnShutdown cannot make an entry to the eventlog.writeentry(). Even when Eventlog is listed in the...
3
by: karthi84 | last post by:
Hi, I have created a windows service and i have written code in OnStart and OnStop event. when i manually start and stop the service it works fine. But when i restart the machine the OnStop event is...
14
by: madankarmukta | last post by:
Hi , I want to commit the chages/ want to do some activity on service's OnShutuDown().But i found that It neven get's called ..when i shut down the system or when i power it off..in Both the cases...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.