PDA

Click to See Complete Forum and Search --> : winsock api problem


softwareguy74
Dec 27th, 2000, 02:13 PM
Hi,

I have developed a dll component which offers SMTP client services for my app. It uses the winsock api instead of the winsock control.

Everything works just great on my home computer(the same computer used to developed the dll: Win2K Pro, Penitum 600) but when I use it at work on a little older computer (Win95, Pentium 200), I run into a very strange problem..

From within the VB developement environment, I use a project group which includes the dll project and a test container project to test the dll. I encounter no problems when connecting, sending and then disconnecting for the first time. But then if I try to reconnect, it gives me a WSANOTSUPPORTED error.. I have to totally close out VB and then start it back up and then I am able to connect again.

I tried to reduce the possibilities of where the error is occuring so I took out the sending code. So, I can connect and then disconnect to the smtp server without a hitch the first time. But then subsequent attempts at trying to connect, will give me the error.

It seems as if the socket is not getting disconnected... Is it possible that the winsock dll file that's on my work computer is outdated? Where can I download the latest winsock dll?

Any help would be appreciated..

Dan

softwareguy74
Dec 27th, 2000, 02:28 PM
Nevermind.. Dumby me... I forgot to call WSACleanup after closing the connection.. I guess Win2K does a better job at managing resources that are not cleanup then Win95 does...

Dan