mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 14:32:56 +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
|
EXPORT
|
||||||
WSAGetLastError(VOID)
|
WSAGetLastError(VOID)
|
||||||
{
|
{
|
||||||
PWINSOCK_THREAD_BLOCK p = NtCurrentTeb()->WinSockData;
|
return GetLastError();
|
||||||
|
|
||||||
if (p)
|
|
||||||
{
|
|
||||||
return p->LastErrorValue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* FIXME: What error code should we use here? Can this even happen? */
|
|
||||||
return ERROR_BAD_ENVIRONMENT;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,10 +50,7 @@ VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
WSASetLastError(IN INT iError)
|
WSASetLastError(IN INT iError)
|
||||||
{
|
{
|
||||||
PWINSOCK_THREAD_BLOCK p = NtCurrentTeb()->WinSockData;
|
SetLastError(iError);
|
||||||
|
|
||||||
if (p)
|
|
||||||
p->LastErrorValue = iError;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue