Solved

Winsock Error !

Posted on 1998-04-15
5
646 Views
Last Modified: 2013-11-13
Please, explain this Error Number ..

             '10048'

How can I fix it ?
0
Comment
Question by:can9999
5 Comments
 
LVL 2

Expert Comment

by:lortega
ID: 1461365
I need some explanation of how you get that error, but i found some reference about that code number.

WSAEADDRINUSE = 10048 = Address already in use

to help you i need more information...
0
 
LVL 2

Expert Comment

by:marti
ID: 1461366
On which line you are getting this error?
0
 
LVL 1

Author Comment

by:can9999
ID: 1461367
wsMail.RemoteHost = sPopServer
wsMail.RemotePort = "110"
wsMail.Protocol = sckTCPProtocol
wsMail.Connect
..

wsMail.Close

Above Code is executed every 1 min.

Above Code is OK when it runs in DevStdio, bytheway
if I make to exe file, and execute it , it occures 10048 error

I'd already known "Address already in use" ..

Thank U !
       
0
 
LVL 1

Author Comment

by:can9999
ID: 1461368
Perhaps, It will occure in "wsMail.Connect"

0
 
LVL 2

Accepted Solution

by:
woka earned 50 total points
ID: 1461369
The LocalPort property is set when you make the conect.  After you close the connection, and before you reopen it, you must set the LocalPort property to 0.  Actually, you just need to set it to 0 before connecting.  ie.

wsMail.LocalPort = 0
wsMail.Connect
...
wsMail.Close

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question