NTDLL: Add a stubbed NtSetSystemInformation

H. Verbeet hverbeet at gmail.com
Thu Jan 19 15:54:51 CST 2006


Apparently the BattleField 2 demo calls NtSetSystemInformation while
loading. Although documentation on the function seems to be pretty
much non-existent, adding a stub based on the prototype in
include/winternl.h seems to be enough to make the demo continue
loading for a while longer.

Changelog:
  - Add a stubbed NtSetSystemInformation.
-------------- next part --------------
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 5d40c4c..6b6cccf 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -904,6 +904,15 @@ NTSTATUS WINAPI NtQuerySystemInformation
     return ret;
 }
 
+/******************************************************************************
+ * NtSetSystemInformation [NTDLL.@]
+ * ZwSetSystemInformation [NTDLL.@]
+ */
+NTSTATUS WINAPI NtSetSystemInformation(SYSTEM_INFORMATION_CLASS SystemInformationClass, PVOID SystemInformation, ULONG Length)
+{
+    FIXME("(0x%08x,%p,0x%08lx) stub\n",SystemInformationClass,SystemInformation,Length);
+    return STATUS_SUCCESS;
+}
 
 /******************************************************************************
  *  NtCreatePagingFile		[NTDLL.@]
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 433ca6e..eb0ec0c 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -337,7 +337,7 @@
 @ stdcall NtSetSecurityObject(long long ptr)
 @ stub NtSetSystemEnvironmentValue
 # @ stub NtSetSystemEnvironmentValueEx
-@ stub NtSetSystemInformation
+@ stdcall NtSetSystemInformation(long ptr long)
 @ stub NtSetSystemPowerState
 @ stdcall NtSetSystemTime(ptr ptr)
 # @ stub NtSetThreadExecutionState
@@ -1179,7 +1179,7 @@
 @ stdcall ZwSetSecurityObject(long long ptr) NtSetSecurityObject
 @ stub ZwSetSystemEnvironmentValue
 # @ stub ZwSetSystemEnvironmentValueEx
-@ stub ZwSetSystemInformation
+@ stdcall ZwSetSystemInformation(long ptr long) NtSetSystemInformation
 @ stub ZwSetSystemPowerState
 @ stdcall ZwSetSystemTime(ptr ptr) NtSetSystemTime
 # @ stub ZwSetThreadExecutionState



More information about the wine-patches mailing list