Hi!
I found more source codes which are working like ping. My only problem with them is, that if i run the program with a non administrative user, then i get back errorcode 10013 which means : "An attempt was made to access a socket in a way forbidden by its access permissions." If i run the program with a user which is member of the administrator goup then it's working fine.
nResult = sendto (sock, pSendBuffer, sizeof (ICMPheader) + nMessageSize, 0, (SOCKADDR *)&dest, sizeof (SOCKADDR_IN));
::GetSystemTime (&timeSend);
++nPacketsSent;
if (nResult == SOCKET_ERROR)
{
cerr << endl << "An error occured in sendto operation: " << "WSAGetLastError () = " << WSAGetLastError () << endl;
}
Can anyone help me to solve this problem, or tell me why can't a non administrator user use this code? If not, then i would appriciate some code, which i can use with a user which isn't member of the administrator group.
Thanks in advance!
kampi