Solved

Why error in win95 "socket( AF_INET, SOCK_STREAM, 0)"

Posted on 1999-01-10
7
1,015 Views
Last Modified: 2013-12-03
Hello. I get the error 10044 in Win95 when I use:

sock = socket( AF_INET, SOCK_STREAM, 0)

AF_INET is not supported, why ?
Is there anything I can do so it will work with out error ?

Have win95 OSR 3 ws2_32.dll from the beginning ?

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
  • 3
  • 3
7 Comments
 
LVL 11

Expert Comment

by:alexo
ID: 1418384
Did you call WSAStartup() ?
0
 

Author Comment

by:devfredde
ID: 1418385
Yes.

      WSADATA WSAData;

      if (WSAStartup(0x101,&WSAData) == SOCKET_ERROR)
      {
            WSACleanup();
            PostQuitMessage(0);
      }

It works fine under Windows 98 but not under win95. I get the error 10044 in windows 95.

Have win95 OSR 2 ws2_32.dll from the beginning ???
What platform have es2_32.dll from the beginning ???
0
 

Accepted Solution

by:
wilsonkwan earned 20 total points
ID: 1418386
For IP sockets have you tried using
sock = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP)
or
sock = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP)?

If you are using Winsock 2 expanded protocol support try enumerating the protocols first with WSAEnumProtocols. This will at least give you an idea what protocols are available on your Win 95 platform.
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 11

Expert Comment

by:alexo
ID: 1418387
wilsonkwan seems to be right, the last 0 equates to IPPROTO_IP which is definitely not a streaming (SOCK_STREAM) protocol.  Anyway, raw IP is very rarely used.

0
 

Author Comment

by:devfredde
ID: 1418388
alexo, do you meen that I can not use IPPROTO_IP with SOCK_STREAM ? I MSDN 98 OCT it only use SOCK_STREAM or SOCK_RAW and AF_INET for IP. And IPPROTO_IP is 0.

Should I try to use WSAEnumProtocols to see what protocol I can use ? I'm shore I have TCP/IP protocol on my win95 machine. It works perfect on my win98 and NT machine but not with win95.


0
 
LVL 11

Expert Comment

by:alexo
ID: 1418389
>> alexo, do you meen that I can not use IPPROTO_IP with SOCK_STREAM?
That's what I mean.  SOCK_STREAM with AF_INET sort of implies IPPROTO_TCP.
0
 

Author Comment

by:devfredde
ID: 1418390
Ok, I will try soon I have the book Winsock 2.0 and maybe I can learn more from it.


0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

733 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