Author: pschweitzer
Date: Sun Feb 20 19:33:45 2011
New Revision: 50837
URL:
http://svn.reactos.org/svn/reactos?rev=50837&view=rev
Log:
[KERNEL32]
Properly implement GetLastError and export it.
Modified:
trunk/reactos/dll/win32/kernel32/include/kernel32.h
trunk/reactos/dll/win32/kernel32/kernel32.def
trunk/reactos/dll/win32/kernel32/kernel32.pspec
trunk/reactos/dll/win32/kernel32/misc/error.c
Modified: trunk/reactos/dll/win32/kernel32/include/kernel32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/include…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/include/kernel32.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/include/kernel32.h [iso-8859-1] Sun Feb 20 19:33:45
2011
@@ -68,7 +68,6 @@
#define STARTF_SHELLPRIVATE 0x400
#define SetLastErrorByStatus(x) RtlSetLastWin32ErrorAndNtStatusFromNtStatus((x))
-#define GetLastError() NtCurrentTeb()->LastErrorValue
typedef struct _CODEPAGE_ENTRY
{
Modified: trunk/reactos/dll/win32/kernel32/kernel32.def
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel3…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/kernel32.def [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/kernel32.def [iso-8859-1] Sun Feb 20 19:33:45 2011
@@ -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)
Modified: trunk/reactos/dll/win32/kernel32/kernel32.pspec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel3…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/kernel32.pspec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/kernel32.pspec [iso-8859-1] Sun Feb 20 19:33:45 2011
@@ -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)
Modified: trunk/reactos/dll/win32/kernel32/misc/error.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/er…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/error.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/error.c [iso-8859-1] Sun Feb 20 19:33:45 2011
@@ -16,6 +16,9 @@
/* FUNCTIONS ******************************************************************/
+/*
+ * @implemented
+ */
VOID
WINAPI
SetLastError(
@@ -34,6 +37,9 @@
NtCurrentTeb()->LastErrorValue = dwErrCode;
}
+/*
+ * @implemented
+ */
VOID
WINAPI
BaseSetLastNTError(
@@ -42,4 +48,14 @@
SetLastError(RtlNtStatusToDosError(Status));
}
+/*
+ * @implemented
+ */
+DWORD
+WINAPI
+GetLastError()
+{
+ return NtCurrentTeb()->LastErrorValue;
+}
+
/* EOF */