Re: Shutting down application problems

Giganews Newsgroups
Subject: Re: Shutting down application problems
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Wed, 7 Jun 2006

"Rick" <aso3ri…@hotmail.com> wrote in message
news:E9BBE5EE78FBE240aso3ri…@hotmail.com...

> How to shut down an application with a TCP indy client
> running properly?

Close the client first before shutting down the application.

> If I shut, I get this error:
>    socket error 10093

10093 is WSANOTINITIALISED.  Sounds like you are shutting down the client
too late, after Indy has already unloaded the socket library.

> procedure    shut;

Where are you calling shut() from exactly?

>        // client.disconnect;
>        client.destroy;
>        application.terminate;

Why did you comment out the Disconnect()?

> If I also execute disconnect, I get an access violation right after
> that line (also tried it with disconnectSocket).

That suggests to me that you are calling Disconnect() on an invalid client
object.  Are you calling shut() multiple times, by chance?

> what am I doing wrong?

There is no way to diagnose your problem without more details.

Gambit

Replies

In response to

Shutting down application problems posted by Rick on Wed, 7 Jun 2006