Solved

WSAESOCKTNOSUPPORT error

Posted on 1999-01-12
6
477 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

777 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