Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
e58073db
Commit
e58073db
authored
May 31, 2020
by
Paul Gofman
Committed by
Alexandre Julliard
Jun 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Implement PsGetProcessSectionBaseAddress() function.
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f3faf6b2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
1 deletion
+32
-1
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+30
-0
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+1
-1
ntddk.h
include/ddk/ntddk.h
+1
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
e58073db
...
...
@@ -4248,3 +4248,33 @@ void WINAPI KeSignalCallDpcDone(void *barrier)
{
InterlockedDecrement
((
LONG
*
)
barrier
);
}
void
*
WINAPI
PsGetProcessSectionBaseAddress
(
PEPROCESS
process
)
{
void
*
image_base
;
NTSTATUS
status
;
SIZE_T
size
;
HANDLE
h
;
TRACE
(
"process %p.
\n
"
,
process
);
if
((
status
=
ObOpenObjectByPointer
(
process
,
0
,
NULL
,
PROCESS_ALL_ACCESS
,
NULL
,
KernelMode
,
&
h
)))
{
WARN
(
"Error opening process object, status %#x.
\n
"
,
status
);
return
NULL
;
}
status
=
NtReadVirtualMemory
(
h
,
&
process
->
info
.
PebBaseAddress
->
ImageBaseAddress
,
&
image_base
,
sizeof
(
image_base
),
&
size
);
NtClose
(
h
);
if
(
status
||
size
!=
sizeof
(
image_base
))
{
WARN
(
"Error reading process memory, status %#x, size %lu.
\n
"
,
status
,
size
);
return
NULL
;
}
TRACE
(
"returning %p.
\n
"
,
image_base
);
return
image_base
;
}
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
e58073db
...
...
@@ -904,7 +904,7 @@
@ stub PsGetProcessJob
@ stub PsGetProcessPeb
@ stub PsGetProcessPriorityClass
@ st
ub PsGetProcessSectionBaseAddress
@ st
dcall PsGetProcessSectionBaseAddress(ptr)
@ stub PsGetProcessSecurityPort
@ stub PsGetProcessSessionId
@ stub PsGetProcessWin32Process
...
...
include/ddk/ntddk.h
View file @
e58073db
...
...
@@ -229,6 +229,7 @@ NTSTATUS WINAPI KeExpandKernelStackAndCallout(PEXPAND_STACK_CALLOUT,void*,SIZE_
void
WINAPI
KeSetTargetProcessorDpc
(
PRKDPC
,
CCHAR
);
BOOLEAN
WINAPI
MmIsAddressValid
(
void
*
);
HANDLE
WINAPI
PsGetProcessId
(
PEPROCESS
);
void
*
WINAPI
PsGetProcessSectionBaseAddress
(
PEPROCESS
);
HANDLE
WINAPI
PsGetThreadId
(
PETHREAD
);
HANDLE
WINAPI
PsGetThreadProcessId
(
PETHREAD
);
NTSTATUS
WINAPI
PsRemoveLoadImageNotifyRoutine
(
PLOAD_IMAGE_NOTIFY_ROUTINE
);
...
...
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