![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
|
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?
|
|
|
|
|
|
#2 |
|
Professional Programmer
|
I'm overwhelmed by the detail you have provided. Total information overload. I can't even function right now.
|
|
|
|
|
|
#3 |
|
Newbie
|
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.
|
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#5 |
|
Unverified User
Join Date: Aug 2006
Posts: 88
Rep Power: 0
![]() |
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. ![]() |
|
|
|
|
|
#6 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#7 |
|
Unverified User
Join Date: Aug 2006
Posts: 88
Rep Power: 0
![]() |
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. |
|
|
|
|
|
#8 |
|
Newbie
|
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.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C# corruption!!! | Kilo | C++ | 32 | May 21st, 2006 8:44 PM |
| Masm | rsnd | Assembly | 4 | May 20th, 2006 9:05 PM |
| winsock error 10038 (WSAENOTSOCK) | kongooka | C | 4 | Jan 24th, 2006 9:26 PM |
| libraries | matko | C | 1 | Jan 22nd, 2006 2:12 PM |
| HELP please!!! | hamacacolgante | C | 7 | Nov 21st, 2005 5:36 AM |