From: Dmitry Timoshkov dmitry@baikal.ru
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/ws2_32/protocol.c | 20 +++++++++++++++++++- dlls/ws2_32/tests/protocol.c | 2 -- 2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/dlls/ws2_32/protocol.c b/dlls/ws2_32/protocol.c index 2699593a2f3..c0add6b5dc4 100644 --- a/dlls/ws2_32/protocol.c +++ b/dlls/ws2_32/protocol.c @@ -2174,8 +2174,26 @@ int WINAPI WSAEnumNameSpaceProvidersW( DWORD *len, WSANAMESPACE_INFOW *buffer ) int WINAPI WSAProviderConfigChange( HANDLE *handle, OVERLAPPED *overlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE completion ) { + SOCKET s; + FIXME( "(%p %p %p) Stub!\n", handle, overlapped, completion ); - return -1; + + if (!handle) + { + SetLastError( WSAEFAULT ); + return SOCKET_ERROR; + } + + if (*handle != NULL) return 0; + + s = WSASocketW( AF_INET, SOCK_STREAM, 0, NULL, 0, WSA_FLAG_OVERLAPPED ); + if (s != INVALID_SOCKET) + { + *handle = (HANDLE)s; + return 0; + } + + return SOCKET_ERROR; }
diff --git a/dlls/ws2_32/tests/protocol.c b/dlls/ws2_32/tests/protocol.c index 12188646bf5..7e628ffc4dd 100644 --- a/dlls/ws2_32/tests/protocol.c +++ b/dlls/ws2_32/tests/protocol.c @@ -3150,10 +3150,8 @@ static void test_WSAProviderConfigChange(void) port2 = CreateIoCompletionPort((HANDLE)sock, port, 123, 0); ok(port2 == port, "got %p/%p\n", port, port2); ret = WSAProviderConfigChange(&change, NULL, NULL); - todo_wine ok(ret != SOCKET_ERROR, "WSAProviderConfigChange() error %u\n", WSAGetLastError()); port2 = CreateIoCompletionPort(change, port, 456, 0); - todo_wine ok(port2 == port, "got %p/%p\n", port, port2); ret = WSAIoctl(sock, SIO_ADDRESS_LIST_CHANGE, NULL, 0, NULL, 0, &bytes, &ov, NULL); ok(ret, "WSAIoctl() error %u\n", WSAGetLastError());