Alexandre Julliard : ntdll: Forward RtlGetNativeSystemInformation() to NtWow64GetNativeSystemInformation() on 32-bit.

Alexandre Julliard julliard at winehq.org
Mon Jul 5 16:24:19 CDT 2021


Module: wine
Branch: master
Commit: 9a224788b7ed09a1e1936ed1d9e12e4d115e7e58
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9a224788b7ed09a1e1936ed1d9e12e4d115e7e58

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jul  5 12:13:30 2021 +0200

ntdll: Forward RtlGetNativeSystemInformation() to NtWow64GetNativeSystemInformation() on 32-bit.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/nt.c         | 28 ----------------------------
 dlls/ntdll/ntdll.spec   |  3 ++-
 dlls/ntdll/tests/info.c |  2 +-
 3 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 3d7063caa1d..b9f747570f4 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -35,15 +35,6 @@
 #include "ntdll_misc.h"
 #include "ddk/wdm.h"
 
-WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
-
-/*
- *	Token
- */
-
-/*
- *	Misc
- */
 
 /***********************************************************************
  * RtlIsProcessorFeaturePresent [NTDLL.@]
@@ -53,25 +44,6 @@ BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature )
     return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[feature];
 }
 
-/******************************************************************************
- * RtlGetNativeSystemInformation [NTDLL.@]
- */
-NTSTATUS WINAPI /* DECLSPEC_HOTPATCH */ RtlGetNativeSystemInformation(
-	IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
-	OUT PVOID SystemInformation,
-	IN ULONG Length,
-	OUT PULONG ResultLength)
-{
-    FIXME( "semi-stub, SystemInformationClass %#x, SystemInformation %p, Length %#x, ResultLength %p.\n",
-            SystemInformationClass, SystemInformation, Length, ResultLength );
-
-    /* RtlGetNativeSystemInformation function is the same as NtQuerySystemInformation on some Win7
-     * versions but there are differences for earlier and newer versions, at least:
-     *     - HighestUserAddress field for SystemBasicInformation;
-     *     - Some information classes are not supported by RtlGetNativeSystemInformation. */
-    return NtQuerySystemInformation( SystemInformationClass, SystemInformation, Length, ResultLength );
-}
-
 /******************************************************************************
  *        VerSetConditionMask   (NTDLL.@)
  */
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 85fa37fddb3..3924458f5f2 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -721,7 +721,8 @@
 # Yes, Microsoft really misspelled this one!
 # @ stub RtlGetLengthWithoutTrailingPathSeperators
 @ stdcall RtlGetLongestNtPathLength()
-@ stdcall RtlGetNativeSystemInformation(long ptr long ptr)
+@ stdcall -syscall -arch=win32 RtlGetNativeSystemInformation(long ptr long ptr) NtWow64GetNativeSystemInformation
+@ stdcall -syscall -arch=win64 RtlGetNativeSystemInformation(long ptr long ptr) NtQuerySystemInformation
 # @ stub RtlGetNextRange
 @ stdcall RtlGetNtGlobalFlags()
 @ stdcall RtlGetNtProductType(ptr)
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index df08ef19b5e..c873a224a7c 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -200,11 +200,11 @@ static void test_query_basic(void)
     ok( status == STATUS_INVALID_INFO_CLASS || broken(STATUS_NOT_IMPLEMENTED), /* vista */
         "got %08x\n", status);
     status = pRtlGetNativeSystemInformation( SystemNativeBasicInformation, &sbi3, sizeof(sbi3), &ReturnLength );
-    todo_wine
     ok( !status || status == STATUS_INFO_LENGTH_MISMATCH ||
         broken(status == STATUS_INVALID_INFO_CLASS) || broken(status == STATUS_NOT_IMPLEMENTED),
         "failed %x\n", status );
     if (!status || status == STATUS_INFO_LENGTH_MISMATCH)
+        todo_wine_if( is_wow64 )
         ok( !status == !is_wow64, "got wrong status %x wow64 %u\n", status, is_wow64 );
     if (!status)
     {




More information about the wine-cvs mailing list