Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 19th, 2006, 10:17 PM   #1
cyb3rl0rd1867
Newbie
 
cyb3rl0rd1867's Avatar
 
Join Date: Aug 2006
Location: U.S.
Posts: 5
Rep Power: 0 cyb3rl0rd1867 is on a distinguished road
Send a message via AIM to cyb3rl0rd1867
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?
cyb3rl0rd1867 is offline   Reply With Quote
Old Aug 19th, 2006, 11:17 PM   #2
andro
Professional Programmer
 
Join Date: Oct 2005
Location: California
Posts: 288
Rep Power: 3 andro is on a distinguished road
Send a message via AIM to andro
I'm overwhelmed by the detail you have provided. Total information overload. I can't even function right now.
andro is offline   Reply With Quote
Old Aug 19th, 2006, 11:23 PM   #3
cyb3rl0rd1867
Newbie
 
cyb3rl0rd1867's Avatar
 
Join Date: Aug 2006
Location: U.S.
Posts: 5
Rep Power: 0 cyb3rl0rd1867 is on a distinguished road
Send a message via AIM to cyb3rl0rd1867
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.
cyb3rl0rd1867 is offline   Reply With Quote
Old Aug 20th, 2006, 7:17 AM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Aug 20th, 2006, 9:25 AM   #5
Random Spirit
Unverified User
 
Join Date: Aug 2006
Posts: 88
Rep Power: 0 Random Spirit is on a distinguished road
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.
Random Spirit is offline   Reply With Quote
Old Aug 20th, 2006, 9:53 AM   #6
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Aug 20th, 2006, 11:24 AM   #7
Random Spirit
Unverified User
 
Join Date: Aug 2006
Posts: 88
Rep Power: 0 Random Spirit is on a distinguished road
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.
Random Spirit is offline   Reply With Quote
Old Aug 20th, 2006, 1:47 PM   #8
cyb3rl0rd1867
Newbie
 
cyb3rl0rd1867's Avatar
 
Join Date: Aug 2006
Location: U.S.
Posts: 5
Rep Power: 0 cyb3rl0rd1867 is on a distinguished road
Send a message via AIM to cyb3rl0rd1867
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.
cyb3rl0rd1867 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:16 AM.

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