0

Hi,

I am writing a network applications to read data from a server. The problem I have encountered is that on abrupt termination of my program, the socket rtemains open so that the next time I execute the program it will return an "Inavlid operation in actual state" error 40020. I am testing on 2 pc´s connected via twisted net cable. I have reset the pc where the problem arose to no success, I have to reset both pc´s to make it work again. My questiosn are :

1. can anybody tell me how to fix this problem programatically?
2. Is there a feasible way to detect network cable remotion. I am using IsNetworkAlive and will return after a certain period cable is disconnected even thougfh they are connected.
3. Due to the abupt termination I also have problems with RegisterClass and UnregisterClass. The first returns an error 1410 (Class already registered) and when the unregisterclassw is executed it will return an error 87. So I can´t get past these problems.

Please help, I am going crazy!!!!!!

Thanks for your help,

JARP

3
Contributors
2
Replies
5
Views
8 Years
Discussion Span
Last Post by jonc
0

The problem I have encountered is that on abrupt termination of my program, the socket rtemains open so that the next time I execute the program it will return an "Inavlid operation in actual state" error 40020.

I got around my problems with Winsock by checking connection state before attempting to connect. If it is in any state other than closed, it would close the connection first and then attempt to connect.


hi does anybody knows how to display an icon in a richtextbox in a chat program

@Chloevin: This has nothing to do with jarojasp's question, so you'd be better off posting your question in a new thread (ensuring you have tried the search functionality within the forum first!)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.