[KERNEL32]

Properly implement GetLastError and export it.

svn path=/trunk/; revision=50837
This commit is contained in:
Pierre Schweitzer 2011-02-20 19:33:45 +00:00
parent 35587944a0
commit cbfa1e3dbb
4 changed files with 18 additions and 3 deletions

View file

@ -68,7 +68,6 @@
#define STARTF_SHELLPRIVATE 0x400
#define SetLastErrorByStatus(x) RtlSetLastWin32ErrorAndNtStatusFromNtStatus((x))
#define GetLastError() NtCurrentTeb()->LastErrorValue
typedef struct _CODEPAGE_ENTRY
{

View file

@ -539,7 +539,7 @@
@ stub GetSCallbackTemplate ; missing in XP SP3 and Win 7
@ stdcall GetLargePageMinimum()
@ stdcall GetLargestConsoleWindowSize(long)
@ stdcall GetLastError() ntdll.RtlGetLastWin32Error
@ stdcall GetLastError()
@ stdcall GetLinguistLangSize(ptr) ; missing in Win 7
@ stdcall GetLocalTime(ptr)
@ stdcall GetLocaleInfoA(long long ptr long)

View file

@ -539,7 +539,7 @@
@ stub GetSCallbackTemplate ; missing in XP SP3 and Win 7
@ stdcall GetLargePageMinimum()
@ stdcall GetLargestConsoleWindowSize(long)
@ stdcall GetLastError() ntdll.RtlGetLastWin32Error
@ stdcall GetLastError()
@ stdcall GetLinguistLangSize(ptr) ; missing in Win 7
@ stdcall GetLocalTime(ptr)
@ stdcall GetLocaleInfoA(long long ptr long)

View file

@ -16,6 +16,9 @@ DWORD g_dwLastErrorToBreakOn;
/* FUNCTIONS ******************************************************************/
/*
* @implemented
*/
VOID
WINAPI
SetLastError(
@ -34,6 +37,9 @@ SetLastError(
NtCurrentTeb()->LastErrorValue = dwErrCode;
}
/*
* @implemented
*/
VOID
WINAPI
BaseSetLastNTError(
@ -42,4 +48,14 @@ BaseSetLastNTError(
SetLastError(RtlNtStatusToDosError(Status));
}
/*
* @implemented
*/
DWORD
WINAPI
GetLastError()
{
return NtCurrentTeb()->LastErrorValue;
}
/* EOF */