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
ed04d36b
Commit
ed04d36b
authored
Jan 27, 2005
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 27, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more tests for old style hooks and winevent hooks, make them pass
under Wine.
parent
6b16f29f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
3 deletions
+20
-3
hook.c
dlls/user/hook.c
+7
-1
msg.c
dlls/user/tests/msg.c
+0
-0
hook.c
server/hook.c
+12
-2
trace.c
server/trace.c
+1
-0
No files found.
dlls/user/hook.c
View file @
ed04d36b
...
@@ -124,6 +124,12 @@ static HHOOK set_windows_hook( INT id, HOOKPROC proc, HINSTANCE inst, DWORD tid,
...
@@ -124,6 +124,12 @@ static HHOOK set_windows_hook( INT id, HOOKPROC proc, HINSTANCE inst, DWORD tid,
WCHAR
module
[
MAX_PATH
];
WCHAR
module
[
MAX_PATH
];
DWORD
len
;
DWORD
len
;
if
(
!
proc
)
{
SetLastError
(
ERROR_INVALID_FILTER_PROC
);
return
0
;
}
if
(
tid
)
/* thread-local hook */
if
(
tid
)
/* thread-local hook */
{
{
if
(
id
==
WH_JOURNALRECORD
||
if
(
id
==
WH_JOURNALRECORD
||
...
@@ -143,7 +149,7 @@ static HHOOK set_windows_hook( INT id, HOOKPROC proc, HINSTANCE inst, DWORD tid,
...
@@ -143,7 +149,7 @@ static HHOOK set_windows_hook( INT id, HOOKPROC proc, HINSTANCE inst, DWORD tid,
if
(
id
==
WH_KEYBOARD_LL
||
id
==
WH_MOUSE_LL
)
inst
=
0
;
if
(
id
==
WH_KEYBOARD_LL
||
id
==
WH_MOUSE_LL
)
inst
=
0
;
else
if
(
!
inst
||
!
(
len
=
GetModuleFileNameW
(
inst
,
module
,
MAX_PATH
))
||
len
>=
MAX_PATH
)
else
if
(
!
inst
||
!
(
len
=
GetModuleFileNameW
(
inst
,
module
,
MAX_PATH
))
||
len
>=
MAX_PATH
)
{
{
SetLastError
(
ERROR_
INVALID_PARAMETER
);
SetLastError
(
ERROR_
HOOK_NEEDS_HMOD
);
return
0
;
return
0
;
}
}
}
}
...
...
dlls/user/tests/msg.c
View file @
ed04d36b
This diff is collapsed.
Click to expand it.
server/hook.c
View file @
ed04d36b
...
@@ -320,7 +320,14 @@ DECL_HANDLER(remove_hook)
...
@@ -320,7 +320,14 @@ DECL_HANDLER(remove_hook)
{
{
struct
hook
*
hook
;
struct
hook
*
hook
;
if
(
req
->
handle
)
hook
=
get_user_object
(
req
->
handle
,
USER_HOOK
);
if
(
req
->
handle
)
{
if
(
!
(
hook
=
get_user_object
(
req
->
handle
,
USER_HOOK
)))
{
set_win32_error
(
ERROR_INVALID_HOOK_HANDLE
);
return
;
}
}
else
else
{
{
if
(
!
req
->
proc
||
req
->
id
<
WH_MINHOOK
||
req
->
id
>
WH_MAXHOOK
)
if
(
!
req
->
proc
||
req
->
id
<
WH_MINHOOK
||
req
->
id
>
WH_MAXHOOK
)
...
@@ -329,9 +336,12 @@ DECL_HANDLER(remove_hook)
...
@@ -329,9 +336,12 @@ DECL_HANDLER(remove_hook)
return
;
return
;
}
}
if
(
!
(
hook
=
find_hook
(
current
,
req
->
id
-
WH_MINHOOK
,
req
->
proc
)))
if
(
!
(
hook
=
find_hook
(
current
,
req
->
id
-
WH_MINHOOK
,
req
->
proc
)))
{
set_error
(
STATUS_INVALID_PARAMETER
);
set_error
(
STATUS_INVALID_PARAMETER
);
return
;
}
}
}
if
(
hook
)
remove_hook
(
hook
);
remove_hook
(
hook
);
}
}
...
...
server/trace.c
View file @
ed04d36b
...
@@ -3210,6 +3210,7 @@ static const char *get_status_name( unsigned int status )
...
@@ -3210,6 +3210,7 @@ static const char *get_status_name( unsigned int status )
NAME
(
TIMEOUT
),
NAME
(
TIMEOUT
),
NAME
(
USER_APC
),
NAME
(
USER_APC
),
NAME
(
WAS_LOCKED
),
NAME
(
WAS_LOCKED
),
NAME_WIN32
(
ERROR_INVALID_HOOK_HANDLE
),
NAME_WIN32
(
ERROR_INVALID_INDEX
),
NAME_WIN32
(
ERROR_INVALID_INDEX
),
NAME_WIN32
(
ERROR_NEGATIVE_SEEK
),
NAME_WIN32
(
ERROR_NEGATIVE_SEEK
),
NAME_WIN32
(
ERROR_SEEK
),
NAME_WIN32
(
ERROR_SEEK
),
...
...
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