Solved

Winsock Error !

Posted on 1998-04-15
5
644 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

896 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now