From: Vibhav Pant vibhavp@gmail.com
--- dlls/ws2_32/tests/protocol.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/dlls/ws2_32/tests/protocol.c b/dlls/ws2_32/tests/protocol.c index 09c56439ada..33427ac4014 100644 --- a/dlls/ws2_32/tests/protocol.c +++ b/dlls/ws2_32/tests/protocol.c @@ -423,8 +423,18 @@ static void test_WSALookupService(void) todo_wine ok(error == ERROR_INVALID_HANDLE, "expected 6, got %ld\n", error);
- /* standard network list query */ + ret = WSALookupServiceBeginW((WSAQUERYSETW *)0xdeadbeef, LUP_RETURN_ALL | LUP_DEEP, &handle); + error = WSAGetLastError(); + ok(ret == SOCKET_ERROR, "WSALookupServiceBeginW should have failed\n"); + todo_wine ok(error == WSAEFAULT, "expected 10014, got %ld\n", error); + qs->dwSize = sizeof(*qs); + ret = WSALookupServiceBeginW(qs, LUP_RETURN_ALL | LUP_DEEP, (HANDLE)(0xdeadbeef)); + error = WSAGetLastError(); + ok(ret == SOCKET_ERROR, "WSALookupServiceBeginW should have failed\n"); + todo_wine ok(error == WSAEFAULT, "expected 10014, got %ld\n", error); + + /* standard network list query */ handle = (HANDLE)0xdeadbeef; ret = WSALookupServiceBeginW(qs, LUP_RETURN_ALL | LUP_DEEP, &handle); error = WSAGetLastError(); @@ -434,10 +444,14 @@ static void test_WSALookupService(void) return; }
- todo_wine - ok(!ret, "WSALookupServiceBeginW failed unexpectedly with error %ld\n", error); - todo_wine - ok(handle != (HANDLE)0xdeadbeef, "Handle was not filled\n"); + todo_wine ok(!ret, "WSALookupServiceBeginW failed unexpectedly with error %ld\n", error); + todo_wine ok(handle != (HANDLE)0xdeadbeef, "Handle was not filled\n"); + + if (ret) + { + skip( "WSALookupServiceBeginW failed\n" ); + return; + }
offset = 0; do @@ -531,9 +545,6 @@ static void test_WSALookupService(void) } } while (1); - - ret = WSALookupServiceEnd(handle); - ok(!ret, "WSALookupServiceEnd failed unexpectedly\n"); }
#define WM_ASYNCCOMPLETE (WM_USER + 100)