Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
ac7b9d37
Commit
ac7b9d37
authored
22 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Implemented NtDuplicateObject.
parent
a9c057f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dlls/ntdll/ntdll.spec
+2
-2
2 additions, 2 deletions
dlls/ntdll/ntdll.spec
dlls/ntdll/om.c
+23
-13
23 additions, 13 deletions
dlls/ntdll/om.c
include/winternl.h
+1
-0
1 addition, 0 deletions
include/winternl.h
scheduler/handle.c
+6
-21
6 additions, 21 deletions
scheduler/handle.c
with
32 additions
and
36 deletions
dlls/ntdll/ntdll.spec
+
2
−
2
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
...
...
This diff is collapsed.
Click to expand it.
dlls/ntdll/om.c
+
23
−
13
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
;
}
/**************************************************************************
...
...
This diff is collapsed.
Click to expand it.
include/winternl.h
+
1
−
0
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
);
...
...
This diff is collapsed.
Click to expand it.
scheduler/handle.c
+
6
−
21
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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment