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
3031f157
Commit
3031f157
authored
Jan 22, 2024
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Add a typedef for user callback function pointers.
parent
c7c86242
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
31 additions
and
28 deletions
+31
-28
signal_arm.c
dlls/ntdll/signal_arm.c
+1
-1
signal_arm64.c
dlls/ntdll/signal_arm64.c
+1
-1
signal_arm64ec.c
dlls/ntdll/signal_arm64ec.c
+1
-1
signal_i386.c
dlls/ntdll/signal_i386.c
+1
-1
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+1
-1
exception.c
dlls/ntdll/tests/exception.c
+4
-4
wgl.c
dlls/opengl32/wgl.c
+1
-1
message.c
dlls/user.exe16/message.c
+1
-1
user_main.c
dlls/user32/user_main.c
+11
-8
dllmain.c
dlls/wineandroid.drv/dllmain.c
+1
-1
dllmain.c
dlls/winemac.drv/dllmain.c
+2
-3
loader.c
dlls/winevulkan/loader.c
+1
-1
dllmain.c
dlls/winex11.drv/dllmain.c
+2
-3
winternl.h
include/winternl.h
+3
-1
No files found.
dlls/ntdll/signal_arm.c
View file @
3031f157
...
...
@@ -581,7 +581,7 @@ void WINAPI dispatch_callback( void *args, ULONG len, ULONG id )
__TRY
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)
[
id
];
KERNEL_CALLBACK_PROC
func
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
[
id
];
status
=
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
));
}
__EXCEPT_ALL
...
...
dlls/ntdll/signal_arm64.c
View file @
3031f157
...
...
@@ -611,7 +611,7 @@ void WINAPI dispatch_callback( void *args, ULONG len, ULONG id )
__TRY
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)
[
id
];
KERNEL_CALLBACK_PROC
func
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
[
id
];
status
=
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
));
}
__EXCEPT_ALL
...
...
dlls/ntdll/signal_arm64ec.c
View file @
3031f157
...
...
@@ -1722,7 +1722,7 @@ void WINAPI dispatch_callback( void *args, ULONG len, ULONG id )
__TRY
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)
[
id
];
KERNEL_CALLBACK_PROC
func
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
[
id
];
status
=
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
));
}
__EXCEPT_ALL
...
...
dlls/ntdll/signal_i386.c
View file @
3031f157
...
...
@@ -298,7 +298,7 @@ void WINAPI KiUserCallbackDispatcher( ULONG id, void *args, ULONG len )
__TRY
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)
[
id
];
KERNEL_CALLBACK_PROC
func
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
[
id
];
status
=
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
));
}
__EXCEPT_ALL
...
...
dlls/ntdll/signal_x86_64.c
View file @
3031f157
...
...
@@ -697,7 +697,7 @@ void WINAPI dispatch_callback( void *args, ULONG len, ULONG id )
__TRY
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)
[
id
];
KERNEL_CALLBACK_PROC
func
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
[
id
];
status
=
NtCallbackReturn
(
NULL
,
0
,
func
(
args
,
len
));
}
__EXCEPT_ALL
...
...
dlls/ntdll/tests/exception.c
View file @
3031f157
...
...
@@ -2176,7 +2176,7 @@ static void test_KiUserApcDispatcher(void)
static
void
CDECL
hook_KiUserCallbackDispatcher
(
void
*
eip
,
ULONG
id
,
ULONG
*
args
,
ULONG
len
,
ULONG
unk1
,
ULONG
unk2
,
ULONG
arg0
,
ULONG
arg1
)
{
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)
[
id
];
KERNEL_CALLBACK_PROC
func
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
[
id
];
trace
(
"eip %p id %lx args %p (%x) len %lx unk1 %lx unk2 %lx args %lx,%lx
\n
"
,
eip
,
id
,
args
,
(
char
*
)
args
-
(
char
*
)
&
eip
,
len
,
unk1
,
unk2
,
arg0
,
arg1
);
...
...
@@ -5164,7 +5164,7 @@ static void WINAPI hook_KiUserCallbackDispatcher(void *rsp)
BYTE
args_data
[
0
];
}
*
stack
=
rsp
;
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)
[
stack
->
id
];
KERNEL_CALLBACK_PROC
func
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
[
stack
->
id
];
trace
(
"rsp %p args %p (%#Ix) len %lu id %lu
\n
"
,
stack
,
stack
->
args
,
(
char
*
)
stack
->
args
-
(
char
*
)
stack
,
stack
->
len
,
stack
->
id
);
...
...
@@ -7561,7 +7561,7 @@ static void WINAPI hook_KiUserCallbackDispatcher(void *sp)
BYTE
args_data
[
0
];
}
*
stack
=
sp
;
ULONG_PTR
redzone
=
(
BYTE
*
)
stack
->
sp
-
&
stack
->
args_data
[
stack
->
len
];
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)
[
stack
->
id
];
KERNEL_CALLBACK_PROC
func
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
[
stack
->
id
];
trace
(
"stack=%p len=%lx id=%lx lr=%lx sp=%lx pc=%lx
\n
"
,
stack
,
stack
->
len
,
stack
->
id
,
stack
->
lr
,
stack
->
sp
,
stack
->
pc
);
...
...
@@ -9200,7 +9200,7 @@ static void WINAPI hook_KiUserCallbackDispatcher(void *sp)
BYTE
args_data
[
0
];
}
*
stack
=
sp
;
ULONG_PTR
redzone
=
(
BYTE
*
)
stack
->
sp
-
&
stack
->
args_data
[
stack
->
len
];
NTSTATUS
(
WINAPI
*
func
)(
void
*
,
ULONG
)
=
((
void
**
)
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
)
[
stack
->
id
];
KERNEL_CALLBACK_PROC
func
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
[
stack
->
id
];
trace
(
"stack=%p len=%lx id=%lx unk=%Ix lr=%Ix sp=%Ix pc=%Ix
\n
"
,
stack
,
stack
->
len
,
stack
->
id
,
stack
->
unknown
,
stack
->
lr
,
stack
->
sp
,
stack
->
pc
);
...
...
dlls/opengl32/wgl.c
View file @
3031f157
...
...
@@ -1298,7 +1298,7 @@ static NTSTATUS WINAPI call_opengl_debug_message_callback( void *args, ULONG siz
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
LPVOID
reserved
)
{
void
*
*
kernel_callback_table
;
KERNEL_CALLBACK_PROC
*
kernel_callback_table
;
NTSTATUS
status
;
switch
(
reason
)
...
...
dlls/user.exe16/message.c
View file @
3031f157
...
...
@@ -2607,7 +2607,7 @@ static NTSTATUS WINAPI User16ThunkLock( void *args, ULONG size )
void
register_wow_handlers
(
void
)
{
void
*
*
callback_table
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
;
KERNEL_CALLBACK_PROC
*
callback_table
=
NtCurrentTeb
()
->
Peb
->
KernelCallbackTable
;
static
const
struct
wow_handlers16
handlers16
=
{
button_proc16
,
...
...
dlls/user32/user_main.c
View file @
3031f157
...
...
@@ -108,15 +108,17 @@ static NTSTATUS WINAPI User32CopyImage( void *args, ULONG size )
return
NtCallbackReturn
(
&
ret
,
sizeof
(
ret
),
STATUS_SUCCESS
);
}
static
NTSTATUS
WINAPI
User32DrawNonClientButton
(
const
struct
draw_non_client_button_params
*
param
s
,
ULONG
size
)
static
NTSTATUS
WINAPI
User32DrawNonClientButton
(
void
*
arg
s
,
ULONG
size
)
{
const
struct
draw_non_client_button_params
*
params
=
args
;
user_api
->
pNonClientButtonDraw
(
params
->
hwnd
,
params
->
hdc
,
params
->
type
,
params
->
rect
,
params
->
down
,
params
->
grayed
);
return
STATUS_SUCCESS
;
}
static
NTSTATUS
WINAPI
User32DrawScrollBar
(
const
struct
draw_scroll_bar_params
*
param
s
,
ULONG
size
)
static
NTSTATUS
WINAPI
User32DrawScrollBar
(
void
*
arg
s
,
ULONG
size
)
{
const
struct
draw_scroll_bar_params
*
params
=
args
;
RECT
rect
=
params
->
rect
;
user_api
->
pScrollBarDraw
(
params
->
hwnd
,
params
->
hdc
,
params
->
bar
,
params
->
hit_test
,
&
params
->
tracking_info
,
params
->
arrows
,
params
->
interior
,
...
...
@@ -169,22 +171,23 @@ static NTSTATUS WINAPI User32LoadSysMenu( void *args, ULONG size )
return
NtCallbackReturn
(
&
ret
,
sizeof
(
ret
),
STATUS_SUCCESS
);
}
static
NTSTATUS
WINAPI
User32FreeCachedClipboardData
(
const
struct
free_cached_data_params
*
params
,
ULONG
size
)
static
NTSTATUS
WINAPI
User32FreeCachedClipboardData
(
void
*
args
,
ULONG
size
)
{
const
struct
free_cached_data_params
*
params
=
args
;
free_cached_data
(
params
->
format
,
params
->
handle
);
return
STATUS_SUCCESS
;
}
static
NTSTATUS
WINAPI
User32PostDDEMessage
(
const
struct
post_dde_message_params
*
param
s
,
ULONG
size
)
static
NTSTATUS
WINAPI
User32PostDDEMessage
(
void
*
arg
s
,
ULONG
size
)
{
const
struct
post_dde_message_params
*
params
=
args
;
return
post_dde_message
(
params
->
hwnd
,
params
->
msg
,
params
->
wparam
,
params
->
lparam
,
params
->
dest_tid
,
params
->
type
);
}
static
NTSTATUS
WINAPI
User32RenderSsynthesizedFormat
(
const
struct
render_synthesized_format_params
*
params
,
ULONG
size
)
static
NTSTATUS
WINAPI
User32RenderSsynthesizedFormat
(
void
*
args
,
ULONG
size
)
{
const
struct
render_synthesized_format_params
*
params
=
args
;
render_synthesized_format
(
params
->
format
,
params
->
from
);
return
STATUS_SUCCESS
;
}
...
...
@@ -212,7 +215,7 @@ static NTSTATUS WINAPI User32UnpackDDEMessage( void *args, ULONG size )
return
NtCallbackReturn
(
&
result
,
sizeof
(
result
),
STATUS_SUCCESS
);
}
static
const
void
*
kernel_callback_table
[
NtUserCallCount
]
=
static
KERNEL_CALLBACK_PROC
kernel_callback_table
[
NtUserCallCount
]
=
{
User32CallEnumDisplayMonitor
,
User32CallSendAsyncCallback
,
...
...
dlls/wineandroid.drv/dllmain.c
View file @
3031f157
...
...
@@ -116,7 +116,7 @@ static void CALLBACK register_window_callback( ULONG_PTR arg1, ULONG_PTR arg2, U
BOOL
WINAPI
DllMain
(
HINSTANCE
inst
,
DWORD
reason
,
LPVOID
reserved
)
{
struct
init_params
params
;
void
*
*
callback_table
;
KERNEL_CALLBACK_PROC
*
callback_table
;
if
(
reason
!=
DLL_PROCESS_ATTACH
)
return
TRUE
;
...
...
dlls/winemac.drv/dllmain.c
View file @
3031f157
...
...
@@ -368,8 +368,7 @@ cleanup:
return
NtCallbackReturn
(
entries
,
count
*
sizeof
(
entries
[
0
]),
0
);
}
typedef
NTSTATUS
(
WINAPI
*
kernel_callback
)(
void
*
params
,
ULONG
size
);
static
const
kernel_callback
kernel_callbacks
[]
=
static
const
KERNEL_CALLBACK_PROC
kernel_callbacks
[]
=
{
macdrv_app_icon
,
macdrv_app_quit_request
,
...
...
@@ -384,7 +383,7 @@ C_ASSERT(NtUserDriverCallbackFirst + ARRAYSIZE(kernel_callbacks) == client_func_
static
BOOL
process_attach
(
void
)
{
struct
init_params
params
;
void
*
*
callback_table
;
KERNEL_CALLBACK_PROC
*
callback_table
;
struct
localized_string
*
str
;
struct
localized_string
strings
[]
=
{
...
...
dlls/winevulkan/loader.c
View file @
3031f157
...
...
@@ -619,7 +619,7 @@ static NTSTATUS WINAPI call_vulkan_debug_utils_callback( void *args, ULONG size
BOOL
WINAPI
DllMain
(
HINSTANCE
hinst
,
DWORD
reason
,
void
*
reserved
)
{
void
*
*
kernel_callback_table
;
KERNEL_CALLBACK_PROC
*
kernel_callback_table
;
TRACE
(
"%p, %lu, %p
\n
"
,
hinst
,
reason
,
reserved
);
...
...
dlls/winex11.drv/dllmain.c
View file @
3031f157
...
...
@@ -25,8 +25,7 @@
HMODULE
x11drv_module
=
0
;
typedef
NTSTATUS
(
WINAPI
*
kernel_callback
)(
void
*
params
,
ULONG
size
);
static
const
kernel_callback
kernel_callbacks
[]
=
static
const
KERNEL_CALLBACK_PROC
kernel_callbacks
[]
=
{
x11drv_dnd_enter_event
,
x11drv_dnd_position_event
,
...
...
@@ -40,7 +39,7 @@ C_ASSERT( NtUserDriverCallbackFirst + ARRAYSIZE(kernel_callbacks) == client_func
BOOL
WINAPI
DllMain
(
HINSTANCE
instance
,
DWORD
reason
,
void
*
reserved
)
{
void
*
*
callback_table
;
KERNEL_CALLBACK_PROC
*
callback_table
;
struct
init_params
params
=
{
foreign_window_proc
,
...
...
include/winternl.h
View file @
3031f157
...
...
@@ -307,6 +307,8 @@ typedef struct _CHPE_V2_CPU_AREA_INFO
#define TEB_ACTIVE_FRAME_CONTEXT_FLAG_EXTENDED 0x00000001
#define TEB_ACTIVE_FRAME_FLAG_EXTENDED 0x00000001
typedef
NTSTATUS
(
WINAPI
*
KERNEL_CALLBACK_PROC
)(
void
*
,
ULONG
);
/* FIXME: not the correct name */
/***********************************************************************
* PEB data structure
*/
...
...
@@ -341,7 +343,7 @@ typedef struct _PEB
ULONG
ProcessCurrentlyThrottled
:
1
;
ULONG
ProcessImagesHotPatched
:
1
;
ULONG
ReservedBits0
:
24
;
PVOID
KernelCallbackTable
;
/* 02c/058 */
KERNEL_CALLBACK_PROC
*
KernelCallbackTable
;
/* 02c/058 */
ULONG
Reserved
;
/* 030/060 */
ULONG
AtlThunkSListPtr32
;
/* 034/064 */
PVOID
ApiSetMap
;
/* 038/068 */
...
...
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