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
6d68a03d
Commit
6d68a03d
authored
Jun 27, 2005
by
Eric Pouech
Committed by
Alexandre Julliard
Jun 27, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented OpenProcess on top of NtOpenProcess.
parent
06ce8920
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
10 deletions
+44
-10
process.c
dlls/kernel/process.c
+20
-8
ntdll.spec
dlls/ntdll/ntdll.spec
+2
-2
process.c
dlls/ntdll/process.c
+21
-0
winternl.h
include/winternl.h
+1
-0
No files found.
dlls/kernel/process.c
View file @
6d68a03d
...
...
@@ -2468,16 +2468,28 @@ void WINAPI ExitProcess16( WORD status )
*/
HANDLE
WINAPI
OpenProcess
(
DWORD
access
,
BOOL
inherit
,
DWORD
id
)
{
HANDLE
ret
=
0
;
SERVER_START_REQ
(
open_process
)
NTSTATUS
status
;
HANDLE
handle
;
OBJECT_ATTRIBUTES
attr
;
CLIENT_ID
cid
;
cid
.
UniqueProcess
=
(
HANDLE
)
id
;
cid
.
UniqueThread
=
0
;
/* FIXME ? */
attr
.
Length
=
sizeof
(
OBJECT_ATTRIBUTES
);
attr
.
RootDirectory
=
NULL
;
attr
.
Attributes
=
inherit
?
OBJ_INHERIT
:
0
;
attr
.
SecurityDescriptor
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
attr
.
ObjectName
=
NULL
;
status
=
NtOpenProcess
(
&
handle
,
access
,
&
attr
,
&
cid
);
if
(
status
!=
STATUS_SUCCESS
)
{
req
->
pid
=
id
;
req
->
access
=
access
;
req
->
inherit
=
inherit
;
if
(
!
wine_server_call_err
(
req
))
ret
=
reply
->
handle
;
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
NULL
;
}
SERVER_END_REQ
;
return
ret
;
return
handle
;
}
...
...
dlls/ntdll/ntdll.spec
View file @
6d68a03d
...
...
@@ -149,7 +149,7 @@
@ stdcall NtOpenKey(ptr long ptr)
@ stdcall NtOpenMutant(ptr long ptr)
@ stub NtOpenObjectAuditAlarm
@ st
ub NtOpenProcess
@ st
dcall NtOpenProcess(ptr long ptr ptr)
@ stdcall NtOpenProcessToken(long long long)
@ stdcall NtOpenSection(ptr long ptr)
@ stdcall NtOpenSemaphore(long long ptr)
...
...
@@ -769,7 +769,7 @@
@ stdcall ZwOpenKey(ptr long ptr) NtOpenKey
@ stdcall ZwOpenMutant(ptr long ptr) NtOpenMutant
@ stub ZwOpenObjectAuditAlarm
@ st
ub Zw
OpenProcess
@ st
dcall ZwOpenProcess(ptr long ptr ptr) Nt
OpenProcess
@ stdcall ZwOpenProcessToken(long long long) NtOpenProcessToken
@ stdcall ZwOpenSection(ptr long ptr) NtOpenSection
@ stdcall ZwOpenSemaphore(long long ptr) NtOpenSemaphore
...
...
dlls/ntdll/process.c
View file @
6d68a03d
...
...
@@ -281,3 +281,24 @@ NTSTATUS WINAPI NtFlushInstructionCache(
#endif
return
STATUS_SUCCESS
;
}
/******************************************************************
* NtOpenProcess [NTDLL.@]
* ZwOpenProcess [NTDLL.@]
*/
NTSTATUS
WINAPI
NtOpenProcess
(
PHANDLE
handle
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
,
const
CLIENT_ID
*
cid
)
{
NTSTATUS
status
;
SERVER_START_REQ
(
open_process
)
{
req
->
pid
=
(
DWORD
)
cid
->
UniqueProcess
;
req
->
access
=
access
;
req
->
inherit
=
attr
&&
(
attr
->
Attributes
&
OBJ_INHERIT
);
status
=
wine_server_call
(
req
);
if
(
!
status
)
*
handle
=
reply
->
handle
;
}
SERVER_END_REQ
;
return
status
;
}
include/winternl.h
View file @
6d68a03d
...
...
@@ -1695,6 +1695,7 @@ NTSTATUS WINAPI NtOpenFile(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PIO_STATUS_BL
NTSTATUS
WINAPI
NtOpenIoCompletion
(
PHANDLE
,
ACCESS_MASK
,
POBJECT_ATTRIBUTES
);
NTSTATUS
WINAPI
NtOpenKey
(
PHANDLE
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
);
NTSTATUS
WINAPI
NtOpenMutant
(
PHANDLE
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
);
NTSTATUS
WINAPI
NtOpenProcess
(
PHANDLE
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
,
const
CLIENT_ID
*
);
NTSTATUS
WINAPI
NtOpenProcessToken
(
HANDLE
,
DWORD
,
HANDLE
*
);
NTSTATUS
WINAPI
NtOpenSection
(
HANDLE
*
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
);
NTSTATUS
WINAPI
NtOpenSemaphore
(
PHANDLE
,
ACCESS_MASK
,
const
OBJECT_ATTRIBUTES
*
);
...
...
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