devfredde
asked on
Why error in win95 "socket( AF_INET, SOCK_STREAM, 0)"
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 ?
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 ?
Did you call WSAStartup() ?
ASKER
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 ???
WSADATA WSAData;
if (WSAStartup(0x101,&WSAData
{
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 ???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
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.
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.
>> 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.
That's what I mean. SOCK_STREAM with AF_INET sort of implies IPPROTO_TCP.
ASKER
Ok, I will try soon I have the book Winsock 2.0 and maybe I can learn more from it.