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
85a3d093
Commit
85a3d093
authored
Mar 20, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement GetProcessIdOfThread().
parent
b861aed2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
4 deletions
+33
-4
api-ms-win-core-processthreads-l1-1-0.spec
...threads-l1-1-0/api-ms-win-core-processthreads-l1-1-0.spec
+1
-1
api-ms-win-core-processthreads-l1-1-1.spec
...threads-l1-1-1/api-ms-win-core-processthreads-l1-1-1.spec
+1
-1
api-ms-win-core-processthreads-l1-1-2.spec
...threads-l1-1-2/api-ms-win-core-processthreads-l1-1-2.spec
+1
-1
kernel32.spec
dlls/kernel32/kernel32.spec
+1
-1
thread.c
dlls/kernel32/thread.c
+29
-0
No files found.
dlls/api-ms-win-core-processthreads-l1-1-0/api-ms-win-core-processthreads-l1-1-0.spec
View file @
85a3d093
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
@ stdcall GetExitCodeThread(long ptr) kernel32.GetExitCodeThread
@ stdcall GetExitCodeThread(long ptr) kernel32.GetExitCodeThread
@ stdcall GetPriorityClass(long) kernel32.GetPriorityClass
@ stdcall GetPriorityClass(long) kernel32.GetPriorityClass
@ stdcall GetProcessId(long) kernel32.GetProcessId
@ stdcall GetProcessId(long) kernel32.GetProcessId
@ st
ub
GetProcessIdOfThread
@ st
dcall GetProcessIdOfThread(long) kernel32.
GetProcessIdOfThread
@ stdcall GetProcessTimes(long ptr ptr ptr ptr) kernel32.GetProcessTimes
@ stdcall GetProcessTimes(long ptr ptr ptr ptr) kernel32.GetProcessTimes
@ stdcall GetProcessVersion(long) kernel32.GetProcessVersion
@ stdcall GetProcessVersion(long) kernel32.GetProcessVersion
@ stdcall GetStartupInfoW(ptr) kernel32.GetStartupInfoW
@ stdcall GetStartupInfoW(ptr) kernel32.GetStartupInfoW
...
...
dlls/api-ms-win-core-processthreads-l1-1-1/api-ms-win-core-processthreads-l1-1-1.spec
View file @
85a3d093
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
@ stdcall GetPriorityClass(long) kernel32.GetPriorityClass
@ stdcall GetPriorityClass(long) kernel32.GetPriorityClass
@ stdcall GetProcessHandleCount(long ptr) kernel32.GetProcessHandleCount
@ stdcall GetProcessHandleCount(long ptr) kernel32.GetProcessHandleCount
@ stdcall GetProcessId(long) kernel32.GetProcessId
@ stdcall GetProcessId(long) kernel32.GetProcessId
@ st
ub
GetProcessIdOfThread
@ st
dcall GetProcessIdOfThread(long) kernel32.
GetProcessIdOfThread
@ stub GetProcessMitigationPolicy
@ stub GetProcessMitigationPolicy
@ stdcall GetProcessTimes(long ptr ptr ptr ptr) kernel32.GetProcessTimes
@ stdcall GetProcessTimes(long ptr ptr ptr ptr) kernel32.GetProcessTimes
@ stdcall GetProcessVersion(long) kernel32.GetProcessVersion
@ stdcall GetProcessVersion(long) kernel32.GetProcessVersion
...
...
dlls/api-ms-win-core-processthreads-l1-1-2/api-ms-win-core-processthreads-l1-1-2.spec
View file @
85a3d093
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
@ stdcall GetPriorityClass(long) kernel32.GetPriorityClass
@ stdcall GetPriorityClass(long) kernel32.GetPriorityClass
@ stdcall GetProcessHandleCount(long ptr) kernel32.GetProcessHandleCount
@ stdcall GetProcessHandleCount(long ptr) kernel32.GetProcessHandleCount
@ stdcall GetProcessId(long) kernel32.GetProcessId
@ stdcall GetProcessId(long) kernel32.GetProcessId
@ st
ub
GetProcessIdOfThread
@ st
dcall GetProcessIdOfThread(long) kernel32.
GetProcessIdOfThread
@ stub GetProcessMitigationPolicy
@ stub GetProcessMitigationPolicy
@ stdcall GetProcessPriorityBoost(long ptr) kernel32.GetProcessPriorityBoost
@ stdcall GetProcessPriorityBoost(long ptr) kernel32.GetProcessPriorityBoost
@ stdcall GetProcessTimes(long ptr ptr ptr ptr) kernel32.GetProcessTimes
@ stdcall GetProcessTimes(long ptr ptr ptr ptr) kernel32.GetProcessTimes
...
...
dlls/kernel32/kernel32.spec
View file @
85a3d093
...
@@ -780,7 +780,7 @@
...
@@ -780,7 +780,7 @@
@ stdcall -norelay GetProcessHeap()
@ stdcall -norelay GetProcessHeap()
@ stdcall GetProcessHeaps(long ptr)
@ stdcall GetProcessHeaps(long ptr)
@ stdcall GetProcessId(long)
@ stdcall GetProcessId(long)
# @ stub GetProcessIdOfThread
@ stdcall GetProcessIdOfThread(long)
@ stdcall GetProcessIoCounters(long ptr)
@ stdcall GetProcessIoCounters(long ptr)
# @ stub GetProcessPreferredUILanguages
# @ stub GetProcessPreferredUILanguages
@ stdcall GetProcessPriorityBoost(long ptr)
@ stdcall GetProcessPriorityBoost(long ptr)
...
...
dlls/kernel32/thread.c
View file @
85a3d093
...
@@ -557,6 +557,35 @@ DWORD WINAPI GetThreadId(HANDLE Thread)
...
@@ -557,6 +557,35 @@ DWORD WINAPI GetThreadId(HANDLE Thread)
return
HandleToULong
(
tbi
.
ClientId
.
UniqueThread
);
return
HandleToULong
(
tbi
.
ClientId
.
UniqueThread
);
}
}
/**********************************************************************
* GetProcessIdOfThread [KERNEL32.@]
*
* Retrieve process identifier given thread belongs to.
*
* PARAMS
* Thread [I] The thread identifier.
*
* RETURNS
* Success: Process identifier
* Failure: 0
*/
DWORD
WINAPI
GetProcessIdOfThread
(
HANDLE
Thread
)
{
THREAD_BASIC_INFORMATION
tbi
;
NTSTATUS
status
;
TRACE
(
"(%p)
\n
"
,
Thread
);
status
=
NtQueryInformationThread
(
Thread
,
ThreadBasicInformation
,
&
tbi
,
sizeof
(
tbi
),
NULL
);
if
(
status
)
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
0
;
}
return
HandleToULong
(
tbi
.
ClientId
.
UniqueProcess
);
}
/***********************************************************************
/***********************************************************************
* GetCurrentThread [KERNEL32.@] Gets pseudohandle for current thread
* GetCurrentThread [KERNEL32.@] Gets pseudohandle for current thread
...
...
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