Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
88b20b2d
Commit
88b20b2d
authored
Feb 06, 2019
by
Michael Müller
Committed by
Alexandre Julliard
Feb 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Implement NtBuildNumber.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4505ef6c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+2
-0
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+1
-1
driver.c
dlls/ntoskrnl.exe/tests/driver.c
+13
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
88b20b2d
...
...
@@ -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
;
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
88b20b2d
...
...
@@ -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)
...
...
dlls/ntoskrnl.exe/tests/driver.c
View file @
88b20b2d
...
...
@@ -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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment