[PATCH] ntdll: Match NtAllocateUuids signature to Windows 2000 instead of NT4

Alex Henrie alexhenrie24 at gmail.com
Sun Mar 11 22:09:48 CDT 2018


From: Louis Lenders <xerox.xerox2000x at gmail.com>

Signed-off-by: Louis Lenders <xerox.xerox2000x at gmail.com>
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
Fixes https://bugs.winehq.org/show_bug.cgi?id=35910

Patch from Wine Staging with minor modifications.

The switch from 3 arguments to 4 is publicly documented at
http://ultradefrag.sourceforge.net/doc/man/Windows%20NT(2000)%20Native%20API%20Reference.pdf#page=417

If we can only support one version of the function, it makes a lot more
sense to support the 2000+ version instead of the NT4 version.

 dlls/ntdll/ntdll.spec               | 4 ++--
 dlls/ntdll/om.c                     | 9 +++------
 dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
 include/winternl.h                  | 2 +-
 4 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 60711f8b46..81a8c95ce1 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -111,7 +111,7 @@
 @ stdcall NtAlertThread(long)
 @ stdcall NtAllocateLocallyUniqueId(ptr)
 # @ stub NtAllocateUserPhysicalPages
-@ stdcall NtAllocateUuids(ptr ptr ptr)
+@ stdcall NtAllocateUuids(ptr ptr ptr ptr)
 @ stdcall NtAllocateVirtualMemory(long ptr long ptr long long)
 @ stdcall NtAreMappedFilesTheSame(ptr ptr)
 @ stdcall NtAssignProcessToJobObject(long long)
@@ -1042,7 +1042,7 @@
 @ stdcall -private ZwAlertThread(long) NtAlertThread
 @ stdcall -private ZwAllocateLocallyUniqueId(ptr) NtAllocateLocallyUniqueId
 # @ stub ZwAllocateUserPhysicalPages
-@ stdcall -private ZwAllocateUuids(ptr ptr ptr) NtAllocateUuids
+@ stdcall -private ZwAllocateUuids(ptr ptr ptr ptr) NtAllocateUuids
 @ stdcall -private ZwAllocateVirtualMemory(long ptr long ptr long long) NtAllocateVirtualMemory
 @ stdcall -private ZwAreMappedFilesTheSame(ptr ptr) NtAreMappedFilesTheSame
 @ stdcall -private ZwAssignProcessToJobObject(long long) NtAssignProcessToJobObject
diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c
index 1279f2bb4c..febe5bd81d 100644
--- a/dlls/ntdll/om.c
+++ b/dlls/ntdll/om.c
@@ -688,13 +688,10 @@ NTSTATUS WINAPI NtQuerySymbolicLinkObject( HANDLE handle, PUNICODE_STRING target
 /******************************************************************************
  *  NtAllocateUuids   [NTDLL.@]
  */
-NTSTATUS WINAPI NtAllocateUuids(
-        PULARGE_INTEGER Time,
-        PULONG Range,
-        PULONG Sequence)
+NTSTATUS WINAPI NtAllocateUuids( ULARGE_INTEGER *time, ULONG *delta, ULONG *sequence, UCHAR *seed )
 {
-        FIXME("(%p,%p,%p), stub.\n", Time, Range, Sequence);
-	return 0;
+    FIXME("(%p,%p,%p,%p), stub.\n", time, delta, sequence, seed);
+    return STATUS_SUCCESS;
 }
 
 /**************************************************************************
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index ebf1705729..947d7156e5 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -740,7 +740,7 @@
 @ stdcall NtAddAtom(ptr long ptr)
 @ stdcall NtAdjustPrivilegesToken(long long ptr long ptr ptr)
 @ stdcall NtAllocateLocallyUniqueId(ptr)
-@ stdcall NtAllocateUuids(ptr ptr ptr)
+@ stdcall NtAllocateUuids(ptr ptr ptr ptr)
 @ stdcall NtAllocateVirtualMemory(long ptr long ptr long long)
 @ stub NtBuildNumber
 @ stdcall NtClose(long)
diff --git a/include/winternl.h b/include/winternl.h
index 1ffdfe90b1..7a301a19c2 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2281,7 +2281,7 @@ NTSYSAPI NTSTATUS  WINAPI NtAdjustPrivilegesToken(HANDLE,BOOLEAN,PTOKEN_PRIVILEG
 NTSYSAPI NTSTATUS  WINAPI NtAlertResumeThread(HANDLE,PULONG);
 NTSYSAPI NTSTATUS  WINAPI NtAlertThread(HANDLE ThreadHandle);
 NTSYSAPI NTSTATUS  WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid);
-NTSYSAPI NTSTATUS  WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG);
+NTSYSAPI NTSTATUS  WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG,PUCHAR);
 NTSYSAPI NTSTATUS  WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG,SIZE_T*,ULONG,ULONG);
 NTSYSAPI NTSTATUS  WINAPI NtAreMappedFilesTheSame(PVOID,PVOID);
 NTSYSAPI NTSTATUS  WINAPI NtAssignProcessToJobObject(HANDLE,HANDLE);
-- 
2.16.2




More information about the wine-devel mailing list