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
73cb7654
Commit
73cb7654
authored
Aug 23, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewrote Get/SetHandleInformation to call the corresponding ntdll
functions.
parent
b032243b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
19 deletions
+28
-19
process.c
dlls/kernel/process.c
+28
-19
No files found.
dlls/kernel/process.c
View file @
73cb7654
...
...
@@ -2489,18 +2489,17 @@ BOOL WINAPI CloseHandle( HANDLE handle )
*/
BOOL
WINAPI
GetHandleInformation
(
HANDLE
handle
,
LPDWORD
flags
)
{
BOOL
ret
;
SERVER_START_REQ
(
set_handle_info
)
OBJECT_DATA_INFORMATION
info
;
NTSTATUS
status
=
NtQueryObject
(
handle
,
ObjectDataInformation
,
&
info
,
sizeof
(
info
),
NULL
);
if
(
status
)
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
else
if
(
flags
)
{
req
->
handle
=
handle
;
req
->
flags
=
0
;
req
->
mask
=
0
;
req
->
fd
=
-
1
;
ret
=
!
wine_server_call_err
(
req
);
if
(
ret
&&
flags
)
*
flags
=
reply
->
old_flags
;
*
flags
=
0
;
if
(
info
.
InheritHandle
)
*
flags
|=
HANDLE_FLAG_INHERIT
;
if
(
info
.
ProtectFromClose
)
*
flags
|=
HANDLE_FLAG_PROTECT_FROM_CLOSE
;
}
SERVER_END_REQ
;
return
ret
;
return
!
status
;
}
...
...
@@ -2509,17 +2508,27 @@ BOOL WINAPI GetHandleInformation( HANDLE handle, LPDWORD flags )
*/
BOOL
WINAPI
SetHandleInformation
(
HANDLE
handle
,
DWORD
mask
,
DWORD
flags
)
{
BOOL
ret
;
SERVER_START_REQ
(
set_handle_info
)
OBJECT_DATA_INFORMATION
info
;
NTSTATUS
status
;
/* if not setting both fields, retrieve current value first */
if
((
mask
&
(
HANDLE_FLAG_INHERIT
|
HANDLE_FLAG_PROTECT_FROM_CLOSE
))
!=
(
HANDLE_FLAG_INHERIT
|
HANDLE_FLAG_PROTECT_FROM_CLOSE
))
{
req
->
handle
=
handle
;
req
->
flags
=
flags
;
req
->
mask
=
mask
;
req
->
fd
=
-
1
;
ret
=
!
wine_server_call_err
(
req
);
if
((
status
=
NtQueryObject
(
handle
,
ObjectDataInformation
,
&
info
,
sizeof
(
info
),
NULL
)))
{
SetLastError
(
RtlNtStatusToDosError
(
status
)
)
;
return
FALSE
;
}
}
SERVER_END_REQ
;
return
ret
;
if
(
mask
&
HANDLE_FLAG_INHERIT
)
info
.
InheritHandle
=
(
flags
&
HANDLE_FLAG_INHERIT
)
!=
0
;
if
(
mask
&
HANDLE_FLAG_PROTECT_FROM_CLOSE
)
info
.
ProtectFromClose
=
(
flags
&
HANDLE_FLAG_PROTECT_FROM_CLOSE
)
!=
0
;
status
=
NtSetInformationObject
(
handle
,
ObjectDataInformation
,
&
info
,
sizeof
(
info
)
);
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