Re: NT Services, user interface, socket errors

Giganews Newsgroups
Subject: Re: NT Services, user interface, socket errors
Posted by:  Remy Lebeau (TeamB) (gambit47.no.spam@no.spam.yahoo.com)
Date: Fri, 6 Aug 2004

"David Perkins" <please@no-spam.com> wrote in message
news:66CA742DA6A7E240please@no-spam.com...

> 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.

Gambit

Replies

In response to

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