ws2_32: Fail with WSAEINVAL if a requested extension function is not found.

Rather than WSAEOPNOTSUPP.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-06-02 17:03:58 -05:00 committed by Alexandre Julliard
parent 6ac1cd51bd
commit d1cd6f4a57
2 changed files with 2 additions and 2 deletions

View File

@ -3536,7 +3536,7 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
}
FIXME("SIO_GET_EXTENSION_FUNCTION_POINTER %s: stub\n", debugstr_guid(in_buff));
SetLastError( WSAEOPNOTSUPP );
SetLastError( WSAEINVAL );
return -1;
}
case WS_SIO_KEEPALIVE_VALS:

View File

@ -4258,7 +4258,7 @@ static void test_get_extension_func(void)
ret = WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, &bogus_guid, sizeof(GUID),
&func, sizeof(func), &size, &overlapped, NULL);
ok(ret == -1, "expected failure\n");
todo_wine ok(WSAGetLastError() == WSAEINVAL, "got error %u\n", WSAGetLastError());
ok(WSAGetLastError() == WSAEINVAL, "got error %u\n", WSAGetLastError());
ok(size == 0xdeadbeef, "got size %u\n", size);
ok(overlapped.Internal == 0xdeadbeef, "got status %#x\n", (NTSTATUS)overlapped.Internal);
ok(overlapped.InternalHigh == 0xdeadbeef, "got size %Iu\n", overlapped.InternalHigh);