Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why cannot i create socket?

Status
Not open for further replies.

IPOz

Programmer
Jul 11, 2001
109
CN
Hi,friends
On my windows 2000 professional box,i can NOT visit internet using IE,mozilla,etc. The reason is all of those can NOT create socket !
I have used a program to test it and found that the socket() function always returned -1 .I donot know why it happens?
BTW, the socket() is in ws2_32.dll.

Any suggestion is appreciated ! IPO_z@cmmail.com
Garbage in,Garbage out
 
i have tested it using the following code snippet:
...
FSocket := socket(PF_INET, SOCK_STREAM, IPPROTO_IP);
if FSocket = INVALID_SOCKET then begin
errCode := WSAGetLastError();
case errCode of
WSANOTINITIALISED:
raise ESocketError.create('WSANOTINITIALISED');
WSAENETDOWN:
raise ESocketError.create('WSAENETDOWN');
WSAEAFNOSUPPORT:
raise ESocketError.create('WSAEAFNOSUPPORT');
WSAEINPROGRESS:
raise ESocketError.create('WSAEINPROGRESS');
WSAEMFILE:
raise ESocketError.create('WSAEMFILE');
WSAENOBUFS:
raise ESocketError.create('WSAENOBUFS');
WSAEPROTONOSUPPORT:
raise ESocketError.create('WSAEPROTONOSUPPORT');
WSAEPROTOTYPE:
raise ESocketError.create('WSAEPROTOTYPE');
WSAESOCKTNOSUPPORT:
raise ESocketError.create('WSAESOCKTNOSUPPORT');
else
raise ESocketError.Create(
Format('%s -> error code=%d',[sCannotCreateSocket,errCode]));
end;
end;
...
it will report 'cannot create new socket -> error code=10106'.But 10106 is undocumented :(
How did the error happen ?
Some day ago i installed mozilla-0.9.9 and it is great for me to browse internet.Yesterday i ever visited using mozilla,but now i can NOT create any new socket after rebooting my computer :(

Please help me figure it out,thanks in advance !
IPO_z@cmmail.com
Garbage in,Garbage out
 
10106 means my box can NOT find the PDC(Primary Domain Controller). But how can i resolve it ?

regards! IPO_z@cmmail.com
Garbage in,Garbage out
 
Now i suspect that my box has been hacked by some one as it still can NOT login in the domain when i use another computer.When i used the new box i loginned successfully at the first time however it didnot work from then on :(

i used the following command to find out which ports are open:
c:\>netstat -a | grep -i listen
there are many open ports which i am not familiar with.How do i know which processes are listening on those port ?

Does there exist any registry settings to disable the domain login ?

BTW,i can login the local box and visit network by TCP/IP.

Any suggestion is appreciated! IPO_z@cmmail.com
Garbage in,Garbage out
 
If you suspect a hacker, and you have many ports open, try the following, testing your internet connection after each suggestion:

1] Use the MSCONFIG program to see what is running at startup, and un-check anything that is not absolutely needed. Then re-boot and check your internet. If it works, one of the un-checked programs is the culprit. Now use a process-of-elimination to figure out which one.

2] Un-install and then re-install the TCP/IP network protocol, the network adaptor, and "Client for Microsoft Networks". (as foound in the properties for your network connection)

3] Make sure you have an up-to-date anti-virus program, and have run a FULL virus scan on your computer.


If this is all very obvious to you, just ignore it. If not...
 
Thanks for all your answers ! i will test the Active Port as soon as possible.


Regards! IPO_z@cmmail.com
Garbage in,Garbage out
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top