[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).

svn path=/trunk/; revision=69144
This commit is contained in:
Stefan Ginsberg 2015-09-09 11:21:02 +00:00
parent c29c91001c
commit 8e45e7a979
10 changed files with 55 additions and 30 deletions

View file

@ -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)

View file

@ -12,6 +12,34 @@
#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
*/

View file

@ -675,25 +675,6 @@ GetFileBandwidthReservation(IN HANDLE hFile,
}
/*
* @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
*/

View file

@ -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)

View file

@ -549,7 +549,10 @@ NTSTATUS
NTAPI
NtSetSystemEnvironmentValueEx(
_In_ PUNICODE_STRING VariableName,
_In_ LPGUID VendorGuid
_In_ LPGUID VendorGuid,
_In_ PVOID Value,
_Inout_ PULONG ReturnLength,
_Inout_ PULONG Attributes
);
NTSYSCALLAPI

View file

@ -150,13 +150,23 @@ HalEnableSystemInterrupt(
_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

View file

@ -499,7 +499,10 @@ NtQuerySystemEnvironmentValueEx(IN PUNICODE_STRING VariableName,
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;

View file

@ -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)

View file

@ -573,7 +573,7 @@ SVC_(SetSystemCodeIntegrityRoots, 0) // FIXME
#endif
SVC_(SetSystemEnvironmentValue, 2)
#if (NTDDI_VERSION >= NTDDI_VISTA)
SVC_(SetSystemEnvironmentValueEx, 2)
SVC_(SetSystemEnvironmentValueEx, 5)
#endif
SVC_(SetSystemInformation, 3)
SVC_(SetSystemPowerState, 3)

View file

@ -246,7 +246,7 @@ NtSetLowWaitHighEventPair 1
NtSetQuotaInformationFile 4
NtSetSecurityObject 3
NtSetSystemEnvironmentValue 2
NtSetSystemEnvironmentValueEx 2
NtSetSystemEnvironmentValueEx 5
NtSetSystemInformation 3
NtSetSystemPowerState 3
NtSetSystemTime 2