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
ac7b9d37
Commit
ac7b9d37
authored
Sep 16, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented NtDuplicateObject.
parent
a9c057f7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
36 deletions
+32
-36
ntdll.spec
dlls/ntdll/ntdll.spec
+2
-2
om.c
dlls/ntdll/om.c
+23
-13
winternl.h
include/winternl.h
+1
-0
handle.c
scheduler/handle.c
+6
-21
No files found.
dlls/ntdll/ntdll.spec
View file @
ac7b9d37
...
...
@@ -99,7 +99,7 @@
@ stdcall NtDeleteValueKey(long ptr) NtDeleteValueKey
@ stdcall NtDeviceIoControlFile(long long long long long long long long long long) NtDeviceIoControlFile
@ stdcall NtDisplayString(ptr)NtDisplayString
@ stdcall NtDuplicateObject(long long long
long
long long long) NtDuplicateObject
@ stdcall NtDuplicateObject(long long long
ptr
long long long) NtDuplicateObject
@ stdcall NtDuplicateToken(long long long long long long) NtDuplicateToken
@ stub NtEnumerateBus
@ stdcall NtEnumerateKey (long long long long long long) NtEnumerateKey
...
...
@@ -616,7 +616,7 @@
@ stdcall ZwDeleteValueKey(long ptr) NtDeleteValueKey
@ stdcall ZwDeviceIoControlFile(long long long long long long long long long long) NtDeviceIoControlFile
@ stub ZwDisplayString
@ stdcall ZwDuplicateObject(long long long
long
long long long) NtDuplicateObject
@ stdcall ZwDuplicateObject(long long long
ptr
long long long) NtDuplicateObject
@ stdcall ZwDuplicateToken(long long long long long long) NtDuplicateToken
@ stub ZwEnumerateBus
@ stdcall ZwEnumerateKey(long long long ptr long ptr) NtEnumerateKey
...
...
dlls/ntdll/om.c
View file @
ac7b9d37
...
...
@@ -213,24 +213,34 @@ NtQuerySecurityObject(
return
STATUS_SUCCESS
;
}
/******************************************************************************
* NtDuplicateObject [NTDLL.@]
* ZwDuplicateObject [NTDLL.@]
*/
NTSTATUS
WINAPI
NtDuplicateObject
(
IN
HANDLE
SourceProcessHandle
,
IN
PHANDLE
SourceHandle
,
IN
HANDLE
TargetProcessHandle
,
OUT
PHANDLE
TargetHandle
,
IN
ACCESS_MASK
DesiredAccess
,
IN
BOOLEAN
InheritHandle
,
ULONG
Options
)
NTSTATUS
WINAPI
NtDuplicateObject
(
HANDLE
source_process
,
HANDLE
source
,
HANDLE
dest_process
,
PHANDLE
dest
,
ACCESS_MASK
access
,
ULONG
attributes
,
ULONG
options
)
{
FIXME
(
"(0x%08x,%p,0x%08x,%p,0x%08lx,0x%08x,0x%08lx) stub!
\n
"
,
SourceProcessHandle
,
SourceHandle
,
TargetProcessHandle
,
TargetHandle
,
DesiredAccess
,
InheritHandle
,
Options
);
*
TargetHandle
=
0
;
return
0
;
NTSTATUS
ret
;
SERVER_START_REQ
(
dup_handle
)
{
req
->
src_process
=
source_process
;
req
->
src_handle
=
source
;
req
->
dst_process
=
dest_process
;
req
->
access
=
access
;
req
->
inherit
=
(
attributes
&
OBJ_INHERIT
)
!=
0
;
req
->
options
=
options
;
if
(
!
(
ret
=
wine_server_call
(
req
)))
{
if
(
dest
)
*
dest
=
reply
->
handle
;
if
(
reply
->
fd
!=
-
1
)
close
(
reply
->
fd
);
}
}
SERVER_END_REQ
;
return
ret
;
}
/**************************************************************************
...
...
include/winternl.h
View file @
ac7b9d37
...
...
@@ -762,6 +762,7 @@ NTSTATUS WINAPI NtCreateSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,
NTSTATUS
WINAPI
NtDeleteKey
(
HANDLE
);
NTSTATUS
WINAPI
NtDeleteValueKey
(
HANDLE
,
const
UNICODE_STRING
*
);
NTSTATUS
WINAPI
NtDeviceIoControlFile
(
HANDLE
,
HANDLE
,
PIO_APC_ROUTINE
,
PVOID
,
PIO_STATUS_BLOCK
,
ULONG
,
PVOID
,
ULONG
,
PVOID
,
ULONG
);
NTSTATUS
WINAPI
NtDuplicateObject
(
HANDLE
,
HANDLE
,
HANDLE
,
PHANDLE
,
ACCESS_MASK
,
ULONG
,
ULONG
);
NTSTATUS
WINAPI
NtEnumerateKey
(
HANDLE
,
ULONG
,
KEY_INFORMATION_CLASS
,
void
*
,
DWORD
,
DWORD
*
);
NTSTATUS
WINAPI
NtEnumerateValueKey
(
HANDLE
,
ULONG
,
KEY_VALUE_INFORMATION_CLASS
,
PVOID
,
ULONG
,
PULONG
);
NTSTATUS
WINAPI
NtFlushKey
(
HANDLE
);
...
...
scheduler/handle.c
View file @
ac7b9d37
...
...
@@ -98,28 +98,13 @@ BOOL WINAPI SetHandleInformation( HANDLE handle, DWORD mask, DWORD flags )
* DuplicateHandle (KERNEL32.@)
*/
BOOL
WINAPI
DuplicateHandle
(
HANDLE
source_process
,
HANDLE
source
,
HANDLE
dest_process
,
HANDLE
*
dest
,
DWORD
access
,
BOOL
inherit
,
DWORD
options
)
HANDLE
dest_process
,
HANDLE
*
dest
,
DWORD
access
,
BOOL
inherit
,
DWORD
options
)
{
BOOL
ret
;
SERVER_START_REQ
(
dup_handle
)
{
req
->
src_process
=
source_process
;
req
->
src_handle
=
source
;
req
->
dst_process
=
dest_process
;
req
->
access
=
access
;
req
->
inherit
=
inherit
;
req
->
options
=
options
;
ret
=
!
wine_server_call_err
(
req
);
if
(
ret
)
{
if
(
dest
)
*
dest
=
reply
->
handle
;
if
(
reply
->
fd
!=
-
1
)
close
(
reply
->
fd
);
}
}
SERVER_END_REQ
;
return
ret
;
NTSTATUS
status
=
NtDuplicateObject
(
source_process
,
source
,
dest_process
,
dest
,
access
,
inherit
?
OBJ_INHERIT
:
0
,
options
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
!
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