Solved

Winsock Error !

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hide vba in gp 7 118
Help me. 3 71
Python 3.5.2 32 virtualenv problems 3 87
Copy a range from 1..n excel sheets to one destination sheet 2 66
Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

696 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