Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
915ac1c1
Commit
915ac1c1
authored
Jun 07, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use a critical section in RegisterUserApiHook.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
2a3b4c9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
hook.c
dlls/user32/hook.c
+12
-2
No files found.
dlls/user32/hook.c
View file @
915ac1c1
...
...
@@ -100,6 +100,16 @@ struct hook_info
WCHAR
module
[
MAX_PATH
];
};
static
CRITICAL_SECTION
api_hook_cs
;
static
CRITICAL_SECTION_DEBUG
critsect_debug
=
{
0
,
0
,
&
api_hook_cs
,
{
&
critsect_debug
.
ProcessLocksList
,
&
critsect_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": api_hook_cs"
)
}
};
static
CRITICAL_SECTION
api_hook_cs
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
#define WH_WINEVENT (WH_MAXHOOK+1)
static
const
char
*
const
hook_names
[
WH_WINEVENT
-
WH_MINHOOK
+
1
]
=
...
...
@@ -487,12 +497,12 @@ BOOL WINAPI RegisterUserApiHook(const struct user_api_hook *new_hook, struct use
if
(
!
new_hook
)
return
FALSE
;
USER_Lock
(
);
EnterCriticalSection
(
&
api_hook_cs
);
hooked_user_api
=
*
new_hook
;
user_api
=
&
hooked_user_api
;
if
(
old_hook
)
*
old_hook
=
original_user_api
;
USER_Unlock
(
);
LeaveCriticalSection
(
&
api_hook_cs
);
return
TRUE
;
}
...
...
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