RtlGetNtVersionNumbers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Here is a full implementation of RtlGetNtVersionNumbers, except I'm not 
exactly sure why I have to bitwise-OR the buildnumber with 0xF0000000. The 
native implementation just uses compiled-in constants, so it wasn't very 
helpful in that regard.

Windows XP's native msvcrt.dll works fine with this patch applied.

-Ryan

? controls/Makefile
? debugger/winedbg.spec.c
? dlls/msacm/msg711/msg711.drv.spec.c
? files/Makefile
? graphics/Makefile
? graphics/x11drv/Makefile
? if1632/Makefile
? if1632/relay16.s
? libtest/Makefile
? loader/Makefile
? loader/ne/Makefile
? memory/Makefile
? misc/Makefile
? msdos/Makefile
? programs/wineconsole/wineconsole.spec.c
? relay32/Makefile
? scheduler/Makefile
? tools/winelauncher
? win32/Makefile
? windows/Makefile
? windows/x11drv/Makefile
? windows/x11drv/wineclipsrv
Index: dlls/ntdll/ntdll.spec
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/ntdll.spec,v
retrieving revision 1.69
diff -u -r1.69 ntdll.spec
--- dlls/ntdll/ntdll.spec	21 Jun 2002 19:15:48 -0000	1.69
+++ dlls/ntdll/ntdll.spec	15 Jul 2002 20:11:00 -0000
@@ -385,7 +385,7 @@
 @ stdcall RtlFreeUnicodeString(ptr) RtlFreeUnicodeString
 @ stub RtlGenerate8dot3Name
 @ stdcall RtlGetAce(ptr long ptr) RtlGetAce
-@ stub RtlGetNtVersionNumbers
+@ stdcall RtlGetNtVersionNumbers(ptr ptr ptr) RtlGetNtVersionNumbers
 @ stub RtlGetVersion
 @ stub RtlGetCallersAddress
 @ stub RtlGetCompressionWorkSpaceSize
Index: dlls/ntdll/rtl.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/rtl.c,v
retrieving revision 1.45
diff -u -r1.45 rtl.c
--- dlls/ntdll/rtl.c	31 May 2002 23:25:49 -0000	1.45
+++ dlls/ntdll/rtl.c	15 Jul 2002 20:11:00 -0000
@@ -492,3 +492,31 @@
 {
 	FIXME("(%p,%p,0x%08lx,0x%08lx),stub\n",x1,x2,x3,x4);
 }
+
+/******************************************************************************
+ *  RtlGetNtVersionNumbers       [NTDLL.@]
+ *
+ * Introduced in Windows XP (NT5.1)
+ */
+void WINAPI RtlGetNtVersionNumbers(LPDWORD major, LPDWORD minor, LPDWORD build)
+{
+	OSVERSIONINFOEXW versionInfo;
+	versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
+	GetVersionExW((OSVERSIONINFOW*)&versionInfo);
+
+	if (major)
+	{
+		*major = versionInfo.dwMajorVersion;
+	}
+
+	if (minor)
+	{
+		*minor = versionInfo.dwMinorVersion;
+	}
+
+	if (build)
+	{
+		/* FIXME: Does anybody know the real formula? */
+		*build = (0xF0000000 | versionInfo.dwBuildNumber);
+	}
+}

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux