Commit 88b20b2d authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

ntoskrnl.exe: Implement NtBuildNumber.

parent 4505ef6c
......@@ -60,6 +60,7 @@ WINE_DECLARE_DEBUG_CHANNEL(plugplay);
BOOLEAN KdDebuggerEnabled = FALSE;
ULONG InitSafeBootMode = 0;
USHORT NtBuildNumber = 0;
extern LONG CALLBACK vectored_handler( EXCEPTION_POINTERS *ptrs );
......@@ -2952,6 +2953,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
handler = RtlAddVectoredExceptionHandler( TRUE, vectored_handler );
#endif
KeQueryTickCount( &count ); /* initialize the global KeTickCount */
NtBuildNumber = NtCurrentTeb()->Peb->OSBuildNumber;
break;
case DLL_PROCESS_DETACH:
if (reserved) break;
......
......@@ -751,7 +751,7 @@
@ stdcall NtAllocateLocallyUniqueId(ptr)
@ stdcall NtAllocateUuids(ptr ptr ptr ptr)
@ stdcall NtAllocateVirtualMemory(long ptr long ptr long long)
@ stub NtBuildNumber
@ extern NtBuildNumber
@ stdcall NtClose(long)
@ stdcall NtConnectPort(ptr ptr ptr ptr ptr ptr ptr ptr)
@ stdcall NtCreateEvent(ptr long ptr long long)
......
......@@ -624,6 +624,18 @@ static void test_lookaside_list(void)
ExDeleteNPagedLookasideList(&list);
}
static void test_version(void)
{
USHORT *pNtBuildNumber;
ULONG build;
pNtBuildNumber = get_proc_address("NtBuildNumber");
ok(!!pNtBuildNumber, "Could not get pointer to NtBuildNumber\n");
PsGetVersion(NULL, NULL, &build, NULL);
ok(*pNtBuildNumber == build, "Expected build number %u, got %u\n", build, *pNtBuildNumber);
}
static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *stack, ULONG_PTR *info)
{
ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength;
......@@ -654,6 +666,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
test_init_funcs();
test_load_driver();
test_sync();
test_version();
test_stack_callout();
test_lookaside_list();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment