mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 18:15:58 +00:00
- 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
This commit is contained in:
parent
62d4dce686
commit
de538d3fb3
1 changed files with 2 additions and 15 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue