systan
asked on
simpliest example of windows service
hi
I'm willing to learn more, making apps via windows service
please attach a file for me to look at it.
thanks
I'm willing to learn more, making apps via windows service
please attach a file for me to look at it.
thanks
ASKER
Points increased for this connected question;
Do we really need a timer or a thread to do the servicing? <just yes or no>
If I choose the threaded approach, does that mean that it will continue to work within a loop until an abort command? <just yes or no>
If I choose the timer approach, it will NOT Lag a little on the computer? <just yes or no>
If your answers defends on my service application, then my service application is about detecting the path of the explorer window shell via Shell32 and SHDocVw.
So, its now really a yes or no answer,
thanks
Do we really need a timer or a thread to do the servicing? <just yes or no>
If I choose the threaded approach, does that mean that it will continue to work within a loop until an abort command? <just yes or no>
If I choose the timer approach, it will NOT Lag a little on the computer? <just yes or no>
If your answers defends on my service application, then my service application is about detecting the path of the explorer window shell via Shell32 and SHDocVw.
So, its now really a yes or no answer,
thanks
Do we really need a timer or a thread to do the servicing?Yes.
If I choose the threaded approach, does that mean that it will continue to work within a loop until an abort command?
No.
If I choose the timer approach, it will NOT Lag a little on the computer?
There is a possibility due to the nature of timers, but I don't think you'd notice it.
ASKER
If I choose the threaded approach, does that mean that it will continue to work within a loop until an abort command?
>>No. ?
So, how can I do the threaded approach that continues a loop until I command it to abort?, just like the timer approached.
Points increased.
Thanks
>>No. ?
So, how can I do the threaded approach that continues a loop until I command it to abort?, just like the timer approached.
Points increased.
Thanks
So, how can I do the threaded approach that continues a loop until I command it to abort?, just like the timer approached.I was trying to adhere to your "yes/no" stipulation = )
Whether or not the thread continues will be dictated on how you construct the function that represents the work being done in the thread. If you were to do something like:
private void WorkerFunction()
{
while (true)
{
// logic
}
}
then it will continue to run until an exception occurs or Abort() is called on the thread (which in reality, causes an exception to be raised on the thread). Whether or not the thread continues to run until aborted will be dictated by your design.
ASKER
Do we really need a timer or a thread to do the servicing?
>>Yes ?
I'm sorry, I'm Lazy I really doubt about this.
Can you show a link that probes that making a windows service MUST have a thread or timer to enable to work permanently, except when someone stop or pause the service?
That will be my last.
Thanks
>>Yes ?
I'm sorry, I'm Lazy I really doubt about this.
Can you show a link that probes that making a windows service MUST have a thread or timer to enable to work permanently, except when someone stop or pause the service?
That will be my last.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you
NP. Glad to help : )
Timer Based
Open in new window
Thread Based
Open in new window