Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic (http://www.programmingforums.org/forum18.html)
-   -   VB Winsock error (http://www.programmingforums.org/showthread.php?t=11122)

cyb3rl0rd1867 Aug 19th, 2006 11:17 PM

VB Winsock error
 
At my school if you try to use the winsock control a error comes up saying "address family not supported". Does anyone know what that means or/and how I could fix it?

andro Aug 20th, 2006 12:17 AM

I'm overwhelmed by the detail you have provided. Total information overload. I can't even function right now.

cyb3rl0rd1867 Aug 20th, 2006 12:23 AM

That's all there is too it. As I said I don't know what it means or how to fix it, that's what I'm asking.

DaWei Aug 20th, 2006 8:17 AM

Please read the "How to Post a question" thread, and maybe the "How to ask questions the smart way", linked to in the FAQ. You aren't giving any information, except that it happened at school. Was it during a Monopoly game, when you passed GO? Right after you flushed the urinal? Was there actually coding involved, at the time?

Random Spirit Aug 20th, 2006 10:25 AM

The details are a bit thin on the ground. I have not used winsock in quite a while, but if i remember correctly you have to tell it the sort of protocol it is going to use. To do this you have to set it to the right port number when connecting. So port 80 for http, port 21 for ftp etc. So if you want to connect to a ftp server you would say this

:

MyWinsockControl.Connect "ftp.randomftpsite.com" ,21

The first parameter is for the address and the second is for the port number. If you set the wrong port number for the protocol used it will give you the error - address family not supported. I think that is correct, but if you provide some more detail i might be able to help more. :)

DaWei Aug 20th, 2006 10:53 AM

RS is half right. You have to specify an address family. That isn't normally accomplished by merely specifying a port. Here's a list. Have you read Beej? It isn't winsock-directed, but the crossover utility is rather high. Again, information is key. We could run this thread up into double digits, but it wouldn't be very effective for you or us.

Random Spirit Aug 20th, 2006 12:24 PM

Its sounds from your lack of information provided that you are just getting into winsock with vb6. I have looked at MSDN and found this:

http://msdn.microsoft.com/library/de...excontrols.asp

Scroll down to the bottom and click Using the WinSock Control.

Its a basic introduction to using the winsock control by creating a client and a server app. Its nothing to complecated so it should be easy to follow.

On a side note when i was at school the network admins disabled the winsock control in VB6 for security reasons. You might have a similar situation at your school and that might be the reason for the error.

cyb3rl0rd1867 Aug 20th, 2006 2:47 PM

In answer to everyones question, there is no code on the form at all. All I did was put the winsock control on the form and compiled it. Then that error came up. And yes I have used winsock plenty of times at home without that happening. I hope this clarifies the problem.


All times are GMT -5. The time now is 12:55 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC