Re: NT Services, user interface, socket errors

Giganews Newsgroups
Subject: Re: NT Services, user interface, socket errors
Posted by:  Remy Lebeau (TeamB) (
Date: Fri, 6 Aug 2004

"David Perkins" <> wrote in message

> Every couple of days or so, my NT service stops responding.

The only way the service can stop responding is if you are blocking (or blew
up) the service's main thread.  Where exactly are you doing your email
processing from?  If within the service thread directly, such as in the
OnExecute event, then you should move the code to a separate thread of its
own instead.

> This always seems to happen shortly after I get an exception,
> which I catch:

Please show your actual code.

> My Theory:  could indy/winsock be displaying an error
> message, and, since the app's a service it brings everything
> to a grinding halt (since there's no user interface).

Doubtful.  Neither Indy nor WinSock display any message boxes, and if you
are using TService then it catches any unhandled exceptions and forwards the
messages to the NT Event Log instead of displaying a message box.



In response to

NT Services, user interface, socket errors posted by David Perkins on Fri, 06 Aug 2004