Results 1 to 2 of 2

Thread: Some help with a window service

  1. #1

    Thread Starter
    Hyperactive Member drattansingh's Avatar
    Join Date
    Sep 2005
    Posts
    395

    Some help with a window service

    hey guys, I got a little question. I'm supposed to build a window service to do some stuff which I know how to do. I also have to send a message if the window service fails or is not responding. I know how to code to send the message. The question is that I do not know where to put this code. Do I put it in the Onstop method? Will that method execute if the service fails? if not, where should I put that code to send the message? I'm pretty new to window services.

    Jennifer Saunders

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Some help with a window service

    What are the conditions for a failure?

    As for not responding, if your service locks up the last thing it is going to do is post a message about it ... Maybe you could run a separate thread that checks the CPU usage of the main thread over the last time period, and if it is (very) abnormally high then post the message from the monitoring thread.

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