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
eb1146a5
Commit
eb1146a5
authored
Apr 29, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Implement PsGetProcessId.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1c2d5172
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
11 deletions
+16
-11
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+10
-10
ntoskrnl_private.h
dlls/ntoskrnl.exe/ntoskrnl_private.h
+3
-1
driver.c
dlls/ntoskrnl.exe/tests/driver.c
+2
-0
ntddk.h
include/ddk/ntddk.h
+1
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
eb1146a5
...
...
@@ -2462,6 +2462,7 @@ static void *create_process_object( HANDLE handle )
process
->
header
.
Type
=
3
;
process
->
header
.
WaitListHead
.
Blink
=
INVALID_HANDLE_VALUE
;
/* mark as kernel object */
NtQueryInformationProcess
(
handle
,
ProcessBasicInformation
,
&
process
->
info
,
sizeof
(
process
->
info
),
NULL
);
return
process
;
}
...
...
@@ -2503,6 +2504,15 @@ NTSTATUS WINAPI PsLookupProcessByProcessId( HANDLE processid, PEPROCESS *process
return
status
;
}
/*********************************************************************
* PsGetProcessId (NTOSKRNL.@)
*/
HANDLE
WINAPI
PsGetProcessId
(
PEPROCESS
process
)
{
TRACE
(
"%p -> %lx
\n
"
,
process
,
process
->
info
.
UniqueProcessId
);
return
(
HANDLE
)
process
->
info
.
UniqueProcessId
;
}
static
void
*
create_thread_object
(
HANDLE
handle
)
{
...
...
@@ -4240,16 +4250,6 @@ void WINAPI ExfUnblockPushLock( EX_PUSH_LOCK *lock, PEX_PUSH_LOCK_WAIT_BLOCK blo
}
/*********************************************************************
* PsGetProcessId (NTOSKRNL.@)
*/
HANDLE
WINAPI
PsGetProcessId
(
PEPROCESS
process
)
{
FIXME
(
"stub: %p
\n
"
,
process
);
return
0
;
}
/*********************************************************************
* FsRtlRegisterFileSystemFilterCallbacks (NTOSKRNL.@)
*/
NTSTATUS
WINAPI
FsRtlRegisterFileSystemFilterCallbacks
(
DRIVER_OBJECT
*
object
,
PFS_FILTER_CALLBACKS
callbacks
)
...
...
dlls/ntoskrnl.exe/ntoskrnl_private.h
View file @
eb1146a5
...
...
@@ -28,8 +28,10 @@ struct _OBJECT_TYPE
void
(
*
release
)(
void
*
);
/* called when the last reference is released */
};
struct
_EPROCESS
{
struct
_EPROCESS
{
DISPATCHER_HEADER
header
;
PROCESS_BASIC_INFORMATION
info
;
};
struct
_KTHREAD
...
...
dlls/ntoskrnl.exe/tests/driver.c
View file @
eb1146a5
...
...
@@ -334,6 +334,8 @@ static void test_currentprocess(void)
ret
=
wait_single
(
current
,
0
);
ok
(
ret
==
STATUS_TIMEOUT
,
"got %#x
\n
"
,
ret
);
ok
(
PsGetProcessId
(
current
)
==
PsGetCurrentProcessId
(),
"process IDs don't match
\n
"
);
thread
=
PsGetCurrentThread
();
ret
=
wait_single
(
thread
,
0
);
ok
(
ret
==
STATUS_TIMEOUT
,
"got %#x
\n
"
,
ret
);
...
...
include/ddk/ntddk.h
View file @
eb1146a5
...
...
@@ -216,6 +216,7 @@ NTSTATUS WINAPI IoRegisterShutdownNotification(PDEVICE_OBJECT);
NTSTATUS
WINAPI
KeExpandKernelStackAndCallout
(
PEXPAND_STACK_CALLOUT
,
void
*
,
SIZE_T
);
void
WINAPI
KeSetTargetProcessorDpc
(
PRKDPC
,
CCHAR
);
BOOLEAN
WINAPI
MmIsAddressValid
(
void
*
);
HANDLE
WINAPI
PsGetProcessId
(
PEPROCESS
);
NTSTATUS
WINAPI
PsSetLoadImageNotifyRoutine
(
PLOAD_IMAGE_NOTIFY_ROUTINE
);
void
WINAPI
RtlInitializeGenericTableAvl
(
PRTL_AVL_TABLE
,
PRTL_AVL_COMPARE_ROUTINE
,
PRTL_AVL_ALLOCATE_ROUTINE
,
PRTL_AVL_FREE_ROUTINE
,
void
*
);
void
WINAPI
RtlInsertElementGenericTableAvl
(
PRTL_AVL_TABLE
,
void
*
,
ULONG
,
BOOL
*
);
...
...
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