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
7995d686
Commit
7995d686
authored
Jul 01, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Implement ProcessIdToSessionId().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
eb69da2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
process.c
dlls/kernelbase/process.c
+13
-4
No files found.
dlls/kernelbase/process.c
View file @
7995d686
...
...
@@ -1024,11 +1024,20 @@ HANDLE WINAPI DECLSPEC_HOTPATCH OpenProcess( DWORD access, BOOL inherit, DWORD i
/***********************************************************************
* ProcessIdToSessionId (kernelbase.@)
*/
BOOL
WINAPI
DECLSPEC_HOTPATCH
ProcessIdToSessionId
(
DWORD
p
rocid
,
DWORD
*
session
id
)
BOOL
WINAPI
DECLSPEC_HOTPATCH
ProcessIdToSessionId
(
DWORD
p
id
,
DWORD
*
id
)
{
if
(
procid
!=
GetCurrentProcessId
())
FIXME
(
"Unsupported for other process %x
\n
"
,
procid
);
*
sessionid
=
NtCurrentTeb
()
->
Peb
->
SessionId
;
return
TRUE
;
HANDLE
process
;
NTSTATUS
status
;
if
(
pid
==
GetCurrentProcessId
())
{
*
id
=
NtCurrentTeb
()
->
Peb
->
SessionId
;
return
TRUE
;
}
if
(
!
(
process
=
OpenProcess
(
PROCESS_QUERY_LIMITED_INFORMATION
,
FALSE
,
pid
)))
return
FALSE
;
status
=
NtQueryInformationProcess
(
process
,
ProcessSessionInformation
,
id
,
sizeof
(
*
id
),
NULL
);
CloseHandle
(
process
);
return
set_ntstatus
(
status
);
}
...
...
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