Index: reactos/dll/win32/msafd/misc/dllmain.c =================================================================== --- reactos/dll/win32/msafd/misc/dllmain.c (revision 72748) +++ reactos/dll/win32/msafd/misc/dllmain.c (working copy) @@ -890,6 +890,8 @@ if(!NT_SUCCESS(Status)) { + if (lpErrno) + *lpErrno = WSAEFAULT; ERR("NtCreateEvent failed, 0x%08x\n", Status); return SOCKET_ERROR; } @@ -2055,6 +2057,20 @@ case SIO_GET_EXTENSION_FUNCTION_POINTER: *lpErrno = WSAEINVAL; return SOCKET_ERROR; + case SIO_ADDRESS_LIST_QUERY: + if (cbOutBuffer < (sizeof(SOCKET_ADDRESS_LIST)+sizeof(Socket->WSLocalAddress)) || IS_INTRESOURCE(lpvOutBuffer)) + { + *lpErrno = WSAEINVAL; + return SOCKET_ERROR; + } + *lpcbBytesReturned = sizeof(SOCKET_ADDRESS_LIST)+sizeof(Socket->WSLocalAddress); + + ((SOCKET_ADDRESS_LIST*)lpvOutBuffer)->iAddressCount = 1; + ((SOCKET_ADDRESS_LIST*)lpvOutBuffer)->Address[0].iSockaddrLength = sizeof(Socket->WSLocalAddress); + ((SOCKET_ADDRESS_LIST*)lpvOutBuffer)->Address[0].lpSockaddr = &Socket->WSLocalAddress; + + *lpErrno = NO_ERROR; + return NO_ERROR; default: *lpErrno = Socket->HelperData->WSHIoctl(Socket->HelperContext, Handle, Index: modules/rostests/winetests/ws2_32/sock.c =================================================================== --- modules/rostests/winetests/ws2_32/sock.c (revision 72740) +++ modules/rostests/winetests/ws2_32/sock.c (working copy) @@ -9287,7 +9287,6 @@ CloseHandle(previous_port); } -#if CORE_12000_IS_FIXED /* CORE-12000 */ /* WSHIoctl is not supported by wshtcpip.dll and crashes. Test should be fixed also! */ static void test_address_list_query(void) { @@ -9351,7 +9350,6 @@ HeapFree(GetProcessHeap(), 0, address_list); closesocket(s); } -#endif /* CORE-12000 */ static DWORD WINAPI inet_ntoa_thread_proc(void *param) { @@ -9810,9 +9808,7 @@ test_WSAAsyncGetServByName(); test_completion_port(); -#if CORE_12000_IS_FIXED /* FIXME: CORE-12000 */ test_address_list_query(); -#endif /* this is an io heavy test, do it at the end so the kernel doesn't start dropping packets */ test_send();