Solved

WSAESOCKTNOSUPPORT error

Posted on 1999-01-12
6
489 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

628 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