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
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
Yoann Laissus
wine
Commits
66ffa17b
Commit
66ffa17b
authored
23 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Don't use THREAD_IdToTEB in EnumThreadWindows.
parent
e21ead40
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
windows/win.c
+22
-10
22 additions, 10 deletions
windows/win.c
with
22 additions
and
10 deletions
windows/win.c
+
22
−
10
View file @
66ffa17b
...
...
@@ -21,7 +21,6 @@
#include
"message.h"
#include
"queue.h"
#include
"winpos.h"
#include
"thread.h"
#include
"winerror.h"
#include
"stackframe.h"
#include
"debugtools.h"
...
...
@@ -2882,10 +2881,11 @@ BOOL WINAPI EnumWindows( WNDENUMPROC lpEnumFunc, LPARAM lParam )
/**********************************************************************
* EnumTaskWindows (USER.225)
* WIN_EnumQueueWindows
*
* Helper for EnumTaskWindows16 and EnumThreadWindows.
*/
BOOL16
WINAPI
EnumTaskWindows16
(
HTASK16
hTask
,
WNDENUMPROC16
func
,
LPARAM
lParam
)
static
BOOL
WIN_EnumQueueWindows
(
HQUEUE16
queue
,
WNDENUMPROC
func
,
LPARAM
lParam
)
{
WND
**
list
,
**
ppWnd
;
...
...
@@ -2906,15 +2906,15 @@ BOOL16 WINAPI EnumTaskWindows16( HTASK16 hTask, WNDENUMPROC16 func,
int
iWndsLocks
=
0
;
/* Make sure that the window still exists */
if
(
!
IsWindow
((
*
ppWnd
)
->
hwndSelf
))
continue
;
if
(
QUEUE_GetQueueTask
((
*
ppWnd
)
->
hmemTaskQ
)
!=
hTask
)
continue
;
if
((
*
ppWnd
)
->
hmemTaskQ
!=
queue
)
continue
;
/* To avoid any deadlocks, all the locks on the windows
structures must be suspended before the control
is passed to the application */
iWndsLocks
=
WIN_SuspendWndsLock
();
funcRetval
=
func
(
(
*
ppWnd
)
->
hwndSelf
,
lParam
);
WIN_RestoreWndsLock
(
iWndsLocks
);
if
(
!
funcRetval
)
break
;
}
WIN_ReleaseWinArray
(
list
);
...
...
@@ -2923,14 +2923,26 @@ BOOL16 WINAPI EnumTaskWindows16( HTASK16 hTask, WNDENUMPROC16 func,
}
/**********************************************************************
* EnumTaskWindows16 (USER.225)
*/
BOOL16
WINAPI
EnumTaskWindows16
(
HTASK16
hTask
,
WNDENUMPROC16
func
,
LPARAM
lParam
)
{
HQUEUE16
queue
=
GetTaskQueue16
(
hTask
);
if
(
!
queue
)
return
FALSE
;
return
WIN_EnumQueueWindows
(
queue
,
(
WNDENUMPROC
)
func
,
lParam
);
}
/**********************************************************************
* EnumThreadWindows (USER32.@)
*/
BOOL
WINAPI
EnumThreadWindows
(
DWORD
id
,
WNDENUMPROC
func
,
LPARAM
lParam
)
{
TEB
*
teb
=
THREAD_IdToTEB
(
id
);
return
(
BOOL16
)
EnumTaskWindows16
(
teb
->
htask16
,
(
WNDENUMPROC16
)
func
,
lParam
);
HQUEUE16
queue
=
GetThreadQueue16
(
id
);
if
(
!
queue
)
return
FALSE
;
return
WIN_EnumQueueWindows
(
queue
,
func
,
lParam
);
}
...
...
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