From de538d3fb31c507380ccef19b554fb407819d125 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 15 Sep 2009 22:21:27 +0000 Subject: [PATCH] - Call SetLastError/GetLastError to do our work for WSASetLastError/WSAGetLastError - This will help find regressions before moving to ws2_32_new (ws2_32_new uses this method) svn path=/trunk/; revision=43058 --- reactos/dll/win32/ws2_32/misc/dllmain.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/reactos/dll/win32/ws2_32/misc/dllmain.c b/reactos/dll/win32/ws2_32/misc/dllmain.c index 6eb1f9f4431..78793cbd87c 100644 --- a/reactos/dll/win32/ws2_32/misc/dllmain.c +++ b/reactos/dll/win32/ws2_32/misc/dllmain.c @@ -39,17 +39,7 @@ INT EXPORT WSAGetLastError(VOID) { - PWINSOCK_THREAD_BLOCK p = NtCurrentTeb()->WinSockData; - - if (p) - { - return p->LastErrorValue; - } - else - { - /* FIXME: What error code should we use here? Can this even happen? */ - return ERROR_BAD_ENVIRONMENT; - } + return GetLastError(); } @@ -60,10 +50,7 @@ VOID EXPORT WSASetLastError(IN INT iError) { - PWINSOCK_THREAD_BLOCK p = NtCurrentTeb()->WinSockData; - - if (p) - p->LastErrorValue = iError; + SetLastError(iError); }