Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: Delphi 2005 Personal and Indy 10.0.75: Indy don't work!!!

www.cryer.info
Managed Newsgroup Archive

Re: Delphi 2005 Personal and Indy 10.0.75: Indy don't work!!!

Subject:Re: Delphi 2005 Personal and Indy 10.0.75: Indy don't work!!!
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Fri, 2 Jun 2006 13:12:32

"Jamie Dale" <j.dale@turboz.net> wrote in message
news:44802180@newsgroups.borland.com...

> When I run it on the other machine, it downloads the xml file of the
> hosts in my account, and then stops. It doesn't check the IP address
> anymore (despite the timer being enabled).

You shouldn't be using a timer in a service to begin with.  But that is a
side issue.  You haven't provided any details about where the stoppage is
actually occuring in the code.  There are any number of reasons why a
service could stop running, and most of them have nothing to do with Indy or
Delphi at all.  Without seeing your actual code, or any logs from the
service, there is no way to diagnose that kind of problem.

> It doesn't run through the list of hosts and compare IPs. It doesn't
> even maintain the log properly either.

Sounds like you probably deadlocked your service, or maybe crashed its
thread so it was termiunated prematurely.  But again, without details, there
is no way to know.

> With regards to the GUI thing, I'm aware of that however I set the
> program as interactive as I wanted it to have a GUI interface so that I
> could update it etc.

Services are not supossed to have GUIs to begin with.  They are meant to be
background tasks.  Even an Interactive Service can have problems with GUI
(especially when the VCL is used for the GUI).  If the user logs out, an
Interactive service can't run properly anymore (and the VCL can crash).  The
best way to handle service GUIs is to move the GUI to a separate non-service
application that is run while the user is logged in and communicates with
the service when needed.  This also allows the service to run while no user
is logged in at all (which is what services are supposed to be able to do in
the first place).

> Thing is, I needed it to run whether I was logged onto the machine
> or not

Then you can't put the GUI into the service directly.

> so a system service seemed like the logical answer.

It is.

> Oddly enough I have another service which is installed too: Talker.exe.
> It basically uses a TCP server and Microsoft speech engine. When you
> connect via TCP it will speak whatever text you send to it. Guess
what?.....
> Yep, also not working correctly

Again, the only way installing Delphi could have effected that is if Delphi
installed a library that the service depends on.  That is very unlikely,
though.

> Compiled both on my main PC with D6 installed using D6 as the compiler.
> Yes I tried compiling Talker.exe on that machine

Do ou have runtime packages enabled or disabled when compiling?

> My delphi is configured to compile all required packages into the main
.exe.
> Therefore it is not dependant on anything

Then there is no way that installing Delphi 2005 should have effected those
projects at runtime.  Something else has to be happening.  But again,
without debugging details, there isno way to know what is actually
happening.

> other than M$'s Agent (Yes it's installed on that machine).

If you are referring to MSAgent (http://www.microsoft.com/msagent) then you
can't use that in a service.

> But if you use uCiaService component and set the service as
> interactive it can ;)

Not reliably, it can't.  The GUI aspects of the VCL are not designed for use
in services.  If you are not careful, you can mess up the service at
runtime, if not the entire machine.  For example, VCL GUI components uses
global resouces that are not preserved during a user logout.  When the user
logs back in, the previous resources are gone, and the components fail to
work properly.

> Do they do D2006 aswell? - I'd really like to give that a chance instead
> of downloading 2005 again..

The free trail is 2006, not 2005.  My mistake.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive