Click to See Complete Forum and Search --> : Ping on Windows 95


April 22nd, 1999, 11:03 PM
Hi everybody,
I have a problem with my PING application, hope someone can help. The problem is as followed:
I wrote my PING application using SOCK_RAW on VC++ 6.0, the program ran quite well on Windows 98 & Windows NT platforms. But I've found recently that it could run neither on Windows 95 nor Windows 95 OSR2. I always received INVALID_SOCKET error when I create the socket. I'll list the startup code as followed:

#include <winsock2.h>
.
.
.
SOCKET sockRaw;
sockRaw = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
if (sockRaw == INVALID_SOCKET)
{
AfxmessageBox("Socket initialization fail");
return;
}



...
The code is linked with ws2_32.lib and ran quite well on win98 & winNT platforms

Thanks in advance