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
3f40590e
Commit
3f40590e
authored
Sep 22, 2004
by
Alexander Yaworsky
Committed by
Alexandre Julliard
Sep 22, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved code from CreateThread to CreateRemoteThread.
parent
719a7897
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
26 deletions
+27
-26
thread.c
dlls/kernel/thread.c
+27
-26
No files found.
dlls/kernel/thread.c
View file @
3f40590e
...
...
@@ -121,6 +121,32 @@ HANDLE WINAPI CreateThread( SECURITY_ATTRIBUTES *sa, SIZE_T stack,
LPTHREAD_START_ROUTINE
start
,
LPVOID
param
,
DWORD
flags
,
LPDWORD
id
)
{
return
CreateRemoteThread
(
GetCurrentProcess
(),
sa
,
stack
,
start
,
param
,
flags
,
id
);
}
/***************************************************************************
* CreateRemoteThread (KERNEL32.@)
*
* Creates a thread that runs in the address space of another process
*
* PARAMS
*
* RETURNS
* Success: Handle to the new thread.
* Failure: NULL. Use GetLastError() to find the error cause.
*
* BUGS
* Improper memory allocation: there's no ability to free new_thread_info
* in other process.
* Bad start address for RtlCreateUserThread because the library
* may be loaded at different address in other process.
*/
HANDLE
WINAPI
CreateRemoteThread
(
HANDLE
hProcess
,
SECURITY_ATTRIBUTES
*
sa
,
SIZE_T
stack
,
LPTHREAD_START_ROUTINE
start
,
LPVOID
param
,
DWORD
flags
,
LPDWORD
id
)
{
HANDLE
handle
;
CLIENT_ID
client_id
;
NTSTATUS
status
;
...
...
@@ -138,7 +164,7 @@ HANDLE WINAPI CreateThread( SECURITY_ATTRIBUTES *sa, SIZE_T stack,
if
(
flags
&
STACK_SIZE_PARAM_IS_A_RESERVATION
)
stack_reserve
=
stack
;
else
stack_commit
=
stack
;
status
=
RtlCreateUserThread
(
GetCurrentProcess
()
,
NULL
,
(
flags
&
CREATE_SUSPENDED
)
!=
0
,
status
=
RtlCreateUserThread
(
hProcess
,
NULL
,
(
flags
&
CREATE_SUSPENDED
)
!=
0
,
NULL
,
stack_reserve
,
stack_commit
,
THREAD_Start
,
info
,
&
handle
,
&
client_id
);
if
(
status
==
STATUS_SUCCESS
)
...
...
@@ -157,31 +183,6 @@ HANDLE WINAPI CreateThread( SECURITY_ATTRIBUTES *sa, SIZE_T stack,
}
/***************************************************************************
* CreateRemoteThread (KERNEL32.@)
*
* Creates a thread that runs in the address space of another process
*
* PARAMS
*
* RETURNS
* Success: Handle to the new thread.
* Failure: NULL. Use GetLastError() to find the error cause.
*
* BUGS
* Unimplemented
*/
HANDLE
WINAPI
CreateRemoteThread
(
HANDLE
hProcess
,
SECURITY_ATTRIBUTES
*
sa
,
SIZE_T
stack
,
LPTHREAD_START_ROUTINE
start
,
LPVOID
param
,
DWORD
flags
,
LPDWORD
id
)
{
FIXME
(
"(): stub, Write Me.
\n
"
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
NULL
;
}
/***********************************************************************
* OpenThread [KERNEL32.@] Retrieves a handle to a thread from its thread id
*/
...
...
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