Author: sginsberg Date: Wed Sep 9 11:21:02 2015 New Revision: 69144
URL: http://svn.reactos.org/svn/reactos?rev=69144&view=rev Log: [NTOS] Fix broken NtSetSystemEnvironmentValueEx stub which had the wrong amount of parameters. [NDK] Add define guard for HalEndSystemInterrupt because it is no longer compatible with Windows, and add back the old definition. Fix NtSetSystemEnvironmentValueEx prototype. [KERNEL32] Export SetFileCompletionNotificationModes (MSDN and headers documents it as Vista-only, but this is not entirely correct).
Modified: trunk/reactos/dll/ntdll/def/ntdll.spec trunk/reactos/dll/win32/kernel32/client/file/iocompl.c trunk/reactos/dll/win32/kernel32/client/vista.c trunk/reactos/dll/win32/kernel32/kernel32.spec trunk/reactos/include/ndk/exfuncs.h trunk/reactos/include/ndk/halfuncs.h trunk/reactos/ntoskrnl/ex/sysinfo.c trunk/reactos/ntoskrnl/include/sysfuncs.h trunk/reactos/ntoskrnl/include/sysfuncs64.h trunk/reactos/ntoskrnl/sysfuncs.lst
Modified: trunk/reactos/dll/ntdll/def/ntdll.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.spec?re... ============================================================================== --- trunk/reactos/dll/ntdll/def/ntdll.spec [iso-8859-1] (original) +++ trunk/reactos/dll/ntdll/def/ntdll.spec [iso-8859-1] Wed Sep 9 11:21:02 2015 @@ -373,13 +373,13 @@ @ stdcall NtSetInformationToken(long long ptr long) @ stdcall NtSetIntervalProfile(long long) @ stdcall NtSetIoCompletion(ptr long ptr long long) -@ stdcall NtSetLdtEntries(long double long double) ; CHECKME +@ stdcall NtSetLdtEntries(long int64 long int64) @ stdcall NtSetLowEventPair(ptr) @ stdcall NtSetLowWaitHighEventPair(ptr) @ stdcall NtSetQuotaInformationFile(ptr ptr ptr long) @ stdcall NtSetSecurityObject(long long ptr) @ stdcall NtSetSystemEnvironmentValue(ptr ptr) -@ stdcall NtSetSystemEnvironmentValueEx(ptr ptr) +@ stdcall NtSetSystemEnvironmentValueEx(ptr ptr ptr ptr ptr) @ stdcall NtSetSystemInformation(long ptr long) @ stdcall NtSetSystemPowerState(long long long) @ stdcall NtSetSystemTime(ptr ptr) @@ -1218,13 +1218,13 @@ @ stdcall ZwSetInformationToken(long long ptr long) @ stdcall ZwSetIntervalProfile(long long) @ stdcall ZwSetIoCompletion(ptr long ptr long long) -@ stdcall ZwSetLdtEntries(long double long double) ; CHECKME +@ stdcall ZwSetLdtEntries(long int64 long int64) @ stdcall ZwSetLowEventPair(ptr) @ stdcall ZwSetLowWaitHighEventPair(ptr) @ stdcall ZwSetQuotaInformationFile(ptr ptr ptr long) @ stdcall ZwSetSecurityObject(long long ptr) @ stdcall ZwSetSystemEnvironmentValue(ptr ptr) -@ stdcall ZwSetSystemEnvironmentValueEx(ptr ptr) +@ stdcall ZwSetSystemEnvironmentValueEx(ptr ptr ptr ptr ptr) NtSetSystemEnvironmentValueEx @ stdcall ZwSetSystemInformation(long ptr long) @ stdcall ZwSetSystemPowerState(long long long) @ stdcall ZwSetSystemTime(ptr ptr)
Modified: trunk/reactos/dll/win32/kernel32/client/file/iocompl.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/f... ============================================================================== --- trunk/reactos/dll/win32/kernel32/client/file/iocompl.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/file/iocompl.c [iso-8859-1] Wed Sep 9 11:21:02 2015 @@ -11,6 +11,34 @@ #include <k32.h> #define NDEBUG #include <debug.h> + +/* + * SetFileCompletionNotificationModes is not entirely Vista-exclusive, + * it was actually added to Windows 2003 in SP2. Headers restrict it from + * pre-Vista though so define the flags we need for it. + */ +#if (_WIN32_WINNT < 0x0600) +#define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1 +#define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2 +#endif + +/* + * @unimplemented + */ +BOOL +WINAPI +SetFileCompletionNotificationModes(IN HANDLE FileHandle, + IN UCHAR Flags) +{ + if (Flags & ~(FILE_SKIP_COMPLETION_PORT_ON_SUCCESS | FILE_SKIP_SET_EVENT_ON_HANDLE)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + UNIMPLEMENTED; + return FALSE; +}
/* * @implemented
Modified: trunk/reactos/dll/win32/kernel32/client/vista.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/v... ============================================================================== --- trunk/reactos/dll/win32/kernel32/client/vista.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/vista.c [iso-8859-1] Wed Sep 9 11:21:02 2015 @@ -678,25 +678,6 @@ /* * @unimplemented */ -BOOL -WINAPI -SetFileCompletionNotificationModes(IN HANDLE FileHandle, - IN UCHAR Flags) -{ - if (Flags & ~(FILE_SKIP_COMPLETION_PORT_ON_SUCCESS | FILE_SKIP_SET_EVENT_ON_HANDLE)) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - UNIMPLEMENTED; - return FALSE; -} - - -/* - * @unimplemented - */ HANDLE WINAPI OpenFileById(IN HANDLE hFile,
Modified: trunk/reactos/dll/win32/kernel32/kernel32.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel32... ============================================================================== --- trunk/reactos/dll/win32/kernel32/kernel32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/kernel32.spec [iso-8859-1] Wed Sep 9 11:21:02 2015 @@ -809,7 +809,7 @@ @ stdcall SetFileApisToOEM() @ stdcall SetFileAttributesA(str long) @ stdcall SetFileAttributesW(wstr long) -;@ stdcall -stub SetFileCompletionNotificationModes(ptr long); 2K3 SP2 has it! +@ stdcall SetFileCompletionNotificationModes(ptr long) @ stdcall SetFilePointer(long long ptr long) @ stdcall SetFilePointerEx(long double ptr long) @ stdcall SetFileShortNameA(long str)
Modified: trunk/reactos/include/ndk/exfuncs.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/exfuncs.h?rev=6... ============================================================================== --- trunk/reactos/include/ndk/exfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/exfuncs.h [iso-8859-1] Wed Sep 9 11:21:02 2015 @@ -549,7 +549,10 @@ NTAPI NtSetSystemEnvironmentValueEx( _In_ PUNICODE_STRING VariableName, - _In_ LPGUID VendorGuid + _In_ LPGUID VendorGuid, + _In_ PVOID Value, + _Inout_ PULONG ReturnLength, + _Inout_ PULONG Attributes );
NTSYSCALLAPI
Modified: trunk/reactos/include/ndk/halfuncs.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/halfuncs.h?rev=... ============================================================================== --- trunk/reactos/include/ndk/halfuncs.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/halfuncs.h [iso-8859-1] Wed Sep 9 11:21:02 2015 @@ -150,13 +150,23 @@ _In_ KINTERRUPT_MODE InterruptMode );
+#ifdef __REACTOS__ NTHALAPI VOID NTAPI HalEndSystemInterrupt( - KIRQL Irql, + _In_ KIRQL Irql, _In_ PKTRAP_FRAME TrapFrame ); +#else +NTHALAPI +VOID +NTAPI +HalEndSystemInterrupt( + _In_ KIRQL Irql, + _In_ UCHAR Vector +); +#endif
#ifdef _ARM_ // FIXME: ndk/arm? armddk.h? ULONG
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=6... ============================================================================== --- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Wed Sep 9 11:21:02 2015 @@ -499,7 +499,10 @@ NTSTATUS NTAPI NtSetSystemEnvironmentValueEx(IN PUNICODE_STRING VariableName, - IN LPGUID VendorGuid) + IN LPGUID VendorGuid + IN PVOID Value, + IN OUT PULONG ReturnLength, + IN OUT PULONG Attributes) { UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED;
Modified: trunk/reactos/ntoskrnl/include/sysfuncs.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/sysfuncs.h... ============================================================================== --- trunk/reactos/ntoskrnl/include/sysfuncs.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/sysfuncs.h [iso-8859-1] Wed Sep 9 11:21:02 2015 @@ -246,7 +246,7 @@ SVC_(SetQuotaInformationFile, 4) SVC_(SetSecurityObject, 3) SVC_(SetSystemEnvironmentValue, 2) - SVC_(SetSystemEnvironmentValueEx, 2) + SVC_(SetSystemEnvironmentValueEx, 5) SVC_(SetSystemInformation, 3) SVC_(SetSystemPowerState, 3) SVC_(SetSystemTime, 2)
Modified: trunk/reactos/ntoskrnl/include/sysfuncs64.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/sysfuncs64... ============================================================================== --- trunk/reactos/ntoskrnl/include/sysfuncs64.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/sysfuncs64.h [iso-8859-1] Wed Sep 9 11:21:02 2015 @@ -573,7 +573,7 @@ #endif SVC_(SetSystemEnvironmentValue, 2) #if (NTDDI_VERSION >= NTDDI_VISTA) -SVC_(SetSystemEnvironmentValueEx, 2) +SVC_(SetSystemEnvironmentValueEx, 5) #endif SVC_(SetSystemInformation, 3) SVC_(SetSystemPowerState, 3)
Modified: trunk/reactos/ntoskrnl/sysfuncs.lst URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/sysfuncs.lst?rev=6... ============================================================================== --- trunk/reactos/ntoskrnl/sysfuncs.lst [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/sysfuncs.lst [iso-8859-1] Wed Sep 9 11:21:02 2015 @@ -246,7 +246,7 @@ NtSetQuotaInformationFile 4 NtSetSecurityObject 3 NtSetSystemEnvironmentValue 2 -NtSetSystemEnvironmentValueEx 2 +NtSetSystemEnvironmentValueEx 5 NtSetSystemInformation 3 NtSetSystemPowerState 3 NtSetSystemTime 2