Solved

WSAESOCKTNOSUPPORT error

Posted on 1999-01-12
6
468 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

747 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

11 Experts available now in Live!

Get 1:1 Help Now