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
365bc308
Commit
365bc308
authored
May 03, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
May 03, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move normalize_std_handle call to NtUserMsgWaitForMultipleObjectsEx.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
69ab9568
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
22 deletions
+14
-22
driver.c
dlls/win32u/driver.c
+1
-21
message.c
dlls/win32u/message.c
+13
-1
No files found.
dlls/win32u/driver.c
View file @
365bc308
...
...
@@ -792,35 +792,15 @@ static inline LARGE_INTEGER *get_nt_timeout( LARGE_INTEGER *time, DWORD timeout
return
time
;
}
static
HANDLE
normalize_std_handle
(
HANDLE
handle
)
{
if
(
handle
==
(
HANDLE
)
STD_INPUT_HANDLE
)
return
NtCurrentTeb
()
->
Peb
->
ProcessParameters
->
hStdInput
;
if
(
handle
==
(
HANDLE
)
STD_OUTPUT_HANDLE
)
return
NtCurrentTeb
()
->
Peb
->
ProcessParameters
->
hStdOutput
;
if
(
handle
==
(
HANDLE
)
STD_ERROR_HANDLE
)
return
NtCurrentTeb
()
->
Peb
->
ProcessParameters
->
hStdError
;
return
handle
;
}
static
DWORD
nulldrv_MsgWaitForMultipleObjectsEx
(
DWORD
count
,
const
HANDLE
*
handles
,
DWORD
timeout
,
DWORD
mask
,
DWORD
flags
)
{
NTSTATUS
status
;
HANDLE
hloc
[
MAXIMUM_WAIT_OBJECTS
];
LARGE_INTEGER
time
;
unsigned
int
i
;
if
(
!
count
&&
!
timeout
)
return
WAIT_TIMEOUT
;
if
(
count
>
MAXIMUM_WAIT_OBJECTS
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
WAIT_FAILED
;
}
for
(
i
=
0
;
i
<
count
;
i
++
)
hloc
[
i
]
=
normalize_std_handle
(
handles
[
i
]
);
status
=
NtWaitForMultipleObjects
(
count
,
h
loc
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
status
=
NtWaitForMultipleObjects
(
count
,
h
andles
,
!
(
flags
&
MWMO_WAITALL
),
!!
(
flags
&
MWMO_ALERTABLE
),
get_nt_timeout
(
&
time
,
timeout
)
);
if
(
HIWORD
(
status
))
/* is it an error code? */
{
...
...
dlls/win32u/message.c
View file @
365bc308
...
...
@@ -1963,6 +1963,18 @@ static DWORD wait_objects( DWORD count, const HANDLE *handles, DWORD timeout,
return
ret
;
}
static
HANDLE
normalize_std_handle
(
HANDLE
handle
)
{
if
(
handle
==
(
HANDLE
)
STD_INPUT_HANDLE
)
return
NtCurrentTeb
()
->
Peb
->
ProcessParameters
->
hStdInput
;
if
(
handle
==
(
HANDLE
)
STD_OUTPUT_HANDLE
)
return
NtCurrentTeb
()
->
Peb
->
ProcessParameters
->
hStdOutput
;
if
(
handle
==
(
HANDLE
)
STD_ERROR_HANDLE
)
return
NtCurrentTeb
()
->
Peb
->
ProcessParameters
->
hStdError
;
return
handle
;
}
/***********************************************************************
* NtUserMsgWaitForMultipleObjectsEx (win32u.@)
*/
...
...
@@ -1979,7 +1991,7 @@ DWORD WINAPI NtUserMsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handl
}
/* add the queue to the handle list */
for
(
i
=
0
;
i
<
count
;
i
++
)
wait_handles
[
i
]
=
handles
[
i
]
;
for
(
i
=
0
;
i
<
count
;
i
++
)
wait_handles
[
i
]
=
normalize_std_handle
(
handles
[
i
]
)
;
wait_handles
[
count
]
=
get_server_queue_handle
();
return
wait_objects
(
count
+
1
,
wait_handles
,
timeout
,
...
...
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