Solved

WSAESOCKTNOSUPPORT error

Posted on 1999-01-12
6
472 Views
Last Modified: 2013-12-03
Hello

I get this error all the time in Win95
WSAESOCKTNOSUPPORT

WSADATA WSAData;

// This will not return error on win95.

    if ((status = WSAStartup(MAKEWORD(1,1), &WSAData)) == 0)  {
         MessageBox( hWnd,"Yes","Yes", MB_OK);
    }


//This socket func.. will return error 10044.

sock = socket( AF_INET, SOCK_STREAM, 0);
      if (sock == INVALID_SOCKET)
      {
            char szBuff[128];
            wsprintf( szBuff, "%d", WSAGetLastError());
            MessageBox( hWnd, szBuff, "Error", MB_OK );
            WSACleanup();
            PostQuitMessage(0);
      }

I get the error then I try to use sock.
I have ws2_32.dll and the help dll on my win95 computer, but this will not work why ?

Please help me...

0
Comment
Question by:devfredde
  • 4
  • 2
6 Comments
 

Author Comment

by:devfredde
ID: 1418613
Edited text of question
0
 
LVL 32

Accepted Solution

by:
jhance earned 10 total points
ID: 1418614
This error indicates that the protocol you specified is not available.  Check your network control panel and make sure that the TCP/IP protocol is installed and bound to at least one network adapter.  The presence of ws2_32.dll is NOT an indication of an active TCP/IP protocol.
0
 

Author Comment

by:devfredde
ID: 1418615
I have TCP/IP installed...

I try this program on my friends computer two ( Win95 and have Network and TCP/IP protocol installed "We use it to play game" )
And the program returned the same error.

I read an articel for just one minutes ago and he say something about using wsock32.dll instead of ws2_32.dll but how to use it WSAStatup requried ws2_32.dll..


0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:devfredde
ID: 1418616
It works fine with win98 and NT but not win95.
0
 
LVL 32

Expert Comment

by:jhance
ID: 1418617
What library are you linking with?

Are you sure of your definitions for AF_INET and SOCK_STREAM?  


0
 

Author Comment

by:devfredde
ID: 1418618
I use ws2_32.lib

I think so because it works on NT and Win98.
But I see that many people have the same problem.
Maybe it's something wrong with ws2_32.dll and ws2_32.lib.

/Fredrik
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

911 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

18 Experts available now in Live!

Get 1:1 Help Now