On Windows, when will a 'socket()' call return WSAEINVALIDPROCTABLE?

Viewed 55

Suppose our client application does as below:

WSADATA wsa_data;
int     ret;
SOCKET  sock;
ret = WSAStartup (MAKEWORD (2, 2), &wsa_data);
if (ret ==0) {
  sock = socket (AF_INET6, SOCK_DGRAM, IPROTO_UDP);
}

When will it happen that sock == INVALID_SOCKET and WSAGetLastError() would return WSAEINVALIDPROCTABLE?

Microsoft's documentation for the socket() function says it can return WSAEINVALIDPROCTABLE when:

The service provider returned an invalid or incomplete procedure table to the WSPStartup.

Can a TCP/IP transport service provider, that is not a custom service provider, return an invalid or incomplete procedure table to the WSPStartup() during a socket() call? If yes, why? Under what circumstances? And how can it be remedied?

0 Answers
Related