try to run the app with admin privileges
iride already mentioned how presumably uncooperative the administrators are. So this is not really an option. Also, I don't know how Microsoft handles permission errors or "access denied" errors, but from MSDN documentation it seems the only close match, WSAEACCES, is only returned when trying to access already created sockets, so I can only assume this really is a permission problem.
iride, what output does this code produce?
#pragma comment( lib, "Ws2_32.lib" )
#include <iostream>
#include <winsock2.h>
int main() {
int error = 0;
WSADATA data;
error = WSAStartup( MAKEWORD( 2, 2 ), &data );
if( error ) {
std::cout << "WSAStartup() failed: " << error << "\n";
return -1;
}
SOCKET s = WSASocket( AF_INET, SOCK_STREAM, IPPROTO_TCP, NULL, 0, 0 );
if( s == INVALID_SOCKET ) {
std::cout << "IPv4 socket() failed: " << WSAGetLastError() << "\n";
s = WSASocket( AF_INET6, SOCK_STREAM, IPPROTO_TCP, NULL, 0, 0 );
if( s == INVALID_SOCKET ) {
std::cout << "IPv6 socket() failed: " << WSAGetLastError() << "\n";
return -1;
}
}
error = closesocket( s );
if( error == SOCKET_ERROR ) {
std::cout << "closesocket() failed: " << WSAGetLastError() << "\n";
return -1;
}
error = WSACleanup();
if( error == SOCKET_ERROR ) {
std::cout << "WSACleanup() failed: " << WSAGetLastError() << "\n";
return -1;
}
std::cout << "Everything completed successfully.\n";
return 0;
}