Solved

Winsock Error !

Posted on 1998-04-15
5
636 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
Comment Utility
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
Comment Utility
On which line you are getting this error?
0
 
LVL 1

Author Comment

by:can9999
Comment Utility
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
Comment Utility
Perhaps, It will occure in "wsMail.Connect"

0
 
LVL 2

Accepted Solution

by:
woka earned 50 total points
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VB error "Type mismatch" 2 42
How does CurrentUser work? 10 25
Problem to open Excel file 15 37
How to Add / Edit Windows Menu 4 23
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
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.

772 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

11 Experts available now in Live!

Get 1:1 Help Now